[jboss-cvs] JBossAS SVN: r100472 - projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 5 04:14:26 EST 2010


Author: wolfc
Date: 2010-02-05 04:14:25 -0500 (Fri, 05 Feb 2010)
New Revision: 100472

Added:
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Bean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Remote.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21RemoteHome.java
Log:
EJBTHREE-1995: more test classes

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Bean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Bean.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Bean.java	2010-02-05 09:14:25 UTC (rev 100472)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, 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.core.test.ejbthree1995;
+
+import org.jboss.ejb3.annotation.SecurityDomain;
+
+import javax.annotation.Resource;
+import javax.ejb.Init;
+import javax.ejb.RemoteHome;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateful;
+import java.security.Principal;
+
+/**
+ * An EJB 3 bean exposing an EJB 2.1 view.
+ * 
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+ at Stateful
+ at SecurityDomain(value="test", unauthenticatedPrincipal="anonymous")
+ at RemoteHome(SecuredGreeter21RemoteHome.class)
+public class SecuredGreeter21Bean
+{
+   @Resource
+   private SessionContext ctx;
+   
+   private String name;
+   private String user;
+
+   @Init
+   public void init(String name)
+   {
+      Principal caller = ctx.getCallerPrincipal();
+      this.name = name;
+      this.user = caller.getName();
+   }
+
+   public String sayHi()
+   {
+      return "Hi " + name + " (" + user + ")";
+   }
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Bean.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Remote.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Remote.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Remote.java	2010-02-05 09:14:25 UTC (rev 100472)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, 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.core.test.ejbthree1995;
+
+import javax.ejb.EJBObject;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public interface SecuredGreeter21Remote extends EJBObject
+{
+   String sayHi();
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21Remote.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21RemoteHome.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21RemoteHome.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21RemoteHome.java	2010-02-05 09:14:25 UTC (rev 100472)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, 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.core.test.ejbthree1995;
+
+import org.jboss.ejb3.core.test.ejbthree1995.SecuredGreeter21Remote;
+
+import javax.ejb.EJBHome;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public interface SecuredGreeter21RemoteHome extends EJBHome
+{
+   SecuredGreeter21Remote create(String name);
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/ejbthree1995/SecuredGreeter21RemoteHome.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list