You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2014/07/07 21:07:53 UTC
svn commit: r1608563 [33/38] - in /tomee/tomee/branches/tomee-1.7.x/itests:
failover-ejb/src/main/java/org/apache/openejb/itest/failover/ejb/
failover/src/main/java/org/apache/openejb/itest/failover/
failover/src/main/java/org/apache/openejb/server/con...
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulAllowedOperationsTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulAllowedOperationsTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulAllowedOperationsTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulAllowedOperationsTests.java Mon Jul 7 19:07:41 2014
@@ -93,7 +93,7 @@ public class StatefulAllowedOperationsTe
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
ejbObject = ejbHome.createObject("Fourth Bean");
ejbHandle = ejbObject.getHandle();
@@ -128,16 +128,16 @@ public class StatefulAllowedOperationsTe
*/
public void test01_setSessionContext(){
try{
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("setSessionContext");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("setSessionContext");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
@@ -160,20 +160,20 @@ public class StatefulAllowedOperationsTe
*/
public void test02_ejbCreate(){
try{
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.Context_getCallerPrincipal );
policy.allow( policy.Context_isCallerInRole );
policy.allow( policy.Context_getEJBObject );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("ejbCreate");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("ejbCreate");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -196,20 +196,20 @@ public class StatefulAllowedOperationsTe
public void test03_ejbRemove(){
try{
/* TO DO: This test needs unique functionality to work */
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.Context_getCallerPrincipal );
policy.allow( policy.Context_isCallerInRole );
policy.allow( policy.Context_getEJBObject );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("ejbRemove");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("ejbRemove");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -232,20 +232,20 @@ public class StatefulAllowedOperationsTe
public void test04_ejbActivate(){
try{
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.Context_getCallerPrincipal );
policy.allow( policy.Context_isCallerInRole );
policy.allow( policy.Context_getEJBObject );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("ejbActivate");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("ejbActivate");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -268,20 +268,20 @@ public class StatefulAllowedOperationsTe
public void test05_ejbPassivate(){
try{
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.Context_getCallerPrincipal );
policy.allow( policy.Context_isCallerInRole );
policy.allow( policy.Context_getEJBObject );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("ejbPassivate");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("ejbPassivate");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -306,7 +306,7 @@ public class StatefulAllowedOperationsTe
*/
public void test06_businessMethod(){
try{
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.Context_getCallerPrincipal );
policy.allow( policy.Context_getRollbackOnly );
@@ -315,13 +315,13 @@ public class StatefulAllowedOperationsTe
policy.allow( policy.Context_getEJBObject );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("businessMethod");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("businessMethod");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
@@ -347,7 +347,7 @@ public class StatefulAllowedOperationsTe
public void test07_afterBegin(){
try{
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.Context_getCallerPrincipal );
policy.allow( policy.Context_getRollbackOnly );
@@ -356,13 +356,13 @@ public class StatefulAllowedOperationsTe
policy.allow( policy.Context_getEJBObject );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("afterBegin");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("afterBegin");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -388,7 +388,7 @@ public class StatefulAllowedOperationsTe
public void test08_beforeCompletion(){
try{
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.Context_getCallerPrincipal );
policy.allow( policy.Context_getRollbackOnly );
@@ -397,13 +397,13 @@ public class StatefulAllowedOperationsTe
policy.allow( policy.Context_getEJBObject );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("beforeCompletion");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("beforeCompletion");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -426,20 +426,20 @@ public class StatefulAllowedOperationsTe
public void test09_afterCompletion(){
try{
- OperationsPolicy policy = new OperationsPolicy();
+ final OperationsPolicy policy = new OperationsPolicy();
policy.allow( policy.Context_getEJBHome );
policy.allow( policy.Context_getCallerPrincipal );
policy.allow( policy.Context_isCallerInRole );
policy.allow( policy.Context_getEJBObject );
policy.allow( policy.JNDI_access_to_java_comp_env );
- Object expected = policy;
- Object actual = ejbObject.getAllowedOperationsReport("afterCompletion");
+ final Object expected = policy;
+ final Object actual = ejbObject.getAllowedOperationsReport("afterCompletion");
assertNotNull("The OperationsPolicy is null", actual );
assertEquals( expected, actual );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulBeanTxTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulBeanTxTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulBeanTxTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulBeanTxTests.java Mon Jul 7 19:07:41 2014
@@ -57,14 +57,14 @@ public class StatefulBeanTxTests extends
*/
protected void setUp() throws Exception {
- Properties properties = TestManager.getServer().getContextEnvironment();
+ final Properties properties = TestManager.getServer().getContextEnvironment();
//properties.put(Context.SECURITY_PRINCIPAL, "STATEFUL_test00_CLIENT");
//properties.put(Context.SECURITY_CREDENTIALS, "STATEFUL_test00_CLIENT");
initialContext = new InitialContext(properties);
/*[1] Get bean */
- Object obj = initialContext.lookup(jndiEJBHomeEntry);
+ final Object obj = initialContext.lookup(jndiEJBHomeEntry);
ejbHome = (BeanTxStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BeanTxStatefulHome.class);
ejbObject = ejbHome.create("Transaction Bean");
@@ -101,9 +101,9 @@ public class StatefulBeanTxTests extends
*/
public void test01_EJBContext_getUserTransaction(){
try{
- Transaction t = ejbObject.getUserTransaction();
+ final Transaction t = ejbObject.getUserTransaction();
assertNotNull("UserTransaction is null.", t);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -128,9 +128,9 @@ public class StatefulBeanTxTests extends
*/
public void test02_java_comp_UserTransaction(){
try{
- Transaction t = ejbObject.jndiUserTransaction();
+ final Transaction t = ejbObject.jndiUserTransaction();
assertNotNull("UserTransaction is null. Could not retreive a UserTransaction from the bean's JNDI namespace.", t);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Could not retreive a UserTransaction from the bean's JNDI namespace. Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -150,7 +150,7 @@ public class StatefulBeanTxTests extends
public void TODO_test03_EJBContext_setRollbackOnly(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -170,7 +170,7 @@ public class StatefulBeanTxTests extends
public void TODO_test04_EJBContext_getRollbackOnly(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -180,7 +180,7 @@ public class StatefulBeanTxTests extends
*/
public void test05_singleTransactionCommit(){
try{
- Account expected = new Account("123-45-6789","Joe","Cool",40000);
+ final Account expected = new Account("123-45-6789","Joe","Cool",40000);
Account actual = new Account();
ejbObject.openAccount(expected, new Boolean(false));
@@ -188,9 +188,9 @@ public class StatefulBeanTxTests extends
assertNotNull( "The transaction was not commited. The record is null", actual );
assertEquals( "The transaction was not commited cleanly.", expected, actual );
- } catch (RollbackException re){
+ } catch (final RollbackException re){
fail("Transaction was rolledback. Received Exception "+re.getClass()+ " : "+re.getMessage());
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -201,17 +201,17 @@ public class StatefulBeanTxTests extends
* sent to the client, the server blocks.
*/
public void BUG_test06_singleTransactionRollback(){
- Account expected = new Account("234-56-7890","Charlie","Brown", 20000);
- Account actual = new Account();
+ final Account expected = new Account("234-56-7890","Charlie","Brown", 20000);
+ final Account actual = new Account();
// Try and add the account in a transaction. This should fail and
// throw a RollbackException
try{
ejbObject.openAccount(expected, new Boolean(true));
fail( "A javax.transaction.RollbackException should have been thrown." );
- } catch (RollbackException re){
+ } catch (final RollbackException re){
// Good.
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
@@ -235,7 +235,7 @@ public class StatefulBeanTxTests extends
public void TODO_test07_serialTransactions(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -253,7 +253,7 @@ public class StatefulBeanTxTests extends
public void TODO_test08_nestedTransactions(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -274,7 +274,7 @@ public class StatefulBeanTxTests extends
public void TODO_test09_methodSpanningTransactions(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -323,7 +323,7 @@ public class StatefulBeanTxTests extends
public void TODO_test10_scenario1_NoneNone(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -372,7 +372,7 @@ public class StatefulBeanTxTests extends
public void TODO_test11_scenario2_T1None(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -420,7 +420,7 @@ public class StatefulBeanTxTests extends
public void TODO_test12_scenario3_NoneT2(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -470,7 +470,7 @@ public class StatefulBeanTxTests extends
public void TODO_test13_scenario4_T1T2(){
try{
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulContextLookupTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulContextLookupTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulContextLookupTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulContextLookupTests.java Mon Jul 7 19:07:41 2014
@@ -34,7 +34,7 @@ public class StatefulContextLookupTests
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/ContextLookupStatefulBean");
+ final Object obj = initialContext.lookup("client/tests/stateful/ContextLookupStatefulBean");
ejbHome = (EncStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, EncStatefulHome.class);
ejbObject = ejbHome.create("Enc Bean");
@@ -50,7 +50,7 @@ public class StatefulContextLookupTests
try {
/*[1] Drop database table */
TestManager.getDatabase().dropEntityTable();
- } catch (Exception e){
+ } catch (final Exception e){
throw e;
} finally {
super.tearDown();
@@ -60,9 +60,9 @@ public class StatefulContextLookupTests
public void test01_lookupStringEntry() {
try{
ejbObject.lookupStringEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -70,9 +70,9 @@ public class StatefulContextLookupTests
public void test02_lookupDoubleEntry() {
try{
ejbObject.lookupDoubleEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -80,9 +80,9 @@ public class StatefulContextLookupTests
public void test03_lookupLongEntry() {
try{
ejbObject.lookupLongEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -90,9 +90,9 @@ public class StatefulContextLookupTests
public void test04_lookupFloatEntry() {
try{
ejbObject.lookupFloatEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -100,9 +100,9 @@ public class StatefulContextLookupTests
public void test05_lookupIntegerEntry() {
try{
ejbObject.lookupIntegerEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -110,9 +110,9 @@ public class StatefulContextLookupTests
public void test06_lookupShortEntry() {
try{
ejbObject.lookupShortEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -120,9 +120,9 @@ public class StatefulContextLookupTests
public void test07_lookupBooleanEntry() {
try{
ejbObject.lookupBooleanEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -130,9 +130,9 @@ public class StatefulContextLookupTests
public void test08_lookupByteEntry() {
try{
ejbObject.lookupByteEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -140,9 +140,9 @@ public class StatefulContextLookupTests
public void test09_lookupCharacterEntry() {
try{
ejbObject.lookupCharacterEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -150,9 +150,9 @@ public class StatefulContextLookupTests
public void test10_lookupEntityBean() {
try{
ejbObject.lookupEntityBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -160,9 +160,9 @@ public class StatefulContextLookupTests
public void test11_lookupStatefulBean() {
try{
ejbObject.lookupStatefulBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -170,9 +170,9 @@ public class StatefulContextLookupTests
public void test12_lookupStatelessBean() {
try{
ejbObject.lookupStatelessBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -180,9 +180,9 @@ public class StatefulContextLookupTests
public void test13_lookupResource() {
try{
ejbObject.lookupResource();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -190,9 +190,9 @@ public class StatefulContextLookupTests
public void test14_lookupPersistenceUnit() {
try{
ejbObject.lookupPersistenceUnit();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -200,9 +200,9 @@ public class StatefulContextLookupTests
public void test15_lookupPersistenceContext() {
try{
ejbObject.lookupPersistenceContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -210,9 +210,9 @@ public class StatefulContextLookupTests
public void test18_lookupSessionContext() {
try{
ejbObject.lookupSessionContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -220,9 +220,9 @@ public class StatefulContextLookupTests
public void test23_lookupJMSConnectionFactory() {
try{
ejbObject.lookupJMSConnectionFactory();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbHomeTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbHomeTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbHomeTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbHomeTests.java Mon Jul 7 19:07:41 2014
@@ -31,7 +31,7 @@ public class StatefulEjbHomeTests extend
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
}
@@ -40,9 +40,9 @@ public class StatefulEjbHomeTests extend
//
public void test01_getEJBMetaData(){
try{
- EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
+ final EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
assertNotNull( "The EJBMetaData is null", ejbMetaData );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -51,7 +51,7 @@ public class StatefulEjbHomeTests extend
try{
ejbHomeHandle = ejbHome.getHomeHandle();
assertNotNull( "The HomeHandle is null", ejbHomeHandle );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -88,10 +88,10 @@ public class StatefulEjbHomeTests extend
public void test03_removeByPrimaryKey(){
try{
ejbHome.remove("primaryKey");
- } catch (RemoveException e){
+ } catch (final RemoveException e){
assertTrue( true );
return;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception " + e.getClass() + " instead of javax.ejb.RemoveException : " + e.getMessage());
}
assertTrue("javax.ejb.RemoveException should have been thrown", false );
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbMetaDataTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbMetaDataTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbMetaDataTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbMetaDataTests.java Mon Jul 7 19:07:41 2014
@@ -30,7 +30,7 @@ public class StatefulEjbMetaDataTests ex
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
ejbMetaData = ejbHome.getEJBMetaData();
}
@@ -40,19 +40,19 @@ public class StatefulEjbMetaDataTests ex
//
public void test01_getEJBHome(){
try{
- EJBHome home = ejbMetaData.getEJBHome();
+ final EJBHome home = ejbMetaData.getEJBHome();
assertNotNull( "The EJBHome is null", home );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test02_getHomeInterfaceClass(){
try{
- Class clazz = ejbMetaData.getHomeInterfaceClass();
+ final Class clazz = ejbMetaData.getHomeInterfaceClass();
assertNotNull( "The Home Interface class is null", clazz );
assertEquals(clazz , BasicStatefulHome.class);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -72,12 +72,12 @@ public class StatefulEjbMetaDataTests ex
*/
public void test03_getPrimaryKeyClass(){
try{
- Class clazz = ejbMetaData.getPrimaryKeyClass();
+ final Class clazz = ejbMetaData.getPrimaryKeyClass();
assertNull("Should not return a primary key. Method should throw an java.lang.RuntimeException", clazz );
- } catch (UnsupportedOperationException e){
+ } catch (final UnsupportedOperationException e){
assertTrue( true );
return;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
assertTrue( "Method should throw an java.lang.RuntimeException", false );
@@ -85,10 +85,10 @@ public class StatefulEjbMetaDataTests ex
public void test04_getRemoteInterfaceClass(){
try{
- Class clazz = ejbMetaData.getRemoteInterfaceClass();
+ final Class clazz = ejbMetaData.getRemoteInterfaceClass();
assertNotNull( "The Remote Interface class is null", clazz );
assertEquals(clazz , BasicStatefulObject.class);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -96,7 +96,7 @@ public class StatefulEjbMetaDataTests ex
public void test05_isSession(){
try{
assertTrue( "EJBMetaData says this is not a session bean", ejbMetaData.isSession() );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -104,7 +104,7 @@ public class StatefulEjbMetaDataTests ex
public void test06_isStatelessSession(){
try{
assertTrue( "EJBMetaData says this is a stateless session bean", !ejbMetaData.isStatelessSession() );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbObjectTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbObjectTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbObjectTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulEjbObjectTests.java Mon Jul 7 19:07:41 2014
@@ -32,7 +32,7 @@ public class StatefulEjbObjectTests exte
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
ejbObject = ejbHome.createObject("Second Bean");
}
@@ -49,7 +49,7 @@ public class StatefulEjbObjectTests exte
try{
ejbHandle = ejbObject.getHandle();
assertNotNull( "The Handle is null", ejbHandle );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -57,16 +57,16 @@ public class StatefulEjbObjectTests exte
public void test02_isIdentical(){
try{
assertTrue( "The EJBObjects are not equal", ejbObject.isIdentical(ejbObject) );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test03_getEjbHome(){
try{
- EJBHome home = ejbObject.getEJBHome();
+ final EJBHome home = ejbObject.getEJBHome();
assertNotNull( "The EJBHome is null", home );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -86,11 +86,11 @@ public class StatefulEjbObjectTests exte
*/
public void test04_getPrimaryKey(){
try{
- Object key = ejbObject.getPrimaryKey();
- } catch (java.rmi.RemoteException e){
+ final Object key = ejbObject.getPrimaryKey();
+ } catch (final java.rmi.RemoteException e){
assertTrue(true);
return;
- } catch (Exception e){
+ } catch (final Exception e){
fail("A RuntimeException should have been thrown. Received Exception "+e.getClass()+ " : "+e.getMessage());
}
fail("A RuntimeException should have been thrown.");
@@ -103,7 +103,7 @@ public class StatefulEjbObjectTests exte
String str = null;
try {
str = ejbObject.remove("Hello");
- } catch (RemoteException e) {
+ } catch (final RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
@@ -116,11 +116,11 @@ public class StatefulEjbObjectTests exte
try{
ejbObject.businessMethod("Should throw an exception");
assertTrue( "Calling business method after removing the EJBObject does not throw an exception", false );
- } catch (Exception e){
+ } catch (final Exception e){
assertTrue( true );
return;
}
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulFieldInjectionTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulFieldInjectionTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulFieldInjectionTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulFieldInjectionTests.java Mon Jul 7 19:07:41 2014
@@ -34,7 +34,7 @@ public class StatefulFieldInjectionTests
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/FieldInjectionStatefulBean");
+ final Object obj = initialContext.lookup("client/tests/stateful/FieldInjectionStatefulBean");
ejbHome = (EncStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, EncStatefulHome.class);
ejbObject = ejbHome.create("Enc Bean");
@@ -50,7 +50,7 @@ public class StatefulFieldInjectionTests
try {
/*[1] Drop database table */
TestManager.getDatabase().dropEntityTable();
- } catch (Exception e){
+ } catch (final Exception e){
throw e;
} finally {
super.tearDown();
@@ -60,9 +60,9 @@ public class StatefulFieldInjectionTests
public void test01_lookupStringEntry() {
try{
ejbObject.lookupStringEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -70,9 +70,9 @@ public class StatefulFieldInjectionTests
public void test02_lookupDoubleEntry() {
try{
ejbObject.lookupDoubleEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -80,9 +80,9 @@ public class StatefulFieldInjectionTests
public void test03_lookupLongEntry() {
try{
ejbObject.lookupLongEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -90,9 +90,9 @@ public class StatefulFieldInjectionTests
public void test04_lookupFloatEntry() {
try{
ejbObject.lookupFloatEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -100,9 +100,9 @@ public class StatefulFieldInjectionTests
public void test05_lookupIntegerEntry() {
try{
ejbObject.lookupIntegerEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -110,9 +110,9 @@ public class StatefulFieldInjectionTests
public void test06_lookupShortEntry() {
try{
ejbObject.lookupShortEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -120,9 +120,9 @@ public class StatefulFieldInjectionTests
public void test07_lookupBooleanEntry() {
try{
ejbObject.lookupBooleanEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -130,9 +130,9 @@ public class StatefulFieldInjectionTests
public void test08_lookupByteEntry() {
try{
ejbObject.lookupByteEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -140,9 +140,9 @@ public class StatefulFieldInjectionTests
public void test09_lookupCharacterEntry() {
try{
ejbObject.lookupCharacterEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -150,9 +150,9 @@ public class StatefulFieldInjectionTests
public void test10_lookupEntityBean() {
try{
ejbObject.lookupEntityBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -160,9 +160,9 @@ public class StatefulFieldInjectionTests
public void test11_lookupStatefulBean() {
try{
ejbObject.lookupStatefulBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -170,9 +170,9 @@ public class StatefulFieldInjectionTests
public void test12_lookupStatelessBean() {
try{
ejbObject.lookupStatelessBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -180,9 +180,9 @@ public class StatefulFieldInjectionTests
public void test13_lookupResource() {
try{
ejbObject.lookupResource();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -190,9 +190,9 @@ public class StatefulFieldInjectionTests
public void test14_lookupPersistenceUnit() {
try{
ejbObject.lookupPersistenceUnit();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -200,9 +200,9 @@ public class StatefulFieldInjectionTests
public void test15_lookupPersistenceContext() {
try{
ejbObject.lookupPersistenceContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -210,9 +210,9 @@ public class StatefulFieldInjectionTests
public void test18_lookupSessionContext() {
try{
ejbObject.lookupSessionContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -220,9 +220,9 @@ public class StatefulFieldInjectionTests
public void test19_lookupStatelessBusinessLocal() {
try{
ejbObject.lookupStatelessBusinessLocal();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -230,9 +230,9 @@ public class StatefulFieldInjectionTests
public void test20_lookupStatelessBusinessRemote() {
try{
ejbObject.lookupStatelessBusinessRemote();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -240,9 +240,9 @@ public class StatefulFieldInjectionTests
public void test21_lookupStatefulBusinessLocal() {
try{
ejbObject.lookupStatefulBusinessLocal();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -250,9 +250,9 @@ public class StatefulFieldInjectionTests
public void test22_lookupStatefulBusinessRemote() {
try{
ejbObject.lookupStatefulBusinessRemote();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -260,9 +260,9 @@ public class StatefulFieldInjectionTests
public void test23_lookupJMSConnectionFactory() {
try{
ejbObject.lookupJMSConnectionFactory();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -270,9 +270,9 @@ public class StatefulFieldInjectionTests
public void test24_lookupStatefulBusinessLocalBean() {
try{
ejbObject.lookupStatefulBusinessLocalBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -280,9 +280,9 @@ public class StatefulFieldInjectionTests
public void test25_lookupStatelessBusinessLocalBesn() {
try{
ejbObject.lookupStatelessBusinessLocalBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHandleTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHandleTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHandleTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHandleTests.java Mon Jul 7 19:07:41 2014
@@ -30,7 +30,7 @@ public class StatefulHandleTests extends
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
ejbObject = ejbHome.createObject("Fourth Bean");
ejbHandle = ejbObject.getHandle();
@@ -42,11 +42,11 @@ public class StatefulHandleTests extends
public void test01_getEJBObject(){
try{
- EJBObject object = ejbHandle.getEJBObject();
+ final EJBObject object = ejbHandle.getEJBObject();
assertNotNull( "The EJBObject is null", object );
// Wait until isIdentical is working.
//assertTrue("EJBObjects are not identical", object.isIdentical(ejbObject));
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -61,11 +61,11 @@ public class StatefulHandleTests extends
try{
ejbObject.businessMethod("Should throw an exception");
assertTrue( "Calling business method after removing the EJBObject does not throw an exception", false );
- } catch (Exception e){
+ } catch (final Exception e){
assertTrue( true );
return;
}
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHomeHandleTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHomeHandleTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHomeHandleTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHomeHandleTests.java Mon Jul 7 19:07:41 2014
@@ -30,7 +30,7 @@ public class StatefulHomeHandleTests ext
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
ejbHomeHandle = ejbHome.getHomeHandle();
}
@@ -40,9 +40,9 @@ public class StatefulHomeHandleTests ext
//
public void test01_getEJBHome(){
try{
- EJBHome home = ejbHomeHandle.getEJBHome();
+ final EJBHome home = ejbHomeHandle.getEJBHome();
assertNotNull( "The EJBHome is null", home );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHomeIntfcTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHomeIntfcTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulHomeIntfcTests.java Mon Jul 7 19:07:41 2014
@@ -29,7 +29,7 @@ public class StatefulHomeIntfcTests exte
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
}
@@ -40,7 +40,7 @@ public class StatefulHomeIntfcTests exte
try{
ejbObject = ejbHome.createObject("First Bean");
assertNotNull("The EJBObject is null", ejbObject);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptorTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptorTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptorTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptorTests.java Mon Jul 7 19:07:41 2014
@@ -35,7 +35,7 @@ public class StatefulInterceptorTests ex
protected void setUp() throws Exception {
super.setUp();
- Object obj = initialContext.lookup("BasicStatefulInterceptedBusinessRemote");
+ final Object obj = initialContext.lookup("BasicStatefulInterceptedBusinessRemote");
assertNotNull("The object is null", obj);
remoteInterceptor = (BasicStatefulInterceptedRemote) javax.rmi.PortableRemoteObject.narrow(obj,
BasicStatefulInterceptedRemote.class);
@@ -54,17 +54,17 @@ public class StatefulInterceptorTests ex
* Invokes a business method which is to be intercepted by class, in-bean and at method level.
*/
public void test01_interceptorChaining() {
- String reverseMe = "Intercept";
- String reversedString = remoteInterceptor.reverse(reverseMe);
+ final String reverseMe = "Intercept";
+ final String reversedString = remoteInterceptor.reverse(reverseMe);
// verifying InvocationContext.procced()
assertEquals("tpecretnI", reversedString);
- Map contextData = remoteInterceptor.getContextData();
+ final Map contextData = remoteInterceptor.getContextData();
// verifying that inBeanInterceptor indeed intercepted this method. This cannot be excluded at all.
assertNotNull(contextData.containsKey("reverse"));
- Map innerMap = (Map) contextData.get("reverse");
- ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
+ final Map innerMap = (Map) contextData.get("reverse");
+ final ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
// verifying interceptor chaining order
assertEquals("superClassInterceptor", interceptorsList.get(0)); //derived from class extension
assertEquals("classInterceptor", interceptorsList.get(1)); //specified by @
@@ -80,17 +80,17 @@ public class StatefulInterceptorTests ex
* params in a map that is returned by the <code>getContextData</code>
*/
public void test02_methodProfile() {
- String reverseMe = "Intercept";
- String reversedString = remoteInterceptor.reverse(reverseMe);
+ final String reverseMe = "Intercept";
+ final String reversedString = remoteInterceptor.reverse(reverseMe);
// verifying InvocationContext.procced()
assertEquals("tpecretnI", reversedString);
- Map contextData = remoteInterceptor.getContextData();
+ final Map contextData = remoteInterceptor.getContextData();
// verifying InvocationContext.getMethod().getName()
assertTrue(contextData.containsKey("reverse"));
- Map innerMap = (Map) contextData.get("reverse");
- Object[] params = (Object[]) innerMap.get("PARAMETERS");
+ final Map innerMap = (Map) contextData.get("reverse");
+ final Object[] params = (Object[]) innerMap.get("PARAMETERS");
// verifying that the parameters array was received from contextData and stored.
assertNotNull("value of PARAMETERS key is null", params);
// verifying InvocationContext.getParameters()
@@ -104,12 +104,12 @@ public class StatefulInterceptorTests ex
* <code>getContextData()</code> has been annotated with <code>@ExcludesClassInterceptors</code>
*/
public void test03_excludeClassInterceptors() {
- Map contextData = remoteInterceptor.getContextData();
+ final Map contextData = remoteInterceptor.getContextData();
// verifying that inBeanInterceptor indeed intercepted this method. This cannot be excluded at all.
assertNotNull(contextData.containsKey("getContextData"));
- Map innerMap = (Map) contextData.get("getContextData");
- ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
+ final Map innerMap = (Map) contextData.get("getContextData");
+ final ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
// verifying @ExcludeClassInterceptors annotated method was not intercepted by class interceptors
assertFalse("getContextData() should not have been intercepted by superClassInterceptor()", interceptorsList.contains("superClassInterceptor"));
assertFalse("getContextData() should not have been intercepted by classInterceptor()", interceptorsList.contains("classInterceptor"));
@@ -122,16 +122,16 @@ public class StatefulInterceptorTests ex
* <code>getContextData()</code> has been annotated with <code>@ExcludesClassInterceptors</code>
*/
public void test04_excludeClassInterceptors_02() {
- String catString = remoteInterceptor.concat("Inter", "cept");
+ final String catString = remoteInterceptor.concat("Inter", "cept");
// verifying InvocationContext.procced()
assertEquals("Intercept", catString);
- Map contextData = remoteInterceptor.getContextData();
+ final Map contextData = remoteInterceptor.getContextData();
// verifying that inBeanInterceptor indeed intercepted this method. This cannot be excluded at all.
assertNotNull(contextData.containsKey("concat"));
- Map innerMap = (Map) contextData.get("concat");
- ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
+ final Map innerMap = (Map) contextData.get("concat");
+ final ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
// verifying @ExcludeClassInterceptors annotated method was not intercepted
assertFalse("concat() should not have been intercepted by superClassInterceptor()", interceptorsList.contains("superClassInterceptor"));
assertFalse("concat() should not have been intercepted by classInterceptor()", interceptorsList.contains("classInterceptor"));
@@ -146,13 +146,13 @@ public class StatefulInterceptorTests ex
public void test05_PreDestroy() {
try {
tearDown();
- Map contextData = remoteInterceptor.getContextData();
- Map innerMap = (Map) contextData.get("BasicStatefulInterceptedBean");
+ final Map contextData = remoteInterceptor.getContextData();
+ final Map innerMap = (Map) contextData.get("BasicStatefulInterceptedBean");
assertNotNull("InnerMap is null", innerMap);
- ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
+ final ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
// verifying interceptor chaining order
assertEquals("superClassInterceptorPreDestroy", interceptorsList.get(0));
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulJndiEncTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulJndiEncTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulJndiEncTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulJndiEncTests.java Mon Jul 7 19:07:41 2014
@@ -34,7 +34,7 @@ public class StatefulJndiEncTests extend
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/stateful/EncBean");
+ final Object obj = initialContext.lookup("client/tests/stateful/EncBean");
ejbHome = (EncStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, EncStatefulHome.class);
ejbObject = ejbHome.create("Enc Bean");
@@ -50,7 +50,7 @@ public class StatefulJndiEncTests extend
try {
/*[1] Drop database table */
TestManager.getDatabase().dropEntityTable();
- } catch (Exception e){
+ } catch (final Exception e){
throw e;
} finally {
super.tearDown();
@@ -60,9 +60,9 @@ public class StatefulJndiEncTests extend
public void test01_lookupStringEntry() {
try{
ejbObject.lookupStringEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -70,9 +70,9 @@ public class StatefulJndiEncTests extend
public void test02_lookupDoubleEntry() {
try{
ejbObject.lookupDoubleEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -80,9 +80,9 @@ public class StatefulJndiEncTests extend
public void test03_lookupLongEntry() {
try{
ejbObject.lookupLongEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -90,9 +90,9 @@ public class StatefulJndiEncTests extend
public void test04_lookupFloatEntry() {
try{
ejbObject.lookupFloatEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -100,9 +100,9 @@ public class StatefulJndiEncTests extend
public void test05_lookupIntegerEntry() {
try{
ejbObject.lookupIntegerEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -110,9 +110,9 @@ public class StatefulJndiEncTests extend
public void test06_lookupShortEntry() {
try{
ejbObject.lookupShortEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -120,9 +120,9 @@ public class StatefulJndiEncTests extend
public void test07_lookupBooleanEntry() {
try{
ejbObject.lookupBooleanEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -130,9 +130,9 @@ public class StatefulJndiEncTests extend
public void test08_lookupByteEntry() {
try{
ejbObject.lookupByteEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -140,9 +140,9 @@ public class StatefulJndiEncTests extend
public void test09_lookupCharacterEntry() {
try{
ejbObject.lookupCharacterEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -150,9 +150,9 @@ public class StatefulJndiEncTests extend
public void test10_lookupEntityBean() {
try{
ejbObject.lookupEntityBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -160,9 +160,9 @@ public class StatefulJndiEncTests extend
public void test11_lookupStatefulBean() {
try{
ejbObject.lookupStatefulBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -170,9 +170,9 @@ public class StatefulJndiEncTests extend
public void test12_lookupStatelessBean() {
try{
ejbObject.lookupStatelessBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -180,9 +180,9 @@ public class StatefulJndiEncTests extend
public void test13_lookupResource() {
try{
ejbObject.lookupResource();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -190,9 +190,9 @@ public class StatefulJndiEncTests extend
public void test14_lookupPersistenceUnit() {
try{
ejbObject.lookupPersistenceUnit();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -200,9 +200,9 @@ public class StatefulJndiEncTests extend
public void test15_lookupPersistenceContext() {
try{
ejbObject.lookupPersistenceContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -210,9 +210,9 @@ public class StatefulJndiEncTests extend
public void test18_lookupSessionContext() {
try{
ejbObject.lookupSessionContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -220,9 +220,9 @@ public class StatefulJndiEncTests extend
public void test19_lookupStatelessBusinessLocal() {
try{
ejbObject.lookupStatelessBusinessLocal();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -230,9 +230,9 @@ public class StatefulJndiEncTests extend
public void test20_lookupStatelessBusinessRemote() {
try{
ejbObject.lookupStatelessBusinessRemote();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -240,9 +240,9 @@ public class StatefulJndiEncTests extend
public void test21_lookupStatefulBusinessLocal() {
try{
ejbObject.lookupStatefulBusinessLocal();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -250,9 +250,9 @@ public class StatefulJndiEncTests extend
public void test22_lookupStatefulBusinessRemote() {
try{
ejbObject.lookupStatefulBusinessRemote();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -260,9 +260,9 @@ public class StatefulJndiEncTests extend
public void test23_lookupJMSConnectionFactory() {
try{
ejbObject.lookupJMSConnectionFactory();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -270,9 +270,9 @@ public class StatefulJndiEncTests extend
public void test24_lookupStatelessBusinessLocalBean() {
try{
ejbObject.lookupStatelessBusinessLocalBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -280,9 +280,9 @@ public class StatefulJndiEncTests extend
public void test25_lookupStatefulBusinessLocalBean() {
try{
ejbObject.lookupStatefulBusinessLocalBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulJndiTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulJndiTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulJndiTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulJndiTests.java Mon Jul 7 19:07:41 2014
@@ -29,10 +29,10 @@ public class StatefulJndiTests extends B
public void test01_Jndi_lookupHome(){
try{
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulHome");
ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
assertNotNull("The EJBHome is null", ejbHome);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalBusinessIntfcTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalBusinessIntfcTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalBusinessIntfcTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalBusinessIntfcTests.java Mon Jul 7 19:07:41 2014
@@ -31,7 +31,7 @@ public class StatefulLocalBusinessIntfcT
// Test remote interface methods
//
public void test00_lookupBusinessInterface() throws Exception {
- Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulPojoHomeBusinessLocal");
+ final Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulPojoHomeBusinessLocal");
assertNotNull(obj);
assertTrue("instance of BasicStatefulBusinessLocal", obj instanceof BasicStatefulBusinessLocal);
businessLocal = (BasicStatefulBusinessLocal) obj;
@@ -39,18 +39,18 @@ public class StatefulLocalBusinessIntfcT
public void test01_businessMethod(){
try{
- String expected = "Success";
- String actual = businessLocal.businessMethod("sseccuS");
+ final String expected = "Success";
+ final String actual = businessLocal.businessMethod("sseccuS");
assertEquals(expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
try{
- Integer expected = new Integer(42);
- Object actual = businessLocal.echo(expected);
+ final Integer expected = new Integer(42);
+ final Object actual = businessLocal.echo(expected);
assertSame("pass by reference", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -62,10 +62,10 @@ public class StatefulLocalBusinessIntfcT
public void test02_throwApplicationException(){
try{
businessLocal.throwApplicationException();
- } catch (org.apache.openejb.test.ApplicationException e){
+ } catch (final org.apache.openejb.test.ApplicationException e){
//Good. This is the correct behaviour
return;
- } catch (Throwable e){
+ } catch (final Throwable e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
fail("An ApplicationException should have been thrown.");
@@ -77,10 +77,10 @@ public class StatefulLocalBusinessIntfcT
*/
public void test03_invokeAfterApplicationException(){
try{
- String expected = "Success";
- String actual = businessLocal.businessMethod("sseccuS");
+ final String expected = "Success";
+ final String actual = businessLocal.businessMethod("sseccuS");
assertEquals(expected, actual);
- } catch (Throwable e){
+ } catch (final Throwable e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -89,13 +89,13 @@ public class StatefulLocalBusinessIntfcT
public void _test04_throwSystemException(){
try{
businessLocal.throwSystemException_NullPointer();
- } catch (Exception e){
+ } catch (final Exception e){
//Good, so far.
- Throwable n = e.getCause();
+ final Throwable n = e.getCause();
assertNotNull("Nested exception should not be is null", n );
assertTrue("Nested exception should be an instance of NullPointerException, but exception is "+n.getClass().getName(), (n instanceof NullPointerException));
return;
- } catch (Throwable e){
+ } catch (final Throwable e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
fail("A NullPointerException should have been thrown.");
@@ -123,7 +123,7 @@ public class StatefulLocalBusinessIntfcT
//=================================
public void test06_testRemove(){
- Object obj =businessLocal.remove();
+ final Object obj =businessLocal.remove();
assertNotNull(obj);
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java Mon Jul 7 19:07:41 2014
@@ -26,12 +26,12 @@ import org.apache.openejb.test.FilteredT
*/
public class StatefulLocalTestSuite extends junit.framework.TestCase {
- public StatefulLocalTestSuite(String name) {
+ public StatefulLocalTestSuite(final String name) {
super(name);
}
public static Test suite() {
- TestSuite suite = new FilteredTestSuite();
+ final TestSuite suite = new FilteredTestSuite();
suite.addTest(new StatefulJndiTests());
suite.addTest(new StatefulPojoLocalJndiTests());
suite.addTest(new StatefulHomeIntfcTests());
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPersistenceContextTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPersistenceContextTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPersistenceContextTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPersistenceContextTests.java Mon Jul 7 19:07:41 2014
@@ -45,7 +45,7 @@ public class StatefulPersistenceContextT
try {
/*[1] Drop database table */
TestManager.getDatabase().dropEntityTable();
- } catch (Exception e){
+ } catch (final Exception e){
throw e;
} finally {
super.tearDown();
@@ -55,9 +55,9 @@ public class StatefulPersistenceContextT
public void test01_persistenceContext() {
try{
ejbObject.testPersistenceContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -65,9 +65,9 @@ public class StatefulPersistenceContextT
public void test02_extendedPersistenceContext() {
try{
ejbObject.testExtendedPersistenceContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -75,9 +75,9 @@ public class StatefulPersistenceContextT
public void test03_propagatedPersistenceContext() {
try{
ejbObject.testPropagatedPersistenceContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -85,9 +85,9 @@ public class StatefulPersistenceContextT
public void test04_propogation() {
try{
ejbObject.testPropgation();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}