Index: testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/unit/RedeployServiceTestCase.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/unit/RedeployServiceTestCase.java (revision 0)
+++ testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/unit/RedeployServiceTestCase.java (revision 0)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.test.ejbthree1889.unit;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.common.EJB3TestCase;
+import org.jboss.ejb3.test.ejbthree1889.b.EJBTestBRemote;
+
+/**
+ * When a service is redeployed its consumers should be restarted and keep on functioning.
+ *
+ * @author Carlo de Wolf
+ * @version $Revision: $
+ */
+public class RedeployServiceTestCase extends EJB3TestCase
+{
+ public RedeployServiceTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(RedeployServiceTestCase.class, "ejbthree1889a.jar,ejbthree1889b.jar");
+ }
+
+ public void testRedeployA() throws Exception
+ {
+ // all is deployed, so all should be well
+ EJBTestBRemote testB = lookup("EJBTestBService/remote", EJBTestBRemote.class);
+
+ String result = testB.sayHello();
+
+ assertEquals("Hello from A", result);
+
+ redeploy("ejbthree1889a.jar");
+
+ result = testB.sayHello();
+
+ assertEquals("Hello from A", result);
+ }
+}
Index: testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/a/EJBTestAService.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/a/EJBTestAService.java (revision 0)
+++ testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/a/EJBTestAService.java (revision 0)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.test.ejbthree1889.a;
+
+import org.jboss.ejb3.annotation.Service;
+import org.jboss.logging.Logger;
+
+/**
+ * @author Carlo de Wolf
+ * @version $Revision: $
+ */
+@Service(objectName="ejbthree1889:service=EJBTestA")
+public class EJBTestAService implements EJBTestARemote
+{
+ private static final Logger log = Logger.getLogger(EJBTestAService.class);
+
+ public String sayHello()
+ {
+ return "Hello from A";
+ }
+
+ public void start()
+ {
+ log.info("EJBTestA starting...");
+ }
+
+ public void stop()
+ {
+ log.info("EJBTestA stopping...");
+ }
+}
Index: testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/a/EJBTestARemote.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/a/EJBTestARemote.java (revision 0)
+++ testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/a/EJBTestARemote.java (revision 0)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.test.ejbthree1889.a;
+
+import javax.ejb.Remote;
+
+/**
+ * @author Carlo de Wolf
+ * @version $Revision: $
+ */
+@Remote
+public interface EJBTestARemote
+{
+ String sayHello();
+}
Index: testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/b/EJBTestBService.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/b/EJBTestBService.java (revision 0)
+++ testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/b/EJBTestBService.java (revision 0)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.test.ejbthree1889.b;
+
+import javax.ejb.EJB;
+
+import org.jboss.ejb3.annotation.Service;
+import org.jboss.ejb3.test.ejbthree1889.a.EJBTestARemote;
+import org.jboss.logging.Logger;
+
+/**
+ * @author Carlo de Wolf
+ * @version $Revision: $
+ */
+@Service(objectName="ejbthree1889:service=EJBTestB")
+public class EJBTestBService implements EJBTestBRemote
+{
+ private static final Logger log = Logger.getLogger(EJBTestBService.class);
+
+ // since we're injecting something outside of our scope we need to specify mappedName
+ @EJB(mappedName="EJBTestAService/remote")
+ private EJBTestARemote testA;
+
+ public String sayHello()
+ {
+ return testA.sayHello();
+ }
+
+ public void start()
+ {
+ log.info("EJBTestB starting...");
+ }
+
+ public void stop()
+ {
+ log.info("EJBTestB stopping...");
+ }
+}
Index: testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/b/EJBTestBRemote.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/b/EJBTestBRemote.java (revision 0)
+++ testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1889/b/EJBTestBRemote.java (revision 0)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.test.ejbthree1889.b;
+
+import javax.ejb.Remote;
+
+/**
+ * @author Carlo de Wolf
+ * @version $Revision: $
+ */
+@Remote
+public interface EJBTestBRemote
+{
+ String sayHello();
+}
Index: testsuite/src/test/resources/test/ejbthree1889/a/META-INF/jboss.xml
===================================================================
--- testsuite/src/test/resources/test/ejbthree1889/a/META-INF/jboss.xml (revision 0)
+++ testsuite/src/test/resources/test/ejbthree1889/a/META-INF/jboss.xml (revision 0)
@@ -0,0 +1,14 @@
+
+
+
+ jboss.ejb3.test:test=ejbthree1889a
+
+ java2ParentDelegaton=false
+
+
+
Index: testsuite/src/test/resources/test/ejbthree1889/b/META-INF/jboss.xml
===================================================================
--- testsuite/src/test/resources/test/ejbthree1889/b/META-INF/jboss.xml (revision 0)
+++ testsuite/src/test/resources/test/ejbthree1889/b/META-INF/jboss.xml (revision 0)
@@ -0,0 +1,14 @@
+
+
+
+ jboss.ejb3.test:test=ejbthree1889b
+
+ java2ParentDelegaton=false
+
+
+
Index: testsuite/build-test.xml
===================================================================
--- testsuite/build-test.xml (revision 95602)
+++ testsuite/build-test.xml (working copy)
@@ -2451,6 +2451,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+