[jboss-jira] [JBoss JIRA] Commented: (JBAS-6013) Support createDestination in jboss/message-driven
Adrian Brock (JIRA)
jira-events at lists.jboss.org
Tue Oct 28 07:15:21 EDT 2008
[ https://jira.jboss.org/jira/browse/JBAS-6013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12435715#action_12435715 ]
Adrian Brock commented on JBAS-6013:
------------------------------------
This has been done.
The deployer can be found in deployers/ejb-deployer-jboss-beans.xml
(although it relates to ejb3 as well).
The deployer works by acting as a registry for
org.jboss.ejb.deployer.CreateDestination
beans that include a matcher and a factory.
The only current implementation is one that matches javax.jms.MessageListener and jms-ra.rar
(i.e. a jms mdb using our resource adapter) and then creates a JBossMessaging destination.
<!-- Deployer for automatically creating message driven destinations -->
<bean name="CreateDestinationDeployer" class="org.jboss.ejb.deployers.CreateDestinationDeployer">
<incallback method="addCreateDestination"/>
<uncallback method="addCreateDestination"/>
</bean>
<!-- Destination creator for JBoss Messaging -->
<bean name="JBossMessageDestinationCreator" class="org.jboss.ejb.deployers.CreateDestination">
<!-- We match any jms mdb that is going to be deployed using our rar -->
<property name="matcher">
<bean class="org.jboss.ejb.deployers.SimpleCreateDestinationMatcher">
<property name="default">true</property>
<property name="messageListener">javax.jms.MessageListener</property>
<property name="rarName">jms-ra.rar</property>
</bean>
</property>
<!-- Create a destination with JBoss Messaging -->
<property name="factory">
<bean class="org.jboss.jms.server.destination.JBossMessagingCreateDestinationFactory">
<property name="serverPeerName">jboss.messaging:service=ServerPeer</property>
<property name="postOfficeName">jboss.messaging:service=PostOffice</property>
</bean>
</property>
</bean>
To enable the behaviour you need to add
<create-destination>true</create-destination>
on the <message-driven/> in your jboss.xml
Obviously anybody can add new CreateDestinations that do different things for
other rars or inbound types or the default matcher/factory can be changed
to alter when/how JBoss Messaging destinations
are created.
> Support createDestination in jboss/message-driven
> -------------------------------------------------
>
> Key: JBAS-6013
> URL: https://jira.jboss.org/jira/browse/JBAS-6013
> Project: JBoss Application Server
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: EJB2, EJB3
> Reporter: Adrian Brock
> Assignee: Adrian Brock
> Fix For: JBossAS-5.0.0.GA
>
>
> In the old JMSContainerInvoker there was a flag called "createJBossMQDestination"
> which allowed the MDB to automatically create the JMS destination.
> This has is no longer supported with the reworking of the metadata and changes to the MDB container.
> To re-introduce this behaviour and resolve some of the issues we had with this feature (which lead
> to it being disabled by default), the behaviour should be made pluggable via a deployer instead.
> Issues this will resolve over the previous implementation:
> 1) The Destination will be removed at undeployment
> 2) The Destination construction method can be replaced by switiching the deployer, e.g. for different backend jms servers
> including understanding rar specific activation config properties
> 3) The behaviour is not necessarily JMS specific, e.g. other inbound adapters could create their own destinations
> The legacy "createJBossMQDestination" will still be checked when it exists.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list