Hey,
I found some examples in sun's JavaEE tutorial but they only work when the sample code deployed as an appclient INSIDE the appserver,
I tried instead of injecting the connectionfactory resource as in the sample:
@Resource(mappedName = "MDBQueueConnectionFactory")
private static ConnectionFactory connectionFactory;
to replace it with a j2se out of the container code as:
InitialContext ie = new InitialContext();
ConnectionFactory connectionFactory = ie.lookup("MDBQueueConnectionFactory");
Then got the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/admin/monitor/registry/MonitoringLevelListener
I found out that gf\lib\appserv-admin.jar contains the missing class but when re-executing I get the following exception:
....
.enterprise.naming.SerialContext.lookup(SerialContext.java:309)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:79)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:314)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at edentity.tmp.jms.JmsClient.main(JmsClient.java:49)
Caused by: java.io.IOException: Mismatched serialization UIDs : Source (Rep. IDRMI:com.sun.enterprise.deployment.util.ModuleDescriptor:C75D6E6299976F67:835F48D75980500F) = 835F48D75980500F whereas Target (Rep. ID RMI:com.sun.enterprise.deployment.util.ModuleDescriptor:1ABBCF4A514CC62E:34DA069DE5553193) = 34DA069DE5553193
at com.sun.corba.ee.impl.util.RepositoryId.useFullValueDescription(RepositoryId.java:573)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.useFullValueDescription(ValueHandlerImpl.java:386)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:395)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
....
Did I include a wrong jar? or am I trying to do something ilegal?
Thanks,
Demiant
[Message sent by forum member 'demiant' (demiant)]
http://forums.java.net/jive/thread.jspa?messageID=221390