You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2008/04/21 18:45:24 UTC
svn commit: r650200 - in /geronimo/sandbox/concurrent/concurrent-tests:
concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/
concurrent-ejb/src/main/resources/META-INF/
Author: gawor
Date: Mon Apr 21 09:45:06 2008
New Revision: 650200
URL: http://svn.apache.org/viewvc?rev=650200&view=rev
Log:
added tests for beans with component managed transactions
Added:
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceCmtTest.java (with props)
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/EJBTestSupport.java (with props)
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceCmtTest.java (with props)
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceCmtTest.java (with props)
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryCmtTest.java (with props)
Modified:
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceTest.java
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceTest.java
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceTest.java
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryTest.java
geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb/src/main/resources/META-INF/ejb-jar.xml
Added: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceCmtTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceCmtTest.java?rev=650200&view=auto
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceCmtTest.java (added)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceCmtTest.java Mon Apr 21 09:45:06 2008
@@ -0,0 +1,27 @@
+/**
+ * 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.geronimo.concurrent.test;
+
+public class ContextServiceCmtTest extends ContextServiceTest {
+
+ protected String getRemoteBeanName() {
+ return "/ContextServiceCmtBeanRemote";
+ }
+
+}
Propchange: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceCmtTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceTest.java?rev=650200&r1=650199&r2=650200&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceTest.java (original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ContextServiceTest.java Mon Apr 21 09:45:06 2008
@@ -18,42 +18,26 @@
*/
package org.apache.geronimo.concurrent.test;
-import java.util.Properties;
-
-import javax.naming.Context;
import javax.naming.InitialContext;
import org.apache.geronimo.concurrent.test.context.ContextServiceRemote;
-import org.apache.geronimo.testsupport.TestSupport;
import org.testng.annotations.Test;
-public class ContextServiceTest extends TestSupport {
-
- private InitialContext getInitialContext(String username, String password) throws Exception {
- Properties p = new Properties();
-
- p.put("java.naming.factory.initial",
- "org.apache.openejb.client.RemoteInitialContextFactory");
- p.put("java.naming.provider.url",
- "127.0.0.1:4201");
-
- if (username != null && password != null) {
- p.put(Context.SECURITY_PRINCIPAL, username);
- p.put(Context.SECURITY_CREDENTIALS, password);
- p.put("openejb.authentication.realmName", "geronimo-admin");
- }
-
- InitialContext ctx = new InitialContext(p);
- return ctx;
+public class ContextServiceTest extends EJBTestSupport {
+
+ protected String getRemoteBeanName() {
+ return "/ContextServiceBeanRemote";
}
private ContextServiceRemote getBean() throws Exception {
return getBean(null, null);
}
- private ContextServiceRemote getBean(String username, String password) throws Exception {
- InitialContext ctx = getInitialContext(username, password);
- ContextServiceRemote bean = (ContextServiceRemote)ctx.lookup("/ContextServiceBeanRemote");
+ protected ContextServiceRemote getBean(String username, String password) throws Exception {
+ InitialContext ctx = getInitialContext(username, password);
+ String beanName = getRemoteBeanName();
+ System.out.println("Using: " + beanName);
+ ContextServiceRemote bean = (ContextServiceRemote)ctx.lookup(beanName);
return bean;
}
Added: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/EJBTestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/EJBTestSupport.java?rev=650200&view=auto
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/EJBTestSupport.java (added)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/EJBTestSupport.java Mon Apr 21 09:45:06 2008
@@ -0,0 +1,48 @@
+/**
+ * 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.geronimo.concurrent.test;
+
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.apache.geronimo.testsupport.TestSupport;
+
+public class EJBTestSupport extends TestSupport {
+
+ protected InitialContext getInitialContext(String username, String password) throws Exception {
+ Properties p = new Properties();
+
+ p.put("java.naming.factory.initial",
+ "org.apache.openejb.client.RemoteInitialContextFactory");
+ p.put("java.naming.provider.url",
+ "127.0.0.1:4201");
+
+ if (username != null && password != null) {
+ p.put(Context.SECURITY_PRINCIPAL, username);
+ p.put(Context.SECURITY_CREDENTIALS, password);
+ p.put("openejb.authentication.realmName", "geronimo-admin");
+ }
+
+ InitialContext ctx = new InitialContext(p);
+ return ctx;
+ }
+
+}
Propchange: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/EJBTestSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceCmtTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceCmtTest.java?rev=650200&view=auto
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceCmtTest.java (added)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceCmtTest.java Mon Apr 21 09:45:06 2008
@@ -0,0 +1,27 @@
+/**
+ * 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.geronimo.concurrent.test;
+
+public class ManagedExecutorServiceCmtTest extends ManagedExecutorServiceTest {
+
+ protected String getRemoteBeanName() {
+ return "/ManagedExecutorServiceCmtBeanRemote";
+ }
+
+}
Propchange: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceCmtTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceTest.java?rev=650200&r1=650199&r2=650200&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceTest.java (original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceTest.java Mon Apr 21 09:45:06 2008
@@ -18,43 +18,26 @@
*/
package org.apache.geronimo.concurrent.test;
-import java.util.Properties;
-
-import javax.naming.Context;
import javax.naming.InitialContext;
import org.apache.geronimo.concurrent.test.executor.ManagedExecutorServiceRemote;
-import org.apache.geronimo.testsupport.TestSupport;
import org.testng.annotations.Test;
-public class ManagedExecutorServiceTest extends TestSupport {
-
- private InitialContext getInitialContext(String username, String password) throws Exception {
- Properties p = new Properties();
-
- p.put("java.naming.factory.initial",
- "org.apache.openejb.client.RemoteInitialContextFactory");
- p.put("java.naming.provider.url",
- "127.0.0.1:4201");
-
- if (username != null && password != null) {
- p.put(Context.SECURITY_PRINCIPAL, username);
- p.put(Context.SECURITY_CREDENTIALS, password);
- p.put("openejb.authentication.realmName", "geronimo-admin");
- }
-
- InitialContext ctx = new InitialContext(p);
- return ctx;
+public class ManagedExecutorServiceTest extends EJBTestSupport {
+
+ protected String getRemoteBeanName() {
+ return "/ManagedExecutorServiceBeanRemote";
}
private ManagedExecutorServiceRemote getBean() throws Exception {
return getBean(null, null);
}
- private ManagedExecutorServiceRemote getBean(String username, String password) throws Exception {
- InitialContext ctx = getInitialContext(username, password);
- ManagedExecutorServiceRemote bean =
- (ManagedExecutorServiceRemote)ctx.lookup("/ManagedExecutorServiceBeanRemote");
+ protected ManagedExecutorServiceRemote getBean(String username, String password) throws Exception {
+ InitialContext ctx = getInitialContext(username, password);
+ String beanName = getRemoteBeanName();
+ System.out.println("Using: " + beanName);
+ ManagedExecutorServiceRemote bean = (ManagedExecutorServiceRemote)ctx.lookup(beanName);
return bean;
}
Added: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceCmtTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceCmtTest.java?rev=650200&view=auto
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceCmtTest.java (added)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceCmtTest.java Mon Apr 21 09:45:06 2008
@@ -0,0 +1,27 @@
+/**
+ * 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.geronimo.concurrent.test;
+
+public class ManagedScheduledExecutorServiceCmtTest extends ManagedScheduledExecutorServiceTest {
+
+ protected String getRemoteBeanName() {
+ return "/ManagedScheduledExecutorServiceCmtBeanRemote";
+ }
+
+}
Propchange: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceCmtTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceTest.java?rev=650200&r1=650199&r2=650200&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceTest.java (original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceTest.java Mon Apr 21 09:45:06 2008
@@ -18,43 +18,26 @@
*/
package org.apache.geronimo.concurrent.test;
-import java.util.Properties;
-
-import javax.naming.Context;
import javax.naming.InitialContext;
import org.apache.geronimo.concurrent.test.executor.ManagedScheduledExecutorServiceRemote;
-import org.apache.geronimo.testsupport.TestSupport;
import org.testng.annotations.Test;
-public class ManagedScheduledExecutorServiceTest extends TestSupport {
-
- private InitialContext getInitialContext(String username, String password) throws Exception {
- Properties p = new Properties();
-
- p.put("java.naming.factory.initial",
- "org.apache.openejb.client.RemoteInitialContextFactory");
- p.put("java.naming.provider.url",
- "127.0.0.1:4201");
-
- if (username != null && password != null) {
- p.put(Context.SECURITY_PRINCIPAL, username);
- p.put(Context.SECURITY_CREDENTIALS, password);
- p.put("openejb.authentication.realmName", "geronimo-admin");
- }
-
- InitialContext ctx = new InitialContext(p);
- return ctx;
+public class ManagedScheduledExecutorServiceTest extends EJBTestSupport {
+
+ protected String getRemoteBeanName() {
+ return "/ManagedScheduledExecutorServiceBeanRemote";
}
private ManagedScheduledExecutorServiceRemote getBean() throws Exception {
return getBean(null, null);
}
- private ManagedScheduledExecutorServiceRemote getBean(String username, String password) throws Exception {
- InitialContext ctx = getInitialContext(username, password);
- ManagedScheduledExecutorServiceRemote bean =
- (ManagedScheduledExecutorServiceRemote)ctx.lookup("/ManagedScheduledExecutorServiceBeanRemote");
+ protected ManagedScheduledExecutorServiceRemote getBean(String username, String password) throws Exception {
+ InitialContext ctx = getInitialContext(username, password);
+ String beanName = getRemoteBeanName();
+ System.out.println("Using: " + beanName);
+ ManagedScheduledExecutorServiceRemote bean = (ManagedScheduledExecutorServiceRemote)ctx.lookup(beanName);
return bean;
}
Added: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryCmtTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryCmtTest.java?rev=650200&view=auto
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryCmtTest.java (added)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryCmtTest.java Mon Apr 21 09:45:06 2008
@@ -0,0 +1,27 @@
+/**
+ * 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.geronimo.concurrent.test;
+
+public class ManagedThreadFactoryCmtTest extends ManagedThreadFactoryTest {
+
+ protected String getRemoteBeanName() {
+ return "/ManagedThreadFactoryCmtBeanRemote";
+ }
+
+}
Propchange: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryCmtTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryTest.java?rev=650200&r1=650199&r2=650200&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryTest.java (original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb-ear/src/test/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryTest.java Mon Apr 21 09:45:06 2008
@@ -18,43 +18,26 @@
*/
package org.apache.geronimo.concurrent.test;
-import java.util.Properties;
-
-import javax.naming.Context;
import javax.naming.InitialContext;
import org.apache.geronimo.concurrent.test.thread.ManagedThreadFactoryRemote;
-import org.apache.geronimo.testsupport.TestSupport;
import org.testng.annotations.Test;
-public class ManagedThreadFactoryTest extends TestSupport {
-
- private InitialContext getInitialContext(String username, String password) throws Exception {
- Properties p = new Properties();
-
- p.put("java.naming.factory.initial",
- "org.apache.openejb.client.RemoteInitialContextFactory");
- p.put("java.naming.provider.url",
- "127.0.0.1:4201");
-
- if (username != null && password != null) {
- p.put(Context.SECURITY_PRINCIPAL, username);
- p.put(Context.SECURITY_CREDENTIALS, password);
- p.put("openejb.authentication.realmName", "geronimo-admin");
- }
-
- InitialContext ctx = new InitialContext(p);
- return ctx;
+public class ManagedThreadFactoryTest extends EJBTestSupport {
+
+ protected String getRemoteBeanName() {
+ return "/ManagedThreadFactoryBeanRemote";
}
private ManagedThreadFactoryRemote getBean() throws Exception {
return getBean(null, null);
}
- private ManagedThreadFactoryRemote getBean(String username, String password) throws Exception {
- InitialContext ctx = getInitialContext(username, password);
- ManagedThreadFactoryRemote bean =
- (ManagedThreadFactoryRemote)ctx.lookup("/ManagedThreadFactoryBeanRemote");
+ protected ManagedThreadFactoryRemote getBean(String username, String password) throws Exception {
+ InitialContext ctx = getInitialContext(username, password);
+ String beanName = getRemoteBeanName();
+ System.out.println("Using: " + beanName);
+ ManagedThreadFactoryRemote bean = (ManagedThreadFactoryRemote)ctx.lookup(beanName);
return bean;
}
Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb/src/main/resources/META-INF/ejb-jar.xml?rev=650200&r1=650199&r2=650200&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb/src/main/resources/META-INF/ejb-jar.xml (original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ejb/src/main/resources/META-INF/ejb-jar.xml Mon Apr 21 09:45:06 2008
@@ -21,6 +21,9 @@
<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<display-name>JAXWSBean</display-name>
<enterprise-beans>
+
+ <!-- Beans with bean-managed transaction -->
+
<session>
<display-name>ContextServiceBean</display-name>
<ejb-name>ContextServiceBean</ejb-name>
@@ -90,6 +93,92 @@
<ejb-class>org.apache.geronimo.concurrent.test.executor.ManagedScheduledExecutorServiceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
+
+ <env-entry>
+ <description>Welcome message</description>
+ <env-entry-name>greeting</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>Hello</env-entry-value>
+ </env-entry>
+
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/Calculator</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.apache.geronimo.concurrent.test.CalculatorLocal</local>
+ </ejb-local-ref>
+ </session>
+
+ <!-- Beans with component-managed transaction -->
+
+ <session>
+ <display-name>ContextServiceCmtBean</display-name>
+ <ejb-name>ContextServiceCmtBean</ejb-name>
+ <ejb-class>org.apache.geronimo.concurrent.test.context.ContextServiceBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Component</transaction-type>
+
+ <env-entry>
+ <description>Welcome message</description>
+ <env-entry-name>greeting</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>Hello</env-entry-value>
+ </env-entry>
+
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/Calculator</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.apache.geronimo.concurrent.test.CalculatorLocal</local>
+ </ejb-local-ref>
+ </session>
+
+ <session>
+ <display-name>ManagedThreadFactoryCmtBean</display-name>
+ <ejb-name>ManagedThreadFactoryCmtBean</ejb-name>
+ <ejb-class>org.apache.geronimo.concurrent.test.thread.ManagedThreadFactoryBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Component</transaction-type>
+
+ <env-entry>
+ <description>Welcome message</description>
+ <env-entry-name>greeting</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>Hello</env-entry-value>
+ </env-entry>
+
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/Calculator</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.apache.geronimo.concurrent.test.CalculatorLocal</local>
+ </ejb-local-ref>
+ </session>
+
+ <session>
+ <display-name>ManagedExecutorServiceCmtBean</display-name>
+ <ejb-name>ManagedExecutorServiceCmtBean</ejb-name>
+ <ejb-class>org.apache.geronimo.concurrent.test.executor.ManagedExecutorServiceBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Component</transaction-type>
+
+ <env-entry>
+ <description>Welcome message</description>
+ <env-entry-name>greeting</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>Hello</env-entry-value>
+ </env-entry>
+
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/Calculator</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.apache.geronimo.concurrent.test.CalculatorLocal</local>
+ </ejb-local-ref>
+ </session>
+
+ <session>
+ <display-name>ManagedScheduledExecutorServiceCmtBean</display-name>
+ <ejb-name>ManagedScheduledExecutorServiceCmtBean</ejb-name>
+ <ejb-class>org.apache.geronimo.concurrent.test.executor.ManagedScheduledExecutorServiceBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Component</transaction-type>
<env-entry>
<description>Welcome message</description>