|
How is this set up?
I have a bean which need to call an ejb that is
deployed in another ejb server (in this case Ejipt but could/will be
Weblogic).
How am i doing the lookup? I guess i have to use
ctx = new InitialContext() to get the context to use when looking up the bound
ref in jboss, but how am i linked to the other server? When/how is
Ecs:Checkout.CheckoutRegisterHome bound in jboss jndi?
I did a test where i had a mben which during
startup made a lookup to this other ejb server and then stored a ref to
Ecs.Checkout.CheckoutRegisterHome in jboss jndi, which i later on could use
through normal env lookup. But the most correct way ought to be to use
ejb-ref-name and jndi-name descriptions in the xml-files. But i can't get it to
work.
Thanks,
Lennart
My jboss.xml looks like this:
<?xml version="1.0"
encoding="UTF-8" ?>
<ejb-name>UniqueKey</ejb-name>
<jndi-name>ejb/UniqueKey</jndi-name>
<ejb-ref-name>ejb/CheckoutRegister</ejb-ref-name>
<jndi-name>ejipt://lks145:2323/Ecs.Checkout.CheckoutRegisterHome</jndi-name>
</ejb-ref> </entity> </enterprise-beans>
</jboss>
Part of my ejb-jar.xml looks like this:
<?xml version="1.0"
encoding="UTF-8" ?>
<display-name />
<description>UniqueKey is the implementation of the
UniqueKey component.</description>
<ejb-name>UniqueKey</ejb-name>
<home>se.benefit.util.UniqueKeyHome</home>
<remote>se.benefit.util.UniqueKey</remote>
<ejb-class>se.benefit.util.UniqueKeyCMP</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>se.benefit.util.UniqueKeyPK</prim-key-class>
<reentrant>True</reentrant> -
--- skip ---
<ejb-ref-name>ejb/CheckoutRegister</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>CheckoutRegisterHome</home>
<remote>CheckoutRegister</remote>
</ejb-ref> </entity>
--- skip
--- |
