You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2011/10/18 16:01:39 UTC
svn commit: r1185664 -
/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
Author: rmannibucau
Date: Tue Oct 18 14:01:39 2011
New Revision: 1185664
URL: http://svn.apache.org/viewvc?rev=1185664&view=rev
Log:
the spec says mdb.mappedNme() is by default the name of the queue to use
Modified:
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java?rev=1185664&r1=1185663&r2=1185664&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java Tue Oct 18 14:01:39 2011
@@ -175,6 +175,7 @@ import javax.enterprise.inject.spi.Exten
import javax.interceptor.ExcludeClassInterceptors;
import javax.interceptor.ExcludeDefaultInterceptors;
import javax.interceptor.Interceptors;
+import javax.jms.Queue;
import javax.jws.HandlerChain;
import javax.jws.WebService;
import javax.persistence.EntityManager;
@@ -2203,13 +2204,25 @@ public class AnnotationDeployer implemen
MessageDrivenBean mdb = (MessageDrivenBean) bean;
MessageDriven messageDriven = clazz.getAnnotation(MessageDriven.class);
if (messageDriven != null) {
+ ActivationConfig activationConfig = mdb.getActivationConfig();
+ if (activationConfig == null) {
+ activationConfig = new ActivationConfig();
+ }
+
+ if (!messageDriven.mappedName().isEmpty()) {
+ if (mdb.getActivationConfig() == null) {
+ mdb.setActivationConfig(activationConfig);
+ }
+ activationConfig.addProperty("destinationType", Queue.class.getName());
+ activationConfig.addProperty("destination", messageDriven.mappedName());
+ }
+
javax.ejb.ActivationConfigProperty[] configProperties = messageDriven.activationConfig();
if (configProperties != null) {
- ActivationConfig activationConfig = mdb.getActivationConfig();
- if (activationConfig == null) {
- activationConfig = new ActivationConfig();
+ if (mdb.getActivationConfig() == null) {
mdb.setActivationConfig(activationConfig);
}
+
Properties properties = activationConfig.toProperties();
for (javax.ejb.ActivationConfigProperty property : configProperties) {
if (!properties.containsKey(property.propertyName())) {