[Snowdrop] - Re: Accessing spring beans that are deployed in a war.

Joshua Wilson <[email protected]>
Newsgroups gmane.comp.java.jboss.user
Message-ID <[email protected]>
Joshua Wilson [https://community.jboss.org/people/jowilson] created the discussion

"Re: Accessing spring beans that are deployed in a war."

To view the discussion, visit: https://community.jboss.org/message/829994#829994

--------------------------------------------------------------
Which way are you trying to go Spring bean into EJB or EJB into Spring?

If are injecting a Spring Bean into an EJB Using Snowdrop then:

{code}
@Stateless
@Interceptors(SpringLifecycleInterceptor.class)
public class InjectedEjbImpl implements InjectedEjb
{
 @Spring(bean = "springBean", jndiName = "MyApp")
 private SpringBean springBean;

}
{code}

OR if you are injecting an EJB Using Annotations then:

{code}
public class ConsumerBean {

    @EJB(mappedName="ejb/exampleEJB")
    ExampleEjb exampleEJB;

}
{code}
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/829994#829994]

Start a new discussion in Snowdrop at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2082]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.