[jboss-cvs] JBossAS SVN: r62539 - in trunk: ejb3/src/main/org/jboss/ejb3/security and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 25 07:52:28 EDT 2007
Author: wolfc
Date: 2007-04-25 07:52:28 -0400 (Wed, 25 Apr 2007)
New Revision: 62539
Removed:
trunk/ejb3x/src/main/javax/ejb/AccessMode.java
Modified:
trunk/ejb3/src/main/org/jboss/ejb/InitImpl.java
trunk/ejb3/src/main/org/jboss/ejb3/security/Ejb3AuthenticationInterceptor.java
trunk/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptor.java
trunk/ejb3/src/main/org/jboss/ejb3/tx/Ejb3TxPolicy.java
trunk/ejb3x/
trunk/ejb3x/src/main/javax/ejb/ActivationConfigProperty.java
trunk/ejb3x/src/main/javax/ejb/EJB.java
trunk/ejb3x/src/main/javax/ejb/EJBAccessException.java
trunk/ejb3x/src/main/javax/ejb/EJBTransactionRolledbackException.java
trunk/ejb3x/src/main/javax/ejb/Init.java
trunk/j2ee/src/main/javax/ejb/SessionContext.java
Log:
EJBTHREE-950: fixed api
Modified: trunk/ejb3/src/main/org/jboss/ejb/InitImpl.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb/InitImpl.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3/src/main/org/jboss/ejb/InitImpl.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -21,7 +21,7 @@
*/
package org.jboss.ejb;
-import java.util.ArrayList;
+import java.lang.annotation.Annotation;
/**
* // *
@@ -31,28 +31,25 @@
*/
public class InitImpl implements javax.ejb.Init
{
- private ArrayList values = new ArrayList();
+ private String value = "";
public InitImpl()
{
}
- public void addValue(String value)
+ public String value()
{
- values.add(value);
+ return value;
}
- public String[] value()
+ public Class<? extends Annotation> annotationType()
{
- String[] result = new String[values.size()];
- values.toArray(result);
-
- return result;
+ return javax.ejb.Init.class;
}
-
- public Class annotationType()
+
+ public void setValue(String s)
{
- return javax.ejb.Init.class;
+ this.value = s;
}
}
\ No newline at end of file
Modified: trunk/ejb3/src/main/org/jboss/ejb3/security/Ejb3AuthenticationInterceptor.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/security/Ejb3AuthenticationInterceptor.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3/src/main/org/jboss/ejb3/security/Ejb3AuthenticationInterceptor.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -64,7 +64,8 @@
protected void handleGeneralSecurityException(GeneralSecurityException gse)
{
- throw new EJBAccessException("Authentication failure", gse);
+ log.debug("Authentication failure", gse);
+ throw new EJBAccessException("Authentication failure");
}
public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable
Modified: trunk/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptor.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptor.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptor.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -109,7 +109,8 @@
}
catch (SecurityException throwable)
{
- throw new EJBAccessException("Authorization failure", throwable);
+ log.debug("Authorization failure", throwable);
+ throw new EJBAccessException("Authorization failure");
} finally {
}
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/tx/Ejb3TxPolicy.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/tx/Ejb3TxPolicy.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3/src/main/org/jboss/ejb3/tx/Ejb3TxPolicy.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -84,7 +84,7 @@
if (t instanceof EJBTransactionRolledbackException)
throw t;
else
- throw new EJBTransactionRolledbackException((Exception) t);
+ throw new EJBTransactionRolledbackException(t.getMessage(), (Exception) t);
}
}
Property changes on: trunk/ejb3x
___________________________________________________________________
Name: subclipse:tags
+ 62510,jboss-ejb-api,/projects/javaee/trunk/jboss-ejb-api,branch
Deleted: trunk/ejb3x/src/main/javax/ejb/AccessMode.java
===================================================================
--- trunk/ejb3x/src/main/javax/ejb/AccessMode.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3x/src/main/javax/ejb/AccessMode.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -1,34 +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;
-
-/**
- * The enum for the type of EJB Home interface
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public enum AccessMode
-{
- LOCAL,
- REMOTE
-}
Modified: trunk/ejb3x/src/main/javax/ejb/ActivationConfigProperty.java
===================================================================
--- trunk/ejb3x/src/main/javax/ejb/ActivationConfigProperty.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3x/src/main/javax/ejb/ActivationConfigProperty.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -21,14 +21,20 @@
*/
package javax.ejb;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.*;
+import java.lang.annotation.Target;
+
/**
* Annotation for adding properties to messaging bean annotations (i.e. @MessageDriven, @Consumer)
*
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at Retention(RUNTIME)
+ at Target({})
public @interface ActivationConfigProperty
{
String propertyName();
Modified: trunk/ejb3x/src/main/javax/ejb/EJB.java
===================================================================
--- trunk/ejb3x/src/main/javax/ejb/EJB.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3x/src/main/javax/ejb/EJB.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -21,9 +21,9 @@
*/
package javax.ejb;
-import java.lang.annotation.ElementType;
+import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
+import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.Target;
/**
@@ -32,7 +32,8 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
- at Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME)
+ at Retention(RUNTIME)
+ at Target({TYPE, METHOD, FIELD})
public @interface EJB
{
String name() default "";
Modified: trunk/ejb3x/src/main/javax/ejb/EJBAccessException.java
===================================================================
--- trunk/ejb3x/src/main/javax/ejb/EJBAccessException.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3x/src/main/javax/ejb/EJBAccessException.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -43,15 +43,4 @@
public EJBAccessException(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 EJBAccessException(String message,
- Exception ex) {
- super(message,ex);
- }
}
Modified: trunk/ejb3x/src/main/javax/ejb/EJBTransactionRolledbackException.java
===================================================================
--- trunk/ejb3x/src/main/javax/ejb/EJBTransactionRolledbackException.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3x/src/main/javax/ejb/EJBTransactionRolledbackException.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -57,15 +57,4 @@
public EJBTransactionRolledbackException(String message,Exception ex) {
super(message,ex);
}
-
- /**
- * Constructs a TransactionRolledbackLocalException with the specified detail
- * message and a nested exception.
- *
- * @param message - The detailed message.
- * @param ex - The originally thrown exception.
- */
- public EJBTransactionRolledbackException(Exception ex) {
- super(ex);
- }
}
Modified: trunk/ejb3x/src/main/javax/ejb/Init.java
===================================================================
--- trunk/ejb3x/src/main/javax/ejb/Init.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/ejb3x/src/main/javax/ejb/Init.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -34,5 +34,5 @@
*/
@Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
public @interface Init{
- String[] value() default {};
+ String value() default "";
}
Modified: trunk/j2ee/src/main/javax/ejb/SessionContext.java
===================================================================
--- trunk/j2ee/src/main/javax/ejb/SessionContext.java 2007-04-25 11:52:19 UTC (rev 62538)
+++ trunk/j2ee/src/main/javax/ejb/SessionContext.java 2007-04-25 11:52:28 UTC (rev 62539)
@@ -77,14 +77,14 @@
*/
public MessageContext getMessageContext() throws IllegalStateException;
- /** Returns the session beans business interface. Only session beans with an EJB 3.0 business interface
+ /** 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 Object getBusinessObject(Class businessInterface) throws IllegalStateException;
+ public <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException;
/** Returns the session bean business interface through which the bean was invoked.
*
More information about the jboss-cvs-commits
mailing list