users@glassfish.java.net

Re: Application load order error?

From: Adam Jenkins <adamjenkinstmpredirect_at_yahoo.com.au>
Date: Tue, 24 Feb 2009 16:31:16 -0800 (PST)

Removed name attribute from the @EJB annotation:    No change, same error
Perform explicit lookup in Filter init method: works fine

It looks like it's just a timing issue.  The web application must be starting up first, before the enterprise application with the EJBs in it.  And since the filters and listeners are instantiated and injected on startup, it's trying to lookup an EJB that isn't bound to JNDI yet.

Is there anyway to tell glassfish to load the enterprise application first?

Cheers
Adam



--- On Wed, 25/2/09, glassfish_at_javadesktop.org <glassfish_at_javadesktop.org> wrote:

From: glassfish_at_javadesktop.org <glassfish_at_javadesktop.org>
Subject: Re: Application load order error?
To: users_at_glassfish.dev.java.net
Received: Wednesday, 25 February, 2009, 10:43 AM

Not sure why the injection is failing.  Can you try removing the name() attribute from each of the injected fields and re-running.   

Also, if you do the following explicit global lookup from within the filter does it work?

   (SystemRemote) new InitialContext().lookup("ejb/SystemBean")
[Message sent by forum member 'ksak' (ksak)]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net