users@glassfish.java.net

[gf-users] Re: Glassfish 4.0 b89 Durable Subscriptions

From: MUNDT, CHRISTOPHER J CTR USAF AFWA AFWA/SEMS RM 3250-25 <christopher.mundt.ctr_at_us.af.mil>
Date: Tue, 6 Jan 2015 17:11:57 +0000

Mr. Zhao,

A couple months ago you gave us some suggestions to work with GF4.0 and a Durable Topic subscription. At the time we had some issues implementing your suggestions because our code was using Spring.

Our developers have since created just a simple MDB app that will receive messages from a topic and output contents to the server.log.

After several hours of testing and troubleshooting, we have not been able to get this MDB to successfully establish a Durable Shared Subscription to the topic under GF 3.1.2.2, GF 4.0 build 8.9 or GF 4.1 Build 13.

If we deploy the app to just a single GF instance the app will connect successfully, establish a subscription, and receive messages from the topic. However when we try to start up a second instance of GF as part of the cluster, we receive errors in both the GF Logs and the OpenMQ logs stating that the ClientID is already in use. At times I have also seen messages about a non-shared subscription being made but I don't have that the moment.

Previously our original code worked successfully under GF 2.1.1 but have not been able to make it work on anything newer. Our developers are out of ideas and we are wondering if anyone has any actually been able to establish and consume messages using a Durable Shared Subscription with multiple Glassfish instances in a cluster??

If so could you point us at an example so we can try to figure what we have misconfigured?

Thanks for your assistance.

Chris


//SIGNED//
 
Christopher J. Mundt, Contractor, HQ AFWA/SEMSII SEMS / NORTHROP GRUMMAN Web/App Server Administrator / Software Engineer
(402) 232-7823
DSN 272-7823
christopher.mundt.ctr_at_us.af.mil
 
J2EE AppAdmin Support Info:
J2EE.Admin_at_us.af.mil
Cell Phone: 402-680-2179


-----Original Message-----
From: David Zhao [mailto:liang.x.zhao_at_oracle.com]
Sent: Wednesday, November 19, 2014 8:07 PM
To: MUNDT, CHRISTOPHER J CTR USAF AFWA AFWA/SEMS RM 3250-25; users_at_glassfish.java.net
Subject: Re: [gf-users] Glassfish 4.0 b89 Durable Subscriptions

Hi Chris,

Those are MDB activation properties, not connection factory's properties. the activation properties can be set via either injection into MDB class or ejb-jar.xml.

Thanks,
David Zhao

On 11/20/14 7:47 AM, MUNDT, CHRISTOPHER J CTR USAF AFWA AFWA/SEMS RM
3250-25 wrote:
> Mr. Zhao,
>
> I tried setting the following on my JMS Connection factory in GF 4.
>
> subscriptionDurability Durable
> subscriptionName my-name
>
> For both of these properties I get an error in the logs "RAR7097: No setter method present for the property .... in the class com.sun.messaging.jms.ra.ManagedConnectionFactory".
>
>
> When I start a single instance of Glassfish using these properties I am seeing errors in my broker logs like the following:
>
> Entry 1: .................................... Create unshared durable subscription ..... on destination ........
>
> Entry 2: ............. Durable subscription .... is already active on destination ................. Stack Trace
>
> Then if I try to start a second Glassfish Instance I get errors in my Glassfish logs of:
>
> ........... Client ID is already in use ..............
>
> Any more suggestions?
>
> Thanks
> Chris
>
> //SIGNED//
>
> Christopher J. Mundt, Contractor, HQ AFWA/SEMSII SEMS / NORTHROP
> GRUMMAN Web/App Server Administrator / Software Engineer
> (402) 232-7823
> DSN 272-7823
> christopher.mundt.ctr_at_us.af.mil
>
> J2EE AppAdmin Support Info:
> J2EE.Admin_at_us.af.mil
> Cell Phone: 402-680-2179
>
>
> -----Original Message-----
> From: David Zhao [mailto:liang.x.zhao_at_oracle.com]
> Sent: Saturday, November 15, 2014 2:07 AM
> To: MUNDT, CHRISTOPHER J CTR USAF AFWA AFWA/SEMS RM 3250-25;
> users_at_glassfish.java.net
> Subject: Re: [gf-users] Glassfish 4.0 b89 Durable Subscriptions
>
> Hi Chris,
>
> Please see if the information can help.
>
> Thanks,
> David Zhao
>
>
> On 11/15/14 12:58 AM, MUNDT, CHRISTOPHER J CTR USAF AFWA AFWA/SEMS RM 3250-25 wrote:
>
>
> To GF Guru's,
>
> I am running GF 4.0b89 in a cluster with 2 instances. I am trying to setup a Durable Subscription that previously worked under GF 2.1.1.
>
> In my connection factory I have the following Additional Properties set:
>
> useSharedSubscriptionInClusteredContainer true
> ClientId my-client-id
>
> Under GF 2.1.1 we used the following settings but the setter functions are not available in GF 4:
> DurableSubscriberName
> DurableSubscriptionName
> SubscriptionDurable
>
> I am not sure where/how did you set the three properties in the old GF 2.1.1 release. But in JMS 2.0, which is implemented by GF 4, the corresponding MDB activation properties are subscriptionDurability, subscriptionName.
>
>
>
>
> I removed these 3 properties that don't have setters but when my app runs in GF 4, I am getting the following 2 errors:
>
>
> [2014-11-14T16:50:24.342+0000] [glassfish 4.0] [WARNING] [poolmgr.get_connection_failure] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors] [tid: _ThreadID=175 _ThreadName=cdfsiiEventJmsContainer-5] [timeMillis: 1415983824342] [levelValue: 900] [[
> RAR5117 : Failed to obtain/create connection from connection pool [
> jms/CDFSIIDataNotificationDestinationFactory-Connection-Pool ]. Reason
> : com.sun.appserv.connectors.internal.api.PoolingException:
> MQRA:MC:InvalidClientIDException-[C4052]: Client ID is already in use
> - my-client-id user=myuser, broker=myhost:7677(65123)]]
>
>
>
> Or
>
>
>
> [2014-11-14T16:53:39.351+0000] [glassfish 4.0] [WARNING] [poolmgr.get_connection_failure] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors] [tid: _ThreadID=175 _ThreadName=cdfsiiEventJmsContainer-5] [timeMillis: 1415984019351] [levelValue: 900] [[
> RAR5117 : Failed to obtain/create connection from connection pool [
> jms/CDFSIIDataNotificationDestinationFactory-Connection-Pool ]. Reason
> : com.sun.appserv.connectors.internal.api.PoolingException: In-use
> connections equal max-pool-size and expired max-wait-time. Cannot
> allocate more connections.]]
>
>
> Is there something different in GF 4 that I need to have to enable durable subscriptions?
>
> Regarding to MDB, please set subscriptionDurability to Durable for enabling it.
>
>
>
>
> Thanks
> Chris
>
> //SIGNED//
>
> Christopher J. Mundt, Contractor, HQ AFWA/SEMSII SEMS / NORTHROP GRUMMAN Web/App Server Administrator / Software Engineer
> (402) 232-7823
> DSN 272-7823
> christopher.mundt.ctr_at_us.af.mil
>
> J2EE AppAdmin Support Info:
> J2EE.Admin_at_us.af.mil
> Cell Phone: 402-680-2179
>
>
>
>