Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Masoud Kalali

Ranch Hand
+ Follow
since Jul 08, 2004
Masoud likes ...
Java Mac OS X Netbeans IDE
Software engineer with focus on Java EE, author, technology enthusiast, and to some extent a geek.
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Masoud Kalali

Is there any reason which make you perform this batch processing from within the application server? I think the best bet is to pull this requirement out of the application server and let another separate process perform the task. You can change the second process priority in operating system level and ensure that it will not widely affects your application server performance.

If it is a hard requirement to perform the batch process from within the application server, you might be able to use platform MBeans to check the CPU load and start your process chunk if the load is below a certain value like 20%.

I have not seen any BAM solution in the open source market, however
You can take a look at OpenESB and its related components which includes a very good BPEL designer (Based on NetBeans), a well established portal (OpenPortal), GlassFish application server and so on.
9 years ago
Can you explain more about your requirement? do need to provide authentication for users who want to access some specific url patterns in your application?
for example when a user want to access* ?

9 years ago

Can you explain what you are going to do? you need to initialize the context factory when you are outside a preconfigured container, for example when you want to access the container managed objects from outside the container. You can take a look at this blog entry to understand how we can use the contextfactory to access container managed resources.

this is a simple code for initializing a context factory for GlassFish. you can find a more extensive explanation at
9 years ago
You can let Java to use more memory but it is not the ultimate solution, you should first check and see whether you have some memory leak or something and then try to use more memory. for example -Xmx3584m let the JVM instance to give JVM more memory. To solve such problems you can use profilers like yourKit or JProfiler, etc.

For load balancing and clustering, take a look at and

9 years ago
Hi Jose,

You need to add the following file to your project classpath and I think you should use com.sun.appserv.naming.S1ASCtxFactory instead of the com.sun.enterprise.naming.SerialInitContextFactory, honestly I do not remember the difference right now.

9 years ago
Hi joseph,

Sun java Application server 8.x support J2EE 1.4 while GlassFish application server supports both J2EE 1.5 and the new Java EE 5.
You can download GlassFish from you can get GlassFish V2ur2 which is the latest version with Java EE 5 support.

9 years ago
It depends on how many read/ write operations you want to perform, if you are going to have many read/ write operations on that state values then a cache system like EhCache would be very suitable for a single instance or a clustered environment. You can use ehCache event handlers to store the changes in a database system or a log file when an state value changes. By using event system you will not involve your system with database for many read/ write operations. On the other hand If you have a few read and write operations then Database would do the trick.

You need to create an update-able ResultSet, something similar to

The ResultSet object will be forward only meaning that you can not go backward in the ResultSet by calling previous() method.
Intreoid Ibex is the answer for laptop users, it has all that I was looking for my T400. Now I have 8.10 on the T400 which was running Windows XP and 8.4 on the desktop.
I am quite happy with 8.10 64 bit performance and out of the box device support, it even detect the built-in web came out of the box.
9 years ago
I remember that some old version of ORACLE JDBC driver do not support scrollable resultsets (ResultSet.TYPE_SCROLL_SENSITIVE) and even if you explicitly request for an scrollable resultset it gives you a none scroll sensitive resultset(ResultSet.FORWARD_ONLY).
Take a look at
and see whether your version of driver is affected by this limitation or not.
It is simply possible by using a Groovy, a properties step and a datasource; analyse the previous response using a groovy script step and using the result of your analysing and some xml or configuration file, decide about the next step input values which can be read from a database using datasource. take a look at:
9 years ago
Maybe you could use a simple linux command to see which files are in use by which process. for example if you put the parent folder name in the following command you will find which files inside it or its child are in use by some process.

9 years ago
the following article completely explains how you can create a connection pool in Tomcat and then use it in your web application, please take a look and if you encounter any problem let us help you with it.

9 years ago
Do you tried to execute chown yourself file_name as root user in your script?

if you could post more details like your script ... it will be easier to come with a solution.

10 years ago