[jboss-cvs] JBossAS SVN: r101522 - in projects/ejb3/trunk/testsuite/src/test: java/org/jboss/ejb3/test/bank/unit and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Feb 26 03:40:12 EST 2010
Author: jaikiran
Date: 2010-02-26 03:40:11 -0500 (Fri, 26 Feb 2010)
New Revision: 101522
Modified:
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/bank/BankBean.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/bank/unit/BankDeploymentDescriptorTestCase.java
projects/ejb3/trunk/testsuite/src/test/resources/test/bank/META-INF/ejb-jar.xml
Log:
EJBTHREE-2028 Fixed the SFSB to not use @Init (or its xml equivalent) for EJB3 view
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/bank/BankBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/bank/BankBean.java 2010-02-26 07:44:13 UTC (rev 101521)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/bank/BankBean.java 2010-02-26 08:40:11 UTC (rev 101522)
@@ -27,7 +27,6 @@
import javax.annotation.Resource;
import javax.ejb.EJBException;
-import javax.ejb.Init;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
@@ -108,17 +107,11 @@
{
}
- @Init
- public void annotatedInit()
+ public void postConstruct()
{
initialized += "YES";
}
- public void init()
- {
- initialized += "YES";
- }
-
public String isInitialized()
{
return initialized;
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/bank/unit/BankDeploymentDescriptorTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/bank/unit/BankDeploymentDescriptorTestCase.java 2010-02-26 07:44:13 UTC (rev 101521)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/bank/unit/BankDeploymentDescriptorTestCase.java 2010-02-26 08:40:11 UTC (rev 101522)
@@ -245,7 +245,7 @@
SecurityAssociation.setCredential("password".toCharArray());*/
String activated = bank.isActivated();
- assertEquals(activated, "_CREATED");
+ assertEquals("_CREATED", activated);
}
public void testCallbackListenersAndInteceptors() throws Exception
@@ -325,7 +325,7 @@
SecurityAssociation.setCredential("password".toCharArray());*/
String initialized = bank.isInitialized();
- assertEquals("YESYES", initialized);
+ assertEquals("YES", initialized);
}
public void testTeller() throws Exception
Modified: projects/ejb3/trunk/testsuite/src/test/resources/test/bank/META-INF/ejb-jar.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/bank/META-INF/ejb-jar.xml 2010-02-26 07:44:13 UTC (rev 101521)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/bank/META-INF/ejb-jar.xml 2010-02-26 08:40:11 UTC (rev 101522)
@@ -38,24 +38,16 @@
<business-remote>org.jboss.ejb3.test.bank.BankRemote</business-remote>
<ejb-class>org.jboss.ejb3.test.bank.BankBean</ejb-class>
<session-type>Stateful</session-type>
-
- <init-method>
- <create-method>
- <method-name>init</method-name>
- </create-method>
- <bean-method>
- <method-name>init</method-name>
- </bean-method>
- </init-method>
+
<remove-method>
<bean-method>
<method-name>remove</method-name>
</bean-method>
<retain-if-exception>false</retain-if-exception>
</remove-method>
-
- <transaction-type>Container</transaction-type>
+ <transaction-type>Container</transaction-type>
+
<env-entry>
<env-entry-name>org.jboss.ejb3.test.bank/id</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
@@ -72,6 +64,11 @@
<injection-target-name>customerDb</injection-target-name>
</injection-target>
</resource-ref>
+
+ <post-construct>
+ <lifecycle-callback-method>postConstruct</lifecycle-callback-method>
+ </post-construct>
+
</session>
<session>
<ejb-name>Bank21</ejb-name>
More information about the jboss-cvs-commits
mailing list