users@glassfish.java.net

Re: Internal processes in EJB

From: <glassfish_at_javadesktop.org>
Date: Tue, 18 Nov 2008 16:02:56 PST

We have a slightly similar issue.....


we are using JBOSS 4.0.5 GA with EJB 3.0

can we create threads within stateless SB's transaction scope?

the scenario is that the thread that is created internally accesses the entity manager. it does get the em from through JNDI look up but any operation yields this exception

20:52:58,970 ERROR [STDERR] java.lang.NullPointerException
20:52:58,970 ERROR [STDERR] at org.jboss.ejb3.entity.ManagedEntityManagerFac
tory.getNonTxEntityManager(ManagedEntityManagerFactory.java:59)
20:52:58,970 ERROR [STDERR] at org.jboss.ejb3.entity.ManagedEntityManagerFac
tory.getTransactionScopedEntityManager(ManagedEntityManagerFactory.java:164)

perhaps the transaction scope is not propagated.

we used jdj 1.5's "concurrent package" to achieve parallel processing.

We also tried JBOSS work manager but it falls short of our requirement to wait till all tasks are completed. Later versions of work manager does have this feature. However that requires us to replace core jar files that come bundled with 4.0.5 G, is this recommended?

Its claimed that 5.0 does support such operations. Does anyone have an insight about this issue.

regards
[Message sent by forum member 'rajraman' (rajraman)]

http://forums.java.net/jive/thread.jspa?messageID=317468