I'm new into Java profiling, and I'd like to ask about it.
Does it make sense to profile an application on the server, where I only have the console?
Is there any console profiler which make sense?
Or should I profile the application only on localhost?
...
Hi,
I have a code that does compression, encryption and checksum on a File Outputstream. Following is the code-
private void start() {
OutputStream os = null;
try {
os = new FileOutputStream("/some/file");
os = wrapAllRequiredTransforms(os);
//Write to os
} finally {
os.close();
}
}
private wrap...
We used Apache with JBOSS for hosting our Application, but we found some issues related to thread handling of mod_jk.
Our website comes under low traffic websites and has maximum 200-300 concurrent users during our website's peak activity time. As the traffic grows (not in terms of concurrent users, but in terms of cumulative requests ...
Hi,
In my application I am using code like this:
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);
df.setTimeZone(User.getTimeZone());
String s = df.format(d);
to format dates in an application that is used across different locales. I'd like to, sometimes, add seconds to this but I don't wan...
Hi,
I need to include native lib (jnotify but I think that it does't matter) to my jar. I wont to do it with NetBeans.
I added Bundle-NativeCode: /lib/jnotify.dll; osname=win32 to my manifest.mf file and added jnotify.dll to projektHome\src\lib\ folder. But unfortunately NetBeans is overidning manifest.mf file.
How can I fixed? Can I ...
UPDATE: The Code working when I use it as java program. And When I run it as jsp it gives the following exception.
java.security.AccessControlException: access denied (java.security.SecurityPermission insertProvider.SunJSSE)
I posted the code below. I got the following exception.How to resolve this? I already searched in google but did ...
Is it possible, and when yes, how?
...
I have been programming, non professionally for about 23 years and find I am a little stuck in my ways. I find a tool I like, and it stays that way for year after year. Unfortunately this means that I am behind the times in my programming.
I am not directly planning on programming professionally per se, however, it is very handy to be a...
Hi folks,
I am calculating a large number of possible resulting combinations of an algortihm. To sort this combinations I rate them with a double value und store them in PriorityQueue. Currently, there are about 200k items in that queue which is pretty much memory intesive. Acutally, I only need lets say the best 1000 or 100 of all ite...
Hi all, I want to check when the internet goes off can i capture that event .I am not getting the proper API or any example which would explain the same .
I am using socket for (TCP)communication and I open a socket when the network is available. I have observed that the socket does not give any exception in case the network goes off.
...
hi
I have tried to export jasper report with in the aracbic content through java program. I have set the locale [arabic] in jasper page and also set the locale in my java program. But i can't get the arabic data in my report. It Shows the arabic datas are ?????????????. So anybody guide me for the further steps?.
Thanks in Advance
Rega...
I have a java junit test that passes when run alone on a development machine. We also have a hudson job which runs all the tests, invoked via ant, on a Mac OS X 10.4 node with Java 1.5. The test was passing in the hudson build until recently but now (with no related code changes) one test fails everytime with the following error:
Error ...
Hello,
I need to parse a search query with a "Google-like" syntax (but simpler, since I don't need parenthesis, operator nesting and such). An example string might be:
TAG1: a,b,c TAG2: 123 TAG3: a,45,44,b
So, simply put, I need to recognize tokens which look like a TAG (i.e "color", "name", "age") followed by : and by a single "word"...
for n in `cd src; find . -name "*.java"; cd -`;
do a=`echo $n | cut -d '.' -f2`;
if [[ src/$a.java -nt build/$a.class ]];
then echo src/$a.java;
fi;
done
It lists all the java files in the src tree; then for each one, it removes the suffix ".java" (cut -d '.' -f2 because find . output is prefixed with .). It then uses -nt to ...
Problem:
I want to implement a Web Service using Axis2 with JMS Transport-In, which can process incoming soap messages with compressed content.
Questions:
Is this possible without additional configuration?
Would it be enough for the client to just compress the message content?
Background:
Googling, I have found nothing regarding thi...
I've written some small programs that help me out parsing/analysing data.
I want to use those programs in my grails app.
Regarding my research so far, it is possible, but I don't see where I have to place my Java Code to get it running. Are there any examples available?
...
Naming and Directory (JNDI) - What are Pitfalls for Using JNDI
...
I'm working in JDeveloper and I need to connect to Oracle Database using the ApplicationModule interface.
So I set up the connection, imported the table and created a view. Then I created a new ApplicationModuleImpl that connects to that view.
Now, how do I get to the data through the ApplicationModule object? I read the documentation ...
Where should we declare the destinations and how to link applicationContext.xml and remoting-config.xml file?
...
Hi,
I want to run a simple Apache Camel example that copies files from one directory to another:
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
public void configure () throws Exception {
from("file://c:/fromdir/").to("file://c:/todir/");
}
});
context.start();
If I run this example...