Hi,
It may be strange question, but I am spring newbie and this one thing is unclear for me.
As I've read here:
http://static.springsource.org/sprin.../html/ejb.html
I can access Remote and Local interfaces of EJBs deployed on some application server.
Obtaining remote reference is pretty clear for me - we have spring client using beans initialized by spring context.xml and those beans, which need to have reference to remote EJBs interfaces, are obtaining it through JNDI. Something like below (our thin spring client residing on local machine, obtaining EJB's remote interfaces through jndi):
OurSpringApp (on our machine) <--JNDI--> (Remote)MyBean (on application server)
Ok, but the point about obtaining Local EJB interface is not so clear for me. As the local interface in EJB3 I mean:
and MyLocalInterface can be used only by components (beans) residing on the same application server as instance of MyStatelessBean. So My Spring application also have to be deployed there.Code:@Local MyLocalInterface { void someMethod(); } @Stateless MyStatelessBean implements MyLocalInterface { @Override void someMethod() { /* nothing */ } }
Ok, I can pack it into jar/war and deploy it, but how then can I obtain reference to those deployed spring beans from my local thin client? How should I initialize spring beans factory on application server? Could you please give me some simple example?
Thank you in advance!


Reply With Quote
