[jboss-cvs] JBossAS SVN: r99551 - in projects/ejb3/components: nointerface and 13 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 18 13:57:28 EST 2010
Author: jaikiran
Date: 2010-01-18 13:57:28 -0500 (Mon, 18 Jan 2010)
New Revision: 99551
Added:
projects/ejb3/components/nointerface/
projects/ejb3/components/nointerface/trunk/
projects/ejb3/components/nointerface/trunk/build/
projects/ejb3/components/nointerface/trunk/impl/
projects/ejb3/components/nointerface/trunk/spi/
projects/ejb3/components/nointerface/trunk/spi/pom.xml
projects/ejb3/components/nointerface/trunk/spi/src/
projects/ejb3/components/nointerface/trunk/spi/src/main/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/jndi/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/jndi/NoInterfaceViewJNDIBinder.java
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/view/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/view/factory/
projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/view/factory/NoInterfaceViewFactory.java
Log:
EJBTHREE-1989 no-interface spi and rest of the modules for the component
Added: projects/ejb3/components/nointerface/trunk/spi/pom.xml
===================================================================
--- projects/ejb3/components/nointerface/trunk/spi/pom.xml (rev 0)
+++ projects/ejb3/components/nointerface/trunk/spi/pom.xml 2010-01-18 18:57:28 UTC (rev 99551)
@@ -0,0 +1,85 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+
+
+ <!-- POM Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Information -->
+ <groupId>org.jboss.ejb3.nointerface</groupId>
+ <artifactId>nointerface-spi</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0.0-SNAPSHOT</version>
+ <name>JBoss EJB3 No-Interface view SPI</name>
+ <url>http://labs.jboss.com/jbossejb3</url>
+ <description>SPI for JBoss EJB3 No-Interface view</description>
+
+
+ <properties>
+ <version.metadata_ejb>2.0.0-alpha-5</version.metadata_ejb>
+ </properties>
+
+ <build>
+
+
+ <plugins>
+ <!-- We have a dependency on @LocalBean which comes from ejb3-api (=JDK6) -->
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <!-- Enforce JDK6 -->
+ <execution>
+ <id>enforce-jdk6</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireJavaVersion>
+ <version>1.6</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- Use Java6 -->
+ <forkMode>once</forkMode>
+ <jvm>${JAVA_HOME}/bin/java</jvm>
+ <argLine>-Dxb.builder.useUnorderedSequence=true</argLine>
+ </configuration>
+ </plugin>
+
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <executable>${JAVA_HOME}/bin/javac</executable>
+ </configuration>
+ </plugin>
+
+ </plugins>
+
+ </build>
+
+
+ <!-- Dependencies -->
+ <dependencies>
+
+
+ <!-- JBoss Metadata -->
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata-ejb</artifactId>
+ <version>${version.metadata_ejb}</version>
+ </dependency>
+
+ </dependencies>
+</project>
\ No newline at end of file
Added: projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/jndi/NoInterfaceViewJNDIBinder.java
===================================================================
--- projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/jndi/NoInterfaceViewJNDIBinder.java (rev 0)
+++ projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/jndi/NoInterfaceViewJNDIBinder.java 2010-01-18 18:57:28 UTC (rev 99551)
@@ -0,0 +1,68 @@
+/*
+* 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.nointerface.spi.jndi;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.metadata.ejb.jboss.JBossSessionBean31MetaData;
+
+/**
+ * NoInterfaceViewJNDIBinder
+ *
+ * Responsible for binding and unbinding no-interface view(s) to/from the JNDI.
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface NoInterfaceViewJNDIBinder
+{
+
+ /**
+ * Binds the no-interface view of the bean <code>beanClass</code> to the JNDI,
+ * at the provided <code>jndiCtx</code> context.
+ *
+ * @param jndiCtx The jndi context to which the no-interface view has to be bound
+ * @param beanClass The EJB class
+ * @param beanMetaData The metadata of the bean
+ *
+ * @return Returns the jndi-name where the no-interface view has been bound
+ * @throws NamingException If any exception while binding to JNDI
+ * @throws IllegalStateException If a no-interface view is not applicable for this bean
+ */
+ String bindNoInterfaceView(Context jndiCtx, Class<?> beanClass, JBossSessionBean31MetaData beanMetaData)
+ throws NamingException, IllegalStateException;
+
+ /**
+ * Unbind the no-interface view of the bean <code>beanClass</code> from the JNDI
+ * at the provided <code>jndiCtx</code> context.
+ *
+ * @param jndiCtx The jndi context from where the no-interface view has to be unbound
+ * @param beanClass The EJB class
+ * @param beanMetaData The metadata of the bean
+ *
+ * @throws NamingException If any exception while unbinding from JNDI
+ * @throws IllegalStateException If a no-interface view is not applicable for this bean
+ */
+ void unbindNoInterfaceView(Context jndiCtx, Class<?> beanClass, JBossSessionBean31MetaData beanMetaData)
+ throws NamingException, IllegalStateException;
+}
Added: projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/view/factory/NoInterfaceViewFactory.java
===================================================================
--- projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/view/factory/NoInterfaceViewFactory.java (rev 0)
+++ projects/ejb3/components/nointerface/trunk/spi/src/main/java/org/jboss/ejb3/nointerface/spi/view/factory/NoInterfaceViewFactory.java 2010-01-18 18:57:28 UTC (rev 99551)
@@ -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.nointerface.spi.view.factory;
+
+import java.lang.reflect.InvocationHandler;
+
+/**
+ * NoInterfaceViewFactory
+ *
+ * Factory for creating no-interface view for a bean
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface NoInterfaceViewFactory
+{
+
+ /**
+ * Creates a no-interface view for the EJB represented by the
+ * <code>beanClass</code>
+ *
+ * @param <T>
+ * @param invocationHandler The invocation handler responsible for handling
+ * requests on the no-interface view returned by this
+ * method
+ * @param beanClass The bean class (no validation on the Class is done to check for EJB semantics)
+ * @return Returns the no-interface view for the <code>beanClass</code>
+ *
+ * @throws Exception If any exceptions are encountered during the no-interface view creation
+ */
+ public <T> T createView(InvocationHandler invocationHandler, Class<T> beanClass) throws Exception;
+}
More information about the jboss-cvs-commits
mailing list