Jacek
When I try to get bean existing in different ear from my MDB (deployed on
the same Geronimo) using initial context like:
InitialContext ic = new InitialContext();
feedbackGate = (FeedbackGateRemote) ic.lookup("CoreManagerRemote");
I get NamingException,
but if I initialize context with additional properties application is
working fine:
Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.RemoteInitialContextFactory");
properties.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201");
InitialContext ic = new InitialContext(properties);
feedbackGate = (FeedbackGateRemote) ic.lookup("CoreManagerRemote");
Is it impossibly to make the first solution working ?
Beniamin
Jacek Laskowski wrote:
>
> On Nov 23, 2007 11:22 PM, Tomasz Mazan <[EMAIL PROTECTED]> wrote:
>
>> CoreManager (session bean annotated with name "CoreManager") with @remote
>> interfaces and MDB in separated modules (jars/ears) but runs in the same
>> Geronimo 2.0.2 instance. At runtime MDB is notified what's CoreManager
>> jndi
>> name, and should get it from context.
>
>
>> 1. Is there common context for those modules / beans ?
>
> What do you mean by "common context"? If you think of a common JNDI
> naming space, the answer is no - they're in different ears so they
> share only a few objects common objects of Geronimo that all ears
> share and they're different Java instances.
>
>> 2. What's the name of CoreManager that I should pass to my MDB to get
>> proper
>> core object?
>
> Exactly the same you'd use from your remote client, but the difference
> lies in the JNDI properties that are not necessary. Geronimo takes
> care of it.The jndi name is earfilename/ejbname{remote} or alike (will
> have to set up an example myself).
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>
>
--
View this message in context:
http://www.nabble.com/Accessing-my-EJB-remote-interface-from-my-MDB-tf4864045s134.html#a13951517
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.