Jochen Zink-2 wrote:
>
> Hello,
>
> I have an EAR File containing a MessageDriven bean. This MDB makes a
> lookup to a Stateless Session Bean, which is deployed as external EJB-JAR
> File (not inside the same EAR). The lookup ends up in a
> NameNotFoundException. Im not sure what I did wrong.
>
> The EJB-JAR contains the EJB and in META-INF the openejb-jar.xml:
> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
> <dep:environment
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
> <dep:moduleId>
> <dep:groupId>com.accumio.ae.quellen</dep:groupId>
> <dep:artifactId>AU</dep:artifactId>
> <dep:version>1.0</dep:version>
> <dep:type>car</dep:type>
> </dep:moduleId>
> <dep:dependencies/>
> <dep:hidden-classes/>
> <dep:non-overridable-classes/>
> </dep:environment>
> </openejb-jar>
>
> The EJB itself:
> @Stateless
> public class QuelleAccessAuImpl implements QuelleAccessAu {
> public String start(Integer vorgangPK, QuelleDTO quelle) throws
> SystemException {
> System.out.println( vorgangPK );
> return null;
> }
>
> }
>
> The Interface QuelleAccessAu contains the annotation @Remote
>
>
> This is packed into an ejb-jar File and deployed to Geronimo.
>
>
> Inside the MessageDriven Bean (another EAR-File), I try to access the EJB
> QuelleAccessAuImpl with the following Code:
> Properties props = new Properties();
> props.setProperty("java.naming.factory.initial",
> "org.openejb.client.RemoteInitialContextFactory");
> props.setProperty("java.naming.provider.url", "127.0.0.1:4201");
> InitialContext ic = new InitialContext(props);
>
> QuelleAccessAu ejb = (QuelleAccessAu)
> ic.lookup("com.accumio.ae.quellen/AU/1.0/car/QuelleAccessAuImpl/com.accumio.ae.quelle.au.service.QuelleAccessAu");
>
>
> This lookup ends up with a nameNotFoundException.
>
> Can anybody see what I did wrong?
>
> Thanks a lot!
>
> Regards Jochen
>
> _____________________________________________________________________
> Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
>
>
>
Look here
http://www.nabble.com/Is-there-any-reason-to-use-%40Remote-for-session-bean...-tf4285008s134.html
and here
http://cwiki.apache.org/confluence/display/GMOxDOC20/Jar+to+Jar+EJB+references+%28no+ear%29
There thread should be helpful
Beniamin
--
View this message in context:
http://www.nabble.com/Accesing-EJB3-with-RemoteInterface-tf4549064s134.html#a12989705
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.