[jboss-dev] any tests with mdb-client-id?

Adrian Brock abrock at redhat.com
Thu Mar 19 18:07:27 EDT 2009


On Thu, 2009-03-19 at 15:23 +0100, Alexey Loubyansky wrote:
> What about a testcase for this?
> Can I add mdb-client-id to an existing MDB in the testsuite? 

Or just create your own test? Basically the MDB should create a durable
subscription which you'll have to delete after the test.

> If I deploy 
> an EJB module with an MDB with mdb-client-id, the MDB fails to deploy 
> but the EJB module (with other beans in it) is deployed successfully 
> (IMO, a module should be considered deployed only if everything in the 
> module is deployed successfully, like a single deployment unit). So, I 
> would have to deploy an MDB and make sure it functions properly.
> 

For MDBs the activation is allowed to fail, but the MDB
is still there but not active, it will retry the activation
periodically. The assumption being that the jms server is currently
unavailable or additional configuration will fix the problem.

Alternatively you can even deploy an MDB in inactive mode
and activate it later.

So just testing the MDB is deployed, it is not a proper test.
You need to send a message and make sure it got received.

> Also, in one of the descriptors in the testsuite I saw client id 
> provided as an activation config property instead of a separate element 
> and spelled clientID (although the property was commented out) but it 
> means it used to be spelled that way?
> 

I don't know why that is, but its obviously wrong/unused.

According to the initial checkin,
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsActivationSpec.java?revision=22930&view=markup
its always been clientId.

Its only in JBoss5 that mdb-client-id is getting mapped to the
activation spec. Previously we had the JMSContainerInvoker for the old
config.

> Adrian Brock wrote:
> > On Mon, 2009-03-16 at 17:00 +0100, Alexey Loubyansky wrote:
> >> Do we have any tests with mdb-client-id? In the AS testsuite I can't 
> >> find any.
> > 
> > I don't see any.
> > 
> > All the tests seem to either use the john/needle login
> > to get the preconfigured one or they use the 
> > activation-config-property.
> > 
> > Like the bug report says, this is just a typo in the
> > JBossJMSMessageEndpointFactory, that is supposed to
> > map old configs to the new one.
> > 
> > It has nothing to do with MessageDrivenMetaData AFAICS?
> > 
> > It is setClientId() on the activation spec. And thats what
> > the JCA spec recommends it be called.
> > 
> > B.2 JMS ActivationSpec JavaBean
> > "
> >  The recommended properties for JMS ActivationSpec JavaBean are:
> > destination (required), destinationType (required), messageSelector,
> > acknowledgeMode, subscriptionDurability, clientId, subscriptionName.
> > "
> > 
> > So the fix should be here:
> > 
> > http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/server/src/main/org/jboss/ejb/plugins/inflow/JBossJMSMessageEndpointFactory.java?revision=66933&view=markup
> > 
> > - checkActivationConfig("clientID", metaData.getClientId());
> > + checkActivationConfig("clientId", metaData.getClientId());
> > 
> > But its also wrong on the WIKI page and so I guess it is probably
> > wrong in the docs?
> > http://www.jboss.org/community/docs/DOC-9352/version/13
> > 
> >> This is regarding
> >>
> >> "Specifying mdb-client-id in jboss.xml causes mdb deployments to fail"
> >> https://jira.jboss.org/jira/browse/JBAS-6606
> >>
> >>
> >> Thanks,
> >> Alexey
> >> _______________________________________________
> >> jboss-development mailing list
> >> jboss-development at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/jboss-development
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list