If I create an Admin Object Resource using a command line call of asadmin,
then my Java application can successfully find it (by lookup).
If I create it using the administrator with the same properties , the lookup
fails.
is there a known problem with the administrator ?
The call of asadmin I use is as follows:
call asadmin create-admin-object --echo=true --interactive=false --restype
javax.jms.Queue --raname HostTalkJMS --property
QueueSpaceName=QSLARGE:QueueName=ACNTSUMM SIMPLES
'HostTalkJMS' is the name of my resource adapter.
The Java code to find this object is as follows : Note that it successfully
looks up a deployed connection factory.
factoryName = "eis/TPMQ/BANK";
queueName = "SIMPLES";
try
{
initialContext = new InitialContext() ;
myEnv = (Context)initialContext.lookup("");
logName = factoryName;
qCXFactory =
(QueueConnectionFactory)myEnv.lookup(factoryName);
log(className,"connect", "class of Connection Factory
is " + qCXFactory.getClass().toString());
logName = queueName;
mQueue = (Queue)myEnv.lookup(queueName);
log(className,"connect","Queue object returned for
coded name " + queueName + " is " + mQueue.toString());
log(className,"connect", "class of queue is " +
mQueue.getClass().toString());
}
catch (NamingException e)
{
mess = "Unable to lookup name - " + logName + CRLF+
e.toString();
log(className,method,mess);
throw new Exception(mess);
}
[#|2012-02-20T16:20:18.680+0000|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=208;_ThreadName=Thread-1;|JMSSessionBean
. connect . Unable to lookup name - SIMPLESnulljavax.naming.NamingException:
Lookup failed for 'SIMPLES' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is
javax.naming.NameNotFoundException: SIMPLES not found]|#]
--
[Message sent by forum member 'RobertAshworth']
View Post: http://forums.java.net/node/883679