You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2009/01/17 11:57:14 UTC
svn commit: r735270 - in
/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/disposal:
./ Disposal1.java
Author: gerdogdu
Date: Sat Jan 17 02:57:13 2009
New Revision: 735270
URL: http://svn.apache.org/viewvc?rev=735270&view=rev
Log:
Diposal test component.
Added:
incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/disposal/
incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/disposal/Disposal1.java (with props)
Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/disposal/Disposal1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/disposal/Disposal1.java?rev=735270&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/disposal/Disposal1.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/disposal/Disposal1.java Sat Jan 17 02:57:13 2009
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.webbeans.test.component.disposal;
+
+import javax.persistence.EntityManager;
+import javax.webbeans.Disposes;
+import javax.webbeans.Named;
+import javax.webbeans.Produces;
+import javax.webbeans.RequestScoped;
+import javax.webbeans.SessionScoped;
+
+import org.apache.webbeans.test.annotation.binding.Binding1;
+import org.apache.webbeans.test.mock.MockEntityManager;
+
+@SessionScoped
+public class Disposal1
+{
+ public static boolean disposeCall = false;
+
+ public Disposal1()
+ {
+
+ }
+
+ @Produces @Binding1 @Named @RequestScoped
+ public EntityManager createEntityManager()
+ {
+ return new MockEntityManager();
+ }
+
+ public void dispose(@Disposes @Binding1 EntityManager em)
+ {
+ disposeCall = true;
+ em.close();
+ }
+}
\ No newline at end of file
Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/disposal/Disposal1.java
------------------------------------------------------------------------------
svn:eol-style = native