I have a very simple piece of code that reads like:
@In(create = true) OutletHome outletHome;
It was working fine (using Seam 2.2.0.GA), and the object was being created and injected without any problems. But when I tried changing it to:
@In(create = true) OutletHome deactivationOutletHome;
It suddenly stopped working, causing the ...
I am trying add some response headers to some of my webservice calls. I wrote my webservice using CXF 2.1.2 and JAX-RS. I need to return an object and I also want to add some headers to the Response. Without returning a javax.ws.rs.core.Response object, how do I add a header to the response and still return my javabean?
...
Hello everyone. I'm having hard time to make my program work correctly. In brief, my program consists of several initial threads: Main, MessageReceiver, Scheduler (used Quartz package) and two types of threads scheduled by the Scheduler thread: TraceReader and ScheduledEvent. Now, when TraceReader is fired, it reads a special trace file ...
Hi,
I want to compress/transform a string as new string.
i.e.:
input string:
USERNAME/REGISTERID
output string after compress:
<some-string-in-UTF8-format>
output string after decompress:
USERNAME/REGISTERID
There are some compress or hash method for this transformation?
I prefer some solution using Java or an algorithm with ...
I have a query string passed in through an HTTP request that has this character in it:
%u54E6
And I'd like to generate a string that contains the actual Chinese character so I can use it in a different part of the application, I've tried using this code:
String foo = "%u54E6";
String ufoo = new String(foo.replaceAll("%u([a-zA-Z0-9]{4}...
We have two massive applications,lets name them "A_app" and "B_app". Both A_app and B_app come with rich editors. A_app's editor is written using Java-Swing and B_app's editor is written using QT.
Now we need to be able to integrate A_app's editor in B_app's editor, which would effectively mean that we need to integrate an existing Swi...
I have a shell script which I'd like to trigger from a J2EE web app.
The script does lots of things - processing, FTPing, etc - it's a legacy thing.
It takes a long time to run.
I'm wondering what is the best approach to this. I want a user to be able to click on a link, trigger the script, and display a message to the user saying tha...
Does anyone know of a great library in java for parsing user agent strings? We have written a custom one, but this seems like a common problem for many people. I would guess there is a good library available somewhere.
For example, the user agent string...
"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like...
When I configure the scmchangelog-plugin, as written in the examples/tutorial, and run the site-generation, the username and password I have set are ignored.
The documentation says that username and password which should be used to access the SCM can be configured in the plugin-configuration. This looks like this:
<reporting>
<plugins...
I'm trying to follow the Drools Flow example code in the Human Task documentation and I have the following code:
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.drools.task.service.TaskService;
// ...
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("org.drools.task")...
hello guys i'm not sure if the title is descriptive enough.what i mean is creating an enum
like so
public enum Test{
ONE, TWO ,THREE
}
this looks like hard coded.if for some reason i need to add the FOUR some certain business rules evolution reasons.should i code it and deploy it again?
isn't a way to let it pick the elements from ...
I want to limit the maximum memory used by the JVM. Note, this is not just the heap, I want to limit the total memory used by this process.
...
What I need is to check whether a given string partially matches a given regex. For example, for the regex ab[0-9]c, the strings "a", "ab", "ab3", and "b3c" would "match", but not the strings "d", "abc", or "a3c". What I've been doing is the clunky a(?:b(?:[0-9](?:c)?)?)? (which only works for some of the partial matches, specifically ...
I'm writing an rmi application. Everything works perfectly fine when i put the all classes in one directory(one single package). However, when i try to split the server part and the client part, exceptions happens to the client. Server works normally.
Here is part of the stack trace of after exception happens:
Exception in thread "main"...
This question is, at it's core, a design question. I'll use a Java/JEE example to illustrate the question.
Consider a web-mail application which is built using JPA for persistence and EJB for the services layer. Let's say we have a service method in our EJB like this:
public void incomingMail(String destination, Message message) {
...
JSR 220: Enterprise JavaBeansTM,Version 3.0
section 3.4.2
paragraph 3
All non-relationship fields and properties and all relationships owned by the entity are
included in version checks.
My Question:
What does "owned by the entity" mean?
...
Via this question, it would seem that normally you can't mix-and-match look and feels in the same swing app.
However, we've been using groovy's swingbuilder to handle all of our GUI code, and groovy seems to do enough black magic that this seemed in the Realms of the Possible.
Can swingbuilder set the LaF at, say, the Frame level?
(Sp...
Hi everibody.
I'm kinda new to this of XML parsing. So I'll appreciate if you can help me with this.
I need to extract some data that's inside an XML document whose structure is:
<DWDocument DW5BasketFileName="DOCU0001.001">
<FileInfos>
<ImageInfos>
<ImageInfo id="0,0,0" nPages="0">
<FileInfo fileName="PATH_1" dwFi...
I know SWT has a Link class to create HTML a href style links as widgets, but I wast trying to find a way to make certain text in a StyledText control appear and function as a link.
I feel like Eclipse does this in their code editor if you hold down control and hover over a method name, but I know the Eclipse java editor is much more ...
I have a situation where I need to join tables on an object in an ORM class hierarchy where the join column is NOT the primary key of the base class. Here is an example of the table design:
CREATE TABLE APP.FOO
(
FOO_ID INTEGER NOT NULL,
TYPE_ID INTEGER NOT NULL,
PRIMARY KEY( FOO_ID )
)
CREATE TABLE APP.BAR
(
FOO_ID IN...