[webbeans-commits] Webbeans SVN: r2393 - in ri/trunk: impl/src/main/java/org/jboss/webbeans/mock and 12 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Fri Apr 10 15:38:38 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-04-10 15:38:38 -0400 (Fri, 10 Apr 2009)
New Revision: 2393
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsTopicBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJmsServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/
ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/
ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/JmsServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/helpers/
ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/helpers/ForwardingJmsServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/
ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardinEntityDiscovery.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardingJpaServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJmsServices.java
Removed:
ri/trunk/spi/src/main/java/org/jboss/webbeans/jpa/spi/helpers/
ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardinEntityDiscovery.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardingJpaServices.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractJavaEEResourceBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/RemoteEjbBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/RemoteEjbMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/ResourceBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/ResourceMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/WebServiceBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/WebServiceMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockEELifecycle.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlEnvironment.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/BootstrapBean.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers/AbstractResourceServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/BootstrapTest.java
Log:
Add Jms beans
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractJavaEEResourceBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractJavaEEResourceBean.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractJavaEEResourceBean.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -18,6 +18,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -56,16 +57,26 @@
* @param bindings the bindings of bean
* @param type the concrete type of the bean
*/
- public AbstractJavaEEResourceBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type)
+ protected AbstractJavaEEResourceBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type)
{
+ this(manager, deploymentType, bindings, type, type);
+ }
+
+ /**
+ * @param manager the manager used to create this bean
+ * @param deploymentType the deployment type of the bean
+ * @param bindings the bindings of bean
+ * @param type the concrete type of the bean
+ */
+ protected AbstractJavaEEResourceBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type, Type... types)
+ {
super(manager);
this.deploymentType = deploymentType;
this.bindings = bindings;
this.type = type;
this.types = new HashSet<Type>();
- types.add(type);
-
- ProxyFactory proxyFactory = Proxies.getProxyFactory(types);
+ this.types.addAll(Arrays.asList(types));
+ ProxyFactory proxyFactory = Proxies.getProxyFactory(this.types);
@SuppressWarnings("unchecked")
Class<T> proxyClass = proxyFactory.createClass();
@@ -106,7 +117,7 @@
@Override
public Set<? extends Type> getTypes()
{
- return types;
+ return Collections.unmodifiableSet(types);
}
@Override
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceBean.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceBean.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.ee;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+import org.jboss.webbeans.ManagerImpl;
+
+/**
+ * @author Pete Muir
+ */
+public abstract class AbstractResourceBean<T> extends AbstractJavaEEResourceBean<T>
+{
+
+ private final String jndiName;
+ private final String mappedName;
+
+ protected AbstractResourceBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type, String jndiName, String mappedName, Type... types)
+ {
+ super(manager, deploymentType, bindings, type, types);
+ this.jndiName = jndiName;
+ this.mappedName = mappedName;
+ }
+
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ public String getMappedName()
+ {
+ return mappedName;
+ }
+
+}
\ No newline at end of file
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceMethodHandler.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceMethodHandler.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.ee;
+
+/**
+ * @author Pete Muir
+ *
+ */
+public abstract class AbstractResourceMethodHandler extends AbstractJavaEEResourceMethodHandler
+{
+
+ private final String mappedName;
+ private final String jndiName;
+
+ public AbstractResourceMethodHandler(String jndiName, String mappedName)
+ {
+ this.mappedName = mappedName;
+ this.jndiName = jndiName;
+ }
+
+ protected String getMappedName()
+ {
+ return mappedName;
+ }
+
+ protected String getJndiName()
+ {
+ return jndiName;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/AbstractResourceMethodHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueBean.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueBean.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.ee;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import javassist.util.proxy.MethodHandler;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+
+import org.jboss.webbeans.ManagerImpl;
+
+
+/**
+ * @author Pete Muir
+ *
+ */
+public class JmsQueueBean extends AbstractResourceBean<Object>
+{
+
+ private final String id;
+
+ /**
+ * @param manager
+ * @param deploymentType
+ * @param bindings
+ * @param type
+ */
+ public JmsQueueBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, String jndiName, String mappedName)
+ {
+ super(manager,
+ deploymentType,
+ bindings,
+ null,
+ jndiName,
+ mappedName,
+ Queue.class, QueueConnection.class, QueueSession.class, QueueSender.class);
+ this.id = createId("JmsQueue-");
+ }
+
+ @Override
+ protected MethodHandler newMethodHandler()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueMethodHandler.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueMethodHandler.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.ee;
+
+
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.messaging.spi.JmsServices;
+
+/**
+ * Proxy for persistence unit Java EE web services
+ *
+ * @author Pete Muir
+ *
+ */
+public class JmsQueueMethodHandler extends AbstractResourceMethodHandler
+{
+
+ public JmsQueueMethodHandler(String jndiName, String mappedName)
+ {
+ super(jndiName, mappedName);
+ }
+
+ @Override
+ protected Object getProxiedInstance()
+ {
+ return CurrentManager.rootManager().getServices().get(JmsServices.class).resolveDestination(getJndiName(), getMappedName());
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsQueueMethodHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsTopicBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsTopicBean.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsTopicBean.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.ee;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import javassist.util.proxy.MethodHandler;
+
+import javax.jms.Topic;
+import javax.jms.TopicConnection;
+import javax.jms.TopicPublisher;
+import javax.jms.TopicSession;
+
+import org.jboss.webbeans.ManagerImpl;
+
+
+/**
+ * @author Pete Muir
+ *
+ */
+public class JmsTopicBean extends AbstractResourceBean<Object>
+{
+
+ private final String id;
+
+ /**
+ * @param manager
+ * @param deploymentType
+ * @param bindings
+ * @param type
+ */
+ public JmsTopicBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, String jndiName, String mappedName)
+ {
+ super(manager,
+ deploymentType,
+ bindings,
+ null,
+ jndiName,
+ mappedName,
+ Topic.class, TopicConnection.class, TopicSession.class, TopicPublisher.class);
+ this.id = createId("JmsQueue-");
+ }
+
+ @Override
+ protected MethodHandler newMethodHandler()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/JmsTopicBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/RemoteEjbBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/RemoteEjbBean.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/RemoteEjbBean.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -27,19 +27,15 @@
* @author Pete Muir
*
*/
-public class RemoteEjbBean<T> extends AbstractJavaEEResourceBean<T>
+public class RemoteEjbBean<T> extends AbstractResourceBean<T>
{
private final String id;
- private final String jndiName;
- private final String mappedName;
private final String ejbLink;
public RemoteEjbBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type, String jndiName, String mappedName, String ejbLink)
{
- super(manager, deploymentType, bindings, type);
- this.jndiName = jndiName;
- this.mappedName = mappedName;
+ super(manager, deploymentType, bindings, type, jndiName, mappedName, type);
this.ejbLink = ejbLink;
this.id = createId("RemoteEjb - " );
}
@@ -50,16 +46,6 @@
return id;
}
- public String getJndiName()
- {
- return jndiName;
- }
-
- public String getMappedName()
- {
- return mappedName;
- }
-
public String getEjbLink()
{
return ejbLink;
@@ -68,7 +54,7 @@
@Override
protected MethodHandler newMethodHandler()
{
- return new RemoteEjbMethodHandler(getMappedName(), getJndiName(), getEjbLink());
+ return new RemoteEjbMethodHandler(getJndiName(), getMappedName(), getEjbLink());
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/RemoteEjbMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/RemoteEjbMethodHandler.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/RemoteEjbMethodHandler.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -26,24 +26,21 @@
* @author Pete Muir
*
*/
-public class RemoteEjbMethodHandler extends AbstractJavaEEResourceMethodHandler
+public class RemoteEjbMethodHandler extends AbstractResourceMethodHandler
{
- private final String mappedName;
- private final String jndiName;
private final String ejbLink;
- public RemoteEjbMethodHandler(String mappedName, String jndiName, String ejbLink)
+ public RemoteEjbMethodHandler(String jndiName, String mappedName, String ejbLink)
{
- this.mappedName = mappedName;
- this.jndiName = jndiName;
+ super(jndiName, mappedName);
this.ejbLink = ejbLink;
}
@Override
protected Object getProxiedInstance()
{
- return CurrentManager.rootManager().getServices().get(EjbServices.class).resolveRemoteEjb(jndiName, mappedName, ejbLink);
+ return CurrentManager.rootManager().getServices().get(EjbServices.class).resolveRemoteEjb(getJndiName(), getMappedName(), ejbLink);
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/ResourceBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/ResourceBean.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/ResourceBean.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -27,19 +27,15 @@
* @author Pete Muir
*
*/
-public class ResourceBean<T> extends AbstractJavaEEResourceBean<T>
+public class ResourceBean<T> extends AbstractResourceBean<T>
{
private final String id;
- private final String mappedName;
- private final String jndiName;
- public ResourceBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type, String mappedName, String jndiName)
+ public ResourceBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type, String jndiName, String mappedName)
{
- super(manager, deploymentType, bindings, type);
- this.mappedName = mappedName;
- this.jndiName = jndiName;
- this.id = createId("WebService - " );
+ super(manager, deploymentType, bindings, type, jndiName, mappedName, type);
+ this.id = createId("Resource-");
}
@Override
@@ -48,20 +44,10 @@
return id;
}
- public String getMappedName()
- {
- return mappedName;
- }
-
- public String getJndiName()
- {
- return jndiName;
- }
-
@Override
protected MethodHandler newMethodHandler()
{
- return new ResourceMethodHandler(getMappedName(), getJndiName());
+ return new ResourceMethodHandler(getJndiName(), getMappedName());
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/ResourceMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/ResourceMethodHandler.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/ResourceMethodHandler.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -26,22 +26,18 @@
* @author Pete Muir
*
*/
-public class ResourceMethodHandler extends AbstractJavaEEResourceMethodHandler
+public class ResourceMethodHandler extends AbstractResourceMethodHandler
{
- private final String mappedName;
- private final String jndiName;
-
- public ResourceMethodHandler(String mappedName, String jndiName)
+ public ResourceMethodHandler(String jndiName, String mappedName)
{
- this.mappedName = mappedName;
- this.jndiName = jndiName;
+ super(jndiName, mappedName);
}
@Override
protected Object getProxiedInstance()
{
- return CurrentManager.rootManager().getServices().get(ResourceServices.class).resolveResource(jndiName, mappedName);
+ return CurrentManager.rootManager().getServices().get(ResourceServices.class).resolveResource(getJndiName(), getMappedName());
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/WebServiceBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/WebServiceBean.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/WebServiceBean.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -27,19 +27,15 @@
* @author Pete Muir
*
*/
-public class WebServiceBean<T> extends AbstractJavaEEResourceBean<T>
+public class WebServiceBean<T> extends AbstractResourceBean<T>
{
private final String id;
- private final String mappedName;
- private final String jndiName;
private final String wsdlLocation;
- public WebServiceBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type, String mappedName, String jndiName, String wsdlLocation)
+ public WebServiceBean(ManagerImpl manager, Class<? extends Annotation> deploymentType, Set<Annotation> bindings, Class<T> type, String jndiName, String mappedName, String wsdlLocation)
{
- super(manager, deploymentType, bindings, type);
- this.mappedName = mappedName;
- this.jndiName = jndiName;
+ super(manager, deploymentType, bindings, type, jndiName, mappedName, type);
this.wsdlLocation = wsdlLocation;
this.id = createId("WebService - " );
}
@@ -50,16 +46,6 @@
return id;
}
- public String getMappedName()
- {
- return mappedName;
- }
-
- public String getJndiName()
- {
- return jndiName;
- }
-
public String getWsdlLocation()
{
return wsdlLocation;
@@ -68,7 +54,7 @@
@Override
protected MethodHandler newMethodHandler()
{
- return new WebServiceMethodHandler(getMappedName(), getJndiName());
+ return new WebServiceMethodHandler(getJndiName(), getMappedName());
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/WebServiceMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/WebServiceMethodHandler.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/WebServiceMethodHandler.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -26,22 +26,18 @@
* @author Pete Muir
*
*/
-public class WebServiceMethodHandler extends AbstractJavaEEResourceMethodHandler
+public class WebServiceMethodHandler extends AbstractResourceMethodHandler
{
- private final String mappedName;
- private final String jndiName;
-
- public WebServiceMethodHandler(String mappedName, String jndiName)
+ public WebServiceMethodHandler(String jndiName, String mappedName)
{
- this.mappedName = mappedName;
- this.jndiName = jndiName;
+ super(jndiName, mappedName);
}
@Override
protected Object getProxiedInstance()
{
- return CurrentManager.rootManager().getServices().get(WebServices.class).resolveResource(jndiName, mappedName);
+ return CurrentManager.rootManager().getServices().get(WebServices.class).resolveResource(getJndiName(), getMappedName());
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockEELifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockEELifecycle.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockEELifecycle.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -18,6 +18,7 @@
import org.jboss.webbeans.bootstrap.api.Environments;
import org.jboss.webbeans.ejb.spi.EjbServices;
+import org.jboss.webbeans.messaging.spi.JmsServices;
import org.jboss.webbeans.persistence.spi.JpaServices;
import org.jboss.webbeans.resources.spi.ResourceServices;
import org.jboss.webbeans.transaction.spi.TransactionServices;
@@ -36,6 +37,7 @@
getBootstrap().getServices().add(JpaServices.class, new MockJpaServices(getWebBeanDiscovery()));
getBootstrap().getServices().add(ResourceServices.class, new MockResourceServices());
getBootstrap().getServices().add(WebServices.class, new MockWebServices());
+ getBootstrap().getServices().add(JmsServices.class, new MockJmsServices());
getBootstrap().setEnvironment(Environments.EE);
}
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJmsServices.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJmsServices.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJmsServices.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.mock;
+
+import org.jboss.webbeans.messaging.spi.JmsServices;
+
+/**
+ * @author Pete Muir
+ *
+ */
+public class MockJmsServices implements JmsServices
+{
+
+ public Object resolveDestination(String jndiName, String mappedName)
+ {
+ return null;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJmsServices.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlEnvironment.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlEnvironment.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlEnvironment.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -90,7 +90,7 @@
return serviceRegistry.get(ResourceLoader.class).getResource(filePath);
}
- public ServiceRegistry getServiceRegistry()
+ public ServiceRegistry getServices()
{
return serviceRegistry;
}
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -22,6 +22,7 @@
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
import org.jboss.webbeans.ejb.spi.EjbServices;
+import org.jboss.webbeans.messaging.spi.JmsServices;
import org.jboss.webbeans.persistence.spi.EntityDiscovery;
import org.jboss.webbeans.persistence.spi.JpaServices;
import org.jboss.webbeans.resources.spi.NamingContext;
@@ -42,7 +43,7 @@
/**
* Java EE5 or Java EE6
*/
- EE(WebBeanDiscovery.class, EjbServices.class, JpaServices.class, WebServices.class, EntityDiscovery.class, ResourceServices.class, TransactionServices.class, NamingContext.class, ResourceLoader.class),
+ EE(WebBeanDiscovery.class, EjbServices.class, JpaServices.class, WebServices.class, JmsServices.class, EntityDiscovery.class, ResourceServices.class, TransactionServices.class, NamingContext.class, ResourceLoader.class),
/**
* Java EE6 Web Profile
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/BootstrapBean.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/BootstrapBean.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/BootstrapBean.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -7,6 +7,7 @@
import org.jboss.webbeans.context.api.BeanStore;
import org.jboss.webbeans.ejb.spi.EjbServices;
import org.jboss.webbeans.manager.api.WebBeansManager;
+import org.jboss.webbeans.messaging.spi.JmsServices;
import org.jboss.webbeans.persistence.spi.JpaServices;
import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
@@ -115,6 +116,16 @@
bootstrap.getServices().add(WebServices.class, webServices);
}
+ public JmsServices getJmsServices()
+ {
+ return bootstrap.getServices().get(JmsServices.class);
+ }
+
+ public void setJmsServices(JmsServices jmsServices)
+ {
+ bootstrap.getServices().add(JmsServices.class, jmsServices);
+ }
+
public void boot()
{
bootstrap.boot();
Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/JmsServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/JmsServices.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/JmsServices.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,27 @@
+package org.jboss.webbeans.messaging.spi;
+
+
+import org.jboss.webbeans.bootstrap.api.Service;
+
+/**
+ * A container should implement this interface to allow Web Beans to resolve Jms
+ * Services
+ *
+ * @author Pete Muir
+ *
+ */
+public interface JmsServices extends Service
+{
+
+ /**
+ * Resolve the destination for the given JNDI name and mapped name
+ *
+ * @param injectionPoint
+ * the injection point metadata
+ * @return an instance of the resource
+ * @throws IllegalStateException
+ * if no resource can be resolved for injection
+ */
+ public Object resolveDestination(String jndiName, String mappedName);
+
+}
\ No newline at end of file
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/JmsServices.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/helpers/ForwardingJmsServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/helpers/ForwardingJmsServices.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/helpers/ForwardingJmsServices.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.messaging.spi.helpers;
+
+import org.jboss.webbeans.ws.spi.WebServices;
+
+public abstract class ForwardingJmsServices implements WebServices
+{
+
+ protected abstract WebServices delegate();
+
+ public Object resolveResource(String jndiName, String mappedName)
+ {
+ return delegate().resolveResource(jndiName, mappedName);
+ }
+
+}
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/spi/helpers/ForwardingJmsServices.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers (from rev 2365, ri/trunk/spi/src/main/java/org/jboss/webbeans/jpa/spi/helpers)
Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardinEntityDiscovery.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/jpa/spi/helpers/ForwardinEntityDiscovery.java 2009-04-09 15:52:54 UTC (rev 2365)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardinEntityDiscovery.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -1,27 +0,0 @@
-package org.jboss.webbeans.jpa.spi.helpers;
-
-import java.util.Collection;
-
-import org.jboss.webbeans.persistence.spi.EntityDiscovery;
-
-public abstract class ForwardinEntityDiscovery implements EntityDiscovery
-{
-
- protected abstract EntityDiscovery delegate();
-
- public Collection<Class<?>> discoverEntitiesFromAnnotations()
- {
- return delegate().discoverEntitiesFromAnnotations();
- }
-
- public Collection<Class<?>> discoverEntitiesFromPersistenceUnits()
- {
- return delegate().discoverEntitiesFromPersistenceUnits();
- }
-
- public Collection<Class<?>> discoverEntitiesFromXml()
- {
- return delegate().discoverEntitiesFromXml();
- }
-
-}
Copied: ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardinEntityDiscovery.java (from rev 2392, ri/trunk/spi/src/main/java/org/jboss/webbeans/jpa/spi/helpers/ForwardinEntityDiscovery.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardinEntityDiscovery.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardinEntityDiscovery.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,27 @@
+package org.jboss.webbeans.persistence.spi.helpers;
+
+import java.util.Collection;
+
+import org.jboss.webbeans.persistence.spi.EntityDiscovery;
+
+public abstract class ForwardinEntityDiscovery implements EntityDiscovery
+{
+
+ protected abstract EntityDiscovery delegate();
+
+ public Collection<Class<?>> discoverEntitiesFromAnnotations()
+ {
+ return delegate().discoverEntitiesFromAnnotations();
+ }
+
+ public Collection<Class<?>> discoverEntitiesFromPersistenceUnits()
+ {
+ return delegate().discoverEntitiesFromPersistenceUnits();
+ }
+
+ public Collection<Class<?>> discoverEntitiesFromXml()
+ {
+ return delegate().discoverEntitiesFromXml();
+ }
+
+}
Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardingJpaServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/jpa/spi/helpers/ForwardingJpaServices.java 2009-04-09 15:52:54 UTC (rev 2365)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardingJpaServices.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.jpa.spi.helpers;
-
-import java.util.Collection;
-
-import javax.inject.manager.InjectionPoint;
-
-import org.jboss.webbeans.persistence.spi.JpaServices;
-
-/**
- * An implementation of {@link JpaServices} which forwards all its method calls
- * to another {@link JpaServices}}. Subclasses should override one or more
- * methods to modify the behavior of the backing {@link JpaServices} as desired
- * per the <a
- * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
- *
- * @author Pete Muir
- *
- */
-public abstract class ForwardingJpaServices implements JpaServices
-{
-
- protected abstract JpaServices delegate();
-
- public Object resolvePersistenceContext(InjectionPoint injectionPoint)
- {
- return delegate().resolvePersistenceContext(injectionPoint);
- }
-
- @Override
- public String toString()
- {
- return delegate().toString();
- }
-
- @Override
- public int hashCode()
- {
- return delegate().hashCode();
- }
-
- @Override
- public boolean equals(Object obj)
- {
- return delegate().equals(obj);
- }
-
-}
Copied: ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardingJpaServices.java (from rev 2392, ri/trunk/spi/src/main/java/org/jboss/webbeans/jpa/spi/helpers/ForwardingJpaServices.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardingJpaServices.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/helpers/ForwardingJpaServices.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.persistence.spi.helpers;
+
+import javax.inject.manager.InjectionPoint;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
+import org.jboss.webbeans.persistence.spi.JpaServices;
+
+/**
+ * An implementation of {@link JpaServices} which forwards all its method calls
+ * to another {@link JpaServices}}. Subclasses should override one or more
+ * methods to modify the behavior of the backing {@link JpaServices} as desired
+ * per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
+public abstract class ForwardingJpaServices implements JpaServices
+{
+
+ protected abstract JpaServices delegate();
+
+ public EntityManager resolvePersistenceContext(InjectionPoint injectionPoint)
+ {
+ return delegate().resolvePersistenceContext(injectionPoint);
+ }
+
+ public EntityManager resolvePersistenceContext(String unitName)
+ {
+ return delegate().resolvePersistenceContext(unitName);
+ }
+
+ public EntityManagerFactory resolvePersistenceUnit(String unitName)
+ {
+ return delegate().resolvePersistenceUnit(unitName);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+}
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers/AbstractResourceServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers/AbstractResourceServices.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers/AbstractResourceServices.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -10,10 +10,7 @@
import javax.naming.Context;
import javax.naming.NamingException;
-import org.jboss.webbeans.resources.spi.ResourceServices;
-import org.jboss.webbeans.ws.spi.WebServices;
-
-public abstract class AbstractResourceServices implements ResourceServices, WebServices
+public abstract class AbstractResourceServices
{
private static final String RESOURCE_LOOKUP_PREFIX = "java:/comp/env";
Modified: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/BootstrapTest.java
===================================================================
--- ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/BootstrapTest.java 2009-04-10 19:06:17 UTC (rev 2392)
+++ ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/BootstrapTest.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -5,6 +5,7 @@
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
import org.jboss.webbeans.ejb.spi.EjbServices;
+import org.jboss.webbeans.messaging.spi.JmsServices;
import org.jboss.webbeans.persistence.spi.EntityDiscovery;
import org.jboss.webbeans.persistence.spi.JpaServices;
import org.jboss.webbeans.resources.spi.NamingContext;
@@ -42,6 +43,7 @@
bootstrap.getServices().add(EntityDiscovery.class, new MockEntityDiscovery());
bootstrap.getServices().add(ResourceServices.class, new MockResourceServices());
bootstrap.getServices().add(WebServices.class, new MockWebServices());
+ bootstrap.getServices().add(JmsServices.class, new MockJmsServices());
bootstrap.initialize();
}
@@ -59,6 +61,7 @@
bootstrap.getServices().add(EntityDiscovery.class, new MockEntityDiscovery());
bootstrap.getServices().add(ResourceServices.class, new MockResourceServices());
bootstrap.getServices().add(WebServices.class, new MockWebServices());
+ bootstrap.getServices().add(JmsServices.class, new MockJmsServices());
bootstrap.initialize();
}
@@ -76,6 +79,7 @@
bootstrap.getServices().add(EntityDiscovery.class, new MockEntityDiscovery());
bootstrap.getServices().add(ResourceServices.class, new MockResourceServices());
bootstrap.getServices().add(JpaServices.class, new MockJpaServices());
+ bootstrap.getServices().add(JmsServices.class, new MockJmsServices());
bootstrap.initialize();
}
@@ -93,10 +97,29 @@
bootstrap.getServices().add(ResourceServices.class, new MockResourceServices());
bootstrap.getServices().add(JpaServices.class, new MockJpaServices());
bootstrap.getServices().add(WebServices.class, new MockWebServices());
+ bootstrap.getServices().add(JmsServices.class, new MockJmsServices());
bootstrap.initialize();
}
+ @Test(expectedExceptions=IllegalStateException.class)
+ public void testMissingJmsServices()
+ {
+ AbstractBootstrap bootstrap = new MockBootstrap();
+ bootstrap.setEnvironment(Environments.EE);
+ bootstrap.setApplicationContext(new ConcurrentHashMapBeanStore());
+ bootstrap.getServices().add(NamingContext.class, new MockNamingContext());
+ bootstrap.getServices().add(ResourceLoader.class, new MockResourceLoader());
+ bootstrap.getServices().add(TransactionServices.class, new MockTransactionServices());
+ bootstrap.getServices().add(WebBeanDiscovery.class, new MockWebBeanDiscovery());
+ bootstrap.getServices().add(EjbServices.class, new MockEjbServices());
+ bootstrap.getServices().add(ResourceServices.class, new MockResourceServices());
+ bootstrap.getServices().add(JpaServices.class, new MockJpaServices());
+ bootstrap.getServices().add(WebServices.class, new MockWebServices());
+ bootstrap.getServices().add(EntityDiscovery.class, new MockEntityDiscovery());
+ bootstrap.initialize();
+ }
+
@Test
public void testEEEnv()
{
@@ -112,6 +135,7 @@
bootstrap.getServices().add(EntityDiscovery.class, new MockEntityDiscovery());
bootstrap.getServices().add(ResourceServices.class, new MockResourceServices());
bootstrap.getServices().add(WebServices.class, new MockWebServices());
+ bootstrap.getServices().add(JmsServices.class, new MockJmsServices());
bootstrap.initialize();
}
Added: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJmsServices.java
===================================================================
--- ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJmsServices.java (rev 0)
+++ ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJmsServices.java 2009-04-10 19:38:38 UTC (rev 2393)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.bootstrap.api.test;
+
+import org.jboss.webbeans.messaging.spi.JmsServices;
+
+public class MockJmsServices implements JmsServices
+{
+
+ public Object resolveDestination(String jndiName, String mappedName)
+ {
+ return null;
+ }
+
+}
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJmsServices.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the weld-commits
mailing list