3 Replies Latest reply on Oct 1, 2008 2:10 AM by Ron Sigal

    Setting codebase in jboss ejb3 application has no efffect

    Emil Salageanu Newbie

      This is related to the topic http://www.jboss.com/index.html?module=bb&op=viewtopic&t=140498&start=0
      I have posted some time ago with no success.

      I'll be short:
      My bean application A (which runs inside jboss jvm) generates (with javaassist) a class C and perform an rmi call on a remote object RO passing in argument an object of type C (the generated class). My generated class is available on a http class server created by my application. So In my bean application A I add to the
      java.rmi.server.codebase property the address of my class server. so two entries are in the codebase: the jboss class server and my class server.
      The problem is that when the RO (remote object) receives the call, it will only try to download the class in the jbosses class server (on 8083 port) because it doesn't receive my codebase. So it will not find the class there because it is only availbe on my class server.

      So does jboss takes in account the property java.rmi.server.codebase when marshaling objects? does it override the marshaller?

      So, in short: whatever my bean writes in the java.rmi.server.codebase property (I also tried to leave it empty), the remote object will receive the codebase of jboss class server.
      The question is: can I change this behavior.

      Thanks in advance, It would really help me, It's been 2 months since I have this problem.

        • 1. Re: Setting codebase in jboss ejb3 application has no efffec
          Ron Sigal Master

          Hi Emil,

          Your question isn't related to Remoting, so I'm going to suggest you try the "Installation, Configuration & DEPLOYMENT" forum at http://www.jboss.com/index.html?module=bb&op=viewforum&f=61.

          For what it's worth, I can point you to the $JBOSS/server/$CONFIG/conf/jboss-service.xml file, where you'll find the MBean configurations

           <!-- ==================================================================== -->
           <!-- Class Loading -->
           <!-- ==================================================================== -->
           <!-- A mini webserver used for dynamic and class and resource loading -->
           <mbean code="org.jboss.web.WebService"
           <!-- The Bind address and Port -->
           <attribute name="BindAddress">${jboss.bind.address}</attribute>
           <attribute name="Port">8083</attribute>
           <!-- The address to use for the host portion of the RMI codebase URL -->
           <attribute name="Host">${java.rmi.server.hostname}</attribute>
           <!-- Should non-EJB .class files be downloadable -->
           <attribute name="DownloadServerClasses">true</attribute>
           <!-- Should resources other than .class files be downloadable. Both
           DownloadServerClasses and DownloadResources must be true for resources
           to be downloadable. This is false by default because its generally a
           bad idea as server configuration files that container security
           information can be accessed.
           <attribute name="DownloadResources">false</attribute>
           <!-- Use the default thread pool for dynamic class loading -->
           <depends optional-attribute-name="ThreadPool"
           <!-- ==================================================================== -->
           <!-- JBoss RMI Classloader - only install when available -->
           <!-- ==================================================================== -->
           <mbean code="org.jboss.util.property.jmx.SystemPropertyClassValue"
           <attribute name="Property">java.rmi.server.RMIClassLoaderSpi</attribute>
           <attribute name="ClassName">org.jboss.system.JBossRMIClassLoader</attribute>

          Good luck, and if you solve your problem, it would be great if you could come back and post the solution.


          • 2. Re: Setting codebase in jboss ejb3 application has no efffec
            Emil Salageanu Newbie

            Thank you Ron, I have posted this message on the
            "Installation, Configuration & DEPLOYMENT" forum, at

            I'll come back with the solution when I'll find it.


            • 3. Re: Setting codebase in jboss ejb3 application has no efffec
              Ron Sigal Master

              Thank you, Emil. I'm looking forward to it.