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 [9/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/cont...
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/ContextLookupMdbPojoBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/ContextLookupMdbPojoBean.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/ContextLookupMdbPojoBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/ContextLookupMdbPojoBean.java Mon Jul 7 19:07:41 2014
@@ -57,7 +57,7 @@ public class ContextLookupMdbPojoBean im
try {
final ConnectionFactory connectionFactory = (ConnectionFactory) new InitialContext().lookup("java:comp/env/jms");
mdbInvoker = new MdbInvoker(connectionFactory, this);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new EJBException(e);
}
}
@@ -78,11 +78,11 @@ public class ContextLookupMdbPojoBean im
// "***************************************\n\n");
try {
message.acknowledge();
- } catch (JMSException e) {
+ } catch (final JMSException e) {
e.printStackTrace();
}
mdbInvoker.onMessage(message);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
e.printStackTrace();
}
}
@@ -96,10 +96,10 @@ public class ContextLookupMdbPojoBean im
final BasicBmpObject object = home.createObject("Enc Bean");
Assert.assertNotNull("The EJBObject is null", object);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -112,10 +112,10 @@ public class ContextLookupMdbPojoBean im
final BasicStatefulObject object = home.createObject("Enc Bean");
Assert.assertNotNull("The EJBObject is null", object);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -128,10 +128,10 @@ public class ContextLookupMdbPojoBean im
final BasicStatelessObject object = home.createObject();
Assert.assertNotNull("The EJBObject is null", object);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -141,10 +141,10 @@ public class ContextLookupMdbPojoBean im
try {
final BasicStatelessBusinessLocal object = (BasicStatelessBusinessLocal) getMessageDrivenContext().lookup("stateless/beanReferences/stateless-business-local");
Assert.assertNotNull("The EJB BusinessLocal is null", object);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -154,10 +154,10 @@ public class ContextLookupMdbPojoBean im
try {
final BasicStatelessBusinessRemote object = (BasicStatelessBusinessRemote) getMessageDrivenContext().lookup("stateless/beanReferences/stateless-business-remote");
Assert.assertNotNull("The EJB BusinessRemote is null", object);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -167,10 +167,10 @@ public class ContextLookupMdbPojoBean im
try {
final BasicStatefulBusinessLocal object = (BasicStatefulBusinessLocal) getMessageDrivenContext().lookup("stateless/beanReferences/stateful-business-local");
Assert.assertNotNull("The EJB BusinessLocal is null", object);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -180,10 +180,10 @@ public class ContextLookupMdbPojoBean im
try {
final BasicStatefulBusinessRemote object = (BasicStatefulBusinessRemote) getMessageDrivenContext().lookup("stateless/beanReferences/stateful-business-remote");
Assert.assertNotNull("The EJB BusinessRemote is null", object);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -198,10 +198,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The String looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -215,10 +215,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The Double looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -232,10 +232,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The Long looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -249,10 +249,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The Float looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -266,10 +266,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The Integer looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -283,10 +283,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The Short looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -300,10 +300,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The Boolean looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -317,10 +317,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The Byte looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -334,10 +334,10 @@ public class ContextLookupMdbPojoBean im
Assert.assertNotNull("The Character looked up is null", actual);
Assert.assertEquals(expected, actual);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -348,10 +348,10 @@ public class ContextLookupMdbPojoBean im
final Object obj = getMessageDrivenContext().lookup("datasource");
Assert.assertNotNull("The DataSource is null", obj);
Assert.assertTrue("Not an instance of DataSource", obj instanceof DataSource);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -376,11 +376,11 @@ public class ContextLookupMdbPojoBean im
Assert.assertTrue("Not an instance of QueueConnectionFactory", obj instanceof QueueConnectionFactory);
final QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) obj;
testJmsConnection(queueConnectionFactory.createConnection());
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -403,10 +403,10 @@ public class ContextLookupMdbPojoBean im
final EntityManagerFactory emf = (EntityManagerFactory) ctx.lookup("java:comp/env/persistence/TestUnit");
Assert.assertNotNull("The EntityManagerFactory is null", emf);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -424,10 +424,10 @@ public class ContextLookupMdbPojoBean im
// lookup using global name
final EJBContext ejbCtx = (EJBContext) ctx.lookup("java:comp/EJBContext");
Assert.assertNotNull("The MessageDrivenContext got from java:comp/EJBContext is null ", ejbCtx);
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
@@ -443,10 +443,10 @@ public class ContextLookupMdbPojoBean im
// call a do nothing method to assure entity manager actually exists
em.getFlushMode();
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -459,7 +459,7 @@ public class ContextLookupMdbPojoBean im
MessageDrivenContext ejbContext = null;
try {
ejbContext = (MessageDrivenContext) new InitialContext().lookup("java:comp/EJBContext");
- } catch (NamingException e) {
+ } catch (final NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/EncMdbBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/EncMdbBean.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/EncMdbBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/EncMdbBean.java Mon Jul 7 19:07:41 2014
@@ -52,7 +52,7 @@ import org.junit.Assert;
import junit.framework.AssertionFailedError;
public class EncMdbBean implements EncMdbObject, MessageDrivenBean, MessageListener {
- private MessageDrivenContext mdbContext = null;
+ private MessageDrivenContext mdbContext = null;
private MdbInvoker mdbInvoker;
@Override
@@ -61,7 +61,7 @@ public class EncMdbBean implements EncMd
try {
final ConnectionFactory connectionFactory = (ConnectionFactory) new InitialContext().lookup("java:comp/env/jms");
mdbInvoker = new MdbInvoker(connectionFactory, this);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new EJBException(e);
}
}
@@ -75,355 +75,355 @@ public class EncMdbBean implements EncMd
// "***************************************\n\n");
try {
message.acknowledge();
- } catch (JMSException e) {
+ } catch (final JMSException e) {
e.printStackTrace();
}
mdbInvoker.onMessage(message);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
e.printStackTrace();
}
}
@Override
public void lookupEntityBean() throws TestFailureException {
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final BasicBmpHome home = (BasicBmpHome) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/bmp_entity"), BasicBmpHome.class );
- Assert.assertNotNull("The EJBHome looked up is null",home);
+ final BasicBmpHome home = (BasicBmpHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/bmp_entity"), BasicBmpHome.class);
+ Assert.assertNotNull("The EJBHome looked up is null", home);
- final BasicBmpObject object = home.createObject("Enc Bean");
- Assert.assertNotNull("The EJBObject is null", object );
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ final BasicBmpObject object = home.createObject("Enc Bean");
+ Assert.assertNotNull("The EJBObject is null", object);
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupStatefulBean() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupStatefulBean() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final BasicStatefulHome home = (BasicStatefulHome) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateful"), BasicStatefulHome.class );
- Assert.assertNotNull("The EJBHome looked up is null",home);
+ final BasicStatefulHome home = (BasicStatefulHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateful"), BasicStatefulHome.class);
+ Assert.assertNotNull("The EJBHome looked up is null", home);
- final BasicStatefulObject object = home.createObject("Enc Bean");
- Assert.assertNotNull("The EJBObject is null", object );
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ final BasicStatefulObject object = home.createObject("Enc Bean");
+ Assert.assertNotNull("The EJBObject is null", object);
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupStatelessBean() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupStatelessBean() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final BasicStatelessHome home = (BasicStatelessHome) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateless"), BasicStatelessHome.class );
- Assert.assertNotNull("The EJBHome looked up is null",home);
+ final BasicStatelessHome home = (BasicStatelessHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateless"), BasicStatelessHome.class);
+ Assert.assertNotNull("The EJBHome looked up is null", home);
- final BasicStatelessObject object = home.createObject();
- Assert.assertNotNull("The EJBObject is null", object );
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ final BasicStatelessObject object = home.createObject();
+ Assert.assertNotNull("The EJBObject is null", object);
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupStatelessBusinessLocal() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupStatelessBusinessLocal() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
final Object o = ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-local");
final BasicStatelessBusinessLocal object = (BasicStatelessBusinessLocal) o;
- Assert.assertNotNull("The EJB BusinessLocal is null", object );
- } catch (Exception e){
+ Assert.assertNotNull("The EJB BusinessLocal is null", object);
+ } catch (final Exception e) {
e.printStackTrace();
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupStatelessBusinessRemote() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupStatelessBusinessRemote() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final BasicStatelessBusinessRemote object = (BasicStatelessBusinessRemote) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-remote"), BasicStatelessBusinessRemote.class );
- Assert.assertNotNull("The EJB BusinessRemote is null", object );
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ final BasicStatelessBusinessRemote object = (BasicStatelessBusinessRemote) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-remote"), BasicStatelessBusinessRemote.class);
+ Assert.assertNotNull("The EJB BusinessRemote is null", object);
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupStatefulBusinessLocal() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupStatefulBusinessLocal() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final BasicStatefulBusinessLocal object = (BasicStatefulBusinessLocal) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-local"), BasicStatefulBusinessLocal.class );
- Assert.assertNotNull("The EJB BusinessLocal is null", object );
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ final BasicStatefulBusinessLocal object = (BasicStatefulBusinessLocal) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-local"), BasicStatefulBusinessLocal.class);
+ Assert.assertNotNull("The EJB BusinessLocal is null", object);
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupStatefulBusinessRemote() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupStatefulBusinessRemote() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final BasicStatefulBusinessRemote object = (BasicStatefulBusinessRemote) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-remote"), BasicStatefulBusinessRemote.class );
- Assert.assertNotNull("The EJB BusinessRemote is null", object );
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ final BasicStatefulBusinessRemote object = (BasicStatefulBusinessRemote) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-remote"), BasicStatefulBusinessRemote.class);
+ Assert.assertNotNull("The EJB BusinessRemote is null", object);
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupStringEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupStringEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final String expected = "1";
- final String actual = (String)ctx.lookup("java:comp/env/stateless/references/String");
+ final String expected = "1";
+ final String actual = (String) ctx.lookup("java:comp/env/stateless/references/String");
- Assert.assertNotNull("The String looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The String looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupDoubleEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupDoubleEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final Double expected = 1.0D;
- final Double actual = (Double)ctx.lookup("java:comp/env/stateless/references/Double");
+ final Double expected = 1.0D;
+ final Double actual = (Double) ctx.lookup("java:comp/env/stateless/references/Double");
- Assert.assertNotNull("The Double looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The Double looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupLongEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupLongEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final Long expected = 1L;
- final Long actual = (Long)ctx.lookup("java:comp/env/stateless/references/Long");
+ final Long expected = 1L;
+ final Long actual = (Long) ctx.lookup("java:comp/env/stateless/references/Long");
- Assert.assertNotNull("The Long looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The Long looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupFloatEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupFloatEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final Float expected = 1.0F;
- final Float actual = (Float)ctx.lookup("java:comp/env/stateless/references/Float");
+ final Float expected = 1.0F;
+ final Float actual = (Float) ctx.lookup("java:comp/env/stateless/references/Float");
- Assert.assertNotNull("The Float looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The Float looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupIntegerEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupIntegerEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final Integer expected = 1;
- final Integer actual = (Integer)ctx.lookup("java:comp/env/stateless/references/Integer");
+ final Integer expected = 1;
+ final Integer actual = (Integer) ctx.lookup("java:comp/env/stateless/references/Integer");
- Assert.assertNotNull("The Integer looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The Integer looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupShortEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupShortEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final Short expected = (short) 1;
- final Short actual = (Short)ctx.lookup("java:comp/env/stateless/references/Short");
+ final Short expected = (short) 1;
+ final Short actual = (Short) ctx.lookup("java:comp/env/stateless/references/Short");
- Assert.assertNotNull("The Short looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The Short looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupBooleanEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupBooleanEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final Boolean expected = true;
- final Boolean actual = (Boolean)ctx.lookup("java:comp/env/stateless/references/Boolean");
+ final Boolean expected = true;
+ final Boolean actual = (Boolean) ctx.lookup("java:comp/env/stateless/references/Boolean");
- Assert.assertNotNull("The Boolean looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The Boolean looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupByteEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupByteEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final Byte expected = (byte) 1;
- final Byte actual = (Byte)ctx.lookup("java:comp/env/stateless/references/Byte");
+ final Byte expected = (byte) 1;
+ final Byte actual = (Byte) ctx.lookup("java:comp/env/stateless/references/Byte");
- Assert.assertNotNull("The Byte looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The Byte looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupCharacterEntry() throws TestFailureException{
- try{
- try{
- final InitialContext ctx = new InitialContext();
- Assert.assertNotNull("The InitialContext is null", ctx );
+ public void lookupCharacterEntry() throws TestFailureException {
+ try {
+ try {
+ final InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
- final Character expected = 'D';
- final Character actual = (Character)ctx.lookup("java:comp/env/stateless/references/Character");
+ final Character expected = 'D';
+ final Character actual = (Character) ctx.lookup("java:comp/env/stateless/references/Character");
- Assert.assertNotNull("The Character looked up is null", actual );
- Assert.assertEquals(expected, actual );
+ Assert.assertNotNull("The Character looked up is null", actual);
+ Assert.assertEquals(expected, actual);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupResource() throws TestFailureException{
- try{
- try{
+ public void lookupResource() throws TestFailureException {
+ try {
+ try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
final Object obj = ctx.lookup("java:comp/env/datasource");
Assert.assertNotNull("The DataSource is null", obj);
Assert.assertTrue("Not an instance of DataSource", obj instanceof DataSource);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupJMSConnectionFactory() throws TestFailureException{
- try{
- try{
+ public void lookupJMSConnectionFactory() throws TestFailureException {
+ try {
+ try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
Object obj = ctx.lookup("java:comp/env/jms");
@@ -443,11 +443,11 @@ public class EncMdbBean implements EncMd
Assert.assertTrue("Not an instance of QueueConnectionFactory", obj instanceof QueueConnectionFactory);
final QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) obj;
testJmsConnection(queueConnectionFactory.createConnection());
- } catch (Exception e){
+ } catch (final Exception e) {
e.printStackTrace();
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -463,74 +463,74 @@ public class EncMdbBean implements EncMd
}
@Override
- public void lookupPersistenceUnit() throws TestFailureException{
- try{
- try{
+ public void lookupPersistenceUnit() throws TestFailureException {
+ try {
+ try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
- final EntityManagerFactory emf = (EntityManagerFactory)ctx.lookup("java:comp/env/persistence/TestUnit");
- Assert.assertNotNull("The EntityManagerFactory is null", emf );
+ final EntityManagerFactory emf = (EntityManagerFactory) ctx.lookup("java:comp/env/persistence/TestUnit");
+ Assert.assertNotNull("The EntityManagerFactory is null", emf);
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupPersistenceContext() throws TestFailureException{
- try{
- try{
+ public void lookupPersistenceContext() throws TestFailureException {
+ try {
+ try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
- final EntityManager em = (EntityManager)ctx.lookup("java:comp/env/persistence/TestContext");
+ final EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/TestContext");
Assert.assertNotNull("The EntityManager is null", em);
// call a do nothing method to assure entity manager actually exists
em.getFlushMode();
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@Override
- public void lookupMessageDrivenContext() throws TestFailureException{
- try{
- try{
+ public void lookupMessageDrivenContext() throws TestFailureException {
+ try {
+ try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
// lookup in enc
- final MessageDrivenContext messageDrivenContext = (MessageDrivenContext)ctx.lookup("java:comp/env/mdbcontext");
- Assert.assertNotNull("The SessionContext got from java:comp/env/mdbcontext is null", messageDrivenContext );
+ final MessageDrivenContext messageDrivenContext = (MessageDrivenContext) ctx.lookup("java:comp/env/mdbcontext");
+ Assert.assertNotNull("The SessionContext got from java:comp/env/mdbcontext is null", messageDrivenContext);
// lookup using global name
- final EJBContext ejbCtx = (EJBContext)ctx.lookup("java:comp/EJBContext");
- Assert.assertNotNull("The SessionContext got from java:comp/EJBContext is null ", ejbCtx );
+ final EJBContext ejbCtx = (EJBContext) ctx.lookup("java:comp/EJBContext");
+ Assert.assertNotNull("The SessionContext got from java:comp/EJBContext is null ", ejbCtx);
// verify context was set via legacy set method
- Assert.assertNotNull("The MdbContext is null from setter method", mdbContext );
- } catch (Exception e){
- Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ Assert.assertNotNull("The MdbContext is null from setter method", mdbContext);
+ } catch (final Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe){
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
- public void ejbCreate() throws javax.ejb.CreateException{
+ public void ejbCreate() throws javax.ejb.CreateException {
}
@Override
public void ejbRemove() throws EJBException {
- if(null != mdbInvoker){
+ if (null != mdbInvoker) {
mdbInvoker.destroy();
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/FieldInjectionMdbBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/FieldInjectionMdbBean.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/FieldInjectionMdbBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/FieldInjectionMdbBean.java Mon Jul 7 19:07:41 2014
@@ -83,7 +83,7 @@ public class FieldInjectionMdbBean imple
try {
final ConnectionFactory connectionFactory = (ConnectionFactory) new InitialContext().lookup("java:comp/env/jms");
mdbInvoker = new MdbInvoker(connectionFactory, this);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new EJBException(e);
}
}
@@ -97,11 +97,11 @@ public class FieldInjectionMdbBean imple
// "***************************************\n\n");
try {
message.acknowledge();
- } catch (JMSException e) {
+ } catch (final JMSException e) {
e.printStackTrace();
}
mdbInvoker.onMessage(message);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
e.printStackTrace();
}
}
@@ -113,7 +113,7 @@ public class FieldInjectionMdbBean imple
public void lookupEntityBean() throws TestFailureException {
try {
Assert.assertNotNull("The EJBObject is null", bmpHome);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -122,7 +122,7 @@ public class FieldInjectionMdbBean imple
public void lookupStatefulBean() throws TestFailureException {
try {
Assert.assertNotNull("The EJBObject is null", statefulHome);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -131,7 +131,7 @@ public class FieldInjectionMdbBean imple
public void lookupStatelessBean() throws TestFailureException {
try {
Assert.assertNotNull("The EJBObject is null", statelessHome);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -140,7 +140,7 @@ public class FieldInjectionMdbBean imple
public void lookupStatelessBusinessLocal() throws TestFailureException {
try {
Assert.assertNotNull("The EJB BusinessLocal is null", statelessBusinessLocal);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -149,7 +149,7 @@ public class FieldInjectionMdbBean imple
public void lookupStatelessBusinessRemote() throws TestFailureException {
try {
Assert.assertNotNull("The EJB BusinessRemote is null", statelessBusinessRemote);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -158,7 +158,7 @@ public class FieldInjectionMdbBean imple
public void lookupStatefulBusinessLocal() throws TestFailureException {
try {
Assert.assertNotNull("The EJB BusinessLocal is null", statefulBusinessLocal);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -167,7 +167,7 @@ public class FieldInjectionMdbBean imple
public void lookupStatefulBusinessRemote() throws TestFailureException {
try {
Assert.assertNotNull("The EJB BusinessRemote is null", statefulBusinessRemote);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -178,7 +178,7 @@ public class FieldInjectionMdbBean imple
final String expected = "1";
Assert.assertNotNull("The String looked up is null", striing);
Assert.assertEquals(expected, striing);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -191,7 +191,7 @@ public class FieldInjectionMdbBean imple
Assert.assertNotNull("The Double looked up is null", doouble);
Assert.assertEquals(expected, doouble);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -203,7 +203,7 @@ public class FieldInjectionMdbBean imple
Assert.assertNotNull("The Long looked up is null", loong);
Assert.assertEquals(expected, loong);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -215,7 +215,7 @@ public class FieldInjectionMdbBean imple
Assert.assertNotNull("The Float looked up is null", flooat);
Assert.assertEquals(expected, flooat);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -228,7 +228,7 @@ public class FieldInjectionMdbBean imple
Assert.assertNotNull("The Integer looked up is null", inteeger);
Assert.assertEquals(expected, inteeger);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -240,7 +240,7 @@ public class FieldInjectionMdbBean imple
Assert.assertNotNull("The Short looked up is null", shoort);
Assert.assertEquals(expected, shoort);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -252,7 +252,7 @@ public class FieldInjectionMdbBean imple
Assert.assertNotNull("The Boolean looked up is null", booolean);
Assert.assertEquals(expected, booolean);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -264,7 +264,7 @@ public class FieldInjectionMdbBean imple
Assert.assertNotNull("The Byte looked up is null", byyte);
Assert.assertEquals(expected, byyte);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -276,7 +276,7 @@ public class FieldInjectionMdbBean imple
Assert.assertNotNull("The Character looked up is null", chaaracter);
Assert.assertEquals(expected, chaaracter);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -285,7 +285,7 @@ public class FieldInjectionMdbBean imple
public void lookupResource() throws TestFailureException {
try {
Assert.assertNotNull("The DataSource is null", daataSource);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -297,11 +297,11 @@ public class FieldInjectionMdbBean imple
testJmsConnection(coonnectionFactory.createConnection());
testJmsConnection(queueCoonnectionFactory.createConnection());
testJmsConnection(topicCoonnectionFactory.createConnection());
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -320,7 +320,7 @@ public class FieldInjectionMdbBean imple
public void lookupPersistenceUnit() throws TestFailureException {
try {
Assert.assertNotNull("The EntityManagerFactory is null", emf);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -333,10 +333,10 @@ public class FieldInjectionMdbBean imple
try {
// call a do nothing method to assure entity manager actually exists
em.getFlushMode();
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -345,7 +345,7 @@ public class FieldInjectionMdbBean imple
public void lookupMessageDrivenContext() throws TestFailureException {
try {
Assert.assertNotNull("The MessageDrivenContext is null", ejbContext);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbBean.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbBean.java Mon Jul 7 19:07:41 2014
@@ -41,8 +41,8 @@ import javax.jms.Session;
@Interceptors({MdbInterceptor.class})
@MessageDriven(activationConfig = {
- @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
- @ActivationConfigProperty(propertyName = "destination", propertyValue = "InterceptorMdbBean")})
+ @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
+ @ActivationConfigProperty(propertyName = "destination", propertyValue = "InterceptorMdbBean")})
public class InterceptorMdbBean implements MessageListener, MessageDrivenBean {
private boolean classLevelBusinessMethodInterception = false;
@@ -63,11 +63,11 @@ public class InterceptorMdbBean implemen
methodLevelBusinessMethodInterception = msg.getBooleanProperty("MethodLevelBusinessMethodInterception");
try {
msg.acknowledge();
- } catch (JMSException e) {
+ } catch (final JMSException e) {
e.printStackTrace();
}
mdbInvoker.onMessage(msg);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
e.printStackTrace();
}
}
@@ -90,7 +90,7 @@ public class InterceptorMdbBean implemen
public void checkMethodLevelBusinessMethodInterception() throws TestFailureException {
try {
Assert.assertTrue("Method Level Business Method Interception failed for Mdb", methodLevelBusinessMethodInterception);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -98,7 +98,7 @@ public class InterceptorMdbBean implemen
public void checkMethodLevelCreateMethodInterception() throws TestFailureException {
try {
Assert.assertTrue("Method Level Business Method Interception failed for Mdb", methodLevelCreateMethodInterception);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -107,7 +107,7 @@ public class InterceptorMdbBean implemen
public void checkClassLevelBusinessMethodInterception() throws TestFailureException {
try {
Assert.assertTrue("Class Level Business Method Interception failed for Mdb", classLevelBusinessMethodInterception);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -115,7 +115,7 @@ public class InterceptorMdbBean implemen
public void checkClassLevelCreateMethodInterception() throws TestFailureException {
try {
Assert.assertTrue("Class Level Business Method Interception failed for Mdb", classLevelCreateMethodInterception);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -135,7 +135,7 @@ public class InterceptorMdbBean implemen
this.mdbContext = ctx;
try {
mdbInvoker = new MdbInvoker(connectionFactory, this);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new EJBException(e);
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInterceptor.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInterceptor.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInterceptor.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInterceptor.java Mon Jul 7 19:07:41 2014
@@ -44,23 +44,22 @@ public class MdbInterceptor {
@AroundInvoke
- public Object mdbInterceptor(InvocationContext ctx) throws Exception
- {
- Object[] objArr = ctx.getParameters();
- Message msg = (Message)objArr[0];
- msg.clearProperties();
- msg.setBooleanProperty("ClassLevelBusinessMethodInterception",true);
- ctx.setParameters(objArr);
- return ctx.proceed();
+ public Object mdbInterceptor(final InvocationContext ctx) throws Exception {
+ final Object[] objArr = ctx.getParameters();
+ final Message msg = (Message) objArr[0];
+ msg.clearProperties();
+ msg.setBooleanProperty("ClassLevelBusinessMethodInterception", true);
+ ctx.setParameters(objArr);
+ return ctx.proceed();
}
@PreDestroy
- public void interceptRemove(InvocationContext ctx) throws Exception {
+ public void interceptRemove(final InvocationContext ctx) throws Exception {
ctx.proceed();
}
@PostConstruct
- public void postConstruct(InvocationContext ctx) throws Exception {
+ public void postConstruct(final InvocationContext ctx) throws Exception {
InterceptorMdbBean.classLevelCreateMethodInterception = true;
ctx.proceed();
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInvoker.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInvoker.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInvoker.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInvoker.java Mon Jul 7 19:07:41 2014
@@ -83,7 +83,7 @@ public class MdbInvoker implements Messa
try {
new InitialContext().lookup("java:comp/UserTransaction");
isBeanManagedTransaction = true;
- } catch (NamingException e) {
+ } catch (final NamingException e) {
//Ignore - Not transacted
}
@@ -112,7 +112,8 @@ public class MdbInvoker implements Messa
if (session == null) throw new IllegalStateException("Invoker has been destroyed");
if (message == null) throw new NullPointerException("request message is null");
- if (!(message instanceof ObjectMessage)) throw new IllegalArgumentException("Expected a ObjectMessage request but got a " + message.getClass().getName());
+ if (!(message instanceof ObjectMessage))
+ throw new IllegalArgumentException("Expected a ObjectMessage request but got a " + message.getClass().getName());
final Serializable object = ((ObjectMessage) message).getObject();
if (object == null) throw new NullPointerException("object in ObjectMessage is null");
if (!(object instanceof Map)) {
@@ -124,21 +125,22 @@ public class MdbInvoker implements Messa
final String signature = (String) request.get("method");
if (signature == null) throw new NullPointerException("method property is null");
final Method method = signatures.get(signature);
- if (method == null) throw new IllegalArgumentException("no such method " + signature + "; known methods are " + signatures.keySet());
+ if (method == null)
+ throw new IllegalArgumentException("no such method " + signature + "; known methods are " + signatures.keySet());
final Object[] args = (Object[]) request.get("args");
boolean exception = false;
Object result;
try {
result = method.invoke(target, args);
- } catch (IllegalAccessException e) {
+ } catch (final IllegalAccessException e) {
result = e;
exception = true;
- } catch (InvocationTargetException e) {
+ } catch (final InvocationTargetException e) {
result = e.getCause();
if (result == null) result = e;
exception = true;
- } catch (Exception e) {
+ } catch (final Exception e) {
result = e.getCause();
if (result == null) result = e;
exception = true;
@@ -160,10 +162,10 @@ public class MdbInvoker implements Messa
// send response message
replyProducer.send(message.getJMSReplyTo(), resMessage);
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
}
- } catch (Throwable e) {
+ } catch (final Throwable e) {
e.printStackTrace();
} finally {
this.destroy();
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbProxy.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbProxy.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbProxy.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbProxy.java Mon Jul 7 19:07:41 2014
@@ -162,11 +162,13 @@ public class MdbProxy {
final Message message = consumer.receive(MdbProxy.MdbInvocationHandler.MAX_RESPONSE_WAIT);
// verify message
- if (message == null) throw new NullPointerException("Did not get a response within " + MdbProxy.MdbInvocationHandler.MAX_RESPONSE_WAIT + "ms");
+ if (message == null)
+ throw new NullPointerException("Did not get a response within " + MdbProxy.MdbInvocationHandler.MAX_RESPONSE_WAIT + "ms");
if (!correlationId.equals(message.getJMSCorrelationID())) {
throw new IllegalStateException("Received a response message with the wrong correlation id");
}
- if (!(message instanceof ObjectMessage)) throw new IllegalArgumentException("Expected a ObjectMessage response but got a " + message.getClass().getName());
+ if (!(message instanceof ObjectMessage))
+ throw new IllegalArgumentException("Expected a ObjectMessage response but got a " + message.getClass().getName());
final ObjectMessage resMessage = (ObjectMessage) message;
final Serializable object = resMessage.getObject();
if (object == null) throw new NullPointerException("object in ObjectMessage is null");
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbUtil.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbUtil.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbUtil.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbUtil.java Mon Jul 7 19:07:41 2014
@@ -44,7 +44,7 @@ public class MdbUtil {
if (closeable != null) {
try {
closeable.close();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
//Ignore
}
}
@@ -54,7 +54,7 @@ public class MdbUtil {
if (closeable != null) {
try {
closeable.close();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
//Ignore
}
}
@@ -64,7 +64,7 @@ public class MdbUtil {
if (closeable != null) {
try {
closeable.close();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
//Ignore
}
}
@@ -75,13 +75,13 @@ public class MdbUtil {
try {
closeable.stop();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
//Ignore
}
try {
closeable.close();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
//Ignore
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/SetterInjectionMdbBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/SetterInjectionMdbBean.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/SetterInjectionMdbBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/SetterInjectionMdbBean.java Mon Jul 7 19:07:41 2014
@@ -82,7 +82,7 @@ public class SetterInjectionMdbBean impl
try {
final ConnectionFactory connectionFactory = (ConnectionFactory) new InitialContext().lookup("java:comp/env/jms");
mdbInvoker = new MdbInvoker(connectionFactory, this);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new EJBException(e);
}
}
@@ -94,8 +94,8 @@ public class SetterInjectionMdbBean impl
// "***************************************\n" +
// "Got message: " + message + "\n" +
// "***************************************\n\n");
- mdbInvoker.onMessage(message);
- } catch (Throwable e) {
+ mdbInvoker.onMessage(message);
+ } catch (final Throwable e) {
e.printStackTrace();
}
}
@@ -307,7 +307,7 @@ public class SetterInjectionMdbBean impl
public void lookupEntityBean() throws TestFailureException {
try {
Assert.assertNotNull("The EJBObject is null", bmpHomeField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -316,7 +316,7 @@ public class SetterInjectionMdbBean impl
public void lookupStatefulBean() throws TestFailureException {
try {
Assert.assertNotNull("The EJBObject is null", statefulHomeField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -325,7 +325,7 @@ public class SetterInjectionMdbBean impl
public void lookupStatelessBean() throws TestFailureException {
try {
Assert.assertNotNull("The EJBObject is null", statelessHomeField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -334,7 +334,7 @@ public class SetterInjectionMdbBean impl
public void lookupStatelessBusinessLocal() throws TestFailureException {
try {
Assert.assertNotNull("The EJB BusinessLocal is null", statelessBusinessLocalField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -343,7 +343,7 @@ public class SetterInjectionMdbBean impl
public void lookupStatelessBusinessRemote() throws TestFailureException {
try {
Assert.assertNotNull("The EJB BusinessRemote is null", statelessBusinessRemoteField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -352,7 +352,7 @@ public class SetterInjectionMdbBean impl
public void lookupStatefulBusinessLocal() throws TestFailureException {
try {
Assert.assertNotNull("The EJB BusinessLocal is null", statefulBusinessLocalField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -361,7 +361,7 @@ public class SetterInjectionMdbBean impl
public void lookupStatefulBusinessRemote() throws TestFailureException {
try {
Assert.assertNotNull("The EJB BusinessRemote is null", statefulBusinessRemoteField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -373,7 +373,7 @@ public class SetterInjectionMdbBean impl
final String expected = "1";
Assert.assertNotNull("The String looked up is null", striingField);
Assert.assertEquals(expected, striingField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -386,7 +386,7 @@ public class SetterInjectionMdbBean impl
Assert.assertNotNull("The Double looked up is null", dooubleField);
Assert.assertEquals(expected, dooubleField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -398,7 +398,7 @@ public class SetterInjectionMdbBean impl
Assert.assertNotNull("The Long looked up is null", loongField);
Assert.assertEquals(expected, loongField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -410,7 +410,7 @@ public class SetterInjectionMdbBean impl
Assert.assertNotNull("The Float looked up is null", flooatField);
Assert.assertEquals(expected, flooatField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -423,7 +423,7 @@ public class SetterInjectionMdbBean impl
Assert.assertNotNull("The Integer looked up is null", inteegerField);
Assert.assertEquals(expected, inteegerField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -435,7 +435,7 @@ public class SetterInjectionMdbBean impl
Assert.assertNotNull("The Short looked up is null", shoortField);
Assert.assertEquals(expected, shoortField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -447,7 +447,7 @@ public class SetterInjectionMdbBean impl
Assert.assertNotNull("The Boolean looked up is null", boooleanField);
Assert.assertEquals(expected, boooleanField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -459,7 +459,7 @@ public class SetterInjectionMdbBean impl
Assert.assertNotNull("The Byte looked up is null", byyteField);
Assert.assertEquals(expected, byyteField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -471,7 +471,7 @@ public class SetterInjectionMdbBean impl
Assert.assertNotNull("The Character looked up is null", chaaracterField);
Assert.assertEquals(expected, chaaracterField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -480,7 +480,7 @@ public class SetterInjectionMdbBean impl
public void lookupResource() throws TestFailureException {
try {
Assert.assertNotNull("The DataSource is null", daataSourceField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -492,11 +492,11 @@ public class SetterInjectionMdbBean impl
testJmsConnection(coonnectionFactory.createConnection());
testJmsConnection(queueCoonnectionFactory.createConnection());
testJmsConnection(topicCoonnectionFactory.createConnection());
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -515,7 +515,7 @@ public class SetterInjectionMdbBean impl
public void lookupPersistenceUnit() throws TestFailureException {
try {
Assert.assertNotNull("The EntityManagerFactory is null", emfField);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -528,10 +528,10 @@ public class SetterInjectionMdbBean impl
try {
// call a do nothing method to assure entity manager actually exists
emField.getFlushMode();
- } catch (Exception e) {
+ } catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
@@ -540,7 +540,7 @@ public class SetterInjectionMdbBean impl
public void lookupMessageDrivenContext() throws TestFailureException {
try {
Assert.assertNotNull("The MessageDrivenContext is null", mdbContext);
- } catch (AssertionFailedError afe) {
+ } catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/object/Account.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/object/Account.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/object/Account.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/object/Account.java Mon Jul 7 19:07:41 2014
@@ -16,67 +16,69 @@
*/
package org.apache.openejb.test.object;
-public class Account implements java.io.Serializable{
-
+public class Account implements java.io.Serializable {
+
private String ssn;
private String firstName;
private String lastName;
private int balance;
- public Account(String ssn, String firstName, String lastName, int balance){
- this.ssn = ssn;
+ public Account(final String ssn, final String firstName, final String lastName, final int balance) {
+ this.ssn = ssn;
this.firstName = firstName.trim();
- this.lastName = lastName.trim();
- this.balance = balance;
+ this.lastName = lastName.trim();
+ this.balance = balance;
}
-
- public Account(){
+
+ public Account() {
}
- public boolean equals(Object object){
- if ( !(object instanceof Account ) ) return false;
+ public boolean equals(final Object object) {
+ if (!(object instanceof Account)) return false;
- Account that = (Account)object;
+ final Account that = (Account) object;
return (this.ssn.equals(that.ssn) &&
- this.firstName.equals(that.firstName) &&
- this.lastName.equals(that.lastName) &&
- this.balance == that.balance);
+ this.firstName.equals(that.firstName) &&
+ this.lastName.equals(that.lastName) &&
+ this.balance == that.balance);
}
- public String getSsn(){
+ public String getSsn() {
return ssn;
}
-
- public void setSsn(String ssn){
+
+ public void setSsn(final String ssn) {
this.ssn = ssn;
}
- public String getFirstName(){
+ public String getFirstName() {
return firstName;
}
-
- public void setFirstName(String firstName){
- this.firstName = (firstName != null)? firstName.trim():null;
+
+ public void setFirstName(final String firstName) {
+ this.firstName = (firstName != null) ? firstName.trim() : null;
}
- public String getLastName(){
+ public String getLastName() {
return lastName;
}
- public void setLastName(String lastName){
- this.lastName = (lastName != null)? lastName.trim():null;
+
+ public void setLastName(final String lastName) {
+ this.lastName = (lastName != null) ? lastName.trim() : null;
}
- public int getBalance(){
+ public int getBalance() {
return balance;
}
- public void setBalance(int balance){
+
+ public void setBalance(final int balance) {
this.balance = balance;
}
- public String toString(){
- return "["+ssn+"]["+firstName+"]["+lastName+"]["+balance+"]";
+ public String toString() {
+ return "[" + ssn + "][" + firstName + "][" + lastName + "][" + balance + "]";
}
}
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/object/ObjectGraph.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/object/ObjectGraph.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/object/ObjectGraph.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/object/ObjectGraph.java Mon Jul 7 19:07:41 2014
@@ -18,27 +18,27 @@ package org.apache.openejb.test.object;
import java.io.Serializable;
-public class ObjectGraph implements Serializable{
-
+public class ObjectGraph implements Serializable {
+
private Serializable object;
- public ObjectGraph(Object obj){
- this.object = (Serializable)obj;
+ public ObjectGraph(final Object obj) {
+ this.object = (Serializable) obj;
}
- public ObjectGraph(){
+ public ObjectGraph() {
}
- public void setObject(Object obj){
- this.object = (Serializable)obj;
+ public void setObject(final Object obj) {
+ this.object = (Serializable) obj;
}
- public Object getObject(){
+ public Object getObject() {
return object;
}
- public String toString(){
- return ((Object)object).toString();
+ public String toString() {
+ return ((Object) object).toString();
}
}