0 Replies Latest reply on Jun 18, 2007 9:27 AM by murthy cvrs

    SLSB in Mbean

    murthy cvrs Newbie

      Hi All,

      I'm using MBeans to call a Stateless SessionBean in my application.
      Below is how I declared the MBean in the JBoss-service.xml file.
      I'm using Jboss-4.0.2, JDK 1.5.
      ----------- JBoss-service.xml ------------------------

      <mbean code="com.myapp.services.PlatformManagerJMXService" name="com.myapp.services:name=PlatformManagerJMXService">
      <depends>jboss.j2ee:module=my-ejb.jar,service=EjbModule</depends>
       </mbean>
      

      ------------------------------------------------------------

      Problem:
      The jboss-service.xml file gets loaded, when Jboss starts..., it throws the below Exception and this is due to looking-up the SLSBean in the JNDI before it actually loads.
      -----------------------error--------------------------------
      Caused by: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.Socket
      TimeoutException: Receive timed out]

      -----------------------------------------------------------------

      I tried with the below code also in the Jboss-service.xml file and still getting the same "Timed out" exception. I expected this should actually load the MBean after the Naming service is started.

      Anything wrong in the below?

      ------------ JBoss-service.xml ------------------------
      <mbean code="com.myapp.services.PlatformManagerJMXService" name="com.myapp.services:name=PlatformManagerJMXService">
      <attribute name="JndiName">ejb/MyPlatformManager</attribute>
       <depends>jboss:service=Naming</depends>
      </mbean>

      ------------ JBoss-service.xml ------------------------


      I request you to please help me resolve this problem

      Thanks and Regards