geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Lindback <thomas_lindb...@yahoo.com>
Subject About lookup ejb deployed separate from a servlet
Date Sat, 15 Jul 2006 07:04:28 GMT
Hello. 
I am evaluating geronimo-1.1. I have tested all
bean-types and run them with standalone clients and it
works great. No problem.

Now I am trying to access a bean from a servlet.
I am deploying the beans as a separate jar and the web
part is in its own war just to simulate some parts of
a real application.
I don't seem to be able to successfully configure the
ejb-ref. 


The servlet code:
  InitialContext ctx = new InitialContext();
  Object o = ctx.lookup(
     "java:comp/env/ejb/UserFacade");
  UserFacadeHome home = (UserFacadeHome) 
     PortableRemoteObject.narrow(
     o, UserFacadeHome.class);
  UserFacade remote = home.create();


web.xml:
    .....
    <ejb-ref>
        <ejb-ref-name>ejb/UserFacade</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>teel.interfaces.UserFacadeHome</home>
        <remote>teel.interfaces.UserFacade</remote>   
    
     </ejb-ref>

geronimo-web.xml:
      ....
      <!--    the ejb jar file      -->
      <dep:dependencies>
          <dep:dependency>
              <groupId>teel</groupId>
              <artifactId>MyFirstEntity</artifactId>
              <version>1.0</version>
              <type>jar</type>
          </dep:dependency>
      </dep:dependencies>


    <naming:ejb-ref>           
<naming:ref-name>ejb/UserFacade</naming:ref-name>
        <pattern>
            <groupId>teel</groupId>
            <artifactId>MyFirstEntity</artifactId>
            <version>1.0</version>
           
<module>teel/MyFirstEntity/1.0/jar</module>
            <name>UserFacade</name>
        </pattern>
    </naming:ejb-ref>

In geronimo-web.xml for the ejb-ref I have tried
almost all combinations already. 

The lookup in the servlet generates:
javax.naming.NameNotFoundException: Could not resolve
abstract name query [teel/
MyFirstEntity/1.0/car?EJBModule=teel/MyFirstEntity/1.0/jar,name=UserFacade#org.o
penejb.EJBContainer] in configuration
teel/HelloWorldWeb/1.0/war

Can anyone see what is wrong? Thanks in advance.
Thomas.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message