Author: pete.muir(a)jboss.org
Date: 2009-05-29 11:21:05 -0400 (Fri, 29 May 2009)
New Revision: 2732
Modified:
ri/trunk/api/src/main/java/javax/enterprise/context/spi/CreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/jms/JmsMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/MockCreationalContext.java
Log:
Add release to CreationalContext (mocked out for now)
Modified: ri/trunk/api/src/main/java/javax/enterprise/context/spi/CreationalContext.java
===================================================================
---
ri/trunk/api/src/main/java/javax/enterprise/context/spi/CreationalContext.java 2009-05-29
14:50:13 UTC (rev 2731)
+++
ri/trunk/api/src/main/java/javax/enterprise/context/spi/CreationalContext.java 2009-05-29
15:21:05 UTC (rev 2732)
@@ -34,4 +34,6 @@
*/
public void push(T incompleteInstance);
+ public void release();
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-05-29
14:50:13 UTC (rev 2731)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-05-29
15:21:05 UTC (rev 2732)
@@ -317,6 +317,11 @@
public void push(T incompleteInstance) {};
+ public void release()
+ {
+ // TODO implement this
+ }
+
};
DependentContext.instance().startCollectingDependents(dependentStorageRequest);
DependentContext.instance().setActive(true);
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/jms/JmsMethodHandler.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/jms/JmsMethodHandler.java 2009-05-29
14:50:13 UTC (rev 2731)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/jms/JmsMethodHandler.java 2009-05-29
15:21:05 UTC (rev 2732)
@@ -41,6 +41,23 @@
abstract class JmsMethodHandler<C extends Connection, S extends Session, MP extends
MessageProducer, MC extends MessageConsumer> extends AbstractResourceMethodHandler
{
+ private static class DummyCreationalContext<T> implements
CreationalContext<T>
+ {
+
+ public void push(T incompleteInstance)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void release()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ }
+
private static final long serialVersionUID = -2598920314236475437L;
public JmsMethodHandler(String jndiName, String mappedName)
@@ -95,43 +112,24 @@
protected C getConnection(ConnectionContextual<C> connectionContexual)
{
- return ApplicationContext.instance().get(connectionContexual, new
CreationalContext<C>()
- {
-
- public void push(C incompleteInstance) {}
-
- });
+ return ApplicationContext.instance().get(connectionContexual, new
DummyCreationalContext<C>());
}
private S getSession(SessionContextual<S> sessionContextual)
{
- return DependentContext.instance().get(sessionContextual, new
CreationalContext<S>()
- {
-
- public void push(S incompleteInstance) {}
-
- });
+ return DependentContext.instance().get(sessionContextual, new
DummyCreationalContext<S>());
}
private MP getMessageProducer(MessageProducerContextual<MP>
messageProducerContextual)
{
- return DependentContext.instance().get(messageProducerContextual, new
CreationalContext<MP>()
- {
-
- public void push(MP incompleteInstance) {}
-
- });
+ return DependentContext.instance().get(messageProducerContextual, new
DummyCreationalContext<MP>());
}
private MC getQueueReceiver(MessageConsumerContextual<MC>
messageConsumerContextual)
{
- return DependentContext.instance().get(messageConsumerContextual, new
CreationalContext<MC>()
- {
-
- public void push(MC incompleteInstance) {}
-
- });
+ return DependentContext.instance().get(messageConsumerContextual, new
DummyCreationalContext<MC>());
}
+
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-05-29
14:50:13 UTC (rev 2731)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-05-29
15:21:05 UTC (rev 2732)
@@ -67,5 +67,11 @@
{
return outer;
}
+
+ public void release()
+ {
+ // TODO Auto-generated method stub
+
+ }
}
Modified:
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/MockCreationalContext.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/MockCreationalContext.java 2009-05-29
14:50:13 UTC (rev 2731)
+++
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/MockCreationalContext.java 2009-05-29
15:21:05 UTC (rev 2732)
@@ -9,5 +9,11 @@
{
}
+
+ public void release()
+ {
+ // TODO Auto-generated method stub
+
+ }
}
Show replies by date