How to start a background process in Java EE -


I want to start a background process in a Java EE (OC4J10) environment. It's wrong to start a thread with just "new thread", but I can not find a good way to do this.

In my special case it is difficult to use the JMS queue because my parameters for this method call are not serial

I have a onTimeout on session bean There was also a thought about using the timer method but it does not allow me to pass the parameter (as far as I know).

> Is there any "theory" method to handle such a task, or I have to return to "new thread" or java.concurrent.ThreadPool .

Java EE usually tries to remove threading from developer concerns (this is a complete success Is a different topic).

JMS is clearly the preferred approach to handle it.

With most parameters, you have the option of compelling or trapping serialization, even if they are not serialized by default. Depending on the data, consider wrapping it into a sergeizable object that can reload the data. This will obviously depend on the parameters and applications.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -