ConnectionFactory.createConnection returns null
"Judd Bourgeois" <[email protected]> Fri, 25 May 2007 16:18:40 -0700
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
I have a small application that has run fine in the past using Sun MQ 3.6.
The MQ server is being replaced so I decided to try out OpenJMS as a
potential replacement.
I'm able to connect to OpenJMS and create a ConnectionFactory (CF) but my CF
does not appear to create connections properly. It simply returns null when
I call createConnection() and does not throw any exceptions. Here's a code
snippet:
// set up initial context
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, CTX);
prop.put(Context.PROVIDER_URL, PROV_URL);
Context ictx = new InitialContext(prop);
ConnectionFactory cf = (ConnectionFactory) ictx.lookup(MYQCF_LOOKUP_NAME);
Connection cnx = cf.createConnection("admin", "openjms");
Session sess = cnx.createSession(true, 0); /* Null pointer exception thrown
here */
I'm a little stumped. There's nothing in the OpenJMS log that offers any
clues.
Thanks-
J
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
openjms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openjms-user