Skip to Content
Former Member
Feb 27, 2006 at 09:42 AM

Problems in accessing Connection Factories in JMS



We are porting A J2ee application from weblogic to SAP Web AS.

Primarily in weblogic we always get a Connection Factory Instance from

the Connection Factory and then typecast it to either

QueueConnectionFactory or TopicConnectionFactory.(Pl. see the code



ConnectionFactory factory = null;

QueueConnectionFactory queueFactory = null;

Hashtable env = new Hashtable();



env.put(Context.PROVIDER_URL, this.providerUrl);

context = new InitialContext(env);

factory = (ConnectionFactory)context.lookup


queueFactory = (QueueConnectionFactory)factory;

this.connection = queueFactory.createQueueConnection();

this.session = this.connection.createQueueSession

(false, Session.AUTO_ACKNOWLEDGE);

this.queue = (Queue)context.lookup(this.queueName);



But in SAP WEB As there is not such facility provided.Is it that always

we need to lookup to the jmsfactory/default/QueueConnectionFactory for

a Queue and jmsfactory/default/TopicConnectionFactory or

jmsfactory/default/QueueConnectionFactory for Topic . Is it poosibel to

get a Connection factory Instance from where on I Could further

Typecast it to TopicConnectionFactory or QueueConnectionFactory

Instance , because this the way we normally do in Weblogic or JMS.

Also this is how the java JMS API accepts . Could you please let me

know as to are there any more configuration to be Done apart from the

JMS provider and JMS Connector in the Visual Admin for Accessing the

Topmost ConnectionFactory JNDI Instance . If no ,are there any other

workarounds , as approach for changing the code for accessing the

individual Connection Factories JNDI is not feasible for us


rajesh kr