[jboss-cvs] JBossAS SVN: r69310 - projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 24 15:32:46 EST 2008
Author: kabir.khan at jboss.com
Date: 2008-01-24 15:32:45 -0500 (Thu, 24 Jan 2008)
New Revision: 69310
Added:
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java
Log:
[JBAOP-467] Add reserialization tests for all scenarios
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate extends SerializeContainerProxyWithNonInitialisedAdvicesDelegate
+{
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase extends ReSerializeContainerProxyWithNonInitialisedAdvicesTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate()));
+ }
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase extends ReSerializeContainerProxyWithNonInitialisedAdvicesTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.class.getName()));
+ }
+
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import java.rmi.MarshalledObject;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithNonInitialisedAdvicesTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithNonInitialisedAdvicesTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testReserializeProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ MarshalledObject mo = new MarshalledObject(si);
+ Object o = mo.get();
+ assertNotNull(o);
+ SomeInterface rsi = (SomeInterface)o;
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ TestInterceptor3.invoked = false;
+ TestInterceptor4.invoked = false;
+ TestInterceptor5.invoked = false;
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ TestAspect3.invoked = false;
+ TestAspect4.invoked = false;
+ TestAspect5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ assertTrue(TestInterceptor3.invoked);
+ assertTrue(TestInterceptor4.invoked);
+ assertTrue(TestInterceptor5.invoked);
+ assertTrue(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ assertTrue(TestAspect3.invoked);
+ assertTrue(TestAspect4.invoked);
+ assertTrue(TestAspect5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithScopedAspectsDelegate extends SerializeContainerProxyWithScopedAspectsDelegate
+{
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithScopedAspectsInVmTestCase extends ReSerializeContainerProxyWithScopedAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithScopedAspectsInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithScopedAspectsInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithScopedAspectsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithScopedAspectsDelegate()));
+ }
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase extends ReSerializeContainerProxyWithScopedAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithScopedAspectsDelegate.class.getName()));
+ }
+
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import java.rmi.MarshalledObject;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithScopedAspectsTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithScopedAspectsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testReserializeProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ MarshalledObject mo = new MarshalledObject(si);
+ Object o = mo.get();
+ assertNotNull(o);
+ SomeInterface rsi = (SomeInterface)o;
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ TestAspect3.invoked = false;
+ TestAspect4.invoked = false;
+ TestAspect5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ assertTrue(TestAspect3.invoked);
+ assertTrue(TestAspect4.invoked);
+ assertTrue(TestAspect5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithScopedInterceptorsDelegate extends SerializeContainerProxyWithScopedInterceptorsDelegate
+{
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase extends ReSerializeContainerProxyWithScopedInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithScopedInterceptorsDelegate()));
+ }
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase extends ReSerializeContainerProxyWithScopedInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithScopedInterceptorsDelegate.class.getName()));
+ }
+
+}
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java 2008-01-24 20:32:45 UTC (rev 69310)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithScopedInterceptorsTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithScopedInterceptorsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ TestInterceptor3.invoked = false;
+ TestInterceptor4.invoked = false;
+ TestInterceptor5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ assertTrue(TestInterceptor3.invoked);
+ assertTrue(TestInterceptor4.invoked);
+ assertTrue(TestInterceptor5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
More information about the jboss-cvs-commits
mailing list