Skip to main content

Glassfish jms support with Embedded

5 replies [Last post]
tvaana
Offline
Joined: 2012-10-05

Hi!

I am trying to use jms with Glassfish 3.1.1 (build 12) With startup I see:

INFO: JMS010: ADDRESSLIST in setJmsServiceProvider: mq://localhost:7676/
INFO: JMS08: JMS Service Connection URL is : mq://localhost:7676/
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter: Version:  4.5.1  (Build 3-b) Compile:  Tue Jun 21 16:31:32 PDT 2011
INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection mode is Direct
INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:EMBEDDED

Is there known issues with Embedded? Thats because it hangs up my java process. Have to manually kill the process. Also have this in web.xml

<context-param>
    <param-name>org.richfaces.push.jms.enabled</param-name>
    <param-value>true</param-value>
  </context-param>

Transaction support doesn't have a value

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nigeldeakin
Offline
Joined: 2007-10-12

The startup messages show that the embedded JMS server is starting correctly. Nothing wrong there.

org.richfaces.push.jms.enabled is not a GlassFish or MQ property. I presume it configures your application somehow.

Nigel

nigeldeakin
Offline
Joined: 2007-10-12

Correction: the startup messages show that the embedded JMS server is starting. They don't show that the startup has succeeded. Is this the point at which things seem to hang? How long did you wait for?

What does the MQ broker log say? This is in the mq directory under your GlassFish instance.

Nigel

tvaana
Offline
Joined: 2012-10-05

Thank you Nigel for fast reply. Here is my log when using embedded

Open Message Queue 4.5.1
Oracle
Version:  4.5.1  (Build 3-b)
Compile:  Tue Jun 21 16:31:32 PDT 2011

