you need to declare ejb-ref in web.xml:
    <ejb-ref>
        <description>HandlerBean</description>
        <ejb-ref-name>HandlerBean</ejb-ref-name>
        <ejb-ref-type>Entity</ejb-ref-type>
        <home>test.HandlerHome</home>
        <remote>test.Handler</remote>
    </ejb-ref>

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of costin
> Sent: Wednesday, February 26, 2003 10:43 AM
> To: Aleksandr Shneyderman
> Subject: Re[4]: [JBoss-user] help with bounding entity bean
> 
> 
> Okay, thanks for the tips.
> 
> I have deployed the apps to the destination but still I can`t get the
> reference to the bean.
> 
> Again, here is the directory list:
> 
> bs.ear
> |-- META-INF
> |   `-- application.xml
> |-- bs-ejb.jar
> |   |-- META-INF
> |   |   `-- ejb-jar.xml
> |   `-- test
> |       |-- Handler.class
> |       |-- HandlerBean.class
> |       `-- HandlerHome.class
> |-- bs-web.war
> |   |-- WEB-INF
> |   |   `-- web.xml
> |   |-- index.html
> |   `-- test.jsp
> `-- lib
>     `-- test -> ../bs-ejb.jar/test
> #####
> 
> and here is a snip from the logs:
> 
> [MainDeployer] Starting deployment of package: 
> file:/usr/local/jboss-3.0.6/server/default/deploy/bs.ear/
> [EARDeployer] Init J2EE application: 
> file:/usr/local/jboss-3.0.6/server/default/deploy/bs.ear/
> [EjbModule] Creating
> [EjbModule] Deploying HandlerBean
> [EjbModule] Created
> [EjbModule] Starting
> [HandlerBean] Table 'HANDLERBEAN' already exists
> [EjbModule] Started
> [Manager] cloning Manager: [EMAIL PROTECTED]
> [JBossWebApplicationContext] setDistributableSessionManager 
> [EMAIL PROTECTED]
> [jbossweb] Registered 
> jboss.web:Jetty=0,JBossWebApplicationContext=2,context=/bs
> [jbossweb] Started 
> WebApplicationContext[/bs,file:/usr/local/jboss-3.0.6/server/defau
lt/deploy/bs.ear/bs-web.war/]
> [jbossweb] successfully deployed 
> file:/usr/local/jboss-3.0.6/server/default/deploy/bs.ear/bs-web.wa
> r/ to /bs
> [MainDeployer] Deployed package: 
> file:/usr/local/jboss-3.0.6/server/default/deploy/bs.ear/
> 
> 
> So, the bean is finally deploying.
> However the jsp can`t see it:
> 
> ################
> 
> <%
>                 HandlerHome home;
>                 
>                 try
>                 {
>                 
>                 InitialContext initial = new InitialContext();
>                 getServletContext().log("Got context");
>         
>                 home = (HandlerHome) initial.lookup("HandlerBean");
>                getServletContext().log("Got reference");        
>                 } 
>                 catch (NamingException e)
>                 {
>                         getServletContext().log("Naming Exception 
> "+System.currentTimeMillis(),
>                                                                 
> e.fillInStackTrace());
>                 }
> 
> %>
> #################
> 
> 
> I didn`t post the dtds because the logs is pretty obvious. As you can
> see there is no jboss*.xml so the mapping should be straight forward -
> however the seeking doesn`t work.
> 
> Where`s the glitch?
> 
> --
> Thanks,
>  costin                            mailto:[EMAIL PROTECTED]
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies!
> Can't afford IT training? All 2003 ictp students receive scholarships.
> Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
> www.ictp.com/training/sourceforge.asp
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 


-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to