Source:9.2. Creating a Java SE Client that Sends Messages to a JMS Queue
OCP JavaEE 6 EJB Developer Study Notes by Ivan A Krizsan Version: April 8, 2012
C:\glassfish3\glassfish\lib\gf-client.jar
OCPJP 6.0 93%
OCPJWCD 5.0 98%
OCPJP 6.0 93%
OCPJWCD 5.0 98%
OCPJP 6.0 93%
OCPJWCD 5.0 98%
"jms/QueueConnectionFactory" and "jms/QueueDestination" are already defined in Glass-Fish Server.
OCPJP 6.0 93%
OCPJWCD 5.0 98%
SCJP 5.0 94%
OCE-EJBD 90%
Write A session bean and look up the connectionFactory from session bean (basically whatever you are doing in your Java SE Client)
deploy the session bean
Invoke the session bean from standalone client
OCPJP 6.0 93%
OCPJWCD 5.0 98%
25-feb-2013 20:21:54 com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by default.
*** Starting JMS Resource Lookup...
25-feb-2013 20:21:58 org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator 4.3.0.Final
25-feb-2013 20:21:58 com.sun.messaging.jms.ra.ResourceAdapter start
INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter: Version: 4.5.2 Patch 1 (Build 3-d) Compile: Thu Jun 7 10:46:15 PDT 2012
25-feb-2013 20:21:58 com.sun.messaging.jms.ra.ResourceAdapter start
INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is REMOTE, connection mode is TCP
25-feb-2013 20:21:58 com.sun.messaging.jms.ra.ResourceAdapter start
INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:REMOTE
JMS Resource Loopup Finished.
### Sent message: 1
### Sent message: 2
### Sent message: 3
### Sent message: 4
### Sent message: 5
### Sent message: 6
### Sent message: 7
### Sent message: 8
### Sent message: 9
### Sent message: 10
*** Java SE JMS Client finished.
OCPJP 6.0 93%
OCPJWCD 5.0 98%
in this example is the client a standalone java client or an application client ? because if it is a standalone client i couldnt see any jndi properties
Mohit G Gupta wrote:"jms/QueueConnectionFactory" and "jms/QueueDestination" are already defined in Glass-Fish Server.
Attached screenshots.
Create symphonies in seed and soil. For this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|