J2E and multi-threading

I know that multi threading is not permited in J2E applications.

BUT my pb is as following:

My J2E application is using a scheduler (Quartz). This scheduler reads a file witch contains commands to be inserted in database.

If i make a classical loop with a for instruction, the performance are not good...because i need to wait for the insert before inserting a new command.

I woulk like to use a threading mechanism to insert those commands in DB. Why is this solution not correct and what can i do as an alternative (without using MDB) ?

[569 byte] By [f.visticota] at [2007-11-27 8:38:27]
# 1
Nobody can help me...Please can someone provide me some links, advices ?
f.visticota at 2007-7-12 20:36:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Using JMS and MDBs is the probably the cleanest way to accomplish this given the

existing set of Java EE APIs.One alternative would be to use EJB Timers to achieve the

asynchrony by providing a very small timeout, but that is a bit of a hack.

Adding a simple asynchronous invocation option to session bean business methods is a feature that

will be considered for the next version of EJB.

--ken

ksaksa at 2007-7-12 20:36:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...