Thanks for the help.

I was already specifying the providerUrl="localhost:1100" to connect to HAJNDI 
but didn't know about changing the 'CallByValue' to 'true' to stop JNDI always 
connecting to the local JVM object.

I followed the instructions in the javadoc and changed the naming service 
attribute 'CallByValue' to true.
But this did not fix the problem.

I've included some of my configuration files in the hope that any errors will 
be spotted.

jboss-service.xml

  | <mbean code="org.jboss.naming.NamingService"
  |        name="jboss:service=Naming"
  |        xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
  |       
  |   <!-- The call by value mode. true if all lookups are unmarshalled using
  |     the caller's TCL, false if in VM lookups return the value by reference.
  |     -->
  |   <attribute name="CallByValue">true</attribute>
  |   ...
  | </mbean>
  | 

jboss.xml

  | <jboss>
  | 
  |   <enterprise-beans>
  |     <session>
  |       <ejb-name>MessagingManager</ejb-name>
  |       <jndi-name>ejb/hp/notification/MessagingManager</jndi-name>
  |       
<local-jndi-name>ejb/hp/notification/MessagingManagerLocal</local-jndi-name>
  |       <clustered>true</clustered>
  |       <cluster-config>
  |         <partition-name>HPNEPartition</partition-name>
  |         
<home-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</home-load-balance-policy>
  |         
<bean-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</bean-load-balance-policy>
  |       </cluster-config>
  | 
  |     </session>
  |   </enterprise-beans>
  | 
  |   <resource-managers>
  |   </resource-managers>
  | </jboss>
  | 

ejb-jar.xml

  | <ejb-jar >
  |   <enterprise-beans>
  |     <session >
  |       <ejb-name>MessagingManager</ejb-name>
  |       
<home>com.mycomp.notification.ejb.core.interfaces.MessagingManagerHome</home>
  |       
<remote>com.mycomp.notification.ejb.core.interfaces.MessagingManager</remote>
  |       
<local-home>com.mycomp.notification.ejb.core.interfaces.MessagingManagerLocalHome</local-home>
  |       
<local>com.mycomp.notification.ejb.core.interfaces.MessagingManagerLocal</local>
  |       
<ejb-class>com.mycomp.notification.ejb.core.MessagingManagerSession</ejb-class>
  |       <session-type>Stateless</session-type>
  |       <transaction-type>Container</transaction-type>
  |     </session>
  |   </enterprise-beans>
  |   
  |   <assembly-descriptor >
  |     <method-permission >
  |       <unchecked/>
  |       <method>
  |         <ejb-name>MessagingManager</ejb-name>
  |         <method-name>*</method-name>
  |       </method>
  |     </method-permission>
  | 
  |     <container-transaction >
  |       <method >
  |         <ejb-name>MessagingManager</ejb-name>
  |           <method-name>*</method-name>
  |       </method>
  |       <trans-attribute>Required</trans-attribute>
  |     </container-transaction>
  | 
  |   </assembly-descriptor>
  | </ejb-jar>
  | 

my code in mdb to access SLSB

  | Properties prop = new Properties();
  | prop.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  | prop.put(Context.PROVIDER_URL, "localhost:1100");
  | Context context = new InitialContext(prop);
  | MessagingManagerHome messagingManagerHome = (MessagingManagerHome) 
context.lookup("ejb/hp/notification/MessagingManager");
  | MessagingManager messagingManager = messagingManagerHome.create();
  | 
    


Can anyone see anything wrong with my configuration?

Regards

Matt

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872179#3872179

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872179


-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to