I have a plugin for OpenFire that creates and delivers a message to a user using
XMPPServer.getInstance().getMessageRouter().route(message)
What I would like to know is what happens to that message if the user is not online.
My goal is to only have the message delivered if the user is online, and fail or be routed to the bit bucket...
Has anyone ever used any Java based open soure cms tools? I am evaluating jackrabbit specifically. Does anyone have any thought on it or know something that is better?
...
I have a java app that works with an EJB, however if:
The EJB gets updated, the app is broken.
The app server is updated, the app is broken.
Without human involvement, is there a preferred method to update the client jars for the app server and bean?
If there preferred method depends on the app server, then assume jboss.
...
Connection.close() may throw SqlException, but I have always assumed that it is safe to ignore any such exceptions (and I have never seen code that does not ignore them).
Normally I would write:
try{
connection.close();
}catch(Exception e) {}
Or
try{
connection.close();
}catch(Exception e) {
logger.log(e.getMessag...
What's better practice when defining several methods that return the same shape of data with different filters? Explicit method names or overloaded methods?
For example. If I have some Products and I'm pulling from a database
explicit way:
public List<Product> GetProduct(int productId) { // return a List }
public List<Product> G...
So I've played some with the new, not yet final release of ASP.NET MVC framework and I find it to be very nice and elegant. However at work we are tied to Java for the time being, so I'm wondering this: is there a port of the framework out there for Java people like myself? I realize that webforms isn't going to be available unfortunatel...
I'm busy with an asignment where i have to make a graphical interface for a simple program. But i'm strugling with the layout.
This is the idea:
What is the easiest way to accomplish such a layout?
And what method do you use to make layouts in java. Just code it, or use an IDE like netbeans?
...
I have some thread-related questions , assuming the following code (please ignore the possible inefficiency of the code,I'm only interested in the thread part):
//code without thread use
public static int getNextPrime(int from) {
int nextPrime = from+1;
boolean superPrime = false;
while(!superPrime) {
boolean prime = t...
Question
I have an application written in Java. It is designed to run on a Linux box standalone. I am trying to spawn a new firefox window. However, firefox never opens. It always has a shell exit code of 1. I can run this same code with gnome-terminal and it opens fine.
Background
So, here is its initialization process:
Start ...
I have a Spring MVC web app which uses Spring Security. I want to know the username of the currently logged in user. The code snippet below is what I'm doing. My question is, is this the accepted way?
I don't like having a call to a static method inside this controller - that defeats the whole purpose of Spring, IMHO. Is there a w...
I'm having a problem, creating a fixed-size overall panel for a touchscreen GUI application that has to take up the entire screen. In a nutshell, the touchscreen is 800 x 600 pixels, and therefore I want the main GUI panel to be that size.
When I start a new GUI project in NetBeans, I set the properties of the main panel for min/max/pr...
Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars?
...
I am looking to parse a URL to obtain a collection of the querystring parameters in Java. To be clear, I need to parse a given URL(or string value of a URL object), not the URL from a servlet request.
It looks as if the javax.servlet.http.HttpUtils.parseQueryString method would be the obvious choice, but it has been deprecated.
Is the...
I mean other than using it when required for functions, classes, if, while, switch, try-catch.
I didn't know that it could be done like this until I saw this SO question.
In the above link, Eli mentioned that "They use it to fold up their code in logical sections that don't fall into a function, class, loop, etc. that would usually be ...
I would like to implement a command line interface for a Java application. This wouldn't be too difficult to do, except I would like the command line program to affect the state of another Java GUI program. So for example, I could type:
java CliMain arg1 arg2
And another running GUI instance would perform an appropriate action.
What ...
We ship Java applications that are run on Linux, AIX and HP-Ux (PA-RISC). We seem to struggle to get acceptable levels of performance on HP-Ux from applications that work just fine in the other two environments. This is true of both execution time and memory consumption.
Although I'm yet to find a definitive article on "why", I believe ...
'''use Jython'''
import shutil
print dir(shutil)
There is no, shutil.move, how does one move a file with Jython?
and while we at it, how does one delete a file with Jython?
...
Now that Java is open source, one of the first things I would like to do is to disable array bounds checking for certain blocks of code, where I'm dead sure I cannot go offbounds and where performance heavily matters.
Now, I'm not a compilers/grammar expert, so any syntax would be good enough for me: Here's one that I can think of:
pra...
FindBugs has found a potential bug in my code. But it is not a bug.
Is it possible to mark this occurrence as 'not a bug' AND have it removed from the bug list?
I have documented quite clearly why for each case it is not a bug.
For example. A class implements the comparable interface. it has the compareTo method. I have however not ov...
Hello,
could someone provide working example (full maven plugin configuration) how to copy built jar file to a specific server(s) at the time of deploy phase?
I have tried to look at wagon plugin, but it is hugely undocumented and I was not able to set it up. The build produces standard jar that is being deployed to Nexus, but I need t...