[jboss-cvs] JBossAS SVN: r79011 - in projects/ejb3/trunk/api/src: main/java/javax/ejb/spi and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 2 04:52:55 EDT 2008
Author: wolfc
Date: 2008-10-02 04:52:55 -0400 (Thu, 02 Oct 2008)
New Revision: 79011
Added:
projects/ejb3/trunk/api/src/main/java/javax/ejb/LocalBean.java
projects/ejb3/trunk/api/src/main/java/javax/ejb/spi/EJBContainerProvider.java
projects/ejb3/trunk/api/src/test/resources/META-INF/services/javax.ejb.spi.EJBContainerProvider
Removed:
projects/ejb3/trunk/api/src/main/java/org/jboss/ejb3/api/spi/EJBContainerProvider.java
projects/ejb3/trunk/api/src/test/resources/META-INF/services/org.jboss.ejb3.api.spi.EJBContainerProvider
Modified:
projects/ejb3/trunk/api/src/main/java/javax/ejb/EJBContainer.java
projects/ejb3/trunk/api/src/test/java/org/jboss/ejb3/api/test/embedded/JBossEJBContainer.java
projects/ejb3/trunk/api/src/test/java/org/jboss/ejb3/api/test/embedded/JBossEJBContainerProvider.java
Log:
EJBTHREE-1484: EJB 3.1 PD
Modified: projects/ejb3/trunk/api/src/main/java/javax/ejb/EJBContainer.java
===================================================================
--- projects/ejb3/trunk/api/src/main/java/javax/ejb/EJBContainer.java 2008-10-02 07:09:15 UTC (rev 79010)
+++ projects/ejb3/trunk/api/src/main/java/javax/ejb/EJBContainer.java 2008-10-02 08:52:55 UTC (rev 79011)
@@ -35,9 +35,9 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import javax.ejb.spi.EJBContainerProvider;
import javax.naming.Context;
-import org.jboss.ejb3.api.spi.EJBContainerProvider;
import org.jboss.ejb3.api.spi.EJBContainerWrapper;
/**
@@ -50,6 +50,7 @@
public abstract class EJBContainer
{
public static final String EMBEDDABLE_INITIAL = "javax.ejb.embeddable.initial";
+ public static final String EMBEDDABLE_MODULES_PROPERTY = "javax.ejb.embeddable.modules";
private static EJBContainerWrapper currentEJBContainer;
@@ -82,22 +83,20 @@
/**
* Create and initialize an embeddable EJB container with an
- * optional set of configuration properties and names of modules to be initialized.
+ * set of configuration properties and names of modules to be initialized.
*
* @param properties One or more spec-defined or vendor-specific properties.
- * The spec reserves the prefix "javax.ejb." for spec-defined properties. Can be null.
- * @param modules Specific set of module names to be initialized. Can be null.
- * If null, defaults to module scanning algorithm in createEJBContainer().
+ * The spec reserves the prefix "javax.ejb." for spec-defined properties.
* @return EJBContainer instance
* @throws EJBException Thrown if the container or application could not
* be successfully initialized.
*/
- public static EJBContainer createEJBContainer(Map<?, ?> properties, String... modules)
+ public static EJBContainer createEJBContainer(Map<?, ?> properties)
throws EJBException
{
for(EJBContainerProvider factory : factories)
{
- EJBContainer container = factory.createEJBContainer(properties, modules);
+ EJBContainer container = factory.createEJBContainer(properties);
if(container != null)
{
currentEJBContainer = new EJBContainerWrapper(container);
@@ -107,28 +106,6 @@
throw new EJBException("Unable to instantiate container with factories " + factories);
}
- /**
- * Create and initialize an embeddable EJB container with an
- * optional set of configuration properties and names of modules to be initialized.
- *
- * @param properties One or more spec-defined or vendor-specific properties.
- * The spec reserves the prefix "javax.ejb." for spec-defined properties. Can be null.
- * @param modules Specific set of module names to be initialized. Can be null.
- * If null, defaults to module scanning algorithm in createEJBContainer().
- * @return EJBContainer instance
- * @throws EJBException Thrown if the container or application could not
- * be successfully initialized.
- */
- @Deprecated
- public static EJBContainer createEJBContainer(Map<String, Object> properties, Set<String> modules)
- throws EJBException
- {
- String[] modulesArray = null;
- if(modules != null)
- modulesArray = modules.toArray(new String[0]);
- return createEJBContainer(properties, modulesArray);
- }
-
private static List<String> factoryNamesFromReader(BufferedReader reader) throws IOException
{
List<String> names = new ArrayList<String>();
Added: projects/ejb3/trunk/api/src/main/java/javax/ejb/LocalBean.java
===================================================================
--- projects/ejb3/trunk/api/src/main/java/javax/ejb/LocalBean.java (rev 0)
+++ projects/ejb3/trunk/api/src/main/java/javax/ejb/LocalBean.java 2008-10-02 08:52:55 UTC (rev 79011)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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 javax.ejb;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Designates that a session bean exposes a no-interface view.
+ *
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ * @since 3.1
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface LocalBean {
+
+}
Copied: projects/ejb3/trunk/api/src/main/java/javax/ejb/spi/EJBContainerProvider.java (from rev 79009, projects/ejb3/trunk/api/src/main/java/org/jboss/ejb3/api/spi/EJBContainerProvider.java)
===================================================================
--- projects/ejb3/trunk/api/src/main/java/javax/ejb/spi/EJBContainerProvider.java (rev 0)
+++ projects/ejb3/trunk/api/src/main/java/javax/ejb/spi/EJBContainerProvider.java 2008-10-02 08:52:55 UTC (rev 79011)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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 javax.ejb.spi;
+
+import java.util.Map;
+
+import javax.ejb.EJBContainer;
+import javax.ejb.EJBException;
+
+/**
+ * The EJBContainerProvider SPI is used by the embeddable container bootstrap class to
+ * initialize a suitable embeddable container.
+ *
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ * @since 3.1
+ */
+public interface EJBContainerProvider
+{
+ /**
+ * Called by the embeddable container bootstrap process to find a suitable embeddable container
+ * implementation. An embeddable container provider may deem itself as appropriate for the
+ * embeddable application if any of the following are true : The javax.ejb.embeddable.initial
+ * property was included in the Map passed to createEJBContainer and the value of the property is
+ * the provider's implementation class. No javax.ejb.embeddable.initial property was specified.
+ * If a provider does not qualify as the provider for the embeddable application, it must return null.
+ *
+ * @param properties
+ * @return EJBContainer instance or null
+ * @throws EJBException
+ */
+ EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException;
+}
Deleted: projects/ejb3/trunk/api/src/main/java/org/jboss/ejb3/api/spi/EJBContainerProvider.java
===================================================================
--- projects/ejb3/trunk/api/src/main/java/org/jboss/ejb3/api/spi/EJBContainerProvider.java 2008-10-02 07:09:15 UTC (rev 79010)
+++ projects/ejb3/trunk/api/src/main/java/org/jboss/ejb3/api/spi/EJBContainerProvider.java 2008-10-02 08:52:55 UTC (rev 79011)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, 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.api.spi;
-
-import java.util.Map;
-
-import javax.ejb.EJBContainer;
-import javax.ejb.EJBException;
-
-/**
- * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface EJBContainerProvider
-{
- EJBContainer createEJBContainer(Map<?, ?> properties, String... modules) throws EJBException;
-}
Modified: projects/ejb3/trunk/api/src/test/java/org/jboss/ejb3/api/test/embedded/JBossEJBContainer.java
===================================================================
--- projects/ejb3/trunk/api/src/test/java/org/jboss/ejb3/api/test/embedded/JBossEJBContainer.java 2008-10-02 07:09:15 UTC (rev 79010)
+++ projects/ejb3/trunk/api/src/test/java/org/jboss/ejb3/api/test/embedded/JBossEJBContainer.java 2008-10-02 08:52:55 UTC (rev 79011)
@@ -35,7 +35,7 @@
* @param properties
* @param modules
*/
- protected JBossEJBContainer(Map<?, ?> properties, String[] modules)
+ protected JBossEJBContainer(Map<?, ?> properties)
{
// TODO Auto-generated constructor stub
}
Modified: projects/ejb3/trunk/api/src/test/java/org/jboss/ejb3/api/test/embedded/JBossEJBContainerProvider.java
===================================================================
--- projects/ejb3/trunk/api/src/test/java/org/jboss/ejb3/api/test/embedded/JBossEJBContainerProvider.java 2008-10-02 07:09:15 UTC (rev 79010)
+++ projects/ejb3/trunk/api/src/test/java/org/jboss/ejb3/api/test/embedded/JBossEJBContainerProvider.java 2008-10-02 08:52:55 UTC (rev 79011)
@@ -25,8 +25,8 @@
import javax.ejb.EJBContainer;
import javax.ejb.EJBException;
+import javax.ejb.spi.EJBContainerProvider;
-import org.jboss.ejb3.api.spi.EJBContainerProvider;
/**
* @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
@@ -34,8 +34,8 @@
*/
public class JBossEJBContainerProvider implements EJBContainerProvider
{
- public EJBContainer createEJBContainer(Map<?, ?> properties, String... modules) throws EJBException
+ public EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException
{
- return new JBossEJBContainer(properties, modules);
+ return new JBossEJBContainer(properties);
}
}
Copied: projects/ejb3/trunk/api/src/test/resources/META-INF/services/javax.ejb.spi.EJBContainerProvider (from rev 79007, projects/ejb3/trunk/api/src/test/resources/META-INF/services/org.jboss.ejb3.api.spi.EJBContainerProvider)
===================================================================
--- projects/ejb3/trunk/api/src/test/resources/META-INF/services/javax.ejb.spi.EJBContainerProvider (rev 0)
+++ projects/ejb3/trunk/api/src/test/resources/META-INF/services/javax.ejb.spi.EJBContainerProvider 2008-10-02 08:52:55 UTC (rev 79011)
@@ -0,0 +1 @@
+org.jboss.ejb3.api.test.embedded.JBossEJBContainerProvider
\ No newline at end of file
Deleted: projects/ejb3/trunk/api/src/test/resources/META-INF/services/org.jboss.ejb3.api.spi.EJBContainerProvider
===================================================================
--- projects/ejb3/trunk/api/src/test/resources/META-INF/services/org.jboss.ejb3.api.spi.EJBContainerProvider 2008-10-02 07:09:15 UTC (rev 79010)
+++ projects/ejb3/trunk/api/src/test/resources/META-INF/services/org.jboss.ejb3.api.spi.EJBContainerProvider 2008-10-02 08:52:55 UTC (rev 79011)
@@ -1 +0,0 @@
-org.jboss.ejb3.api.test.embedded.JBossEJBContainerProvider
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list