[Jboss-cvs] JBossAS SVN: r56634 - in branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test: service servlet ssladvanced
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 7 23:18:56 EDT 2006
Author: bill.burke at jboss.com
Date: 2006-09-07 23:18:53 -0400 (Thu, 07 Sep 2006)
New Revision: 56634
Added:
branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionService.java
branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionServiceIF.java
branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30LocalHome.java
branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulBean.java
branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulLocal.java
branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulRemote.java
branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/OverrideStatefulClusteredBean.java
Log:
Added: branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionService.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionService.java 2006-09-08 03:15:50 UTC (rev 56633)
+++ branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionService.java 2006-09-08 03:18:53 UTC (rev 56634)
@@ -0,0 +1,63 @@
+package org.jboss.ejb3.test.service;
+
+import javax.annotation.Resource;
+import javax.jms.Topic;
+import javax.jms.TopicConnectionFactory;
+
+import org.jboss.annotation.ejb.Management;
+import org.jboss.annotation.ejb.Service;
+import org.jboss.logging.Logger;
+
+/**
+ * @version <tt>$Revision: 45190 $</tt>
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Service(objectName = "jboss.ejb3.bugs:service=TestResourceInjectionService")
+ at Management(TestResourceInjectionServiceIF.class)
+public class TestResourceInjectionService implements TestResourceInjectionServiceIF {
+
+ private static Logger log = Logger.getLogger(TestResourceInjectionService.class);
+
+ public boolean testedSuccessful = true;
+
+ @Resource(mappedName = "topic/testTopic")
+ private Topic testTopic;
+
+ @Resource(mappedName = "ConnectionFactory")
+ private TopicConnectionFactory topicConnectionFactory;
+
+ public boolean getTestedSuccessful() {
+ return testedSuccessful;
+ }
+
+// - Service life cycle --------------------------------------------------------
+
+ public void create() throws Exception {
+ log.info("TestResourceInjectionService.create()");
+ testedSuccessful = testTopic != null && topicConnectionFactory != null;
+ }
+
+ public void start() throws Exception {
+ log.info("TestResourceInjectionService.start()");
+ if(testTopic == null)
+ {
+ log.warn("Dependent resource injection 'testTopic' failed");
+ testedSuccessful = false;
+ }
+
+ if(topicConnectionFactory == null)
+ {
+ log.warn("Dependent resource injection 'topicConnectionFactory' failed");
+ testedSuccessful = false;
+ }
+ }
+
+ public void stop() {
+ log.info("TestResourceInjectionService.stop()");
+ }
+
+ public void destroy() {
+ log.info("TestResourceInjectionService.destroy()");
+ }
+
+}
Added: branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionServiceIF.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionServiceIF.java 2006-09-08 03:15:50 UTC (rev 56633)
+++ branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionServiceIF.java 2006-09-08 03:18:53 UTC (rev 56634)
@@ -0,0 +1,24 @@
+package org.jboss.ejb3.test.service;
+
+import org.jboss.annotation.ejb.Management;
+
+/**
+ * @version <tt>$Revision: 45190 $</tt>
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Management
+public interface TestResourceInjectionServiceIF {
+
+ public boolean getTestedSuccessful();
+
+// - Service life cycle --------------------------------------------------------
+
+ public void create() throws Exception;
+
+ public void start() throws Exception;
+
+ public void stop();
+
+ public void destroy();
+
+}
Added: branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30LocalHome.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30LocalHome.java 2006-09-08 03:15:50 UTC (rev 56633)
+++ branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30LocalHome.java 2006-09-08 03:18:53 UTC (rev 56634)
@@ -0,0 +1,34 @@
+/*
+ * 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.ejb3.test.servlet;
+
+import javax.ejb.*;
+
+/**
+ * @version <tt>$Revision: 44752 $</tt>
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface Session30LocalHome extends EJBLocalHome
+{
+ public Session30 create() throws javax.ejb.CreateException;
+}
+
Added: branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulBean.java 2006-09-08 03:15:50 UTC (rev 56633)
+++ branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulBean.java 2006-09-08 03:18:53 UTC (rev 56634)
@@ -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.ejb3.test.servlet;
+
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateful;
+
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.logging.Logger;
+
+/**
+ * @version <tt>$Revision: 45242 $</tt>
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateful(name="Stateful")
+ at Remote(StatefulRemote.class)
+ at Local(StatefulLocal.class)
+ at RemoteBinding(jndiBinding = "StatefulRemote")
+ at LocalBinding(jndiBinding = "StatefulLocal")
+ at SecurityDomain("other")
+public class StatefulBean implements StatefulRemote, StatefulLocal
+{
+ private static final Logger log = Logger.getLogger(Session30Bean.class);
+
+ public String access(TestObject o)
+ {
+ return "Session30";
+ }
+}
Added: branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulLocal.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulLocal.java 2006-09-08 03:15:50 UTC (rev 56633)
+++ branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulLocal.java 2006-09-08 03:18:53 UTC (rev 56634)
@@ -0,0 +1,32 @@
+/*
+ * 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.ejb3.test.servlet;
+
+/**
+ * @version <tt>$Revision: 45242 $</tt>
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface StatefulLocal
+{
+ String access(TestObject o);
+}
+
Added: branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulRemote.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulRemote.java 2006-09-08 03:15:50 UTC (rev 56633)
+++ branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulRemote.java 2006-09-08 03:18:53 UTC (rev 56634)
@@ -0,0 +1,32 @@
+/*
+ * 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.ejb3.test.servlet;
+
+/**
+ * @version <tt>$Revision: 45242 $</tt>
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface StatefulRemote
+{
+ String access(TestObject o);
+}
+
Added: branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/OverrideStatefulClusteredBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/OverrideStatefulClusteredBean.java 2006-09-08 03:15:50 UTC (rev 56633)
+++ branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/OverrideStatefulClusteredBean.java 2006-09-08 03:18:53 UTC (rev 56634)
@@ -0,0 +1,42 @@
+/*
+ * 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.ejb3.test.ssladvanced;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateful;
+import org.jboss.annotation.ejb.Clustered;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version $Revision: 45009 $
+ */
+ at Stateful
+ at Clustered
+ at Remote(BusinessInterface.class)
+public class OverrideStatefulClusteredBean implements BusinessInterface
+{
+ public String echo(String s)
+ {
+ return s;
+ }
+}
More information about the jboss-cvs-commits
mailing list