users@glassfish.java.net

Re: Just for curiosity and in case needed later

From: <glassfish_at_javadesktop.org>
Date: Fri, 13 Aug 2010 10:15:03 PDT

> I guess that as I grow old, i like to keep glassfish
> as happy as I can...

Sure, but as I mentioned, these static fields aren't in EJBs, just "unmanaged" POJOs. It's also why my queue processors are Timer jobs within the container, which, with JEE 5, is the only way to do a thread in the EJB container.

Now, I could have just done a thread in the Web app, since there aren't any limitations there on threading. But I chose to keep it in the container, and used a Timer instead (which is actually a lot of work to do it right...).

I look at the restrictions in the EJB spec as "Noted, here be dragons". Those dragons mostly rear their ugly heads when you want to port the app. But, for example, I've never had any problems with the java.io restriction in app servers I've worked with.
[Message sent by forum member 'whartung']

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