[jboss-user] [JBoss Messaging] - Re: JNDI Proplem for JMS

sknand13 do-not-reply at jboss.com
Wed Apr 8 01:35:30 EDT 2009


we are using JBoss EnterprisePlatform-4.3.0.GA with jdk1.6.

Client side Configuration File have followinf content 
  <event-descriptor eventtype="EVTTEST">  
  |           <destination-type>Queue</destination-type>
  |           <destination-jndi-name>evtTESTEH3Queue</destination-jndi-name>
  |          <initial-context-factory>org.jnp.interfaces.NamingContextFactory</initial-context-factory>			
  | 			<provider-url>jnp://localhost:1099</provider-url>
  | 		 <connection-factory-jndi-name>ivtQCF</connection-factory-jndi-name>		  
  |   </event-descriptor> 

Client side JNDi lookup code are:

  |                     factory = (QueueConnectionFactory)evtconn.getInitialDirContext().lookup( evtconn.getConnectionFactoryJndiName() );
  |                     queueConn = factory.createQueueConnection();
  |                     EventLogger.PRO.info(className+inMethod+" !!! GOT QueueConnection - "+queueConn);
  |                     return queueConn;
  |         }catch( Exception e ) {
  |                 EventLogger.ERR.warn(className+inMethod+EventConstant.JMS_ERROR+":: [Exception] Unable to retrieve the QCF object from JNDI, trying again .. - ",e);
  |             
  |                 try {
  |                 ctxhtable = new Hashtable();
  |                 initContext();
  |                 factory = (QueueConnectionFactory)evtconn.getInitialDirContext().lookup( evtconn.getConnectionFactoryJndiName() );
  |                 queueConn = factory.createQueueConnection();
  |                 EventLogger.PRO.info(className+inMethod+" !!! GOT QueueConnection - "+queueConn);
  |                 return queueConn;
  |             }catch(ClassCastException ccExp)
  |             {
  |                 EventCommitException ecx = new EventCommitException(className+inMethod+EventConstant.EVT_ERROR+":: [EventCommitException] Pls., check the connection factory object in evtConfig.xml and ensure MQ jars are in the CLASSPATH - "+ccExp.getMessage());
  |                 EventLogger.ERR.error(className+inMethod+EventConstant.EVT_ERROR+":: [EventCommitException] Pls., check the connection factory object in evtConfig.xml and ensure MQ jars are in the CLASSPATH - ",ccExp);
  |                 throw ecx;
  |             }catch(Exception exc){
  |                 EventCommitException ecx = new EventCommitException(className+inMethod+EventConstant.JMS_ERROR+":: [Exception] Unable to retrieve the QCF object from JNDI - "+e.getMessage());
  |                 EventLogger.trace(className+inMethod+EventConstant.JMS_ERROR+":: [Exception] Unable to retrieve the QCF object from JNDI - ",EventLogger.ERR,e);
  |                 throw ecx;
  |             }catch(Throwable th){
  |                 EventCommitException ecx = new EventCommitException(className+inMethod+EventConstant.JMS_ERROR+":: [Throwable] Unable to retrieve the QCF object from JNDI - ");
  |                 EventLogger.trace(className+inMethod+EventConstant.JMS_ERROR+":: [Throwable] Unable to retrieve the QCF object from JNDI - ",EventLogger.ERR,th);
  |                 throw ecx;
  |             }


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

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



More information about the jboss-user mailing list