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 [30/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/singleton/SingletonContainerTxTests.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/singleton/SingletonContainerTxTests.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/singleton/SingletonContainerTxTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonContainerTxTests.java Mon Jul 7 19:07:41 2014
@@ -54,14 +54,14 @@ public class SingletonContainerTxTests e
*/
protected void setUp() throws Exception {
- Properties properties = TestManager.getServer().getContextEnvironment();
+ final Properties properties = TestManager.getServer().getContextEnvironment();
//properties.put(Context.SECURITY_PRINCIPAL, "SINGLETON_test00_CLIENT");
//properties.put(Context.SECURITY_CREDENTIALS, "SINGLETON_test00_CLIENT");
initialContext = new InitialContext(properties);
/*[1] Get bean */
- Object obj = initialContext.lookup(jndiEJBHomeEntry);
+ final Object obj = initialContext.lookup(jndiEJBHomeEntry);
ejbHome = (ContainerTxSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, ContainerTxSingletonHome.class);
ejbObject = ejbHome.create();
@@ -80,360 +80,360 @@ public class SingletonContainerTxTests e
public void test01_txMandatory_withoutTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txMandatoryMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txMandatoryMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test02_txNever_withoutTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txNeverMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNeverMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test03_txNotSupported_withoutTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txNotSupportedMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNotSupportedMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test04_txRequired_withoutTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiredMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiredMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test05_txRequiresNew_withoutTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiresNewMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiresNewMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test06_txSupports_withoutTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txSupportsMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txSupportsMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test07_txMandatory_withTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txMandatoryMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txMandatoryMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test08_txNever_withTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txNeverMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNeverMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test09_txNotSupported_withTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txNotSupportedMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNotSupportedMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test10_txRequired_withTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiredMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiredMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test11_txRequiresNew_withTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiresNewMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiresNewMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test12_txSupports_withTx(){
try{
- String expected = "ping";
- String actual = ejbObject.txSupportsMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txSupportsMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test01_txMandatory_withoutTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txMandatoryMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txMandatoryMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test02_txNever_withoutTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txNeverMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNeverMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test03_txNotSupported_withoutTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txNotSupportedMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNotSupportedMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test04_txRequired_withoutTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiredMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiredMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test05_txRequiresNew_withoutTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiresNewMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiresNewMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test06_txSupports_withoutTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txSupportsMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txSupportsMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test07_txMandatory_withTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txMandatoryMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txMandatoryMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test08_txNever_withTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txNeverMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNeverMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test09_txNotSupported_withTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txNotSupportedMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNotSupportedMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test10_txRequired_withTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiredMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiredMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test11_txRequiresNew_withTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiresNewMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiresNewMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test12_txSupports_withTx_appException(){
try{
- String expected = "ping";
- String actual = ejbObject.txSupportsMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txSupportsMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test01_txMandatory_withoutTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txMandatoryMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txMandatoryMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test02_txNever_withoutTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txNeverMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNeverMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test03_txNotSupported_withoutTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txNotSupportedMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNotSupportedMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test04_txRequired_withoutTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiredMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiredMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test05_txRequiresNew_withoutTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiresNewMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiresNewMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test06_txSupports_withoutTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txSupportsMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txSupportsMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test07_txMandatory_withTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txMandatoryMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txMandatoryMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test08_txNever_withTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txNeverMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNeverMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test09_txNotSupported_withTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txNotSupportedMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txNotSupportedMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test10_txRequired_withTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiredMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiredMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test11_txRequiresNew_withTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txRequiresNewMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txRequiresNewMethod( expected );
assertEquals("The method invocation was invalid.", expected, actual);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test12_txSupports_withTx_sysException(){
try{
- String expected = "ping";
- String actual = ejbObject.txSupportsMethod( expected );
+ final String expected = "ping";
+ final String actual = ejbObject.txSupportsMethod( expected );
assertEquals("The method invocation was invalid.", 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/singleton/SingletonContextLookupTests.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/singleton/SingletonContextLookupTests.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/singleton/SingletonContextLookupTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonContextLookupTests.java Mon Jul 7 19:07:41 2014
@@ -34,7 +34,7 @@ public class SingletonContextLookupTests
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/ContextLookupSingletonBean");
+ final Object obj = initialContext.lookup("client/tests/singleton/ContextLookupSingletonBean");
ejbHome = (EncSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, EncSingletonHome.class);
ejbObject = ejbHome.create();
@@ -50,7 +50,7 @@ public class SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
public void test12_lookupSingletonBean() {
try{
ejbObject.lookupSingletonBean();
- } 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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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 SingletonContextLookupTests
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/singleton/SingletonEjbHomeTests.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/singleton/SingletonEjbHomeTests.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/singleton/SingletonEjbHomeTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonEjbHomeTests.java Mon Jul 7 19:07:41 2014
@@ -31,7 +31,7 @@ public class SingletonEjbHomeTests exten
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
+ final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class);
}
@@ -40,9 +40,9 @@ public class SingletonEjbHomeTests exten
//
public void test01_getEJBMetaData(){
try{
- EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
+ final EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
assertNotNull("EJBMetaData is null", ejbMetaData);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -51,7 +51,7 @@ public class SingletonEjbHomeTests exten
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,9 +88,9 @@ public class SingletonEjbHomeTests exten
public void test03_removeByPrimaryKey(){
try{
ejbHome.remove("primaryKey");
- } catch (RemoveException e){
+ } catch (final RemoveException e){
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/singleton/SingletonEjbMetaDataTests.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/singleton/SingletonEjbMetaDataTests.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/singleton/SingletonEjbMetaDataTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonEjbMetaDataTests.java Mon Jul 7 19:07:41 2014
@@ -30,7 +30,7 @@ public class SingletonEjbMetaDataTests e
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
+ final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class);
ejbMetaData = ejbHome.getEJBMetaData();
}
@@ -41,19 +41,19 @@ public class SingletonEjbMetaDataTests e
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 , BasicSingletonHome.class);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -72,12 +72,12 @@ public class SingletonEjbMetaDataTests e
*/
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 SingletonEjbMetaDataTests e
public void test04_getRemoteInterfaceClass(){
try{
- Class clazz = ejbMetaData.getRemoteInterfaceClass();
+ final Class clazz = ejbMetaData.getRemoteInterfaceClass();
assertNotNull( "The Remote Interface class is null", clazz );
assertEquals(clazz , BasicSingletonObject.class);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -96,7 +96,7 @@ public class SingletonEjbMetaDataTests e
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());
}
}
@@ -105,7 +105,7 @@ public class SingletonEjbMetaDataTests e
try{
// TODO: hopefully an isSingletonSession() method will get added to the EJB 3.1 API
assertTrue( "EJBMetaData says this is not a singleton 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/singleton/SingletonEjbObjectTests.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/singleton/SingletonEjbObjectTests.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/singleton/SingletonEjbObjectTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonEjbObjectTests.java Mon Jul 7 19:07:41 2014
@@ -32,7 +32,7 @@ public class SingletonEjbObjectTests ext
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
+ final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class);
ejbObject = ejbHome.createObject();
}
@@ -40,7 +40,7 @@ public class SingletonEjbObjectTests ext
protected void tearDown() throws Exception {
try {
//ejbObject.remove();
- } catch (Exception e){
+ } catch (final Exception e){
throw e;
} finally {
super.tearDown();
@@ -54,7 +54,7 @@ public class SingletonEjbObjectTests ext
try{
ejbHandle = ejbObject.getHandle();
assertNotNull( "The Handle is null", ejbHandle );
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -62,16 +62,16 @@ public class SingletonEjbObjectTests ext
public void test02_isIdentical(){
try{
assertTrue( "The EJBObjects are not identical", 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());
}
}
@@ -91,11 +91,11 @@ public class SingletonEjbObjectTests ext
*/
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.");
@@ -106,7 +106,7 @@ public class SingletonEjbObjectTests ext
ejbObject.remove();
// you can't really remove a singleton handle
ejbObject.businessMethod("Should not throw an exception");
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -117,7 +117,7 @@ public class SingletonEjbObjectTests ext
String str = null;
try {
str = ejbObject.remove("Hello");
- } catch (RemoteException e) {
+ } catch (final RemoteException 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/singleton/SingletonFieldInjectionTests.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/singleton/SingletonFieldInjectionTests.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/singleton/SingletonFieldInjectionTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonFieldInjectionTests.java Mon Jul 7 19:07:41 2014
@@ -37,7 +37,7 @@ public class SingletonFieldInjectionTest
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/FieldInjectionSingletonBean");
+ final Object obj = initialContext.lookup("client/tests/singleton/FieldInjectionSingletonBean");
ejbHome = (EncSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, EncSingletonHome.class);
ejbObject = ejbHome.create();
@@ -53,7 +53,7 @@ public class SingletonFieldInjectionTest
try {
/*[1] Drop database table */
TestManager.getDatabase().dropEntityTable();
- } catch (Exception e){
+ } catch (final Exception e){
throw e;
} finally {
super.tearDown();
@@ -63,9 +63,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -73,9 +73,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -83,9 +83,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -93,9 +93,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -103,9 +103,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -113,9 +113,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -123,9 +123,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -133,9 +133,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -143,9 +143,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -153,9 +153,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -163,9 +163,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -173,9 +173,9 @@ public class SingletonFieldInjectionTest
public void test12_lookupSingletonBean() {
try{
ejbObject.lookupSingletonBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -183,9 +183,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -193,9 +193,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -203,9 +203,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -213,9 +213,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -223,9 +223,9 @@ public class SingletonFieldInjectionTest
public void test19_lookupSingletonBusinessLocal() {
try{
ejbObject.lookupSingletonBusinessLocal();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -233,9 +233,9 @@ public class SingletonFieldInjectionTest
public void test20_lookupSingletonBusinessRemote() {
try{
ejbObject.lookupSingletonBusinessRemote();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -243,9 +243,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -253,9 +253,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -263,9 +263,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -273,9 +273,9 @@ public class SingletonFieldInjectionTest
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());
}
}
@@ -283,9 +283,9 @@ public class SingletonFieldInjectionTest
public void test25_lookupSingletonBusinessLocalBean() {
try{
ejbObject.lookupSingletonBusinessLocalBean();
- } 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/singleton/SingletonHandleTests.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/singleton/SingletonHandleTests.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/singleton/SingletonHandleTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonHandleTests.java Mon Jul 7 19:07:41 2014
@@ -30,7 +30,7 @@ public class SingletonHandleTests extend
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
+ final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class);
ejbObject = ejbHome.createObject();
ejbHandle = ejbObject.getHandle();
@@ -39,7 +39,7 @@ public class SingletonHandleTests extend
protected void tearDown() throws Exception{
try {
//ejbObject.remove();
- } catch (Exception e){
+ } catch (final Exception e){
throw e;
} finally {
super.tearDown();
@@ -52,11 +52,11 @@ public class SingletonHandleTests extend
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());
}
}
@@ -80,7 +80,7 @@ public class SingletonHandleTests extend
ejbHome.remove(ejbHandle);
// you can't really remove a singleton handle
ejbObject.businessMethod("Should not throw an exception");
- } 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/singleton/SingletonHomeHandleTests.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/singleton/SingletonHomeHandleTests.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/singleton/SingletonHomeHandleTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonHomeHandleTests.java Mon Jul 7 19:07:41 2014
@@ -30,7 +30,7 @@ public class SingletonHomeHandleTests ex
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
+ final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class);
ejbHomeHandle = ejbHome.getHomeHandle();
}
@@ -40,9 +40,9 @@ public class SingletonHomeHandleTests ex
//
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/singleton/SingletonHomeIntfcTests.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/singleton/SingletonHomeIntfcTests.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/singleton/SingletonHomeIntfcTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonHomeIntfcTests.java Mon Jul 7 19:07:41 2014
@@ -29,7 +29,7 @@ public class SingletonHomeIntfcTests ext
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
+ final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class);
}
@@ -40,7 +40,7 @@ public class SingletonHomeIntfcTests ext
try{
ejbObject = ejbHome.createObject();
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/singleton/SingletonInterceptorTests.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/singleton/SingletonInterceptorTests.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/singleton/SingletonInterceptorTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonInterceptorTests.java Mon Jul 7 19:07:41 2014
@@ -37,7 +37,7 @@ public class SingletonInterceptorTests e
protected void setUp() throws Exception {
super.setUp();
- Object obj = initialContext.lookup("BasicSingletonInterceptedBusinessRemote");
+ final Object obj = initialContext.lookup("BasicSingletonInterceptedBusinessRemote");
assertNotNull("The BasicSingletonInterceptedBusinessRemote object is null", obj);
remoteInterceptor = (BasicSingletonInterceptedRemote) javax.rmi.PortableRemoteObject.narrow(obj,
BasicSingletonInterceptedRemote.class);
@@ -48,17 +48,17 @@ public class SingletonInterceptorTests e
* Invokes a business method which is to be intercepted from a 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");
assertEquals("ddInterceptor", interceptorsList.get(0)); //specified in DD
assertEquals("secondClassInterceptor", interceptorsList.get(1)); //specified in DD
@@ -74,17 +74,17 @@ public class SingletonInterceptorTests e
* 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()
@@ -98,12 +98,12 @@ public class SingletonInterceptorTests e
* <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
assertFalse("getContextData() should not have been intercepted by classInterceptor()", interceptorsList.contains("classInterceptor"));
assertFalse("getContextData() should not have been intercepted by classInterceptor()", interceptorsList.contains("classInterceptor"));
@@ -116,16 +116,16 @@ public class SingletonInterceptorTests e
* <code>concat()</code> has been annotated with <code>exclude-class-interceptors</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"));
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonJndiEncTests.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/singleton/SingletonJndiEncTests.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/singleton/SingletonJndiEncTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonJndiEncTests.java Mon Jul 7 19:07:41 2014
@@ -36,7 +36,7 @@ public class SingletonJndiEncTests exten
protected void setUp() throws Exception{
super.setUp();
- Object obj = initialContext.lookup("client/tests/singleton/EncBean");
+ final Object obj = initialContext.lookup("client/tests/singleton/EncBean");
ejbHome = (EncSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, EncSingletonHome.class);
ejbObject = ejbHome.create();
@@ -52,7 +52,7 @@ public class SingletonJndiEncTests exten
try {
/*[1] Drop database table */
TestManager.getDatabase().dropEntityTable();
- } catch (Exception e){
+ } catch (final Exception e){
throw e;
} finally {
super.tearDown();
@@ -62,9 +62,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -72,9 +72,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -82,9 +82,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -92,9 +92,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -102,9 +102,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -112,9 +112,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -122,9 +122,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -132,9 +132,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -142,9 +142,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -152,9 +152,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -162,9 +162,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -172,9 +172,9 @@ public class SingletonJndiEncTests exten
public void test12_lookupSingletonBean() {
try{
ejbObject.lookupSingletonBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -182,9 +182,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -192,9 +192,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -202,18 +202,18 @@ public class SingletonJndiEncTests exten
public void test15_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());
}
}
public void test16_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());
}
}
@@ -221,9 +221,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -231,9 +231,9 @@ public class SingletonJndiEncTests exten
public void test19_lookupSingletonBusinessLocal() {
try{
ejbObject.lookupSingletonBusinessLocal();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -241,9 +241,9 @@ public class SingletonJndiEncTests exten
public void test20_lookupSingletonBusinessRemote() {
try{
ejbObject.lookupSingletonBusinessRemote();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e){
throw e.error;
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
@@ -251,9 +251,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -261,9 +261,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -271,9 +271,9 @@ public class SingletonJndiEncTests exten
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());
}
}
@@ -281,9 +281,9 @@ public class SingletonJndiEncTests exten
public void test24_lookupStatefulBusinessLocalBean() {
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());
}
}
@@ -291,9 +291,9 @@ public class SingletonJndiEncTests exten
public void test25_lookupSingletonBusinessLocalBean() {
try{
ejbObject.lookupSingletonBusinessLocalBean();
- } 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/singleton/SingletonJndiTests.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/singleton/SingletonJndiTests.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/singleton/SingletonJndiTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonJndiTests.java Mon Jul 7 19:07:41 2014
@@ -32,18 +32,18 @@ public class SingletonJndiTests extends
public void test01_initialContext(){
try{
assertNotNull("The InitialContext reference is null.", initialContext);
- } catch (Exception e){
+ } catch (final Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
public void test02_Jndi_lookupHome(){
try{
- Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
+ final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome");
assertNotNull("The EJBHome looked up from JNDI is null", obj);
ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class);
assertNotNull("The EJBHome is null after PortableRemoteObject.narrow", ejbHome);
- } catch (Exception e){
+ } catch (final Exception e){
e.printStackTrace();
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/singleton/SingletonLocalBusinessIntfcTests.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/singleton/SingletonLocalBusinessIntfcTests.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/singleton/SingletonLocalBusinessIntfcTests.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalBusinessIntfcTests.java Mon Jul 7 19:07:41 2014
@@ -31,7 +31,7 @@ public class SingletonLocalBusinessIntfc
// Test remote interface methods
//
public void test00_lookupBusinessInterface() throws Exception {
- Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHomeBusinessLocal");
+ final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHomeBusinessLocal");
assertNotNull(obj);
assertTrue("instance of BasicSingletonBusinessLocal", obj instanceof BasicSingletonBusinessLocal);
businessLocal = (BasicSingletonBusinessLocal) obj;
@@ -39,18 +39,18 @@ public class SingletonLocalBusinessIntfc
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 SingletonLocalBusinessIntfc
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 SingletonLocalBusinessIntfc
*/
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 SingletonLocalBusinessIntfc
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 SingletonLocalBusinessIntfc
//=================================
public void test06_testRemove(){
- Object obj = businessLocal.remove();
+ final Object obj = businessLocal.remove();
assertNotNull(obj);
}
}