Copyright (c) 2011, Oracle and/or its affiliates.  All rights reserved.
================================================================================
Java Runtime: 1.6.0_32 Sun Microsystems Inc. C:\Program Files\Java\jdk1.6.0_32\jre
[06/marras/2012:13:51:57 EET]    IMQ_HOME=C:\glassfish3\mq
[06/marras/2012:13:51:57 EET] IMQ_VARHOME=C:\glassfish3\glassfish\domains\domain1\imq
[06/marras/2012:13:51:57 EET] Windows 7 6.1 amd64 Timo-lenovo.MUUMILAND.LOCAL (4 cpu) timo
[06/marras/2012:13:51:57 EET] Java Heap Size: max=466048k, current=392256k
[06/marras/2012:13:51:57 EET] Arguments: -port 7676 -name imqbroker -nobind -imqhome C:\glassfish3\mq -varhome C:\glassfish3\glassfish\domains\domain1\imq -libhome C:\glassfish3\mq\lib -useRmiRegistry -rmiRegistryPort 8686 -save -silent
[06/marras/2012:13:51:57 EET] JMSRA BrokerProps: imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.service.activate=jmsdirect, imq.imqcmd.password=*****, imq.jmsra.managed=true, imq.cluster.nowaitForMasterBroker=true
[06/marras/2012:13:51:57 EET] Broker Properties: imq.service.activate=jmsdirect, imq.cluster.nowaitForMasterBroker=true, imq.jmx.rmiregistry.use=true, imq.portmapper.port=7676, imq.jmsra.managed=true, imq.instancename=imqbroker, imq.log.console.output=NONE, imq.imqcmd.password=*****, imq.jmx.rmiregistry.port=8686, imq.service.runtimeAdd=mqdirect2, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.portmapper.bind=false
[06/marras/2012:13:51:57 EET] Embedded Broker
[06/marras/2012:13:51:57 EET] [B1060]: Loading persistent data...
[06/marras/2012:13:51:57 EET] Using built-in file-based persistent store: C:\glassfish3\glassfish\domains\domain1\imq\instances\imqbroker\
[06/marras/2012:13:51:57 EET] [B1041]: Cluster initialization successful.
[06/marras/2012:13:51:57 EET] new transaction log enabled
[06/marras/2012:13:51:57 EET] sync writes to disk = false
[06/marras/2012:13:51:57 EET] logNonTransactedMsgSend = false
[06/marras/2012:13:51:57 EET] logNonTransactedMsgAck = false
[06/marras/2012:13:51:57 EET] [B1392]: Opening transaction log with file mode rw, maximum size 10 485 760 bytes
[06/marras/2012:13:51:57 EET] [B1270]: Processing messages from transaction log file...
[06/marras/2012:13:51:57 EET] [B1013]: Auto Creation of Queues is enabled
[06/marras/2012:13:51:57 EET] [B1151]: Loading destination mq.sys.dmq [Queue] with 14 messages
[06/marras/2012:13:51:57 EET] [B1152]: Loading of destination mq.sys.dmq [Queue] complete
[06/marras/2012:13:51:57 EET] [B1136]: Processing stored transactions
[06/marras/2012:13:51:57 EET] [B1390]: Loading of transactions has been successfully completed 
[06/marras/2012:13:51:57 EET] [B1239]: Using platform MBean server
[06/marras/2012:13:51:57 EET] JESMF classes not present - JESMF support will not be enabled.
[06/marras/2012:13:51:58 EET] JMX Connector Server jmxrmi started successfully with url service:jmx:rmi://Timo-lenovo/jndi/rmi://Timo-lenovo.MUUMILAND.LOCAL:8686/Timo-lenovo.MUUMILAND.LOCAL/7676/jmxrmi
[06/marras/2012:13:51:58 EET] [B1004]: Starting the admin service using tcp(host = *, port=0, mode=dedicated) with min threads 4 and max threads of 10
[06/marras/2012:13:51:58 EET] [B1227]: Using file user repository for admin service connection authentication
[06/marras/2012:13:51:58 EET] [B1004]: Starting the jms service using tcp(host = *, port=0, mode=dedicated) with min threads 10 and max threads of 1000
[06/marras/2012:13:51:58 EET] [B1227]: Using file user repository for jms service connection authentication
[06/marras/2012:13:51:58 EET] [B1004]: Starting the mqdirect2 service using in-process connections with min threads 0 and max threads of 0
[06/marras/2012:13:51:58 EET] [B1227]: Using file user repository for mqdirect2 service connection authentication
[06/marras/2012:13:51:58 EET] [B1004]: Starting the jmsdirect service using  with min threads 0 and max threads of 0
[06/marras/2012:13:51:58 EET] [B1227]: Using file user repository for jmsdirect service connection authentication
[06/marras/2012:13:51:58 EET] [B1004]: Starting the cluster service using tcp [ 0.0.0.0/0.0.0.0:54502 ] with min threads 1 and max threads of 1
[06/marras/2012:13:51:58 EET] [B1228]: Cluster ping interval is 60 seconds
[06/marras/2012:13:51:58 EET] [B1039]: Broker "imqbroker@Timo-lenovo.MUUMILAND.LOCAL:7676" ready.
[06/marras/2012:13:51:58 EET] [B1065]: Accepting: :0->jmsdirect:0. Count: service=1 broker=1
[06/marras/2012:13:51:58 EET] [B1065]: Accepting: :0->jmsdirect:0. Count: service=2 broker=2
[06/marras/2012:13:51:58 EET] [B1065]: Accepting: :0->jmsdirect:0. Count: service=3 broker=3
[06/marras/2012:13:51:58 EET] [B1065]: Accepting: :0->jmsdirect:0. Count: service=4 broker=4
[06/marras/2012:13:51:58 EET] [B1065]: Accepting: :0->jmsdirect:0. Count: service=5 broker=5
[06/marras/2012:13:51:58 EET] [B1065]: Accepting: :0->jmsdirect:0. Count: service=6 broker=6
[06/marras/2012:13:51:58 EET] [B1065]: Accepting: :0->jmsdirect:0. Count: service=7 broker=7
[06/marras/2012:13:51:58 EET] [B1065]: Accepting: :0->jmsdirect:0. Count: service=8 broker=8
[06/marras/2012:13:51:58 EET] [B1132]: Auto-creating destination Klubi [Topic]
[06/marras/2012:13:52:00 EET] [B1132]: Auto-creating destination Klubi2 [Topic]
nigeldeakin
Offline
Joined: 2007-10-12

The broker log looks OK - it shows that the broker started successfully (the message "Broker "imqbroker@Timo-lenovo.MUUMILAND.LOCAL:7676" ready." shows this) and started accepting connections from GlassFish applications. So I'm a bit surprised that the server log didn't show that the resource adapter had successfully started.

Can you repeat the startup and record a thread dump (stack dump) when it gets to the "hanging" state?

Nigel

tvaana
Offline
Joined: 2012-10-05

My app works ok, I can publish messages into Topics and consume them.

I am using richfaces 4.2.0 a4j push component with jms. Perhaps I take this question and post it
their forum. We'll see. Thanks for your time so far. I let you know how it goes.