Glassfish 3.1 Demo With Admin Console

GlassFish Single Instance with MQ Broker in default Embedded Mode



1. Start the domain


cd $AS_HOME/bin

./asadmin start-domain


2. Create instance instance1


Open Admin Console: http://hostname.us.oracle.com:4848/common/index.jsf

Create new Instance:

Common Task - Standalone Instances - New

Instance Name: instance1

OK






3. Start the instance.


Common Task - Standalonce Instances – instance 1 – check – Click Start






Server Log:

Successfully started the instance: instance1

instance Location: /export/home/glassfish3/glassfish/nodes/localhost-domain1/instance1

Log File: /export/home/glassfish3/glassfish/nodes/localhost-domain1/instance1/logs/server.log

Admin Port: 24850



  1. Create jms resources


    1. Create inboundQueue


Resource – JMS Resources – Destination Resources – New -






Server Log:

JMS Service Connection URL is : mq://localhost:27676/


4.2 Create outboundQueue resource.


Same steps as above. Use name “outboundQueue” in place of “inboundQueue”.


4.3 Create Connector resource.


Resource – JMS Resources – Connection Factories – New -





.

  1. Deploy the simplemdb app.

Applications – Deploy -






6. Start the Receiver


java -DimqBrokerHostPort=27676 Receiver


7. Start the Sender on another terminal.


java -DimqBrokerHostPort=27676 Sender


8 Cleanup:

8.1 Undeploy the app


Applications – simplemdb – undeploy






8.2 Delete the jms resources.



Resources – JMS Resources – Destination Resources – select <name> – Delete - OK





Resources – JMS Resources – Connection Factories – select <name> – Delete - OK





Version 1.0 Last Update: 24-Jan-2011 harshad.vilekar@...