[jboss-user] [Clustering/JBoss] - Very strange problem while looking up HAJMS Topic

chtimi2 do-not-reply at jboss.com
Mon Jan 26 08:19:38 EST 2009


JBoss 4.2.3, deploying the topic as a HASingleton. 
An SLSB deployed on all nodes uses the Topic.

Let's say that JMS topics run on node A, and i'm calling the EJB method on node B (everything works fine when calling it on node A).

Since injection fails (in a surprising way too: getting a NamingContext instead of a Topic...), I have tried looking up the Topic at two different timings:
1/ Manual lookup in @PostConstruct
2/ Very same manual lookup before method invocation (for instance with an Interceptor)

Result:
1: fails (NameNotFound)
2: works (except i have a Throwable.STACKTRACE message about closing my connections myself)
What the hell, how is it possible?

My lookup:

  | private void initTopics() throws NamingException 
  | 	{
  | 		log.info ( "____________initTopics/START______________" );
  | 		InitialContext ctx = ddgetfInitialContext ();		
  | 		
  | 		Object ref = ctx.lookup ( "topic/DepuisEmbarqueTopic" );
  | 		log.info ( "	ref 1: " + depuisEmbarqueTopic );
  | 		depuisEmbarqueTopic = (Topic) PortableRemoteObject.narrow( ref, Topic.class );
  | 		log.info ( "	depuisEmbarqueTopic: " + depuisEmbarqueTopic );
  | }
  | 
  | private InitialContext ddgetfInitialContext () throws NamingException
  | 	{
  | 		Properties p = new Properties();
  | 		p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");				p.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
  | 		p.put(Context.PROVIDER_URL, "[hidden ip1]:1100,[hidden ip2]:1100"); 
  | 		p.put("jnp.partitionName", "PartitionNavineo");
  | 		p.put("jnp.discoveryGroup", "230.0.0.4");
  | 		p.put("jnp.discoveryPort", "1102");
  | 		p.put("jnp.discoveryTTL", "16");
  | 		return new InitialContext(p);
  | 	}
  | 

Something I haven't mentioned yet, since I was afraid to drown you in information (might be important or not):
This only happens if JMS has moved back and forth between the 2 nodes. The sequence of successive topologies (where 1 and 2 are the nodes, and i bold the JMS MasterNode), which i note in roman numbers:
I: { 1 }
II: { 1 , 2 }
III: { 2 }
IV: { 1 , 2}
The problem manifests itself at IV.


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

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



More information about the jboss-user mailing list