2 Replies Latest reply on Aug 31, 2009 7:19 PM by chris.simons

    JNDI for Session beans in Weblogic 10.3

    joff

      Has anyone got Stateful Session Beans working with Seam and WebLogic 10.3?


      I've been following the instructions in the docs (http://docs.jboss.com/seam/2.1.1.GA/reference/en-US/html/weblogic.html), and my application is now deploying fine.. however whenever I try and access by SFSB, it crashes because it can't look it up via JNDI.


      Do I need to specify @JndiName on each one? Or will the names get generated? If so, what is the pattern I need to use in components.properties?


      I can't see any JNDI names in the JNDI tree viewer for WebLogic, so I'm thinking the name isn't being registered...


      I've tried @JndiName, adding an <ejb-local-ref> entry in web.xml... running out of ideas... I'd like to avoid having to specify the JNDI settings in the old-style XML files... :(


      Can anyone please help!?


      Thanks

        • 1. Re: JNDI for Session beans in Weblogic 10.3
          joff

          Ok, finally cracked it... so for future reference:


          in web.xml


          <ejb-local-ref>
              <ejb-ref-name>bookit/ejb/InterviewControllerBean/local</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <local>bookit.controller.InterviewController</local>
          </ejb-local-ref>



          components.properties


          jndiPattern=java:comp/env/bookit/ejb/#{ejbName}/local



          where the bean is


          @Stateful
          @Name( "interviewController" )
          public class InterviewControllerBean implements InterviewController



          @Local
          public interface InterviewController


          • 2. Re: JNDI for Session beans in Weblogic 10.3

            Thanks for posting this follow-up.