marc fleury wrote:
> 
> 
> yes turn off all the services that are duplicate on the second.  The RMI you
> can safely turn off.  post as you go, we will get you going... the price you
> pay is you get to put a "howto" on how to do it

Thanks, Mark.

Ok, after a small push in the right direction I got
it working (almost)

1. My setup:

- client (standalone tomcat 3.2 final, under Sun JDK1.3-0 on Solaris
5.6/Ultra60)
- primary server (jBoss, cvs from 01/15/01, under Compaq JDK1.3-1 on
Tru64)
- secondary server (jBoss, cvs from 01/15/01, under Sun JDK 1.3-C on
NT/4)

2. What I did:

2.1 Modified all jndi.properties to point to the "primary" server
    and used real DNS name for provider.url. 

2.2 Disabled JMXAdaptorService in jboss.jcml on the
    secondary server (it was only one that gave up
    to start)

2.3 Deployed test-beans on each server and run jndiView
    to check InitialContext.

    Result for primary server:

InitialContext
  +- SoftwareComponentDescriptor (CMP bean on primary server)
  +- TopicConnectionFactory
  +- XAQueueConnectionFactory
  +- jmx
  +- UILXAQueueConnectionFactory
  +- RMIXAQueueConnectionFactory
  +- RMIQueueConnectionFactory
  +- jmx:andretti.ptc.com:rmi   (primary server)
  +- XATopicConnectionFactory
  +- UILXATopicConnectionFactory
  +- RMIXATopicConnectionFactory
  +- RMITopicConnectionFactory
  +- SubComponent               (CMP bean on primary server)
  +- jmx:potomac:rmi            (2nd server)            
  +- invokers
  |   +- SubComponent
  |   +- CrossSection
  |   +- SoftwareComponentDescriptor
  +- CrossSection               (stateless session bean on 2nd server)
  +- queue
  |   +- A
  |   +- testQueue
  |   +- controlQueue
  |   +- ex
  |   +- E
  |   +- D
  |   +- C
  |   +- B
  +- topic
  |   +- testDurableTopic
  |   +- example
  |   +- testTopic
  |   +- metrics
  |   +- bob
  |   +- beancache
  +- UILQueueConnectionFactory
  +- QueueConnectionFactory
  +- UILTopicConnectionFactory

for some reason, jndiView gave me nothing except 
> InitialContext
on the secondary server.

Questions: Do I need to turn off something else on
           the 2nd server? 


3. I ran my test applet (connects to tomcat and sends a request
   to a Servlet to perform some operations on deployed beans). 
   Tomcat didn't have remote and home interfaces for the
   session bean (from 2nd server) in the class path.
   That has been working perfectly with a single server.
   I invoked "create" method trough reflection. Remote
   interface is  inherited from "generic business
   interface" which was present in Tomcat classpath.

Question: It it legal? I remember the Rickard's post about
          dynamic loading bean interfaces through JNDI.

   However, the Servlet on standalone Tomcat refused to lookup 
   a bean from the second server without HOME interface with the 
   following exception.

Root cause: javax.naming.CommunicationException.  Root exception is
java.lang.ClassNotFoundException: com.ptc.xsection.ejb.CrossSectionHome
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:309)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:325)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:195)
        at
sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:183)
        at
java.io.ObjectInputStream.inputProxyClassDescriptor(ObjectInputStream.java:982)
        at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
        at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
        at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
        at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
        at java.rmi.MarshalledObject.get(MarshalledObject.java:138)
        at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:299)
        at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
        at javax.naming.InitialContext.lookup(InitialContext.java:350)
        at
com.ptc.bmx.server.BmxServer.lookupComponent(BmxServer.java:59)
        at
com.ptc.bmx.server.BmxServer.computeSubComponent(BmxServer.java:89)
        at
com.ptc.bmx.web.ComponentServlet.service(ComponentServlet.java:73)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

Only when I added interfaces (for the bean form the 2nd server only)
to classpath (actually into WEB-INF/lib) everything began
working. It is not a good solution for me, because I need to
deploy beans on the 2nd server on the fly.

Question: May something on the 2nd server prevent
          dynamic interface downloading?

Thanks.

P.S. It's not the "HOW-TO" yet, of course. I want
     to test more thing before.


-- 
__________________________________________________
Alexander Kogan  PTC   www.ptc.com
[EMAIL PROTECTED]    140 Kendrick St. Needham MA 02494


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to