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/15 23:55:19 UTC
svn commit: r1610862 [24/44] - in /tomee/tomee/trunk/itests: ./ failover-ejb/
failover-ejb/src/main/java/org/apache/openejb/itest/failover/ejb/ failover/
failover/src/main/java/org/apache/openejb/itest/failover/
failover/src/main/java/org/apache/openej...
Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpJndiEncTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpJndiEncTests.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpJndiEncTests.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpJndiEncTests.java Tue Jul 15 21:55:09 2014
@@ -20,231 +20,230 @@ import org.apache.openejb.test.TestFailu
/**
* [4] Should be run as the fourth test suite of the EncCmpTestClients
- *
*/
-public class CmpJndiEncTests extends CmpTestClient{
+public class CmpJndiEncTests extends CmpTestClient {
- protected EncCmpHome ejbHome;
+ protected EncCmpHome ejbHome;
protected EncCmpObject ejbObject;
-
- public CmpJndiEncTests(){
+
+ public CmpJndiEncTests() {
super("JNDI_ENC.");
}
- protected void setUp() throws Exception{
+ protected void setUp() throws Exception {
super.setUp();
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- ejbHome = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ ejbHome = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
ejbObject = ejbHome.create("Enc Bean");
}
-
+
protected void tearDown() throws Exception {
try {
//ejbObject.remove();
- } catch (Exception e){
+ } catch (final Exception e) {
throw e;
} finally {
super.tearDown();
}
}
-
+
public void test01_lookupStringEntry() {
- try{
+ try {
ejbObject.lookupStringEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
- public void test02_lookupDoubleEntry() {
- try{
+
+ public void test02_lookupDoubleEntry() {
+ try {
ejbObject.lookupDoubleEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
- public void test03_lookupLongEntry() {
- try{
+
+ public void test03_lookupLongEntry() {
+ try {
ejbObject.lookupLongEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
- public void test04_lookupFloatEntry() {
- try{
+
+ public void test04_lookupFloatEntry() {
+ try {
ejbObject.lookupFloatEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
+
public void test05_lookupIntegerEntry() {
- try{
+ try {
ejbObject.lookupIntegerEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
- public void test06_lookupShortEntry() {
- try{
+
+ public void test06_lookupShortEntry() {
+ try {
ejbObject.lookupShortEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
+
public void test07_lookupBooleanEntry() {
- try{
+ try {
ejbObject.lookupBooleanEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
- public void test08_lookupByteEntry() {
- try{
+
+ public void test08_lookupByteEntry() {
+ try {
ejbObject.lookupByteEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
+
public void test09_lookupCharacterEntry() {
- try{
+ try {
ejbObject.lookupCharacterEntry();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test10_lookupEntityBean() {
- try{
+ try {
ejbObject.lookupEntityBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test11_lookupStatefulBean() {
- try{
+ try {
ejbObject.lookupStatefulBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test12_lookupStatelessBean() {
- try{
+ try {
ejbObject.lookupStatelessBean();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test13_lookupResource() {
- try{
+ try {
ejbObject.lookupResource();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
+
public void test14_lookupPersistenceUnit() {
- try{
+ try {
ejbObject.lookupPersistenceUnit();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
+
public void test15_lookupPersistenceContext() {
- try{
+ try {
ejbObject.lookupPersistenceContext();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test19_lookupStatelessBusinessLocal() {
- try{
+ try {
ejbObject.lookupStatelessBusinessLocal();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test20_lookupStatelessBusinessRemote() {
- try{
+ try {
ejbObject.lookupStatelessBusinessRemote();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test21_lookupStatefulBusinessLocal() {
- try{
+ try {
ejbObject.lookupStatefulBusinessLocal();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test22_lookupStatefulBusinessRemote() {
- try{
+ try {
ejbObject.lookupStatefulBusinessRemote();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
+
public void test23_lookupJMSConnectionFactory() {
- try{
+ try {
ejbObject.lookupJMSConnectionFactory();
- } catch (TestFailureException e){
+ } catch (final TestFailureException e) {
throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
}
Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpJndiTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpJndiTests.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpJndiTests.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpJndiTests.java Tue Jul 15 21:55:09 2014
@@ -19,21 +19,20 @@ package org.apache.openejb.test.entity.c
/**
* [1] Should be run as the first test suite of the BasicCmpTestClients
- *
*/
-public class CmpJndiTests extends BasicCmpTestClient{
+public class CmpJndiTests extends BasicCmpTestClient {
- public CmpJndiTests(){
+ public CmpJndiTests() {
super("JNDI.");
}
- public void test01_Jndi_lookupHome(){
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/BasicCmpHome");
- ejbHome = (BasicCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicCmpHome.class);
+ public void test01_Jndi_lookupHome() {
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/BasicCmpHome");
+ ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
assertNotNull("The EJBHome is null", ejbHome);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRemoteIntfcTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRemoteIntfcTests.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRemoteIntfcTests.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRemoteIntfcTests.java Tue Jul 15 21:55:09 2014
@@ -19,93 +19,92 @@ package org.apache.openejb.test.entity.c
/**
* [5] Should be run as the fifth test suite of the BasicCmpTestClients
- *
*/
-public class CmpRemoteIntfcTests extends BasicCmpTestClient{
+public class CmpRemoteIntfcTests extends BasicCmpTestClient {
- public CmpRemoteIntfcTests(){
+ public CmpRemoteIntfcTests() {
super("RemoteIntfc.");
}
- protected void setUp() throws Exception{
+ protected void setUp() throws Exception {
super.setUp();
- Object obj = initialContext.lookup("client/tests/entity/cmp/BasicCmpHome");
- ejbHome = (BasicCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicCmpHome.class);
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/BasicCmpHome");
+ ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
ejbObject = ejbHome.createObject("Forth Bean");
}
-
+
//=================================
// Test remote interface methods
//
- public void test01_businessMethod(){
- try{
- String expected = "Success";
- String actual = ejbObject.businessMethod("sseccuS");
- assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ public void test01_businessMethod() {
+ try {
+ final String expected = "Success";
+ final String actual = ejbObject.businessMethod("sseccuS");
+ assertEquals(expected, actual);
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
-
+
/**
* Throw an application exception and make sure the exception
* reaches the bean nicely.
*/
- public void test02_throwApplicationException(){
- try{
+ public void test02_throwApplicationException() {
+ try {
ejbObject.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){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Throwable e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
fail("An ApplicationException should have been thrown.");
}
-
+
/**
- * After an application exception we should still be able to
+ * After an application exception we should still be able to
* use our bean
*/
- public void test03_invokeAfterApplicationException(){
- try{
- String expected = "Success";
- String actual = ejbObject.businessMethod("sseccuS");
- assertEquals(expected, actual);
- } catch (Throwable e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ public void test03_invokeAfterApplicationException() {
+ try {
+ final String expected = "Success";
+ final String actual = ejbObject.businessMethod("sseccuS");
+ assertEquals(expected, actual);
+ } catch (final Throwable e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
- public void test04_throwSystemException(){
- try{
+ public void test04_throwSystemException() {
+ try {
ejbObject.throwSystemException_NullPointer();
- } catch (java.rmi.RemoteException e){
+ } catch (final java.rmi.RemoteException e) {
//Good, so far.
- Throwable n = e.detail;
- 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));
+ final Throwable n = e.detail;
+ 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){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Throwable e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
fail("A NullPointerException should have been thrown.");
}
-
+
/**
* After a system exception the intance should be garbage collected
* and the remote reference should be invalidated.
- *
+ * <p/>
* The Remote Server fails this one, that should be fixed.
*/
- public void BUG_test05_invokeAfterSystemException(){
- try{
- ejbObject.businessMethod("This refernce is invalid");
- fail("A java.rmi.NoSuchObjectException should have been thrown.");
- } catch (java.rmi.NoSuchObjectException e){
+ public void BUG_test05_invokeAfterSystemException() {
+ try {
+ ejbObject.businessMethod("This refernce is invalid");
+ fail("A java.rmi.NoSuchObjectException should have been thrown.");
+ } catch (final java.rmi.NoSuchObjectException e) {
// Good.
- } catch (Throwable e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Throwable e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
//
Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java Tue Jul 15 21:55:09 2014
@@ -25,19 +25,19 @@ import org.apache.openejb.test.object.Ob
import java.rmi.RemoteException;
-public class CmpRmiIiopTests extends CmpTestClient{
+public class CmpRmiIiopTests extends CmpTestClient {
- protected RmiIiopCmpHome ejbHome;
+ protected RmiIiopCmpHome ejbHome;
protected RmiIiopCmpObject ejbObject;
- public CmpRmiIiopTests(){
+ public CmpRmiIiopTests() {
super("RMI_IIOP.");
}
- protected void setUp() throws Exception{
+ protected void setUp() throws Exception {
super.setUp();
- Object obj = initialContext.lookup("client/tests/entity/cmp/RMI-over-IIOP/EJBHome");
- ejbHome = (RmiIiopCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, RmiIiopCmpHome.class);
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/RMI-over-IIOP/EJBHome");
+ ejbHome = (RmiIiopCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, RmiIiopCmpHome.class);
ejbObject = ejbHome.create("RMI-IIOP TestBean");
}
@@ -46,27 +46,27 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test01_returnStringObject() {
- try{
- String expected = new String("1");
- String actual = ejbObject.returnStringObject(expected);
+ try {
+ final String expected = new String("1");
+ final String actual = ejbObject.returnStringObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test02_returnStringObjectArray() {
- try{
- String[] expected = {"1","2","3"};
- String[] actual = ejbObject.returnStringObjectArray(expected);
+ try {
+ final String[] expected = {"1", "2", "3"};
+ final String[] actual = ejbObject.returnStringObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -76,52 +76,52 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test03_returnCharacterObject() {
- try{
- Character expected = new Character('1');
- Character actual = ejbObject.returnCharacterObject(expected);
+ try {
+ final Character expected = new Character('1');
+ final Character actual = ejbObject.returnCharacterObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test04_returnCharacterPrimitive() {
- try{
- char expected = '1';
- char actual = ejbObject.returnCharacterPrimitive(expected);
+ try {
+ final char expected = '1';
+ final char actual = ejbObject.returnCharacterPrimitive(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test05_returnCharacterObjectArray() {
- try{
- Character[] expected = {new Character('1'),new Character('2'),new Character('3')};
- Character[] actual = ejbObject.returnCharacterObjectArray(expected);
+ try {
+ final Character[] expected = {new Character('1'), new Character('2'), new Character('3')};
+ final Character[] actual = ejbObject.returnCharacterObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test06_returnCharacterPrimitiveArray() {
- try{
- char[] expected = {'1','2','3'};
- char[] actual = ejbObject.returnCharacterPrimitiveArray(expected);
+ try {
+ final char[] expected = {'1', '2', '3'};
+ final char[] actual = ejbObject.returnCharacterPrimitiveArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -131,52 +131,52 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test07_returnBooleanObject() {
- try{
- Boolean expected = new Boolean(true);
- Boolean actual = ejbObject.returnBooleanObject(expected);
+ try {
+ final Boolean expected = new Boolean(true);
+ final Boolean actual = ejbObject.returnBooleanObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test08_returnBooleanPrimitive() {
- try{
- boolean expected = true;
- boolean actual = ejbObject.returnBooleanPrimitive(expected);
- assertEquals(""+expected, ""+actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ try {
+ final boolean expected = true;
+ final boolean actual = ejbObject.returnBooleanPrimitive(expected);
+ assertEquals("" + expected, "" + actual);
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test09_returnBooleanObjectArray() {
- try{
- Boolean[] expected = {new Boolean(true),new Boolean(false),new Boolean(true)};
- Boolean[] actual = ejbObject.returnBooleanObjectArray(expected);
+ try {
+ final Boolean[] expected = {new Boolean(true), new Boolean(false), new Boolean(true)};
+ final Boolean[] actual = ejbObject.returnBooleanObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test10_returnBooleanPrimitiveArray() {
- try{
- boolean[] expected = {false,true,true};
- boolean[] actual = ejbObject.returnBooleanPrimitiveArray(expected);
+ try {
+ final boolean[] expected = {false, true, true};
+ final boolean[] actual = ejbObject.returnBooleanPrimitiveArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -186,52 +186,52 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test11_returnByteObject() {
- try{
- Byte expected = new Byte("1");
- Byte actual = ejbObject.returnByteObject(expected);
+ try {
+ final Byte expected = new Byte("1");
+ final Byte actual = ejbObject.returnByteObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test12_returnBytePrimitive() {
- try{
- byte expected = (byte)1;
- byte actual = ejbObject.returnBytePrimitive(expected);
+ try {
+ final byte expected = (byte) 1;
+ final byte actual = ejbObject.returnBytePrimitive(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test13_returnByteObjectArray() {
- try{
- Byte[] expected = {new Byte("1"),new Byte("2"),new Byte("3")};
- Byte[] actual = ejbObject.returnByteObjectArray(expected);
+ try {
+ final Byte[] expected = {new Byte("1"), new Byte("2"), new Byte("3")};
+ final Byte[] actual = ejbObject.returnByteObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test14_returnBytePrimitiveArray() {
- try{
- byte[] expected = {(byte)1,(byte)2,(byte)3};
- byte[] actual = ejbObject.returnBytePrimitiveArray(expected);
+ try {
+ final byte[] expected = {(byte) 1, (byte) 2, (byte) 3};
+ final byte[] actual = ejbObject.returnBytePrimitiveArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -241,52 +241,52 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test15_returnShortObject() {
- try{
- Short expected = new Short("1");
- Short actual = ejbObject.returnShortObject(expected);
+ try {
+ final Short expected = new Short("1");
+ final Short actual = ejbObject.returnShortObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test16_returnShortPrimitive() {
- try{
- short expected = (short)1;
- short actual = ejbObject.returnShortPrimitive(expected);
+ try {
+ final short expected = (short) 1;
+ final short actual = ejbObject.returnShortPrimitive(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test17_returnShortObjectArray() {
- try{
- Short[] expected = {new Short("1"),new Short("2"),new Short("3")};
- Short[] actual = ejbObject.returnShortObjectArray(expected);
+ try {
+ final Short[] expected = {new Short("1"), new Short("2"), new Short("3")};
+ final Short[] actual = ejbObject.returnShortObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test18_returnShortPrimitiveArray() {
- try{
- short[] expected = {(short)1,(short)2,(short)3};
- short[] actual = ejbObject.returnShortPrimitiveArray(expected);
+ try {
+ final short[] expected = {(short) 1, (short) 2, (short) 3};
+ final short[] actual = ejbObject.returnShortPrimitiveArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -296,52 +296,52 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test19_returnIntegerObject() {
- try{
- Integer expected = new Integer(1);
- Integer actual = ejbObject.returnIntegerObject(expected);
+ try {
+ final Integer expected = new Integer(1);
+ final Integer actual = ejbObject.returnIntegerObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test20_returnIntegerPrimitive() {
- try{
- int expected = 1;
- int actual = ejbObject.returnIntegerPrimitive(expected);
+ try {
+ final int expected = 1;
+ final int actual = ejbObject.returnIntegerPrimitive(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test21_returnIntegerObjectArray() {
- try{
- Integer[] expected = {new Integer(1),new Integer(2),new Integer(3)};
- Integer[] actual = ejbObject.returnIntegerObjectArray(expected);
+ try {
+ final Integer[] expected = {new Integer(1), new Integer(2), new Integer(3)};
+ final Integer[] actual = ejbObject.returnIntegerObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test22_returnIntegerPrimitiveArray() {
- try{
- int[] expected = {1,2,3};
- int[] actual = ejbObject.returnIntegerPrimitiveArray(expected);
+ try {
+ final int[] expected = {1, 2, 3};
+ final int[] actual = ejbObject.returnIntegerPrimitiveArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -351,52 +351,52 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test23_returnLongObject() {
- try{
- Long expected = new Long("1");
- Long actual = ejbObject.returnLongObject(expected);
+ try {
+ final Long expected = new Long("1");
+ final Long actual = ejbObject.returnLongObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test24_returnLongPrimitive() {
- try{
- long expected = 1;
- long actual = ejbObject.returnLongPrimitive(expected);
+ try {
+ final long expected = 1;
+ final long actual = ejbObject.returnLongPrimitive(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test25_returnLongObjectArray() {
- try{
- Long[] expected = {new Long("1"),new Long("2"),new Long("3")};
- Long[] actual = ejbObject.returnLongObjectArray(expected);
+ try {
+ final Long[] expected = {new Long("1"), new Long("2"), new Long("3")};
+ final Long[] actual = ejbObject.returnLongObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test26_returnLongPrimitiveArray() {
- try{
- long[] expected = {1,2,3};
- long[] actual = ejbObject.returnLongPrimitiveArray(expected);
+ try {
+ final long[] expected = {1, 2, 3};
+ final long[] actual = ejbObject.returnLongPrimitiveArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -406,52 +406,52 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test27_returnFloatObject() {
- try{
- Float expected = new Float("1.3");
- Float actual = ejbObject.returnFloatObject(expected);
+ try {
+ final Float expected = new Float("1.3");
+ final Float actual = ejbObject.returnFloatObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test28_returnFloatPrimitive() {
- try{
- float expected = 1.2F;
- float actual = ejbObject.returnFloatPrimitive(expected);
+ try {
+ final float expected = 1.2F;
+ final float actual = ejbObject.returnFloatPrimitive(expected);
assertEquals(expected, actual, 0.00D);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test29_returnFloatObjectArray() {
- try{
- Float[] expected = {new Float("1.1"),new Float("2.2"),new Float("3.3")};
- Float[] actual = ejbObject.returnFloatObjectArray(expected);
+ try {
+ final Float[] expected = {new Float("1.1"), new Float("2.2"), new Float("3.3")};
+ final Float[] actual = ejbObject.returnFloatObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test30_returnFloatPrimitiveArray() {
- try{
- float[] expected = {1.2F,2.3F,3.4F};
- float[] actual = ejbObject.returnFloatPrimitiveArray(expected);
+ try {
+ final float[] expected = {1.2F, 2.3F, 3.4F};
+ final float[] actual = ejbObject.returnFloatPrimitiveArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i , expected[i], actual[i], 0.0D);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i], 0.0D);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -461,52 +461,52 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test31_returnDoubleObject() {
- try{
- Double expected = new Double("1.1");
- Double actual = ejbObject.returnDoubleObject(expected);
+ try {
+ final Double expected = new Double("1.1");
+ final Double actual = ejbObject.returnDoubleObject(expected);
assertEquals(expected, actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test32_returnDoublePrimitive() {
- try{
- double expected = 1.2;
- double actual = ejbObject.returnDoublePrimitive(expected);
+ try {
+ final double expected = 1.2;
+ final double actual = ejbObject.returnDoublePrimitive(expected);
assertEquals(expected, actual, 0.0D);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test33_returnDoubleObjectArray() {
- try{
- Double[] expected = {new Double("1.3"),new Double("2.4"),new Double("3.5")};
- Double[] actual = ejbObject.returnDoubleObjectArray(expected);
+ try {
+ final Double[] expected = {new Double("1.3"), new Double("2.4"), new Double("3.5")};
+ final Double[] actual = ejbObject.returnDoubleObjectArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i]);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i]);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test34_returnDoublePrimitiveArray() {
- try{
- double[] expected = {1.4,2.5,3.6};
- double[] actual = ejbObject.returnDoublePrimitiveArray(expected);
+ try {
+ final double[] expected = {1.4, 2.5, 3.6};
+ final double[] actual = ejbObject.returnDoublePrimitiveArray(expected);
assertNotNull("The array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
- assertEquals("Array values are not equal at index "+i ,expected[i], actual[i],0.0D);
+ for (int i = 0; i < actual.length; i++) {
+ assertEquals("Array values are not equal at index " + i, expected[i], actual[i], 0.0D);
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -516,73 +516,73 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test35_returnEJBHome() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome expected = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome expected = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", expected);
- EncCmpHome actual = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(expected), EncCmpHome.class);
+ final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(expected), EncCmpHome.class);
assertNotNull("The EJBHome returned is null", actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test36_returnEJBHome2() {
- try{
- EncCmpHome actual = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(), EncCmpHome.class);
+ try {
+ final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(), EncCmpHome.class);
assertNotNull("The EJBHome returned is null", actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test37_returnNestedEJBHome() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome expected = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome expected = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", expected);
- ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
+ final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
- EncCmpHome actual = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( graph.getObject(), EncCmpHome.class);
+ final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpHome.class);
assertNotNull("The EJBHome returned is null", actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test38_returnNestedEJBHome2() {
- try{
- ObjectGraph graph = ejbObject.returnNestedEJBHome();
+ try {
+ final ObjectGraph graph = ejbObject.returnNestedEJBHome();
assertNotNull("The ObjectGraph is null", graph);
- EncCmpHome actual = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( graph.getObject(), EncCmpHome.class);
+ final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpHome.class);
assertNotNull("The EJBHome returned is null", actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test39_returnEJBHomeArray() {
- try{
+ try {
- EncCmpHome expected[] = new EncCmpHome[3];
- for (int i=0; i < expected.length; i++){
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- expected[i] = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ final EncCmpHome[] expected = new EncCmpHome[3];
+ for (int i = 0; i < expected.length; i++) {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ expected[i] = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", expected[i]);
}
- EJBHome[] actual = ejbObject.returnEJBHomeArray(expected);
+ final EJBHome[] actual = ejbObject.returnEJBHomeArray(expected);
assertNotNull("The EJBHome array returned is null", actual);
assertEquals(expected.length, actual.length);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -592,88 +592,88 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test40_returnEJBObject() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EncCmpObject expected = home.create("test_40 CmpBean");
+ final EncCmpObject expected = home.create("test_40 CmpBean");
assertNotNull("The EJBObject created is null", expected);
- EncCmpObject actual = (EncCmpObject)javax.rmi.PortableRemoteObject.narrow( ejbObject.returnEJBObject(expected), EncCmpObject.class);
+ final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBObject(expected), EncCmpObject.class);
assertNotNull("The EJBObject returned is null", actual);
assertTrue("The EJBObejcts are not identical", expected.isIdentical(actual));
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test41_returnEJBObject2() {
- try{
- EncCmpObject actual = (EncCmpObject)javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBObject(), EncCmpObject.class);
+ try {
+ final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBObject(), EncCmpObject.class);
assertNotNull("The EJBObject returned is null", actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test42_returnNestedEJBObject() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EncCmpObject expected = home.create("test_42 CmpBean");
+ final EncCmpObject expected = home.create("test_42 CmpBean");
assertNotNull("The EJBObject created is null", expected);
- ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
+ final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
- EncCmpObject actual = (EncCmpObject)javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpObject.class);
+ final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpObject.class);
assertNotNull("The EJBObject returned is null", actual);
assertTrue("The EJBObejcts are not identical", expected.isIdentical(actual));
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test43_returnNestedEJBObject2() {
- try{
- ObjectGraph graph = ejbObject.returnNestedEJBObject();
+ try {
+ final ObjectGraph graph = ejbObject.returnNestedEJBObject();
assertNotNull("The ObjectGraph is null", graph);
- EncCmpObject actual = (EncCmpObject)javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpObject.class);
+ final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpObject.class);
assertNotNull("The EJBHome returned is null", actual);
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test44_returnEJBObjectArray() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EncCmpObject expected[] = new EncCmpObject[3];
- for (int i=0; i < expected.length; i++){
+ final EncCmpObject[] expected = new EncCmpObject[3];
+ for (int i = 0; i < expected.length; i++) {
expected[i] = home.create("test_44 CmpBean");
assertNotNull("The EJBObject created is null", expected[i]);
}
- EJBObject[] actual = ejbObject.returnEJBObjectArray(expected);
+ final EJBObject[] actual = ejbObject.returnEJBObjectArray(expected);
assertNotNull("The EJBObject array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
+ for (int i = 0; i < actual.length; i++) {
assertTrue("The EJBObejcts are not identical", expected[i].isIdentical(actual[i]));
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -682,93 +682,93 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test45_returnEJBMetaData() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EJBMetaData expected = home.getEJBMetaData();
+ final EJBMetaData expected = home.getEJBMetaData();
assertNotNull("The EJBMetaData returned is null", expected);
- EJBMetaData actual = ejbObject.returnEJBMetaData(expected);
+ final EJBMetaData actual = ejbObject.returnEJBMetaData(expected);
assertNotNull("The EJBMetaData returned is null", actual);
assertEquals(expected.getHomeInterfaceClass(), actual.getHomeInterfaceClass());
assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test46_returnEJBMetaData() {
- try{
- EJBMetaData actual = ejbObject.returnEJBMetaData();
+ try {
+ final EJBMetaData actual = ejbObject.returnEJBMetaData();
assertNotNull("The EJBMetaData returned is null", actual);
assertEquals(actual.getHomeInterfaceClass(), actual.getHomeInterfaceClass());
assertEquals(actual.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test47_returnNestedEJBMetaData() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EJBMetaData expected = home.getEJBMetaData();
+ final EJBMetaData expected = home.getEJBMetaData();
assertNotNull("The EJBMetaData returned is null", expected);
- ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
+ final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
- EJBMetaData actual = (EJBMetaData)graph.getObject();
+ final EJBMetaData actual = (EJBMetaData) graph.getObject();
assertNotNull("The EJBMetaData returned is null", actual);
assertEquals(expected.getHomeInterfaceClass(), actual.getHomeInterfaceClass());
assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test48_returnNestedEJBMetaData2() {
- try{
- ObjectGraph graph = ejbObject.returnNestedEJBMetaData();
+ try {
+ final ObjectGraph graph = ejbObject.returnNestedEJBMetaData();
assertNotNull("The ObjectGraph is null", graph);
- EJBMetaData actual = (EJBMetaData)graph.getObject();
+ final EJBMetaData actual = (EJBMetaData) graph.getObject();
assertNotNull("The EJBMetaData returned is null", actual);
assertNotNull("The home interface class of the EJBMetaData is null", actual.getHomeInterfaceClass());
assertNotNull("The remote interface class of the EJBMetaData is null", actual.getRemoteInterfaceClass());
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test49_returnEJBMetaDataArray() {
- try{
+ try {
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EJBMetaData expected[] = new EJBMetaData[3];
- for (int i=0; i < expected.length; i++){
+ final EJBMetaData[] expected = new EJBMetaData[3];
+ for (int i = 0; i < expected.length; i++) {
expected[i] = home.getEJBMetaData();
assertNotNull("The EJBMetaData returned is null", expected[i]);
}
- EJBMetaData[] actual = (EJBMetaData[])ejbObject.returnEJBMetaDataArray(expected);
+ final EJBMetaData[] actual = (EJBMetaData[]) ejbObject.returnEJBMetaDataArray(expected);
assertNotNull("The EJBMetaData array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < actual.length; i++){
+ for (int i = 0; i < actual.length; i++) {
assertNotNull("The EJBMetaData returned is null", actual[i]);
assertEquals(expected[i].getHomeInterfaceClass(), actual[i].getHomeInterfaceClass());
assertEquals(expected[i].getRemoteInterfaceClass(), actual[i].getRemoteInterfaceClass());
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -778,112 +778,112 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test50_returnHandle() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EncCmpObject object = home.create("test_50 CmpBean");
+ final EncCmpObject object = home.create("test_50 CmpBean");
assertNotNull("The EJBObject created is null", object);
- Handle expected = object.getHandle();
+ final Handle expected = object.getHandle();
assertNotNull("The EJBObject Handle returned is null", expected);
assertNotNull("The EJBObject in the Handle is null", expected.getEJBObject());
- Handle actual = ejbObject.returnHandle(expected);
+ final Handle actual = ejbObject.returnHandle(expected);
assertNotNull("The EJBObject Handle returned is null", actual);
assertNotNull("The EJBObject in the Handle is null", actual.getEJBObject());
- EJBObject exp = expected.getEJBObject();
- EJBObject act = actual.getEJBObject();
+ final EJBObject exp = expected.getEJBObject();
+ final EJBObject act = actual.getEJBObject();
assertTrue("The EJBObjects in the Handles are not identical", exp.isIdentical(act));
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test51_returnHandle() {
- try{
- Handle actual = ejbObject.returnHandle();
+ try {
+ final Handle actual = ejbObject.returnHandle();
assertNotNull("The EJBObject Handle returned is null", actual);
assertNotNull("The EJBObject in the Handle is null", actual.getEJBObject());
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test52_returnNestedHandle() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EncCmpObject object = home.create("test_52 CmpBean");
+ final EncCmpObject object = home.create("test_52 CmpBean");
assertNotNull("The EJBObject created is null", object);
- Handle expected = object.getHandle();
+ final Handle expected = object.getHandle();
assertNotNull("The EJBObject Handle returned is null", expected);
assertNotNull("The EJBObject in the Handle is null", expected.getEJBObject());
- ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
+ final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
- Handle actual = (Handle)graph.getObject();
+ final Handle actual = (Handle) graph.getObject();
assertNotNull("The EJBObject Handle returned is null", actual);
assertNotNull("The EJBObject in the Handle is null", actual.getEJBObject());
- EJBObject exp = expected.getEJBObject();
- EJBObject act = actual.getEJBObject();
+ final EJBObject exp = expected.getEJBObject();
+ final EJBObject act = actual.getEJBObject();
assertTrue("The EJBObjects in the Handles are not identical", exp.isIdentical(act));
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test53_returnNestedHandle2() {
- try{
- ObjectGraph graph = ejbObject.returnNestedHandle();
+ try {
+ final ObjectGraph graph = ejbObject.returnNestedHandle();
assertNotNull("The ObjectGraph is null", graph);
- Handle actual = (Handle)graph.getObject();
+ final Handle actual = (Handle) graph.getObject();
assertNotNull("The EJBObject Handle returned is null", actual);
assertNotNull("The EJBObject in the Handle is null", actual.getEJBObject());
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test54_returnHandleArray() {
- try{
- Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
- EncCmpHome home = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
+ try {
+ final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
+ final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
- EncCmpObject object = home.create("test_54 CmpBean");
+ final EncCmpObject object = home.create("test_54 CmpBean");
assertNotNull("The EJBObject created is null", object);
- Handle expected[] = new Handle[3];
- for (int i=0; i < expected.length; i++){
+ final Handle[] expected = new Handle[3];
+ for (int i = 0; i < expected.length; i++) {
expected[i] = object.getHandle();
assertNotNull("The EJBObject Handle returned is null", expected[i]);
}
- Handle[] actual = (Handle[])ejbObject.returnHandleArray(expected);
+ final Handle[] actual = (Handle[]) ejbObject.returnHandleArray(expected);
assertNotNull("The Handle array returned is null", actual);
assertEquals(expected.length, actual.length);
- for (int i=0; i < expected.length; i++){
+ for (int i = 0; i < expected.length; i++) {
assertNotNull("The EJBObject Handle returned is null", actual[i]);
assertNotNull("The EJBObject in the Handle is null", actual[i].getEJBObject());
assertTrue("The EJBObjects in the Handles are not equal", expected[i].getEJBObject().isIdentical(actual[i].getEJBObject()));
}
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
@@ -894,6 +894,7 @@ public class CmpRmiIiopTests extends Cmp
public void test55_returnObjectGraph() {
}
+
public void test56_returnObjectGraphArray() {
}
@@ -902,47 +903,47 @@ public class CmpRmiIiopTests extends Cmp
/*-------------------------------------------------*/
public void test57_returnClass() {
- Class[] primitives = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
- for (Class expected : primitives) {
+ final Class[] primitives = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
+ for (final Class expected : primitives) {
try {
- Class actual = ejbObject.returnClass(expected);
+ final Class actual = ejbObject.returnClass(expected);
assertEquals(expected, actual);
- } catch (Exception e) {
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
}
public void test58_returnClassArray() {
try {
- Class[] expected = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
- Class[] actual = ejbObject.returnClassArray(expected);
+ final Class[] expected = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
+ final Class[] actual = ejbObject.returnClassArray(expected);
assertEquals(expected.length, actual.length);
for (int i = 0; i < expected.length; i++) {
assertEquals(expected[i], actual[i]);
}
- } catch (RemoteException e) {
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final RemoteException e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
public void test59_returnClassObjectGraph() {
try {
- Class[] primitives = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
- ObjectGraph expectedGraph = new ObjectGraph(primitives);
+ final Class[] primitives = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
+ final ObjectGraph expectedGraph = new ObjectGraph(primitives);
- ObjectGraph actualGraph = ejbObject.returnObjectGraph(expectedGraph);
+ final ObjectGraph actualGraph = ejbObject.returnObjectGraph(expectedGraph);
- Class[] expected = (Class[]) expectedGraph.getObject();
- Class[] actual = (Class[]) actualGraph.getObject();
+ final Class[] expected = (Class[]) expectedGraph.getObject();
+ final Class[] actual = (Class[]) actualGraph.getObject();
assertEquals(expected.length, actual.length);
for (int i = 0; i < expected.length; i++) {
assertEquals(expected[i], actual[i]);
}
- } catch (RemoteException e) {
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final RemoteException e) {
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java Tue Jul 15 21:55:09 2014
@@ -26,37 +26,36 @@ import javax.naming.InitialContext;
import org.apache.openejb.test.TestManager;
-public abstract class CmpTestClient extends org.apache.openejb.test.NamedTestCase{
-
+public abstract class CmpTestClient extends org.apache.openejb.test.NamedTestCase {
+
protected InitialContext initialContext;
-
- protected EJBMetaData ejbMetaData;
- protected HomeHandle ejbHomeHandle;
- protected Handle ejbHandle;
- protected Object ejbPrimaryKey;
- public CmpTestClient(String name){
- super("Entity.CMP."+name);
+ protected EJBMetaData ejbMetaData;
+ protected HomeHandle ejbHomeHandle;
+ protected Handle ejbHandle;
+ protected Object ejbPrimaryKey;
+
+ public CmpTestClient(final String name) {
+ super("Entity.CMP." + name);
}
-
+
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*/
protected void setUp() throws Exception {
-
- Properties properties = TestManager.getServer().getContextEnvironment();
+
+ final Properties properties = TestManager.getServer().getContextEnvironment();
//properties.put(Context.SECURITY_PRINCIPAL, "ENTITY_TEST_CLIENT");
//properties.put(Context.SECURITY_CREDENTIALS, "ENTITY_TEST_CLIENT");
-
+
initialContext = new InitialContext(properties);
-
+
}
+
protected void tearDown() throws Exception {
-
+
}
-
-
-
-
+
+
}
Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestSuite.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestSuite.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestSuite.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestSuite.java Tue Jul 15 21:55:09 2014
@@ -64,10 +64,10 @@ public class CmpTestSuite extends org.ap
* This method is called before a test is executed.
*/
protected void setUp() throws Exception {
- Properties props = TestManager.getServer().getContextEnvironment();
+ final Properties props = TestManager.getServer().getContextEnvironment();
//props.put(Context.SECURITY_PRINCIPAL, "ENTITY_TEST_CLIENT");
//props.put(Context.SECURITY_CREDENTIALS, "ENTITY_TEST_CLIENT");
- InitialContext initialContext = new InitialContext(props);
+ final InitialContext initialContext = new InitialContext(props);
/*[2] Create database table */
TestManager.getDatabase().createEntityTable();
Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpTestClient.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpTestClient.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpTestClient.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpTestClient.java Tue Jul 15 21:55:09 2014
@@ -17,12 +17,12 @@
*/
package org.apache.openejb.test.entity.cmp;
-public abstract class ComplexCmpTestClient extends CmpTestClient{
+public abstract class ComplexCmpTestClient extends CmpTestClient {
- protected ComplexCmpHome ejbHome;
+ protected ComplexCmpHome ejbHome;
protected ComplexCmpObject ejbObject;
- public ComplexCmpTestClient(String name){
+ public ComplexCmpTestClient(final String name) {
super(name);
}
}