[jboss-cvs] JBossAS SVN: r61191 - in projects/javaee/trunk/ejb-api: src/main/javax/ejb and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 7 09:13:14 EST 2007
Author: wolfc
Date: 2007-03-07 09:13:14 -0500 (Wed, 07 Mar 2007)
New Revision: 61191
Added:
projects/javaee/trunk/ejb-api/src/main/javax/ejb/AccessLocalException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/CreateException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/DuplicateKeyException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBContext.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBHome.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalHome.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalObject.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBMetaData.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBObject.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EnterpriseBean.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityBean.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityContext.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/FinderException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/Handle.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/HomeHandle.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenBean.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenContext.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchEntityException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchObjectLocalException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/ObjectNotFoundException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/RemoveException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionBean.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionContext.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionSynchronization.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimedObject.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/Timer.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerHandle.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerService.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRequiredLocalException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRolledbackLocalException.java
projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/
projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/HandleDelegate.java
Removed:
projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/HandleDelegate.java
Modified:
projects/javaee/trunk/ejb-api/
projects/javaee/trunk/ejb-api/.classpath
projects/javaee/trunk/ejb-api/.project
projects/javaee/trunk/ejb-api/pom.xml
Log:
EJB 3.0
Property changes on: projects/javaee/trunk/ejb-api
___________________________________________________________________
Name: subclipse:tags
+ 61182,AS 5 trunk,/trunk/ejb3x,branch
Modified: projects/javaee/trunk/ejb-api/.classpath
===================================================================
--- projects/javaee/trunk/ejb-api/.classpath 2007-03-07 14:10:28 UTC (rev 61190)
+++ projects/javaee/trunk/ejb-api/.classpath 2007-03-07 14:13:14 UTC (rev 61191)
@@ -1,6 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main"/>
- <classpathentry kind="output" path="target/eclipse-classes"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-j2ee/4.0.2/jboss-j2ee-4.0.2.jar"/>
-</classpath>
\ No newline at end of file
+ <classpathentry excluding="**/*.java" including="etc/**" kind="src" path="src"/>
+ <classpathentry kind="src" path="src/main"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxrpc/1.0.4.GA/jboss-jaxrpc-1.0.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-transaction-api/1.0.1-SNAPSHOT/jboss-transaction-api-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/jboss/jboss-transaction-api/1.0.1-SNAPSHOT/jboss-transaction-api-1.0.1-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="output" path="target/eclipse-classes"/>
+</classpath>
Modified: projects/javaee/trunk/ejb-api/.project
===================================================================
--- projects/javaee/trunk/ejb-api/.project 2007-03-07 14:10:28 UTC (rev 61190)
+++ projects/javaee/trunk/ejb-api/.project 2007-03-07 14:13:14 UTC (rev 61191)
@@ -1,11 +1,10 @@
<projectDescription>
- <name>jboss-ejb3x</name>
+ <name>jboss-ejb-api</name>
<comment>The Java EJB 3.0 API classes</comment>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
- <arguments/>
</buildCommand>
</buildSpec>
<natures>
Modified: projects/javaee/trunk/ejb-api/pom.xml
===================================================================
--- projects/javaee/trunk/ejb-api/pom.xml 2007-03-07 14:10:28 UTC (rev 61190)
+++ projects/javaee/trunk/ejb-api/pom.xml 2007-03-07 14:13:14 UTC (rev 61191)
@@ -1,102 +1,29 @@
<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">
+ <parent>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-javaee</artifactId>
+ <version>5.0.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<groupId>jboss</groupId>
- <artifactId>jboss-ejb3x</artifactId>
+ <artifactId>jboss-ejb-api</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <version>1.0.0.CR1</version>
<name>JBoss EJB 3.0 API</name>
<url>http://www.jboss.org</url>
<description>The Java EJB 3.0 API classes</description>
- <licenses>
- <license>
- <name>lgpl</name>
- <url>http://repository.jboss.com/licenses/lgpl.txt</url>
- </license>
- </licenses>
- <organization>
- <name>JBoss Inc.</name>
- <url>http://www.jboss.org</url>
- </organization>
-
- <repositories>
- <repository>
- <id>jboss</id>
- <name>JBoss Inc. Repository</name>
- <layout>default</layout>
- <url>http://repository.jboss.com/maven2/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>jbosspluginrepo</id>
- <name>jboss plugin repository</name>
- <url>http://repository.jboss.com/maven2</url>
- <layout>default</layout>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </pluginRepository>
- <pluginRepository>
- <id>central</id>
- <name>LSU maven2 mirror</name>
- <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
- <layout>default</layout>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
-
-
- <build>
- <sourceDirectory>src/main</sourceDirectory>
- <finalName>${artifactId}</finalName>
- <plugins>
-
-
-
- <!-- define how we want compilation to take place
- here, we accept most of the defaults but say that we want the
- optimization flag set, and define the source and target to be 1.4,
- these setting will be inherited by child projects -->
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
- <configuration>
- <optimize>true</optimize>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <!-- define that we wish to create src jars -->
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
<dependencies>
<dependency>
<groupId>jboss</groupId>
- <artifactId>jboss-j2ee</artifactId>
- <version>4.0.2</version>
+ <artifactId>jboss-transaction-api</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>jboss.jbossws</groupId>
+ <artifactId>jboss-jaxrpc</artifactId>
+ <version>1.0.4.GA</version>
+ </dependency>
</dependencies>
</project>
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/AccessLocalException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/AccessLocalException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/AccessLocalException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/AccessLocalException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,56 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * An AccessLocalException is thrown to indicate that the caller does not
+ * have permission to call the method. This exception is thrown to local clients.
+ */
+public class AccessLocalException extends EJBException {
+
+ /**
+ * Constructs an AccessLocalException with no detail message.
+ */
+ public AccessLocalException() {
+ super();
+ }
+
+ /**
+ * Constructs an AccessLocalException with the specified detail message.
+ *
+ * @param message - The detailed message
+ */
+ public AccessLocalException(java.lang.String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs an AccessLocalException with the specified detail message and a nested exception.
+ *
+ * @param message - The detailed message
+ * @param ex - The nested exception
+ */
+ public AccessLocalException(java.lang.String message,
+ java.lang.Exception ex) {
+ super(message,ex);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/AccessLocalException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/CreateException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/CreateException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/CreateException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/CreateException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,47 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <P>The CreateException exception must be included in the throws clauses of
+ * all create(...) methods define in an enterprise Bean's remote interface.</P>
+ * <P>The exception is used as a standard application-level exception
+ * to report a failure to create an entity EJB object. </P>
+ */
+public class CreateException extends Exception {
+
+ /**
+ * Constructs an CreateException with no detail message.
+ */
+ public CreateException() {
+ super();
+ }
+
+ /**
+ * Constructs an CreateException with the specified detail message.
+ *
+ * @param message - The detailed message
+ */
+ public CreateException(String message) {
+ super(message);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/CreateException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/DuplicateKeyException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/DuplicateKeyException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/DuplicateKeyException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/DuplicateKeyException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,47 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * The DuplicateKeyException exception is thrown if an entity EJB
+ * object cannot be created because an object with the same key already
+ * exists. This exception is thrown by the create methods defined in an
+ * enterprise Bean's home interface.
+ */
+public class DuplicateKeyException extends CreateException {
+
+ /**
+ * Constructs an DuplicateKeyException with no detail message.
+ */
+ public DuplicateKeyException() {
+ super();
+ }
+
+ /**
+ * Constructs an DuplicateKeyException with the specified detail message.
+ *
+ * @param message - The detailed message
+ */
+ public DuplicateKeyException(String message) {
+ super(message);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/DuplicateKeyException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBContext.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EJBContext.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBContext.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBContext.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,160 @@
+/*
+* 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 javax.ejb;
+
+import javax.transaction.UserTransaction;
+import java.security.Identity;
+import java.security.Principal;
+import java.util.Properties;
+
+/**
+ * <P>The EJBContext interface provides an instance with access to the
+ * container-provided runtime context of an enterprise Bean instance.</P>
+ * <P>This interface is extended by the SessionContext and EntityContext
+ * interface to provide additional methods specific to the enterprise
+ * Bean type.</P>
+ * @version $Revision$
+ */
+public interface EJBContext
+{
+
+ /**
+ * Obtain the enterprise bean's remote home interface.
+ *
+ * @return The enterprise bean's remote home interface.
+ * @exception java.lang.IllegalStateException - if the enterprise bean does not have a remote home interface.
+ */
+ public EJBHome getEJBHome();
+
+ /**
+ * Obtain the enterprise bean's local home interface.
+ *
+ * @return The enterprise bean's local home interface.
+ * @exception java.lang.IllegalStateException - if the enterprise bean does not have a local home interface.
+ */
+ public EJBLocalHome getEJBLocalHome();
+
+ /**
+ * <B>Deprecated.</B> <I>Use the JNDI naming context java:comp/env to access enterprise bean's environment.</I>
+ *
+ * <P>Obtain the enterprise bean's environment properties.</P>
+ *
+ * <P><B>Note:</B> If the enterprise bean has no environment properties this method returns an empty
+ * java.util.Properties object. This method never returns null.</P>
+ *
+ * @return The environment properties for the enterprise bean.
+ */
+ public Properties getEnvironment();
+
+ /**
+ * <B>Deprecated.</B> <I>Use Principal getCallerPrincipal() instead.</I>
+ *
+ * <P>Obtain the java.security.Identity of the caller. This method is deprecated in EJB 1.1.
+ * The Container is allowed to return alway null from this method. The enterprise bean should use
+ * the getCallerPrincipal method instead.</P>
+ *
+ * @return The Identity object that identifies the caller.
+ */
+ public Identity getCallerIdentity();
+
+ /**
+ * Obtains the java.security.Principal of the caller.
+ *
+ * @return The Principal object that identifies the caller. This method never returns null.
+ */
+ public Principal getCallerPrincipal();
+
+
+ /**
+ * <B>Deprecated.</B> <I>Use boolean isCallerInRole(String roleName) instead.</I>
+ *
+ * <P>Test if the caller has a given role.</P>
+ *
+ * <P>This method is deprecated in EJB 1.1. The enterprise bean should use the
+ * isCallerInRole(String roleName) method instead.</P>
+ *
+ * @param role - The java.security.Identity of the role to be tested.
+ * @return True if the caller has the specified role.
+ */
+ public boolean isCallerInRole(Identity role);
+
+ /**
+ * Tests if the caller has a given role.
+ *
+ * @param roleName - The name of the security role. The role must be one of the security roles that
+ * is defined in the deployment descriptor.
+ * @return True if the caller has the specified role.
+ */
+ public boolean isCallerInRole(String roleName);
+
+ /**
+ * Obtain the transaction demarcation interface. Only enterprise beans with bean-managed transactions
+ * are allowed to to use the UserTransaction interface. As entity beans must always use container-managed
+ * transactions, only session beans with bean-managed transactions are allowed to invoke this method.
+ *
+ * @return The UserTransaction interface that the enterprise bean instance can use for transaction demarcation.
+ * @exception java.lang.IllegalStateException - The Container throws the exception if the instance is not
+ * allowed to use the UserTransaction interface (i.e. the instance is of a bean with container-managed
+ * transactions).
+ */
+ public UserTransaction getUserTransaction() throws IllegalStateException;
+
+ /**
+ * Mark the current transaction for rollback. The transaction will become permanently marked for rollback.
+ * A transaction marked for rollback can never commit. Only enterprise beans with container-managed
+ * transactions are allowed to use this method.
+ *
+ * @exception java.lang.IllegalStateException - The Container throws the exception if the instance is not
+ * allowed to use this method (i.e. the instance is of a bean with bean-managed transactions).
+ */
+ public void setRollbackOnly() throws IllegalStateException;
+
+ /**
+ * Test if the transaction has been marked for rollback only. An enterprise bean instance can use
+ * this operation, for example, to test after an exception has been caught, whether it is fruitless
+ * to continue computation on behalf of the current transaction. Only enterprise beans with
+ * container-managed transactions are allowed to use this method.</P>
+ *
+ * @return True if the current transaction is marked for rollback, false otherwise.
+ * @exception java.lang.IllegalStateException - The Container throws the exception if the instance
+ * is not allowed to use this method (i.e. the instance is of a bean with bean-managed transactions).
+ */
+ public boolean getRollbackOnly() throws IllegalStateException;
+
+ /**
+ * Get access to the EJB Timer Service.
+ *
+ * @exception IllegalStateException The Container throws the exception
+ * if the instance is not allowed to use this method (e.g. if the bean
+ * is a stateful session bean)
+ */
+ public TimerService getTimerService() throws IllegalStateException;
+
+ /**
+ * New from EJB 3.0. A JNDI lookup method that doesn't throw exceptions
+ *
+ * @param name
+ * @return returns null if JNDI lookup finds nothing
+ */
+ public Object lookup(String name);
+
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBContext.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EJBException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,91 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * The EJBException exception is thrown by an enterprise Bean instance to its
+ * container to report that the invoked business method or callback method
+ * could not be completed because of an unexpected error (e.g. the instance
+ * failed to open a database connection).
+ */
+public class EJBException extends RuntimeException
+{
+ /** @since 4.0.2 */
+ private static final long serialVersionUID = 796770993296843510L;
+ private Exception causeException;
+
+ /**
+ * Constructs an EJBException with no detail message.
+ */
+ public EJBException()
+ {
+ super();
+ causeException = null;
+ }
+
+ /**
+ * Constructs an EJBException with the specified detailed message.
+ *
+ * @param message - The detailed message.
+ */
+ public EJBException(String message)
+ {
+ super(message);
+ causeException = null;
+ }
+
+ /**
+ * Constructs an EJBException that embeds the originally thrown exception.
+ *
+ * @param ex - The originally thrown exception.
+ */
+ public EJBException(Exception ex)
+ {
+ super(ex);
+ causeException = ex;
+ }
+
+ /**
+ * Constructs an EJBException with the specified message and the
+ * originally throw exception.
+ *
+ * @param message - The detailed message.
+ * @param ex - The originally thrown exception.
+ */
+ public EJBException(String message, Exception ex)
+ {
+ super(message, ex);
+ causeException = ex;
+ }
+
+ /**
+ * Obtain the exception that caused the EJBException being thrown.
+ *
+ * @return The originally thrown exception.
+ */
+ public Exception getCausedByException()
+ {
+ return causeException;
+ }
+
+}
+
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBHome.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EJBHome.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBHome.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBHome.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,78 @@
+/*
+* 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 javax.ejb;
+
+import java.rmi.RemoteException;
+
+/**
+ * <P>The EJBHome interface must be extended by all enterprise Beans' remote home interfaces.
+ * An enterprise Bean's remote home interface defines the methods that allow a remote client to
+ * create, find, and remove EJB objects, as well as home business methods that are not specific to
+ * a bean instance (Session Beans do not have finders and home methods).</P>
+ *
+ * <P>The remote home interface is defined by the enterprise Bean provider and implemented by the
+ * enterprise Bean container.</P>
+ */
+public interface EJBHome extends java.rmi.Remote {
+
+ /**
+ * Remove an EJB object identified by its handle.
+ *
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ * @exception RemoveException - Thrown if the enterprise Bean or the container does not allow
+ * the client to remove the object.
+ */
+ public void remove(Handle handle) throws RemoteException, RemoveException;
+
+ /**
+ * <P>Remove an EJB object identified by its primary key.</P>
+ *
+ * <P>This method can be used only for an entity bean. An attempt to call this method on
+ * a session bean will result in a RemoteException.</P>
+ *
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ * @exception RemoveException - Thrown if the enterprise Bean or the container does not allow
+ * the client to remove the object.
+ */
+ public void remove(Object primaryKey) throws RemoteException, RemoveException;
+
+ /**
+ * <P>Obtain the EJBMetaData interface for the enterprise Bean. The EJBMetaData interface allows
+ * the client to obtain information about the enterprise Bean.</P>
+ *
+ * <P>The information obtainable via the EJBMetaData interface is intended to be used by tools.</P>
+ *
+ * @return The enterprise Bean's EJBMetaData interface.
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ */
+ public EJBMetaData getEJBMetaData() throws RemoteException;
+
+ /**
+ * Obtain a handle for the remote home object. The handle can be used at later time to re-obtain
+ * a reference to the remote home object, possibly in a different Java Virtual Machine.
+ *
+ * @return A handle for the remote home object.
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ */
+ public HomeHandle getHomeHandle() throws RemoteException;
+
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBHome.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalHome.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EJBLocalHome.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalHome.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalHome.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,49 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <p>The EJBLocalHome interface must be extended by all enterprise Beans'
+ * local home interfaces. An enterprise Bean's local home interface defines
+ * the methods that allow local clients to create, find, and remove EJB
+ * objects, as well as home business methods that are not specific to a
+ * bean instance (session Beans do not have finders and home business methods).</p>
+ *
+ * <p>The local home interface is defined by the enterprise Bean provider
+ * and implemented by the enterprise Bean container.</p>
+ */
+public interface EJBLocalHome {
+
+ /**
+ * <p>Remove an EJB object identified by its primary key.</p>
+ *
+ * <p>This method can only be used by local clients of an entity bean.
+ * An attempt to call this method on a session bean will result in an EJBException.</p>
+ *
+ * @param primaryKey - The primary key
+ * @exception RemoveException - Thrown if the enterprise Bean or the container does
+ * not allow the client to remove the object.
+ * @exception EJBException - Thrown when the method failed due to a system-level failure.
+ */
+ public void remove(java.lang.Object primaryKey)
+ throws RemoveException, EJBException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalHome.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalObject.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EJBLocalObject.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalObject.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalObject.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,77 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <p>The EJBLocalObject interface must be extended by all enterprise
+ * Beans' local interfaces. An enterprise Bean's local interface provides
+ * the local client view of an EJB object. An enterprise Bean's local interface
+ * defines the business methods callable by local clients.</p>
+ *
+ * <p>The enterprise Bean's local interface is defined by the enterprise Bean
+ * provider and implemented by the enterprise Bean container.</p>
+ */
+public interface EJBLocalObject {
+
+ /**
+ * Obtain the enterprise Bean's local home interface. The local home interface
+ * defines the enterprise Bean's create, finder, remove, and home business methods
+ * that are available to local clients.
+ *
+ * @return A reference to the enterprise Bean's local home interface.
+ * @exception EJBException - Thrown when the method failed due to a system-level failure.
+ */
+ public EJBLocalHome getEJBLocalHome()
+ throws EJBException;
+
+ /**
+ * <p>Obtain the primary key of the EJB local object.</p>
+ *
+ * <p>This method can be called on an entity bean. An attempt to invoke this method
+ * on a session Bean will result in an EJBException.</p>
+ *
+ * @return The EJB local object's primary key.
+ * @exception EJBException - Thrown when the method failed due to a system-level failure.
+ */
+ public java.lang.Object getPrimaryKey()
+ throws EJBException;
+
+ /**
+ * Remove the EJB local object.
+ *
+ * @exception RemoveException - The enterprise Bean or the container does not allow
+ * destruction of the object.
+ * @exception EJBException - Thrown when the method failed due to a system-level failure.
+ */
+ public void remove()
+ throws RemoveException, EJBException;
+
+ /**
+ * Test if a given EJB local object is identical to the invoked EJB local object.
+ *
+ * @param obj - An object to test for identity with the invoked object.
+ * @return True if the given EJB local object is identical to the invoked object, false otherwise.
+ * @exception EJBException - Thrown when the method failed due to a system-level failure.
+ */
+ public boolean isIdentical(EJBLocalObject obj)
+ throws EJBException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBLocalObject.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBMetaData.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EJBMetaData.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBMetaData.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBMetaData.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,79 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <P>The EJBMetaData interface allows a client to obtain the enterprise
+ * Bean's meta-data information. </P>
+ *
+ * <P>The meta-data is intended for development tools used for building
+ * applications that use deployed enterprise Beans, and for clients using
+ * a scripting language to access the enterprise Bean. </P>
+ *
+ * <P>Note that the EJBMetaData is not a remote interface. The class that
+ * implements this interface (this class is typically generated by container
+ * tools) must be serializable, and must be a valid RMI/IDL value type. </P>
+ */
+public interface EJBMetaData {
+
+ /**
+ * Obtains the home interface of the enterprise Bean.
+ *
+ * @return The home interface of the enterprise Bean.
+ */
+ public EJBHome getEJBHome();
+
+ /**
+ * Obtains the Class object for the enterprise Bean's home interface.
+ *
+ * @return The class object for the enterprise Bean's home interface.
+ */
+ public Class getHomeInterfaceClass();
+
+ /**
+ * Obtains the Class object for the enterprise Bean's remote interface.
+ *
+ * @return The class object for the enterprise Bean's remote interface.
+ */
+ public Class getRemoteInterfaceClass();
+
+ /**
+ * Obtains the Class object for the enterprise Bean's primary key class.
+ *
+ * @return The class object for the enterprise Bean's primary key class.
+ */
+ public Class getPrimaryKeyClass();
+
+ /**
+ * Tests if the type of the enterprise Bean is "session".
+ *
+ * @return True if the type of the enterprise Bean is session bean.
+ */
+ public boolean isSession();
+
+ /**
+ * Tests if the type of the enterprise Bean is "stateless session".
+ *
+ * @return True if the type of the enterprise Bean is stateless session.
+ */
+ public boolean isStatelessSession();
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBObject.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EJBObject.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBObject.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBObject.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,87 @@
+/*
+* 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 javax.ejb;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * <P>The EJBObject interface is extended by all enterprise Bean's remote
+ * interface. An enterprise Bean's remote interface provides the client's
+ * view of an EJB object. An enterprise Bean's remote interface defines
+ * the business methods callable by a client.</P>
+ *
+ * <P>Each enterprise Bean has a remote interface. The remote interface must
+ * extend the javax.ejb.EJBObject interface, and define the enterprise Bean
+ * specific business methods.</P>
+ *
+ * <P>The enterprise Bean's remote interface is defined by the enterprise Bean
+ * provider and implemented by the enterprise Bean container.</P>
+ */
+public interface EJBObject extends Remote {
+
+ /**
+ * Obtain the enterprise Bean's remote home interface. The remote home interface defines the
+ * enterprise Bean's create, finder, remove, and home business methods.
+ *
+ * @return A reference to the enterprise Bean's home interface.
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ */
+ public EJBHome getEJBHome() throws RemoteException;
+
+ /**
+ * <P>Obtain the primary key of the EJB object.</P>
+ *
+ * <P>This method can be called on an entity bean. An attempt to invoke this method on a session
+ * bean will result in RemoteException.</P>
+ *
+ * @return The EJB object's primary key.
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ */
+ public Object getPrimaryKey() throws RemoteException;
+
+ /**
+ * Remove the EJB object.
+ *
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ * @exception RemoveException - The enterprise Bean or the container does not allow destruction of the object.
+ */
+ public void remove() throws RemoteException, RemoveException;
+
+ /**
+ * Obtain a handle for the EJB object. The handle can be used at later time to re-obtain a
+ * reference to the EJB object, possibly in a different Java Virtual Machine.
+ *
+ * @return A handle for the EJB object.
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ */
+ public Handle getHandle() throws RemoteException;
+
+ /**
+ * Tests if a given EJB object is identical to the invoked EJB object.
+ *
+ * @param ejbo - An object to test for identity with the invoked object.
+ * @return True if the given EJB object is identical to the invoked object, false otherwise.
+ * @exception java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.
+ */
+ public boolean isIdentical(EJBObject ejbo) throws RemoteException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EJBObject.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EnterpriseBean.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EnterpriseBean.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EnterpriseBean.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EnterpriseBean.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,29 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * The EnterpriseBean interface must be implemented by every enterprise Bean class.
+ * It is a common superinterface for the SessionBean, EntityBean and MessageDrivenBean interfaces.
+ */
+public interface EnterpriseBean extends java.io.Serializable {
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EnterpriseBean.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityBean.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EntityBean.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityBean.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityBean.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,148 @@
+/*
+* 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 javax.ejb;
+
+import java.rmi.RemoteException;
+
+/**
+ * The EntityBean interface is implemented by every entity enterprise
+ * Bean class. The container uses the EntityBean methods to notify the
+ * enterprise Bean instances of the instance's life cycle events.
+ */
+public interface EntityBean extends EnterpriseBean {
+
+ /**
+ * <P>Set the associated entity context. The container invokes this method on an instance
+ * after the instance has been created.</P>
+ *
+ * <P>This method is called in an unspecified transaction context.</P>
+ *
+ * @param ctx - An EntityContext interface for the instance. The instance should store the
+ * reference to the context in an instance variable.
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void setEntityContext(EntityContext ctx) throws EJBException, RemoteException;
+
+ /**
+ * <P>Unset the associated entity context. The container calls this method before removing the instance.</P>
+ *
+ * <P>This is the last method that the container invokes on the instance. The Java garbage collector
+ * will eventually invoke the finalize() method on the instance.</P>
+ *
+ * <P>This method is called in an unspecified transaction context.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void unsetEntityContext() throws EJBException, RemoteException;
+
+ /**
+ * <P>A container invokes this method before it removes the EJB object that is currently associated
+ * with the instance. This method is invoked when a client invokes a remove operation on the enterprise
+ * Bean's home interface or the EJB object's remote interface. This method transitions the instance from
+ * the ready state to the pool of available instances.</P>
+ *
+ * <P>This method is called in the transaction context of the remove operation.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void ejbRemove() throws RemoveException, EJBException, RemoteException;
+
+ /**
+ * <P>A container invokes this method when the instance is taken out of the pool of available
+ * instances to become associated with a specific EJB object. This method transitions the instance
+ * to the ready state.</P>
+ *
+ * <P>This method executes in an unspecified transaction context.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void ejbActivate() throws EJBException, RemoteException;
+
+ /**
+ * <P>A container invokes this method on an instance before the instance becomes disassociated with
+ * a specific EJB object. After this method completes, the container will place the instance into the
+ * pool of available instances.</P>
+ *
+ * <P>This method executes in an unspecified transaction context.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void ejbPassivate() throws EJBException, RemoteException;
+
+ /**
+ * <P>A container invokes this method to instruct the instance to synchronize its state by loading
+ * it state from the underlying database.</P>
+ *
+ * <P>This method always executes in the transaction context determined by the value of the transaction
+ * attribute in the deployment descriptor.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void ejbLoad() throws EJBException, RemoteException;
+
+ /**
+ * <P>A container invokes this method to instruct the instance to synchronize its state by storing it to
+ * the underlying database.</P>
+ *
+ * <P>This method always executes in the transaction context determined by the value of the transaction
+ * attribute in the deployment descriptor.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void ejbStore() throws EJBException, RemoteException;
+
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityBean.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityContext.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/EntityContext.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityContext.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityContext.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,86 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <P>The EntityContext interface provides an instance with access to
+ * the container-provided runtime context of an entity enterprise Bean
+ * instance. The container passes the EntityContext interface to an entity
+ * enterprise Bean instance after the instance has been created.</P>
+ *
+ * <P>The EntityContext interface remains associated with the instance for the
+ * lifetime of the instance. Note that the information that the instance
+ * obtains using the EntityContext interface (such as the result of the
+ * getPrimaryKey() method) may change, as the container assigns the instance
+ * to different EJB objects during the instance's life cycle.</P>
+ */
+public interface EntityContext extends EJBContext {
+
+ /**
+ * <P>Obtain a reference to the EJB local object that is currently associated with the instance.</P>
+ *
+ * <P>An instance of an entity enterprise Bean can call this method only when the instance is associated
+ * with an EJB local object identity, i.e. in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove, ejbLoad,
+ * ejbStore, and business methods.</P>
+ *
+ * <P>An instance can use this method, for example, when it wants to pass a reference to itself in a
+ * method argument or result.</P>
+ *
+ * @return The EJB local object currently associated with the instance.
+ * @exception java.lang.IllegalStateException - if the instance invokes this method while the instance
+ * is in a state that does not allow the instance to invoke this method, or if the instance does not have
+ * a local interface.
+ */
+ public EJBLocalObject getEJBLocalObject() throws IllegalStateException;
+
+ /**
+ * <P>Obtain a reference to the EJB object that is currently associated with the instance.</P>
+ *
+ * <P>An instance of an entity enterprise Bean can call this method only when the instance is associated
+ * with an EJB object identity, i.e. in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove, ejbLoad,
+ * ejbStore, and business methods.</P>
+ *
+ * <P>An instance can use this method, for example, when it wants to pass a reference to itself in a method
+ * argument or result.</P>
+ *
+ * @return The EJB object currently associated with the instance.
+ * @exception java.lang.IllegalStateException - Thrown if the instance invokes this method while the instance
+ * is in a state that does not allow the instance to invoke this method, or if the instance does not have a
+ * remote interface.
+ */
+ public EJBObject getEJBObject() throws IllegalStateException;
+
+ /**
+ * <P>Obtain the primary key of the EJB object that is currently associated with this instance.</P>
+ *
+ * <P>An instance of an entity enterprise Bean can call this method only when the instance is associated
+ * with an EJB object identity, i.e. in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove, ejbLoad,
+ * ejbStore, and business methods.</P>
+ *
+ * <P><B>Note:</B> The result of this method is that same as the result of getEJBObject().getPrimaryKey().</P>
+ *
+ * @return The primary key currently associated with the instance.
+ * @exception java.lang.IllegalStateException - Thrown if the instance invokes this method while the
+ * instance is in a state that does not allow the instance to invoke this method.
+ */
+ public Object getPrimaryKey() throws IllegalStateException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/EntityContext.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/FinderException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/FinderException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/FinderException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/FinderException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,48 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <P>The FinderException exception must be included in the throws clause
+ * of every findMETHOD(...) method of an entity Bean's home interface.</P>
+ *
+ * <P>The exception is used as a standard application-level exception to,
+ * report a failure to find the requested EJB object(s).</P>
+ */
+public class FinderException extends Exception {
+
+ /**
+ * Constructs an FinderException with no detail message.
+ */
+ public FinderException() {
+ super();
+ }
+
+ /**
+ * Constructs an FinderException with the specified detail message.
+ *
+ * @param message The detailed message.
+ */
+ public FinderException(String message) {
+ super(message);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/FinderException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/Handle.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/Handle.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/Handle.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/Handle.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,41 @@
+/*
+* 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 javax.ejb;
+
+import java.rmi.RemoteException;
+
+/**
+ * The Handle interface is implemented by all EJB object handles. A handle
+ * is an abstraction of a network reference to an EJB object. A handle is
+ * intended to be used as a "robust" persistent reference to an EJB object.
+ */
+public interface Handle extends java.io.Serializable {
+
+ /**
+ * Obtains the EJB object reference represented by this handle.
+ *
+ * @return The EJB object reference represented by this handle.
+ * @exception java.rmi.RemoteException - The EJB object could not be obtained because of a
+ * system-level failure.
+ */
+ public EJBObject getEJBObject() throws RemoteException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/Handle.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/HomeHandle.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/HomeHandle.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/HomeHandle.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/HomeHandle.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -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 javax.ejb;
+
+import java.rmi.RemoteException;
+
+/**
+ * The HomeHandle interface is implemented by all home object handles. A
+ * handle is an abstraction of a network reference to a home object. A
+ * handle is intended to be used as a "robust" persistent reference to a
+ * home object.
+ */
+public interface HomeHandle extends java.io.Serializable {
+
+ /**
+ * Obtains the home object represented by this handle.
+ *
+ * @return The home object represented by this handle.
+ * @exception java.rmi.RemoteException - The home object could not be obtained because of a
+ * system-level failure.
+ */
+ public EJBHome getEJBHome() throws RemoteException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/HomeHandle.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenBean.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/MessageDrivenBean.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenBean.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenBean.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,54 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * The MessageDrivenBean interface is implemented by every message driven
+ * enterprise bean class. The container uses the MessageDrivenBean methods
+ * to notify the enterprise bean instances of the instance's life cycle events.
+ */
+public interface MessageDrivenBean extends EnterpriseBean {
+
+ /**
+ * <P>Set the associated message-driven context. The container calls this method after the
+ * instance creation.</P>
+ *
+ * <P>The enterprise Bean instance should store the reference to the context object in an instance
+ * variable.</P>
+ *
+ * <P>This method is called with no transaction context.</P>
+ *
+ * @param ctx - A MessageDrivenContext interface for the instance.
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ */
+ public void setMessageDrivenContext( MessageDrivenContext ctx ) throws EJBException;
+
+ /**
+ * <P>A container invokes this method before it ends the life of the message-driven object.
+ * This happens when a container decides to terminate the message-driven object.</P>
+ *
+ * <P>This method is called with no transaction context.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ */
+ public void ejbRemove() throws EJBException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenBean.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenContext.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/MessageDrivenContext.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenContext.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenContext.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,36 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <P>The MessageDrivenContext interface provides an instance with access
+ * to the container-provided runtime context of a message-driven enterprise
+ * bean instance. The container passes the MessageDrivenContext interface
+ * to an entity enterprise Bean instance after the instance has been
+ * created.</P>
+ *
+ * <P>The MessageDrivenContext interface remains associated with the
+ * instance for the lifetime of the instance.
+ */
+
+public interface MessageDrivenContext extends EJBContext {
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/MessageDrivenContext.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchEntityException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/NoSuchEntityException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchEntityException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchEntityException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,60 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <p>The NoSuchEntityException exception is thrown by an Entity Bean
+ * instance to its container to report that the invoked business method
+ * or callback method could not be completed because of the underlying
+ * entity was removed from the database.</p>
+ *
+ * <p>This exception may be thrown by the bean class methods that implement
+ * the business methods defined in the bean's component interface; and by the
+ * ejbLoad and ejbStore methods.</p>
+ */
+public class NoSuchEntityException extends EJBException {
+
+ /**
+ * Constructs a NoSuchEntityException with no detail message.
+ */
+ public NoSuchEntityException() {
+ super();
+ }
+
+ /**
+ * Constructs a NoSuchEntityException with the specified detailed message.
+ *
+ * @param message - The detailed message.
+ */
+ public NoSuchEntityException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a NoSuchEntityException that embeds the originally thrown exception.
+ *
+ * @param ex - The originally thrown exception.
+ */
+ public NoSuchEntityException(Exception ex) {
+ super(ex);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchEntityException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchObjectLocalException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/NoSuchObjectLocalException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchObjectLocalException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchObjectLocalException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,56 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * A NoSuchObjectLocalException is thrown if an attempt is made to invoke
+ * a method on an object that no longer exists.
+ */
+public class NoSuchObjectLocalException extends EJBException {
+
+ /**
+ * Constructs a NoSuchObjectLocalException with no detail message.
+ */
+ public NoSuchObjectLocalException() {
+ super();
+ }
+
+ /**
+ * Constructs a NoSuchObjectLocalException with the specified detailed message.
+ *
+ * @param message - The detailed message.
+ */
+ public NoSuchObjectLocalException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a NoSuchObjectLocalException with the specified detail message and a
+ * nested exception.
+ *
+ * @param message - The detailed message.
+ * @param ex - The originally thrown exception.
+ */
+ public NoSuchObjectLocalException(String message, Exception ex) {
+ super(message,ex);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/NoSuchObjectLocalException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/ObjectNotFoundException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/ObjectNotFoundException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/ObjectNotFoundException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/ObjectNotFoundException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,50 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * <p>The ObjectNotFoundException exception is thrown by a finder method
+ * to indicate that the specified EJB object does not exist.</p>
+ *
+ * <p>Only the finder methods that are declared to return a single EJB object
+ * use this exception. This exception should not be thrown by finder methods
+ * that return a collection of EJB objects (they should return an empty collection
+ * instead).</p>
+ */
+public class ObjectNotFoundException extends FinderException {
+
+ /**
+ * Constructs an ObjectNotFoundException with no detail message.
+ */
+ public ObjectNotFoundException() {
+ super();
+ }
+
+ /**
+ * Constructs an ObjectNotFoundException with the specified detail message.
+ *
+ * @param message - The detailed message.
+ */
+ public ObjectNotFoundException(String message) {
+ super(message);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/ObjectNotFoundException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/RemoveException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/RemoveException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/RemoveException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/RemoveException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,46 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * The RemoveException exception is thrown at an attempt to remove an EJB
+ * object when the enterprise Bean or the container does not allow the EJB
+ * object to be removed.
+ */
+public class RemoveException extends Exception {
+
+ /**
+ * Constructs an RemoveException with no detail message.
+ */
+ public RemoveException() {
+ super();
+ }
+
+ /**
+ * Constructs an RemoveException with the specified detail message.
+ *
+ * @param message - The detailed message.
+ */
+ public RemoveException(String message) {
+ super(message);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/RemoveException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionBean.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/SessionBean.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionBean.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionBean.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,98 @@
+/*
+* 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 javax.ejb;
+
+import java.rmi.RemoteException;
+
+/**
+ * The SessionBean interface is implemented by every session enterprise
+ * Bean class. The container uses the SessionBean methods to notify the
+ * enterprise Bean instances of the instance's life cycle events.
+ */
+public interface SessionBean extends EnterpriseBean {
+
+ /**
+ * <P>Set the associated session context. The container calls this method after the instance creation.</P>
+ *
+ * <P>The enterprise Bean instance should store the reference to the context object in an instance variable.</P>
+ *
+ * <P>This method is called with no transaction context.</P>
+ *
+ * @param ctx - A SessionContext interface for the instance.
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void setSessionContext(SessionContext ctx) throws EJBException, RemoteException;
+
+ /**
+ * <P>A container invokes this method before it ends the life of the session object. This happens
+ * as a result of a client's invoking a remove operation, or when a container decides to terminate
+ * the session object after a timeout.</P>
+ *
+ * <P>This method is called with no transaction context.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void ejbRemove() throws EJBException, RemoteException;
+
+ /**
+ * <P>The activate method is called when the instance is activated from its "passive" state.
+ * The instance should acquire any resource that it has released earlier in the ejbPassivate() method.</P>
+ *
+ * <P>This method is called with no transaction context.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void ejbActivate() throws EJBException, RemoteException;
+
+ /**
+ * <P>The passivate method is called before the instance enters the "passive" state. The instance should
+ * release any resources that it can re-acquire later in the ejbActivate() method.</P>
+ *
+ * <P>After the passivate method completes, the instance must be in a state that allows the container to
+ * use the Java Serialization protocol to externalize and store away the instance's state.</P>
+ *
+ * <P>This method is called with no transaction context.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide
+ * backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans
+ * written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException
+ * instead of this exception.
+ */
+ public void ejbPassivate() throws EJBException, RemoteException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionBean.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionContext.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/SessionContext.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionContext.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionContext.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,98 @@
+/*
+* 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 javax.ejb;
+
+import javax.xml.rpc.handler.MessageContext;
+
+/**
+ * The SessionContext interface provides access to the runtime session
+ * context that the container provides for a session enterprise Bean
+ * instance. The container passes the SessionContext interface to an
+ * instance after the instance has been created. The session context
+ * remains associated with the instance for the lifetime of the instance.
+ * @version $Revision$
+ */
+public interface SessionContext extends EJBContext
+{
+
+ /**
+ * <P>Obtain a reference to the EJB local object that is currently associated with the instance.</P>
+ *
+ * <P>An instance of an entity enterprise Bean can call this method only when the instance is associated
+ * with an EJB local object identity, i.e. in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove, ejbLoad,
+ * ejbStore, and business methods.</P>
+ *
+ * <P>An instance can use this method, for example, when it wants to pass a reference to itself in a method
+ * argument or result.</P>
+ *
+ * @return The EJB local object currently associated with the instance.
+ * @exception java.lang.IllegalStateException - Thrown if the instance invokes this method while the instance
+ * is in a state that does not allow the instance to invoke this method, or if the instance does not have a
+ * local interface.
+ */
+ public EJBLocalObject getEJBLocalObject() throws IllegalStateException;
+
+ /**
+ * <P>Obtain a reference to the EJB object that is currently associated with the instance.</P>
+ *
+ * <P>An instance of a session enterprise Bean can call this method at anytime between the ejbCreate()
+ * and ejbRemove() methods, including from within the ejbCreate() and ejbRemove() methods.</P>
+ *
+ * <P>An instance can use this method, for example, when it wants to pass a reference to itself in a method
+ * argument or result.</P>
+ *
+ * @return The EJB object currently associated with the instance.
+ * @exception java.lang.IllegalStateException - Thrown if the instance invokes this method while the instance
+ * is in a state that does not allow the instance to invoke this method, or if the instance does not have a
+ * remote interface.
+ */
+ public EJBObject getEJBObject() throws IllegalStateException;
+
+ /** Obtain a reference to the JAX-RPC MessageContext. An instance of a
+ * stateless session bean can call this method from any business method
+ * invoked through its web service endpoint interface.
+ *
+ * @return The MessageContext for this web service invocation.
+ * @throws IllegalStateException - Thrown if this method is invoked while
+ * the instance is in a state that does not allow access to this method.
+ */
+ public MessageContext getMessageContext() throws IllegalStateException;
+
+ /** Returns the session bean�s business interface. Only session beans with an EJB 3.0 business interface
+ * can call this method.
+ *
+ * @return The business interface associated with the instance.
+ * @throws IllegalStateException - Thrown if this method is invoked while
+ * the instance is in a state that does not allow access to this method.
+ */
+ public <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException;
+
+ /** Returns the session bean business interface through which the bean was invoked.
+ *
+ * @return The business interface through which the bean was invoked.
+ * @throws IllegalStateException - Thrown if this method is invoked while
+ * the instance is in a state that does not allow access to this method.
+ */
+ public Class getInvokedBusinessInterface() throws IllegalStateException;
+
+
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionContext.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionSynchronization.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/SessionSynchronization.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionSynchronization.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionSynchronization.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,86 @@
+/*
+* 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 javax.ejb;
+
+import java.rmi.RemoteException;
+
+/**
+ * <P>The SessionSynchronization interface allows a session Bean instance
+ * to be notified by its container of transaction boundaries.</P>
+ *
+ * <P>An session Bean class is not required to implement this interface. A
+ * session Bean class should implement this interface only if it wishes to
+ * synchronize its state with the transactions.</P>
+ */
+public interface SessionSynchronization {
+
+ /**
+ * <P>The afterBegin method notifies a session Bean instance that a new transaction has started, and that
+ * the subsequent business methods on the instance will be invoked in the context of the transaction.</P>
+ *
+ * <P>The instance can use this method, for example, to read data from a database and cache the data in
+ * the instance fields.</P>
+ *
+ * <P>This method executes in the proper transaction context.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide backward
+ * compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the
+ * EJB 1.1 and higher specifications should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB 2.0 and higher specifications must not throw the java.rmi.RemoteException.
+ */
+ public void afterBegin() throws EJBException, RemoteException;
+
+ /**
+ * <P>The beforeCompletion method notifies a session Bean instance that a transaction is about to be committed.
+ * The instance can use this method, for example, to write any cached data to a database.</P>
+ *
+ * <P>This method executes in the proper transaction context.</P>
+ *
+ * <P><B>Note:</B> The instance may still cause the container to rollback the transaction by invoking the
+ * setRollbackOnly() method on the instance context, or by throwing an exception.</P>
+ *
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide backward
+ * compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the
+ * EJB 1.1 and higher specifications should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB 2.0 and higher specifications must not throw the java.rmi.RemoteException.
+ */
+ public void beforeCompletion() throws EJBException, RemoteException;
+
+ /**
+ * <P>The afterCompletion method notifies a session Bean instance that a transaction commit protocol has
+ * completed, and tells the instance whether the transaction has been committed or rolled back.</P>
+ *
+ * <P>This method executes with no transaction context.</P>
+ *
+ * <P>This method executes with no transaction context.</P>
+ *
+ * @param committed - True if the transaction has been committed, false if is has been rolled back.
+ * @exception EJBException - Thrown by the method to indicate a failure caused by a system-level error.
+ * @exception java.rmi.RemoteException - This exception is defined in the method signature to provide backward
+ * compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the
+ * EJB 1.1 and higher specifications should throw the javax.ejb.EJBException instead of this exception.
+ * Enterprise beans written for the EJB 2.0 and higher specifications must not throw the java.rmi.RemoteException.
+ */
+ public void afterCompletion(boolean committed) throws EJBException, RemoteException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/SessionSynchronization.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimedObject.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/TimedObject.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimedObject.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimedObject.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,37 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * The TimedObject interface contains the callback method that is used
+ * to deliver timer expiration notifications. It is implemented by an
+ * entity bean or stateless session bean or message-driven bean class.
+ **/
+public interface TimedObject {
+
+ /**
+ * Invoked by the EJB container upon timer expiration.
+ *
+ * @param timer Timer whose expiration caused this notification
+ **/
+ public void ejbTimeout( Timer timer );
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimedObject.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/Timer.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/Timer.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/Timer.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/Timer.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,112 @@
+/*
+* 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 javax.ejb;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * The Timer interface contains information about a timer that was created
+ * through the EJB Timer Service
+ **/
+public interface Timer {
+
+ /**
+ * Cause the timer and all its associated expiration notifications to be cancelled.
+ *
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public void cancel()
+ throws
+ IllegalStateException,
+ NoSuchObjectLocalException,
+ EJBException;
+
+ /**
+ * Get the number of milliseconds that will elapse before the next scheduled timer expiration.
+ *
+ * @return Number of milliseconds that will elapse before the next scheduled timer expiration.
+ *
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public long getTimeRemaining()
+ throws
+ IllegalStateException,
+ NoSuchObjectLocalException,
+ EJBException;
+
+ /**
+ * Get the point in time at which the next timer expiration is scheduled to occur.
+ *
+ * @return Get the point in time at which the next timer expiration is scheduled to occur.
+ *
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public Date getNextTimeout()
+ throws
+ IllegalStateException,
+ NoSuchObjectLocalException,
+ EJBException;
+
+ /**
+ * Get the information associated with the timer at the time of creation.
+ *
+ * @return The Serializable object that was passed in at timer creation, or null if the
+ * info argument passed in at timer creation was null.
+ *
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public Serializable getInfo()
+ throws
+ IllegalStateException,
+ NoSuchObjectLocalException,
+ EJBException;
+
+ /**
+ * Get a serializable handle to the timer. This handle can be used at a later time to
+ * re-obtain the timer reference.
+ *
+ * @return Handle of the Timer
+ *
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public TimerHandle getHandle()
+ throws
+ IllegalStateException,
+ NoSuchObjectLocalException,
+ EJBException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/Timer.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerHandle.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/TimerHandle.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerHandle.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerHandle.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,48 @@
+/*
+* 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 javax.ejb;
+
+import java.io.Serializable;
+
+/**
+ * The TimerHandle interface is implemented by all EJB timer handles.
+ **/
+public interface TimerHandle
+ extends Serializable
+{
+
+ /**
+ * Obtain a reference to the timer represented by this handle.
+ *
+ * @return Timer which this handle represents
+ *
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public Timer getTimer()
+ throws
+ IllegalStateException,
+ NoSuchObjectLocalException,
+ EJBException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerHandle.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerService.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/TimerService.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerService.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerService.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,145 @@
+/*
+* 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 javax.ejb;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+
+/**
+ * The TimerService interface provides enterprise bean components with access to the
+ * container-provided Timer Service. The EJB Timer Service allows entity beans, stateless
+ * session beans, and message-driven beans to be registered for timer callback events at
+ * a specified time, after a specified elapsed time, or after a specified interval.
+ **/
+public interface TimerService {
+
+ /**
+ * Create a single-action timer that expires after a specified duration.
+ *
+ * @param duration The number of milliseconds that must elapse before the timer expires.
+ * @param info Application information to be delivered along with the timer expiration
+ * notification. This can be null.
+ *
+ * @return The newly created Timer.
+ *
+ * @throws IllegalArgumentException If duration is negative
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public Timer createTimer( long duration, Serializable info )
+ throws
+ IllegalArgumentException,
+ IllegalStateException,
+ EJBException;
+
+ /**
+ * Create an interval timer whose first expiration occurs after a specified duration,
+ * and whose subsequent expirations occur after a specified interval.
+ *
+ * @param initialDuration The number of milliseconds that must elapse before the first
+ * timer expiration notification.
+ * @param intervalDuration The number of milliseconds that must elapse between timer
+ * expiration notifications. Expiration notifications are
+ * scheduled relative to the time of the first expiration. If
+ * expiration is delayed(e.g. due to the interleaving of other
+ * method calls on the bean) two or more expiration notifications
+ * may occur in close succession to "catch up".
+ * @param info Application information to be delivered along with the timer expiration
+ * notification. This can be null.
+ *
+ * @return The newly created Timer.
+ *
+ * @throws IllegalArgumentException If initialDuration is negative, or intervalDuration
+ * is negative.
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public Timer createTimer( long initialDuration, long intervalDuration, Serializable info )
+ throws
+ IllegalArgumentException,
+ IllegalStateException,
+ EJBException;
+
+ /**
+ * Create a single-action timer that expires at a given point in time.
+ *
+ * @param expiration The point in time at which the timer must expire.
+ * @param info Application information to be delivered along with the timer expiration
+ * notification. This can be null.
+ *
+ * @return The newly created Timer.
+ *
+ * @throws IllegalArgumentException If expiration is null, or expiration.getTime() is negative.
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public Timer createTimer( Date expiration, Serializable info )
+ throws
+ IllegalArgumentException,
+ IllegalStateException,
+ EJBException;
+
+ /**
+ * Create an interval timer whose first expiration occurs at a given point in time and
+ * whose subsequent expirations occur after a specified interval.
+ *
+ * @param initialExpiration The point in time at which the first timer expiration must occur.
+ * @param intervalDuration The number of milliseconds that must elapse between timer
+ * expiration notifications. Expiration notifications are
+ * scheduled relative to the time of the first expiration. If
+ * expiration is delayed(e.g. due to the interleaving of other
+ * method calls on the bean) two or more expiration notifications
+ * may occur in close succession to "catch up".
+ * @param info Application information to be delivered along with the timer expiration
+ * notification. This can be null.
+ *
+ * @return The newly created Timer.
+ *
+ * @throws IllegalArgumentException If initialExpiration is null, or initialExpiration.getTime()
+ * is negative, or intervalDuration is negative.
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public Timer createTimer( Date initialExpiration, long intervalDuration, Serializable info )
+ throws
+ IllegalArgumentException,
+ IllegalStateException,
+ EJBException;
+
+ /**
+ * Get all the active timers associated with this bean.
+ *
+ * @return A collection of javax.ejb.Timer objects.
+ * @throws IllegalStateException If this method is invoked while the instance is in
+ * a state that does not allow access to this method.
+ * @throws EJBException If this method could not complete due to a system-level failure.
+ **/
+ public Collection getTimers()
+ throws
+ IllegalStateException,
+ EJBException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TimerService.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRequiredLocalException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/TransactionRequiredLocalException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRequiredLocalException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRequiredLocalException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,45 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * This exception indicates that a request carried a null transaction context,
+ * but the target object requires an activate transaction.
+ */
+public class TransactionRequiredLocalException extends EJBException {
+
+ /**
+ * Constructs a TransactionRequiredLocalException with no detail message.
+ */
+ public TransactionRequiredLocalException() {
+ super();
+ }
+
+ /**
+ * Constructs a TransactionRequiredLocalException with the specified detailed message.
+ *
+ * @param message - The detailed message.
+ */
+ public TransactionRequiredLocalException(String message) {
+ super(message);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRequiredLocalException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRolledbackLocalException.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/TransactionRolledbackLocalException.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRolledbackLocalException.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRolledbackLocalException.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,58 @@
+/*
+* 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 javax.ejb;
+
+/**
+ * This exception indicates that the transaction associated with processing
+ * of the request has been rolled back, or marked to roll back. Thus the
+ * requested operation either could not be performed or was not performed
+ * because further computation on behalf of the transaction would be fruitless.
+ */
+public class TransactionRolledbackLocalException extends EJBException {
+
+ /**
+ * Constructs a TransactionRolledbackLocalException with no detail message.
+ */
+ public TransactionRolledbackLocalException() {
+ super();
+ }
+
+ /**
+ * Constructs a TransactionRolledbackLocalException with the specified detailed message.
+ *
+ * @param message - The detailed message.
+ */
+ public TransactionRolledbackLocalException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a TransactionRolledbackLocalException with the specified detail
+ * message and a nested exception.
+ *
+ * @param message - The detailed message.
+ * @param ex - The originally thrown exception.
+ */
+ public TransactionRolledbackLocalException(String message,Exception ex) {
+ super(message,ex);
+ }
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/TransactionRolledbackLocalException.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi (from rev 61187, trunk/j2ee/src/main/javax/ejb/spi)
Deleted: projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/HandleDelegate.java
===================================================================
--- trunk/j2ee/src/main/javax/ejb/spi/HandleDelegate.java 2007-03-07 12:41:45 UTC (rev 61187)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/HandleDelegate.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -1,113 +0,0 @@
-/*
-* 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 javax.ejb.spi;
-
-import javax.ejb.EJBHome;
-import javax.ejb.EJBObject;
-
-/**
- * <P>The HandleDelegate interface is implemented by the EJB container.
- * It is used by portable implementations of javax.ejb.Handle and
- * javax.ejb.HomeHandle. It is not used by EJB components or by client components.
- * It provides methods to serialize and deserialize EJBObject and EJBHome
- * references to streams.</P>
- *
- * <P>The HandleDelegate object is obtained by JNDI lookup at the reserved name
- * "java:comp/HandleDelegate".</P>
- */
-public interface HandleDelegate {
-
- /**
- * <P>Serialize the EJBObject reference corresponding to a Handle.</P>
- *
- * <P>This method is called from the writeObject method of portable
- * Handle implementation classes. The ostream object is the same
- * object that was passed in to the Handle class's writeObject.</P>
- *
- * @param ejbObject - The EJBObject reference to be serialized.
- * @param ostream - The output stream.
- * @exception java.io.IOException - The EJBObject could not be serialized
- * because of a system-level failure.
- */
- public void writeEJBObject(EJBObject ejbObject,
- java.io.ObjectOutputStream ostream)
- throws java.io.IOException;
-
-
- /**
- * <P>Deserialize the EJBObject reference corresponding to a Handle.</P>
- *
- * <P>readEJBObject is called from the readObject method of portable
- * Handle implementation classes. The istream object is the same object
- * that was passed in to the Handle class's readObject. When readEJBObject
- * is called, istream must point to the location in the stream at which
- * the EJBObject reference can be read. The container must ensure that
- * the EJBObject reference is capable of performing invocations immediately
- * after deserialization.</P>
- *
- * @param istream - The input stream.
- * @return The deserialized EJBObject reference.
- * @exception java.io.IOException - The EJBObject could not be deserialized
- * because of a system-level failure.
- * @exception java.lang.ClassNotFoundException - The EJBObject could not be
- * deserialized because some
- * class could not be found.
- */
- public EJBObject readEJBObject(java.io.ObjectInputStream istream)
- throws java.io.IOException, java.lang.ClassNotFoundException;
-
- /**
- * <P>Serialize the EJBHome reference corresponding to a HomeHandle.</P>
- *
- * <P>This method is called from the writeObject method of portable HomeHandle
- * implementation classes. The ostream object is the same object that was
- * passed in to the Handle class's writeObject.</P>
- *
- * @param ejbHome - The EJBHome reference to be serialized.
- * @param ostream - The output stream.
- * @exception java.io.IOException - The EJBObject could not be serialized
- * because of a system-level failure.
- */
- public void writeEJBHome(EJBHome ejbHome,
- java.io.ObjectOutputStream ostream)
- throws java.io.IOException;
-
- /**
- * <P>Deserialize the EJBHome reference corresponding to a HomeHandle.</P>
- *
- * <P>readEJBHome is called from the readObject method of portable HomeHandle
- * implementation classes. The istream object is the same object that was
- * passed in to the HomeHandle class's readObject. When readEJBHome is called,
- * istream must point to the location in the stream at which the EJBHome reference
- * can be read. The container must ensure that the EJBHome reference is capable
- * of performing invocations immediately after deserialization.</P>
- *
- * @param istream - The input stream.
- * @return The deserialized EJBHome reference.
- * @exception java.io.IOException - The EJBHome could not be deserialized because
- * of a system-level failure.
- * @exception java.lang.ClassNotFoundException - The EJBHome could not be deserialized
- * because some class could not be found.
- */
- public EJBHome readEJBHome(java.io.ObjectInputStream istream)
- throws java.io.IOException, java.lang.ClassNotFoundException;
-}
Copied: projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/HandleDelegate.java (from rev 61187, trunk/j2ee/src/main/javax/ejb/spi/HandleDelegate.java)
===================================================================
--- projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/HandleDelegate.java (rev 0)
+++ projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/HandleDelegate.java 2007-03-07 14:13:14 UTC (rev 61191)
@@ -0,0 +1,113 @@
+/*
+* 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 javax.ejb.spi;
+
+import javax.ejb.EJBHome;
+import javax.ejb.EJBObject;
+
+/**
+ * <P>The HandleDelegate interface is implemented by the EJB container.
+ * It is used by portable implementations of javax.ejb.Handle and
+ * javax.ejb.HomeHandle. It is not used by EJB components or by client components.
+ * It provides methods to serialize and deserialize EJBObject and EJBHome
+ * references to streams.</P>
+ *
+ * <P>The HandleDelegate object is obtained by JNDI lookup at the reserved name
+ * "java:comp/HandleDelegate".</P>
+ */
+public interface HandleDelegate {
+
+ /**
+ * <P>Serialize the EJBObject reference corresponding to a Handle.</P>
+ *
+ * <P>This method is called from the writeObject method of portable
+ * Handle implementation classes. The ostream object is the same
+ * object that was passed in to the Handle class's writeObject.</P>
+ *
+ * @param ejbObject - The EJBObject reference to be serialized.
+ * @param ostream - The output stream.
+ * @exception java.io.IOException - The EJBObject could not be serialized
+ * because of a system-level failure.
+ */
+ public void writeEJBObject(EJBObject ejbObject,
+ java.io.ObjectOutputStream ostream)
+ throws java.io.IOException;
+
+
+ /**
+ * <P>Deserialize the EJBObject reference corresponding to a Handle.</P>
+ *
+ * <P>readEJBObject is called from the readObject method of portable
+ * Handle implementation classes. The istream object is the same object
+ * that was passed in to the Handle class's readObject. When readEJBObject
+ * is called, istream must point to the location in the stream at which
+ * the EJBObject reference can be read. The container must ensure that
+ * the EJBObject reference is capable of performing invocations immediately
+ * after deserialization.</P>
+ *
+ * @param istream - The input stream.
+ * @return The deserialized EJBObject reference.
+ * @exception java.io.IOException - The EJBObject could not be deserialized
+ * because of a system-level failure.
+ * @exception java.lang.ClassNotFoundException - The EJBObject could not be
+ * deserialized because some
+ * class could not be found.
+ */
+ public EJBObject readEJBObject(java.io.ObjectInputStream istream)
+ throws java.io.IOException, java.lang.ClassNotFoundException;
+
+ /**
+ * <P>Serialize the EJBHome reference corresponding to a HomeHandle.</P>
+ *
+ * <P>This method is called from the writeObject method of portable HomeHandle
+ * implementation classes. The ostream object is the same object that was
+ * passed in to the Handle class's writeObject.</P>
+ *
+ * @param ejbHome - The EJBHome reference to be serialized.
+ * @param ostream - The output stream.
+ * @exception java.io.IOException - The EJBObject could not be serialized
+ * because of a system-level failure.
+ */
+ public void writeEJBHome(EJBHome ejbHome,
+ java.io.ObjectOutputStream ostream)
+ throws java.io.IOException;
+
+ /**
+ * <P>Deserialize the EJBHome reference corresponding to a HomeHandle.</P>
+ *
+ * <P>readEJBHome is called from the readObject method of portable HomeHandle
+ * implementation classes. The istream object is the same object that was
+ * passed in to the HomeHandle class's readObject. When readEJBHome is called,
+ * istream must point to the location in the stream at which the EJBHome reference
+ * can be read. The container must ensure that the EJBHome reference is capable
+ * of performing invocations immediately after deserialization.</P>
+ *
+ * @param istream - The input stream.
+ * @return The deserialized EJBHome reference.
+ * @exception java.io.IOException - The EJBHome could not be deserialized because
+ * of a system-level failure.
+ * @exception java.lang.ClassNotFoundException - The EJBHome could not be deserialized
+ * because some class could not be found.
+ */
+ public EJBHome readEJBHome(java.io.ObjectInputStream istream)
+ throws java.io.IOException, java.lang.ClassNotFoundException;
+}
Property changes on: projects/javaee/trunk/ejb-api/src/main/javax/ejb/spi/HandleDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
More information about the jboss-cvs-commits
mailing list