[jboss-user] [JBoss Seam] - Re: Injecting beans defined in jboss-beans.xml

daleth do-not-reply at jboss.com
Sat Dec 30 08:08:02 EST 2006


Sorry, I thought Seam looked up most of its components from the JNDI tree, not just the EJB3 stuff.  Again, I don't know much about how Seam works internally.  I do see how I could use the @Unwrap to take something bound in JNDI and expose it though.  The ultimate goal is simply to be able to expose mico-container created beans to Seam components via the @In annotation.  I'll look to see if I can cut out JNDI lookup part totally an report back on that.

Now, as to why I actually want to do this, it's pretty simple.  My customer deploys in a plain old Tomcat container and the particular application I'm working on has a couple of things that need to be initialized and available to Seam components.  For example, one part of the application uses XFire to contact a web service and stream in data so I'm using the micro-container to get that client set up.  This client is then used by a couple of stateless session bean Seam components.  Another example is an application configuration bean that holds information used by multiple Seam components.

While Seam 1.1 is probably to new to say for sure I can imagine people running it in other containers will want to take advantage of services offered by those containers.  Often these services are available from JNDI or would need to be setup programmatically, some subset of which could be done using something like the micro-container (or other IoC containers like spring).

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

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



More information about the jboss-user mailing list