Hello,
I have tried every suggestion on the Wiki and read hundreds of posts and I'm
finally tring to post and see if some one can help.
My situation is that I'm using JBoss 3.2.6 and I have SLSB#1 in acluster trying
to connect to SLSB#2 in a different cluster. I can do it find using the
regular JNDI, but as soon as I try to use the HA-JNDI it fails to do the lookup
with a NameNotFoundException. I can get this to work from outside of JBoss,
but within JBoss it seems as if it always connects to the host HA naming server.
jboss.xml for SLSB#2:
<session>
| <ejb-name>DVICSessionFacade</ejb-name>
|
<jndi-name>com.wdpro.commerce.common.shared.client.sessionfacade.DVICSessionFacadeHome</jndi-name>
| <configuration-name>Clustered Stateless
SessionBean</configuration-name>
|
| <clustered>true</clustered>
|
| <method-attributes>
| </method-attributes>
| </session>
binding.xml for SLSB#2:
| <service-config name="jboss:service=Naming"
| delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
| >
| <delegate-config portName="Port" hostName="BindAddress">
| <attribute name="RmiPort">18098</attribute>
| </delegate-config>
| <binding port="18099" host="${jboss.bind.address}"/>
| </service-config>
|
| <service-config name="jboss:service=HAJNDI"
| delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
| >
| <delegate-config portName="Port">
| <attribute name="RmiPort">18101</attribute>
| </delegate-config>
| <binding port="18100"/>
| </service-config>
jboss-service.xml for SLSB#1:
<!-- Bind a remote JNDI server -->
| <mbean code="org.jboss.naming.ExternalContext"
name="jboss.jndi:service=ExternalContext,jndiName=external/RemoteJBoss">
| <attribute
name="JndiName">java:external/RemoteJBoss</attribute>
| <attribute name="CacheContext">true</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=jnp://localhost:18100
| <attribute
name="InitialContext">javax.naming.InitialContext</attribute>
| </attribute>
| <attribute name="RemoteAccess">true</attribute>
| </mbean>
Code snipit for SLSB#1:
| Context context = new InitialContext();
|
| DVICSessionFacadeHome sessionFacadeHome = (DVICSessionFacadeHome)
|
|
context.lookup("java:external/RemoteJBoss/com.wdpro.commerce.common.shared.client.sessionfacade.DVICSessionFacadeHome");
|
|
| DVICSessionFacade sessionFacade = sessionFacadeHome.create();
StackTrace on context.lookup():
javax.naming.NameNotFoundException:
com.wdpro.commerce.common.shared.client.sessionfacade.DVICSessionFacadeHome
| at org.jboss.ha.jndi.TreeHead.lookup(TreeHead.java:219)
| at org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:131)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at
org.jboss.ha.framework.server.HARMIServerImpl.invoke(HARMIServerImpl.java:221)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
| at sun.rmi.transport.Transport$1.run(Transport.java:148)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
| at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
| at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
| at java.lang.Thread.run(Thread.java:534)
| at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
| at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
| at org.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown
Source)
| at
org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:127)
| at
org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:196)
| at $Proxy418.lookup(Unknown Source)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:530)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at
org.jboss.naming.ExternalContext$CachedContext.invoke(ExternalContext.java:528)
| at $Proxy403.lookup(Unknown Source)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:596)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
| at javax.naming.InitialContext.lookup(InitialContext.java:347)
| at
com.wdpro.commerce.dcl.be.dls.DCLInstantCreditService.<init>(DCLInstantCreditService.java:73)
JMX console JNDI view:
java: Namespace
|
|
| +- external (class: org.jnp.interfaces.NamingContext)
| | +- RemoteJBoss (class: javax.naming.Context).
|
JMX console JNDI view if I switch my ExternalContext MBean to port 18099 (non
HA):
java: Namespace
|
| +- SecurityProxyFactory (class:
org.jboss.security.SubjectSecurityProxyFactory)
| +- comp (class: javax.naming.Context)
| +- external (class: org.jnp.interfaces.NamingContext)
| | +- RemoteJBoss (class: javax.naming.Context)
| | | +- com.wdpro.commerce.common.shared.dae.db.DVICGuestInfoLocalHome
(proxy: $Proxy51 implements No ClassLoaders found for:
com.wdpro.commerce.common.shared.dae.db.DVICGuestInfoLocalHome (no security
manager: RMI class loader disabled))
| | | +-
com.wdpro.commerce.common.shared.client.sessionfacade.CreditResponseSessionFacadeHome
(proxy: $Proxy56 implements No ClassLoaders found for:
com.wdpro.commerce.common.shared.client.sessionfacade.CreditResponseSessionFacadeHome
(no security manager: RMI class loader disabled))
| | | +- HAPartition (class: org.jnp.interfaces.NamingContext)
| | | | +- DefaultPartition2 (class:
org.jboss.ha.framework.server.HAPartitionImpl)
| | | +- HASessionState (class: org.jnp.interfaces.NamingContext)
| | | | +- Default (class:
org.jboss.ha.hasessionstate.server.HASessionStateImpl)
| | | +- jmx (class: org.jnp.interfaces.NamingContext)
| | | | +- invoker (class: org.jnp.interfaces.NamingContext)
| | | | | +- RMIAdaptor (proxy: $Proxy25 implements interface
org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface
org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | | | +- rmi (class: org.jnp.interfaces.NamingContext)
| | | | | +- RMIAdaptor[link -> j
Any thoughts as to how I can get this work with HA-JNDI, becuase that will be a
lot more reliable.
-Thanks
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3931970#3931970
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3931970
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user