[jboss-user] [JBoss Seam] - Re: ResourceServlet with injection

tfvaida do-not-reply at jboss.com
Wed Apr 4 14:26:49 EDT 2007

Oops - nevermind - I figured out how to get around this:

First - you cannot inject anything other than the logger, PeristenceManager and such throw errors.

You will have the application context which as the example code shows can be grabbed from the static Contexts.getApplicationContext() function.

To get any other Seam objects you must go through a component - and it must be through the 'local' interface EJB style ie:

DocumentManager docManager = (DocumentManager) Component.getInstance("documentManager");

Where in this case the beans are a stateful session bean and the local interface like this:

  | @Stateful(...)
  | ...
  | class DocumentManagerBean implements DocumentManager {
  | ...

  | interface DocumentManager {
  | ...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034720#4034720

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034720

More information about the jboss-user mailing list