[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...
Gavin King
gavin.king at jboss.com
Sun Feb 25 12:25:22 EST 2007
User: gavin
Date: 07/02/25 12:25:22
Modified: src/main/org/jboss/seam Component.java
Log:
another check
Revision Changes Path
1.239 +7 -0 jboss-seam/src/main/org/jboss/seam/Component.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Component.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
retrieving revision 1.238
retrieving revision 1.239
diff -u -b -r1.238 -r1.239
--- Component.java 21 Feb 2007 16:58:41 -0000 1.238
+++ Component.java 25 Feb 2007 17:25:22 -0000 1.239
@@ -618,6 +618,13 @@
logInstances.add(logInstance);
}
}
+ if ( field.isAnnotationPresent(PERSISTENCE_CONTEXT) )
+ {
+ if ( !type.isSessionBean() && type!=MESSAGE_DRIVEN_BEAN )
+ {
+ throw new IllegalArgumentException("@PersistenceContext may only be used on session bean or message driven bean components: " + name);
+ }
+ }
for ( Annotation ann: field.getAnnotations() )
{
if ( ann.annotationType().isAnnotationPresent(DataBinderClass.class) )
More information about the jboss-cvs-commits
mailing list