[Jboss-cvs] JBossAS SVN: r56823 - in branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3: . docs docs/reference/reference/en docs/reference/reference/en/modules docs/tutorial docs/tutorial/asynch docs/tutorial/blob docs/tutorial/callbacks docs/tutorial/callbacks/src/org/jboss/tutorial/callback/bean docs/tutorial/clusteredentity docs/tutorial/clustering docs/tutorial/composite docs/tutorial/consumer docs/tutorial/consumer_deployment_descriptor docs/tutorial/dependency docs/tutorial/dependent docs/tutorial/dependent/src/org/jboss/tutorial/dependent/bean docs/tutorial/ear docs/tutorial/ear/src/org/jboss/tutorial/ear/servlet docs/tutorial/ejb21_client_adaptors docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean docs/tutorial/entity docs/tutorial/entity-security docs/tutorial/entity-security/META-INF docs/tutorial/entity-security/src docs/tutorial/entity-security/src/org docs/tutorial/entity-security/src/org/jboss docs/tutorial/entity-security/src/org/jboss/tuto! rial docs/tutorial/entity-security/src/org/jboss/tutorial/entity docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client docs/tutorial/extended_pc docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean docs/tutorial/injection docs/tutorial/injection/src/org/jboss/tutorial/injection/bean docs/tutorial/interceptor docs/tutorial/interceptor/src/org/jboss/tutorial/interceptor/bean docs/tutorial/jboss_deployment_descriptor docs/tutorial/jboss_deployment_descriptor/src/org/jboss/tutorial/jboss_deployment_descriptor/bean docs/tutorial/jboss_resource_ref docs/tutorial/jca/inflow docs/tutorial/jca/inflow/quartz docs/tutorial/jca/inflow/quartz/META-INF docs/tutorial/jca/inflow/quartz/src docs/tutorial/jca/inflow/quartz/src/org docs/tutorial/jca/inflow/quartz/src/org/jboss docs/tutorial/jca/inflow/quartz/src/org/jbos! s/tutorial docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz docs/tutorial/jndibinding docs/tutorial/joininheritance docs/tutorial/joininheritance/src/org/jboss/tutorial/joininheritance/bean docs/tutorial/mdb docs/tutorial/mdb_deployment_descriptor docs/tutorial/merge docs/tutorial/merge/src/org/jboss/tutorial/me

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Sep 13 20:09:29 EDT 2006


Author: bill.burke at jboss.com
Date: 2006-09-13 20:06:53 -0400 (Wed, 13 Sep 2006)
New Revision: 56823

Added:
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/META-INF/persistence.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.wiki
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jacc-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/log4j.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/roles.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/AllEntity.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/SomeEntity.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StarEntity.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/Stateless.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/Client.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/users.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/log4j.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.wiki
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/AnnotatedQuartzMDBBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/QuartzMDBBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/localhost.keystore
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/localhost.truststore
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/log4j.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/roles.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/Calculator.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/CalculatorBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/Client.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.wiki
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/users.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/DefaultActivationSpecsImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/IIOP.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/PoolClassImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/SerializedConcurrentAccessImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/cache/simple/CacheConfigImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/cache/simple/PersistenceManagerImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/cache/tree/CacheConfigImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb/DeclareRolesImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ClientKernelAbstraction.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/InitialContextFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxClientKernelAbstraction.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxEARImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/KernelAbstractionFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentEjbResolver.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentPersistenceUnitResolver.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModuleEjbResolver.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModulePersistenceUnitResolver.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/EJB3IIOPWebClassLoader.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/.cvsignore
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ActivationConfig.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ApplicationException.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/AssemblyDescriptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CacheConfig.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ClusterConfig.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmpField.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmrField.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Consumer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ContainerTransaction.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CurrentMessage.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelation.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelationshipRole.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeList.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitList.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitMethod.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Inject.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorBinding.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorOrder.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptors.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDestination.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenDestination.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageProperties.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Method.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodAttributes.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodPermission.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/PoolConfig.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Producer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Query.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/QueryMethod.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RelationshipRoleSource.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Relationships.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoteBinding.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveList.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveMethod.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ResourceManager.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SecurityIdentity.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Service.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/XmlAnnotation.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/BrainlessContext.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/java/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/java/javaURLContextFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/JavassistProxy.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/JavassistProxyReplacement.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimedObjectInvoker.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimerServiceFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/JBossTimerServiceFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/TimerServiceFacade.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/package.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/PersistentTimer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerJob.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerServiceFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerServiceImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerService.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerServiceMBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/package.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EjbEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EnvEntryEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ExtendedPersistenceContextInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionUtil.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/Injector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiInjectHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/LinkRefEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PcEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceContextHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceUnitHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PojoInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PuEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ResourceHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ValueEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/WebServiceHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/BaseEjbRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvEntry.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/InjectionTarget.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/JndiRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Listener.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestination.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestinationRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/NameValuePair.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceContextRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceUnitRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Ref.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceEnvRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/RunAs.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRole.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRoleRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/ejb3-timer-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/ejb-jar_3_0.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/security/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/security/tst.policy
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/embedded-jboss-beans.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/jboss-jms-beans.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/log4j.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/login-config.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/security-beans.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/ejb3-jacc/deploy/ejb3-interceptors-aop.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/jboss-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.class
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/web.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/WEB-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/WEB-INF/web.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/persistence.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/custom.jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/jca/inflow/jmsmdbtest-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/persistence.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/mdbtransactionstest-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/META-INF/application.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/jboss-seam.jar
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/seam.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/roles.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/users.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/stateful/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/roles.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/users.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/NestedBeanUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp/InjectionTest.jsp
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSMDBBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSTest.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/StatelessRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/DlqTestMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/LocalStatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideDefaultedQueueTestMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyException.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/ClassNameTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/Calculator.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/CalculatorBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/EJBBeanInterfaceTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/Silly.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/SillyBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/StupidInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/Ejb625UnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Home.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateless.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Home.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/ScopedException.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionService.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionServiceIF.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30LocalHome.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulLocal.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/OverrideStatefulClusteredBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/ConcurrentStateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/ConcurrentStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/RemoteTx.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulInvoker.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/NestedBeanUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/BogusPool.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/Counter.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/CounterBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/OverrideStrictlyPooledMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/OverrideStrictlyPooledSessionBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/StrictlyPooledMDB2.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/BaseTimerTesterBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterService.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TransactionalTimerTesterBean.java
Removed:
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/META-INF/persistence.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.wiki
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jacc-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/log4j.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/roles.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/AllEntity.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/SomeEntity.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StarEntity.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/Stateless.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/Client.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/users.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/log4j.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.wiki
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/AnnotatedQuartzMDBBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/QuartzMDBBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/localhost.keystore
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/localhost.truststore
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/log4j.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/roles.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/Calculator.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/CalculatorBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/Client.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.wiki
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/users.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/javax/jws/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentEjbResolver.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentPersistenceUnitResolver.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModuleEjbResolver.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModulePersistenceUnitResolver.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/EJB3IIOPWebClassLoader.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/injection/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/.cvsignore
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ActivationConfig.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ApplicationException.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/AssemblyDescriptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CacheConfig.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ClusterConfig.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmpField.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmrField.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Consumer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ContainerTransaction.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CurrentMessage.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelation.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelationshipRole.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeList.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitList.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitMethod.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Inject.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorBinding.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorOrder.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptors.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDestination.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenDestination.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageProperties.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Method.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodAttributes.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodPermission.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/PoolConfig.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Producer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Query.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/QueryMethod.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RelationshipRoleSource.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Relationships.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoteBinding.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveList.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveMethod.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ResourceManager.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SecurityIdentity.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Service.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/XmlAnnotation.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/BrainlessContext.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/java/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/java/javaURLContextFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimedObjectInvoker.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimerServiceFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/JBossTimerServiceFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/TimerServiceFacade.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/package.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/PersistentTimer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerJob.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerServiceFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerServiceImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerService.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerServiceMBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/package.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EjbEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EnvEntryEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ExtendedPersistenceContextInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionUtil.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/Injector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiInjectHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/LinkRefEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PcEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceContextHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceUnitHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PojoInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PuEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ResourceHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionFieldInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionMethodInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ValueEncInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/WebServiceHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/BaseEjbRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvEntry.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/InjectionTarget.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/JndiRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Listener.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestination.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestinationRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/NameValuePair.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceContextRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceUnitRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Ref.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceEnvRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/RunAs.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRole.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRoleRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/application-client_5.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/application_5.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/ejb-jar_3_0a.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/javaee_5.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/javaee_web_services_1_2.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/javaee_web_services_client_1_2.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/sun-ejb-jar_3_0.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/security/tst.policy
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/jboss-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.class
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/web.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/WEB-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/WEB-INF/web.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/persistence.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/custom.jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/persistence.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/mdbtransactionstest-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/pkg/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/META-INF/application.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/jboss-seam.jar
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/seam.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/roles.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/users.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp/InjectionTest.jsp
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyException.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/ClassNameTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/Calculator.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/CalculatorBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/EJBBeanInterfaceTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/Silly.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/SillyBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/StupidInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/Ejb625UnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Home.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateless.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Home.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulRemote.java
Modified:
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/build-test.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/RELEASE_NOTES.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/index.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/reference/reference/en/master.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/reference/reference/en/modules/entity_configuration.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/asynch/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/blob/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/callbacks/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/callbacks/src/org/jboss/tutorial/callback/bean/CustomerDAOBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/clusteredentity/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/clustering/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/composite/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/consumer/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/consumer_deployment_descriptor/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependency/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependent/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependent/src/org/jboss/tutorial/dependent/bean/CustomerDAOBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ear/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ear/src/org/jboss/tutorial/ear/servlet/CalculatorActionServlet.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean/DeploymentDescriptorSession1Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean/Session1Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean/ShoppingCart.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean/ShoppingCartBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/index.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/injection/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/injection/src/org/jboss/tutorial/injection/bean/ShoppingCartBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/installing.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/interceptor/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/interceptor/src/org/jboss/tutorial/interceptor/bean/TracingInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_deployment_descriptor/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_deployment_descriptor/src/org/jboss/tutorial/jboss_deployment_descriptor/bean/StatelessTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_resource_ref/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jndibinding/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/join.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/src/org/jboss/tutorial/joininheritance/bean/PetDAOBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/local.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/mdb/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/mdb_deployment_descriptor/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/merge.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/src/org/jboss/tutorial/merge/bean/CustomerDAOBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/packaging/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/reference21_30/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/reference21_30/src/org/jboss/tutorial/reference21_30/bean/Stateless3Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/relationships/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/secondary/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/secondary/src/org/jboss/tutorial/secondary/bean/CustomerDAOBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/security/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/service/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/service_deployment_descriptor/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/single.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/src/org/jboss/tutorial/singleinheritance/bean/PetDAOBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateful/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateful_deployment_descriptor/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateless/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateless_deployment_descriptor/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/src/org/jboss/tutorial/tableperinheritance/bean/PetDAOBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/table.html
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/timer/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/webservice/build.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/RemoteBinding.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/RemoteBindingImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/security/SecurityDomainImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb/ResourceImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/AbstractPool.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/BaseContext.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/BaseSessionContext.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Container.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/EJB3Deployer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/EJBContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3AnnotationHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3HandlerFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3JmxDeployment.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3Module.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxDependencyPolicy.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxKernelAbstraction.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/KernelAbstraction.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Pool.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyDeployer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ServiceDelegateWrapper.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ServiceDelegateWrapperMBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/SessionContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/StrictMaxPool.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/cache/StatefulReplicationInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/dd/ResourceEnvRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/dd/ResourceRef.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/entity/PersistenceUnitDeployment.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/EJB3InterceptorsInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInfo.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInfoRepository.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InvocationContextImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/LifecycleInterceptorHandler.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/LifecycleInvocationContextImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ConsumerContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/LocalProducerFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/MDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ProducerFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ProducerManagerImpl.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/RemoteProducerFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/inflow/JBossMessageEndpointFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/remoting/IsLocalInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/Ejb3AuthenticationInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptorFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptorFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/BaseServiceProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/ServiceContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/ServiceRemoteProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/session/BaseSessionProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/BaseStatefulProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulInstanceInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessClusterProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/Ejb3TxPolicy.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/TxInterceptorFactory.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/TxUtil.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/ejb3-interceptors-aop.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/jboss_5_0.xsd
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/jndi.properties
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/ejb3-jacc/deploy/jacc-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/bank/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/bank/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/cache/testejb3-cache-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/cache/testejb3-statefulcache-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/circulardependency/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredentity/META-INF/persistence.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/mdb/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/mdb/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/web/META-INF/application.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/web/WEB-INF/jbosstest-web.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/mdbtest-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/naming-errors/ejb-jar-method-field.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/META-INF/application.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/META-INF/jboss.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/WEB-INF/jboss-web.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/WEB-INF/test-web.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/stateful/META-INF/ejb-jar.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/strictpool_mdbtest-service.xml
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/asynchronous/SecuredStatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Account.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountBeanCMP.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountData.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountHome.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Bank.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankBean21.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankException.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankHome.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Customer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/CustomerBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/CustomerHome.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Teller.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/TellerBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/TellerHome.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/unit/BankDeploymentDescriptorTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bmt/DeploymentDescriptorTesterBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bmt/TesterBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/SimpleStatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulLocal.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/Tester.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/TesterMBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/CacheUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/StatefulUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/circulardependency/StatelessBean1.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/circulardependency/StatelessBean2.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/mdb/unit/MDBUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/unit/EjbJarXmlTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/servlets/EJBServlet.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/unit/WebIntegrationUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/Stateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatefulRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/Stateless.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatelessLocal.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/unit/EjbContextUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/Airport.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/EntityTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/FieldAirport.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entityexception/ExceptionTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/factory/Session1Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/factory/Session2Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/hbm/EntityTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/ClassInjectedBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/InterceptedSFTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/InterceptedSLTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors/MyBaseInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors/MyInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/AnnotatedOnlySLSB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/InheritingSFSB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/MixedClassInterceptor.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/StatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/unit/JaccTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/DeploymentDescriptorTestMDBMessageListener.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/TestMDBMessageListener.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/DeploymentDescriptorInflowUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/InflowUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/joininheritance/EntityTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/longlived/HibernateShoppingCartBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/longlived/ShoppingCartBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/BMTQueueTestMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/DefaultedQueueTestMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/NondurableQueueTestMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideTestMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/QueueTestMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TestStatus.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TestStatusBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TopicTestMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/unit/MDBUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/bad/BadFieldMethodBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/bad/BadInjector.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/unit/BadInjectionsUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/unit/BindFailureTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/GlobalSession30Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session30Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Test3Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/InheritanceSessionBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree249/MyServiceBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree290/DAOBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree454/AEJBBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree454/BEJBBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/salesforce7123/DataAccessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/salesforce7123/MyBusinessSessionBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/ClientBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/StatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/StatelessRemote.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regressionHHH275/SearchDAO.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/schema/unit/SchemaTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CalledSession.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerBean2.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerFacadeBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/FacadeTargetBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/Level1CallerBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PrivateSessionBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PublicSessionBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PublicSessionFacade.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/SecurityContextBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean2.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean3.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBeanInDomain.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean_test.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/TimerTesterBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/UnsecuredStatelessSessionBean2.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/unit/EJBSpecUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/ServiceOne.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/ServiceThree.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/Session.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/unit/ServiceUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30Bean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/servlets/EJBServlet.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/unit/ServletUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/singletableinheritance/EntityTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/unit/SSLUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulTx.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulTxBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/AnonymousStatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/CheckedStatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/UnsecuredStatelessBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/unit/StatelessTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/MDBInvoker.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/StrictlyPooledMDB.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/unit/StrictPoolUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/tableperinheritance/EntityTestBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTester.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterBean.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterBean21.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/unit/RemoteUnitTestCase.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timerdependency/InitTimer.java
   branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/wls/embeddedwar/CustomerDAOBean.java
Log:
merge from Branch_4_0

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/build-test.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/build-test.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/build-test.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -67,6 +67,7 @@
    <import file="../testsuite/imports/server-config.xml"/>
    <!-- Propagate the dist directory as a jbosstest system property -->
    <property name="ejb3.dist" value="${jboss.dist}-ejb3"/>
+   <echo message="${ejb3.dist}"/>
    <property name="jbosstest.dist" value="${ejb3.dist}"/>
 
    <macrodef name="wait-on-host">
@@ -139,8 +140,9 @@
       <path refid="sun.javamail.classpath"/>
       <path refid="jboss.serialization.classpath"/>
       <path refid="jboss.jbossws.classpath"/>
+      <path refid="quartz.quartz.classpath"/>
       <path refid="jboss.microcontainer.classpath"/>
-      <path refid="quartz.quartz.classpath"/>
+      <path refid="jboss.jbossxb.classpath"/>
    </path>
 
    <!-- ======= -->
@@ -200,6 +202,7 @@
    <property name="build.testlog" value="${module.output}/log"/>
    <property name="build.classes" value="${module.output}/test-classes"/>
    <property name="build.lib" value="${module.output}/test-lib"/>
+   <property name="build.ejb3.lib" value="${module.output}/lib"/>
    <property name="build.api" value="${module.output}/api"/>
    <property name="build.etc" value="${module.output}/etc"/>
    <property name="build.stylesheets" value="${module.output}/stylesheets"/>
@@ -227,6 +230,7 @@
    <!-- The classpath required to build classes. -->
    <path id="javac.classpath">
       <pathelement path="${classpath}"/>
+      <!--pathelement path="${resources}/test/seam/jboss-seam.jar"/-->
       <pathelement path="${local.classpath}"/>
       <path refid="thirdparty.classpath"/>
    </path>
@@ -236,6 +240,7 @@
       <path refid="apache.logging.classpath"/>
       <path refid="jboss.test.classpath"/>
       <pathelement path="${ejb3.dist}/client/jbossall-client.jar"/>
+      <pathelement path="${ejb3.dist}/client/jboss-annotations-ejb3.jar"/>
       <pathelement path="${ejb3.dist}/client/jboss-ejb3-client.jar"/>
       <pathelement path="${ejb3.dist}/client/jboss-ejb3x.jar"/>
       <pathelement path="${ejb3.dist}/client/hibernate-client.jar"/>
@@ -259,12 +264,17 @@
       <!-- This test accesses some ejb3 classes directly -->
       <path refid="jboss.ejb3.classpath"/>
    </path>
-
+   
    <path id="dd.web.client.classpath">
       <path refid="client.classpath"/>
       <path refid="apache.httpclient.classpath"/>
    </path>
 
+   <path id="iiop.client.classpath">
+      <pathelement path="${resources}/test/iiop"/>
+      <path refid="client.classpath"/>
+   </path>
+   
    <!-- The classpath required to build javadocs. -->
    <path id="javadoc.classpath">
       <path refid="javac.classpath"/>
@@ -406,15 +416,28 @@
       <jar jarfile="${build.lib}/quartzmdb.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/jca/inflowmdb/Quartz*.class"/>
+            <include name="org/jboss/ejb3/test/jca/inflowmdb/unit/*.class"/>
          </fileset>
       </jar>
 
       <jar jarfile="${build.lib}/jcainflowmdb.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/jca/inflowmdb/Test*.class"/>
+            <include name="org/jboss/ejb3/test/jca/inflowmdb/unit/*.class"/>
          </fileset>
       </jar>
 
+      <jar jarfile="${build.lib}/jmsinflowmdb.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/jca/inflowmdb/JMS*.class"/>
+            <include name="org/jboss/ejb3/test/jca/inflowmdb/Stateless*.class"/>
+            <include name="org/jboss/ejb3/test/jca/inflowmdb/unit/*.class"/>
+         </fileset>
+         <fileset dir="${build.resources}/test/jca/inflow">
+            <include name="jmsmdbtest-service.xml"/>
+         </fileset>
+      </jar>
+
       <jar jarfile="${build.lib}/jcainflowmdb_dd.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/jca/inflowmdb/DeploymentDescriptorTest*.class"/>
@@ -425,15 +448,27 @@
          </fileset>
       </jar>
 
-      <jar jarfile="${build.lib}/jcainflow.rar">
+      <jar jarfile="${build.lib}/jcainflow.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/jca/inflow/*.class"/>
          </fileset>
+      </jar>
+      
+      <jar jarfile="${build.lib}/jcainflow.rar">
+         <fileset dir="${build.lib}">
+            <include name="jcainflow.jar"/>
+         </fileset>
          <fileset dir="${resources}/test/jca/inflow">
             <include name="META-INF/ra.xml"/>
          </fileset>
       </jar>
 
+      <copy todir="${build.lib}">
+         <fileset dir="${resources}/test/jca/inflow">
+            <include name="*.xml"/>
+         </fileset>
+      </copy>
+      
    </target>
 
    <target name="cache"
@@ -453,8 +488,8 @@
 
       <jar jarfile="${build.lib}/cache-test.jar">
          <fileset dir="${build.classes}">
-            <include name="org/jboss/ejb3/test/cache/Stateful*.class"/>
-            <include name="org/jboss/ejb3/test/cache/SimpleStateful*.class"/>
+            <include name="org/jboss/ejb3/test/cache/**/*.class"/>
+            <exclude name="org/jboss/ejb3/test/cache/unit/*"/>
          </fileset>
       </jar>
 
@@ -719,7 +754,7 @@
             <include name="org/jboss/ejb3/test/webservices/*.class"/>
          </fileset>
       </jar>
-      
+
       <jar jarfile="${build.lib}/jsr181.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/webservices/jsr181/EJB3*.class"/>
@@ -729,7 +764,7 @@
          	<include name="META-INF/ejb-jar.xml"/>
          </fileset>
       </jar>
-      
+
       <jar jarfile="${build.lib}/jsr181-client.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/webservices/jsr181/EndpointInterface.class"/>
@@ -811,7 +846,7 @@
          </fileset>
       </jar>
    </target>
-   
+
    <target name="timerdependency"
       description="Builds all jar files."
       depends="compile-classes">
@@ -825,22 +860,6 @@
       </jar>
    </target>
 
-   <target name="pkg"
-      description="Builds all jar files."
-      depends="compile-classes">
-
-      <mkdir dir="${build.lib}"/>
-
-      <jar jarfile="${build.lib}/pkg-test.jar">
-         <fileset dir="${build.classes}">
-            <include name="org/jboss/ejb3/test/pkg/*.class"/>
-         </fileset>
-         <fileset dir="${resources}/test/entity">
-            <include name="META-INF/persistence.xml"/>
-         </fileset>
-      </jar>
-   </target>
-
    <target name="txexceptions"
       description="Builds all jar files."
       depends="compile-classes">
@@ -988,7 +1007,7 @@
          </fileset>
          <fileset dir="${resources}/test/bank">
             <include name="META-INF/*.xml"/>
-            <include name="*.xml"/>
+            <include name="bank-ejb3-interceptors-aop.xml"/>
             <include name="users.properties"/>
             <include name="roles.properties"/>
          </fileset>
@@ -1029,6 +1048,24 @@
       </jar>
    </target>
 
+   <target name="unauthenticatedprincipal"
+      description="Builds all jar files."
+      depends="compile-classes">
+      
+      <mkdir dir="${build.lib}"/>
+      
+      <jar jarfile="${build.lib}/unauthenticatedprincipal.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/unauthenticatedprincipal/*.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/unauthenticatedprincipal">
+            <include name="META-INF/*.xml"/>
+            <include name="users.properties"/>
+            <include name="roles.properties"/>
+         </fileset>
+      </jar>
+   </target>
+
    <target name="reference21_30"
       description="Builds all jar files."
       depends="compile-classes">
@@ -1108,7 +1145,7 @@
 
        <delete file="${resources}/test/reference21_30/META-INF/ejb-jar.xml"/>
        <delete file="${resources}/test/reference21_30/META-INF/jboss.xml"/>
-       
+
        	<ear earfile="${build.lib}/multideploy.ear"
 			appxml="${build.resources}/test/reference21_30/META-INF/application.xml">
 	         <fileset dir="${build.lib}">
@@ -1275,6 +1312,9 @@
             <include name="**/*.jsp"/>
             <include name="**/*.html"/>
          </fileset>
+         <fileset dir="${source.java}/org/jboss/ejb3/test/dd/web/jsp">
+            <include name="*.jsp"/>
+         </fileset>
       </war>
 
       <ear earfile="${build.lib}/dd-web.ear"
@@ -1291,7 +1331,7 @@
          </fileset>
       </ear>
    </target>
-   
+
    <target name="jsp"
       description="Builds all jar files."
       depends="compile-classes">
@@ -1319,7 +1359,7 @@
          </fileset>
       </ear>
    </target>
-   
+
    <target name="classloader"
       description="Builds all jar files."
       depends="compile-classes">
@@ -1336,7 +1376,7 @@
             <include name="*.properties"/>
          </fileset>
       </jar>
-      
+
       <jar jarfile="${build.lib}/classloader-shared.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/classloader/Shared*.class"/>
@@ -1346,7 +1386,7 @@
             <include name="META-INF/jboss.xml"/>
          </fileset>
       </jar>
-      
+
       <jar jarfile="${build.lib}/classloader-unshared.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/classloader/Unshared*.class"/>
@@ -1354,6 +1394,29 @@
          </fileset>
       </jar>
    </target>
+   
+   <target name="clusteredservice"
+      description="Builds all jar files."
+      depends="compile-classes">
+      
+      <mkdir dir="${build.lib}"/>
+      
+      <jar jarfile="${build.lib}/clusteredservice.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/clusteredservice/*.class"/>
+            <exclude name="org/jboss/ejb3/test/clusteredservice/ServiceWeb.class"/>
+         </fileset>
+      </jar>
+      
+      <war warfile="${build.lib}/clusteredservice.war"
+         webxml="${build.resources}/test/clusteredservice/WEB-INF/web.xml">
+         <classes dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/clusteredservice/servlets/*.class"/>
+            <include name="org/jboss/ejb3/test/clusteredservice/ServiceRemote.class"/>
+            <include name="org/jboss/ejb3/test/clusteredservice/ServiceWeb.class"/>
+         </classes>
+      </war>
+   </target>
 
    <target name="servlet"
       description="Builds all jar files."
@@ -1367,10 +1430,11 @@
             <exclude name="org/jboss/ejb3/test/servlet/War*.class"/>
          </fileset>
          <fileset dir="${resources}/test/servlet">
+            <include name="*.properties"/>
             <include name="META-INF/jboss.xml"/>
          </fileset>
       </jar>
-      
+
       <jar jarfile="${build.lib}/servlet-client.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/servlet/War*.class"/>
@@ -1403,7 +1467,7 @@
          </fileset>
       </ear>
    </target>
-   
+
    <target name="ejbthree440"
       description="Builds all jar files."
       depends="compile-classes">
@@ -1481,6 +1545,71 @@
       </ear>
    </target>
 
+   <target name="ejbthree485"
+      description="Builds all jar files."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/ejbthree485.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/regression/ejbthree485/*.class"/>
+         </fileset>
+      </jar>
+   </target>
+
+   <target name="ejbthree620"
+      description="Builds all jar files."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/ejbthree620.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/regression/ejbthree620/*.class"/>
+         </fileset>
+      </jar>
+   </target>
+
+   <target name="ejbthree653"
+      description="Builds all jar files."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/ejbthree653.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/regression/ejbthree653/*.class"/>
+         </fileset>
+      </jar>
+   </target>
+
+   <target name="ejbthree670"
+      description="Builds all jar files."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/ejbthree670.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/regression/ejbthree670/*.class"/>
+         </fileset>
+      </jar>
+   </target>
+
+   <target name="wolfc"
+      description="Builds all jar files."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/wolfc.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/wolfc/*.class"/>
+         </fileset>
+      </jar>
+   </target>
+
    <target name="scopedclassloader"
       description="Builds all jar files."
       depends="compile-classes">
@@ -1493,6 +1622,7 @@
             <include name="org/jboss/ejb3/test/regression/scopedclassloader/StatelessRemote.class"/>
             <include name="org/jboss/ejb3/test/regression/scopedclassloader/ValueObject.class"/>
             <include name="org/jboss/ejb3/test/regression/scopedclassloader/Customer.class"/>
+            <include name="org/jboss/ejb3/test/regression/scopedclassloader/ScopedException.class"/>
          </fileset>
          <fileset dir="${build.resources}/test/scopedclassloader/ejbear">
             <include name="META-INF/persistence.xml"/>
@@ -1510,6 +1640,7 @@
             <include name="org/jboss/ejb3/test/regression/scopedclassloader/ValueObject.class"/>
             <include name="org/jboss/ejb3/test/regression/scopedclassloader/StatelessRemote.class"/>
             <include name="org/jboss/ejb3/test/regression/scopedclassloader/Customer.class"/>
+            <include name="org/jboss/ejb3/test/regression/scopedclassloader/ScopedException.class"/>
          </fileset>
       </jar>
 
@@ -1657,6 +1788,14 @@
             <include name="META-INF/persistence.xml"/>
          </fileset>
       </jar>
+      <jar jarfile="${build.lib}/regression-ejbthree625-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/regression/ejbthree625/*.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/regression/ejbthree625">
+            <include name="META-INF/ejb-jar.xml"/>
+         </fileset>
+      </jar>
       <jar jarfile="${build.lib}/regression-ejbthree231.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/regression/ejbthree231/*.class"/>
@@ -1692,6 +1831,9 @@
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/strictpool/*.class"/>
          </fileset>
+         <fileset dir="${resources}/test/strictpool">
+            <include name="META-INF/*.xml"/>
+         </fileset>
       </jar>
       <copy todir="${build.lib}">
          <fileset dir="${resources}/test/strictpool">
@@ -1736,6 +1878,9 @@
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/ssladvanced/*.class"/>
          </fileset>
+         <fileset dir="${resources}/test/ssladvanced">
+            <include name="META-INF/jboss.xml"/>
+         </fileset>
       </jar>
    </target>
 
@@ -1754,6 +1899,39 @@
          </fileset>
       </jar>
    </target>
+   
+   <target name="mdbtransactions"
+      description="Builds all jar files."
+      depends="compile-classes">
+      
+      <mkdir dir="${build.lib}"/>
+      
+      <jar jarfile="${build.lib}/mdbtransactions-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/mdbtransactions/*.class"/>
+            <exclude name="org/jboss/ejb3/test/mdbtransactions/*21.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/mdbtransactions">
+            <include name="META-INF/persistence.xml"/>
+         </fileset>
+      </jar>
+      
+      <jar jarfile="${build.lib}/mdbtransactions21-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/mdbtransactions/*21.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/mdbtransactions">
+            <include name="META-INF/ejb-jar.xml"/>
+            <include name="META-INF/jboss.xml"/>
+         </fileset>
+      </jar>
+      
+      <copy todir="${build.lib}">
+         <fileset dir="${resources}/test/mdbtransactions">
+            <include name="*.xml"/>
+         </fileset>
+      </copy>
+   </target>
 
    <target name="longlived"
       description="Builds all jar files."
@@ -1892,6 +2070,7 @@
       <jar jarfile="${build.lib}/mdb-test.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/mdb/*.class"/>
+            <include name="org/jboss/ejb3/test/mdb/unit/*.class"/>
          </fileset>
          <fileset dir="${resources}/test/mdb">
             <include name="users.properties"/>
@@ -1901,13 +2080,28 @@
             <include name="META-INF/*.xml"/>
          </fileset>
       </jar>
+      
       <copy todir="${build.lib}">
          <fileset dir="${resources}/test/mdb">
             <include name="*.xml"/>
          </fileset>
       </copy>
+      
    </target>
 
+   <target name="concurrent"
+      description="Builds all jar files."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/concurrent.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/concurrent/*.class"/>
+         </fileset>
+      </jar>
+   </target>
+
    <target name="consumer"
       description="Builds all jar files."
       depends="compile-classes">
@@ -1960,6 +2154,20 @@
          </fileset>
       </jar>
    </target>
+   
+   <!--target name="concurrent"
+      description="Builds all jar files."
+      depends="compile-classes">
+      
+      <mkdir dir="${build.lib}"/>
+      
+      <jar jarfile="${build.lib}/concurrent-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/concurrent/**/*.class"/>
+            <include name="org/jboss/ejb3/test/concurrent/unit/*.class"/>
+         </fileset>
+      </jar>
+   </target-->
 
    <target name="stateful"
       description="Builds all jar files."
@@ -1969,10 +2177,12 @@
 
       <jar jarfile="${build.lib}/stateful-test.jar">
          <fileset dir="${build.classes}">
-            <include name="org/jboss/ejb3/test/stateful/*.class"/>
+            <include name="org/jboss/ejb3/test/stateful/**/*.class"/>
+            <include name="org/jboss/ejb3/test/stateful/unit/*.class"/>
          </fileset>
          <fileset dir="${resources}/test/stateful">
             <include name="META-INF/ejb-jar.xml"/>
+            <include name="META-INF/jboss.xml"/>
          </fileset>
          <fileset dir="${resources}/test/stateful">
             <include name="*.xml"/>
@@ -1981,6 +2191,23 @@
       </jar>
    </target>
 
+   <!--target name="seam"
+      description="Builds all jar files."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/seam-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/seam/*.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/seam">
+            <include name="META-INF/ejb-jar.xml"/>
+            <include name="seam.properties"/>
+         </fileset>
+      </jar>
+   </target-->
+
    <target name="aspectdomain"
       description="Builds all jar files."
       depends="compile-classes">
@@ -1997,7 +2224,7 @@
          </fileset>
       </jar>
    </target>
-   
+
    <target name="ejbcontext"
       description="Builds all jar files."
       depends="compile-classes">
@@ -2014,6 +2241,23 @@
       </jar>
    </target>
 
+   <target name="iiop"
+      description="Builds iiop.jar."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/iiop.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/iiop/*.class"/>
+         </fileset>
+         <fileset dir="${resources}/test">
+            <include name="users.properties"/>
+            <include name="roles.properties"/>
+         </fileset>
+      </jar>
+   </target>
+
    <target name="security"
       description="Builds all jar files."
       depends="compile-classes">
@@ -2046,7 +2290,7 @@
             <include name="META-INF/jaas-test-config.xml"/>
          </fileset>
       </jar>
-      
+
       <jar jarfile="${build.lib}/security-extensions.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/security/Unauthenticated*.class"/>
@@ -2090,6 +2334,19 @@
       </jar>
    </target>
    
+   <target name="invoker"
+      description="Builds all jar files."
+      depends="compile-classes">
+      
+      <mkdir dir="${build.lib}"/>
+      
+      <jar jarfile="${build.lib}/invoker-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/invoker/*.class"/>
+         </fileset>
+      </jar>
+   </target>
+
    <target name="circulardependency"
       description="Builds all jar files."
       depends="compile-classes">
@@ -2105,7 +2362,7 @@
          </fileset>
       </jar>
    </target>
-   
+
    <target name="servicedependency"
       description="Builds all jar files."
       depends="compile-classes">
@@ -2118,7 +2375,7 @@
          </fileset>
       </jar>
    </target>
-   
+
    <target name="stateless14"
       description="Builds all jar files."
       depends="compile-classes">
@@ -2130,13 +2387,13 @@
             <include name="org/jboss/ejb3/test/stateless14/*.class"/>
          </fileset>
       </jar>
-      
+
       <delete>
       	 <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/stateless14/**/*.class"/>
          </fileset>
       </delete>
-      
+
       <javac destdir="${build.classes}"
          optimize="${javac.optimize}"
          debug="${javac.debug}"
@@ -2174,11 +2431,6 @@
             <include name="META-INF/persistence.xml"/>
          </fileset>
       </jar>
-         <copy todir="${build.lib}">
-            <fileset dir="${resources}/test-configs/ejb3-jacc/deploy">
-               <include name="jacc-service.xml"/>
-            </fileset>
-         </copy>
    </target>
 
 <!--
@@ -2316,14 +2568,25 @@
 
       <jar jarfile="${build.lib}/clusteredsession-test.jar">
          <fileset dir="${build.classes}">
-            <include name="org/jboss/ejb3/test/clusteredsession/*.class"/>
+            <include name="org/jboss/ejb3/test/clusteredsession/**/*.class"/>
          </fileset>
+         <fileset dir="${resources}/test/clusteredsession">
+            <include name="META-INF/*.xml"/>
+         </fileset>
       </jar>
    </target>
+   
+   <target name="jars" depends="mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader, 
+      circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ejbthree440, 
+      ejbthree454, ejbthree653, ejbthree670, aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency, 
+      securitydomain, enventry, 
+      jms/managed, naming, bmt, jca/inflowmdb, pool, jms, security, reference21_30, factory, dd/web, txexceptions, 
+      exception, dd/override, stateless, dd/mdb, bank, dd, longlived, xmlcfg, hbm, regressionHHH275, 
+      entityexception, asynchronous, consumer, clusteredentity, secondary, stateful, service, lob, cache, initial, 
+      timer, benchmark, entity, joininheritance, singletable, tableperclass, dependent, mdb, manytomany, regression, 
+      composite, composite2, entitycallback, relationships, ssl, ssladvanced, clusteredsession, strictpool, jacc, 
+      localcall, interceptors, interceptors2, iiop, clientinterceptor"/>
 
-
-   <target name="jars" depends="classloader, circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ejbthree440, ejbthree454, aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency, securitydomain, enventry, jms/managed, naming, bmt, jca/inflowmdb, pool, jms, security, reference21_30, factory, dd/web, txexceptions, exception, dd/override, stateless, dd/mdb, bank, dd, longlived, xmlcfg, hbm, pkg, regressionHHH275, entityexception, asynchronous, consumer, clusteredentity, secondary, stateful, service, lob,cache,initial,timer,benchmark,entity,joininheritance, singletable, tableperclass, dependent, mdb, manytomany, regression, composite, composite2, entitycallback, relationships, ssl, ssladvanced, clusteredsession, strictpool, jacc, localcall, interceptors, interceptors2, clientinterceptor"/>
-
    <target name="test" depends="init" if="test"
       description="Execute all tests in the given test directory.">
       <!-- For use when we do not need to pass in any special jvmargs; forks the test process -->
@@ -2351,12 +2614,21 @@
       <condition property="client.run.classpath" value="dd.classpath">
          <equals arg1="${test}" arg2="dd"/>
       </condition>
+      <condition property="client.run.classpath" value="iiop.client.classpath">
+         <equals arg1="${test}" arg2="iiop"/>
+      </condition>
       <condition property="client.run.classpath" value="client.classpath">
          <not>
             <isset property="client.run.classpath"/>
          </not>
       </condition>
 
+      <condition property="test.jndi.url" value="${node0.jndi.url}">
+         <not>
+            <isset property="test.jndi.url"/>
+         </not>
+      </condition>
+      
       <junit dir="${module.output}"
          printsummary="yes"
          haltonerror="false"
@@ -2380,7 +2652,7 @@
          <sysproperty key="jbosstest.cluster.node1" value="${node1}"/>
          <sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
          <sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
-         <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
+         <sysproperty key="java.naming.provider.url" value="${test.jndi.url}"/>
 
 
          <jvmarg line="${jvmargs}" />
@@ -2388,17 +2660,33 @@
          <classpath>
             <path refid="hibernate.hibernate.classpath"/>
             <pathelement location="${build.classes}"/>
+            <path refid="${client.run.classpath}"/>
             <pathelement location="${resources}/test"/>
-            <path refid="${client.run.classpath}"/>
             <path refid="jboss.jbossws.classpath"/>
             <path refid="apache.xerces.classpath"/>
             <path refid="sun.jaf.classpath"/>
             <path refid="sun.javamail.classpath"/>
             <path refid="apache.httpclient.classpath"/>
+            <path refid="jboss.server.classpath"/>
+            <path refid="jboss.naming.classpath"/>
+            <path refid="trove.classpath"/>
+            <path refid="jboss.common.classpath"/>
+            <path refid="jboss.aop.classpath"/>
+            <path refid="jboss.aspects.classpath"/>
+            <path refid="jboss.jbossxb.classpath"/>
+         	<!-- for Corba -->
+            <path refid="jboss.iiop.classpath"/>
+         	<path refid="jacorb.jacorb.classpath"/>
+         	<path refid="apache.avalon.classpath"/>
+         	<path refid="apache.avalon.logkit.classpath"/>
+
+            <!-- EJBTHREE-485 needs javassist -->
+            <path refid="javassist.classpath"/>
          </classpath>
 
          <formatter type="plain" usefile="true"/>
-         <formatter type="xml" usefile="true"/>
+         <formatter type="xml" usefile="true" unless="test.extension"/>
+         <formatter type="xml" extension="-${test.extension}.xml" usefile="true" if="test.extension"/>
 
          <batchtest todir="${build.reports}"
             haltonerror="false"
@@ -2412,11 +2700,73 @@
       </junit>
    </target>
 
+   <!-- Single unit test -->
+   <target name="one-test-with-jvmargs" if="test">
+      <!-- For use when we need to pass in special jvmargs -->
+
+      <mkdir dir="${build.reports}"/>
+      <mkdir dir="${build.testlog}"/>
+      <!-- Remove the test.log so each run has a fresh log -->
+      <delete file="${build.testlog}/test.log"/>
+
+     <!-- These tests need extra stuff on classpath -->
+      <condition property="client.run.classpath" value="client.classpath">
+         <not>
+            <isset property="client.run.classpath"/>
+         </not>
+      </condition>
+
+      <junit dir="${module.output}"
+         printsummary="yes"
+         haltonerror="false"
+         haltonfailure="false"
+         showoutput="yes"
+         fork="true">
+
+         <sysproperty key="jbosstest.deploy.dir" value="${build.lib}"/>
+         <sysproperty key="build.testlog" value="${build.testlog}"/>
+         <sysproperty key="log4j.configuration" value="file:${resources}/test/log4j.xml"/>
+         <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
+         <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
+         <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
+         <sysproperty key="java.security.auth.login.config" value="${resources}/test/security/auth.conf"/>
+
+
+         <!-- properties needed for clustering -->
+         <sysproperty key="jbosstest.cluster.node0" value="${node0}"/>
+         <sysproperty key="jbosstest.cluster.node0.http.url" value="${node0.http.url}"/>
+         <sysproperty key="jbosstest.cluster.node0.jndi.url" value="${node0.jndi.url}"/>
+         <sysproperty key="jbosstest.cluster.node1" value="${node1}"/>
+         <sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
+         <sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
+         <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
+
+
+         <jvmarg line="${jvmargs}" />
+
+         <classpath>
+            <path refid="asm.asm.classpath"/>
+            <path refid="hibernate.hibernate.classpath"/>
+            <pathelement location="${build.classes}"/>
+            <pathelement location="${resources}/test"/>
+            <path refid="${client.run.classpath}"/>
+            <path refid="jboss.jbossws.classpath"/>
+            <path refid="apache.xerces.classpath"/>
+            <path refid="sun.jaf.classpath"/>
+            <path refid="sun.javamail.classpath"/>
+            <path refid="apache.httpclient.classpath"/>
+         </classpath>
+
+         <formatter type="xml" usefile="true"/>
+         <test name="${test}" todir="${build.reports}"/>
+      </junit>
+   </target>
+
    <target name="client14-tests" depends="init"
       description="Execute all tests for Java1.4 client compatibility.">
       <mkdir dir="${build.reports}"/>
       <mkdir dir="${build.testlog}"/>
-     
+
       <junit dir="${module.output}"
          printsummary="yes"
          haltonerror="false"
@@ -2473,8 +2823,8 @@
       </java>
    </target>
 
+   
 
-
    <target name="run" depends="init" if="class"
       description="Execute all tests in the given test directory.">
       <java fork="true" classname="${class}">
@@ -2493,11 +2843,14 @@
       <antcall target="ssl-advanced-test"  inheritRefs="true"/>
       <antcall target="jacc-test" inheritRefs="true"/>
       <antcall target="clustered-tests" inheritRefs="true"/>
+      <antcall target="invoker-test"  inheritRefs="true"/>
+      <antcall target="iiop-tests"  inheritRefs="true"/>
    </target>
 
    <target name="no-start-jboss-tests" depends="init" description="Execute all tests">
       <antcall target="no-start-jboss-ejb-tests" inheritRefs="true"/>
       <antcall target="no-start-jboss-entity-tests" inheritRefs="true"/>
+      <antcall target="no-start-jboss-iiop-tests" inheritRefs="true"/>
    </target>
 
    <target name="ejb-tests" depends="init" description="Execute all tests">
@@ -2520,6 +2873,9 @@
          <param name="test" value="regression/ejbthree454"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
+         <param name="test" value="regression/ejbthree670"/>
+      </antcall>
+      <antcall target="test" inheritRefs="true">
          <param name="test" value="regression/salesforce7123"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
@@ -2561,6 +2917,12 @@
       <antcall target="test" inheritRefs="true">
          <param name="test" value="stateful"/>
       </antcall>
+      <!--antcall target="test" inheritRefs="true">
+         <param name="test" value="concurrent"/>
+      </antcall-->
+      <!--antcall target="test" inheritRefs="true">
+         <param name="test" value="seam"/>
+      </antcall-->
       <antcall target="test" inheritRefs="true">
          <param name="test" value="aspectdomain"/>
       </antcall>
@@ -2586,6 +2948,9 @@
          <param name="test" value="mdb"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
+         <param name="test" value="mdbtransactions"/>
+      </antcall>
+      <antcall target="test" inheritRefs="true">
          <param name="test" value="consumer"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
@@ -2619,6 +2984,9 @@
          <param name="test" value="mail"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
+         <param name="test" value="unauthenticatedprincipal"/>
+      </antcall>
+      <antcall target="test" inheritRefs="true">
          <param name="test" value="securitydomain"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
@@ -2702,9 +3070,6 @@
          <param name="test" value="hbm"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
-         <param name="test" value="pkg"/>
-      </antcall>
-      <antcall target="test" inheritRefs="true">
          <param name="test" value="entityexception"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
@@ -2749,12 +3114,52 @@
 
    </target>
 
+   <target name="clustered-test" depends="init">
+      <antcall target="tests-clustering-startup"/>
+      <antcall target="tests-clustering-wait"/>
+
+      <antcall target="test-with-jvmargs" inheritRefs="true">
+         <param name="jvmargs" value=""/>
+         <!--
+         <param name="jvmargs"
+                value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=/dt_socket,address=8787,server=n,suspend=n"/>
+         -->
+      </antcall>
+
+      <antcall target="tests-clustering-shutdown"/>
+   </target>
+
+   <target name="clustered-one-test" depends="init, clusteredsession, clusteredentity">
+<!--
+-->
+      <antcall target="tests-clustering-startup"/>
+      <antcall target="tests-clustering-wait"/>
+
+      <antcall target="one-test-with-jvmargs" inheritRefs="true">
+         <!--param name="test" value="clusteredsession"/-->
+         <param name="jvmargs" value=""/>
+         <!--
+         <param name="jvmargs"
+                value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=/dt_socket,address=8787,server=n,suspend=n"/>
+         -->
+      </antcall>
+
+      <!--
+         Test in test-cluster-session shuts down both nodes. It needs to shut down one
+         anyway as part of the tests, so simplest is to shut down the other from within
+         the test rather than figure out what to shut down here.
+      -->
+<!--
+-->
+      <antcall target="tests-clustering-shutdown"/>
+
+   </target>
+
    <target name="clustered-tests" depends="init, clusteredsession, clusteredentity">
       <antcall target="tests-clustering-startup"/>
       <antcall target="tests-clustering-wait"/>
 
       <antcall target="test-clustered-entity"/>
-
       <antcall target="test-cluster-session"/>
 
       <!--
@@ -2762,7 +3167,7 @@
          anyway as part of the tests, so simplest is to shut down the other from within
          the test rather than figure out what to shut down here.
       -->
-      <!-- <antcall target="tests-clustering-shutdown" /> -->
+      <antcall target="tests-clustering-shutdown"/>
 
    </target>
 
@@ -2821,6 +3226,33 @@
       <stop-jboss jboss.dist="${ejb3.dist}"/>
       <wait-on-shutdown conf="ejb3-ssl-advanced"/>
    </target>
+   
+   <target name="invoker-test" depends="init">
+      <create-config baseconf="all" newconf="invoker" jboss.dist="${ejb3.dist}">
+         <patternset>
+            <include name="conf/**"/>
+            <include name="deploy*/**"/>
+            <include name="lib/**"/>
+         </patternset>
+      </create-config>
+      
+      <start-jboss conf="invoker" host="${node0}" jboss.dist="${ejb3.dist}"/>
+      <wait-on-host/>
+      
+      <property name="jvmargs" value=""/>      
+      
+      <!--antcall target="test-with-jvmargs" inheritRefs="true">
+         <param name="test" value="invoker"/>
+         <param name="jvmargs" value="${jvmargs}"/>
+      </antcall-->
+      
+      <antcall target="test" inheritRefs="true">
+         <param name="test" value="invoker"/>
+      </antcall>
+      
+      <stop-jboss jboss.dist="${ejb3.dist}"/>
+      <wait-on-shutdown conf="invoker"/>
+   </target>
 
    <target name="jacc-test" depends="init">
       <create-config baseconf="all" newconf="ejb3-jacc" jboss.dist="${ejb3.dist}">
@@ -2836,7 +3268,7 @@
          <param name="test" value="jacc"/>
       </antcall>
       <stop-jboss jboss.dist="${ejb3.dist}"/>
-      <wait-on-shutdown conf="ejb3-jacc"/>
+      <wait-on-shutdown conf="ejb3-jacc" />
    </target>
 
    <!-- ================================================================== -->
@@ -2857,6 +3289,10 @@
       <antcall target="test-with-jvmargs" inheritRefs="true">
          <param name="test" value="clusteredsession"/>
          <param name="jvmargs" value=""/>
+         <!--
+         <param name="jvmargs"
+                value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=n,suspend=n"/>
+         -->
       </antcall>
 
    </target>
@@ -2892,29 +3328,18 @@
                <include name="deploy/ejb3-interceptors-aop.xml"/>
             </fileset>
          </copy>
-      </sequential>   
+        <antcall target="modify-ejb3-repl_sync">
+             <param name="file_" value="${jboss.dist}/server/@{conf}/deploy/ejb3-clustered-sfsbcache-service.xml"/>
+        </antcall>
+      </sequential>
    </macrodef>
 
-   <macrodef name="create-ejb3-cluster-node"
-      description="Create a simplified cluster configuration for ejb3 testing">
-      <attribute name="conf"/>
-      <attribute name="host" default="${node0}"/>
-      <attribute name="jboss.dist" default="${jboss.dist}"
-         description="The jboss dist root directory" />
-      <sequential>
-         <!-- Start with the standard cluster node from the testsuite -->
-         <create-cluster-node conf="@{conf}" jboss.dist="@{jboss.dist}"/>
-         <echo message="Adding ejb3 artifacts to @{conf} config, jboss.dist=@{jboss.dist}"/>
-         <copy todir="@{jboss.dist}/server/@{conf}">
-            <fileset dir="@{jboss.dist}/server/all">
-               <include name="deploy/ejb3.deployer/**"/>
-               <include name="deploy/ejb3-clustered-sfsbcache-service.xml"/>
-               <include name="deploy/ejb3-entity-cache-service.xml"/>
-               <include name="deploy/ejb3-interceptors-aop.xml"/>
-            </fileset>
-         </copy>
-      </sequential>   
-   </macrodef>
+   <target name="modify-ejb3-repl_sync">
+       <echo message="Replacing the cache mode to REPL_SYNC in ${file_}"/>
+       <replaceregexp file="${file_}" byline="yes" flags="is"
+           match="REPL_ASYNC"
+           replace="REPL_SYNC"/>
+   </target>
 
    <target name="tests-clustering-startup" unless="${tests.clustering.skip.startup}">
       <create-ejb3-cluster-node conf="node0" jboss.dist="${ejb3.dist}"/>
@@ -2961,6 +3386,7 @@
             />
       </junitreport>
    </target>
+
   <target name="tests-report-text" depends="tests-report-html">
     <mkdir dir="${build.reports}/text"/>
 
@@ -2986,8 +3412,63 @@
     </style>
   </target>
 
+
    <target name="tests-report-clean">
       <delete dir="${build.reports}"/>
    </target>
 
+   <target name="jacorb-test" depends="init" if="test"
+      description="Execute all tests in the given test directory using JacORB.">
+      <!--property name="debugFlags" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=y"/-->
+      <property name="debugFlags" value=""/>
+      <!-- For use when we do not need to pass in any special jvmargs; forks the test process -->
+      <antcall target="test-with-jvmargs" inheritRefs="true">
+         <param name="test" value="${test}"/>
+         <param name="test.extension" value="jacorb"/>
+         <param name="test.jndi.url" value="corbaloc::localhost:3528/JBoss/Naming/root"/>
+      	 <!-- using jacorb -->
+         <param name="jvmargs" value="${debugFlags} 
+            -Djava.security.manager 
+            -Djava.security.policy=${resources}/security/tst.policy 
+            -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB 
+            -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton 
+            -Dorg.omg.PortableInterceptor.ORBInitializerClass.org.jboss.tm.iiop.TxClientInterceptorInitializer 
+            -Dorg.omg.PortableInterceptor.ORBInitializerClass.org.jboss.iiop.csiv2.SASClientInitializer 
+            -DORBInitRef.NameService=corbaloc::localhost:3528/JBoss/Naming/root 
+            -Djacorb.log.default.verbosity=10 
+            -Djacorb.log.loggerFactory=org.jboss.util.Log4jLoggerFactory" />
+      </antcall>
+   </target>
+
+   <target name="sunorb-test" depends="init" if="test"
+      description="Execute all tests in the given test directory using Sun ORB.">
+      <!--property name="debugFlags" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=y"/-->
+      <property name="debugFlags" value=""/>
+      <!-- For use when we do not need to pass in any special jvmargs; forks the test process -->
+      <antcall target="test-with-jvmargs" inheritRefs="true">
+         <param name="test" value="${test}"/>
+         <param name="test.extension" value="sunorb"/>
+         <!-- using sun jdk -->
+         <param name="jvmargs" value="-Djava.security.manager -Djava.security.policy=${resources}/security/tst.policy -Dorg.omg.PortableInterceptor.ORBInitializerClass.org.jboss.tm.iiop.TxClientInterceptorInitializer -Dorg.omg.CORBA.ORBInitRef.NameService=corbaloc::localhost:3528/JBoss/Naming/root"/>
+      </antcall>
+   </target>
+
+   <target name="iiop-tests" depends="init" description="Execute all tests">
+
+      <start-jboss conf="all" host="${node0}"/>
+      <wait-on-host/>
+
+      <antcall target="no-start-jboss-iiop-tests" inheritRefs="true"/>
+
+      <stop-jboss jboss.dist="${ejb3.dist}"/>
+      <wait-on-shutdown conf="all"/>
+   </target>
+
+   <target name="no-start-jboss-iiop-tests" depends="init" description="Execute all iiop tests">
+      <antcall target="jacorb-test" inheritRefs="true">
+         <param name="test" value="iiop"/>
+      </antcall>
+      <!-- TODO: call sunorb-test, but the report gets overwritten -->
+   </target>
+   
 </project>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -91,11 +91,15 @@
          <path refid="xdoclet.xdoclet.classpath"/>
          <path refid="apache.ant.classpath"/>
          <path refid="oswego.concurrent.classpath"/>
+         <path refid="quartz.quartz.classpath"/>
          <path refid="junit.junit.classpath"/>
          <path refid="jboss.remoting.classpath"/>
          <path refid="apache.logging.classpath"/>
          <path refid="jboss.serialization.classpath"/>
          <path refid="jboss.microcontainer.classpath"/>
+         <path refid="jboss.jbossws.classpath"/>
+         <path refid="jboss.jbossxb.classpath"/>
+         <path refid="jacorb.jacorb.classpath"/>
       </path>
 
       <!-- ======= -->
@@ -120,6 +124,7 @@
          <path refid="jboss.security.classpath"/>
          <path refid="jboss.server.classpath"/>
          <path refid="jboss.messaging.classpath"/>
+         <path refid="jboss.iiop.classpath"/>
       </path>
 
       <!-- ===== -->
@@ -278,7 +283,7 @@
           </fileset>
          <fileset dir="${resources}">
             <include name="schema/*.xsd"/>
-         </fileset>  
+         </fileset>
       </jar>
 
       <!-- build hibernate-client.jar -->
@@ -300,6 +305,8 @@
             <include name="org/hibernate/type/Type.class"/>
             <include name="org/hibernate/EntityMode.class"/>
             <include name="org/hibernate/util/**"/>
+            <include name="org/hibernate/proxy/pojo/**"/>
+            <include name="org/hibernate/property/**"/>
          </fileset>
       </jar>
       <delete dir="${build.classes}/org/hibernate"/>
@@ -307,9 +314,9 @@
       <!-- build client-jar -->
       <jar jarfile="${build.lib}/jboss-ejb3-client.jar" manifest="${build.etc}/default.mf">
          <fileset dir="${build.classes}">
-         	<include name="org/jboss/annotation/ejb/*.class"/>
             <include name="org/jboss/ejb3/EJB3Util.class"/>
             <include name="org/jboss/ejb3/Ejb3Registry.class"/>
+            <include name="org/jboss/ejb3/InitialContextFactory.class"/>
             <include name="org/jboss/ejb3/asynchronous/*"/>
             <include name="org/jboss/ejb3/interceptor/ClientInterceptorUtil.class"/>
             <include name="org/jboss/ejb3/mdb/ConsumerManager.class"/>
@@ -319,11 +326,20 @@
             <include name="org/jboss/ejb3/stateful/StatefulRemoteInvocation.class"/>
             <include name="org/jboss/ejb3/ProxyUtils.class"/>
             <include name="org/jboss/ejb3/**/*Proxy.class"/>
-            <exclude name="org/jboss/ejb3/**/*LocalProxy.class"/>
+            <!--exclude name="org/jboss/ejb3/**/*LocalProxy.class"/-->
             <include name="org/jboss/ejb3/**/*HandleImpl.class"/>
             <include name="org/jboss/ejb3/Container.class"/>
             <include name="org/jboss/ejb3/*ProxyFactory.class"/>
             <include name="org/jboss/ejb3/proxy/**/*.class"/>
+            <include name="org/jboss/ejb3/*ServiceServer*.class"/>
+            <include name="org/jboss/ejb3/*KernelAbstraction*.class"/>
+
+            <!-- EJBTHREE-485: include java assist proxy stuff -->
+            <include name="org/jboss/ejb3/stateless/Javassist*.class"/>
+            
+            <!-- EJBTHREE-667: include object factory -->
+            <include name="org/jboss/ejb3/naming/client/**/*.class"/>
+            <include name="org/jboss/ejb3/naming/BrainlessContext.class"/>
          </fileset>
       </jar>
 
@@ -405,52 +421,43 @@
    </target>
 
    <target name="dist" depends="init, release-docs">
-      <unjar src="${jboss.aspects.lib}/jboss-aop-jdk50.deployer"
-         dest="${build.lib}/jboss-aop-jdk50.deployer" />
-      <unjar src="${jboss.remoting.lib}/jboss-remoting.jar"
-          dest="${build.lib}/remoting" />
-   	  <jar destfile="${build.lib}/jboss-remoting.jar">
-   	      <fileset dir="${build.lib}/remoting">
-   	      	  <include name="**/*"/>
-   	  	  </fileset>
- 	      <fileset dir="../common/output/classes">
- 	      	  <include name="org/jboss/util/stream/*.class"/>
- 	  	  </fileset>
-      </jar>
-      <property name="ejb3.version" value="jboss-EJB-3.0_RC7-FD"/>
+      <property name="ejb3.zip.version" value="jboss-EJB-3.0_RC7-FD"/>
       <echo message="${jboss.common.lib}"/>
-      <zip zipfile="${ejb3.version}.zip">
-         <zipfileset dir="." prefix="${ejb3.version}">
+      <zip zipfile="${ejb3.zip.version}.zip">
+         <zipfileset dir="." prefix="${ejb3.zip.version}">
             <include name="INSTALL.html"/>
             <include name="Migrating.html"/>
             <include name="RELEASE_NOTES.txt"/>
          </zipfileset>
-        <zipfileset dir="${hibernate.entitymanager.lib}" prefix="${ejb3.version}/lib">
+        <zipfileset dir="${hibernate.entitymanager.lib}" prefix="${ejb3.zip.version}/lib">
            <include name="*.jar"/>
         </zipfileset>
-        <zipfileset dir="${hibernate.annotations.lib}" prefix="${ejb3.version}/lib">
+        <zipfileset dir="${hibernate.annotations.lib}" prefix="${ejb3.zip.version}/lib">
            <include name="*.jar"/>
         </zipfileset>
-        <zipfileset dir="${hibernate.hibernate.lib}" prefix="${ejb3.version}/lib">
+        <zipfileset dir="${hibernate.hibernate.lib}" prefix="${ejb3.zip.version}/lib">
            <include name="hibernate3.jar"/>
         </zipfileset>
-        <zipfileset dir="${jboss.serialization.lib}" prefix="${ejb3.version}/lib">
-           <include name="jboss-serialization.jar"/>
-        </zipfileset>
-        <zipfileset dir="${jboss.j2ee.lib}" prefix="${ejb3.version}/lib">
-           <include name="jboss-j2ee.jar"/>
-        </zipfileset>
-         <zipfileset dir="${build.lib}" prefix="${ejb3.version}/lib">
+         <zipfileset dir="${jboss.aspects.lib}" prefix="${ejb3.zip.version}/lib">
+            <include name="jboss-aop-jdk50.deployer/**"/>
+         </zipfileset>
+         <zipfileset dir="../connector/output/lib" prefix="${ejb3.zip.version}/lib">
+            <include name="quartz-ra.rar"/>
+         </zipfileset>
+         <zipfileset dir="${quartz.quartz.lib}" prefix="${ejb3.zip.version}/lib">
+            <include name="*.jar"/>
+         </zipfileset>
+         <zipfileset dir="${jboss.remoting.lib}" prefix="${ejb3.zip.version}/lib">
             <include name="jboss-remoting.jar"/>
          </zipfileset>
-         <zipfileset dir="${build.lib}" prefix="${ejb3.version}/lib">
+         <zipfileset dir="${build.lib}" prefix="${ejb3.zip.version}/lib">
             <include name="jboss-aop-jdk50.deployer/**"/>
             <include name="ejb3.deployer/**"/>
             <include name="ejb3-interceptors-aop.xml"/>
             <include name="ejb3-clustered-sfsbcache-service.xml"/>
             <include name="ejb3-entity-cache-service.xml"/>
          </zipfileset>
-         <zipfileset dir="docs" prefix="${ejb3.version}/docs">
+         <zipfileset dir="docs" prefix="${ejb3.zip.version}/docs">
             <include name="**"/>
             <exclude name="**/CVS/**"/>
             <exclude name="**/*.wiki"/>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/RELEASE_NOTES.html
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/RELEASE_NOTES.html	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/RELEASE_NOTES.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -2,6 +2,117 @@
 <body>
 
 
+Release Notes - EJB 3.0 - Version EJB 3.0 RC7 - FD
+
+<h2>Feature Request</h2>
+<ul>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-521'>EJBTHREE-521</a>] - Use org.jboss.serial.io.MarshalledObjectForLocalCalls on in-vm call-by-value operations</li>
+</ul>
+
+<h2>Bug</h2>
+<ul>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-235'>EJBTHREE-235</a>] - Incorrect PreDestroy method handling with StrictMaxPool</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-352'>EJBTHREE-352</a>] - EJB Containers should be scoped per deployment</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-440'>EJBTHREE-440</a>] - ClassCastException with SerializableProxy on lazy attributes</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-474'>EJBTHREE-474</a>] - please remove unused XML elements from jboss_5_0.xsd and JBossDDObjectFactory.java</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-484'>EJBTHREE-484</a>] - EQL: COUNT(*) => Integer instead of Long</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-486'>EJBTHREE-486</a>] - SELECT COUNT(...) returns Integer. Must be Long</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-502'>EJBTHREE-502</a>] - env-entry does not work for Message Driven Beans</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-504'>EJBTHREE-504</a>] - resource-ref not processed from ejb-jar.xml</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-514'>EJBTHREE-514</a>] - None of the ejb3 jars include the version manifest headers</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-515'>EJBTHREE-515</a>] - @EJB injection into @Service stopped working</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-519'>EJBTHREE-519</a>] - calling a @Remove method inside rolled back tx causes exception</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-520'>EJBTHREE-520</a>] - injecting em in @Service is null in start()</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-528'>EJBTHREE-528</a>] - deploying ejbs with large number of methods is slow.</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-533'>EJBTHREE-533</a>] - Cache regions not being removed.</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-537'>EJBTHREE-537</a>] - Transaction demarcation does not affect session management for looked up EM.</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-540'>EJBTHREE-540</a>] - RegisterSynchronization fails if the transaction is already marked for rollback</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-541'>EJBTHREE-541</a>] - An MDB with a jboss.xml-specified destination misbehaves, trying to create wrong destination</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-542'>EJBTHREE-542</a>] - Rewrap of EJBExceptions</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-543'>EJBTHREE-543</a>] - problems injecting with @Depends</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-550'>EJBTHREE-550</a>] - @Depends fails in embedded</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-554'>EJBTHREE-554</a>] - ejb-ref/ejb-local-ref ine web.xml fails with RemoteHome/LocalHome fails</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-565'>EJBTHREE-565</a>] - Invalid webservice namespace usage</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-573'>EJBTHREE-573</a>] - scoping of thrown exceptions not done with inVM @Remote invocation</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-574'>EJBTHREE-574</a>] - postActivate incorrectly called after failover</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-581'>EJBTHREE-581</a>] - Possible NPE in StatefulEvictionPolicy</li>
+</ul>
+
+<h2>Task</h2>
+<ul>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-126'>EJBTHREE-126</a>] - Create Docbook for Session/MDBs</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-293'>EJBTHREE-293</a>] - JACC tutorial for Entity Beans</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-294'>EJBTHREE-294</a>] - Docbook for JACC integration</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-467'>EJBTHREE-467</a>] - move interceptors to javax.interceptor and change InvocationContext API to match spec</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-470'>EJBTHREE-470</a>] - Boot profiling and optimizations.</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-475'>EJBTHREE-475</a>] - autodocument jboss_5_0.xsd</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-532'>EJBTHREE-532</a>] - implement @AspectDomain in jboss.xml</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-539'>EJBTHREE-539</a>] - complete <loader-repository> implementation for jboss.xml. Annotation?</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-547'>EJBTHREE-547</a>] - create test for <depends></li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-548'>EJBTHREE-548</a>] - implement <ignore-dependency> in jboss.xml</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-555'>EJBTHREE-555</a>] - write test for unsecured ejb calling secured ejb to test principal/credential propagation</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-562'>EJBTHREE-562</a>] - make sure all custom jboss annotations have XML counterpart</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-568'>EJBTHREE-568</a>] - Refactored clusteredsession tests</li>
+</ul>
+
+
+Release Notes - EJB 3.0 - Version EJB 3.0 RC6 - PFD
+
+<h2>Feature Request</h2>
+<ul>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-241'>EJBTHREE-241</a>] - Remote interface should be optional for WS endpoints</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-317'>EJBTHREE-317</a>] - Update binding manager.</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-381'>EJBTHREE-381</a>] - add mappedName() support for @EJB</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-411'>EJBTHREE-411</a>] - schema validation for ejb-jar.xml and jboss.xml</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-443'>EJBTHREE-443</a>] - EJBContext should be bound into ENC</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-482'>EJBTHREE-482</a>] - Enable support for file-based HSQLDB manager</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-516'>EJBTHREE-516</a>] - update to final schema</li>
+</ul>
+
+<h2>Bug</h2>
+<ul>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-239'>EJBTHREE-239</a>] - toString can't be part of business interface (see also EJBTHREE-192)</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-359'>EJBTHREE-359</a>] - Timer.getInfo() in stateless session bean method annotated with @PostConstruct  throws IllegalStateException</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-376'>EJBTHREE-376</a>] - Inherited bean class @AroundInvoke method problem</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-416'>EJBTHREE-416</a>] - ejb-jar.xml not up to latest schema from spec</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-417'>EJBTHREE-417</a>] - schema validation for ejb-jar.xml</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-418'>EJBTHREE-418</a>] - Injected session should not raise TransactionRequiredException</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-422'>EJBTHREE-422</a>] - SFSB call entityManager.close() inside the transaction after @Remove</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-437'>EJBTHREE-437</a>] - OptimisticLockException is not supported</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-438'>EJBTHREE-438</a>] - NPE em.createEntityManagerFactory("puname")</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-445'>EJBTHREE-445</a>] - EJB3 deployment fails silently when deploying with an old version of persistence.xml (pre-RC4/5)</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-447'>EJBTHREE-447</a>] - EJB injection into Service fails</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-448'>EJBTHREE-448</a>] - Incorrect package of PostConstruct and PreDestroy annotations</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-452'>EJBTHREE-452</a>] - CLONE -EJB client: NullPointerException in StatelessLocalProxy</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-453'>EJBTHREE-453</a>] - stateless test fails with internet access for j2ee_web_services_client_1_1.xsd</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-454'>EJBTHREE-454</a>] - Conflict when same ejb-jar is deployed in multiple ears</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-457'>EJBTHREE-457</a>] - EJBContext.lookup("XXX") fails</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-458'>EJBTHREE-458</a>] - @PersistenceUnit/@PersistenceContext on bean class does not work</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-460'>EJBTHREE-460</a>] - ServiceMBeanDelegate.java:170 - 1.2.4.7 - Casts Throwable into Exception causes ClassCastException</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-461'>EJBTHREE-461</a>] - missing antlr jar in embeddable EJB distribution</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-462'>EJBTHREE-462</a>] - assembly-descriptor required to get proper SFSB remove-method behavior</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-463'>EJBTHREE-463</a>] - Fix JACC stuff following updates to EJB3</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-464'>EJBTHREE-464</a>] - Bean injection fails in MDB during deploy of EAR if JMS messages already exist in queue</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-469'>EJBTHREE-469</a>] - @Stateful(mappedName) is missing</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-473'>EJBTHREE-473</a>] - incomplete jboss_5_0.xsd</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-490'>EJBTHREE-490</a>] - flush() syncrhonization not done on SLSB</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-491'>EJBTHREE-491</a>] - @RunAs + @Management/Service not working - @SecurityDomain ignored?</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-492'>EJBTHREE-492</a>] - Service bean with @SecurityDomain fails to start</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-507'>EJBTHREE-507</a>] - NamingContext for beans remains bound in global jndi tree after undeploy</li>
+</ul>
+
+<h2>Task</h2>
+<ul>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-302'>EJBTHREE-302</a>] - Create unit tests for @AspectDomain, @CallByValue, @DefaultActivationSpecs</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-332'>EJBTHREE-332</a>] - Update spring-int use Interceptors instead of CallbackHandler as per the latest spec</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-343'>EJBTHREE-343</a>] - INFO logging level is overused</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-426'>EJBTHREE-426</a>] - hibernate-client.jar should contain org.hibernate.proxy.SerializableProxy</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-459'>EJBTHREE-459</a>] - implement SessionContext.getInvokedBusinessInterface()</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-493'>EJBTHREE-493</a>] - Create tutorial for EJB30/EJB2.x refs</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-497'>EJBTHREE-497</a>] - EJB3 with Java5 server and Java1.4.x client</li>
+<li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-511'>EJBTHREE-511</a>] - Renamed clustered session bean testsuite</li>
+</ul>
+
 Release Notes - EJB 3.0 - Version EJB 3.0 RC5 - PFD
         
 <h2>Bug</h2>
@@ -13,6 +124,7 @@
 <li>[<a href='http://jira.jboss.com/jira/browse/EJBTHREE-432'>EJBTHREE-432</a>] - @PersistenceContext on class not working</li>
 </ul>
 
+                        
 Release Notes - EJB 3.0 - Version EJB 3.0 RC4 - PFD
     
 <h2>Feature Request</h2>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/index.html
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/index.html	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/index.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -9,7 +9,7 @@
 <ul>
 <li> <a href="tutorial/installing.html">Installation Guide</a></li>
 <li> <a href="tutorial/index.html">Tutorial</a> Walks you through EJB 3.0 with
-over 30 real examples that you can build and run.</li>
+over 30+ real examples that you can build and run.</li>
 <li> Reference Manual (incomplete): [<a
 href="reference/build/reference/en/pdf/jbossejb3_reference.pdf">PDF</a>] [<a
 href="reference/build/reference/en/html/index.html">Html</a>] [<a
@@ -23,7 +23,7 @@
 implementation.  It will teach you how to run EJB3 Persistence out of the container
 </p>
 <ul>
-<li> <a href="HibernateEntityManager/reference/en/pdf/hibernate-entitymanager.pdf">Hibernate EntityManager PDF Doc</a></li>
+<li> <a href="HibernateEntityManager/reference/en/pdf/hibernate_entitymanager.pdf">Hibernate EntityManager PDF Doc</a></li>
 <li> <a href="HibernateEntityManager/reference/en/html_single/index.html">Hibernate EntityManager HTML Doc</a></li>
 <li> <a href="HibernateEntityManager/api/index.html">Hibernate EntityManager JavaDoc</a></li>
 </ul>
@@ -35,7 +35,7 @@
 specific annotations.
 </p>
 <ul>
-<li> <a href="HibernateAnnotations/reference/en/pdf/hibernate-annotations.pdf">Hibernate Annotations PDF Doc</a></li>
+<li> <a href="HibernateAnnotations/reference/en/pdf/hibernate_annotations.pdf">Hibernate Annotations PDF Doc</a></li>
 <li> <a href="HibernateAnnotations/reference/en/html_single/index.html">Hibernate Annotations HTML Doc</a></li>
 <li> <a href="HibernateAnnotations/api/index.html">Hibernate Annotations JavaDoc</a></li>
 </ul>
@@ -46,8 +46,8 @@
 You'll need Hibernate 3.0 Docs for knowledge on specific hibernate properties that JBoss EJB 3.0 requires.
 </p>
 <ul>
-<li> <a href="Hibernate3/reference/en/pdf/hibernate_reference.pdf">Hibernate 3.1 PDF Doc</a></li>
-<li> <a href="Hibernate3/reference/en/html_single/index.html">Hibernate 3.1 HTML Doc</a></li>
+<li> <a href="Hibernate3/reference/en/pdf/hibernate_reference.pdf">Hibernate 3.x PDF Doc</a></li>
+<li> <a href="Hibernate3/reference/en/html_single/index.html">Hibernate 3.x HTML Doc</a></li>
 </ul>
 </p><p>
 </p>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/reference/reference/en/master.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/reference/reference/en/master.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/reference/reference/en/master.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -19,7 +19,7 @@
    <bookinfo>
       <title>JBoss EJB 3.0</title>
       <subtitle>JBoss EJB 3.0 Reference Documentation</subtitle>
-      <releaseinfo>RC6 - PFD</releaseinfo>
+      <releaseinfo>RC7 - PFD</releaseinfo>
    </bookinfo>
 
    <toc/>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/reference/reference/en/modules/entity_configuration.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/reference/reference/en/modules/entity_configuration.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/reference/reference/en/modules/entity_configuration.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -269,12 +269,14 @@
       </para>
       <para>
          The value can be one of insert, update, delete, or read.  That is the permission.
-         The "*" character can be used to specify all.
+         The "*" character can be used to specify all permissions.
       </para>
       <para>
          Now the configuration gets a bit more complicated.  You have to interact with the EntityManager within a secured jacc enabled
          EJB (session) or secured jacc enabled WAR.  For jacc enabling a WAR, see this URL http://wiki.jboss.org/wiki/Wiki.jsp?page=JACC.
-         There is an aspect domain defined for this "JACC Stateless Bean" or "JACC Stateful Bean".
+         To jacc enable an EJB, you have to use a JBoss specific aspect domain.  An aspect domain is a container configuration
+         template.  There is an aspect domain defined for jacc, either "JACC Stateless Bean" or "JACC Stateful Bean" depending on the type
+         of EJB you are securing.
          For example:
          <programlisting>
             @javax.ejb.Stateless
@@ -302,8 +304,10 @@
          You must do similar configuration on Tomcat to jacc enable wars and your servlets.
       </para>
       <para>
-         The final thing you must do is to create an jacc-service.xml file that will go in your deploy directory.  This jacc configuration is defined in more detail at
-         http://wiki.jboss.org/wiki/Wiki.jsp?page=JACC.
+         The final thing you must do is to create an jacc-service.xml file that will go in your deploy/ejb3.deployer directory.  This jacc configuration is defined in more detail at
+         http://wiki.jboss.org/wiki/Wiki.jsp?page=JACC.  The jacc-service.xml file must be deployed before your EJB3 Deployer.  Putting this file in the
+         ejb3.deployer directory ensures that this service starts before the EJB3 subsystem.  You could also set up an explicit dependency on the jacc service
+         within the ejb.deployer/META-INF/jboss-service.xml file if you do not like that kind of setup.  The EJB 3.0 distribution comes with a tutorial on entity security.
          <programlisting>
             <![CDATA[
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/asynch/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/asynch/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/asynch/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,10 +6,10 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/> 
    <property name="src.dir" value="${basedir}/src"/>
    <property name="jboss.home" value="${env.JBOSS_HOME}"/>
-   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/blob/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/blob/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/blob/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,10 +6,10 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
    <property name="jboss.home" value="${env.JBOSS_HOME}"/>
-   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/callbacks/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/callbacks/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/callbacks/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/callbacks/src/org/jboss/tutorial/callback/bean/CustomerDAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/callbacks/src/org/jboss/tutorial/callback/bean/CustomerDAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/callbacks/src/org/jboss/tutorial/callback/bean/CustomerDAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -57,7 +57,7 @@
    public List findByLastName(String last)
    {
       System.out.println("-- CustomerDAOBean.findByLastName(id)");
-      return manager.createQuery("from Customer c where c.last = :last").setParameter("last", last).getResultList();
+      return manager.createQuery("select c from Customer c where c.last = :last").setParameter("last", last).getResultList();
    }
 
    public void merge(Customer c)
@@ -72,7 +72,7 @@
       for (Iterator it = l.iterator() ; it.hasNext() ; )
       {
          Customer c = (Customer)it.next();
-         manager.remove(c);
+         manager.remove(manager.find(Customer.class, c.getId()));
       }
    }
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/clusteredentity/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/clusteredentity/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/clusteredentity/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,10 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+   <property name="jboss.server.config" value="all"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/clustering/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/clustering/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/clustering/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,10 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+   <property name="jboss.server.config" value="all"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/composite/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/composite/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/composite/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/consumer/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/consumer/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/consumer/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/consumer_deployment_descriptor/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/consumer_deployment_descriptor/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/consumer_deployment_descriptor/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependency/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependency/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependency/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,10 +6,10 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
    <property name="jboss.home" value="${env.JBOSS_HOME}"/>
-   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependent/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependent/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependent/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependent/src/org/jboss/tutorial/dependent/bean/CustomerDAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependent/src/org/jboss/tutorial/dependent/bean/CustomerDAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/dependent/src/org/jboss/tutorial/dependent/bean/CustomerDAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -49,7 +49,7 @@
 
    public List findByLastName(String name)
    {
-      return manager.createQuery("from Customer c where c.name.last = :name").setParameter("name", name).getResultList();
+      return manager.createQuery("select c from Customer c where c.name.last = :name").setParameter("name", name).getResultList();
    }
 
    public void merge(Customer c)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ear/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ear/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ear/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ear/src/org/jboss/tutorial/ear/servlet/CalculatorActionServlet.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ear/src/org/jboss/tutorial/ear/servlet/CalculatorActionServlet.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ear/src/org/jboss/tutorial/ear/servlet/CalculatorActionServlet.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,14 +23,13 @@
 
 import org.jboss.tutorial.ear.bean.CalculatorLocal;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.annotation.EJB;
 import java.io.IOException;
 import java.io.PrintWriter;
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean/DeploymentDescriptorSession1Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean/DeploymentDescriptorSession1Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean/DeploymentDescriptorSession1Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,15 +22,7 @@
 package org.jboss.tutorial.ejb21_client_adaptors.bean;
 
 import javax.naming.*;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
-import javax.ejb.Remote;
-import javax.ejb.Stateful;
-import javax.ejb.Local;
-import javax.ejb.Init;
 
-import org.jboss.annotation.ejb.LocalBinding;
-import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.ejb3.Container;
 import org.jboss.logging.Logger;
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean/Session1Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean/Session1Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/bean/Session1Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,12 +22,9 @@
 package org.jboss.tutorial.ejb21_client_adaptors.bean;
 
 import javax.naming.*;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
-import javax.ejb.Remote;
-import javax.ejb.Stateful;
-import javax.ejb.Init;
-import javax.ejb.RemoteHome;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
+import javax.ejb.*;
 
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.ejb3.Container;
@@ -41,7 +38,7 @@
 @Remote(Session1Remote.class)
 @RemoteHome(Session1RemoteHome.class)
 @RemoteBinding(jndiBinding = "Session1Remote")
- at EJBs({@EJB(name="session2", businessInterface=org.jboss.tutorial.ejb21_client_adaptors.bean.Session2LocalHome.class, beanName="Session2")})
+ at EJBs({@EJB(name="session2", beanInterface=org.jboss.tutorial.ejb21_client_adaptors.bean.Session2LocalHome.class, beanName="Session2")})
 public class Session1Bean 
 {
    private static final Logger log = Logger.getLogger(Session1Bean.class);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/META-INF (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/META-INF/persistence.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/META-INF/persistence.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/META-INF/persistence.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence>
-   <persistence-unit name="tempdb">
-      <jta-data-source>java:/DefaultDS</jta-data-source>
-      <properties>
-          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-         <property name="hibernate.jacc.allowed.org.jboss.tutorial.entity.security.bean.AllEntity" value="insert,update,delete,read"/>
-         <property name="hibernate.jacc.allowed.org.jboss.tutorial.entity.security.bean.StarEntity" value="*"/>
-         <property name="hibernate.jacc.allowed.org.jboss.tutorial.entity.security.bean.SomeEntity" value="insert,delete"/>
-
-         <property name="hibernate.jacc.enabled" value="true"/>
-      </properties>
-   </persistence-unit>
-</persistence>
-
-
-
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/META-INF/persistence.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/META-INF/persistence.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/build.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/build.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,96 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- ======================================================================= -->
-<!-- JBoss build file                                                       -->
-<!-- ======================================================================= -->
-
-<project name="JBoss" default="ejbjar" basedir=".">
-
-   <property file="../local.properties"/>  <property environment="env"/>
-   <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
-   <property name="build.dir" value="${basedir}/build"/>
-   <property name="build.classes.dir" value="${build.dir}/classes"/>
-
-   <!-- Build classpath -->
-   <path id="classpath">
-      <!-- So that we can get jndi.properties for InitialContext -->
-      <pathelement location="${basedir}"/>
-      <fileset dir="${jboss.home}/lib">
-         <include name="**/*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/lib">
-         <include name="**/*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer">
-         <include name="*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/jboss-aop-jdk50.deployer">
-         <include name="*.jar"/>
-      </fileset>
-      <pathelement location="${build.classes.dir}"/>
-   </path>
-
-   <property name="build.classpath" refid="classpath"/>
-
-   <!-- =================================================================== -->
-   <!-- Prepares the build directory                                        -->
-   <!-- =================================================================== -->
-   <target name="prepare">
-      <mkdir dir="${build.dir}"/>
-      <mkdir dir="${build.classes.dir}"/>
-   </target>
-
-   <!-- =================================================================== -->
-   <!-- Compiles the source code                                            -->
-   <!-- =================================================================== -->
-   <target name="compile" depends="prepare">
-      <javac srcdir="${src.dir}"
-         destdir="${build.classes.dir}"
-         debug="on"
-         deprecation="on"
-         optimize="off"
-         includes="**">
-         <classpath refid="classpath"/>
-      </javac>
-   </target>
-
-   <target name="ejbjar" depends="compile">
-      <jar jarfile="build/tutorial.jar">
-         <fileset dir="${build.classes.dir}">
-            <include name="**/*.class"/>
-         </fileset>
-         <fileset dir=".">
-            <include name="users.properties"/>
-            <include name="roles.properties"/>
-         </fileset>
-         <fileset dir=".">
-            <include name="META-INF/persistence.xml"/>
-         </fileset>
-      </jar>
-      <copy file="build/tutorial.jar" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
-      <copy file="jacc-service.xml" todir="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer"/>
-   </target>
-
-   <target name="run" depends="ejbjar">
-      <java classname="org.jboss.tutorial.entity.security.client.Client" fork="yes" dir=".">
-         <classpath refid="classpath"/>
-      </java>
-   </target>
-
-   <!-- =================================================================== -->
-   <!-- Cleans up generated stuff                                           -->
-   <!-- =================================================================== -->
-   <target name="clean.db">
-      <delete dir="${jboss.home}/server/${jboss.server.config}/data/hypersonic"/>
-   </target>
-
-   <target name="clean">
-      <delete dir="${build.dir}"/>
-      <delete file="${jboss.home}/server/${jboss.server.config}/deploy/tutorial.jar"/>
-      <delete file="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer/jacc-service.xml"/>
-   </target>
-
-
-</project>
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/build.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/build.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.html
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/entity-security.html	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,147 +0,0 @@
-<html>
-<body>
-<p>
-<h2> Entity Bean Security</h2>
-
-There is no spec defined way of security EJB 3.0 entity beans.  JBoss does provide a solution but it is only
-available within the JBoss Application Server.  You can secure access to the CRUD operations of your entity, but not
-method invocations on the entity.  Basically, what you are securing is when the Entitymanager does persist(), remove(),
-etc. operations on an entity.
-</p><p>
-<h3> Step 1: Specify Permissions in persistence.xml</h3>
-
-</p><p>
-To secure an entity you must add additional property information within persistence.xml.  here's an example:
-<pre>
-            &lt;?xml version="1.0" encoding="UTF-8"?&gt;
-            &lt;persistence&gt;
-               &lt;persistence-unit name="tempdb"&gt;
-                  &lt;jta-data-source&gt;java:/DefaultDS&lt;/jta-data-source&gt;
-                  &lt;properties&gt;
-                      &lt;property name="hibernate.hbm2ddl.auto" value="create-drop"/&gt;
-                     &lt;property name="hibernate.jacc.allowed.org.jboss.ejb3.test.jacc.AllEntity" value="insert,update,delete,read"/&gt;
-                     &lt;property name="hibernate.jacc.allowed.org.jboss.ejb3.test.jacc.StarEntity" value="*"/&gt;
-                     &lt;property name="hibernate.jacc.allowed.org.jboss.ejb3.test.jacc.SomeEntity" value="insert,delete"/&gt;
-
-                     &lt;property name="hibernate.jacc.enabled" value="true"/&gt;
-                  &lt;/properties&gt;
-               &lt;/persistence-unit&gt;
-            &lt;/persistence&gt;
-</pre>
-The Entity class you are securing as well as the roles allowed and the permissions allowed for that role are stored in property information within persistence.xml
-properties.  The property name has the role and the entity class within it.  It is "hiberante.jacc." + role + FQN of entity class.
-</p><p>
-The value can be one of insert, update, delete, or read.  That is the permission. The "*" character can be used to specify all permissions.  So,
-in the above example, for the <tt>org.jboss.ejb3.test.jacc.AllEntity</tt> entity, the role "allowed" has permission to insert,update, delete, and read.
-</p><p>
-<h3> Step 2: Enable JACC Security</h3>
-
-Now the configuration gets a bit more complicated.  You have to interact with the EntityManager within a secured jacc enabled
-EJB (session) or secured jacc enabled WAR.  For jacc enabling a WAR, see our <a href="URL http://wiki.jboss.org/wiki/Wiki.jsp?page=JACC">JACC Wiki</a>.
-To jacc enable an EJB, you have to use a JBoss specific aspect domain.  An aspect domain is a container configuration template.
-There is an aspect domain defined for jacc, either "JACC Stateless Bean" or "JACC Stateful Bean" depending on the type of EJB you are securing.
-</p><p>
-For example:
-<pre>
-            @javax.ejb.Stateless
-            @SecurityDomain ("other")
-            @AspectDomain("JACC Stateless Bean")
-            public class StatelessBean implements Stateless
-            {
-               @PersistenceContext
-               EntityManager em;
-
-               @PermitAll
-               public int unchecked(int i)
-               {
-                  System.out.println("stateless unchecked");
-                  return i;
-               }
-
-               @RolesAllowed ("allowed")
-               public int checked(int i)
-               {
-                  System.out.println("stateless checked");
-                  return i;
-               }
-</pre>
-You must do similar configuration on Tomcat to jacc enable wars and your servlets.
-</p><p>
-</p><p>
-<h3> Step 3: Enable JACC Security Serverwide</h3>
-
-</p><p>
-The final thing you must do is to create an jacc-service.xml file that will go in your deploy/ejb3.deployer directory.  This jacc configuration is defined in more detail at  <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JACC">JACC Wiki Page</a>.  The jacc-service.xml file must be deployed before your EJB3 Deployer.  Putting this file in the <tt>deploy/ejb3.deployer</tt> directory ensures that this service starts before the EJB3 subsystem.  You could also set up an explicit dependency on the jacc service within the <tt>ejb.deployer/META-INF/jboss-service.xml</tt> file if you do not like that kind of setup.
-<pre>
-&lt;server&gt;
-   &lt;mbean code="org.jboss.security.jacc.DelegatingPolicy"
-      name="jboss.security:service=JaccPolicyProvider"
-      xmbean-dd=""&gt;
-      &lt;xmbean&gt;
-         &lt;attribute access="read-only" getMethod="getPolicyProxy"&gt;
-            &lt;description&gt;The java.security.Policy implementation&lt;/description&gt;
-            &lt;name&gt;PolicyProxy&lt;/name&gt;
-            &lt;type&gt;java.security.Policy&lt;/type&gt;
-         &lt;/attribute&gt;
-         &lt;attribute access="read-write" getMethod="getExternalPermissionTypes"
-                    setMethod="setExternalPermissionTypes"&gt;
-            &lt;description&gt;The types of non-javax.security.jacc permissions that
-               should be validated against this policy&lt;/description&gt;
-            &lt;name&gt;ExternalPermissionTypes&lt;/name&gt;
-            &lt;type&gt;[Ljava.lang.Class;&lt;/type&gt;
-         &lt;/attribute&gt;
-         &lt;operation&gt;
-            &lt;name&gt;listContextPolicies&lt;/name&gt;
-            &lt;return-type&gt;java.lang.String&lt;/return-type&gt;
-         &lt;/operation&gt;
-      &lt;/xmbean&gt;
-      &lt;!-- Not used, just here to test that custom permissions don't break the
-      current behavior of javax.security.jacc.* permissions.
-      --&gt;
-      &lt;attribute name="ExternalPermissionTypes"&gt;org.jboss.security.srp.SRPPermission&lt;/attribute&gt;
-   &lt;/mbean&gt;
-   &lt;mbean code="org.jboss.security.jacc.SecurityService"
-      name="jboss.security:service=JaccSecurityService"
-      xmbean-dd=""&gt;
-      &lt;xmbean&gt;
-         &lt;descriptors&gt;
-            &lt;injection id="MBeanServerType" setMethod="setMBeanServer" /&gt;
-            &lt;injection id="ObjectNameType" setMethod="setObjectName" /&gt;
-         &lt;/descriptors&gt;
-         &lt;attribute access="read-write" getMethod="getPolicyName" setMethod="setPolicyName"&gt;
-            &lt;description&gt;The policy provider MBean name&lt;/description&gt;
-            &lt;name&gt;PolicyName&lt;/name&gt;
-            &lt;type&gt;javax.management.ObjectName&lt;/type&gt;
-         &lt;/attribute&gt;
-         &lt;attribute access="read-write" getMethod="getPolicyAttributeName"
-            setMethod="setPolicyAttributeName"&gt;
-            &lt;description&gt;The Policy attribute name on the PolicyName MBean&lt;/description&gt;
-            &lt;name&gt;PolicyAttributeName&lt;/name&gt;
-            &lt;type&gt;java.lang.String&lt;/type&gt;
-         &lt;/attribute&gt;
-         &lt;operation&gt;
-            &lt;name&gt;start&lt;/name&gt;
-         &lt;/operation&gt;
-         &lt;operation&gt;
-            &lt;name&gt;stop&lt;/name&gt;
-         &lt;/operation&gt;
-      &lt;/xmbean&gt;
-      &lt;attribute name="PolicyName"&gt;jboss.security:service=JaccPolicyProvider&lt;/attribute&gt;
-      &lt;attribute name="PolicyAttributeName"&gt;PolicyProxy&lt;/attribute&gt;
-   &lt;/mbean&gt;
-&lt;/server&gt;
-</pre>
-</p><p>
-<h3> Run the tutorial</h3>
-
-</p><p>
-To run the tutorial you must first shut down JBoss.  This is because the JACC service needs to be started at boot time.
-</p><p>
-<pre>
-$ ant
--- start up jboss app server
-$ ant run
-</pre>
-</p>
-</body>
-</html>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.html (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/entity-security.html)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.wiki
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/entity-security.wiki	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.wiki	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,136 +0,0 @@
-!!! Entity Bean Security
-There is no spec defined way of security EJB 3.0 entity beans.  JBoss does provide a solution but it is only
-available within the JBoss Application Server.  You can secure access to the CRUD operations of your entity, but not
-method invocations on the entity.  Basically, what you are securing is when the Entitymanager does persist(), remove(),
-etc. operations on an entity.
-
-!! Step 1: Specify Permissions in persistence.xml
-
-To secure an entity you must add additional property information within persistence.xml.  here's an example:
-{{{
-            <?xml version="1.0" encoding="UTF-8"?>
-            <persistence>
-               <persistence-unit name="tempdb">
-                  <jta-data-source>java:/DefaultDS</jta-data-source>
-                  <properties>
-                      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-                     <property name="hibernate.jacc.allowed.org.jboss.ejb3.test.jacc.AllEntity" value="insert,update,delete,read"/>
-                     <property name="hibernate.jacc.allowed.org.jboss.ejb3.test.jacc.StarEntity" value="*"/>
-                     <property name="hibernate.jacc.allowed.org.jboss.ejb3.test.jacc.SomeEntity" value="insert,delete"/>
-
-                     <property name="hibernate.jacc.enabled" value="true"/>
-                  </properties>
-               </persistence-unit>
-            </persistence>
-}}}
-The Entity class you are securing as well as the roles allowed and the permissions allowed for that role are stored in property information within persistence.xml
-properties.  The property name has the role and the entity class within it.  It is "hiberante.jacc." + role + FQN of entity class.
-
-The value can be one of insert, update, delete, or read.  That is the permission. The "*" character can be used to specify all permissions.  So,
-in the above example, for the {{org.jboss.ejb3.test.jacc.AllEntity}} entity, the role "allowed" has permission to insert,update, delete, and read.
-
-!! Step 2: Enable JACC Security
-Now the configuration gets a bit more complicated.  You have to interact with the EntityManager within a secured jacc enabled
-EJB (session) or secured jacc enabled WAR.  For jacc enabling a WAR, see our [JACC Wiki|URL http://wiki.jboss.org/wiki/Wiki.jsp?page=JACC].
-To jacc enable an EJB, you have to use a JBoss specific aspect domain.  An aspect domain is a container configuration template.
-There is an aspect domain defined for jacc, either "JACC Stateless Bean" or "JACC Stateful Bean" depending on the type of EJB you are securing.
-
-For example:
-{{{
-            @javax.ejb.Stateless
-            @SecurityDomain ("other")
-            @AspectDomain("JACC Stateless Bean")
-            public class StatelessBean implements Stateless
-            {
-               @PersistenceContext
-               EntityManager em;
-
-               @PermitAll
-               public int unchecked(int i)
-               {
-                  System.out.println("stateless unchecked");
-                  return i;
-               }
-
-               @RolesAllowed ("allowed")
-               public int checked(int i)
-               {
-                  System.out.println("stateless checked");
-                  return i;
-               }
-}}}
-You must do similar configuration on Tomcat to jacc enable wars and your servlets.
-
-
-!! Step 3: Enable JACC Security Serverwide
-
-The final thing you must do is to create an jacc-service.xml file that will go in your deploy/ejb3.deployer directory.  This jacc configuration is defined in more detail at  [JACC Wiki Page|http://wiki.jboss.org/wiki/Wiki.jsp?page=JACC].  The jacc-service.xml file must be deployed before your EJB3 Deployer.  Putting this file in the {{deploy/ejb3.deployer}} directory ensures that this service starts before the EJB3 subsystem.  You could also set up an explicit dependency on the jacc service within the {{ejb.deployer/META-INF/jboss-service.xml}} file if you do not like that kind of setup.
-{{{
-<server>
-   <mbean code="org.jboss.security.jacc.DelegatingPolicy"
-      name="jboss.security:service=JaccPolicyProvider"
-      xmbean-dd="">
-      <xmbean>
-         <attribute access="read-only" getMethod="getPolicyProxy">
-            <description>The java.security.Policy implementation</description>
-            <name>PolicyProxy</name>
-            <type>java.security.Policy</type>
-         </attribute>
-         <attribute access="read-write" getMethod="getExternalPermissionTypes"
-                    setMethod="setExternalPermissionTypes">
-            <description>The types of non-javax.security.jacc permissions that
-               should be validated against this policy</description>
-            <name>ExternalPermissionTypes</name>
-            <type>[Ljava.lang.Class;</type>
-         </attribute>
-         <operation>
-            <name>listContextPolicies</name>
-            <return-type>java.lang.String</return-type>
-         </operation>
-      </xmbean>
-      <!-- Not used, just here to test that custom permissions don't break the
-      current behavior of javax.security.jacc.* permissions.
-      -->
-      <attribute name="ExternalPermissionTypes">org.jboss.security.srp.SRPPermission</attribute>
-   </mbean>
-   <mbean code="org.jboss.security.jacc.SecurityService"
-      name="jboss.security:service=JaccSecurityService"
-      xmbean-dd="">
-      <xmbean>
-         <descriptors>
-            <injection id="MBeanServerType" setMethod="setMBeanServer" />
-            <injection id="ObjectNameType" setMethod="setObjectName" />
-         </descriptors>
-         <attribute access="read-write" getMethod="getPolicyName" setMethod="setPolicyName">
-            <description>The policy provider MBean name</description>
-            <name>PolicyName</name>
-            <type>javax.management.ObjectName</type>
-         </attribute>
-         <attribute access="read-write" getMethod="getPolicyAttributeName"
-            setMethod="setPolicyAttributeName">
-            <description>The Policy attribute name on the PolicyName MBean</description>
-            <name>PolicyAttributeName</name>
-            <type>java.lang.String</type>
-         </attribute>
-         <operation>
-            <name>start</name>
-         </operation>
-         <operation>
-            <name>stop</name>
-         </operation>
-      </xmbean>
-      <attribute name="PolicyName">jboss.security:service=JaccPolicyProvider</attribute>
-      <attribute name="PolicyAttributeName">PolicyProxy</attribute>
-   </mbean>
-</server>
-}}}
-
-!! Run the tutorial
-
-To run the tutorial you must first shut down JBoss.  This is because the JACC service needs to be started at boot time.
-
-{{{
-$ ant
--- start up jboss app server
-$ ant run
-}}}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/entity-security.wiki (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/entity-security.wiki)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jacc-service.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/jacc-service.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jacc-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,58 +0,0 @@
-
-<server>
-   <mbean code="org.jboss.security.jacc.DelegatingPolicy"
-      name="jboss.security:service=JaccPolicyProvider"
-      xmbean-dd="">
-      <xmbean>
-         <attribute access="read-only" getMethod="getPolicyProxy">
-            <description>The java.security.Policy implementation</description>
-            <name>PolicyProxy</name>
-            <type>java.security.Policy</type>
-         </attribute>
-         <attribute access="read-write" getMethod="getExternalPermissionTypes"
-                    setMethod="setExternalPermissionTypes">
-            <description>The types of non-javax.security.jacc permissions that
-               should be validated against this policy</description>
-            <name>ExternalPermissionTypes</name>
-            <type>[Ljava.lang.Class;</type>
-         </attribute>
-         <operation>
-            <name>listContextPolicies</name>
-            <return-type>java.lang.String</return-type>
-         </operation>
-      </xmbean>
-      <!-- Not used, just here to test that custom permissions don't break the
-      current behavior of javax.security.jacc.* permissions.
-      -->
-      <attribute name="ExternalPermissionTypes">org.jboss.security.srp.SRPPermission</attribute>
-   </mbean>
-   <mbean code="org.jboss.security.jacc.SecurityService"
-      name="jboss.security:service=JaccSecurityService"
-      xmbean-dd="">
-      <xmbean>
-         <descriptors>
-            <injection id="MBeanServerType" setMethod="setMBeanServer" />
-            <injection id="ObjectNameType" setMethod="setObjectName" />
-         </descriptors>
-         <attribute access="read-write" getMethod="getPolicyName" setMethod="setPolicyName">
-            <description>The policy provider MBean name</description>
-            <name>PolicyName</name>
-            <type>javax.management.ObjectName</type>
-         </attribute>
-         <attribute access="read-write" getMethod="getPolicyAttributeName"
-            setMethod="setPolicyAttributeName">
-            <description>The Policy attribute name on the PolicyName MBean</description>
-            <name>PolicyAttributeName</name>
-            <type>java.lang.String</type>
-         </attribute>
-         <operation>
-            <name>start</name>
-         </operation>
-         <operation>
-            <name>stop</name>
-         </operation>
-      </xmbean>
-      <attribute name="PolicyName">jboss.security:service=JaccPolicyProvider</attribute>
-      <attribute name="PolicyAttributeName">PolicyProxy</attribute>
-   </mbean>
-</server>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jacc-service.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/jacc-service.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jndi.properties
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/jndi.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jndi.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,3 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-java.naming.provider.url=localhost

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/jndi.properties (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/jndi.properties)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/log4j.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/log4j.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/log4j.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Log4j Configuration                                                  -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id$ -->
-
-<!--
-   | For more configuration infromation and examples see the Jakarta Log4j
-   | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-   
-<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-      <param name="Target" value="System.out"/>
-      <param name="Threshold" value="INFO"/>
-
-      <layout class="org.apache.log4j.PatternLayout">
-         <!-- The default pattern: Date Priority [Category] Messagen -->
-         <!--
-         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
-         -->
-         <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L)  -%m%n"/>
-      </layout>
-</appender>
-
-   <root>
-      <appender-ref ref="CONSOLE"/>
-   </root>
-
-</log4j:configuration>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/log4j.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/log4j.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/roles.properties
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/roles.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/roles.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,2 +0,0 @@
-rolefail=willfail
-somebody=allowed

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/roles.properties (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/roles.properties)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/AllEntity.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/AllEntity.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/AllEntity.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,17 +0,0 @@
-package org.jboss.tutorial.entity.security.bean;
-
-import java.io.Serializable;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
- at Entity
-public class AllEntity implements Serializable
-{
-
-   @Id @GeneratedValue(strategy=GenerationType.AUTO)
-   public int id;
-   
-   public String val;
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/AllEntity.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/AllEntity.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/SomeEntity.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/SomeEntity.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/SomeEntity.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,17 +0,0 @@
-package org.jboss.tutorial.entity.security.bean;
-
-import java.io.Serializable;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
- at Entity
-public class SomeEntity implements Serializable
-{
-
-   @Id @GeneratedValue(strategy=GenerationType.AUTO)
-   public int id;
-   
-   public String val;
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/SomeEntity.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/SomeEntity.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StarEntity.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StarEntity.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StarEntity.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,17 +0,0 @@
-package org.jboss.tutorial.entity.security.bean;
-
-import java.io.Serializable;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
- at Entity
-public class StarEntity  implements Serializable
-{
-
-   @Id @GeneratedValue(strategy=GenerationType.AUTO)
-   public int id;
-   
-   public String val;
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StarEntity.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StarEntity.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/Stateless.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/Stateless.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/Stateless.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,42 +0,0 @@
-package org.jboss.tutorial.entity.security.bean;
-
-import org.jboss.tutorial.entity.security.bean.AllEntity;
-import org.jboss.tutorial.entity.security.bean.SomeEntity;
-import org.jboss.tutorial.entity.security.bean.StarEntity;
-
-/**
- *
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision$
- */
-public interface Stateless
-{
-   int unchecked(int i);
-
-   int checked(int i);
-
-   AllEntity insertAllEntity();
-
-   AllEntity readAllEntity(int key);
-
-   void updateAllEntity(AllEntity e);
-
-   void deleteAllEntity(AllEntity e);
-
-   StarEntity insertStarEntity();
-
-   StarEntity readStarEntity(int key);
-
-   void updateStarEntity(StarEntity e);
-
-   void deleteStarEntity(StarEntity e);
-
-   SomeEntity insertSomeEntity();
-
-   SomeEntity readSomeEntity(int key);
-
-   void updateSomeEntity(SomeEntity e);
-
-   void deleteSomeEntity(SomeEntity e);
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/Stateless.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/Stateless.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StatelessBean.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StatelessBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,128 +0,0 @@
-package org.jboss.tutorial.entity.security.bean;
-
-import javax.annotation.security.RolesAllowed;
-import javax.annotation.security.PermitAll;
-import javax.ejb.Remote;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-import org.jboss.annotation.security.SecurityDomain;
-import org.jboss.annotation.ejb.AspectDomain;
-import org.jboss.tutorial.entity.security.bean.AllEntity;
-import org.jboss.tutorial.entity.security.bean.SomeEntity;
-import org.jboss.tutorial.entity.security.bean.StarEntity;
-import org.jboss.tutorial.entity.security.bean.Stateless;
-
-/**
- *
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision$
- */
- at javax.ejb.Stateless
- at Remote (Stateless.class)
- at SecurityDomain ("other")
- at AspectDomain("JACC Stateless Bean")
-public class StatelessBean implements Stateless
-{
-   @PersistenceContext
-   EntityManager em;
-
-   @PermitAll
-   public int unchecked(int i)
-   {
-      System.out.println("stateless unchecked");
-      return i;
-   }
-
-   @RolesAllowed ("allowed")
-   public int checked(int i)
-   {
-      System.out.println("stateless checked");
-      return i;
-   }
-
-   @PermitAll
-   public AllEntity insertAllEntity()
-   {
-      AllEntity e = new AllEntity();
-      e.val = "x";
-      em.persist(e);
-      return e;
-   }
-
-   @PermitAll
-   public AllEntity readAllEntity(int key)
-   {
-      AllEntity e = em.find(AllEntity.class, key);
-      return e;
-   }
-
-   @PermitAll
-   public void updateAllEntity(AllEntity e)
-   {
-      em.merge(e);
-   }
-
-   @PermitAll
-   public void deleteAllEntity(AllEntity e)
-   {
-      em.remove(em.find(AllEntity.class, e.id));
-   }
-
-   @PermitAll
-   public StarEntity insertStarEntity()
-   {
-      StarEntity e = new StarEntity();
-      e.val = "x";
-      em.persist(e);
-      return e;
-   }
-
-   @PermitAll
-   public StarEntity readStarEntity(int key)
-   {
-      StarEntity e = em.find(StarEntity.class, key);
-      return e;
-   }
-
-   @PermitAll
-   public void updateStarEntity(StarEntity e)
-   {
-      em.merge(e);
-   }
-
-   @PermitAll
-   public void deleteStarEntity(StarEntity e)
-   {
-      em.remove(em.find(StarEntity.class, e.id));
-   }
-
-
-   @PermitAll
-   public SomeEntity insertSomeEntity()
-   {
-      SomeEntity e = new SomeEntity();
-      e.val = "x";
-      em.persist(e);
-      return e;
-   }
-
-   @PermitAll
-   public SomeEntity readSomeEntity(int key)
-   {
-      SomeEntity e = em.find(SomeEntity.class, key);
-      return e;
-   }
-
-   @PermitAll
-   public void updateSomeEntity(SomeEntity e)
-   {
-      em.merge(e);
-   }
-
-   @PermitAll
-   public void deleteSomeEntity(SomeEntity e)
-   {
-      em.remove(em.find(SomeEntity.class, e.id));
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StatelessBean.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/bean/StatelessBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/Client.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/Client.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/Client.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,284 +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 org.jboss.tutorial.entity.security.client;
-
-import org.jboss.tutorial.entity.security.bean.AllEntity;
-import org.jboss.tutorial.entity.security.bean.SomeEntity;
-import org.jboss.tutorial.entity.security.bean.StarEntity;
-import org.jboss.tutorial.entity.security.bean.Stateless;
-import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SimplePrincipal;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import java.util.Properties;
-
-/**
- *
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision$
- */
-public class Client
-{
-
-   public static void main(String[] args) throws Exception
-   {
-      testAllEntity();
-      testSomeEntity();
-      testStarEntity();
-   }
-
-   public static InitialContext getInitialContext(String username, String password) throws Exception
-   {
-      Properties env = new Properties();
-      env.setProperty(Context.SECURITY_PRINCIPAL, username);
-      env.setProperty(Context.SECURITY_CREDENTIALS, password);
-      env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
-      return new InitialContext(env);
-
-   }
-
-   public static void testAllEntity()throws Exception
-   {
-      InitialContext ctx = getInitialContext("somebody", "password");
-      Stateless stateless = (Stateless)ctx.lookup("StatelessBean/remote");
-
-      System.out.println("Good role");
-      System.out.println("Inserting...");
-      AllEntity e = stateless.insertAllEntity();
-      System.out.println("Reading...");
-      e = stateless.readAllEntity(e.id);
-      e.val += "y";
-      System.out.println("Updating...");
-      stateless.updateAllEntity(e);
-      System.out.println("Deleting...");
-      stateless.deleteAllEntity(e);
-      System.out.println("Inserting...");
-      e = stateless.insertAllEntity();
-
-      System.out.println("Bad role");
-      getInitialContext("rolefail", "password");
-
-      AllEntity ae2 = null;
-      try
-      {
-         System.out.println("Inserting...");
-         ae2 = stateless.insertAllEntity();
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         System.out.println("Reading...");
-         ae2 = stateless.readAllEntity(e.id);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         e.val += "y";
-         stateless.updateAllEntity(e);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         stateless.deleteAllEntity(e);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         e = stateless.insertAllEntity();
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-   }
-
-
-   public static void testStarEntity()throws Exception
-   {
-      InitialContext ctx = getInitialContext("somebody", "password");
-      Stateless stateless = (Stateless)ctx.lookup("StatelessBean/remote");
-
-      System.out.println("Good role");
-      System.out.println("Inserting...");
-      StarEntity e = stateless.insertStarEntity();
-      System.out.println("Reading...");
-      e = stateless.readStarEntity(e.id);
-      e.val += "y";
-      System.out.println("Updating...");
-      stateless.updateStarEntity(e);
-      System.out.println("Deleting...");
-      stateless.deleteStarEntity(e);
-      System.out.println("Inserting...");
-      e = stateless.insertStarEntity();
-
-      System.out.println("Bad role");
-      getInitialContext("rolefail", "password");
-
-      StarEntity ae2 = null;
-      try
-      {
-         System.out.println("Inserting...");
-         ae2 = stateless.insertStarEntity();
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         System.out.println("Reading...");
-         ae2 = stateless.readStarEntity(e.id);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         e.val += "y";
-         stateless.updateStarEntity(e);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         stateless.deleteStarEntity(e);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         e = stateless.insertStarEntity();
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-   }
-
-   public static void testSomeEntity()throws Exception
-   {
-      InitialContext ctx = getInitialContext("somebody", "password");
-      Stateless stateless = (Stateless)ctx.lookup("StatelessBean/remote");
-
-      System.out.println("Good role");
-      System.out.println("Inserting...");
-      SomeEntity e = stateless.insertSomeEntity();
-
-      try
-      {
-         System.out.println("Reading...");
-         e = stateless.readSomeEntity(e.id);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         e.val += "y";
-         System.out.println("Updating...");
-         stateless.updateSomeEntity(e);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-
-      System.out.println("Inserting...");
-      e = stateless.insertSomeEntity();
-
-      System.out.println("Bad role");
-      getInitialContext("rolefail", "password");
-
-      SomeEntity ae2 = null;
-      try
-      {
-         System.out.println("Inserting...");
-         ae2 = stateless.insertSomeEntity();
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         stateless.deleteSomeEntity(e);
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-
-      try
-      {
-         e = stateless.insertSomeEntity();
-         throw new RuntimeException("security exception should have been thrown!");
-      }
-      catch(Exception ex)
-      {
-         System.out.println("Expected failure: " + ex.getMessage());
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/Client.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/src/org/jboss/tutorial/entity/security/client/Client.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/users.properties
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/entity-security/users.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/users.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,2 +0,0 @@
-somebody=password
-rolefail=password

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/entity-security/users.properties (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/entity-security/users.properties)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean/ShoppingCart.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean/ShoppingCart.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean/ShoppingCart.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,8 +22,6 @@
 package org.jboss.tutorial.extended.bean;
 
 import javax.ejb.Remove;
-import javax.persistence.FlushMode;
-import javax.persistence.FlushModeType;
 
 /**
  * comment
@@ -44,5 +42,5 @@
 
    void update3();
 
-   @FlushMode(FlushModeType.AUTO) void never();
+   void never();
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean/ShoppingCartBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean/ShoppingCartBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/extended_pc/src/org/jboss/tutorial/extended/bean/ShoppingCartBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,13 +21,11 @@
 */
 package org.jboss.tutorial.extended.bean;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Remote;
 import javax.ejb.Remove;
 import javax.ejb.*;
 import javax.persistence.EntityManager;
-import javax.persistence.FlushMode;
-import javax.persistence.FlushModeType;
 import javax.persistence.PersistenceContext;
 import javax.persistence.PersistenceContextType;
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/index.html
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/index.html	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/index.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -11,8 +11,12 @@
 See <a href="installing.html">Installing Guide</a>
 </p><p>
 <h4>The Tutorial</h4>
-
-You must set the JBOSS_HOME environment variable to run any of the tutorial examples.  Here's a table of contents:
+ <p>
+You must set the JBOSS_HOME environment variable to run any of the tutorial examples.  Also, you may want to edit <a href="local.properties">local.properties</a>  in the
+    base directory to override any build settings settings.  For instance, you might want to set up jboss.home or jboss.server.config.  By default the build files look in the 'default' configuration.
+</p>
+<p>
+Here's a table of contents:
 </p><p>
 <h4>JBoss Extensions to EJB 3.0</h4>
 
@@ -22,6 +26,8 @@
 <li> <a href="service/service.html">Service POJOs</a></li>
 <li> <a href="service_deployment_descriptor/service.html">Service POJOs Using a Deployment Descriptor</a></li>
 <li> <a href="asynch/asynch.html">Asynchronous calls</a></li>
+<li> <a href="jca/inflow/quartz/quartz.html">Quartz Scheduling with MDBs</a></li>
+<li> <a href="entity-security/entity-security.html">Securing an EntityManager</a></li>
 </ul>
 </p><p>
 <h4>EJB 3.0 Tutorial/Examples</h4>
@@ -57,6 +63,7 @@
 <li> <a href="jca/inflow/swiftMQ/swiftMQ.html">JCA RAR for JMS with SwiftMQ</a></li>
 <li> <a href="dependency/dependency.html">Deployment Dependencies</a></li>
 <li> <a href="jboss_resource_ref/jboss_rr.html">Resource Refs with XML</a></li>
+<li> <a href="ssl/ssl.html">EJB invocations over SSL</a></li>
 </ul>
 </p><p>
 </p><p>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/injection/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/injection/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/injection/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/injection/src/org/jboss/tutorial/injection/bean/ShoppingCartBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/injection/src/org/jboss/tutorial/injection/bean/ShoppingCartBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/injection/src/org/jboss/tutorial/injection/bean/ShoppingCartBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,7 +22,7 @@
 package org.jboss.tutorial.injection.bean;
 
 import java.util.HashMap;
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Remote;
 import javax.ejb.Remove;
 import javax.ejb.Stateful;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/installing.html
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/installing.html	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/installing.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,9 +1,39 @@
 <html>
 <body>
 <p>
-<h2>Installing EJB 3.0 RC7 - FD</h2>
+<h2>Installing EJB 3.0 RC7 with JBoss 4.0.4.GA installer</h2>
 <p>
-EJB 3.0 RC7 has only been tested with JBoss 4.0.4 GA.  It should be installed with the graphical installer.
+The EJB 3.0 RC7 implementation is only usable with JBoss 4.0.4.GA.  The EJB 3.0 implementation that comes packaged with the JBoss 4.0.4.GA installer is the same as the standalone EJB 3.0 RC7 distribution with one exception.  The standalone distribution has been patched to fix the <a href="http://jira.jboss.com/jira/browse/EJBTHREE-573">EJBTHREE-573</a> JIRA bug.  Also the JBoss Remoting jar has been patched to fix the SSL problems in the 4.0.4.GA release.  If you don't need these fixes, then installing with the installer is fine.
 </p>
+<hr>
+<h2>Installing into JBoss AS 4.0.4.GA</h2>
+<p>
+<ol>
+<li> Download <a
+href="http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=16942">JBoss
+4.0.4.GA</a>.</li>
+
+<li> Download <a href="http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=132063">EJB 3.0 RC7</a>.</li>
+<li> Unzip both of these downloads</li>
+
+<li> Copy <tt>ejb3.deployer</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/deploy</tt></li>
+<li> Copy <tt>ejb3-clustered-sfsbcache-service.xml</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/deploy</tt></li>
+<li> Copy <tt>ejb3-entity-cache-service.xml</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/deploy</tt></li>
+<li> Copy <tt>ejb3-interceptors-aop.xml</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/deploy</tt></li>
+<li> Copy <tt>jboss-aop-jdk50.deployer</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/deploy</tt></li>
+<li> Copy <tt>quartz-ra.rar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/deploy</tt></li>
+<li> Copy <tt>jboss-remoting.jar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/lib</tt></li>
+<li> Copy <tt>hibernate-annotations.jar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/lib</tt></li>
+<li> Copy <tt>hibernate-entitymanager.jar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/lib</tt></li>
+<li> Copy <tt>ejb3-persistence.jar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/lib</tt></li>
+<li> Copy <tt>quartz-all-1.5.2.jar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/server/all/lib</tt></li>
+<li> Copy <tt>jboss-ejb3-client.jar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/client</tt></li>
+<li> Copy <tt>jboss-annotations-ejb3.jar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/client</tt></li>
+<li> Copy <tt>hibernate-client.jar</tt> from the <tt>lib/</tt> directory of the distribution to <tt>jboss-4.0.x/client</tt></li>
+<li> Remove <tt>jboss-aop.deployer/</tt> from <tt>jboss-4.0.x/server/all/deploy</tt></li>
+
+<li> Start jboss up with the <tt>all</tt> configuration <tt>run.sh -c all</tt></li>
+</ol>
+</p>
 </body>
 </html>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/interceptor/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/interceptor/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/interceptor/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,10 +6,10 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
    <property name="jboss.home" value="${env.JBOSS_HOME}"/>   
-   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/interceptor/src/org/jboss/tutorial/interceptor/bean/TracingInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/interceptor/src/org/jboss/tutorial/interceptor/bean/TracingInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/interceptor/src/org/jboss/tutorial/interceptor/bean/TracingInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -42,7 +42,7 @@
       finally
       {
          long time = System.currentTimeMillis() - start;
-         String method = ctx.getBean().getClass().getName() + "." + ctx.getMethod().getName() + "()";
+         String method = ctx.getTarget().getClass().getName() + "." + ctx.getMethod().getName() + "()";
          System.out.println("*** TracingInterceptor invocation of " + method + " took " + time + "ms");
       }
    }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_deployment_descriptor/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_deployment_descriptor/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_deployment_descriptor/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,10 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+   <property name="jboss.server.config" value="all"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_deployment_descriptor/src/org/jboss/tutorial/jboss_deployment_descriptor/bean/StatelessTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_deployment_descriptor/src/org/jboss/tutorial/jboss_deployment_descriptor/bean/StatelessTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_deployment_descriptor/src/org/jboss/tutorial/jboss_deployment_descriptor/bean/StatelessTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,6 @@
 */
 package org.jboss.tutorial.jboss_deployment_descriptor.bean;
 
-import javax.annotation.EJB;
 import javax.annotation.security.RunAs;
 import javax.ejb.Remote;
 import javax.ejb.Stateless;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_resource_ref/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_resource_ref/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jboss_resource_ref/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/ejb-jar.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ejb-jar
-        xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
-        version="3.0">
-   <description>JBoss Message Driven Bean Tutorial</description>
-   <display-name>JBoss Message Driven Bean Tutorial</display-name>
-   <enterprise-beans>
-      <message-driven>
-         <ejb-name>ExampleMDB</ejb-name>
-         <ejb-class>org.jboss.tutorial.quartz.QuartzMDBBean</ejb-class>
-         <transaction-type>Container</transaction-type>
-         <activation-config>
-            <activation-config-property>
-               <activation-config-property-name>cronTrigger</activation-config-property-name>
-               <activation-config-property-value>0/2 * * * * ?</activation-config-property-value>
-            </activation-config-property>
-         </activation-config>
-      </message-driven>
-      <message-driven>
-         <ejb-name>ExampleMDB2</ejb-name>
-         <ejb-class>org.jboss.tutorial.quartz.QuartzMDBBean</ejb-class>
-         <transaction-type>Container</transaction-type>
-         <activation-config>
-            <activation-config-property>
-               <activation-config-property-name>cronTrigger</activation-config-property-name>
-               <activation-config-property-value>0/3 * * * * ?</activation-config-property-value>
-            </activation-config-property>
-         </activation-config>
-      </message-driven>
-   </enterprise-beans>
-</ejb-jar>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/ejb-jar.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/ejb-jar.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/jboss.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jboss
-        xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                            http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
-        version="3.0">
-   <enterprise-beans>
-      <message-driven>
-         <ejb-name>ExampleMDB</ejb-name>
-         <resource-adapter-name>quartz-ra.rar</resource-adapter-name>
-      </message-driven>
-      <message-driven>
-         <ejb-name>ExampleMDB2</ejb-name>
-         <resource-adapter-name>quartz-ra.rar</resource-adapter-name>
-      </message-driven>
-   </enterprise-beans>
-</jboss>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/jboss.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/META-INF/jboss.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/build.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/build.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,96 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- ======================================================================= -->
-<!-- JBoss build file                                                       -->
-<!-- ======================================================================= -->
-
-<project name="JBoss" default="ejbjar" basedir=".">
-
-   <property file="../../../local.properties"/>  <property environment="env"/>
-   <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
-   <property name="build.dir" value="${basedir}/build"/>
-   <property name="build.classes.dir" value="${build.dir}/classes"/>
-
-   <!-- Build classpath -->
-   <path id="classpath">
-      <!-- So that we can get jndi.properties for InitialContext -->
-      <pathelement location="${basedir}"/>
-      <fileset dir="${jboss.home}/lib">
-         <include name="**/*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/lib">
-         <include name="**/*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer">
-         <include name="*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/jboss-aop-jdk50.deployer">
-         <include name="*.jar"/>
-      </fileset>
-      <pathelement location="${build.classes.dir}"/>
-   </path>
-
-   <property name="build.classpath" refid="classpath"/>
-
-   <!-- =================================================================== -->
-   <!-- Prepares the build directory                                        -->
-   <!-- =================================================================== -->
-   <target name="prepare">
-      <mkdir dir="${build.dir}"/>
-      <mkdir dir="${build.classes.dir}"/>
-   </target>
-
-   <!-- =================================================================== -->
-   <!-- Compiles the source code                                            -->
-   <!-- =================================================================== -->
-   <target name="compile" depends="prepare">
-      <javac srcdir="${src.dir}"
-         destdir="${build.classes.dir}"
-         debug="on"
-         deprecation="on"
-         optimize="off"
-         includes="**">
-         <classpath refid="classpath"/>
-      </javac>
-   </target>
-
-   <target name="ejbjar" depends="compile">
-      <jar jarfile="build/tutorial.jar">
-         <fileset dir="${build.classes.dir}">
-            <include name="**/Annotated*.class"/>
-         </fileset>
-         <!--
-         <fileset dir=".">
-            <include name="META-INF/*.xml"/>
-         </fileset>
-         -->
-      </jar>
-      <copy file="build/tutorial.jar" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
-      <jar jarfile="build/tutorial-xml.jar">
-         <fileset dir="${build.classes.dir}">
-            <include name="**/Quart*.class"/>
-         </fileset>
-         <fileset dir=".">
-            <include name="META-INF/*.xml"/>
-         </fileset>
-      </jar>
-      <copy file="build/tutorial-xml.jar" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
-   </target>
-
-   <!-- =================================================================== -->
-   <!-- Cleans up generated stuff                                           -->
-   <!-- =================================================================== -->
-   <target name="clean.db">
-      <delete dir="${jboss.home}/server/${jboss.server.config}/data/hypersonic"/>
-   </target>
-
-   <target name="clean">
-      <delete dir="${build.dir}"/>
-      <delete file="${jboss.home}/server/${jboss.server.config}/deploy/tutorial.jar"/>
-      <delete file="${jboss.home}/server/${jboss.server.config}/deploy/tutorial-xml.jar"/>
-   </target>
-
-
-</project>
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/build.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/build.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/jndi.properties
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/jndi.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/jndi.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,3 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-java.naming.provider.url=localhost

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/jndi.properties (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/jndi.properties)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/log4j.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/log4j.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/log4j.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Log4j Configuration                                                  -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id$ -->
-
-<!--
-   | For more configuration infromation and examples see the Jakarta Log4j
-   | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-   
-<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-      <param name="Target" value="System.out"/>
-      <param name="Threshold" value="INFO"/>
-
-      <layout class="org.apache.log4j.PatternLayout">
-         <!-- The default pattern: Date Priority [Category] Messagen -->
-         <!--
-         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
-         -->
-         <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L)  -%m%n"/>
-      </layout>
-</appender>
-
-   <root>
-      <appender-ref ref="CONSOLE"/>
-   </root>
-
-</log4j:configuration>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/log4j.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/log4j.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.html
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/quartz.html	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,47 +0,0 @@
-<html>
-<body>
-<p>
-<h2> Quartz Scheduler Integration</h2>
-
-</p><p>
-If you have installed JBoss using the 4.0.4.GA installer it comes bundled with Quartz integration packaged as a JCA Message-Inflow resource adapter: quartz-ra.rar.  This package can also be downloaded directly from <a href="http://www.sf.net/projects/jboss">SourceForge</a>.
-</p><p>
-This integration allows you to schedule stateless or stateful quartz jobs and have the job be posted to a Message Driven bean.  The Quartz Resource Adapter creates a non-persistent scheduler.  Jobs are created from deployed MDBs from information in the MDB's activation config spec.  Currently only cron jobs are allowed to be configured.  In future versions we will support other activation config spec setting for Quartz.
-</p><p>
-Here's an example:
-<pre>
-import org.jboss.annotation.ejb.ResourceAdapter;
-import org.jboss.logging.Logger;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import javax.ejb.MessageDriven;
-import javax.ejb.ActivationConfigProperty;
-
- at MessageDriven(activationConfig =
-{
-   @ActivationConfigProperty(propertyName="cronTrigger", propertyValue="0/2 * * * * ?")
-})
- at ResourceAdapter("quartz-ra.rar")
-public class AnnotatedQuartzMDBBean implements Job
-{
-   private static final Logger log = Logger.getLogger(AnnotatedQuartzMDBBean.class);
-
-
-   public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException
-   {
-      AnnotatedQuartzMDBBean.log.info("************** here in annotated!!!!");
-   }
-}
-</pre>
-   
-This is a simple MDB that implements the org.quartz.Job interface.  The "cronTrigger" activation spec attribute is required.  In this you specify a cron syntax as documented in the Quartz distribution.  The @org.jboss.annotation.ejb.ResourceAdapter annotation is used to tell the EJB container which resource adapter to use for the inflow implementation.
-</p><p>
-If you remove the annotations, this can also be specified in ejb-jar.xml and in jboss.xml.  ejb-jar.xml is responsible for setting up the activation config spec, while jboss.xml defines the resource adapter binding.  
-</p><p>
-The tutorial example deploys both an annotated and XML based MDB that is driven by Quartz.
-</p><p>
-</p>
-</body>
-</html>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.html (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/quartz.html)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.wiki
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/quartz.wiki	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.wiki	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,40 +0,0 @@
-!!! Quartz Scheduler Integration
-
-If you have installed JBoss using the 4.0.4.GA installer it comes bundled with Quartz integration packaged as a JCA Message-Inflow resource adapter: quartz-ra.rar.  This package can also be downloaded directly from [SourceForge|http://www.sf.net/projects/jboss].
-
-This integration allows you to schedule stateless or stateful quartz jobs and have the job be posted to a Message Driven bean.  The Quartz Resource Adapter creates a non-persistent scheduler.  Jobs are created from deployed MDBs from information in the MDB's activation config spec.  Currently only cron jobs are allowed to be configured.  In future versions we will support other activation config spec setting for Quartz.
-
-Here's an example:
-{{{
-import org.jboss.annotation.ejb.ResourceAdapter;
-import org.jboss.logging.Logger;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import javax.ejb.MessageDriven;
-import javax.ejb.ActivationConfigProperty;
-
- at MessageDriven(activationConfig =
-{
-   @ActivationConfigProperty(propertyName="cronTrigger", propertyValue="0/2 * * * * ?")
-})
- at ResourceAdapter("quartz-ra.rar")
-public class AnnotatedQuartzMDBBean implements Job
-{
-   private static final Logger log = Logger.getLogger(AnnotatedQuartzMDBBean.class);
-
-
-   public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException
-   {
-      AnnotatedQuartzMDBBean.log.info("************** here in annotated!!!!");
-   }
-}
-}}}
-   
-This is a simple MDB that implements the org.quartz.Job interface.  The "cronTrigger" activation spec attribute is required.  In this you specify a cron syntax as documented in the Quartz distribution.  The @org.jboss.annotation.ejb.ResourceAdapter annotation is used to tell the EJB container which resource adapter to use for the inflow implementation.
-
-If you remove the annotations, this can also be specified in ejb-jar.xml and in jboss.xml.  ejb-jar.xml is responsible for setting up the activation config spec, while jboss.xml defines the resource adapter binding.  
-
-The tutorial example deploys both an annotated and XML based MDB that is driven by Quartz.
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/quartz.wiki (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/quartz.wiki)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src/org)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/AnnotatedQuartzMDBBean.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/AnnotatedQuartzMDBBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/AnnotatedQuartzMDBBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,52 +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 org.jboss.tutorial.quartz;
-
-import org.jboss.annotation.ejb.ResourceAdapter;
-import org.jboss.logging.Logger;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import javax.ejb.MessageDriven;
-import javax.ejb.ActivationConfigProperty;
-
-/**
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:bill at jboss.com">Bill Burke</a>
- */
- at MessageDriven(activationConfig =
-{
-   @ActivationConfigProperty(propertyName="cronTrigger", propertyValue="0/2 * * * * ?")
-})
- at ResourceAdapter("quartz-ra.rar")
-public class AnnotatedQuartzMDBBean implements Job
-{
-   private static final Logger log = Logger.getLogger(AnnotatedQuartzMDBBean.class);
-
-
-   public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException
-   {
-      AnnotatedQuartzMDBBean.log.info("************** here in annotated!!!!");
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/AnnotatedQuartzMDBBean.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/AnnotatedQuartzMDBBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/QuartzMDBBean.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/QuartzMDBBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/QuartzMDBBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,47 +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 org.jboss.tutorial.quartz;
-
-import org.jboss.annotation.ejb.ResourceAdapter;
-import org.jboss.logging.Logger;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import javax.ejb.MessageDriven;
-import javax.ejb.ActivationConfigProperty;
-import javax.annotation.Resource;
-
-/**
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:bill at jboss.com">Bill Burke</a>
- */
-public class QuartzMDBBean implements Job
-{
-   private static final Logger log = Logger.getLogger(QuartzMDBBean.class);
-
-   public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException
-   {
-      QuartzMDBBean.log.info("************** JOB: " + jobExecutionContext.getJobDetail().getName());
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/QuartzMDBBean.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/jca/inflow/quartz/src/org/jboss/tutorial/quartz/QuartzMDBBean.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jndibinding/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jndibinding/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/jndibinding/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/join.html
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/join.html	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/join.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -35,7 +35,7 @@
 <pre>
    public List findByWeight(double weight)
    {
-      return manager.createQuery("from Pet p where p.weight &lt; :weight").setParameter("weight", weight).getResultList();
+      return manager.createQuery("select p from Pet p where p.weight &lt; :weight").setParameter("weight", weight).getResultList();
    }
 </pre>
 </p><p>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/src/org/jboss/tutorial/joininheritance/bean/PetDAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/src/org/jboss/tutorial/joininheritance/bean/PetDAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/joininheritance/src/org/jboss/tutorial/joininheritance/bean/PetDAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -56,6 +56,6 @@
 
    public List findByWeight(double weight)
    {
-      return manager.createQuery("from Pet p where p.weight < :weight").setParameter("weight", weight).getResultList();
+      return manager.createQuery("select p from Pet p where p.weight < :weight").setParameter("weight", weight).getResultList();
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/local.properties
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/local.properties	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/local.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,3 +1,3 @@
 # The jboss server distribution root directory
 #jboss.home=../../../../build/output/jboss-4.0.4beta
-jboss.server.config=default
\ No newline at end of file
+#jboss.server.config=default
\ No newline at end of file

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/mdb/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/mdb/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/mdb/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/mdb_deployment_descriptor/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/mdb_deployment_descriptor/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/mdb_deployment_descriptor/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/merge.html
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/merge.html	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/merge.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -37,7 +37,7 @@
 <pre>
    public List findByLastName(String name)
    {
-      return manager.createQuery("from Customer c where c.last = :name").setParameter("name", name).getResultList();
+      return manager.createQuery("select c from Customer c where c.last = :name").setParameter("name", name).getResultList();
    }
 </pre>
 </p><p>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/src/org/jboss/tutorial/merge/bean/CustomerDAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/src/org/jboss/tutorial/merge/bean/CustomerDAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/merge/src/org/jboss/tutorial/merge/bean/CustomerDAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -49,7 +49,7 @@
 
    public List findByLastName(String name)
    {
-      return manager.createQuery("from Customer c where c.last = :name").setParameter("name", name).getResultList();
+      return manager.createQuery("select c from Customer c where c.last = :name").setParameter("name", name).getResultList();
    }
 
    public void merge(Customer c)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/packaging/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/packaging/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/packaging/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/reference21_30/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/reference21_30/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/reference21_30/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,10 +6,10 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
    <property name="jboss.home" value="${env.JBOSS_HOME}"/>  
-   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/reference21_30/src/org/jboss/tutorial/reference21_30/bean/Stateless3Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/reference21_30/src/org/jboss/tutorial/reference21_30/bean/Stateless3Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/reference21_30/src/org/jboss/tutorial/reference21_30/bean/Stateless3Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -25,8 +25,8 @@
 import javax.ejb.RemoteHome;
 import javax.ejb.Stateless;
 import javax.naming.InitialContext;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.ejb3.Container;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/relationships/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/relationships/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/relationships/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/secondary/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/secondary/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/secondary/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/secondary/src/org/jboss/tutorial/secondary/bean/CustomerDAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/secondary/src/org/jboss/tutorial/secondary/bean/CustomerDAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/secondary/src/org/jboss/tutorial/secondary/bean/CustomerDAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -50,7 +50,7 @@
 
    public List findByLastName(String name)
    {
-      return manager.createQuery("from Customer c where c.last = :name").setParameter("name", name).getResultList();
+      return manager.createQuery("select c from Customer c where c.last = :name").setParameter("name", name).getResultList();
    }
 
    public void merge(Customer c)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/security/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/security/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/security/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/service/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/service/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/service/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/service_deployment_descriptor/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/service_deployment_descriptor/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/service_deployment_descriptor/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/single.html
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/single.html	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/single.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -39,7 +39,7 @@
 <pre>
    public List findByWeight(double weight)
    {
-      return manager.createQuery("from Pet p where p.weight &lt; :weight").setParameter("weight", weight).getResultList();
+      return manager.createQuery("select p from Pet p where p.weight &lt; :weight").setParameter("weight", weight).getResultList();
    }
 </pre>
 </p><p>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/src/org/jboss/tutorial/singleinheritance/bean/PetDAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/src/org/jboss/tutorial/singleinheritance/bean/PetDAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/singleinheritance/src/org/jboss/tutorial/singleinheritance/bean/PetDAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -54,6 +54,6 @@
 
    public List findByWeight(double weight)
    {
-      return manager.createQuery("from Pet p where p.weight < :weight").setParameter("weight", weight).getResultList();
+      return manager.createQuery("select p from Pet p where p.weight < :weight").setParameter("weight", weight).getResultList();
    }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/build.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/build.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,93 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- ======================================================================= -->
-<!-- JBoss build file                                                       -->
-<!-- ======================================================================= -->
-
-<project name="JBoss" default="ejbjar" basedir=".">
-
-   <property file="../local.properties"/>  <property environment="env"/>
-   <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
-   <property name="build.dir" value="${basedir}/build"/>
-   <property name="build.classes.dir" value="${build.dir}/classes"/>
-
-   <!-- Build classpath -->
-   <path id="classpath">
-      <pathelement location="${basedir}"/>
-      <fileset dir="${jboss.home}/lib">
-         <include name="**/*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/lib">
-         <include name="**/*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer">
-         <include name="*.jar"/>
-      </fileset>
-      <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/jboss-aop-jdk50.deployer">
-         <include name="*.jar"/>
-      </fileset>
-      <pathelement location="${build.classes.dir}"/>
-      <!-- So that we can get jndi.properties for InitialContext -->
-   </path>
-
-   <property name="build.classpath" refid="classpath"/>
-
-   <!-- =================================================================== -->
-   <!-- Prepares the build directory                                        -->
-   <!-- =================================================================== -->
-   <target name="prepare">
-      <mkdir dir="${build.dir}"/>
-      <mkdir dir="${build.classes.dir}"/>
-   </target>
-
-   <!-- =================================================================== -->
-   <!-- Compiles the source code                                            -->
-   <!-- =================================================================== -->
-   <target name="compile" depends="prepare">
-      <javac srcdir="${src.dir}"
-         destdir="${build.classes.dir}"
-         debug="on"
-         deprecation="on"
-         optimize="off"
-         includes="**">
-         <classpath refid="classpath"/>
-      </javac>
-   </target>
-
-   <target name="ejbjar" depends="compile">
-      <jar jarfile="build/tutorial.jar">
-         <fileset dir="${build.classes.dir}">
-            <include name="**/*.class"/>
-         </fileset>
-         <fileset dir=".">
-            <include name="ssl-service.xml"/>
-            <include name="localhost.keystore"/>
-            <include name="*.properties"/>
-         </fileset>
-      </jar>
-      <copy file="build/tutorial.jar" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
-   </target>
-
-   <target name="run" depends="ejbjar">
-      <java classname="org.jboss.tutorial.ssl.client.Client" fork="yes" dir=".">
-         <jvmarg line="-Djavax.net.ssl.trustStore=./localhost.truststore -Djavax.net.ssl.trustStorePassword=opensource"/>
-         <classpath refid="classpath"/>
-      </java>
-   </target>
-
-   <!-- =================================================================== -->
-   <!-- Cleans up generated stuff                                           -->
-   <!-- =================================================================== -->
-   <target name="clean.db">
-      <delete dir="${jboss.home}/server/${jboss.server.config}/data/hypersonic"/>
-   </target>
-
-   <target name="clean">
-      <delete dir="${build.dir}"/>
-      <delete file="${jboss.home}/server/${jboss.server.config}/deploy/tutorial.jar"/>
-   </target>
-
-
-</project>
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/build.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/build.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/jndi.properties
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/jndi.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/jndi.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,3 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-java.naming.provider.url=localhost

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/jndi.properties (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/jndi.properties)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/localhost.keystore
===================================================================
(Binary files differ)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/localhost.keystore (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/localhost.keystore)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/localhost.truststore
===================================================================
(Binary files differ)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/localhost.truststore (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/localhost.truststore)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/log4j.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/log4j.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/log4j.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Log4j Configuration                                                  -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id$ -->
-
-<!--
-   | For more configuration infromation and examples see the Jakarta Log4j
-   | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-   
-<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-      <param name="Target" value="System.out"/>
-      <param name="Threshold" value="INFO"/>
-
-      <layout class="org.apache.log4j.PatternLayout">
-         <!-- The default pattern: Date Priority [Category] Messagen -->
-         <!--
-         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
-         -->
-         <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L)  -%m%n"/>
-      </layout>
-</appender>
-
-   <root>
-      <appender-ref ref="CONSOLE"/>
-   </root>
-
-</log4j:configuration>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/log4j.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/log4j.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/roles.properties
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/roles.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/roles.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1 +0,0 @@
-kabir=student

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/roles.properties (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/roles.properties)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/Calculator.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/Calculator.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/Calculator.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -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 org.jboss.tutorial.ssl.bean;
-
-import javax.ejb.Remote;
-
- at Remote
-public interface Calculator
-{
-   int add(int x, int y);
-
-   int subtract(int x, int y);
-
-   int divide(int x, int y);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/Calculator.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/Calculator.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/CalculatorBean.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/CalculatorBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/CalculatorBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,57 +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 org.jboss.tutorial.ssl.bean;
-
-import org.jboss.annotation.security.SecurityDomain;
-import org.jboss.annotation.ejb.RemoteBinding;
-
-import javax.ejb.Stateless;
-import javax.ejb.Remote;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.annotation.security.PermitAll;
-import javax.annotation.security.RolesAllowed;
-
- at Stateless
- at RemoteBinding(clientBindUrl="sslsocket://0.0.0.0:3843")
- at SecurityDomain("other")
-public class CalculatorBean implements Calculator
-{
-   @PermitAll
-   @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
-   public int add(int x, int y)
-   {
-      return x + y;
-   }
-
-   @RolesAllowed({"student"})
-   public int subtract(int x, int y)
-   {
-      return x - y;
-   }
-
-   @RolesAllowed({"teacher"})
-   public int divide(int x, int y)
-   {
-      return x / y;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/CalculatorBean.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/bean/CalculatorBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/Client.java
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/Client.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/Client.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,80 +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 org.jboss.tutorial.ssl.client;
-
-import org.jboss.tutorial.ssl.bean.Calculator;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.ejb.EJBAccessException;
-import java.util.Properties;
-
-/**
- * @version $Revision$
- */
-public class Client
-{
-   public static void main(String[] args) throws Exception
-   {
-      // Establish the proxy with an incorrect security identity
-      Properties env = new Properties();
-      env.setProperty(Context.SECURITY_PRINCIPAL, "kabir");
-      env.setProperty(Context.SECURITY_CREDENTIALS, "invalidpassword");
-      env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
-      InitialContext ctx = new InitialContext(env);
-      Calculator calculator = (Calculator) ctx.lookup("CalculatorBean/remote");
-
-      System.out.println("Kabir is a student.");
-      System.out.println("Kabir types in the wrong password");
-      try
-      {
-         System.out.println("1 + 1 = " + calculator.add(1, 1));
-      }
-      catch (EJBAccessException ex)
-      {
-         System.out.println("Saw expected SecurityException: " + ex.getMessage());
-      }
-
-      System.out.println("Kabir types in correct password.");
-      System.out.println("Kabir does unchecked addition.");
-
-      // Re-establish the proxy with the correct security identity
-      env.setProperty(Context.SECURITY_CREDENTIALS, "validpassword");
-      ctx = new InitialContext(env);
-      calculator = (Calculator) ctx.lookup("CalculatorBean/remote");
-
-      System.out.println("1 + 1 = " + calculator.add(1, 1));
-
-      System.out.println("Kabir is not a teacher so he cannot do division");
-      try
-      {
-         calculator.divide(16, 4);
-      }
-      catch (EJBAccessException  ex)
-      {
-         System.out.println(ex.getMessage());
-      }
-
-      System.out.println("Students are allowed to do subtraction");
-      System.out.println("1 - 1 = " + calculator.subtract(1, 1));
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/Client.java (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/src/org/jboss/tutorial/ssl/client/Client.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl-service.xml
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/ssl-service.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-   <!-- The server socket factory mbean to be used as attribute to socket invoker -->
-   <!-- which uses the JaasSecurityDomain -->
-   <mbean code="org.jboss.remoting.security.domain.DomainServerSocketFactoryService"
-      name="jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced"
-      display-name="SecurityDomain Server Socket Factory">
-       <attribute name="SecurityDomain">java:/jaas/SSLAdvanced</attribute>
-      <depends>jboss.security:service=JaasSecurityDomain,domain=SSLAdvanced</depends>
-   </mbean>
-   
-     <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
-         name="jboss.security:service=JaasSecurityDomain,domain=SSLAdvanced">
-     <!-- This must correlate with the java:/jaas/SSL above -->
-     <constructor>
-        <arg type="java.lang.String" value="SSLAdvanced"/>
-     </constructor>
-     <!-- The location of the keystore
-          resource: loads from the classloaders conf/ is the first classloader -->
-     <attribute name="KeyStoreURL">localhost.keystore</attribute>
-     <attribute name="KeyStorePass">opensource</attribute>
-  </mbean>
-
-   <!-- The Connector is the core component of the remoting server service. -->
-   <!-- It binds the remoting invoker (transport protocol, callback configuration, -->
-   <!-- data marshalling, etc.) with the invocation handlers.  -->
-   <mbean code="org.jboss.remoting.transport.Connector"
-          xmbean-dd="org/jboss/remoting/transport/Connector.xml"
-          name="jboss.remoting:type=Connector,transport=socket3843,handler=ejb3">
-          display-name="Socket transport Connector">
-
-      <attribute name="Configuration">
-         <config>
-             <invoker transport="sslsocket">
-               <attribute name="dataType" isParam="true">invocation</attribute>
-               <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
-               <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
-               <!-- The following is for setting the server socket factory.  If want ssl support -->
-               <!-- use a server socket factory that supports ssl.  The only requirement is that -->
-               <!-- the server socket factory value must be an ObjectName, meaning the -->
-               <!-- server socket factory implementation must be a MBean and also -->
-               <!-- MUST implement the org.jboss.remoting.security.ServerSocketFactoryMBean interface. -->
-               <attribute name="serverSocketFactory">jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced</attribute>
-               <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
-               <attribute name="serverBindPort">3843</attribute>
-            </invoker>
-            <handlers>
-            <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
-            </handlers>
-         </config>
-      </attribute>
-      <depends>jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced</depends>
-      <depends>jboss.aop:service=AspectDeployer</depends>
-   </mbean>
-
-</server>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl-service.xml (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/ssl-service.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.html
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/ssl.html	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,12 +0,0 @@
-<html>
-<body>
-<p>
-<h2> Invoking EJBs through SSL</h2>
-
-</p><p>
-If you build the tutorial, an ejb jar is created with ssl-service.xml and the local.keystore file.  The ssl-service.xml sets up a JAAS security manager to manage the SSL keystore.  This is documented pretty well in the JBoss 4.x manual.  ssl-service.xml also defines a JBoss Remoting connector.  The CalculatorBean EJB, uses the @RemoteBinding annotation to bind the SSL connector to the EJB.  The client has define the truststore used be the client.
-</p><p>
-<i>TODO:  better explanation here!</i>
-</p>
-</body>
-</html>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.html (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/ssl.html)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.wiki
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/ssl.wiki	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.wiki	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,5 +0,0 @@
-!!! Invoking EJBs through SSL
-
-If you build the tutorial, an ejb jar is created with ssl-service.xml and the local.keystore file.  The ssl-service.xml sets up a JAAS security manager to manage the SSL keystore.  This is documented pretty well in the JBoss 4.x manual.  ssl-service.xml also defines a JBoss Remoting connector.  The CalculatorBean EJB, uses the @RemoteBinding annotation to bind the SSL connector to the EJB.  The client has define the truststore used be the client.
-
-''TODO:  better explanation here!''

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/ssl.wiki (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/ssl.wiki)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/users.properties
===================================================================
--- branches/Branch_4_0/ejb3/docs/tutorial/ssl/users.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/users.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,2 +0,0 @@
-kabir=validpassword
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/ssl/users.properties (from rev 56789, branches/Branch_4_0/ejb3/docs/tutorial/ssl/users.properties)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateful/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateful/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateful/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateful_deployment_descriptor/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateful_deployment_descriptor/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateful_deployment_descriptor/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateless/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateless/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateless/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateless_deployment_descriptor/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateless_deployment_descriptor/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/stateless_deployment_descriptor/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/src/org/jboss/tutorial/tableperinheritance/bean/PetDAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/src/org/jboss/tutorial/tableperinheritance/bean/PetDAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/src/org/jboss/tutorial/tableperinheritance/bean/PetDAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -55,6 +55,6 @@
 
    public List findByWeight(double weight)
    {
-      return manager.createQuery("from Pet p where p.weight < :weight").setParameter("weight", weight).getResultList();
+      return manager.createQuery("select p from Pet p where p.weight < :weight").setParameter("weight", weight).getResultList();
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/table.html
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/table.html	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/tableperinheritance/table.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -35,7 +35,7 @@
 <pre>
    public List findByWeight(double weight)
    {
-      return manager.createQuery("from Pet p where p.weight &lt; :weight").setParameter("weight", weight).getResultList();
+      return manager.createQuery("select p from Pet p where p.weight &lt; :weight").setParameter("weight", weight).getResultList();
    }
 </pre>
 </p><p>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/timer/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/timer/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/timer/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/webservice/build.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/webservice/build.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/docs/tutorial/webservice/build.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -6,9 +6,9 @@
 
 <project name="JBoss" default="ejbjar" basedir=".">
 
-   <property environment="env"/>
+   <property file="../local.properties"/>  <property environment="env"/>
    <property name="src.dir" value="${basedir}/src"/>
-   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="all"/>
+   <property name="jboss.home" value="${env.JBOSS_HOME}"/>   <property name="jboss.server.config" value="default"/>
    <property name="build.dir" value="${basedir}/build"/>
    <property name="build.classes.dir" value="${build.dir}/classes"/>
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/DefaultActivationSpecsImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/annotation/ejb/DefaultActivationSpecsImpl.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/IIOP.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/annotation/ejb/IIOP.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/PoolClassImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/annotation/ejb/PoolClassImpl.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/RemoteBinding.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/RemoteBinding.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/RemoteBinding.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -43,7 +43,7 @@
 
    String interceptorStack() default "";
 
-   String clientBindUrl() default "socket://0.0.0.0:3873";
+   String clientBindUrl() default "";
 
    Class factory() default org.jboss.ejb3.remoting.RemoteProxyFactory.class;
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/RemoteBindingImpl.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/RemoteBindingImpl.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/RemoteBindingImpl.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -46,7 +46,7 @@
    {
       jndi = "";
       stack = "";
-      bindUrl = "socket://0.0.0.0:3873";
+      bindUrl = "";
       proxyFactory = org.jboss.ejb3.remoting.RemoteProxyFactory.class;
    }
 
@@ -73,6 +73,11 @@
       this.jndi = jndi;
    }
    
+   public void setBindUrl(String bindUrl)
+   {
+      this.bindUrl = bindUrl;
+   }
+   
    public String jndiBinding()
    {
       return jndi;
@@ -113,4 +118,16 @@
    {
       return null;
    }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[RemoteBindingImpl:");
+      sb.append(", jndi=" + jndi);
+      sb.append(", stack=" + stack);
+      sb.append(", bindUrl=" + bindUrl);
+      sb.append(", proxyFactory=" + proxyFactory);
+      sb.append(']');
+      return sb.toString();
+   }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/SerializedConcurrentAccessImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/annotation/ejb/SerializedConcurrentAccessImpl.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/cache/simple/CacheConfigImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/annotation/ejb/cache/simple/CacheConfigImpl.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/cache/simple/PersistenceManagerImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/annotation/ejb/cache/simple/PersistenceManagerImpl.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/ejb/cache/tree/CacheConfigImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/annotation/ejb/cache/tree/CacheConfigImpl.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/security/SecurityDomainImpl.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/security/SecurityDomainImpl.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/annotation/security/SecurityDomainImpl.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -32,7 +32,7 @@
 public class SecurityDomainImpl implements SecurityDomain
 {
    private String value;
-   private String unauthenticatedPrincipal;
+   private String unauthenticatedPrincipal = null;
   
    public SecurityDomainImpl(String value)
    {
@@ -58,4 +58,14 @@
    {
       return org.jboss.annotation.security.SecurityDomain.class;
    }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("SecurityDomainImpl[");
+      sb.append("value=").append(value);
+      sb.append(", unauthenticatedPrincipal=").append(unauthenticatedPrincipal);
+      sb.append("]");
+      return sb.toString();
+   }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb/DeclareRolesImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb/DeclareRolesImpl.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb/ResourceImpl.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb/ResourceImpl.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb/ResourceImpl.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,6 @@
   */
 package org.jboss.ejb;
 
-import javax.annotation.AuthenticationType;
 
 /**
  * // *

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/AbstractPool.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/AbstractPool.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/AbstractPool.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
 */
 package org.jboss.ejb3;
 
-import org.jboss.ejb3.injection.Injector;
+import org.jboss.injection.Injector;
 import org.jboss.ejb3.stateful.StatefulBeanContext;
 import org.jboss.logging.Logger;
 import org.jboss.util.id.GUID;
@@ -53,6 +53,10 @@
       this.container = container;
    }
 
+   public void setMaxSize(int maxSize)
+   {
+   }
+
    protected BeanContext create()
    {
       Object bean;
@@ -166,7 +170,6 @@
 
    public void remove(BeanContext ctx)
    {
-      Object bean = ctx.getInstance();
       container.invokePreDestroy(ctx);
       ctx.remove();
    }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/BaseContext.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/BaseContext.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/BaseContext.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -102,7 +102,6 @@
       {
          HashMap<Class,InterceptorInjector> interceptorInjectors = ((EJBContainer)container).getInterceptorInjectors();
          interceptorInstances = new HashMap<Class, Object>();
-
          for (InterceptorInfo info : interceptors)
          {
             try

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/BaseSessionContext.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/BaseSessionContext.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/BaseSessionContext.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -172,10 +172,17 @@
    public Principal getCallerPrincipal()
    {
       Principal principal = SecurityAssociation.getCallerPrincipal();
+      log.info("BaseSessionContext.getCallerPrincipal() : " + principal);
+      if (principal != null) log.info("   " + principal.getName());
       if (getRm() != null)
       {
+         log.info("RM is not null");
          principal = getRm().getPrincipal(principal);
       }
+      else
+      {
+         log.info("RM is NULL");
+      }
 
       // This method never returns null.
       if (principal == null)
@@ -320,9 +327,9 @@
       return ((EJBContainer)container).getBusinessObject(baseContext, businessInterface); 
    }
    
-   public Object getInvokedBusinessInterface() throws IllegalStateException
+   public Class getInvokedBusinessInterface() throws IllegalStateException
    {
-      return ((EJBContainer)container).getInvokedBusinessInterface(baseContext);
+      return ((SessionContainer)container).getInvokedBusinessInterface();
    }
 
    public MessageContext getMessageContext() throws IllegalStateException

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ClientKernelAbstraction.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/ClientKernelAbstraction.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Container.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Container.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Container.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -45,6 +45,11 @@
 
    TimerService getTimerService();
 
+   /**
+    * This method is called by EJBTimerServiceImpl to re-establish a persistent timer.
+    */
+   TimerService getTimerService(Object pKey);
+
    Pool getPool();
 
    Object construct();
@@ -75,8 +80,6 @@
 
    Context getEnc();
 
-   void addEncLinkRefEntry(String name, String mappedName);
-
    void processMetadata(DependencyPolicy dependencyPolicy);
 
    DependencyPolicy getDependencyPolicy();

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/EJB3Deployer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/EJB3Deployer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/EJB3Deployer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -391,7 +391,7 @@
       {
          if (e instanceof DeploymentException)
          {
-            throw (DeploymentException)e;
+            throw (DeploymentException) e;
          }
          throw new DeploymentException( "failed to initialize", e );
       }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/EJBContainer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/EJBContainer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/EJBContainer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,21 +23,36 @@
 
 import org.jboss.annotation.ejb.PoolClass;
 import org.jboss.aop.AspectManager;
+import org.jboss.aop.ClassAdvisor;
 import org.jboss.aop.ClassContainer;
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.aop.annotation.AnnotationElement;
 import org.jboss.aop.joinpoint.ConstructorInvocation;
-import org.jboss.ejb3.dd.AssemblyDescriptor;
-import org.jboss.ejb3.dd.EnterpriseBean;
-import org.jboss.ejb3.dd.PersistenceContextRef;
-import org.jboss.ejb3.injection.*;
+import org.jboss.aop.util.MethodHashing;
+import org.jboss.ejb3.entity.PersistenceUnitDeployment;
 import org.jboss.ejb3.interceptor.InterceptorInfo;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
 import org.jboss.ejb3.interceptor.InterceptorInjector;
 import org.jboss.ejb3.interceptor.LifecycleInterceptorHandler;
+import org.jboss.ejb3.metamodel.AssemblyDescriptor;
+import org.jboss.ejb3.metamodel.EnterpriseBean;
 import org.jboss.ejb3.security.JaccHelper;
 import org.jboss.ejb3.tx.UserTransactionImpl;
+import org.jboss.injection.DependsHandler;
+import org.jboss.injection.EJBHandler;
+import org.jboss.injection.EncInjector;
+import org.jboss.injection.InjectionContainer;
+import org.jboss.injection.InjectionHandler;
+import org.jboss.injection.InjectionUtil;
+import org.jboss.injection.Injector;
+import org.jboss.injection.JndiInjectHandler;
+import org.jboss.injection.PersistenceContextHandler;
+import org.jboss.injection.PersistenceUnitHandler;
+import org.jboss.injection.ResourceHandler;
+import org.jboss.injection.WebServiceHandler;
 import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.PersistenceContextRef;
+import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
 import org.jboss.naming.Util;
 
 import javax.annotation.PostConstruct;
@@ -50,11 +65,23 @@
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.LinkRef;
+import javax.naming.NameNotFoundException;
 import javax.naming.NamingException;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.lang.reflect.*;
-import java.util.*;
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Comment
@@ -62,7 +89,7 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public abstract class EJBContainer extends ClassContainer implements Container
+public abstract class EJBContainer extends ClassContainer implements Container, InjectionContainer
 {
 
    private static final Logger log = Logger.getLogger(EJBContainer.class);
@@ -79,7 +106,8 @@
 
    protected ClassLoader classloader;
 
-   protected Injector[] injectors;
+   // for performance there is an array.
+   protected List<Injector> injectors = new ArrayList<Injector>();
 
    protected Context enc;
    protected Context encEnv;
@@ -91,18 +119,12 @@
 
    protected Hashtable initialContextProperties;
 
-   protected HashMap envEntries = new HashMap();
+   protected Map<String, EncInjector> encInjectors = new HashMap<String, EncInjector>();
 
-   protected HashMap<String, String> encLinkRefEntries = new HashMap<String, String>();
-
-   protected HashMap<String, String> ejbRefDependencies = new HashMap<String, String>();
-   protected HashMap<String, String> puEncXmlEntries = new HashMap<String, String>();
-   protected HashMap<String, PersistenceContextRef> pcEncXmlEntries = new HashMap<String, PersistenceContextRef>();
-
    protected EnterpriseBean xml;
    protected AssemblyDescriptor assembly;
 
-   protected HashMap<AccessibleObject, Injector> encInjections = new HashMap<AccessibleObject, Injector>();
+   protected Map<String, Map<AccessibleObject, Injector>> encInjections = new HashMap<String, Map<AccessibleObject, Injector>>();
 
    protected InterceptorInfoRepository interceptorRepository;
 
@@ -110,23 +132,21 @@
 
    protected LinkedHashSet<InterceptorInfo> applicableInterceptors;
 
-   private HashMap<Class, InterceptorInjector> interceptorInjectors;
+   private HashMap<Class, InterceptorInjector> interceptorInjectors = new HashMap<Class, InterceptorInjector>();
 
    private Ejb3Deployment deployment;
 
    private DependencyPolicy dependencyPolicy;
 
    private String jaccContextId;
-   protected HashMap extendedPCs = new HashMap();
-   
+
    protected HashMap invokedMethod = new HashMap();
 
 
    /**
-    *
-    * @param name Advisor name
-    * @param manager Domain to get interceptor bindings from
-    * @param cl the EJB's classloader
+    * @param name                  Advisor name
+    * @param manager               Domain to get interceptor bindings from
+    * @param cl                    the EJB's classloader
     * @param beanClassName
     * @param ejbName
     * @param ctxProperties
@@ -139,7 +159,6 @@
                        InterceptorInfoRepository interceptorRepository, Ejb3Deployment deployment)
    {
       super(name, manager);
-      this.xml = xml;
       this.deployment = deployment;
       this.beanClassName = beanClassName;
       this.classloader = cl;
@@ -176,21 +195,17 @@
       this.interceptorRepository = interceptorRepository;
       this.interceptorRepository.addBeanClass(clazz.getName());
    }
-
-   public HashMap<String, String> getEjbRefDependencies()
+   
+   public EnvironmentRefGroup getEnvironmentRefGroup()
    {
-      return ejbRefDependencies;
+      return xml;
    }
 
-   public HashMap<String, String> getPuEncXmlEntries()
+   public List<Injector> getInjectors()
    {
-      return puEncXmlEntries;
+      return injectors;
    }
 
-   public HashMap<String, PersistenceContextRef> getPcEncXmlEntries()
-   {
-      return pcEncXmlEntries;
-   }
 
    public String getJaccContextId()
    {
@@ -225,7 +240,7 @@
    /**
     * introspects EJB container to find all dependencies
     * and initialize any extra metadata.
-    *
+    * <p/>
     * This must be called before container is registered with any microcontainer
     *
     * @param dependencyPolicy
@@ -233,24 +248,46 @@
    public void processMetadata(DependencyPolicy dependencyPolicy)
    {
       this.dependencyPolicy = dependencyPolicy;
-      PersistenceContextHandler.loadDependencies(xml, this, clazz, true);
-      PersistenceUnitHandler.loadDependencies(xml, this, clazz, true);
-      if (xml != null)
+      // XML must be done first so that any annotation overrides are initialized
+
+      // todo injection handlers should be pluggable from XML
+      Collection<InjectionHandler> handlers = new ArrayList<InjectionHandler>();
+      handlers.add(new EJBHandler());
+      handlers.add(new DependsHandler());
+      handlers.add(new JndiInjectHandler());
+      handlers.add(new PersistenceContextHandler());
+      handlers.add(new PersistenceUnitHandler());
+      handlers.add(new ResourceHandler());
+      handlers.add(new WebServiceHandler());
+
+      ClassLoader old = Thread.currentThread().getContextClassLoader();
+      Thread.currentThread().setContextClassLoader(classloader);
+      try
       {
-         for (String depends : xml.getDependencies())
+         // EJB container's XML must be processed before interceptor's as it may override interceptor's references
+         for (InjectionHandler handler : handlers) handler.loadXml(xml, this);
+
+         Map<AccessibleObject, Injector> tmp = InjectionUtil.processAnnotations(this, handlers, getBeanClass());
+         injectors.addAll(tmp.values());
+
+         initialiseInterceptors();
+         for (InterceptorInfo interceptorInfo : applicableInterceptors)
          {
-            dependencyPolicy.addDependency(depends);
+            for (InjectionHandler handler : handlers)
+            {
+               handler.loadXml(interceptorInfo.getXml(), this);
+            }
          }
+         for (InterceptorInfo interceptorInfo : applicableInterceptors)
+         {
+            Map<AccessibleObject, Injector> tmpInterceptor = InjectionUtil.processAnnotations(this, handlers, interceptorInfo.getClazz());
+            InterceptorInjector injector = new InterceptorInjector(this, interceptorInfo, tmpInterceptor);
+            interceptorInjectors.put(interceptorInfo.getClazz(), injector);
+         }
       }
-      DependsHandler.loadDependencies(this, clazz);
-      EJBHandler.loadDependencies(xml, this, clazz, true);
-      initialiseInterceptors();
-      for (InterceptorInfo interceptorInfo : applicableInterceptors)
+      finally
       {
-         PersistenceContextHandler.loadDependencies(interceptorInfo.getXml(), this, interceptorInfo.getClazz(), false);
-         PersistenceUnitHandler.loadDependencies(interceptorInfo.getXml(), this, interceptorInfo.getClazz(), false);
-         DependsHandler.loadDependencies(this, interceptorInfo.getClazz());
-         EJBHandler.loadDependencies(interceptorInfo.getXml(), this, interceptorInfo.getClazz(), true);
+         Thread.currentThread().setContextClassLoader(old);
       }
    }
 
@@ -297,26 +334,17 @@
       return interceptorInjectors;
    }
 
-   public ClassLoader getClassloader()
-   {
-      return classloader;
-   }
 
-   public HashMap<String, String> getEncLinkRefEntries()
+   public Map<String, EncInjector> getEncInjectors()
    {
-      return encLinkRefEntries;
+      return encInjectors;
    }
 
-   public void addEncLinkRefEntry(String name, String mappedName)
+   public ClassLoader getClassloader()
    {
-      encLinkRefEntries.put(name, mappedName);
+      return classloader;
    }
 
-   public void addEncInjector(AccessibleObject acc, Injector inj)
-   {
-      encInjections.put(acc, inj);
-   }
-
    public InitialContext getInitialContext()
    {
       try
@@ -332,26 +360,11 @@
       }
    }
 
-   public HashMap<AccessibleObject, Injector> getEncInjections()
+   public Map<String, Map<AccessibleObject, Injector>> getEncInjections()
    {
       return encInjections;
    }
 
-   public boolean hasEnvEntry(String name)
-   {
-      return envEntries.containsKey(name);
-   }
-
-   public void addEnvEntry(String name, String type, String value) throws ClassNotFoundException
-   {
-         envEntries.put(name, getEnvEntryValue(name, type, value));
-   }
-
-   public boolean hasEncEntry(String name)
-   {
-      return encLinkRefEntries.containsKey(name);
-   }
-
    public Context getEnc()
    {
       return enc;
@@ -362,63 +375,6 @@
       return enc;
    }
 
-   protected Object getEnvEntryValue(String name, String entryType, String value) throws ClassNotFoundException
-   {
-      Class type = this.classloader.loadClass(entryType);
-      if (type == String.class)
-      {
-         return value;
-      }
-      else if (type == Integer.class)
-      {
-         return new Integer(value);
-      }
-      else if (type == Long.class)
-      {
-         return new Long(value);
-      }
-      else if (type == Double.class)
-      {
-         return new Double(value);
-      }
-      else if (type == Float.class)
-      {
-         return new Float(value);
-      }
-      else if (type == Byte.class)
-      {
-         return new Byte(value);
-      }
-      else if (type == Character.class)
-      {
-         String input = value;
-         if (input == null || input.length() == 0)
-         {
-            return new Character((char) 0);
-         }
-         else
-         {
-            if (input.length() > 1)
-               // TODO: Add deployment context
-               log.warn("Warning character env-entry is too long: binding="
-                        + name + " value=" + input);
-            return new Character(input.charAt(0));
-         }
-      }
-      else if (type == Short.class)
-      {
-         return new Short(value);
-      }
-      else if (type == Boolean.class)
-      {
-         return new Boolean(value);
-      }
-      else
-      {
-         return value;
-      }
-   }
-
    public Hashtable getInitialContextProperties()
    {
       return initialContextProperties;
@@ -503,33 +459,22 @@
             break;
          }
       }
-      createEnvEntries();
       initializePool();
-      resolveInterceptorInjectors();
 
-      // add extendedPC injectors to be first in list
-      ArrayList injectors2 = new ArrayList();
-      injectors2.addAll(extendedPCs.values());
-      if (injectors != null) injectors2.addAll(Arrays.asList(injectors));
-      injectors = (Injector[])injectors2.toArray(new Injector[injectors2.size()]);
-      if (pool != null) pool.setInjectors(injectors);
+      for (EncInjector injector : encInjectors.values())
+      {
+         injector.inject(this);   
+      }
 
+      // creating of injector array should come after injection into ENC as an ENC injector
+      // may add additional injectors into the injector list.  An example is an extended persistence
+      // context which mush be created and added to the SFSB bean context.
+
+      Injector[] injectors2 = injectors.toArray(new Injector[injectors.size()]);
+      if (pool != null) pool.setInjectors(injectors2);
+
       createCallbackHandler();
 
-      for (String encName : encLinkRefEntries.keySet())
-      {
-         String mappedName = encLinkRefEntries.get(encName);
-         try
-         {
-            Util.bind(enc, encName, new LinkRef(mappedName));
-            log.debug("binding enc: " + encName + " to " + mappedName);
-         } catch (NamingException e)
-         {
-            NamingException namingException = new NamingException("Could not bind EJB container with ejb name " + ejbName + " into JNDI under jndiName: " + enc.getNameInNamespace() + "/" + encName);
-            namingException.setRootCause(e);
-            throw namingException;
-         }
-      }
       JaccHelper.configureContainer(jaccContextId, this);
       log.info("STARTED EJB: " + clazz.getName() + " ejbName: " + ejbName);
    }
@@ -542,28 +487,6 @@
    {
    }
 
-   protected void createEnvEntries() throws NamingException
-   {
-      Iterator names = envEntries.keySet().iterator();
-      while (names.hasNext())
-      {
-         String name = (String) names.next();
-         Object value = envEntries.get(name);
-              
-         try 
-         {
-            Util.bind(encEnv,
-                      name,
-                      value);
-         } catch (NamingException e)
-         {
-            NamingException namingException = new NamingException("Could not bind env entry for ejb name " + ejbName + " into JNDI under jndiName: " + encEnv.getNameInNamespace() + "/" + name);
-            namingException.setRootCause(e);
-            throw namingException;
-         }
-      }
-   }
-
    public void initializePool() throws Exception
    {
       PoolClass poolClass = (PoolClass) resolveAnnotation(PoolClass.class);
@@ -574,7 +497,7 @@
       pool.initialize(this, beanContextClass, clazz, maxSize, timeout);
 
       resolveInjectors();
-      pool.setInjectors(injectors);
+      pool.setInjectors(injectors.toArray(new Injector[injectors.size()]));
    }
 
    public void invokePostConstruct(BeanContext beanContext)
@@ -612,11 +535,6 @@
 
    public static final String ENTITY_MANAGER_FACTORY = "EntityManagerFactory";
 
-   public HashMap getExtendedPCs()
-   {
-      return extendedPCs;
-   }
-
    protected void resolveInjectors() throws Exception
    {
       ThreadLocalENCFactory.push(enc);
@@ -625,24 +543,14 @@
          Thread.currentThread().setContextClassLoader(classloader);
          try
          {
-            Util.bind(enc, "UserTransaction", new UserTransactionImpl());
-         } catch (NamingException e)
+            Util.rebind(enc, "UserTransaction", new UserTransactionImpl());
+         }
+         catch (NamingException e)
          {
             NamingException namingException = new NamingException("Could not bind user transaction for ejb name " + ejbName + " into JNDI under jndiName: " + enc.getNameInNamespace() + "/" + "UserTransaction");
             namingException.setRootCause(e);
             throw namingException;
          }
-
-         List list = new ArrayList();
-         PersistenceContextHandler.loadInjectors(this);
-         PersistenceUnitHandler.loadInjectors(this);
-         list.addAll(JndiInjectHandler.loadInjectors(this));
-         ResourceHandler.loadInjectors(this);
-         WebServiceHandler.loadInjectors(this);
-         EJBHandler.loadInjectors(this);
-         list.addAll(DependsHandler.loadInjectors(this));
-         list.addAll(encInjections.values());
-         injectors = (Injector[]) list.toArray(new Injector[list.size()]);
       }
       finally
       {
@@ -650,39 +558,17 @@
       }
    }
 
-   protected void resolveInterceptorInjectors() throws Exception
-   {
-      ThreadLocalENCFactory.push(enc);
-      try
-      {
-         Thread.currentThread().setContextClassLoader(classloader);
-         if (applicableInterceptors != null && applicableInterceptors.size() > 0)
-         {
-            interceptorInjectors = new HashMap<Class, InterceptorInjector>();
-            for (InterceptorInfo interceptorInfo : applicableInterceptors)
-            {
-               InterceptorInjector injector = new InterceptorInjector(this, interceptorInfo);
-               interceptorInjectors.put(interceptorInfo.getClazz(), injector);
-            }
-         }
-      }
-      finally
-      {
-         ThreadLocalENCFactory.pop();
-      }
-   }
-
    protected void createCallbackHandler()
    {
       try
       {
          callbackHandler = new LifecycleInterceptorHandler(this,
-                                                           getHandledCallbacks());
+                 getHandledCallbacks());
       }
       catch (Exception e)
       {
          throw new RuntimeException("Error creating callback handler for bean "
-                                    + beanClassName, e);
+                 + beanClassName, e);
       }
    }
 
@@ -720,12 +606,12 @@
          log.debug("All applicable interceptor classes: " + applicableInterceptors);
       }
    }
-   
+
    public Object getBusinessObject(BeanContext beanContext, Class businessObject) throws IllegalStateException
    {
       throw new IllegalStateException("Not implemented");
    }
-   
+
    public Object getInvokedBusinessInterface(BeanContext beanContext) throws IllegalStateException
    {
       throw new IllegalStateException("Not implemented");
@@ -733,11 +619,11 @@
 
    protected Object getInvokedInterface(Method method)
    {
-      Remote remoteAnnotation = (Remote)resolveAnnotation(Remote.class);
+      Remote remoteAnnotation = (Remote) resolveAnnotation(Remote.class);
       if (remoteAnnotation != null)
       {
          Class[] remotes = remoteAnnotation.value();
-         for (int i = 0 ; i < remotes.length ; ++i)
+         for (int i = 0; i < remotes.length; ++i)
          {
             try
             {
@@ -745,25 +631,26 @@
                return remotes[i];
             }
             catch (NoSuchMethodException e)
-            {}
+            {
+            }
          }
       }
-      
-      Local localAnnotation = (Local)resolveAnnotation(Local.class);
+
+      Local localAnnotation = (Local) resolveAnnotation(Local.class);
       if (localAnnotation != null)
       {
          Class[] locals = localAnnotation.value();
-         for (int i = 0 ; i < locals.length ; ++i)
+         for (int i = 0; i < locals.length; ++i)
          {
             Method[] interfaceMethods = locals[i].getMethods();
-            for ( int j = 0 ; j < interfaceMethods.length ; ++j)
+            for (int j = 0; j < interfaceMethods.length; ++j)
             {
                if (interfaceMethods[j].equals(method))
                   return locals[i];
             }
          }
       }
-      
+
       return null;
    }
 
@@ -774,7 +661,7 @@
       {
          Class ann = classloader.loadClass(annotation);
          if (!ann.isAnnotation()) return null;
-         Retention retention = (Retention)ann.getAnnotation(Retention.class);
+         Retention retention = (Retention) ann.getAnnotation(Retention.class);
          if (retention != null && retention.value() == RetentionPolicy.RUNTIME) return ann;
 
       }
@@ -806,7 +693,6 @@
    @Override
    public boolean hasAnnotation(Method m, String annotation)
    {
-
       if (annotations.hasAnnotation(m, annotation)) return true;
       try
       {
@@ -854,4 +740,128 @@
          throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
       }
    }
+
+   public Container resolveEjbContainer(String link, Class businessIntf)
+   {
+      return deployment.getEjbContainer(link, businessIntf);
+   }
+
+   public Container resolveEjbContainer(Class businessIntf) throws NameNotFoundException
+   {
+      return deployment.getEjbContainer(businessIntf);
+   }
+
+   public <T> T getAnnotation(Class<T> annotationType, Class clazz)
+   {
+      if (clazz == this.getBeanClass())
+      {
+         return (T) resolveAnnotation(annotationType);
+      }
+      return (T) clazz.getAnnotation(annotationType);
+   }
+
+   public <T> T getAnnotation(Class<T> annotationType, Class clazz, Method method)
+   {
+      if (clazz == this.getBeanClass())
+      {
+         return (T) resolveAnnotation(method, annotationType);
+      }
+      Class aclass = annotationType;
+      return (T) method.getAnnotation(aclass);
+   }
+   
+   public <T> T getAnnotation(Class<T> annotationType, Method method)
+   {
+      return (T) resolveAnnotation(method, annotationType);
+   }
+
+   public <T> T getAnnotation(Class<T> annotationType, Class clazz, Field field)
+   {
+      if (clazz == this.getBeanClass())
+      {
+         return (T) resolveAnnotation(field, annotationType);
+      }
+      Class aclass = annotationType;
+      return (T) field.getAnnotation(aclass);
+   }
+   
+   public <T> T getAnnotation(Class<T> annotationType, Field field)
+   {
+      return (T) resolveAnnotation(field, annotationType);
+   }
+   
+   public Object resolveAnnotation(Method m, Class annotation)
+   {
+      Object value = super.resolveAnnotation(m, annotation);
+      if (value == null && m.isBridge()) value = getBridgedAnnotation(m, annotation);
+      return value;
+   }
+   
+   protected Object getBridgedAnnotation(Method bridgeMethod, Class annotation)
+   {
+      Method[] methods = bridgeMethod.getDeclaringClass().getMethods();
+      int i = 0;
+      boolean found = false;
+      Class[] bridgeParams = bridgeMethod.getParameterTypes();
+      while (i < methods.length && !found)
+      {
+         if (!methods[i].isBridge() && methods[i].getName().equals(bridgeMethod.getName()))
+         {
+            Class[] params = methods[i].getParameterTypes();
+            if (params.length == bridgeParams.length)
+            {
+               int j = 0;
+               boolean matches = true;
+               while (j < params.length && matches)
+               {
+                  if (!bridgeParams[j].isAssignableFrom(params[j]))
+                     matches = false;
+                  ++j;
+               }
+               
+               if (matches)
+                  return resolveAnnotation(methods[i], annotation);
+            }
+         }
+         ++i;
+      }
+ 
+      return null;
+   }
+   
+   public Object resolveAnnotation(Method m, Class[] annotationChoices)
+   {
+      Object value = null;
+      int i = 0;
+      while (value == null && i < annotationChoices.length){
+         value = resolveAnnotation(m, annotationChoices[i++]);
+      }
+      
+      return value;
+   }
+
+   public String getIdentifier()
+   {
+      return getEjbName();
+   }
+
+   public String getDeploymentDescriptorType()
+   {
+      return "ejb-jar.xml";
+   }
+
+   public PersistenceUnitDeployment getPersistenceUnitDeployment(String unitName) throws NameNotFoundException
+   {
+      return deployment.getPersistenceUnitDeployment(unitName);
+   }
+
+   public String getEjbJndiName(Class businessInterface) throws NameNotFoundException
+   {
+      return deployment.getEjbJndiName(businessInterface);
+   }
+
+   public String getEjbJndiName(String link, Class businessInterface)
+   {
+      return deployment.getEjbJndiName(link, businessInterface);
+   }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3AnnotationHandler.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3AnnotationHandler.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3AnnotationHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -28,7 +28,8 @@
 import org.jboss.annotation.ejb.ResourceAdapter;
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.DomainDefinition;
-import org.jboss.ejb3.dd.EnterpriseBean;
+import org.jboss.ejb3.metamodel.EnterpriseBean;
+import org.jboss.ejb3.metamodel.MessageDrivenBean;
 import org.jboss.ejb3.mdb.ConsumerContainer;
 import org.jboss.ejb3.mdb.MDB;
 import org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory;
@@ -55,8 +56,6 @@
       STATELESS, STATEFUL, MESSAGE_DRIVEN, ENTITY, SERVICE, CONSUMER
    }
 
-   ;
-
    protected DeploymentUnit di;
 
    protected ClassFile cf;
@@ -70,7 +69,6 @@
    protected String defaultSLSBDomain;
    protected String defaultSFSBDomain;
    protected String defaultMDBDomain;
-   protected String defaultMessagingInflowDrivenBeanDomain;
    protected String defaultServiceDomain;
    protected String defaultConsumerDomain;
    protected Ejb3Deployment deployment;
@@ -87,7 +85,6 @@
       defaultMDBDomain = deployment.getDefaultMDBDomain();
       defaultServiceDomain = deployment.getDefaultServiceDomain();
       defaultConsumerDomain = deployment.getDefaultConsumerDomain();
-      defaultMessagingInflowDrivenBeanDomain = deployment.getDefaultMessageInflowDrivenBeanDomain();
    }
 
    public void setCtxProperties(Hashtable ctxProperties)
@@ -132,14 +129,12 @@
          {
             StatelessContainer container = getStatelessContainer(ejbIndex);
             container.setJaccContextId(getJaccContextId());
-            container.setDefaultClientBinding(deployment.getDefaultClientBinding());
             containers.add(container);
          }
          else if (ejbType == EJB_TYPE.STATEFUL)
          {
             StatefulContainer container = getStatefulContainer(ejbIndex);
             container.setJaccContextId(getJaccContextId());
-            container.setDefaultClientBinding(deployment.getDefaultClientBinding());
             containers.add(container);
          }
          else if (ejbType == EJB_TYPE.MESSAGE_DRIVEN)
@@ -234,11 +229,7 @@
 
    protected String getMDBDomainName(int ejbIndex)
    {
-      String domainName = defaultMDBDomain;
-      if (ejbClass.isAnnotationPresent(ResourceAdapter.class))
-         domainName = defaultMessagingInflowDrivenBeanDomain;
-
-      return domainName;
+      return defaultMDBDomain;
    }
 
    protected void createProxyFactories()
@@ -254,7 +245,7 @@
    protected MDB getMDB(int ejbIndex, EnterpriseBean xml) throws Exception
    {
       String domainName = getMDBDomainName(ejbIndex);
-
+      
       String containerName = getAspectDomain(ejbIndex, domainName);
       DomainDefinition domain = AspectManager.instance().getContainer(containerName);
 
@@ -264,12 +255,6 @@
 
       MDB container = new MDB(ejbNames.get(ejbIndex), (AspectManager) domain.getManager(), di.getClassLoader(), cf.getName(),
               ctxProperties, di.getInterceptorInfoRepository(), deployment);
-      if (domainName.equals(defaultMessagingInflowDrivenBeanDomain))
-      {
-         JBossMessageEndpointFactory factory = new JBossMessageEndpointFactory();
-         factory.setContainer(container);
-         container.setMessageEndpointFactory(factory);
-      }
 
       return container;
    }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,15 +22,15 @@
 package org.jboss.ejb3;
 
 import javassist.bytecode.ClassFile;
+import org.hibernate.cfg.EJB3DTDEntityResolver;
 import org.hibernate.ejb.packaging.PersistenceMetadata;
 import org.hibernate.ejb.packaging.PersistenceXmlLoader;
-import org.hibernate.cfg.EJB3DTDEntityResolver;
+import org.jboss.ejb3.enc.EjbModuleEjbResolver;
+import org.jboss.ejb3.enc.EjbModulePersistenceUnitResolver;
 import org.jboss.ejb3.entity.PersistenceUnitDeployment;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
 import org.jboss.logging.Logger;
 import org.jboss.util.file.ArchiveBrowser;
 import org.jboss.util.file.ClassFileFilter;
-import org.jboss.util.xml.JBossEntityResolver;
 
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
@@ -43,7 +43,11 @@
 import java.io.DataInputStream;
 import java.io.InputStream;
 import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
 
 /**
  * An EjbModule represents a collection of beans that are deployed as a unit.
@@ -65,32 +69,32 @@
    protected boolean hasEntities;
    protected List<String> explicitEntityClasses = new ArrayList<String>();
 
-   protected List<PersistenceUnitDeployment> persistenceUnitDeployments;
+   protected List<PersistenceUnitDeployment> persistenceUnitDeployments = new ArrayList<PersistenceUnitDeployment>();
+;
 
    protected String defaultSLSBDomain = "Stateless Bean";
    protected String defaultSFSBDomain = "Stateful Bean";
    protected String defaultMDBDomain = "Message Driven Bean";
-   protected String defaultMessageInflowDrivenDomain = "Message Inflow Driven Bean";
    protected String defaultConsumerDomain = "Consumer Bean";
    protected String defaultServiceDomain = "Service Bean";
    protected InitialContext initialContext;
 
-   // This is used to push the default client binding to the ProxyDeployer
-   protected String defaultClientBinding = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
-
    protected KernelAbstraction kernelAbstraction;
 
    // used for @Management interfaces
    protected MBeanServer mbeanServer;
 
    protected EAR ear;
+   protected EjbModuleEjbResolver ejbRefResolver;
+   protected EjbModulePersistenceUnitResolver persistenceUnitResolver;
 
    //The JACC PolicyConfiguration
    PolicyConfiguration pc;
 
-   public Ejb3Deployment(DeploymentUnit di)
+   public Ejb3Deployment(DeploymentUnit di, EAR ear)
    {
       this.di = di;
+      this.ear = ear;
       try
       {
          initialContext = EJB3Util.getInitialContext(di.getJndiProperties());
@@ -99,6 +103,8 @@
       {
          throw new RuntimeException(e);
       }
+      ejbRefResolver = new EjbModuleEjbResolver(ear, di.getShortName(), ejbContainers, this);
+      persistenceUnitResolver = new EjbModulePersistenceUnitResolver(persistenceUnitDeployments, ear, ejbContainers);
    }
 
    public EAR getEar()
@@ -132,11 +138,6 @@
    }
 
 
-   public String getDefaultClientBinding()
-   {
-      return defaultClientBinding;
-   }
-
    /**
     * Returns a partial MBean attribute name of the form
     * ",ear=foo.ear,jar=foo.jar"
@@ -186,11 +187,6 @@
       return defaultMDBDomain;
    }
 
-   public String getDefaultMessageInflowDrivenBeanDomain()
-   {
-      return defaultMessageInflowDrivenDomain;
-   }
-
    /**
     * The default AOP domain for message driven beans.
     *
@@ -234,192 +230,38 @@
 
    public PersistenceUnitDeployment getPersistenceUnitDeployment(String unitName) throws NameNotFoundException
    {
-      if ("".equals(unitName))
-      {
-         if (persistenceUnitDeployments == null)
-         {
-            throw new NameNotFoundException("EMPTY STRING unitName but there is no deployments in scope");
-         }
-         if (persistenceUnitDeployments.size() == 1 && ejbContainers.size() > 0)
-         {
-            return persistenceUnitDeployments.get(0);
-         }
-         else if (persistenceUnitDeployments.size() > 1)
-         {
-            throw new NameNotFoundException("EMPTY STRING unitName and there is more than one scoped persistence unit");
-         }
-         throw new NameNotFoundException("There is no default persistence unit in this deployment.");
-      }
-      int hashIndex = unitName.indexOf('#');
-      if (hashIndex != -1)
-      {
-         String relativePath = unitName.substring(0, hashIndex);
-         String name = unitName.substring(hashIndex + 1);
-         if (ear == null)
-         {
-            String relativeJarName = relativePath.substring(3);
-            // look in global EJB jars.
-            for (PersistenceUnitDeployment pud : PersistenceUnitRegistry.getPersistenceUnits())
-            {
-               String jarName = pud.getDeployment().getDeploymentUnit().getShortName() + ".jar";
-               if (pud.getDeployment().getEar() == null
-                       && jarName.equals(relativeJarName)
-                       && pud.getEntityManagerName().equals(name)
-                       && pud.isScoped())
-               {
-                  return pud;
-               }
-            }
-            return null;
-         }
-         Ejb3Deployment dep = ear.findRelativeDeployment(relativePath);
-         if (dep == null)
-         {
-            return null;
-         }
-         PersistenceUnitDeployment rtn = dep.getPersistenceUnitDeploymentInternal(name);
-         return rtn;
-      }
-      PersistenceUnitDeployment rtn = getPersistenceUnitDeploymentInternal(unitName);
-      if (rtn != null) return rtn;
-
-      for (PersistenceUnitDeployment deployment : PersistenceUnitRegistry.getPersistenceUnits())
-      {
-         if (deployment.isScoped()) continue;
-         if (deployment.getEntityManagerName().equals(unitName)) return deployment;
-      }
-      return rtn;
+      return persistenceUnitResolver.getPersistenceUnitDeployment(unitName);
    }
 
-   protected PersistenceUnitDeployment getPersistenceUnitDeploymentInternal(String unitName)
+   public PersistenceUnitDeployment getPersistenceUnitDeploymentInternal(String unitName)
    {
-      if (persistenceUnitDeployments != null)
-      {
-         for (PersistenceUnitDeployment deployment : persistenceUnitDeployments)
-         {
-            if (deployment.getEntityManagerName().equals(unitName))
-            {
-               return deployment;
-            }
-         }
-      }
-      return null;
+      return persistenceUnitResolver.getPersistenceUnitDeploymentInternal(unitName);
    }
 
 
    public EJBContainer getEjbContainer(String ejbLink, Class businessIntf)
    {
-      int hashIndex = ejbLink.indexOf('#');
-      if (hashIndex != -1)
-      {
-         if (ear == null) return null;
-         String relativePath = ejbLink.substring(0, hashIndex);
-         Ejb3Deployment dep = ear.findRelativeDeployment(relativePath);
-         if (dep == null) return null;
-         String ejbName = ejbLink.substring(hashIndex);
-         return dep.getEjbContainer(ejbName, businessIntf);
-      }
-      for (Object obj : ejbContainers.values())
-      {
-         EJBContainer container = (EJBContainer) obj;
-         if (container.getEjbName().equals(ejbLink))
-         {
-            return container;
-         }
-      }
-      for (Object obj : Ejb3Registry.getContainers())
-      {
-         EJBContainer container = (EJBContainer) obj;
-         if (container.getEjbName().equals(ejbLink))
-         {
-            return container;
-         }
-      }
-      return null;
+      return ejbRefResolver.getEjbContainer(ejbLink, businessIntf);
    }
 
    public String getEjbJndiName(String ejbLink, Class businessIntf)
    {
-      EJBContainer container = getEjbContainer(ejbLink, businessIntf);
-      if (container == null) return null;
-      return ProxyFactoryHelper.getJndiName(container, businessIntf);
+      return ejbRefResolver.getEjbJndiName(ejbLink, businessIntf);
    }
 
    public EJBContainer getEjbContainer(Ejb3Deployment deployment, Class businessIntf) throws NameNotFoundException
    {
-      EJBContainer container = null;
-      // search in myself
-      for (Object obj : deployment.ejbContainers.values())
-      {
-         EJBContainer newContainer = (EJBContainer) obj;
-         if (container == newContainer) continue;
-         if (ProxyFactoryHelper.publishesInterface(newContainer, businessIntf))
-         {
-            if (container != null) throw new NameNotFoundException("duplicated in " + di.getShortName());
-            container = newContainer;
-         }
-      }
-      return container;
+      return ejbRefResolver.getEjbContainer(deployment, businessIntf);
    }
 
    public EJBContainer getEjbContainer(Class businessIntf) throws NameNotFoundException
    {
-      EJBContainer rtnContainer = null;
-      // search in myself
-      rtnContainer = getEjbContainer(this, businessIntf);
-      if (rtnContainer != null) return rtnContainer;
-      // search in EAR
-      String jarName = null;
-      if (ear != null)
-      {
-         for (Ejb3Deployment deployment : ear.getEjbDeployments())
-         {
-            EJBContainer newContainer = getEjbContainer(deployment, businessIntf);
-            if (rtnContainer == newContainer) continue; // don't check self
-            if (rtnContainer != null && newContainer != null)
-            {
-               throw new NameNotFoundException("duplicated in .ear within " + jarName +
-                       " and " + deployment.getDeploymentUnit().getShortName());
-            }
-            if (newContainer != null)
-            {
-               rtnContainer = newContainer;
-               jarName = deployment.getDeploymentUnit().getShortName();
-            }
-         }
-      }
-      if (rtnContainer != null)
-      {
-         return rtnContainer;
-      }
-      // search everywhere
-      Iterator containers = Ejb3Registry.getContainers().iterator();
-      while (containers.hasNext())
-      {
-         Container container = (Container)containers.next();
-         EJBContainer ejbContainer = (EJBContainer) container;
-         if (ejbContainer == rtnContainer) continue;
-         if (ProxyFactoryHelper.publishesInterface(container, businessIntf))
-         {
-            if (rtnContainer != null)
-            {
-               throw new NameNotFoundException("duplicated in " + ejbContainer.getDeployment().getDeploymentUnit().getShortName()
-                       + " and " + jarName);
-            }
-            rtnContainer = ejbContainer;
-            jarName = ejbContainer.getDeployment().getDeploymentUnit().getShortName();
-         }
-      }
-      if (rtnContainer != null) return rtnContainer;
-      throw new NameNotFoundException("not used by any EJBs");
+      return ejbRefResolver.getEjbContainer(businessIntf);
    }
 
    public String getEjbJndiName(Class businessIntf) throws NameNotFoundException
    {
-      EJBContainer container = getEjbContainer(businessIntf);
-      String jndiName = ProxyFactoryHelper.getJndiName(container, businessIntf);
-      if (jndiName == null) throw new NameNotFoundException("not used by any EJBs");
-      return jndiName;
+      return ejbRefResolver.getEjbJndiName(businessIntf);
    }
 
    protected void processEJBContainerMetadata(Container container)
@@ -600,7 +442,6 @@
 
       // scope the unitName if this is an ejb archive
       List<PersistenceMetadata> persistenceMetadata = PersistenceXmlLoader.deploy(persistenceXmlUrl, new HashMap(), new EJB3DTDEntityResolver());
-      persistenceUnitDeployments = new ArrayList<PersistenceUnitDeployment>();
       for (PersistenceMetadata metadata : persistenceMetadata)
       {
          String earShortName = ear == null ? null : ear.getShortName();
@@ -660,6 +501,7 @@
             kernelAbstraction.uninstall(on.getCanonicalName());
             Container container = (Container) ejbContainers.get(on);
             Ejb3Registry.unregister(container);
+            container.stop();
          }
          catch (Exception e)
          {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,58 +21,60 @@
  */
 package org.jboss.ejb3;
 
-import java.io.IOException;
-import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-import javax.annotation.security.DenyAll;
-import javax.annotation.security.PermitAll;
-import javax.annotation.security.RolesAllowed;
-import javax.annotation.security.RolesReferenced;
-import javax.annotation.PostConstruct;
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.ExcludeClassInterceptors;
-import javax.interceptor.ExcludeDefaultInterceptors;
-import javax.ejb.Init;
-import javax.interceptor.Interceptors;
-import javax.ejb.Local;
-import javax.ejb.LocalHome;
-import javax.ejb.MessageDriven;
-import javax.ejb.PostActivate;
-import javax.annotation.PreDestroy;
-import javax.ejb.PrePassivate;
-import javax.ejb.Remote;
-import javax.ejb.RemoteHome;
-import javax.ejb.Remove;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.ejb.TransactionManagement;
 
 import javassist.bytecode.ClassFile;
-import org.jboss.annotation.*;
-import org.jboss.annotation.ejb.*;
+import org.jboss.annotation.IgnoreDependency;
+import org.jboss.annotation.IgnoreDependencyImpl;
+import org.jboss.annotation.ejb.Clustered;
+import org.jboss.annotation.ejb.ClusteredImpl;
+import org.jboss.annotation.ejb.Consumer;
+import org.jboss.annotation.ejb.ConsumerImpl;
+import org.jboss.annotation.ejb.CurrentMessage;
+import org.jboss.annotation.ejb.CurrentMessageImpl;
+import org.jboss.annotation.ejb.DefaultActivationSpecs;
+import org.jboss.annotation.ejb.DefaultActivationSpecsImpl;
+import org.jboss.annotation.ejb.DeliveryMode;
+import org.jboss.annotation.ejb.Depends;
+import org.jboss.annotation.ejb.DependsImpl;
+import org.jboss.annotation.ejb.ExcludeClassInterceptorsImpl;
+import org.jboss.annotation.ejb.ExcludeDefaultInterceptorsImpl;
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.LocalBindingImpl;
+import org.jboss.annotation.ejb.LocalHomeImpl;
+import org.jboss.annotation.ejb.Management;
+import org.jboss.annotation.ejb.ManagementImpl;
+import org.jboss.annotation.ejb.MessageProperties;
+import org.jboss.annotation.ejb.MessagePropertiesImpl;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.annotation.ejb.PoolClassImpl;
+import org.jboss.annotation.ejb.Producers;
+import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.annotation.ejb.RemoteBindingImpl;
+import org.jboss.annotation.ejb.RemoteBindings;
+import org.jboss.annotation.ejb.RemoteBindingsImpl;
+import org.jboss.annotation.ejb.RemoteHomeImpl;
+import org.jboss.annotation.ejb.ResourceAdapter;
+import org.jboss.annotation.ejb.ResourceAdapterImpl;
+import org.jboss.annotation.ejb.SerializedConcurrentAccess;
+import org.jboss.annotation.ejb.SerializedConcurrentAccessImpl;
+import org.jboss.annotation.ejb.Service;
+import org.jboss.annotation.ejb.ServiceImpl;
+import org.jboss.annotation.ejb.TransactionTimeout;
+import org.jboss.annotation.ejb.TransactionTimeoutImpl;
+import org.jboss.annotation.ejb.cache.Cache;
+import org.jboss.annotation.ejb.cache.CacheImpl;
+import org.jboss.annotation.ejb.cache.simple.PersistenceManager;
+import org.jboss.annotation.ejb.cache.simple.PersistenceManagerImpl;
 import org.jboss.annotation.internal.DefaultInterceptorMarker;
 import org.jboss.annotation.internal.DefaultInterceptorMarkerImpl;
 import org.jboss.annotation.security.RunAsPrincipalImpl;
 import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.annotation.security.SecurityDomainImpl;
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.advice.AdviceStack;
-import org.jboss.aop.advice.AspectDefinition;
-import org.jboss.aop.advice.GenericAspectFactory;
-import org.jboss.aop.advice.Scope;
-import org.jboss.aop.advice.ScopedInterceptorFactory;
 import org.jboss.aop.annotation.AnnotationRepository;
 import org.jboss.ejb.ActivationConfigPropertyImpl;
 import org.jboss.ejb.AroundInvokeImpl;
+import org.jboss.ejb.DeclareRolesImpl;
 import org.jboss.ejb.DenyAllImpl;
 import org.jboss.ejb.InitImpl;
 import org.jboss.ejb.InterceptorsImpl;
@@ -86,58 +88,78 @@
 import org.jboss.ejb.RemoteImpl;
 import org.jboss.ejb.RemoveImpl;
 import org.jboss.ejb.RolesAllowedImpl;
-import org.jboss.ejb.RolesReferencedImpl;
 import org.jboss.ejb.RunAsImpl;
 import org.jboss.ejb.StatelessImpl;
 import org.jboss.ejb.TransactionAttributeImpl;
 import org.jboss.ejb.TransactionManagementImpl;
-import org.jboss.ejb3.dd.ActivationConfig;
-import org.jboss.ejb3.dd.ActivationConfigProperty;
-import org.jboss.ejb3.dd.AssemblyDescriptor;
-import org.jboss.ejb3.dd.ClusterConfig;
-import org.jboss.ejb3.dd.ContainerTransaction;
-import org.jboss.ejb3.dd.EjbJarDD;
-import org.jboss.ejb3.dd.EjbJarDDObjectFactory;
-import org.jboss.ejb3.dd.EnterpriseBean;
-import org.jboss.ejb3.dd.EnterpriseBeans;
-import org.jboss.ejb3.dd.EnvEntry;
-import org.jboss.ejb3.dd.ExcludeList;
-import org.jboss.ejb3.dd.InitMethod;
-import org.jboss.ejb3.dd.InjectionTarget;
-import org.jboss.ejb3.dd.InterceptorBinding;
-import org.jboss.ejb3.dd.JBossDDObjectFactory;
-import org.jboss.ejb3.dd.MessageDestination;
-import org.jboss.ejb3.dd.MessageDestinationRef;
-import org.jboss.ejb3.dd.MessageDrivenBean;
-import org.jboss.ejb3.dd.MessageDrivenDestination;
-import org.jboss.ejb3.dd.Method;
-import org.jboss.ejb3.dd.MethodAttributes;
-import org.jboss.ejb3.dd.MethodPermission;
-import org.jboss.ejb3.dd.RemoveMethod;
-import org.jboss.ejb3.dd.ResourceEnvRef;
-import org.jboss.ejb3.dd.ResourceRef;
-import org.jboss.ejb3.dd.SecurityIdentity;
-import org.jboss.ejb3.dd.SecurityRole;
-import org.jboss.ejb3.dd.SessionEnterpriseBean;
-import org.jboss.ejb3.injection.InjectionUtil;
-import org.jboss.ejb3.injection.Injector;
-import org.jboss.ejb3.injection.JndiFieldInjector;
-import org.jboss.ejb3.injection.JndiMethodInjector;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
 import org.jboss.ejb3.mdb.ConsumerContainer;
 import org.jboss.ejb3.mdb.MDB;
 import org.jboss.ejb3.mdb.ProducerImpl;
 import org.jboss.ejb3.mdb.ProducersImpl;
+import org.jboss.ejb3.metamodel.ActivationConfig;
+import org.jboss.ejb3.metamodel.AssemblyDescriptor;
+import org.jboss.ejb3.metamodel.CacheConfig;
+import org.jboss.ejb3.metamodel.ClusterConfig;
+import org.jboss.ejb3.metamodel.ContainerTransaction;
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.EnterpriseBean;
+import org.jboss.ejb3.metamodel.EnterpriseBeans;
+import org.jboss.ejb3.metamodel.ExcludeList;
+import org.jboss.ejb3.metamodel.InitMethod;
+import org.jboss.ejb3.metamodel.InterceptorBinding;
+import org.jboss.ejb3.metamodel.MessageDestination;
+import org.jboss.ejb3.metamodel.MessageDrivenBean;
+import org.jboss.ejb3.metamodel.MessageDrivenDestination;
+import org.jboss.ejb3.metamodel.Method;
+import org.jboss.ejb3.metamodel.MethodAttributes;
+import org.jboss.ejb3.metamodel.MethodPermission;
+import org.jboss.ejb3.metamodel.PoolConfig;
+import org.jboss.ejb3.metamodel.RemoveMethod;
+import org.jboss.ejb3.metamodel.SecurityIdentity;
+import org.jboss.ejb3.metamodel.SessionEnterpriseBean;
+import org.jboss.ejb3.metamodel.XmlAnnotation;
 import org.jboss.ejb3.service.ServiceContainer;
 import org.jboss.ejb3.stateful.StatefulContainer;
 import org.jboss.ejb3.stateless.StatelessContainer;
 import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.metamodel.descriptor.InjectionTarget;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.NameValuePair;
+import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.metamodel.descriptor.RunAs;
+import org.jboss.metamodel.descriptor.SecurityRole;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.PermitAll;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Init;
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.MessageDriven;
+import javax.ejb.PostActivate;
+import javax.ejb.PrePassivate;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Remove;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.ejb.TransactionManagement;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.ExcludeClassInterceptors;
+import javax.interceptor.ExcludeDefaultInterceptors;
+import javax.interceptor.Interceptors;
+import java.lang.reflect.Member;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
 /**
  * @version <tt>$Revision$</tt>
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
@@ -294,7 +316,7 @@
    {
       String ejbName = ejbNames.get(ejbIndex);
 
-      org.jboss.ejb3.dd.Service service = (org.jboss.ejb3.dd.Service) ejbs
+      org.jboss.ejb3.metamodel.Service service = (org.jboss.ejb3.metamodel.Service) ejbs
             .get(ejbIndex);
 
       ServiceContainer container = super.getServiceContainer(ejbIndex);
@@ -326,7 +348,7 @@
    {
       String ejbName = ejbNames.get(ejbIndex);
 
-      org.jboss.ejb3.dd.Consumer consumer = (org.jboss.ejb3.dd.Consumer) ejbs
+      org.jboss.ejb3.metamodel.Consumer consumer = (org.jboss.ejb3.metamodel.Consumer) ejbs
             .get(ejbIndex);
 
       ConsumerContainer container = super.getConsumerContainer(ejbIndex);
@@ -365,17 +387,7 @@
 
    protected String getMDBDomainName(int ejbIndex)
    {
-      String domainName = defaultMDBDomain;
-
-      EnterpriseBean enterpriseBean = ejbs.get(ejbIndex);
-      if (enterpriseBean != null)
-      {
-         MessageDrivenBean mdb = (MessageDrivenBean) enterpriseBean;
-         if (mdb.getMessageDrivenDestination() == null)
-            domainName = defaultMessagingInflowDrivenBeanDomain;
-      }
-
-      return domainName;
+      return defaultMDBDomain;
    }
 
    protected MDB getMDB(int ejbIndex) throws Exception
@@ -405,7 +417,7 @@
          String aopDomainName = enterpriseBean.getAopDomainName();
          if (aopDomainName != null)
          {
-            log.info("Found aop-domain-name element for annotation "
+            log.debug("Found aop-domain-name element for annotation "
                   + aopDomainName + " for ejbName "
                   + enterpriseBean.getEjbName());
 
@@ -441,9 +453,12 @@
                      "destinationType", destination.getDestinationType()));
             if (destination.getSubscriptionDurability() != null)
             {
-               properties.add(new ActivationConfigPropertyImpl("durability",
-                     destination.getSubscriptionDurability()));
+               String durable = "false";
                if (destination.getSubscriptionDurability().equals("Durable"))
+                  durable = "true";
+               properties.add(new ActivationConfigPropertyImpl("subscriptionDurability",
+                     durable));
+               if (destination.getSubscriptionDurability().equals("Durable"))
                   properties.add(new ActivationConfigPropertyImpl(
                         "subscriptionName", "subscriptionName"));
 
@@ -462,7 +477,7 @@
          {
             for (Object o : activationConfig.getActivationConfigProperties())
             {
-               ActivationConfigProperty property = (ActivationConfigProperty) o;
+               NameValuePair property = (NameValuePair) o;
                properties.add(new ActivationConfigPropertyImpl(property
                      .getName(), property.getValue()));
             }
@@ -486,7 +501,14 @@
                   .getMdbPassword()));
 
          }
+         
+         if (mdb.getMdbSubscriptionId() != null)
+         {
+            properties.add(new ActivationConfigPropertyImpl("subscriptionName", mdb
+                  .getMdbSubscriptionId()));
 
+         }
+
          ActivationConfigPropertyImpl[] propsArray = new ActivationConfigPropertyImpl[properties
                .size()];
          properties.toArray(propsArray);
@@ -511,9 +533,32 @@
          }
 
          addClassAnnotation(container, MessageDriven.class, annotation);
+
+         addDefaultActivationConfig(container, mdb);
       }
    }
 
+   private void addDefaultActivationConfig(MDB container, MessageDrivenBean mdb)
+   {
+      ActivationConfig defaultActivationConfig = mdb.getDefaultActivationConfig();
+      if (defaultActivationConfig != null)
+      {
+         DefaultActivationSpecsImpl activationAnnotation = new DefaultActivationSpecsImpl();
+         for (Object o : defaultActivationConfig.getActivationConfigProperties())
+         {
+            NameValuePair property = (NameValuePair) o;
+            activationAnnotation.addActivationConfigProperty(new ActivationConfigPropertyImpl(property
+                  .getName(), property.getValue()));
+         }
+
+         DefaultActivationSpecs existingAnnotation = (DefaultActivationSpecs)ejbClass.getAnnotation(DefaultActivationSpecs.class);
+         if (existingAnnotation != null)
+            activationAnnotation.merge(existingAnnotation);
+
+         addClassAnnotation(container, DefaultActivationSpecs.class, activationAnnotation);
+      }
+   }
+
    private void addInterfaces(EJBContainer container,
          EnterpriseBean enterpriseBean) throws ClassNotFoundException
    {
@@ -556,53 +601,6 @@
       }
    }
 
-   public static EjbJarDD parseDescriptors(DeploymentUnit di)
-         throws JBossXBException, IOException
-   {
-      ObjectModelFactory factory = null;
-      Unmarshaller unmarshaller = null;
-      EjbJarDD dd = null;
-
-      URL ddResource = di.getEjbJarXml();
-      if (ddResource != null)
-      {
-         log.debug("found ejb-jar.xml " + ddResource);
-
-         factory = new EjbJarDDObjectFactory();
-         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory
-               .newInstance();
-         unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
-         unmarshaller = unmarshallerFactory.newUnmarshaller();
-         JBossEntityResolver entityResolver = new JBossEntityResolver();
-         unmarshaller.setEntityResolver(entityResolver);
-
-         dd = (EjbJarDD) unmarshaller.unmarshal(ddResource.openStream(),
-               factory, null);
-      }
-
-      ddResource = di.getJbossXml();
-      if (ddResource != null)
-      {
-         log.debug("found jboss.xml " + ddResource);
-
-         if (dd == null)
-            dd = new EjbJarDD();
-
-         factory = new JBossDDObjectFactory(dd);
-         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory
-               .newInstance();
-         unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
-         unmarshaller = unmarshallerFactory.newUnmarshaller();
-         JBossEntityResolver entityResolver = new JBossEntityResolver();
-         unmarshaller.setEntityResolver(entityResolver);
-
-         dd = (EjbJarDD) unmarshaller.unmarshal(ddResource.openStream(),
-               factory, null);
-      }
-
-      return dd;
-   }
-
    private void addDescriptorAnnotations(EJBContainer container,
          EnterpriseBean enterpriseBean, String ejbName) throws Exception
    {
@@ -742,9 +740,9 @@
                roleList.add(role.getRoleName());
 
             }
-            RolesReferencedImpl annotation = new RolesReferencedImpl(
+            DeclareRolesImpl annotation = new DeclareRolesImpl(
                   (String[]) roleList.toArray(new String[roleList.size()]));
-            addClassAnnotation(container, RolesReferenced.class, annotation);
+            addClassAnnotation(container, DeclareRoles.class, annotation);
          }
 
          List methodPermissions = assembly.getMethodPermissions();
@@ -1050,43 +1048,218 @@
       {
          addHomeAnnotations(container, enterpriseBean);
 
-         addClusterAnnotations(container, enterpriseBean);
-
          addJndiAnnotations(container, enterpriseBean);
 
          addInterceptorMethodAnnotations(container, enterpriseBean);
 
-         handleEnvEntries(container, enterpriseBean.getEnvEntries(), container
-               .getBeanClass(), container.getEncInjections());
-
          handleResourceRefs(container, enterpriseBean.getResourceRefs());
 
-         handleResourceEnvRefs(container, enterpriseBean.getResourceEnvRefs());
+         addMessageDestinationAnnotations(container, enterpriseBean.getMessageDestinationRefs());
 
-         addMessageDestinationAnnotations(container, enterpriseBean
-               .getMessageDestinationRefs(), container.getEncInjections());
-
          addSecurityIdentityAnnotation(container, enterpriseBean
                .getSecurityIdentity());
 
          addDependencies(container, enterpriseBean);
+
+         addPoolAnnotations(container, enterpriseBean);
+         
+         addXmlAnnotations(container, enterpriseBean);
+
+         if (enterpriseBean instanceof SessionEnterpriseBean)
+         {
+            addConcurrentAnnotations(container, (SessionEnterpriseBean)enterpriseBean);
+            addClusterAnnotations(container, (SessionEnterpriseBean)enterpriseBean);
+            addCacheAnnotations(container, (SessionEnterpriseBean)enterpriseBean);
+         }
       }
    }
 
-   private void addClusterAnnotations(EJBContainer container,
+   private void addConcurrentAnnotations(EJBContainer container,
+         SessionEnterpriseBean enterpriseBean) throws Exception
+   {
+      if (enterpriseBean.getConcurrent() != null)
+      {
+         boolean concurrent = Boolean.getBoolean(enterpriseBean.getConcurrent());
+         if (concurrent)
+         {
+            SerializedConcurrentAccessImpl annotation = new SerializedConcurrentAccessImpl();
+            addClassAnnotation(container, SerializedConcurrentAccess.class, annotation);
+         }
+         else
+         {
+            container.getAnnotations().disableAnnotation(SerializedConcurrentAccess.class.getName());
+         }
+      }
+   }
+
+   private void addPoolAnnotations(EJBContainer container,
          EnterpriseBean enterpriseBean) throws Exception
    {
-      if (enterpriseBean.isClustered())
+      if (enterpriseBean.getPoolConfig() != null)
       {
-         ClusterConfig config = enterpriseBean.getClusterConfig();
-         ClusteredImpl annotation = new ClusteredImpl();
+         PoolConfig config = enterpriseBean.getPoolConfig();
+
+         PoolClassImpl poolAnnotation = new PoolClassImpl();
+
+         if (config.getPoolClass() != null)
+            poolAnnotation.setValue(di.getClassLoader().loadClass(config.getPoolClass()));
+
+         if (config.getMaxSize() != null)
+            poolAnnotation.setMaxSize(Integer.parseInt(config.getMaxSize()));
+
+         if (config.getTimeout() != null)
+            poolAnnotation.setTimeout(Long.parseLong(config.getTimeout()));
+
+         addClassAnnotation(container, PoolClass.class, poolAnnotation);
+      }
+   }
+   
+   private void addXmlAnnotations(EJBContainer container,
+         EnterpriseBean enterpriseBean) throws Exception
+   {
+      Iterator xmlAnnotations = enterpriseBean.getXmlAnnotations().iterator();
+      while (xmlAnnotations.hasNext())
+      {
+         XmlAnnotation xmlAnnotation = (XmlAnnotation)xmlAnnotations.next();
+
+         Class annotationClass = di.getClassLoader().loadClass(xmlAnnotation.getAnnotationClass());
+         Class annotationImplementationClass = di.getClassLoader().loadClass(xmlAnnotation.getAnnotationImplementationClass());
+         Object annotation = annotationImplementationClass.newInstance();
+         
+         Iterator properties = xmlAnnotation.getProperties().iterator();
+         while (properties.hasNext())
+         {
+            NameValuePair property = (NameValuePair)properties.next();
+            Field field = annotationImplementationClass.getDeclaredField(property.getName());
+            setAnnotationPropertyField(field, annotation, property.getValue());
+         }
+            
+         if (xmlAnnotation.getInjectionTarget() == null)
+         {
+            addClassAnnotation(container, annotationClass, annotation);
+         } 
+         else
+         {
+            Method method = new Method();
+            method.setMethodName(xmlAnnotation.getInjectionTarget().getTargetName());
+            addAnnotations(annotationClass, annotation, container, method);
+         }
+      }
+   }
+   
+   protected void setAnnotationPropertyField(Field field, Object annotation, String value) throws Exception
+   {
+      if (field.getType() == String.class)
+         field.set(annotation, value);
+      else if (field.getType() == Long.class)
+         field.setLong(annotation, Long.parseLong(value));
+      else if (field.getType() == Integer.class)
+         field.setInt(annotation, Integer.parseInt(value));
+      else if (field.getType() == Class.class)
+         field.set(annotation, di.getClassLoader().loadClass(value));
+      else if (field.getType() == Boolean.class)
+         field.setBoolean(annotation, Boolean.parseBoolean(value));
+   }
+
+   private void addCacheAnnotations(EJBContainer container,
+         SessionEnterpriseBean enterpriseBean) throws Exception
+   {
+      if (enterpriseBean.getCacheConfig() != null)
+      {
+         CacheConfig config = enterpriseBean.getCacheConfig();
+         if (config.getCacheClass() != null)
+         {
+            Class cacheClass = di.getClassLoader().loadClass(config.getCacheClass());
+            CacheImpl cacheAnnotation = new CacheImpl(cacheClass);
+            addClassAnnotation(container, Cache.class, cacheAnnotation);
+
+            if (cacheClass == org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
+            {
+               if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
+               {
+                  PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
+                  if (config.getPersistenceManager() != null)
+                     persistenceAnnotation.setValue(di.getClassLoader().loadClass(config.getPersistenceManager()));
+                  addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
+               }
+            }
+         }
+
+         if (config.getName() != null)
+         {
+            org.jboss.annotation.ejb.cache.tree.CacheConfigImpl configAnnotation = new org.jboss.annotation.ejb.cache.tree.CacheConfigImpl();
+
+            configAnnotation.setName(config.getName());
+
+            if (config.getMaxSize() != null)
+               configAnnotation.setMaxSize(Integer.parseInt(config.getMaxSize()));
+
+            if (config.getIdleTimeoutSeconds() != null)
+               configAnnotation.setIdleTimeoutSeconds(Long.parseLong(config.getIdleTimeoutSeconds()));
+
+            addClassAnnotation(container, org.jboss.annotation.ejb.cache.tree.CacheConfig.class, configAnnotation);
+         }
+         else
+         {
+            org.jboss.annotation.ejb.cache.simple.CacheConfigImpl configAnnotation = new org.jboss.annotation.ejb.cache.simple.CacheConfigImpl();
+
+            if (config.getMaxSize() != null)
+               configAnnotation.setMaxSize(Integer.parseInt(config.getMaxSize()));
+
+            if (config.getIdleTimeoutSeconds() != null)
+               configAnnotation.setIdleTimeoutSeconds(Long.parseLong(config.getIdleTimeoutSeconds()));
+
+            addClassAnnotation(container, org.jboss.annotation.ejb.cache.simple.CacheConfig.class, configAnnotation);
+         }
+      }
+
+   }
+
+   private void addClusterAnnotations(EJBContainer container,
+         SessionEnterpriseBean enterpriseBean) throws Exception
+   {
+      ClusteredImpl clusteredAnnotation = null;
+
+      if (enterpriseBean.getClustered() != null)
+      {
+         Clustered existingAnnotation = (Clustered)ejbClass.getAnnotation(Clustered.class);
+
+         boolean clustered = Boolean.parseBoolean(enterpriseBean.getClustered());
+         if (!clustered)
+         {
+            if (existingAnnotation != null)
+              container.getAnnotations().disableAnnotation(Clustered.class.getName());
+
+            return;
+         }
+         else
+         {
+            if (existingAnnotation == null)
+               clusteredAnnotation = new ClusteredImpl();
+         }
+      }
+
+      ClusterConfig config = enterpriseBean.getClusterConfig();
+      if (config != null)
+      {
+         if (clusteredAnnotation == null)
+            clusteredAnnotation = new ClusteredImpl();
+
          if (config.getLoadBalancePolicy() != null)
-            annotation.setLoadBalancePolicy(di.getClassLoader().loadClass(
-                  config.getLoadBalancePolicy()));
+         {
+            Class policy = di.getClassLoader().loadClass(config.getLoadBalancePolicy());
+            clusteredAnnotation.setLoadBalancePolicy(policy);
+         }
+
          if (config.getPartition() != null)
-            annotation.setPartition(config.getPartition());
+         {
+            clusteredAnnotation.setPartition(config.getPartition());
+         }
+      }
 
-         addClassAnnotation(container, Clustered.class, annotation);
+      if (clusteredAnnotation != null)
+      {
+         addClassAnnotation(container, Clustered.class, clusteredAnnotation);
       }
    }
 
@@ -1105,7 +1278,7 @@
 
          addClassAnnotation(container, Depends.class, annotation);
       }
-   
+
       if (enterpriseBean.getIgnoreDependencies().size() > 0)
       {
          Iterator<InjectionTarget> ignores = enterpriseBean.getIgnoreDependencies().iterator();
@@ -1113,10 +1286,10 @@
          {
             InjectionTarget ignore = ignores.next();
             IgnoreDependencyImpl annotation = new IgnoreDependencyImpl();
-            
+
             Method method = new Method();
             method.setMethodName(ignore.getTargetName());
-            
+
             addAnnotations(IgnoreDependency.class, annotation, container, method);
          }
       }
@@ -1125,7 +1298,7 @@
    private void addServiceAnnotations(EJBContainer container, EnterpriseBean ejb)
          throws ClassNotFoundException
    {
-      org.jboss.ejb3.dd.Service service = (org.jboss.ejb3.dd.Service) ejb;
+      org.jboss.ejb3.metamodel.Service service = (org.jboss.ejb3.metamodel.Service) ejb;
 
       if (service == null)
          return;
@@ -1144,7 +1317,7 @@
          EnterpriseBean ejb) throws ClassNotFoundException,
          NoSuchFieldException, NoSuchMethodException
    {
-      org.jboss.ejb3.dd.Consumer consumer = (org.jboss.ejb3.dd.Consumer) ejb;
+      org.jboss.ejb3.metamodel.Consumer consumer = (org.jboss.ejb3.metamodel.Consumer) ejb;
 
       if (consumer == null)
          return;
@@ -1157,7 +1330,7 @@
          Iterator producers = consumer.getProducers().iterator();
          while (producers.hasNext())
          {
-            org.jboss.ejb3.dd.Producer producer = (org.jboss.ejb3.dd.Producer) producers
+            org.jboss.ejb3.metamodel.Producer producer = (org.jboss.ejb3.metamodel.Producer) producers
                   .next();
             ProducerImpl annotation = new ProducerImpl(di.getClassLoader()
                   .loadClass(producer.getClassName()));
@@ -1169,7 +1342,7 @@
          producers = consumer.getLocalProducers().iterator();
          while (producers.hasNext())
          {
-            org.jboss.ejb3.dd.Producer producer = (org.jboss.ejb3.dd.Producer) producers
+            org.jboss.ejb3.metamodel.Producer producer = (org.jboss.ejb3.metamodel.Producer) producers
                   .next();
             ProducerImpl annotation = new ProducerImpl(di.getClassLoader()
                   .loadClass(producer.getClassName()));
@@ -1180,7 +1353,7 @@
          addClassAnnotation(container, Producers.class, producersAnnotation);
       }
 
-      org.jboss.ejb3.dd.CurrentMessage currentMessage = consumer
+      org.jboss.ejb3.metamodel.CurrentMessage currentMessage = consumer
             .getCurrentMessage();
       if (currentMessage != null)
       {
@@ -1193,7 +1366,7 @@
          }
       }
 
-      org.jboss.ejb3.dd.MessageProperties properties = consumer
+      org.jboss.ejb3.metamodel.MessageProperties properties = consumer
             .getMessageProperties();
       if (properties != null)
       {
@@ -1230,87 +1403,86 @@
    private void addJndiAnnotations(EJBContainer container,
          EnterpriseBean enterpriseBean) throws ClassNotFoundException
    {
-      String jndiName = enterpriseBean.getJndiName();
+      addLocalJndiAnnotations(container, enterpriseBean);
+      addRemoteJndiAnnotations(container, enterpriseBean);
+   }
 
+   private void addLocalJndiAnnotations(EJBContainer container,
+         EnterpriseBean enterpriseBean) throws ClassNotFoundException
+   {
+      String localJndiName = enterpriseBean.getLocalJndiName();
+      if (localJndiName != null)
+      {
+         LocalBindingImpl localBinding = new LocalBindingImpl(localJndiName);
+         addClassAnnotation(container, LocalBinding.class, localBinding);
+      }
+   }
+
+   private void addRemoteJndiAnnotations(EJBContainer container,
+         EnterpriseBean enterpriseBean) throws ClassNotFoundException
+   {
+      List<org.jboss.ejb3.metamodel.RemoteBinding> bindingsList = enterpriseBean.getRemoteBindings();
+      if (bindingsList.size() == 0)
+      {
+         addSimpleJndiAnnotations(container, enterpriseBean);
+         return;
+      }
+
       AnnotationRepository annotations = container.getAnnotations();
-      
+
+      annotations.disableAnnotation(RemoteBinding.class.getName());
+
+      List<RemoteBindingImpl> bindingAnnotationsList = new ArrayList();
+
+      Iterator bindings = bindingsList.iterator();
+      while(bindings.hasNext())
+      {
+         org.jboss.ejb3.metamodel.RemoteBinding binding = (org.jboss.ejb3.metamodel.RemoteBinding)bindings.next();
+         RemoteBindingImpl bindingAnnotation = new RemoteBindingImpl();
+
+         if (binding.getJndiName() != null)
+            bindingAnnotation.setJndiBinding(binding.getJndiName());
+
+         if (binding.getClientBindUrl() != null)
+            bindingAnnotation.setBindUrl(binding.getClientBindUrl());
+
+         if (binding.getInterceptorStack() != null)
+            bindingAnnotation.setStack(binding.getInterceptorStack());
+
+         if (binding.getProxyFactory() != null)
+            bindingAnnotation.setFactory(di.getClassLoader().loadClass(binding.getProxyFactory()));
+
+         bindingAnnotationsList.add(bindingAnnotation);
+
+      }
+
+      RemoteBindingsImpl bindingsAnnotation = new RemoteBindingsImpl(bindingAnnotationsList);
+      addClassAnnotation(container, RemoteBindings.class, bindingsAnnotation);
+   }
+
+   private void addSimpleJndiAnnotations(EJBContainer container,
+         EnterpriseBean enterpriseBean) throws ClassNotFoundException
+   {
       RemoteBindingImpl remoteBinding = null;
+
+      String jndiName = enterpriseBean.getJndiName();
       if (jndiName != null)
       {
          remoteBinding = new RemoteBindingImpl();
          remoteBinding.setJndiBinding(jndiName);
          addClassAnnotation(container, RemoteBinding.class, remoteBinding);
       }
-      
-      String interceptorStack = enterpriseBean.getInterceptorStack();
-      if (interceptorStack != null)
-      {
-         if (remoteBinding == null)
-            remoteBinding = new RemoteBindingImpl();
-         
-         remoteBinding.setStack(interceptorStack);
-      }
-      
-      String proxyFactory = enterpriseBean.getProxyFactory();
-      if (proxyFactory != null)
-      {
-         if (remoteBinding == null)
-            remoteBinding = new RemoteBindingImpl();
-         
-         remoteBinding.setFactory(di.getClassLoader().loadClass(proxyFactory));
-      }
-      
+
       if (remoteBinding != null)
       {
          RemoteBinding existingBinding = (RemoteBinding)ejbClass.getAnnotation(RemoteBinding.class);
          if (existingBinding != null)
             remoteBinding.merge(existingBinding);
-         
+
          addClassAnnotation(container, RemoteBinding.class, remoteBinding);
       }
-
-      String localJndiName = enterpriseBean.getLocalJndiName();
-      if (localJndiName != null)
-      {
-         LocalBindingImpl localBinding = new LocalBindingImpl(localJndiName);
-         addClassAnnotation(container, LocalBinding.class, localBinding);
-      }
    }
 
-   private void handleEnvEntries(EJBContainer container,
-         Collection<EnvEntry> envEntryList, Class clazz,
-         HashMap<AccessibleObject, Injector> injectors)
-         throws ClassNotFoundException, NoSuchMethodException,
-         NoSuchFieldException, javax.naming.NamingException
-   {
-      Iterator refs = envEntryList.iterator();
-      while (refs.hasNext())
-      {
-         EnvEntry entry = (EnvEntry) refs.next();
-
-         container.addEnvEntry(entry.getEnvEntryName(),
-               entry.getEnvEntryType(), entry.getEnvEntryValue());
-
-         if (entry.getInjectionTarget() != null)
-         {
-            // todo, get injection target class
-            AccessibleObject ao = InjectionUtil.findInjectionTarget(clazz,
-                  entry.getInjectionTarget());
-            if (ao instanceof Field)
-            {
-               injectors.put(ao, new JndiFieldInjector((Field) ao, "env/"
-                     + entry.getEnvEntryName(), container.getEnc()));
-            } else
-            {
-               injectors.put(ao, new JndiMethodInjector(
-                     (java.lang.reflect.Method) ao, "env/"
-                           + entry.getEnvEntryName(), container.getEnc()));
-            }
-         }
-
-      }
-   }
-
    private void handleResourceRefs(EJBContainer container,
          Collection<ResourceRef> resourceRefList)
    {
@@ -1328,19 +1500,8 @@
       }
    }
 
-   private void handleResourceEnvRefs(EJBContainer container,
-         Collection<ResourceEnvRef> resourceEnvRefList)
-   {
-      Iterator refs = resourceEnvRefList.iterator();
-      while (refs.hasNext())
-      {
-         ResourceEnvRef ref = (ResourceEnvRef) refs.next();
-      }
-   }
-
    private void addMessageDestinationAnnotations(EJBContainer container,
-         Collection destinationRefList,
-         HashMap<AccessibleObject, Injector> injectors)
+         Collection destinationRefList)
 
    {
       Iterator refs = destinationRefList.iterator();
@@ -1361,32 +1522,6 @@
                }
             }
          }
-
-         if (ref.getMappedName() == null || ref.getMappedName().equals(""))
-            throw new RuntimeException("mapped-name is required for "
-                  + ref.getMessageDestinationRefName() + " of EJB "
-                  + container.getEjbName());
-         else
-            container.addEncLinkRefEntry("env/"
-                  + ref.getMessageDestinationRefName(), ref.getMappedName());
-
-         if (ref.getInjectionTarget() != null)
-         {
-            // todo, get injection target class
-            AccessibleObject ao = InjectionUtil.findInjectionTarget(clazz, ref
-                  .getInjectionTarget());
-            if (ao instanceof Field)
-            {
-               injectors.put(ao, new JndiFieldInjector((Field) ao, "env/"
-                     + ref.getMessageDestinationRefName(), container.getEnc()));
-            } else
-            {
-               injectors.put(ao, new JndiMethodInjector(
-                     (java.lang.reflect.Method) ao, "env/"
-                           + ref.getMessageDestinationRefName(), container
-                           .getEnc()));
-            }
-         }
       }
    }
 
@@ -1498,12 +1633,12 @@
    private void addSecurityIdentityAnnotation(EJBContainer container,
          SecurityIdentity identity)
    {
-      if (identity != null)
+      if (identity != null && !identity.isUseCallerIdentity())
       {
-         String runAs = identity.getRunAs();
+         RunAs runAs = identity.getRunAs();
          if (runAs != null)
          {
-            RunAsImpl annotation = new RunAsImpl(runAs);
+            RunAsImpl annotation = new RunAsImpl(runAs.getRoleName());
             addClassAnnotation(container, annotation.annotationType(),
                   annotation);
 
@@ -1511,7 +1646,7 @@
             if (runAsPrincipal != null)
             {
                RunAsPrincipalImpl principalAnnotation = new RunAsPrincipalImpl(
-                     runAs);
+                     runAs.getRoleName());
                addClassAnnotation(container, principalAnnotation
                      .annotationType(), principalAnnotation);
             }
@@ -1548,8 +1683,10 @@
    private void addClassAnnotation(EJBContainer container,
          Class annotationClass, Object annotation)
    {
-      log.info("adding class annotation " + annotationClass.getName() + " to "
+      log.debug("adding class annotation " + annotationClass.getName() + " to "
             + ejbClass.getName() + " " + annotation);
+      log.debug("adding class annotation " + annotationClass.getName() + " to "
+            + ejbClass.getName() + " " + annotation);
       container.getAnnotations()
             .addClassAnnotation(annotationClass, annotation);
    }
@@ -1588,6 +1725,9 @@
                   log.debug("adding " + annotationClass.getName()
                         + " method annotation to " + ejbClass.getName() + "."
                         + methodName);
+                  log.debug("adding " + annotationClass.getName()
+                        + " method annotation to " + ejbClass.getName() + "."
+                        + methodName);
                   annotations.addAnnotation(methods[methodIndex],
                         annotationClass, annotation);
                   overrideAnnotations(container, methods[methodIndex],

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3HandlerFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3HandlerFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3HandlerFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,7 +22,9 @@
 package org.jboss.ejb3;
 
 import java.net.URL;
-import org.jboss.ejb3.dd.EjbJarDD;
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.EjbJarDDObjectFactory;
+import org.jboss.ejb3.metamodel.JBossDDObjectFactory;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
 
 import javassist.bytecode.ClassFile;
@@ -39,7 +41,9 @@
       public DDFactory(Ejb3Deployment di) throws Exception
       {
          this.di = di;
-         this.dd = Ejb3DescriptorHandler.parseDescriptors(di.getDeploymentUnit());
+         this.dd = EjbJarDDObjectFactory.parse(di.getDeploymentUnit().getEjbJarXml());
+         this.dd = JBossDDObjectFactory.parse(di.getDeploymentUnit().getJbossXml(), dd);
+         
          InterceptorInfoRepository repository = this.di.getDeploymentUnit().getInterceptorInfoRepository(); 
          repository.initialise(dd);
       }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3JmxDeployment.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3JmxDeployment.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3JmxDeployment.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,13 +21,10 @@
 */
 package org.jboss.ejb3;
 
-import javax.management.ObjectName;
 import javax.security.jacc.PolicyConfiguration;
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.ejb3.security.JaccHelper;
 import org.jboss.logging.Logger;
-import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.remoting.transport.ConnectorMBean;
 
 /**
  * JBoss 4.0 Microkernel specific implementation
@@ -43,13 +40,12 @@
 
    public Ejb3JmxDeployment(DeploymentInfo di, EAR ear)
    {
-      super(new JmxDeploymentUnit(di));
+      super(new JmxDeploymentUnit(di), ear);
       this.deploymentInfo = di;
       kernelAbstraction = new JmxKernelAbstraction(di);
 
       // todo maybe mbeanServer should be injected?
       mbeanServer = di.getServer();
-      this.ear = ear;
    }
 
    protected PolicyConfiguration createPolicyConfiguration() throws Exception
@@ -71,21 +67,6 @@
 
    }
 
-   @Override
-   public String getDefaultClientBinding()
-   {
-      try
-      {
-         ObjectName on = new ObjectName("jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3");
-         ConnectorMBean connector = (ConnectorMBean) MBeanProxyExt.create(ConnectorMBean.class, on, deploymentInfo.getServer());
-         return connector.getInvokerLocator();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
    public DependencyPolicy createDependencyPolicy()
    {
       return new JmxDependencyPolicy();

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3Module.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3Module.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Ejb3Module.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,9 +21,7 @@
   */
 package org.jboss.ejb3;
 
-import java.util.Collection;
 import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
 import javax.management.ObjectName;
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.system.ServiceMBeanSupport;
@@ -43,78 +41,32 @@
    private Ejb3JmxDeployment deployment;
    private DeploymentInfo di;
 
-   private static class EARImpl implements EAR
-   {
-      private ConcurrentHashMap<String, Ejb3Deployment> deployments = new ConcurrentHashMap<String, Ejb3Deployment>();
-      private String shortName;
-      private String baseName;
+    public Ejb3Module(DeploymentInfo di)
+    {
+       EAR ear = null;
+       if (di.parent != null)
+       {
+          if (di.parent.shortName.endsWith(".ear") || di.parent.shortName.endsWith(".ear/"))
+          {
+             synchronized(di.parent.context)
+             {
+                ear = (EAR)di.parent.context.get("EJB3_EAR_METADATA");
+                if (ear == null)
+                {
+                   ear = new JmxEARImpl(di.parent.shortName);
+                   di.parent.context.put("EJB3_EAR_METADATA", ear);
+                }
+             }
+          }
+       }
+       deployment = new Ejb3JmxDeployment(di, ear);
+       if (ear != null)
+       {
+          ear.register(deployment);
+       }
+       this.di = di;
+    }
 
-      public EARImpl(String shortName)
-      {
-         this.shortName = shortName;
-         int idx = shortName.lastIndexOf('.');
-         baseName = shortName.substring(0, idx);
-      }
-
-      public Collection<Ejb3Deployment> getEjbDeployments()
-      {
-         return deployments.values();
-      }
-
-      public void register(Ejb3Deployment deployment)
-      {
-         deployments.put(deployment.getDeploymentUnit().getShortName(), deployment);
-      }
-
-      public void unregister(Ejb3Deployment deployment)
-      {
-         deployments.remove(deployment.getDeploymentUnit().getShortName());
-      }
-
-      public Ejb3Deployment findRelativeDeployment(String relativeName)
-      {
-         String relativeShortName = relativeName.substring(3);
-         return deployments.get(relativeShortName);
-      }
-
-      public String getShortName()
-      {
-         return shortName;
-      }
-
-      public String getBaseName()
-      {
-         return baseName;
-      }
-
-   }
-
-   public Ejb3Module(DeploymentInfo di)
-   {
-      EAR ear = null;
-      if (di.parent != null)
-      {
-         if (di.parent.shortName.endsWith(".ear") || di.parent.shortName.endsWith(".ear/"))
-         {
-            synchronized(di.parent.context)
-            {
-               ear = (EAR)di.parent.context.get("EJB3_EAR_METADATA");
-               if (ear == null)
-               {
-                  ear = new EARImpl(di.parent.shortName);
-                  di.parent.context.put("EJB3_EAR_METADATA", ear);
-               }
-            }
-         }
-      }
-      deployment = new Ejb3JmxDeployment(di, ear);
-      if (ear != null)
-      {
-         ear.register(deployment);
-      }
-      this.di = di;
-   }
-
    protected void createService() throws Exception
    {
       super.createService();

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/InitialContextFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/InitialContextFactory.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxClientKernelAbstraction.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/JmxClientKernelAbstraction.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxDependencyPolicy.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxDependencyPolicy.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxDependencyPolicy.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -73,7 +73,8 @@
       {
          ds = ds.substring(5);
       }
-      String onStr = "jboss.jca:name=" + ds + ",service=ManagedConnectionFactory";
+      //tring onStr = "jboss.jca:name=" + ds + ",service=ManagedConnectionFactory";
+      String onStr = "jboss.jca:name=" + ds + ",service=DataSourceBinding";
 
       try
       {

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxEARImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/JmxEARImpl.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxKernelAbstraction.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxKernelAbstraction.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/JmxKernelAbstraction.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -36,7 +36,9 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class JmxKernelAbstraction implements KernelAbstraction
+public class JmxKernelAbstraction
+   extends JmxClientKernelAbstraction
+   implements KernelAbstraction
 {
    private static final Logger log = Logger.getLogger(JmxKernelAbstraction.class);
 
@@ -46,12 +48,20 @@
 
    public JmxKernelAbstraction(DeploymentInfo di)
    {
+      super(di.getServer());
       this.server = di.getServer();
       serviceController = (ServiceControllerMBean) MBeanProxyExt.create(ServiceControllerMBean.class, ServiceControllerMBean.OBJECT_NAME,
-                                                                        server);
+            di.getServer());
       this.di = di;
    }
    
+   public JmxKernelAbstraction(MBeanServer server)
+   {
+      super(server);
+      serviceController = (ServiceControllerMBean) MBeanProxyExt.create(ServiceControllerMBean.class, ServiceControllerMBean.OBJECT_NAME,
+                                                                        server);
+   }
+   
    public void setMbeanServer(MBeanServer server)
    {
       this.server = server;
@@ -75,6 +85,10 @@
             log.info("\t" + obj);
          }
          ObjectName on = new ObjectName(name);
+         
+         if(policy.getDependencies().contains(on))
+            throw new IllegalStateException("circular dependencies detected");
+         
          server.registerMBean(service, on);
          addParentDependency(on);
 
@@ -103,6 +117,16 @@
       parent.mbeans.add(on);
 
    }
+   
+   private void removeParentDependency(ObjectName on)
+   {
+      DeploymentInfo parent = di;
+      while (parent.parent != null)
+      {
+         parent = parent.parent;
+      }
+      parent.mbeans.remove(on);
+   }
 
    public void installMBean(ObjectName on, DependencyPolicy dependencies, Object service)
    {
@@ -127,6 +151,8 @@
          serviceController.stop(on);
          serviceController.destroy(on);
          serviceController.remove(on);
+         removeParentDependency(on);
+         server.unregisterMBean(on);
       }
       catch (Exception e)
       {
@@ -136,16 +162,16 @@
 
    public void uninstall(String name)
    {
+      ObjectName on;
       try
       {
-         ObjectName on = new ObjectName(name);
-         serviceController.stop(on);
-         serviceController.destroy(on);
-         serviceController.remove(on);
+         on = new ObjectName(name);
       }
       catch (Exception e)
       {
          throw new RuntimeException(e);
       }
+      
+      uninstallMBean(on);
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/KernelAbstraction.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/KernelAbstraction.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/KernelAbstraction.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -31,7 +31,7 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public interface KernelAbstraction
+public interface KernelAbstraction extends ClientKernelAbstraction
 {
    public void install(String name, DependencyPolicy dependencies, Object service);
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/KernelAbstractionFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/KernelAbstractionFactory.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Pool.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Pool.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/Pool.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3;
 
-import org.jboss.ejb3.injection.Injector;
+import org.jboss.injection.Injector;
 
 /**
  * Minimally a pool acts as a factory for a bean.  It will handle callbacks
@@ -60,4 +60,6 @@
    public void setInjectors(Injector[] injectors);
 
    void initialize(Container container, Class contextClass, Class beanClass, int maxSize, long timeout);
+
+   void setMaxSize(int maxSize);
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyDeployer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyDeployer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyDeployer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,6 +22,8 @@
 package org.jboss.ejb3;
 
 import java.util.ArrayList;
+import java.util.List;
+
 import org.jboss.annotation.ejb.Clustered;
 import org.jboss.annotation.ejb.LocalBinding;
 import org.jboss.annotation.ejb.LocalBindingImpl;
@@ -54,8 +56,7 @@
    private static final Logger log = Logger.getLogger(ProxyDeployer.class);
    private Container container;
    private Advisor advisor;
-   private ArrayList proxyFactories = new ArrayList();
-   private String defaultClientBinding = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
+   private ArrayList<ProxyFactory> proxyFactories = new ArrayList<ProxyFactory>();
    private RemoteBindings remoteBindings;
    private LocalBinding localBinding;
 
@@ -65,10 +66,7 @@
       this.advisor = (Advisor) container;
    }
 
-   public void setDefaultClientBinding(String defaultClientBinding)
-   {
-      this.defaultClientBinding = defaultClientBinding;
-   }
+   public List<ProxyFactory> getProxyFactories() { return proxyFactories; }
 
    public void start() throws Exception
    {
@@ -136,8 +134,7 @@
                log.debug("there is remote interfaces for " + container.getEjbName());
                String jndiName = ProxyFactoryHelper.getDefaultRemoteJndiName(container);
                log.debug("default remote binding has jndiName of " + jndiName);
-               // todo we need to have a way to define default configuration
-               String uri = defaultClientBinding;
+               String uri = ""; // use the default
                Class factory = null;
                factory = getDefaultRemoteProxyFactory();
                RemoteBinding[] list = {new RemoteBindingImpl(jndiName, "", uri, factory)};

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -31,8 +31,12 @@
 {
    public void setContainer(Container container);
 
+   public Object createHomeProxy();
+   
    public Object createProxy();
 
+   public Object createProxy(Object id);
+   
    public void start() throws Exception;
 
    public void stop() throws Exception;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -28,12 +28,14 @@
 import org.jboss.ejb.LocalImpl;
 import org.jboss.ejb.RemoteImpl;
 import org.jboss.logging.Logger;
+import org.jboss.ejb3.remoting.RemoteProxyFactory;
 
 import javax.ejb.Local;
 import javax.ejb.LocalHome;
 import javax.ejb.Remote;
 import javax.ejb.RemoteHome;
 import javax.jws.WebService;
+import javax.management.ObjectName;
 import javax.naming.Context;
 import javax.naming.NameNotFoundException;
 import javax.naming.NamingException;
@@ -416,5 +418,24 @@
       if (ear != null) return ear.getBaseName() + "/" + name;
       return name;
    }
-
+   
+   public static String getClientBindUrl(RemoteBinding binding) throws Exception
+   {
+      String clientBindUrl = binding.clientBindUrl();
+      if (clientBindUrl.trim().length() == 0)
+      {
+         ObjectName connectionON = new ObjectName("jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3");
+         KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
+         try
+         {
+            clientBindUrl = (String)kernelAbstraction.getAttribute(connectionON, "InvokerLocator");
+         }
+         catch (Exception e)
+         {
+            clientBindUrl = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
+         }
+      }
+      
+      return clientBindUrl;
+   }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ServiceDelegateWrapper.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ServiceDelegateWrapper.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ServiceDelegateWrapper.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,6 +23,9 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+
+import javax.ejb.TimerService;
+
 import org.jboss.system.ServiceMBeanSupport;
 
 /**
@@ -138,4 +141,10 @@
          else throw new RuntimeException(t);
       }
    }
+   
+   // FIXME: this is here for EJBTHREE-630, re-establishing timers
+   public TimerService getTimerService(Object pKey)
+   {
+      return ((Container) delegate).getTimerService(pKey);
+   }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ServiceDelegateWrapperMBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ServiceDelegateWrapperMBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/ServiceDelegateWrapperMBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,6 +21,8 @@
 */
 package org.jboss.ejb3;
 
+import javax.ejb.TimerService;
+
 import org.jboss.system.ServiceMBean;
 
 /**
@@ -31,4 +33,6 @@
  */
 public interface ServiceDelegateWrapperMBean extends ServiceMBean
 {
+   // FIXME: this is here to re-establish timers (EJBTHREE-630), do not use for other purposes
+   TimerService getTimerService(Object pKey);
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/SessionContainer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/SessionContainer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/SessionContainer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -25,15 +25,22 @@
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
+
+import javax.ejb.EJBObject;
+import javax.ejb.Handle;
 import javax.ejb.LocalHome;
 import javax.ejb.RemoteHome;
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.Dispatcher;
+import org.jboss.aop.MethodInfo;
+import org.jboss.aop.advice.Interceptor;
 import org.jboss.aop.joinpoint.Invocation;
 import org.jboss.aop.joinpoint.InvocationResponse;
 import org.jboss.aop.util.MethodHashing;
+import org.jboss.aspects.asynch.FutureHolder;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
 import org.jboss.ejb3.remoting.IsLocalInterceptor;
+import org.jboss.ejb3.stateful.StatefulContainerInvocation;
 import org.jboss.logging.Logger;
 import org.jboss.serial.io.MarshalledObjectForLocalCalls;
 
@@ -45,11 +52,26 @@
  */
 public abstract class SessionContainer extends EJBContainer
 {
+   @SuppressWarnings("unused")
    private static final Logger log = Logger.getLogger(SessionContainer.class);
 
    protected ProxyDeployer proxyDeployer;
    protected Map clusterFamilies = new HashMap();
 
+   public class InvokedMethod
+   {
+      public InvokedMethod(boolean localInterface, Method method)
+      {
+         isLocalInterface = localInterface;
+         this.method = method;
+      }
+
+      public boolean isLocalInterface;
+      public Method method;
+   }
+
+   protected ThreadLocalStack<InvokedMethod> invokedMethod = new ThreadLocalStack<InvokedMethod>();
+
    public SessionContainer(ClassLoader cl, String beanClassName, String ejbName, AspectManager manager,
                            Hashtable ctxProperties, InterceptorInfoRepository interceptorRepository,
                            Ejb3Deployment deployment)
@@ -58,9 +80,26 @@
       proxyDeployer = new ProxyDeployer(this);
    }
 
-   public void setDefaultClientBinding(String binding)
+   public Class getInvokedBusinessInterface()
    {
-      proxyDeployer.setDefaultClientBinding(binding);
+      InvokedMethod method = invokedMethod.get();
+      if (method == null) throw new IllegalStateException("getInvokedBusinessInterface() being invoked outside of a business invocation");
+      if (method.method == null) throw new IllegalStateException("getInvokedBusinessInterface() being invoked outside of a business invocation");
+      if (method.isLocalInterface) return method.method.getDeclaringClass();
+      Class[] remoteInterfaces = ProxyFactoryHelper.getRemoteInterfaces(this);
+      for (Class intf : remoteInterfaces)
+      {
+         try
+         {
+            intf.getMethod(method.method.getName(), method.method.getParameterTypes());
+            return intf;
+         }
+         catch (NoSuchMethodException ignored)
+         {
+            // continue
+         }
+      }
+      throw new IllegalStateException("Unable to find geInvokedBusinessInterface()");
    }
 
    @Override
@@ -181,6 +220,18 @@
       return false;
    }
 
+   public static InvocationResponse marshallException(Invocation invocation, Throwable exception, Map responseContext) throws Throwable
+   {
+      if (!invocation.getMetaData().hasTag(IsLocalInterceptor.IS_LOCAL)) throw exception;
+
+      InvocationResponse response = new InvocationResponse();
+      response.setContextInfo(responseContext);
+
+      response.addAttachment(IsLocalInterceptor.IS_LOCAL_EXCEPTION, new MarshalledObjectForLocalCalls(exception));
+
+      return response;
+   }
+
    public static InvocationResponse marshallResponse(Invocation invocation, Object rtn, Map responseContext)
            throws java.io.IOException
    {
@@ -197,4 +248,174 @@
       response.setContextInfo(responseContext);
       return response;
    }
+   
+   /**
+    * Invoke a method on the virtual EJB bean. The method must be one of the methods defined in one
+    * of the business interfaces (or home interface) of the bean.
+    * 
+    * TODO: work in progress
+    * 
+    * @param factory    the originating end point
+    * @param id         unique identifier (primary key), can be null for stateless
+    * @param method     the business or home method to invoke
+    * @param args       the arguments for the method
+    * @param provider   for asynchronous usage
+    */
+   public Object invoke(ProxyFactory factory, Object id, Method method, Object args[], FutureHolder provider) throws Throwable
+   {
+      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+      ThreadLocalENCFactory.push(enc);
+      try
+      {
+         long hash = MethodHashing.calculateHash(method);
+         MethodInfo info = (MethodInfo) methodInterceptors.get(hash);
+         if (info == null)
+         {
+            throw new RuntimeException(
+                    "Could not resolve beanClass method from proxy call: "
+                            + method.toString());
+         }
+
+         Method unadvisedMethod = info.getUnadvisedMethod();
+
+         if (unadvisedMethod != null && isHomeMethod(unadvisedMethod))
+         {
+            return invokeHomeMethod(factory, info, args);
+         }
+         else if (unadvisedMethod != null && isEJBObjectMethod(unadvisedMethod))
+         {
+            return invokeEJBObjectMethod(factory, id, info, args);
+         }
+
+         Interceptor[] aspects = info.getInterceptors();
+         // FIXME: Ahem, stateful container invocation works on all.... (violating contract though)
+         EJBContainerInvocation nextInvocation = new StatefulContainerInvocation(info, aspects, id);
+         nextInvocation.setAdvisor(this);
+         nextInvocation.setArguments(args);
+         
+         // allow a container to supplement information into an invocation
+         nextInvocation = populateInvocation(nextInvocation);
+
+         ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
+         try
+         {
+            invokedMethod.push(new InvokedMethod(true, method));
+            return nextInvocation.invokeNext();
+         }
+         finally
+         {
+            invokedMethod.pop();
+         }
+      }
+      finally
+      {
+         Thread.currentThread().setContextClassLoader(oldLoader);
+         ThreadLocalENCFactory.pop();
+      }
+   }
+   
+   /**
+    * TODO: work in progress (refactor both invokeHomeMethod's, localHomeInvoke)
+    */
+   private Object invokeHomeMethod(ProxyFactory factory, MethodInfo info, Object args[]) throws Exception
+   {
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if (unadvisedMethod.getName().equals("create"))
+      {
+         Class[] initParameterTypes = {};
+         Object[] initParameterValues = {};
+         if (unadvisedMethod.getParameterTypes().length > 0)
+         {
+            initParameterTypes = unadvisedMethod.getParameterTypes();
+            initParameterValues = args;
+         }
+
+         Object id = createSession(initParameterTypes, initParameterValues);
+         
+         Object proxy = factory.createProxy(id);
+
+         return proxy;
+      }
+      else if (unadvisedMethod.getName().equals("remove"))
+      {
+         if(args[0] instanceof Handle)
+            removeHandle((Handle) args[0]);
+         else
+            destroySession(args[0]);
+
+         return null;
+      }
+      else
+      {
+         throw new IllegalArgumentException("illegal home method " + unadvisedMethod);
+      }
+   }
+   
+   /**
+    * Create session to an EJB bean.
+    * 
+    * @param initParameterTypes     the parameter types used by the home's create method
+    * @param initParameterValues    the arguments for the home's create method
+    * @return   the identifier of the session
+    */
+   abstract protected Object createSession(Class initParameterTypes[], Object initParameterValues[]);
+   
+   /**
+    * Destroy a created session.
+    * 
+    * @param id     the identifier of the session
+    */
+   protected void destroySession(Object id)
+   {
+      throw new RuntimeException("NYI");
+   }
+   
+   protected Object invokeEJBObjectMethod(ProxyFactory factory, Object id, MethodInfo info, Object args[]) throws Exception
+   {
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if(unadvisedMethod.getName().equals("getEJBHome"))
+      {
+         return factory.createHomeProxy();
+      }
+      if(unadvisedMethod.getName().equals("getPrimaryKey"))
+      {
+         return id;
+      }
+      if(unadvisedMethod.getName().equals("isIdentical"))
+      {
+         // object has no identity
+         if(id == null)
+            return false;
+         
+         EJBObject bean = (EJBObject) args[0];
+
+         Object primaryKey = bean.getPrimaryKey();
+         if(primaryKey == null)
+            return false;
+
+         boolean isIdentical = id.equals(primaryKey);
+
+         return isIdentical;
+      }
+      if (unadvisedMethod.getName().equals("remove"))
+      {
+         destroySession(id);
+
+         return null;
+      }
+      throw new RuntimeException("NYI");
+   }
+   
+   /**
+    * Allow a container sub class to supplement an invocation. Per default nothing to supplement.
+    * 
+    * @param invocation
+    * @return
+    */
+   protected EJBContainerInvocation populateInvocation(EJBContainerInvocation invocation)
+   {
+      return invocation;
+   }
+   
+   abstract protected void removeHandle(Handle handle) throws Exception;
 }
\ No newline at end of file

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/StrictMaxPool.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/StrictMaxPool.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/StrictMaxPool.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -77,6 +77,12 @@
       this.strictMaxSize = new FIFOSemaphore(maxSize);
       this.strictTimeout = timeout;
    }
+   
+   public void setMaxSize(int maxSize)
+   {
+      this.maxSize = maxSize;
+      this.strictMaxSize = new FIFOSemaphore(maxSize);
+   }
 
    /**
     * Get an instance without identity.

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/cache/StatefulReplicationInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/cache/StatefulReplicationInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/cache/StatefulReplicationInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -56,8 +56,13 @@
       StatefulContainerInvocation ejb = (StatefulContainerInvocation) invocation;
       StatefulBeanContext ctx = (StatefulBeanContext) ejb.getBeanContext();
       StatefulContainer container = (StatefulContainer) ejb.getAdvisor();
-      ClusteredStatefulCache cache = (ClusteredStatefulCache) container.getCache();
-      cache.replicate(ctx);
+      // has not been overriden
+      if (container.getCache() instanceof ClusteredStatefulCache)
+      {
+         ClusteredStatefulCache cache = (ClusteredStatefulCache) container.getCache();
+         cache.replicate(ctx);
+      }
+      
       return rtn;
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -154,6 +154,8 @@
       CacheConfig config = (CacheConfig) advisor.resolveAnnotation(CacheConfig.class);
       maxSize = config.maxSize();
       sessionTimeout = config.idleTimeoutSeconds();
+      log.info("Initializing SimpleStatefulCache with maxSize: " +maxSize + " timeout: " +sessionTimeout +
+              " for " +container.getObjectName().getCanonicalName() );
       timeoutTask = new SessionTimeoutTask("SFSB Passivation Thread - " + container.getObjectName().getCanonicalName());
    }
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/dd/ResourceEnvRef.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/dd/ResourceEnvRef.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/dd/ResourceEnvRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,10 +21,11 @@
   */
 package org.jboss.ejb3.dd;
 
-import javax.annotation.AuthenticationType;
 
 import org.jboss.logging.Logger;
 
+import javax.annotation.Resource.AuthenticationType;
+
 /**
  * Represents a <resource-env-ref> element of the ejb-jar.xml deployment descriptor for the
  * 1.4 schema

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/dd/ResourceRef.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/dd/ResourceRef.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/dd/ResourceRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.dd;
 
-import javax.annotation.AuthenticationType;
+import javax.annotation.Resource.AuthenticationType;
 
 import org.jboss.ejb3.Container;
 import org.jboss.logging.Logger;

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentEjbResolver.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc/DeploymentEjbResolver.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentEjbResolver.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,171 +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 org.jboss.ejb3.enc;
-
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.ProxyFactoryHelper;
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.EAR;
-
-import javax.naming.NameNotFoundException;
-import java.util.Iterator;
-
-/**
- * Class to resolve EJB containers from ejb-ref or @EJB metadata
- * This class is overriden for specific behaviors, specifically whether or not
- * to resolve the EJB internally in a specific deployment or not.  There will be one for
- * an EJB jar deployment and a WAR deployment and any other deployment package that needs to
- * use @EJB.
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56489 $
- */
-public abstract class DeploymentEjbResolver
-{
-   protected EAR ear;
-   protected String errorName;
-
-   protected DeploymentEjbResolver(EAR ear, String errorName)
-   {
-      this.ear = ear;
-      this.errorName = errorName;
-   }
-
-   protected abstract EJBContainer searchDeploymentInternally(String ejbLink, Class businessIntf);
-
-   public EJBContainer getEjbContainer(String ejbLink, Class businessIntf)
-   {
-      int hashIndex = ejbLink.indexOf('#');
-      if (hashIndex != -1)
-      {
-         if (ear == null) return null;
-         String relativePath = ejbLink.substring(0, hashIndex);
-         Ejb3Deployment dep = ear.findRelativeDeployment(relativePath);
-         if (dep == null) return null;
-         String ejbName = ejbLink.substring(hashIndex);
-         return dep.getEjbContainer(ejbName, businessIntf);
-      }
-      // look internally
-      EJBContainer ejb = searchDeploymentInternally(ejbLink, businessIntf);
-      if (ejb != null) return ejb;
-      for (Object obj : Ejb3Registry.getContainers())
-      {
-         EJBContainer container = (EJBContainer) obj;
-         if (container.getEjbName().equals(ejbLink))
-         {
-            return container;
-         }
-      }
-      return null;
-   }
-
-   public String getEjbJndiName(String ejbLink, Class businessIntf)
-   {
-      EJBContainer container = getEjbContainer(ejbLink, businessIntf);
-      if (container == null)
-      {
-         return null;
-      }
-      return ProxyFactoryHelper.getJndiName(container, businessIntf);
-   }
-
-   public EJBContainer getEjbContainer(Ejb3Deployment deployment, Class businessIntf) throws NameNotFoundException
-   {
-      EJBContainer container = null;
-      // search in myself
-      for (Object obj : deployment.getEjbContainers().values())
-      {
-         EJBContainer newContainer = (EJBContainer) obj;
-         if (container == newContainer) continue;
-         if (ProxyFactoryHelper.publishesInterface(newContainer, businessIntf))
-         {
-            if (container != null) throw new NameNotFoundException("duplicated in " + errorName);
-            container = newContainer;
-         }
-      }
-      return container;
-   }
-
-   public EJBContainer getEjbContainer(Class businessIntf) throws NameNotFoundException
-   {
-      EJBContainer rtnContainer = null;
-      // search in deployment first
-      rtnContainer = searchForEjbContainerInternally(businessIntf);
-      if (rtnContainer != null) return rtnContainer;
-      // search in EAR
-      String jarName = null;
-      if (ear != null)
-      {
-         for (Ejb3Deployment deployment : ear.getEjbDeployments())
-         {
-            EJBContainer newContainer = getEjbContainer(deployment, businessIntf);
-            if (rtnContainer == newContainer) continue; // don't check self
-            if (rtnContainer != null && newContainer != null)
-            {
-               throw new NameNotFoundException("duplicated in .ear within " + jarName +
-                       " and " + deployment.getDeploymentUnit().getShortName());
-            }
-            if (newContainer != null)
-            {
-               rtnContainer = newContainer;
-               jarName = deployment.getDeploymentUnit().getShortName();
-            }
-         }
-      }
-      if (rtnContainer != null)
-      {
-         return rtnContainer;
-      }
-      // search everywhere
-      Iterator containers = Ejb3Registry.getContainers().iterator();
-      while (containers.hasNext())
-      {
-         Container container = (Container)containers.next();
-         EJBContainer ejbContainer = (EJBContainer) container;
-         if (ejbContainer == rtnContainer) continue;
-         if (ProxyFactoryHelper.publishesInterface(container, businessIntf))
-         {
-            if (rtnContainer != null)
-            {
-               throw new NameNotFoundException("duplicated in " + ejbContainer.getDeployment().getDeploymentUnit().getShortName()
-                       + " and " + jarName);
-            }
-            rtnContainer = ejbContainer;
-            jarName = ejbContainer.getDeployment().getDeploymentUnit().getShortName();
-         }
-      }
-      if (rtnContainer != null) return rtnContainer;
-      throw new NameNotFoundException("not used by any EJBs");
-   }
-
-   protected abstract EJBContainer searchForEjbContainerInternally(Class businessIntf) throws NameNotFoundException;
-
-   public String getEjbJndiName(Class businessIntf) throws NameNotFoundException
-   {
-      EJBContainer container = getEjbContainer(businessIntf);
-      String jndiName = ProxyFactoryHelper.getJndiName(container, businessIntf);
-      if (jndiName == null) throw new NameNotFoundException("not used by any EJBs");
-      return jndiName;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentEjbResolver.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc/DeploymentEjbResolver.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentPersistenceUnitResolver.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc/DeploymentPersistenceUnitResolver.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentPersistenceUnitResolver.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,125 +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 org.jboss.ejb3.enc;
-
-import org.jboss.ejb3.entity.PersistenceUnitDeployment;
-import org.jboss.ejb3.PersistenceUnitRegistry;
-import org.jboss.ejb3.EAR;
-import org.jboss.ejb3.Ejb3Deployment;
-
-import javax.naming.NameNotFoundException;
-import java.util.List;
-import java.util.LinkedHashMap;
-
-/**
- * Resolves persistence units for @PersistenceContext and @PersistenceUnit
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 45989 $
- */
-public class DeploymentPersistenceUnitResolver
-{
-   protected List<PersistenceUnitDeployment> persistenceUnitDeployments;
-   protected EAR ear;
-   protected LinkedHashMap ejbContainers;
-
-   public DeploymentPersistenceUnitResolver(List<PersistenceUnitDeployment> persistenceUnitDeployments, EAR ear, LinkedHashMap ejbContainers)
-   {
-      this.persistenceUnitDeployments = persistenceUnitDeployments;
-      this.ear = ear;
-      this.ejbContainers = ejbContainers;
-   }
-
-   public PersistenceUnitDeployment getPersistenceUnitDeployment(String unitName) throws NameNotFoundException
-   {
-      if ("".equals(unitName))
-      {
-         if (persistenceUnitDeployments == null)
-         {
-            throw new NameNotFoundException("EMPTY STRING unitName but there is no deployments in scope");
-         }
-         if (persistenceUnitDeployments.size() == 1 && ejbContainers.size() > 0)
-         {
-            return persistenceUnitDeployments.get(0);
-         }
-         else if (persistenceUnitDeployments.size() > 1)
-         {
-            throw new NameNotFoundException("EMPTY STRING unitName and there is more than one scoped persistence unit");
-         }
-         throw new NameNotFoundException("There is no default persistence unit in this deployment.");
-      }
-      int hashIndex = unitName.indexOf('#');
-      if (hashIndex != -1)
-      {
-         String relativePath = unitName.substring(0, hashIndex);
-         String name = unitName.substring(hashIndex + 1);
-         if (ear == null)
-         {
-            String relativeJarName = relativePath.substring(3);
-            // look in global EJB jars.
-            for (PersistenceUnitDeployment pud : PersistenceUnitRegistry.getPersistenceUnits())
-            {
-               String jarName = pud.getDeployment().getDeploymentUnit().getShortName() + ".jar";
-               if (pud.getDeployment().getEar() == null
-                       && jarName.equals(relativeJarName)
-                       && pud.getEntityManagerName().equals(name)
-                       && pud.isScoped())
-               {
-                  return pud;
-               }
-            }
-            return null;
-         }
-         Ejb3Deployment dep = ear.findRelativeDeployment(relativePath);
-         if (dep == null)
-         {
-            return null;
-         }
-         PersistenceUnitDeployment rtn = dep.getPersistenceUnitDeploymentInternal(name);
-         return rtn;
-      }
-      PersistenceUnitDeployment rtn = getPersistenceUnitDeploymentInternal(unitName);
-      if (rtn != null) return rtn;
-
-      for (PersistenceUnitDeployment deployment : PersistenceUnitRegistry.getPersistenceUnits())
-      {
-         if (deployment.isScoped()) continue;
-         if (deployment.getEntityManagerName().equals(unitName)) return deployment;
-      }
-      return rtn;
-   }
-
-   public PersistenceUnitDeployment getPersistenceUnitDeploymentInternal(String unitName)
-   {
-      if (persistenceUnitDeployments != null)
-      {
-         for (PersistenceUnitDeployment deployment : persistenceUnitDeployments)
-         {
-            if (deployment.getEntityManagerName().equals(unitName))
-            {
-               return deployment;
-            }
-         }
-      }
-      return null;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/DeploymentPersistenceUnitResolver.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc/DeploymentPersistenceUnitResolver.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModuleEjbResolver.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc/EjbModuleEjbResolver.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModuleEjbResolver.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,71 +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 org.jboss.ejb3.enc;
-
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.EAR;
-
-import javax.naming.NameNotFoundException;
-import java.util.LinkedHashMap;
-
-/**
- * Resolve EJBs.
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 45989 $
- */
-public class EjbModuleEjbResolver extends DeploymentEjbResolver
-{
-   protected LinkedHashMap ejbContainers;
-   protected Ejb3Deployment deployment;
-
-   public EjbModuleEjbResolver(EAR ear, String errorName, LinkedHashMap ejbContainers, Ejb3Deployment deployment)
-   {
-      super(ear, errorName);
-      this.ejbContainers = ejbContainers;
-      this.deployment = deployment;
-   }
-
-   @Override
-   protected EJBContainer searchDeploymentInternally(String ejbLink, Class businessIntf)
-   {
-      for (Object obj : ejbContainers.values())
-      {
-         EJBContainer container = (EJBContainer) obj;
-         if (container.getEjbName().equals(ejbLink))
-         {
-            return container;
-         }
-      }
-      return null;
-   }
-
-   @Override
-   protected EJBContainer searchForEjbContainerInternally(Class businessIntf) throws NameNotFoundException
-   {
-      EJBContainer rtnContainer;
-      rtnContainer = getEjbContainer(deployment, businessIntf);
-      return rtnContainer;
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModuleEjbResolver.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc/EjbModuleEjbResolver.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModulePersistenceUnitResolver.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc/EjbModulePersistenceUnitResolver.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModulePersistenceUnitResolver.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,42 +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 org.jboss.ejb3.enc;
-
-import org.jboss.ejb3.entity.PersistenceUnitDeployment;
-import org.jboss.ejb3.EAR;
-
-import java.util.List;
-import java.util.LinkedHashMap;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 45989 $
- */
-public class EjbModulePersistenceUnitResolver extends DeploymentPersistenceUnitResolver
-{
-   public EjbModulePersistenceUnitResolver(List<PersistenceUnitDeployment> persistenceUnitDeployments, EAR ear, LinkedHashMap ejbContainers)
-   {
-      super(persistenceUnitDeployments, ear, ejbContainers);
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/enc/EjbModulePersistenceUnitResolver.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/enc/EjbModulePersistenceUnitResolver.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/entity/PersistenceUnitDeployment.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/entity/PersistenceUnitDeployment.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/entity/PersistenceUnitDeployment.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -269,13 +269,13 @@
       if (entityManagerJndiName != null)
       {
          EntityManager injectedManager = new TransactionScopedEntityManager(managedFactory);
-         NonSerializableFactory.bind(initialContext, entityManagerJndiName, injectedManager);
+         NonSerializableFactory.rebind(initialContext, entityManagerJndiName, injectedManager);
       }
       String entityManagerFactoryJndiName = (String) props.get("jboss.entity.manager.factory.jndi.name");
       if (entityManagerFactoryJndiName != null)
       {
          EntityManagerFactory injectedFactory = new InjectedEntityManagerFactory(managedFactory);
-         NonSerializableFactory.bind(initialContext, entityManagerFactoryJndiName, injectedFactory);
+         NonSerializableFactory.rebind(initialContext, entityManagerFactoryJndiName, injectedFactory);
       }
    }
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/iiop)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,252 +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 org.jboss.ejb3.iiop;
-
-import java.lang.reflect.Method;
-import java.security.Principal;
-import java.util.HashMap;
-
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.SessionContainer;
-import org.jboss.ejb3.stateful.StatefulContainer;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.iiop.CorbaORB;
-import org.jboss.iiop.csiv2.SASCurrent;
-import org.jboss.iiop.rmi.AttributeAnalysis;
-import org.jboss.iiop.rmi.InterfaceAnalysis;
-import org.jboss.iiop.rmi.OperationAnalysis;
-import org.jboss.iiop.rmi.RmiIdlUtil;
-import org.jboss.iiop.rmi.marshal.strategy.SkeletonStrategy;
-import org.jboss.invocation.iiop.ReferenceData;
-import org.jboss.logging.Logger;
-import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SimplePrincipal;
-import org.jboss.tm.TransactionManagerLocator;
-import org.jboss.tm.iiop.TxServerInterceptor;
-import org.omg.CORBA.BAD_OPERATION;
-import org.omg.CORBA.InterfaceDef;
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.ORBPackage.InvalidName;
-import org.omg.CORBA.portable.InputStream;
-import org.omg.CORBA.portable.InvokeHandler;
-import org.omg.CORBA.portable.OutputStream;
-import org.omg.CORBA.portable.ResponseHandler;
-import org.omg.PortableServer.Current;
-import org.omg.PortableServer.POA;
-import org.omg.PortableServer.Servant;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: 55486 $
- */
-public class BeanCorbaServant extends Servant
-   implements InvokeHandler
-{
-   private static final Logger log = Logger.getLogger(BeanCorbaServant.class);
-
-   private final IORFactory factory;
-   private final Current poaCurrent;
-   private final Container container;
-   private final InterfaceDef interfaceDef;
-   private final String repositoryIds[];
-   private SASCurrent sasCurrent;
-
-   private HashMap<String, SkeletonStrategy> methodMap;
-   
-   protected BeanCorbaServant(IORFactory factory, Current poaCurrent, Container container, InterfaceDef interfaceDef, InterfaceAnalysis interfaceAnalysis)
-   {
-      assert factory != null;
-      assert poaCurrent != null;
-      assert container != null;
-      assert container instanceof SessionContainer; // see invoke
-      assert interfaceDef != null;
-      assert interfaceAnalysis != null;
-      
-      this.factory = factory;
-      this.poaCurrent = poaCurrent;
-      this.container = container;
-      this.interfaceDef = interfaceDef;
-      this.repositoryIds = interfaceAnalysis.getAllTypeIds();
-      
-      try
-      {
-         this.sasCurrent = (SASCurrent) CorbaORB.getInstance().resolve_initial_references("SASCurrent");
-      }
-      catch (InvalidName e)
-      {
-         log.warn("Can't find SASCurrent");
-         this.sasCurrent = null;
-      }
-      
-      this.methodMap = new HashMap<String, SkeletonStrategy>();
-      AttributeAnalysis[] attrs = interfaceAnalysis.getAttributes();
-      for (int i = 0; i < attrs.length; i++) {
-         OperationAnalysis op = attrs[i].getAccessorAnalysis();
-
-         log.debug("    " + op.getJavaName() + ": " + op.getIDLName());
-         methodMap.put(op.getIDLName(),
-                           new SkeletonStrategy(op.getMethod()));
-         op = attrs[i].getMutatorAnalysis();
-         if (op != null) {
-            log.debug("    " + op.getJavaName() + ": " + op.getIDLName());
-            methodMap.put(op.getIDLName(),
-                              new SkeletonStrategy(op.getMethod()));
-         }
-      }
-
-      OperationAnalysis[] ops = interfaceAnalysis.getOperations();
-      for (int i = 0; i < ops.length; i++) {
-         log.debug("    " + ops[i].getJavaName() + ": " + ops[i].getIDLName());
-         methodMap.put(ops[i].getIDLName(),
-                           new SkeletonStrategy(ops[i].getMethod()));
-      }
-   }
-   
-   @Override
-   public String[] _all_interfaces(POA poa, byte[] objectId)
-   {
-      return (String[]) repositoryIds.clone();
-   }
-
-   /**
-    * Returns an IR object describing the bean's remote interface.
-    */
-   @Override
-   public org.omg.CORBA.Object _get_interface_def()
-   {
-      if (interfaceDef != null)
-         return interfaceDef;
-      else
-         return super._get_interface_def();
-   }
-   
-   public OutputStream _invoke(String opName, InputStream in, ResponseHandler handler) throws SystemException
-   {
-      log.trace("invoke: " + opName);
-      
-      SkeletonStrategy op = (SkeletonStrategy) methodMap.get(opName);
-      if (op == null)
-      {
-         log.debug("Unable to find opname '" + opName + "' valid operations:" + methodMap.keySet());
-         throw new BAD_OPERATION(opName);
-      }
-
-      org.omg.CORBA_2_3.portable.OutputStream out;
-      try
-      {
-         Object id = ReferenceData.extractObjectId(poaCurrent.get_object_id());
-         log.trace("id = " + id);
-         
-         Transaction tx = TxServerInterceptor.getCurrentTransaction();
-         log.trace("tx = " + tx);
-         
-         if(sasCurrent != null)
-         {
-            byte username[] = sasCurrent.get_incoming_username();
-            byte credentials[] = sasCurrent.get_incoming_password();
-            byte principalName[] = sasCurrent.get_incoming_principal_name();
-            
-            if(username != null && username.length > 0)
-            {
-               String name = new String(username, "UTF-8");
-               int domainIndex = name.lastIndexOf("@");
-               if(domainIndex > 0)
-                  name = name.substring(0, domainIndex);
-               log.debug("username = " + name);
-               Principal principal = new SimplePrincipal(name);
-               SecurityAssociation.setPrincipal(principal);
-            }
-            
-            if(credentials != null && credentials.length > 0)
-            {
-               SecurityAssociation.setCredential(new String(credentials, "UTF-8").toCharArray());
-            }
-            
-            if(principalName != null && principalName.length > 0)
-               log.warn("principalName = " + new String(principalName, "UTF-8")); // FIXME: implement principalName support
-         }
-         
-         Object args[] = op.readParams((org.omg.CORBA_2_3.portable.InputStream) in);
-         
-         Object retVal = invoke(tx, id, op.getMethod(), args);
-         
-         out = (org.omg.CORBA_2_3.portable.OutputStream) handler.createReply();
-         if(op.isNonVoid())
-            op.writeRetval(out, retVal);
-      }
-      catch(Throwable t)
-      {
-         // TODO: check log level before stacktrace?
-         t.printStackTrace();
-         if(t instanceof Exception)
-         {
-            Exception e = (Exception) t;
-            RmiIdlUtil.rethrowIfCorbaSystemException(e);
-            out = (org.omg.CORBA_2_3.portable.OutputStream) handler.createExceptionReply();
-            op.writeException(out, e);
-         }
-         else
-            throw new RuntimeException("NYI");
-      }
-      return out;
-   }
-
-   private TransactionManager getTransactionManager()
-   {
-      //return TxUtil.getTransactionManager();
-      return TransactionManagerLocator.getInstance().locate();
-   }
-   
-   private Object invoke(Object id, Method method, Object args[]) throws Throwable
-   {
-      // TODO: Support other containers beside Stateless and Stateful?
-      return ((SessionContainer) container).invoke(factory, id, method, args, null);
-   }
-   
-   private Object invoke(Transaction tx, Object id, Method method, Object args[]) throws Throwable
-   {
-      if(tx == null)
-         return invoke(id, method, args);
-      
-      // FIXME: refactor TxServerInterceptor so that it pushed the tpc into the invocation like ClientTxPropegationInterceptor
-      // this would require the localInvoke to be also refactored, so that it uses invocation instead of localInvoke.
-      TransactionManager tm = getTransactionManager();
-      
-      // see TxPropagationInterceptor
-      if(tm.getTransaction() != null)
-         throw new RuntimeException("cannot import a transaction context when a transaction is already associated with the thread");
-      tm.resume(tx);
-      try
-      {
-         return invoke(id, method, args);
-      }
-      finally
-      {
-         tm.suspend();
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/EJB3IIOPWebClassLoader.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/iiop/EJB3IIOPWebClassLoader.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/EJB3IIOPWebClassLoader.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,55 +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 org.jboss.ejb3.iiop;
-
-import javax.management.ObjectName;
-
-import org.jboss.iiop.WebCL;
-import org.jboss.mx.loading.RepositoryClassLoader;
-
-/**
- * The getKey method of the WebCL class is not working in EJB3, this class fixes that.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: 46552 $
- */
-public class EJB3IIOPWebClassLoader extends WebCL
-{
-   private String jndiName;
-   
-   public EJB3IIOPWebClassLoader(ObjectName container, RepositoryClassLoader parent, String jndiName)
-   {
-      super(container, parent);
-      this.jndiName = jndiName;
-   }
-
-   @Override
-   public String getKey()
-   {
-      String className = getClass().getName();
-      int dot = className.lastIndexOf('.');
-      if( dot >= 0 )
-          className = className.substring(dot+1);
-      String key =  className + '[' + jndiName + ']';
-      return key;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/EJB3IIOPWebClassLoader.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/iiop/EJB3IIOPWebClassLoader.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,444 +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 org.jboss.ejb3.iiop;
-
-import java.lang.annotation.Annotation;
-import java.net.URL;
-
-import javax.ejb.EJBHome;
-import javax.ejb.EJBObject;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.rmi.PortableRemoteObject;
-
-import org.jboss.annotation.ejb.IIOP;
-import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.aop.Advisor;
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.NonSerializableFactory;
-import org.jboss.ejb3.ProxyFactoryHelper;
-import org.jboss.ejb3.SessionContainer;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
-import org.jboss.iiop.CorbaORBService;
-import org.jboss.iiop.codebase.CodebasePolicy;
-import org.jboss.iiop.csiv2.CSIv2Policy;
-import org.jboss.iiop.rmi.InterfaceAnalysis;
-import org.jboss.iiop.rmi.ir.InterfaceRepository;
-import org.jboss.invocation.iiop.ReferenceFactory;
-import org.jboss.invocation.iiop.ServantRegistries;
-import org.jboss.invocation.iiop.ServantRegistry;
-import org.jboss.invocation.iiop.ServantRegistryKind;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.IorSecurityConfigMetaData;
-import org.jboss.mx.loading.RepositoryClassLoader;
-import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.proxy.ejb.handle.HandleDelegateImpl;
-import org.jboss.system.Registry;
-import org.jboss.web.WebClassLoader;
-import org.jboss.web.WebServiceMBean;
-import org.omg.CORBA.Any;
-import org.omg.CORBA.InterfaceDef;
-import org.omg.CORBA.InterfaceDefHelper;
-import org.omg.CORBA.ORB;
-import org.omg.CORBA.Policy;
-import org.omg.CORBA.Repository;
-import org.omg.CORBA.UserException;
-import org.omg.CosNaming.NameComponent;
-import org.omg.CosNaming.NamingContext;
-import org.omg.CosNaming.NamingContextExt;
-import org.omg.CosNaming.NamingContextExtHelper;
-import org.omg.CosNaming.NamingContextHelper;
-import org.omg.CosNaming.NamingContextPackage.AlreadyBound;
-import org.omg.CosNaming.NamingContextPackage.CannotProceed;
-import org.omg.CosNaming.NamingContextPackage.InvalidName;
-import org.omg.CosNaming.NamingContextPackage.NotFound;
-import org.omg.PortableServer.Current;
-import org.omg.PortableServer.CurrentHelper;
-import org.omg.PortableServer.POA;
-import org.omg.PortableServer.Servant;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: 56434 $
- */
-public class IORFactory
-   implements RemoteProxyFactory
-{
-   private static final Logger log = Logger.getLogger(IORFactory.class);
-   
-   private Container container;
-   private Advisor advisor;
-   private RemoteBinding binding;
-   private String webServiceName = "jboss:service=WebService"; // TODO: make webServiceName configurable
-   
-   // after start available
-   private String beanRepositoryIds[];
-   private String homeRepositoryIds[];
-//   private InterfaceAnalysis interfaceAnalysis;
-   private ORB orb;
-//   private POA poa;
-   private POA irPoa;
-   private InterfaceRepository iri;
-   private ServantRegistry servantRegistry;
-   private ServantRegistry homeServantRegistry;
-   private WebClassLoader wcl;
-   private ReferenceFactory referenceFactory;
-   private ReferenceFactory homeReferenceFactory;
-
-   // TODO: create a default IIOP annotation
-   private static final IIOP defaultIIOP = new IIOP()
-   {
-      public boolean interfaceRepositorySupported()
-      {
-         return false;
-      }
-
-      public String poa()
-      {
-         return POA_PER_SERVANT;
-      }
-      
-      public Class<? extends Annotation> annotationType()
-      {
-         return IIOP.class;
-      }
-   };
-   
-   // TODO: do I really need this method
-   public Object createHomeProxy()
-   {
-      try
-      {
-         org.omg.CORBA.Object corbaRef = homeReferenceFactory.createReference(homeRepositoryIds[0]);
-         
-         EJBHome corbaObj = (EJBHome) PortableRemoteObject.narrow(corbaRef, EJBHome.class);
-         
-         return corbaObj;
-      }
-      catch(Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   public Object createProxy()
-   {
-      try
-      {
-         org.omg.CORBA.Object corbaRef = referenceFactory.createReference(beanRepositoryIds[0]);
-         
-         EJBObject corbaObj = (EJBObject) PortableRemoteObject.narrow(corbaRef, EJBObject.class);
-         
-         return corbaObj;
-      }
-      catch(Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   public Object createProxy(Object id)
-   {
-      try
-      {
-         org.omg.CORBA.Object corbaRef = referenceFactory.createReferenceWithId(id, beanRepositoryIds[0]);
-         
-         EJBObject corbaObj = (EJBObject) PortableRemoteObject.narrow(corbaRef, EJBObject.class);
-         
-         return corbaObj;
-      }
-      catch(Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   private IIOP getIIOP()
-   {
-      IIOP iiop = (IIOP) advisor.resolveAnnotation(IIOP.class);
-      if(iiop != null)
-         return iiop;
-      
-      return defaultIIOP;
-   }
-   
-   private String getJndiName()
-   {
-      return ProxyFactoryHelper.getDefaultRemoteJndiName(container);
-   }
-   
-   private String getServantName()
-   {
-      // TODO: is "Servant/" a good prefix for servant name
-      return "Servant/" + getJndiName();
-   }
-   
-   private WebServiceMBean getWebServer() throws MalformedObjectNameException
-   {
-      if(webServiceName == null)
-         throw new IllegalStateException("iiop is not going to work without a web service");
-      
-      return (WebServiceMBean) MBeanProxyExt.create(WebServiceMBean.class, webServiceName);
-   }
-   
-   /**
-    * Literal copy from org.jboss.proxy.ejb.IORFactory
-    */
-   private void rebind(NamingContextExt ctx, String strName, org.omg.CORBA.Object obj) throws Exception
-   {
-      NameComponent[] name = ctx.to_name(strName);
-      NamingContext intermediateCtx = ctx;
-
-      for (int i = 0; i < name.length - 1; i++ ) {
-         NameComponent[] relativeName = new NameComponent[] { name[i] };
-         try {
-            intermediateCtx = NamingContextHelper.narrow(
-                  intermediateCtx.resolve(relativeName));
-         }
-         catch (NotFound e) {
-            intermediateCtx = intermediateCtx.bind_new_context(relativeName);
-         }
-      }
-      intermediateCtx.rebind(new NameComponent[] { name[name.length - 1] }, obj);
-   }
-   
-   private void removeWebClassLoader() throws MalformedObjectNameException
-   {
-      getWebServer().removeClassLoader(wcl);
-   }
-   
-   public void setContainer(Container container)
-   {
-      this.container = container;
-      this.advisor = (Advisor) container; // TODO: why the cast?
-   }
-   
-   public void setRemoteBinding(RemoteBinding binding)
-   {
-      this.binding = binding;
-   }
-   
-   public void setWebServiceName(String name)
-   {
-      this.webServiceName = name;
-   }
-   
-   public void start() throws Exception
-   {
-      // TODO: IORFactory only supports 1 remote interface
-      Class remoteInterfaces[] = ProxyFactoryHelper.getRemoteInterfaces(container);
-      if(remoteInterfaces.length > 1)
-         log.warn("IIOP binding only works on 1 interface, using: " + remoteInterfaces[0].getName());
-      InterfaceAnalysis interfaceAnalysis = InterfaceAnalysis.getInterfaceAnalysis(remoteInterfaces[0]);
-      this.beanRepositoryIds = interfaceAnalysis.getAllTypeIds();
-      
-      InterfaceAnalysis homeInterfaceAnalysis = null;
-      Class homeInterface = ProxyFactoryHelper.getRemoteHomeInterface(container);
-      if(homeInterface != null)
-      {
-         if(!EJBHome.class.isAssignableFrom(homeInterface))
-            throw new IllegalArgumentException("home interface " + homeInterface.getName() + " must extend javax.ejb.EJBHome (EJB3 4.6.8)");
-         homeInterfaceAnalysis = InterfaceAnalysis.getInterfaceAnalysis(homeInterface);
-         this.homeRepositoryIds = homeInterfaceAnalysis.getAllTypeIds();
-      }
-      // To allow EJB3 Stateless beans to operate we can function without a home interface.
-      
-      // Get orb and irPoa references
-      try {
-         orb = (ORB)new InitialContext().lookup("java:/" + CorbaORBService.ORB_NAME);
-      }
-      catch (NamingException e) {
-         throw new Exception("Cannot lookup java:/" + CorbaORBService.ORB_NAME + ": " + e);
-      }
-      try {
-         irPoa = (POA)new InitialContext().lookup("java:/" + CorbaORBService.IR_POA_NAME);
-      }
-      catch (NamingException e) {
-         throw new Exception("Cannot lookup java:/" + CorbaORBService.IR_POA_NAME + ": " + e);
-      }
-      
-      IIOP iiop = getIIOP();
-      if(iiop.interfaceRepositorySupported())
-      {
-         this.iri = new InterfaceRepository(orb, irPoa, getJndiName());
-         iri.mapClass(remoteInterfaces[0]);
-         if(homeInterface != null)
-            iri.mapClass(homeInterface);
-         iri.finishBuild();
-      }
-      
-      // TODO: obtain the iiop invoker name properly
-      ObjectName invokerName = new ObjectName("jboss:service=invoker,type=iiop");
-      ServantRegistries servantRegistries = (ServantRegistries) Registry.lookup(invokerName);
-      if(servantRegistries == null)
-         throw new Exception("can't find iiop invoker");
-      ServantRegistryKind registryWithTransientPOA;
-      ServantRegistryKind registryWithPersistentPOA; 
-      if(iiop.poa().equals(IIOP.POA_PER_SERVANT))
-      {
-         registryWithTransientPOA = ServantRegistryKind.TRANSIENT_POA_PER_SERVANT;
-         registryWithPersistentPOA = ServantRegistryKind.PERSISTENT_POA_PER_SERVANT;
-      }
-      else if(iiop.poa().equals(IIOP.POA_SHARED))
-      {
-         registryWithTransientPOA = ServantRegistryKind.SHARED_TRANSIENT_POA;
-         registryWithPersistentPOA = ServantRegistryKind.SHARED_PERSISTENT_POA;
-      }
-      else
-         throw new IllegalArgumentException("@IIOP.poa can only be 'per-servant' or 'shared'");
-      // Only works for session container
-      this.servantRegistry = servantRegistries.getServantRegistry(registryWithTransientPOA);
-      this.homeServantRegistry = servantRegistries.getServantRegistry(registryWithPersistentPOA); // TODO: why is home interface in persistent poa?
-      
-      // Hack in a WebCL (from org.jboss.ejb.EjbModule.initializeContainer)
-      // TODO:  seting up a WebClassLoader needs to be done somewhere where
-      ObjectName on = container.getObjectName();
-      this.wcl = new EJB3IIOPWebClassLoader(on, (RepositoryClassLoader) ((SessionContainer) container).getClassloader(), getJndiName());
-      WebServiceMBean webServer = getWebServer();
-      URL[] codebaseURLs = {webServer.addClassLoader(wcl)};
-      wcl.setWebURLs(codebaseURLs);
-      
-      // setup a codebase policy, the CodebaseInterceptor will translate this to a TAG_JAVA_CODEBASE
-      String codebaseString = wcl.getCodebaseString();
-      log.debug("codebase = " + codebaseString);
-      Any codebase = orb.create_any();
-      codebase.insert_string(codebaseString);
-      Policy codebasePolicy;
-      codebasePolicy = orb.create_policy(CodebasePolicy.TYPE, codebase);
-      
-      // Create csiv2Policy for both home and remote containing
-      // IorSecurityConfigMetadata
-      Any secPolicy = orb.create_any();
-//      IorSecurityConfigMetaData iorSecurityConfigMetaData =
-//         container.getBeanMetaData().getIorSecurityConfigMetaData();
-      IorSecurityConfigMetaData iorSecurityConfigMetaData = new IorSecurityConfigMetaData(); // TODO: make ior security configurable
-      secPolicy.insert_Value(iorSecurityConfigMetaData);
-      Policy csiv2Policy = orb.create_policy(CSIv2Policy.TYPE, secPolicy);
-      
-      Policy policies[] = { codebasePolicy, csiv2Policy };
-      
-      InterfaceDef interfaceDef = null;
-      if(iri != null)
-      {
-         Repository ir = iri.getReference();
-         interfaceDef = InterfaceDefHelper.narrow(ir.lookup_id(beanRepositoryIds[0]));
-      }
-      
-      Current poaCurrent = CurrentHelper.narrow(orb.resolve_initial_references("POACurrent"));
-
-      NamingContextExt ctx = getNamingContextExt();
-
-      log.debug("binding servant name " + getServantName());
-      
-      Servant servant = new BeanCorbaServant(this, poaCurrent, container, interfaceDef, interfaceAnalysis);
-      this.referenceFactory = servantRegistry.bind(getServantName(), servant, policies);
-      
-      EJBObject corbaObj = (EJBObject) createProxy();
-      
-      rebind(ctx, getJndiName(), (org.omg.CORBA.Object) corbaObj);
-      
-      // TODO: use iri
-      if(homeInterfaceAnalysis != null)
-      {
-         servant = new BeanCorbaServant(this, poaCurrent, container, null, homeInterfaceAnalysis);
-         this.homeReferenceFactory = homeServantRegistry.bind(getServantName() + "Home", servant, policies);
-         
-         Object homeObject = createHomeProxy();
-         
-         rebind(ctx, getJndiName() + "Home", (org.omg.CORBA.Object) homeObject);
-      }
-      
-      // bind HandleDelegate stuff
-      Context compCtx = (Context) new InitialContext().lookup("java:comp");
-      NonSerializableFactory.rebind(compCtx, "ORB", orb);
-      NonSerializableFactory.rebind(compCtx, "HandleDelegate", new HandleDelegateImpl());
-   }
-   
-   public void stop() throws Exception
-   {
-      if(homeReferenceFactory != null)
-      {
-         unbind(getJndiName() + "Home");
-         unbindHomeServant();
-      }
-      unbind(getJndiName());
-      
-      unbindServant();
-      
-      removeWebClassLoader();
-   }
-   
-   /**
-    * Unbind the bean from CosNaming
-    */
-   private void unbind(String strName)
-   {
-      try
-      {
-         NamingContextExt corbaContext = getNamingContextExt();
-         NameComponent n[] = corbaContext.to_name(strName);
-         getNamingContextExt().unbind(n);
-      }
-      catch(Exception e)
-      {
-         log.warn("unable to unbind '" + strName + "'", e);
-      }
-   }
-   
-   private void unbindHomeServant()
-   {
-      try
-      {
-         homeServantRegistry.unbind(getServantName() + "Home");
-      }
-      catch(Exception e)
-      {
-         log.warn("unable to unbind home servant", e);
-      }
-   }
-   
-   private void unbindServant()
-   {
-      try
-      {
-         servantRegistry.unbind(getServantName());
-      }
-      catch(Exception e)
-      {
-         log.warn("unable to unbind servant", e);
-      }
-   }
-
-   private NamingContextExt getNamingContextExt() throws NamingException
-   {
-      Context initialContext = new InitialContext();
-      
-      // NOTE: eclipse editor parser crashes silently on this line (because of org.jboss.iiop.CorbaNamingService) with unknown reason
-      // that's why this method is at the end
-      return NamingContextExtHelper.narrow((org.omg.CORBA.Object) initialContext.lookup("java:/" + org.jboss.iiop.CorbaNamingService.NAMING_NAME));
-   }
-}
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/EJB3InterceptorsInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/EJB3InterceptorsInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/EJB3InterceptorsInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -53,7 +53,7 @@
    public Object invoke(Invocation invocation) throws Throwable
    {
       EJBContainerInvocation inv = (EJBContainerInvocation) invocation;
-      
+                                
       //We need to do this every time to make sure we have interceptor instances corresponding 
       //to the bean instance
       //TODO Cache this for non-stateful beans?

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInfo.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInfo.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInfo.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -27,7 +27,7 @@
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 
-import org.jboss.ejb3.dd.Interceptor;
+import org.jboss.ejb3.metamodel.Interceptor;
 
 /**
  * We cannot use annotation overrides for the interceptor stuff since they do not have a 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInfoRepository.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInfoRepository.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInfoRepository.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,38 +21,28 @@
  */
 package org.jboss.ejb3.interceptor;
 
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.Interceptor;
+import org.jboss.ejb3.metamodel.InterceptorBinding;
+import org.jboss.ejb3.metamodel.Interceptors;
+import org.jboss.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.ejb.PostActivate;
+import javax.ejb.PrePassivate;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.ExcludeClassInterceptors;
+import javax.interceptor.ExcludeDefaultInterceptors;
+import javax.interceptor.InvocationContext;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.ExcludeClassInterceptors;
-import javax.interceptor.ExcludeDefaultInterceptors;
-import javax.interceptor.InvocationContext;
-import javax.ejb.PostActivate;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.ejb.PrePassivate;
-
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.dd.EjbJarDD;
-import org.jboss.ejb3.dd.Interceptor;
-import org.jboss.ejb3.dd.InterceptorBinding;
-import org.jboss.ejb3.dd.Interceptors;
-import org.jboss.logging.Logger;
-
 /**
  * A repository of interceptor details shared amongst all containers in this deployment.
  * Interceptors differ from other ejb 3 artifacts in that we can have annotations on the
@@ -203,7 +193,9 @@
       {
          HashSet<InterceptorInfo> infos = getDefaultInterceptors();
          if (infos != null)
+         {
             interceptors.addAll(trimUnwanted(infos, type));
+         }
          sorter.sortDefaultInterceptors(container, interceptors);
       }
 
@@ -212,7 +204,9 @@
       {
          List<InterceptorInfo> infos = container.getClassInterceptors();
          if (infos != null)
+         {
             interceptors.addAll(trimUnwanted(infos, type));
+         }
          
          if (type != AroundInvoke.class)
          {
@@ -368,7 +362,7 @@
    private InterceptorInfo initialiseSuperClassesFirstFromXmlOrAnnotations(
          HashMap<String, AnnotationInitialiser> initialisers, String superClassName)
    {
-      if (superClassName == "java.lang.Object")
+      if ("java.lang.Object".equals(superClassName))
       {
          return null;
       }
@@ -781,7 +775,7 @@
          return info;
       }
 
-      java.lang.reflect.Method findInterceptorMethodFromXml(Class clazz, String lookingFor, org.jboss.ejb3.dd.Method xml)
+      java.lang.reflect.Method findInterceptorMethodFromXml(Class clazz, String lookingFor, org.jboss.ejb3.metamodel.Method xml)
       {
          if (xml == null)
             return null;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInjector.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInjector.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InterceptorInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,23 +21,16 @@
 */ 
 package org.jboss.ejb3.interceptor;
 
-import java.lang.reflect.AccessibleObject;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
 import org.jboss.ejb3.BeanContext;
 import org.jboss.ejb3.Container;
 import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.dd.Interceptor;
-import org.jboss.ejb3.injection.EJBHandler;
-import org.jboss.ejb3.injection.Injector;
-import org.jboss.ejb3.injection.JndiInjectHandler;
-import org.jboss.ejb3.injection.PersistenceContextHandler;
-import org.jboss.ejb3.injection.PersistenceUnitHandler;
-import org.jboss.ejb3.injection.PojoInjector;
-import org.jboss.ejb3.injection.ResourceHandler;
-import org.jboss.ejb3.injection.WebServiceHandler;
+import org.jboss.injection.Injector;
+import org.jboss.injection.PojoInjector;
+import org.jboss.ejb3.metamodel.Interceptor;
 
+import java.lang.reflect.AccessibleObject;
+import java.util.Map;
+
 /**
  * 
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
@@ -48,30 +41,15 @@
    EJBContainer container;
    InterceptorInfo info;
    PojoInjector[] injectors;
-   protected HashMap<AccessibleObject, Injector> encInjections = new HashMap<AccessibleObject, Injector>();
+   protected Map<AccessibleObject, Injector> encInjections;
    
-   public InterceptorInjector(Container container, InterceptorInfo info) throws Exception
+   public InterceptorInjector(Container container, InterceptorInfo info, Map<AccessibleObject, Injector> injections)
    {
       this.container = (EJBContainer)container;
       this.info = info;
-
-      List list = new ArrayList();
-      list.addAll(JndiInjectHandler.loadInjectors(this));
-      ResourceHandler.loadInjectors(this);
-      EJBHandler.loadInjectors(this);
-      WebServiceHandler.loadInjectors(this);
-      //list.addAll(DependsHandler.loadInjectors(this));
-      PersistenceContextHandler.loadInjectors(this);
-      PersistenceUnitHandler.loadInjectors(this);
-      list.addAll(encInjections.values());
-      injectors = (PojoInjector[]) list.toArray(new PojoInjector[list.size()]);
+      injectors = injections.values().toArray(new PojoInjector[injections.size()]);
    }
 
-   public HashMap<AccessibleObject, Injector> getEncInjections()
-   {
-      return encInjections;
-   }
-   
    public Interceptor getXml()
    {
       return info.getXml();

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InvocationContextImpl.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InvocationContextImpl.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/InvocationContextImpl.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -60,7 +60,7 @@
       this.instances = instances;
    }
 
-   public Object getBean()
+   public Object getTarget()
    {
       return wrapped.getTargetObject();
    }
@@ -143,7 +143,7 @@
          try
          {
             int curr = currentBeanMethod++;
-            return beanAroundInvokes[curr].invoke(getBean(), this);
+            return beanAroundInvokes[curr].invoke(getTarget(), this);
          }
          catch (InvocationTargetException e)
          {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/LifecycleInterceptorHandler.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/LifecycleInterceptorHandler.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/LifecycleInterceptorHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -34,7 +34,9 @@
 
 import org.jboss.ejb3.BeanContext;
 import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.stateful.StatefulBeanContext;
 import org.jboss.util.MethodHashing;
+import org.jboss.logging.Logger;
 
 /**
  * 
@@ -43,6 +45,8 @@
  */
 public class LifecycleInterceptorHandler
 {
+   private static final Logger log = Logger.getLogger(LifecycleInterceptorHandler.class);
+
    private EJBContainer container;
    private InterceptorInfo[] postConstructs;
    private InterceptorInfo[] postActivates;
@@ -54,7 +58,7 @@
    private Method[] beanPreDestroys;
    private Method timeoutCallbackMethod;
    private long timeoutCalllbackHash;
-   
+
    public LifecycleInterceptorHandler(EJBContainer container, Class[] handledCallbacks)
    {
       this.container = container;
@@ -87,7 +91,7 @@
          }
       }
    }
-   
+
    public long getTimeoutCalllbackHash()
    {
       return timeoutCalllbackHash;
@@ -98,9 +102,9 @@
       try
       {
          InvocationContext ic = LifecycleInvocationContextImpl.getLifecycleInvocationContext(
-               PostConstruct.class, 
-               ctx, 
-               postConstructs, 
+               PostConstruct.class,
+               ctx,
+               postConstructs,
                beanPostConstructs);
          ic.proceed();
       }
@@ -112,11 +116,16 @@
 
    public void preDestroy(BeanContext ctx)
    {
+      Object id = null;
+      if (ctx instanceof StatefulBeanContext)
+      {
+         id = ((StatefulBeanContext)ctx).getId();
+      }
       try
       {
          InvocationContext ic = LifecycleInvocationContextImpl.getLifecycleInvocationContext(
                PreDestroy.class,
-               ctx, 
+               ctx,
                preDestroys,
                beanPreDestroys);
          ic.proceed();
@@ -132,8 +141,8 @@
       try
       {
          InvocationContext ic = LifecycleInvocationContextImpl.getLifecycleInvocationContext(
-               PostActivate.class, 
-               ctx, 
+               PostActivate.class,
+               ctx,
                postActivates,
                beanPostActivates);
          ic.proceed();
@@ -149,7 +158,7 @@
       try
       {
          InvocationContext ic = LifecycleInvocationContextImpl.getLifecycleInvocationContext(
-               PrePassivate.class, 
+               PrePassivate.class,
                ctx,
                prePassivates,
                beanPrePassivates);
@@ -173,8 +182,8 @@
       {
          if (container.resolveAnnotation(method, Timeout.class) != null)
          {
-            if (Modifier.isPublic(method.getModifiers()) && 
-                  method.getReturnType().equals(Void.TYPE) && 
+            if (Modifier.isPublic(method.getModifiers()) &&
+                  method.getReturnType().equals(Void.TYPE) &&
                   method.getParameterTypes().length == 1 &&
                   method.getParameterTypes()[0].equals(Timer.class))
             {
@@ -186,24 +195,24 @@
             }
          }
       }
-      
-      try 
+
+      try
       {
          if (timeoutCallbackMethod == null && javax.ejb.TimedObject.class.isAssignableFrom(container.getBeanClass()))
          {
             Class[] params = new Class[]{Timer.class};
             timeoutCallbackMethod = container.getBeanClass().getMethod("ejbTimeout", params);
          }
-      } 
+      }
       catch (Exception e)
       {
          e.printStackTrace();
       }
-      
+
       if (timeoutCallbackMethod != null)
       {
          timeoutCalllbackHash = MethodHashing.calculateHash(timeoutCallbackMethod);
       }
-   }   
+   }
 
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/LifecycleInvocationContextImpl.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/LifecycleInvocationContextImpl.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/interceptor/LifecycleInvocationContextImpl.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -75,7 +75,7 @@
       return ic;
    }
 
-   public Object getBean()
+   public Object getTarget()
    {
       return beanContext.getInstance();
    }
@@ -156,7 +156,7 @@
          {
             for (Method beanMethod : beanMethods)
             {
-               beanMethod.invoke(getBean(), new Object[0]);
+               beanMethod.invoke(getTarget(), new Object[0]);
             }
          }
          catch (InvocationTargetException e)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ConsumerContainer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ConsumerContainer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ConsumerContainer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -27,7 +27,11 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
+import java.util.Map;
+
+import javax.ejb.ActivationConfigProperty;
 import javax.ejb.EJBException;
+import javax.ejb.MessageDriven;
 import javax.ejb.Timer;
 import javax.ejb.TimerService;
 import javax.ejb.TransactionAttribute;
@@ -70,16 +74,17 @@
 import org.jboss.aop.util.MethodHashing;
 import org.jboss.aop.util.PayloadKey;
 import org.jboss.deployment.DeploymentException;
-import org.jboss.ejb.txtimer.TimedObjectInvoker;
 import org.jboss.ejb3.Container;
 import org.jboss.ejb3.EJBContainer;
 import org.jboss.ejb3.EJBContainerInvocation;
 import org.jboss.ejb3.Ejb3Module;
-import org.jboss.ejb3.EjbTimerUtil;
+import org.jboss.ejb3.ProxyFactoryHelper;
 import org.jboss.ejb3.ThreadLocalENCFactory;
 import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.dd.EnterpriseBean;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
+import org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory;
+import org.jboss.ejb3.timerservice.TimedObjectInvoker;
+import org.jboss.ejb3.timerservice.TimerServiceFactory;
 import org.jboss.ejb3.tx.TxUtil;
 import org.jboss.jms.ConnectionFactoryHelper;
 import org.jboss.jms.asf.ServerSessionPoolFactory;
@@ -93,22 +98,15 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class ConsumerContainer extends EJBContainer implements TimedObjectInvoker
+public class ConsumerContainer extends MessagingContainer
 {
    private static final Logger log = Logger.getLogger(ConsumerContainer.class);
-
-   protected TimerService timerService;
-   protected ActivationSpec activationSpec = new ActivationSpec();
-   protected boolean isContainerManagedTx;
-   protected AcknowledgementMode acknowledgeMode;
-   protected Connection connection;
-   protected MDBConfig config;
-   protected ExceptionListenerImpl exListener;
-   protected DLQHandler dlqHandler;
-   protected HashMap<Long, ConnectionConsumer> connectionConsumers = new HashMap<Long, ConnectionConsumer>();
-   protected HashMap<Long, ServerSessionPool> serverSessionPools = new HashMap<Long, ServerSessionPool>();
+   
+   protected Class messagingType = null;
+   protected Method ON_MESSAGE;
+   
    protected ArrayList<ProducerFactory> producers = new ArrayList<ProducerFactory>();
-
+   
    /**
     * Default destination type. Used when no message-driven-destination is given
     * in ejb-jar, and a lookup of destinationJNDI from jboss.xml is not
@@ -121,7 +119,6 @@
     * This is needed because API changed from JBoss 4.0.1sp1 to 4.0.2
     * TODO remove this after 4.0.2 is out.
     */
-   protected Method getServerSessionPool;
    public static final String CONSUMER_MESSAGE = "CONSUMER_MESSAGE";
 
 
@@ -129,20 +126,121 @@
                             Hashtable ctxProperties, InterceptorInfoRepository interceptorRepository,
                             Ejb3Deployment deployment)
    {
-      super(Ejb3Module.BASE_EJB3_JMX_NAME + ",name=" + ejbName, manager, cl, beanClassName, ejbName, ctxProperties, interceptorRepository, deployment);
-      beanContextClass = MDBContext.class;
-      Method[] methods = ServerSessionPoolFactory.class.getMethods();
-      for (Method m : methods)
+      super(ejbName, manager, cl, beanClassName, ctxProperties, interceptorRepository, deployment);
+   }
+   
+   public InvocationResponse dynamicInvoke(Invocation invocation) throws Throwable
+   {
+      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+      EJBContainerInvocation newSi = null;
+      ThreadLocalENCFactory.push(enc);
+      try
       {
-         if (m.getName().equals("getServerSessionPool"))
+         Thread.currentThread().setContextClassLoader(classloader);
+         MethodInvocation si = (MethodInvocation) invocation;
+         MethodInfo info = (MethodInfo) methodInterceptors.get(si.getMethodHash());
+         if (info == null)
          {
-            getServerSessionPool = m;
-            break;
+            throw new RuntimeException("Could not resolve beanClass method from proxy call");
          }
+       
+         Interceptor[] aspects = info.getInterceptors();
+         newSi = new EJBContainerInvocation(info, aspects);
+         newSi.setArguments(si.getArguments());
+         newSi.setMetaData(si.getMetaData());
+         newSi.setAdvisor(this);
+
+         InvocationResponse response = new InvocationResponse(newSi.invokeNext());
+         response.setContextInfo(newSi.getResponseContextInfo());
+         return response;
       }
+      finally
+      {
+         Thread.currentThread().setContextClassLoader(oldLoader);
+         ThreadLocalENCFactory.pop();
+      }
    }
+   
+   protected Method getOnMessage()
+   {
+      if (ON_MESSAGE != null)
+         return ON_MESSAGE;
+      
+      try
+      {
+         final Class arg = Message.class;
+         ON_MESSAGE = javax.jms.MessageListener.class.getMethod("onMessage", new Class[]{arg});
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+         throw new ExceptionInInitializerError(e);
+      }
 
+      return ON_MESSAGE;
+   }
+   
+   public Object localInvoke(MethodInfo info, Object[] args) throws Throwable
+   {     
+      if (info.getAdvisedMethod().equals(getOnMessage()))
+      {
+         ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+         ThreadLocalENCFactory.push(enc);
+         
+         try
+         {
+            Message message = (Message)args[0];
+            MethodInvocation invocation = (MethodInvocation) ((ObjectMessage) message).getObject();
+            invocation.getMetaData().addMetaData(CONSUMER_MESSAGE, CONSUMER_MESSAGE, message, PayloadKey.TRANSIENT);
+            return this.dynamicInvoke(invocation);
+         }
+         finally
+         {
+            Thread.currentThread().setContextClassLoader(oldLoader);
+            ThreadLocalENCFactory.pop();
+         }
+      }
+      else
+         return super.localInvoke(info, args);
+   }
+   
+   public Class getMessagingType()
+   {
+      return javax.jms.MessageListener.class;
+   }
+   
+   public MethodInfo getMethodInfo(Method method)
+   {
+      MethodInfo info = new MethodInfo();
+      info.setAdvisor(this);
+      info.setAdvisedMethod(method);
+      info.setUnadvisedMethod(method);
+    
+      return info;
+   }
+ 
+   public Map getActivationConfigProperties()
+   {
+      HashMap result = new HashMap();
+      Consumer annotation = (Consumer) resolveAnnotation(Consumer.class);
+      for (ActivationConfigProperty property : annotation.activationConfig())
+      {
+         addActivationSpecProperty(result, property);
+      }
+      
+      DefaultActivationSpecs defaultSpecsAnnotation = (DefaultActivationSpecs)resolveAnnotation(DefaultActivationSpecs.class);
+      if (defaultSpecsAnnotation != null)
+      {
+         for (ActivationConfigProperty property : defaultSpecsAnnotation.value())
+         {
+            addActivationSpecProperty(result, property);
+         }
+      }
+      
+      return result;
+   }
 
+
    /**
     * Initialize the container invoker. Sets up a connection, a server session
     * pool and a connection consumer for the configured destination.
@@ -155,45 +253,7 @@
    public void start() throws Exception
    {
       super.start();
-      exListener = new ExceptionListenerImpl(this);
-
-      populateActivationSpec();
-
-      config = MDBConfig.createMDBConfig(activationSpec);
-
-      try
-      {
-         innerCreate();
-      }
-      catch (final JMSException e)
-      {
-         log.error("FAILED INNER CREATE", e);
-         //
-         // start a thread up to handle recovering the connection. so we can
-         // attach to the jms resources once they become available
-         //
-         new Thread("EJB3 MDB Create Recovery Thread")
-         {
-            public void run()
-            {
-               exListener.onException(e);
-            }
-         }.start();
-         return;
-      }
-
-      if (dlqHandler != null)
-      {
-         dlqHandler.start();
-      }
-
-      if (connection != null)
-      {
-         connection.setExceptionListener(exListener);
-         connection.start();
-      }
-      timerService = EjbTimerUtil.getTimerService(this, this);
-
+      
       registerProducers();
    }
 
@@ -240,7 +300,7 @@
 
    protected void registerProducers() throws Exception
    {
-      Destination dest = (Destination) getInitialContext().lookup(config.getDestination());
+      Destination dest = (Destination) getInitialContext().lookup(getDestination());
       Class[] producers = getProducerInterfaces(this);
       MessageProperties props = (MessageProperties) resolveAnnotation(MessageProperties.class);
       if (props == null) props = new MessagePropertiesImpl();
@@ -268,564 +328,9 @@
          factory.stop();
       }
    }
-
-   private void innerCreate() throws Exception
+   
+   protected void populateActivationSpec()
    {
-      log.debug("Initializing");
-
-      Consumer Consumer = (Consumer) resolveAnnotation(Consumer.class);
-
-      // Get the JMS provider
-      // todo get rid of server module dependency
-      JMSProviderAdapter adapter = getJMSProviderAdapter();
-      log.debug("Provider adapter: " + adapter);
-
-      setupDLQ(adapter);
-
-
-      // Is container managed?
-      TransactionManagement transactionManagement = (TransactionManagement) resolveAnnotation(TransactionManagement.class);
-      if (transactionManagement == null)
-         isContainerManagedTx = true;
-      else
-         isContainerManagedTx = transactionManagement.value() == TransactionManagementType.CONTAINER;
-      String ackMode = config.getAcknowledgeMode();
-      if (ackMode != null && (ackMode.equals("DUPS_OK_ACKNOWLEDGE")
-                              || ackMode.equals(AcknowledgementMode.AUTO_ACKNOWLEDGE.name())
-                              || ackMode.equals("Dups-ok-acknowledge")))
-      {
-         acknowledgeMode = AcknowledgementMode.DUPS_OK;
-      }
-      else
-      {
-         acknowledgeMode = AcknowledgementMode.AUTO_ACKNOWLEDGE;
-      }
-
-
-      // Connect to the JNDI server and get a reference to root context
-      Context context = adapter.getInitialContext();
-      log.debug("context: " + context);
-
-      // if we can't get the root context then exit with an exception
-      if (context == null)
-      {
-         throw new RuntimeException("Failed to get the root context");
-      }
-
-      String destinationType = config.getDestinationType();
-
-      // Unfortunately the destination is optional, so if we do not have one
-      // here we have to look it up if we have a destinationJNDI, else give it
-      // a default.
-      if (destinationType == null)
-      {
-         log.warn("No message-driven-destination given; using; guessing type");
-         destinationType = getDestinationType(context, config.getDestination());
-      }
-
-      if ("javax.jms.Topic".equals(destinationType))
-      {
-         innerCreateTopic(context, adapter);
-
-      }
-      else if ("javax.jms.Queue".equals(destinationType))
-      {
-         innerCreateQueue(context, adapter);
-
-      }
-      else
-         throw new DeploymentException("Unknown destination-type " + destinationType);
-
-      log.debug("Initialized with config " + toString());
-
-      context.close();
-   }
-
-   private void innerCreateQueue(Context context, JMSProviderAdapter adapter)
-           throws Exception
-   {
-      log.debug("Got destination type Queue for " + ejbName);
-
-      // Get the JNDI suffix of the destination
-      String jndiSuffix = parseJndiSuffix(config.getDestination(), ejbName);
-      log.debug("jndiSuffix: " + jndiSuffix);
-
-      // create a queue connection
-      Object qFactory = context.lookup(adapter.getQueueFactoryRef());
-      QueueConnection qConnection = null;
-      try
-      {
-         qConnection = ConnectionFactoryHelper.createQueueConnection(qFactory, config.getUser(), config.getPassword());
-         connection = qConnection;
-      }
-      catch (ClassCastException e)
-      {
-         throw new DeploymentException("Expected a QueueConnection check your provider adaptor: "
-                                       + adapter.getQueueFactoryRef());
-      }
-
-      // Set the optional client id
-      String clientId = config.getClientID();
-
-      log.debug("Using client id: " + clientId);
-      if (clientId != null && clientId.length() > 0)
-         connection.setClientID(clientId);
-
-      // lookup or create the destination queue
-      Queue queue = null;
-      try
-      {
-         // First we try the specified queue
-         if (config.getDestination() != null)
-            queue = (Queue) context.lookup(config.getDestination());
-      }
-      catch (NamingException e)
-      {
-         log.warn("Could not find the queue destination-jndi-name=" + config.getDestination());
-      }
-      catch (ClassCastException e)
-      {
-         throw new DeploymentException("Expected a Queue destination-jndi-name=" + config.getDestination());
-      }
-
-      // FIXME: This is not portable, only works for JBossMQ
-      if (queue == null)
-         queue = (Queue) createDestination(Queue.class,
-                                           context,
-                                           "queue/" + jndiSuffix,
-                                           jndiSuffix);
-
-      registerQueueListeners(qConnection, queue);
-
-   }
-
-   private void registerQueueListeners(QueueConnection qConnection, Queue queue)
-           throws NamingException, JMSException
-   {
-      MessageListener listener = new MessageListenerImpl(this);
-      Class[] producers = getProducerInterfaces(this);
-      HashSet visited = new HashSet();
-      for (Class producer : producers)
-      {
-         for (Method method : producer.getMethods())
-         {
-            long hash = MethodHashing.calculateHash(method);
-            if (visited.contains(hash)) continue;
-            visited.add(hash);
-            Method methodMessage = (Method) advisedMethods.get(hash);
-
-            // set up the server session pool
-            ServerSessionPool serverSessionPool = createSessionPool(queue,
-                                                                    qConnection,
-                                                                    true, // tx
-                                                                    acknowledgeMode.ordinal(),
-                                                                    listener,
-                                                                    methodMessage);
-            log.debug("Server session pool: " + serverSessionPool);
-            serverSessionPools.put(hash, serverSessionPool);
-
-            // create the connection consumer
-            ConnectionConsumer connectionConsumer =
-                    qConnection.createConnectionConsumer(queue,
-                                                         config.getMessageSelector(),
-                                                         serverSessionPool,
-                                                         config.getMaxMessages());
-            log.debug("Connection consumer: " + connectionConsumer);
-            connectionConsumers.put(hash, connectionConsumer);
-         }
-
-      }
-   }
-
-   private void innerCreateTopic(Context context, JMSProviderAdapter adapter)
-           throws Exception
-   {
-      log.debug("Got destination type Topic for " + ejbName);
-
-      // Get the JNDI suffix of the destination
-      String jndiSuffix = parseJndiSuffix(config.getDestination(), ejbName);
-      log.debug("jndiSuffix: " + jndiSuffix);
-
-      // create a topic connection
-      Object factory = context.lookup(adapter.getTopicFactoryRef());
-      TopicConnection tConnection = null;
-      try
-      {
-         tConnection = ConnectionFactoryHelper.createTopicConnection(factory, config.getUser(), config.getPassword());
-         connection = tConnection;
-      }
-      catch (ClassCastException e)
-      {
-         throw new DeploymentException("Expected a TopicConnection check your provider adaptor: "
-                                       + adapter.getTopicFactoryRef());
-      }
-
-      // Fix: ClientId must be set as the first method call after connection creation.
-      // Fix: ClientId is necessary for durable subscriptions.
-
-      String clientId = config.getClientID();
-
-      log.debug("Using client id: " + clientId);
-      if (clientId != null && clientId.length() > 0)
-         connection.setClientID(clientId);
-
-      // lookup or create the destination topic
-      Topic topic = null;
-      try
-      {
-         // First we try the specified topic
-         if (config.getDestination() != null)
-            topic = (Topic) context.lookup(config.getDestination());
-      }
-      catch (NamingException e)
-      {
-         log.warn("Could not find the topic destination-jndi-name=" + config.getDestination());
-      }
-      catch (ClassCastException e)
-      {
-         throw new DeploymentException("Expected a Topic destination-jndi-name=" + config.getDestination());
-      }
-
-      // FIXME: This is not portable, only works for JBossMQ
-      if (topic == null)
-         topic = (Topic) createDestination(Topic.class,
-                                           context,
-                                           "topic/" + jndiSuffix,
-                                           jndiSuffix);
-
-
-      String durability = config.getDurability();
-      Durability subscriptionDurability;
-
-      if (durability != null && durability.equals("Durable"))
-      {
-         subscriptionDurability = Durability.DURABLE;
-      }
-      else
-      {
-         subscriptionDurability = Durability.NON_DURABLE;
-      }
-
-      registerTopicListeners(tConnection, subscriptionDurability, topic);
-
-   }
-
-   private void registerTopicListeners(TopicConnection tConnection, Durability subscriptionDurability, Topic topic)
-           throws NamingException, JMSException
-   {
-      MessageListener listener = new MessageListenerImpl(this);
-      Class[] producers = getProducerInterfaces(this);
-      HashSet visited = new HashSet();
-      for (Class producer : producers)
-      {
-         for (Method method : producer.getMethods())
-         {
-            long hash = MethodHashing.calculateHash(method);
-            if (visited.contains(hash)) continue;
-            visited.add(hash);
-            Method methodMessage = (Method) advisedMethods.get(hash);
-
-            // set up the server session pool
-            ServerSessionPool serverSessionPool = createSessionPool(topic,
-                                                                    tConnection,
-                                                                    true, // tx
-                                                                    acknowledgeMode.ordinal(),
-                                                                    listener,
-                                                                    methodMessage);
-
-            serverSessionPools.put(hash, serverSessionPool);
-            // To be no-durable or durable
-            ConnectionConsumer connectionConsumer = null;
-            if (subscriptionDurability == Durability.NON_DURABLE)
-            {
-               // Create non durable
-               connectionConsumer =
-               tConnection.createConnectionConsumer(topic,
-                                                    config.getMessageSelector(),
-                                                    serverSessionPool,
-                                                    config.getMaxMessages());
-            }
-            else
-            {
-               // Durable subscription
-               String durableName = config.getSubscriptionName();
-
-               connectionConsumer =
-               tConnection.createDurableConnectionConsumer(topic,
-                                                           durableName,
-                                                           config.getMessageSelector(),
-                                                           serverSessionPool,
-                                                           config.getMaxMessages());
-            }
-            connectionConsumers.put(hash, connectionConsumer);
-            log.debug("Topic connectionConsumer set up");
-         }
-      }
-   }
-
-   /**
-    * Create a server session pool for the given connection.
-    *
-    * @param dest         The destination to use
-    * @param connection   The connection to use.
-    * @param minSession   The minumum number of sessions
-    * @param maxSession   The maximum number of sessions.
-    * @param keepAlive    The time to keep sessions alive
-    * @param isTransacted True if the sessions are transacted.
-    * @param ack          The session acknowledgement mode.
-    * @param listener     The message listener.
-    * @return A server session pool.
-    * @throws javax.jms.JMSException
-    * @throws javax.naming.NamingException Description of Exception
-    */
-   protected ServerSessionPool
-           createSessionPool(final Destination dest,
-                             final Connection connection,
-                             final boolean isTransacted,
-                             int ack,
-                             final MessageListener listener,
-                             Method method)
-           throws NamingException, JMSException
-   {
-      ServerSessionPool pool;
-      Context context = getInitialContext();
-
-      try
-      {
-         // first lookup the factory
-         log.debug("looking up session pool factory: " +
-                   config.getServerSessionPoolFactoryJNDI());
-         ServerSessionPoolFactory factory = (ServerSessionPoolFactory)
-                 context.lookup(config.getServerSessionPoolFactoryJNDI());
-         TransactionAttribute trans = (TransactionAttribute) resolveAnnotation(method, TransactionAttribute.class);
-         TransactionAttributeType txType = trans == null ? TransactionAttributeType.REQUIRED : trans.value();
-
-         boolean isNotSupportedTx = txType == TransactionAttributeType.NOT_SUPPORTED;
-
-         // the create the pool
-         // To work with JBoss 4.0.1SP1 and JBoss 4.0.2
-         // TODO remove this once JBoss 4.0.2 comes out
-         if (getServerSessionPool.getParameterTypes().length == 9)
-         {
-            // the create the pool
-            try
-            {
-               pool = (ServerSessionPool) getServerSessionPool.invoke(factory, dest, connection, config.getMinPoolSize(), config.getMaxPoolSize(), config.getKeepAlive(), isTransacted, ack, !isContainerManagedTx || isNotSupportedTx, listener);
-            }
-            catch (IllegalAccessException e)
-            {
-               throw new RuntimeException(e);
-            }
-            catch (InvocationTargetException e)
-            {
-               throw new RuntimeException(e);
-            }
-         }
-         else
-         {
-            // the create the pool
-            try
-            {
-               pool = (ServerSessionPool) getServerSessionPool.invoke(factory, connection, config.getMinPoolSize(), config.getMaxPoolSize(), config.getKeepAlive(), isTransacted, ack, !isContainerManagedTx || isNotSupportedTx, listener);
-            }
-            catch (IllegalAccessException e)
-            {
-               throw new RuntimeException(e);
-            }
-            catch (InvocationTargetException e)
-            {
-               throw new RuntimeException(e);
-            }
-         }
-      }
-      finally
-      {
-         context.close();
-      }
-
-      return pool;
-   }
-
-   /**
-    * Create and or lookup a JMS destination.
-    *
-    * @param type       Either javax.jms.Queue or javax.jms.Topic.
-    * @param ctx        The naming context to lookup destinations from.
-    * @param jndiName   The name to use when looking up destinations.
-    * @param jndiSuffix The name to use when creating destinations.
-    * @return The destination.
-    * @throws IllegalArgumentException Type is not Queue or Topic.
-    * @throws Exception                Description of Exception
-    */
-   protected Destination createDestination(final Class type,
-                                           final Context ctx,
-                                           final String jndiName,
-                                           final String jndiSuffix)
-           throws Exception
-   {
-      try
-      {
-         // first try to look it up
-         return (Destination) ctx.lookup(jndiName);
-      }
-      catch (NamingException e)
-      {
-         // if the lookup failes, the try to create it
-         log.warn("destination not found: " + jndiName + " reason: " + e);
-         log.warn("creating a new temporary destination: " + jndiName);
-
-         //
-         // jason: we should do away with this...
-         //
-         // attempt to create the destination (note, this is very
-         // very, very unportable).
-         //
-
-         MBeanServer server = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
-
-         String methodName;
-         if (type == Topic.class)
-         {
-            methodName = "createTopic";
-         }
-         else if (type == Queue.class)
-         {
-            methodName = "createQueue";
-         }
-         else
-         {
-            // type was not a Topic or Queue, bad user
-            throw new IllegalArgumentException
-                    ("Expected javax.jms.Queue or javax.jms.Topic: " + type);
-         }
-
-         // invoke the server to create the destination
-         server.invoke(new ObjectName("jboss.mq:service=DestinationManager"),
-                       methodName,
-                       new Object[]{jndiSuffix},
-                       new String[]{"java.lang.String"});
-
-         // try to look it up again
-         return (Destination) ctx.lookup(jndiName);
-      }
-   }
-
-   /**
-    * Parse the JNDI suffix from the given JNDI name.
-    *
-    * @param jndiname     The JNDI name used to lookup the destination.
-    * @param defautSuffix Description of Parameter
-    * @return The parsed suffix or the defaultSuffix
-    */
-   protected String parseJndiSuffix(final String jndiname,
-                                    final String defautSuffix)
-   {
-      // jndiSuffix is merely the name that the user has given the MDB.
-      // since the jndi name contains the message type I have to split
-      // at the "/" if there is no slash then I use the entire jndi name...
-      String jndiSuffix = "";
-
-      if (jndiname != null)
-      {
-         int indexOfSlash = jndiname.indexOf("/");
-         if (indexOfSlash != -1)
-         {
-            jndiSuffix = jndiname.substring(indexOfSlash + 1);
-         }
-         else
-         {
-            jndiSuffix = jndiname;
-         }
-      }
-      else
-      {
-         // if the jndi name from jboss.xml is null then lets use the ejbName
-         jndiSuffix = defautSuffix;
-      }
-
-      return jndiSuffix;
-   }
-
-   /**
-    * Return the JMSProviderAdapter that should be used.
-    *
-    * @return The JMSProviderAdapter to use.
-    */
-   protected JMSProviderAdapter getJMSProviderAdapter()
-           throws NamingException
-   {
-      Context context = getInitialContext();
-      //todo make this pluggable
-      String providerAdapterJNDI = config.getProviderAdapterJNDI();
-      try
-      {
-         log.debug("Looking up provider adapter: " + providerAdapterJNDI);
-         return (JMSProviderAdapter) context.lookup(providerAdapterJNDI);
-      }
-      finally
-      {
-         context.close();
-      }
-   }
-
-   /**
-    * Try to get a destination type by looking up the destination JNDI, or
-    * provide a default if there is not destinationJNDI or if it is not possible
-    * to lookup.
-    *
-    * @param ctx             The naming context to lookup destinations from.
-    * @param destinationJNDI The name to use when looking up destinations.
-    * @return The destination type, either derived from destinationJDNI or
-    *         DEFAULT_DESTINATION_TYPE
-    */
-   protected String getDestinationType(Context ctx, String destinationJNDI)
-   {
-      String destType = null;
-
-      if (destinationJNDI != null)
-      {
-         try
-         {
-            Destination dest = (Destination) ctx.lookup(destinationJNDI);
-            if (dest instanceof Topic)
-            {
-               destType = "javax.jms.Topic";
-            }
-            else if (dest instanceof Queue)
-            {
-               destType = "javax.jms.Queue";
-            }
-         }
-         catch (NamingException ex)
-         {
-            log.debug("Could not do heristic lookup of destination ", ex);
-         }
-
-      }
-      if (destType == null)
-      {
-         log.warn("Could not determine destination type, defaults to: " +
-                  DEFAULT_DESTINATION_TYPE);
-
-         destType = DEFAULT_DESTINATION_TYPE;
-      }
-
-      return destType;
-   }
-
-   private void setupDLQ(JMSProviderAdapter adapter) throws Exception
-   {
-      // Set up Dead Letter Queue handler
-      if (config.isUseDLQ())
-      {
-         dlqHandler = new DLQHandler(adapter, config);
-         dlqHandler.create();
-      }
-   }
-
-
-   private void populateActivationSpec()
-   {
       DefaultActivationSpecs defaultSpecs = (DefaultActivationSpecs) resolveAnnotation(DefaultActivationSpecs.class);
       if (defaultSpecs != null)
       {
@@ -836,335 +341,9 @@
       activationSpec.merge(md.activationConfig());
    }
 
-
-   public Object localInvoke(Method method, Object[] args) throws Throwable
-   {
-      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
-      ThreadLocalENCFactory.push(enc);
-      try
-      {
-         long hash = MethodHashing.calculateHash(method);
-         MethodInfo info = (MethodInfo) methodInterceptors.get(hash);
-         if (info == null)
-         {
-            throw new RuntimeException("Could not resolve beanClass method from proxy call");
-         }
-         Interceptor[] aspects1 = info.interceptors;
-         EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects1);
-         nextInvocation.setAdvisor(this);
-         nextInvocation.setArguments(args);
-         return nextInvocation.invokeNext();
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(oldLoader);
-         ThreadLocalENCFactory.pop();
-      }
-   }
-
-   public InvocationResponse dynamicInvoke(Invocation invocation) throws Throwable
-   {
-      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
-      EJBContainerInvocation newSi = null;
-      ThreadLocalENCFactory.push(enc);
-      try
-      {
-         Thread.currentThread().setContextClassLoader(classloader);
-         MethodInvocation si = (MethodInvocation) invocation;
-         MethodInfo info = (MethodInfo) methodInterceptors.get(si.getMethodHash());
-         if (info == null)
-         {
-            throw new RuntimeException("Could not resolve beanClass method from proxy call");
-         }
-         Interceptor[] aspects = info.interceptors;
-         newSi = new EJBContainerInvocation(info, aspects);
-         newSi.setArguments(si.getArguments());
-         newSi.setMetaData(si.getMetaData());
-         newSi.setAdvisor(this);
-
-         InvocationResponse response = new InvocationResponse(newSi.invokeNext());
-         response.setContextInfo(newSi.getResponseContextInfo());
-         return response;
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(oldLoader);
-         ThreadLocalENCFactory.pop();
-      }
-
-   }
-
-   public TimerService getTimerService()
-   {
-      return timerService;
-   }
-
-   public void callTimeout(Timer timer) throws Exception
-   {
-      Method timeout = callbackHandler.getTimeoutCallback();
-      if (timeout == null) throw new EJBException("No method has been annotated with @Timeout");
-      Object[] args = {timer};
-      try
-      {
-         localInvoke(timeout, args);
-      }
-      catch (Throwable throwable)
-      {
-         if (throwable instanceof Exception) throw (Exception) throwable;
-         throw new RuntimeException(throwable);
-      }
-   }
-
-   /**
-    * Stop done from inside, we should not stop the exceptionListener in inner
-    * stop.
-    */
-   protected void innerStop()
-   {
-      try
-      {
-         if (connection != null)
-         {
-            connection.setExceptionListener(null);
-            log.debug("unset exception listener");
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Could not set ExceptionListener to null", e);
-      }
-
-      // Stop the connection
-      try
-      {
-         if (connection != null)
-         {
-            connection.stop();
-            log.debug("connection stopped");
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Could not stop JMS connection", e);
-      }
-   }
-
-
    public void stop() throws Exception
    {
+      super.stop();
       unregisterProducers();
-      EjbTimerUtil.removeTimerService(this);
-      // Silence the exception listener
-      if (exListener != null)
-      {
-         exListener.stop();
-      }
-
-      innerStop();
-
-      if (dlqHandler != null)
-      {
-         dlqHandler.stop();
-      }
-
    }
-
-   public void destroy() throws Exception
-   {
-
-      // close the connection consumer
-      try
-      {
-         for (ConnectionConsumer consumer : connectionConsumers.values())
-         {
-            consumer.close();
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Failed to close connection consumer", e);
-      }
-
-      // clear the server session pool (if it is clearable)
-      try
-      {
-         for (ServerSessionPool ssp : serverSessionPools.values())
-         {
-
-            if (ssp instanceof StdServerSessionPool)
-            {
-               StdServerSessionPool p = (StdServerSessionPool) ssp;
-               p.clear();
-            }
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Failed to clear session pool", e);
-      }
-
-      // close the connection
-      if (connection != null)
-      {
-         try
-         {
-            connection.close();
-            connection = null;
-         }
-         catch (Exception e)
-         {
-            log.error("Failed to close connection", e);
-         }
-      }
-
-
-      // Take down DLQ
-      try
-      {
-         if (dlqHandler != null)
-         {
-            dlqHandler.destroy();
-            dlqHandler = null;
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Failed to close the dlq handler", e);
-      }
-
-   }
-
-   /**
-    * An implementation of MessageListener that passes messages on to the
-    * container invoker.
-    */
-   class MessageListenerImpl
-           implements MessageListener
-   {
-      /**
-       * The container invoker.
-       */
-      ConsumerContainer invoker;
-      // = null;
-
-      /**
-       * Construct a <tt>MessageListenerImpl</tt> .
-       *
-       * @param invoker The container invoker. Must not be null.
-       */
-      MessageListenerImpl(final ConsumerContainer invoker)
-      {
-         // assert invoker != null;
-
-         this.invoker = invoker;
-      }
-
-      /**
-       * Process a message.
-       *
-       * @param message The message to process.
-       */
-      public void onMessage(final Message message)
-      {
-         // assert message != null;
-         if (log.isTraceEnabled())
-         {
-            log.trace("processing message: " + message);
-         }
-
-         // Invoke, shuld we catch any Exceptions??
-         try
-         {
-            Transaction tx = TxUtil.getTransactionManager().getTransaction();
-
-            // DLQHandling
-            if (config.isUseDLQ() && // Is Dead Letter Queue used at all
-                message.getJMSRedelivered() && // Was message resent
-                dlqHandler.handleRedeliveredMessage(message, tx)) //Did the DLQ handler take care of the message
-            {
-               // Message will be placed on Dead Letter Queue,
-               // if redelivered to many times
-               return;
-            }
-            Invocation invocation = (Invocation) ((ObjectMessage) message).getObject();
-            invocation.getMetaData().addMetaData(CONSUMER_MESSAGE, CONSUMER_MESSAGE, message, PayloadKey.TRANSIENT);
-            invoker.dynamicInvoke(invocation);
-
-         }
-         catch (Throwable e)
-         {
-            log.error("Exception in JMSCI message listener", e);
-         }
-      }
-   }
-
-   /**
-    * ExceptionListener for failover handling.
-    */
-   class ExceptionListenerImpl
-           implements ExceptionListener
-   {
-      ConsumerContainer invoker;
-      Thread currentThread;
-      boolean notStoped = true;
-
-      ExceptionListenerImpl(final ConsumerContainer invoker)
-      {
-         this.invoker = invoker;
-      }
-
-      /**
-       * #Description of the Method
-       *
-       * @param ex Description of Parameter
-       */
-      public void onException(JMSException ex)
-      {
-         currentThread = Thread.currentThread();
-
-         log.warn("JMS provider failure detected: ", ex);
-         boolean tryIt = true;
-         while (tryIt && notStoped)
-         {
-            log.info("Trying to reconnect to JMS provider");
-            try
-            {
-               try
-               {
-                  Thread.sleep(config.getReconnectInterval());
-               }
-               catch (InterruptedException ie)
-               {
-                  tryIt = false;
-                  return;
-               }
-
-               // Reboot container
-               invoker.innerStop();
-               invoker.destroy();
-               invoker.start();
-               tryIt = false;
-
-               log.info("Reconnected to JMS provider");
-            }
-            catch (Exception e)
-            {
-               log.error("Reconnect failed: JMS provider failure detected:", e);
-            }
-         }
-         currentThread = null;
-      }
-
-      void stop()
-      {
-         log.debug("Stop requested");
-
-         notStoped = false;
-         if (currentThread != null)
-         {
-            currentThread.interrupt();
-            log.debug("Current thread interrupted");
-         }
-      }
-   }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/LocalProducerFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/LocalProducerFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/LocalProducerFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -71,7 +71,7 @@
    {
       super.start();
       try{
-         NonSerializableFactory.bind(ctx, jndiName + PROXY_FACTORY_NAME, this);
+         NonSerializableFactory.rebind(ctx, jndiName + PROXY_FACTORY_NAME, this);
       } catch (NamingException e)
       {
          NamingException namingException = new NamingException("Could not bind local producer factory with name " + factoryName + " into JNDI under jndiName: " + ctx.getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/MDB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/MDB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/MDB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,21 +23,18 @@
 
 import org.jboss.annotation.ejb.AcknowledgementMode;
 import org.jboss.annotation.ejb.DefaultActivationSpecs;
-import org.jboss.annotation.ejb.Durability;
 import org.jboss.annotation.ejb.ResourceAdapter;
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.MethodInfo;
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.aop.util.MethodHashing;
 import org.jboss.deployment.DeploymentException;
-import org.jboss.ejb.txtimer.TimedObjectInvoker;
 import org.jboss.ejb3.*;
 import org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
-import org.jboss.ejb3.tx.TxUtil;
+import org.jboss.ejb3.timerservice.TimedObjectInvoker;
+import org.jboss.ejb3.timerservice.TimerServiceFactory;
 import org.jboss.jms.ConnectionFactoryHelper;
-import org.jboss.jms.asf.ServerSessionPoolFactory;
-import org.jboss.jms.asf.StdServerSessionPool;
 import org.jboss.jms.jndi.JMSProviderAdapter;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ActivationConfigPropertyMetaData;
@@ -51,9 +48,7 @@
 import javax.management.ObjectName;
 import javax.naming.Context;
 import javax.naming.NamingException;
-import javax.transaction.Transaction;
 import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.*;
 
@@ -63,32 +58,12 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class MDB extends EJBContainer implements TimedObjectInvoker
+public class MDB extends MessagingContainer 
 {
    private static final Logger log = Logger.getLogger(MDB.class);
-
-   protected Method ON_MESSAGE;
-   protected TimerService timerService;
-   protected ActivationSpec activationSpec = new ActivationSpec();
-   protected boolean isContainerManagedTx;
-   protected AcknowledgementMode acknowledgeMode;
-   protected boolean isNotSupportedTx;
-   protected Connection connection;
-   protected ConnectionConsumer connectionConsumer;
-   protected ServerSessionPool serverSessionPool;
-   protected MDBConfig config;
-   protected ExceptionListenerImpl exListener;
-   protected DLQHandler dlqHandler;
+   
    protected Class messagingType = null;
-   protected JBossMessageEndpointFactory messageEndpointFactory;
-
    /**
-    * This is needed because API changed from JBoss 4.0.1sp1 to 4.0.2
-    * TODO remove this after 4.0.2 is out.
-    */
-   protected Method getServerSessionPool;
-
-   /**
     * Default destination type. Used when no message-driven-destination is given
     * in ejb-jar, and a lookup of destinationJNDI from jboss.xml is not
     * successfull. Default value: javax.jms.Topic.
@@ -98,24 +73,9 @@
    public MDB(String ejbName, AspectManager manager, ClassLoader cl, String beanClassName, Hashtable ctxProperties,
               InterceptorInfoRepository interceptorRepository, Ejb3Deployment deployment)
    {
-      super(Ejb3Module.BASE_EJB3_JMX_NAME + ",name=" + ejbName, manager, cl, beanClassName, ejbName, ctxProperties, interceptorRepository, deployment);
-      beanContextClass = MDBContext.class;
-      Method[] methods = ServerSessionPoolFactory.class.getMethods();
-      for (Method m : methods)
-      {
-         if (m.getName().equals("getServerSessionPool"))
-         {
-            getServerSessionPool = m;
-            break;
-         }
-      }
+      super(ejbName, manager, cl, beanClassName, ctxProperties, interceptorRepository, deployment);
    }
-
-   public void setMessageEndpointFactory(JBossMessageEndpointFactory messageEndpointFactory)
-   {
-      this.messageEndpointFactory = messageEndpointFactory;
-   }
-
+   
    public Class getMessagingType()
    {
       if (messagingType == null)
@@ -132,127 +92,40 @@
 
       return messagingType;
    }
-
-   public String getResourceAdaptorName()
+   
+   public MethodInfo getMethodInfo(Method method)
    {
-      ResourceAdapter annotation = (ResourceAdapter) resolveAnnotation(ResourceAdapter.class);
-      if (annotation == null) return null;
-      return annotation.value();
+      long hash = MethodHashing.calculateHash(method);
+      MethodInfo info = (MethodInfo) methodInterceptors.get(hash);
+      return info;
    }
 
-   public String getDestination()
-   {
-      String result = null;
-      MessageDriven annotation = (MessageDriven) resolveAnnotation(MessageDriven.class);
-      for (ActivationConfigProperty property : annotation.activationConfig())
-      {
-         if (property.propertyName().equals("destination"))
-         {
-            return property.propertyValue();
-         }
-      }
-
-      return result;
-   }
-
    public Map getActivationConfigProperties()
    {
       HashMap result = new HashMap();
-      MessageDriven annotation = (MessageDriven) resolveAnnotation(MessageDriven.class);
-      for (ActivationConfigProperty property : annotation.activationConfig())
+      MessageDriven mdAnnotation = (MessageDriven) resolveAnnotation(MessageDriven.class);
+      for (ActivationConfigProperty property : mdAnnotation.activationConfig())
       {
-         if (!property.propertyName().equals("destination") &&
-                 !property.propertyName().equals("resourceAdaptorName") &&
-                 !property.propertyName().equals("messagingType"))
+         addActivationSpecProperty(result, property);
+      }
+      
+      DefaultActivationSpecs defaultSpecsAnnotation = (DefaultActivationSpecs)resolveAnnotation(DefaultActivationSpecs.class);
+      if (defaultSpecsAnnotation != null)
+      {
+         for (ActivationConfigProperty property : defaultSpecsAnnotation.value())
          {
-            ActivationConfigPropertyMetaData metaData = new ActivationConfigPropertyMetaData();
-            try
-            {
-               Field nameField = ActivationConfigPropertyMetaData.class.getDeclaredField("name");
-               nameField.setAccessible(true);
-               nameField.set(metaData, property.propertyName());
-               Field valueField = ActivationConfigPropertyMetaData.class.getDeclaredField("value");
-               valueField.setAccessible(true);
-               valueField.set(metaData, property.propertyValue());
-            }
-            catch (Exception e)
-            {
-               throw new RuntimeException(e);
-            }
-
-            /*
-             * Older versions don't have this
-             * TODO revert to this after we ditch 4.0.3SP1 as supported EJB3 platform
-            metaData.setName(property.propertyName());
-            metaData.setValue(property.propertyValue());
-            */
-            result.put(property.propertyName(), metaData);
+            addActivationSpecProperty(result, property);
          }
       }
-
+      
       return result;
    }
-
-   /**
-    * Initialize the container invoker. Sets up a connection, a server session
-    * pool and a connection consumer for the configured destination.
-    * <p/>
-    * Any JMSExceptions produced while initializing will be assumed to be
-    * caused due to JMS Provider failure.
-    *
-    * @throws Exception Failed to initalize.
-    */
+   
    public void start() throws Exception
    {
       super.start();
-      exListener = new ExceptionListenerImpl(this);
-
-      populateActivationSpec();
-
-      config = MDBConfig.createMDBConfig(activationSpec);
-
-      innerStart();
-
-      timerService = EjbTimerUtil.getTimerService(this, this);
-
-      startProxies();
    }
 
-   protected void innerStart() throws Exception
-   {
-      try
-      {
-         innerCreate();
-      }
-      catch (final JMSException e)
-      {
-         //
-         // start a thread up to handle recovering the connection. so we can
-         // attach to the jms resources once they become available
-         //
-         new Thread("EJB3 MDB Create Recovery Thread")
-         {
-            public void run()
-            {
-               exListener.onException(e);
-            }
-         }.start();
-         return;
-      }
-
-      if (dlqHandler != null)
-      {
-         dlqHandler.start();
-      }
-
-      if (connection != null)
-      {
-         connection.setExceptionListener(exListener);
-         connection.start();
-      }
-
-   }
-
    public ObjectName getJmxName()
    {
       ObjectName jmxName = null;
@@ -271,558 +144,9 @@
 
       return jmxName;
    }
-
-   protected void startProxies() throws Exception
+   
+   protected void populateActivationSpec()
    {
-      if (messageEndpointFactory != null)
-      {
-         messageEndpointFactory.start();
-      }
-   }
-
-   private void innerCreate() throws Exception
-   {
-      log.debug("Initializing");
-
-      MessageDriven messageDriven = (MessageDriven) resolveAnnotation(MessageDriven.class);
-
-      // Get the JMS provider
-      // todo get rid of server module dependency
-      JMSProviderAdapter adapter = getJMSProviderAdapter();
-      log.debug("Provider adapter: " + adapter);
-
-      setupDLQ(adapter);
-
-      // Is container managed?
-      TransactionManagement transactionManagement = (TransactionManagement) resolveAnnotation(TransactionManagement.class);
-      if (transactionManagement == null)
-         isContainerManagedTx = true;
-      else
-         isContainerManagedTx = transactionManagement.value() == TransactionManagementType.CONTAINER;
-      String ackMode = config.getAcknowledgeMode();
-      if (ackMode != null && (ackMode.equals("DUPS_OK_ACKNOWLEDGE")
-              || ackMode.equals(AcknowledgementMode.AUTO_ACKNOWLEDGE.name())
-              || ackMode.equals("Dups-ok-acknowledge")))
-      {
-         acknowledgeMode = AcknowledgementMode.DUPS_OK;
-      }
-      else
-      {
-         acknowledgeMode = AcknowledgementMode.AUTO_ACKNOWLEDGE;
-      }
-
-      TransactionAttribute trans = (TransactionAttribute) resolveAnnotation(getOnMessage(), TransactionAttribute.class);
-      TransactionAttributeType txType = trans == null ? TransactionAttributeType.REQUIRED : trans.value();
-
-      isNotSupportedTx = txType == TransactionAttributeType.NOT_SUPPORTED;
-
-      // Connect to the JNDI server and get a reference to root context
-      Context context = adapter.getInitialContext();
-      log.debug("context: " + context);
-
-      // if we can't get the root context then exit with an exception
-      if (context == null)
-      {
-         throw new RuntimeException("Failed to get the root context");
-      }
-
-      String destinationType = config.getDestinationType();
-
-      // Unfortunately the destination is optional, so if we do not have one
-      // here we have to look it up if we have a destinationJNDI, else give it
-      // a default.
-      if (destinationType == null)
-      {
-         log.warn("No message-driven-destination given; using; guessing type");
-         destinationType = getDestinationType(context, config.getDestination());
-      }
-
-      if ("javax.jms.Topic".equals(destinationType))
-      {
-         innerCreateTopic(context, adapter);
-
-      }
-      else if ("javax.jms.Queue".equals(destinationType))
-      {
-         innerCreateQueue(context, adapter);
-
-      }
-      else
-         throw new DeploymentException("Unknown destination-type " + destinationType);
-
-      log.debug("Initialized with config " + toString());
-
-      context.close();
-   }
-
-   private void innerCreateQueue(Context context, JMSProviderAdapter adapter)
-           throws Exception
-   {
-      log.debug("Got destination type Queue for " + ejbName);
-
-      // Get the JNDI suffix of the destination
-      String jndiSuffix = parseJndiSuffix(config.getDestination(), ejbName);
-      log.debug("jndiSuffix: " + jndiSuffix);
-
-      // create a queue connection
-      Object qFactory = context.lookup(adapter.getQueueFactoryRef());
-      QueueConnection qConnection = null;
-      try
-      {
-         qConnection = ConnectionFactoryHelper.createQueueConnection(qFactory, config.getUser(), config.getPassword());
-         connection = qConnection;
-      }
-      catch (ClassCastException e)
-      {
-         throw new DeploymentException("Expected a QueueConnection check your provider adaptor: "
-                 + adapter.getQueueFactoryRef());
-      }
-
-      // Set the optional client id
-      String clientId = config.getClientID();
-
-      log.debug("Using client id: " + clientId);
-      if (clientId != null && clientId.length() > 0)
-         connection.setClientID(clientId);
-
-      // lookup or create the destination queue
-      Queue queue = null;
-      try
-      {
-         // First we try the specified queue
-         if (config.getDestination() != null)
-            queue = (Queue) context.lookup(config.getDestination());
-      }
-      catch (NamingException e)
-      {
-         log.warn("Could not find the queue destination-jndi-name=" + config.getDestination());
-      }
-      catch (ClassCastException e)
-      {
-         throw new DeploymentException("Expected a Queue destination-jndi-name=" + config.getDestination());
-      }
-
-      // FIXME: This is not portable, only works for JBossMQ
-      if (queue == null)
-         queue = (Queue) createDestination(Queue.class,
-                 context,
-                 "queue/" + jndiSuffix,
-                 jndiSuffix);
-
-
-      if (queue != null)
-      {
-         // set up the server session pool
-         serverSessionPool = createSessionPool(queue,
-                 qConnection,
-                 true, // tx
-                 acknowledgeMode.ordinal(),
-                 new MessageListenerImpl(this));
-         log.debug("Server session pool: " + pool);
-
-         // create the connection consumer
-         connectionConsumer =
-                 qConnection.createConnectionConsumer(queue,
-                         config.getMessageSelector(),
-                         serverSessionPool,
-                         config.getMaxMessages());
-         log.debug("Connection consumer: " + connectionConsumer);
-      }
-   }
-
-   private void innerCreateTopic(Context context, JMSProviderAdapter adapter)
-           throws Exception
-   {
-      log.debug("Got destination type Topic for " + ejbName);
-
-      // Get the JNDI suffix of the destination
-      String jndiSuffix = parseJndiSuffix(config.getDestination(), ejbName);
-      log.debug("jndiSuffix: " + jndiSuffix);
-
-      // create a topic connection
-      Object factory = context.lookup(adapter.getTopicFactoryRef());
-      TopicConnection tConnection = null;
-      try
-      {
-         tConnection = ConnectionFactoryHelper.createTopicConnection(factory, config.getUser(), config.getPassword());
-         connection = tConnection;
-      }
-      catch (ClassCastException e)
-      {
-         throw new DeploymentException("Expected a TopicConnection check your provider adaptor: "
-                 + adapter.getTopicFactoryRef());
-      }
-
-      // Fix: ClientId must be set as the first method call after connection creation.
-      // Fix: ClientId is necessary for durable subscriptions.
-
-      String clientId = config.getClientID();
-
-      log.debug("Using client id: " + clientId);
-      if (clientId != null && clientId.length() > 0)
-         connection.setClientID(clientId);
-
-      // lookup or create the destination topic
-      Topic topic = null;
-      try
-      {
-         // First we try the specified topic
-         if (config.getDestination() != null)
-            topic = (Topic) context.lookup(config.getDestination());
-      }
-      catch (NamingException e)
-      {
-         log.warn("Could not find the topic destination-jndi-name=" + config.getDestination());
-      }
-      catch (ClassCastException e)
-      {
-         throw new DeploymentException("Expected a Topic destination-jndi-name=" + config.getDestination());
-      }
-
-      // FIXME: This is not portable, only works for JBossMQ
-      if (topic == null)
-         topic = (Topic) createDestination(Topic.class,
-                 context,
-                 "topic/" + jndiSuffix,
-                 jndiSuffix);
-      if (topic != null)
-      {
-         // set up the server session pool
-         serverSessionPool = createSessionPool(topic,
-                 tConnection,
-                 true, // tx
-                 acknowledgeMode.ordinal(),
-                 new MessageListenerImpl(this));
-
-         String durability = config.getDurability();
-         Durability subscriptionDurability;
-
-         if (durability != null && durability.equals("Durable"))
-         {
-            subscriptionDurability = Durability.DURABLE;
-         }
-         else
-         {
-            subscriptionDurability = Durability.NON_DURABLE;
-         }
-
-         // To be no-durable or durable
-         if (subscriptionDurability == Durability.NON_DURABLE)
-         {
-            // Create non durable
-            connectionConsumer =
-                    tConnection.createConnectionConsumer(topic,
-                            config.getMessageSelector(),
-                            serverSessionPool,
-                            config.getMaxMessages());
-         }
-         else
-         {
-            // Durable subscription
-            String durableName = config.getSubscriptionName();
-
-            connectionConsumer =
-                    tConnection.createDurableConnectionConsumer(topic,
-                            durableName,
-                            config.getMessageSelector(),
-                            serverSessionPool,
-                            config.getMaxMessages());
-         }
-         log.debug("Topic connectionConsumer set up");
-      }
-   }
-
-   /**
-    * Create a server session pool for the given connection.
-    *
-    * @param connection   The connection to use.
-    * @param minSession   The minumum number of sessions
-    * @param maxSession   The maximum number of sessions.
-    * @param keepAlive    The time to keep sessions alive
-    * @param isTransacted True if the sessions are transacted.
-    * @param ack          The session acknowledgement mode.
-    * @param listener     The message listener.
-    * @return A server session pool.
-    * @throws javax.jms.JMSException
-    * @throws NamingException        Description of Exception
-    */
-   protected ServerSessionPool
-           createSessionPool(final Destination dest,
-                             final Connection connection,
-                             final boolean isTransacted,
-                             int ack,
-                             final MessageListener listener)
-           throws NamingException, JMSException
-   {
-      ServerSessionPool pool;
-      Context context = EJB3Util.getInitialContext(initialContextProperties);
-
-      try
-      {
-         // first lookup the factory
-         log.debug("JNDI Hashtable: " + initialContextProperties);
-         ServerSessionPoolFactory factory = (ServerSessionPoolFactory)
-                 context.lookup(config.getServerSessionPoolFactoryJNDI());
-
-         // To work with JBoss 4.0.1SP1 and JBoss 4.0.2
-         // TODO remove this once JBoss 4.0.2 comes out
-         if (getServerSessionPool.getParameterTypes().length == 9)
-         {
-            // the create the pool
-            try
-            {
-               pool = (ServerSessionPool) getServerSessionPool.invoke(factory, dest, connection, config.getMinPoolSize(), config.getMaxPoolSize(), config.getKeepAlive(), isTransacted, ack, !isContainerManagedTx || isNotSupportedTx, listener);
-            }
-            catch (IllegalAccessException e)
-            {
-               throw new RuntimeException(e);
-            }
-            catch (InvocationTargetException e)
-            {
-               throw new RuntimeException(e);
-            }
-         }
-         else
-         {
-            // the create the pool
-            try
-            {
-               pool = (ServerSessionPool) getServerSessionPool.invoke(factory, connection, config.getMinPoolSize(), config.getMaxPoolSize(), config.getKeepAlive(), isTransacted, ack, !isContainerManagedTx || isNotSupportedTx, listener);
-            }
-            catch (IllegalAccessException e)
-            {
-               throw new RuntimeException(e);
-            }
-            catch (InvocationTargetException e)
-            {
-               throw new RuntimeException(e);
-            }
-         }
-      }
-      finally
-      {
-         context.close();
-      }
-
-      return pool;
-   }
-
-   /**
-    * Create and or lookup a JMS destination.
-    *
-    * @param type       Either javax.jms.Queue or javax.jms.Topic.
-    * @param ctx        The naming context to lookup destinations from.
-    * @param jndiName   The name to use when looking up destinations.
-    * @param jndiSuffix The name to use when creating destinations.
-    * @return The destination.
-    * @throws IllegalArgumentException Type is not Queue or Topic.
-    * @throws Exception                Description of Exception
-    */
-   protected Destination createDestination(final Class type,
-                                           final Context ctx,
-                                           final String jndiName,
-                                           final String jndiSuffix)
-           throws Exception
-   {
-      try
-      {
-         // first try to look it up
-         return (Destination) ctx.lookup(jndiName);
-      }
-      catch (NamingException e)
-      {
-         // is JMS?
-         if (getDestination() == null)
-         {
-            return null;
-         }
-         else
-         {
-            // if the lookup failes, the try to create it
-            log.warn("destination not found: " + jndiName + " reason: " + e);
-            log.warn("creating a new temporary destination: " + jndiName);
-
-            //
-            // jason: we should do away with this...
-            //
-            // attempt to create the destination (note, this is very
-            // very, very unportable).
-            //
-
-            MBeanServer server = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
-
-            String methodName;
-            if (type == Topic.class)
-            {
-               methodName = "createTopic";
-            }
-            else if (type == Queue.class)
-            {
-               methodName = "createQueue";
-            }
-            else
-            {
-               // type was not a Topic or Queue, bad user
-               throw new IllegalArgumentException
-                       ("Expected javax.jms.Queue or javax.jms.Topic: " + type);
-            }
-
-            // invoke the server to create the destination
-            server.invoke(new ObjectName("jboss.mq:service=DestinationManager"),
-                    methodName,
-                    new Object[]{jndiSuffix},
-                    new String[]{"java.lang.String"});
-
-            // try to look it up again
-            return (Destination) ctx.lookup(jndiName);
-         }
-      }
-   }
-
-   /**
-    * Parse the JNDI suffix from the given JNDI name.
-    *
-    * @param jndiname     The JNDI name used to lookup the destination.
-    * @param defautSuffix Description of Parameter
-    * @return The parsed suffix or the defaultSuffix
-    */
-   protected String parseJndiSuffix(final String jndiname,
-                                    final String defautSuffix)
-   {
-      // jndiSuffix is merely the name that the user has given the MDB.
-      // since the jndi name contains the message type I have to split
-      // at the "/" if there is no slash then I use the entire jndi name...
-      String jndiSuffix = "";
-
-      if (jndiname != null)
-      {
-         int indexOfSlash = jndiname.indexOf("/");
-         if (indexOfSlash != -1)
-         {
-            jndiSuffix = jndiname.substring(indexOfSlash + 1);
-         }
-         else
-         {
-            jndiSuffix = jndiname;
-         }
-      }
-      else
-      {
-         // if the jndi name from jboss.xml is null then lets use the ejbName
-         jndiSuffix = defautSuffix;
-      }
-
-      return jndiSuffix;
-   }
-
-   /**
-    * Return the JMSProviderAdapter that should be used.
-    *
-    * @return The JMSProviderAdapter to use.
-    */
-   protected JMSProviderAdapter getJMSProviderAdapter()
-           throws NamingException
-   {
-      Context context = getInitialContext();
-      //todo make this pluggable
-      String providerAdapterJNDI = config.getProviderAdapterJNDI();
-      try
-      {
-         log.debug("Looking up provider adapter: " + providerAdapterJNDI);
-         return (JMSProviderAdapter) context.lookup(providerAdapterJNDI);
-      }
-      finally
-      {
-         context.close();
-      }
-   }
-
-   /**
-    * Try to get a destination type by looking up the destination JNDI, or
-    * provide a default if there is not destinationJNDI or if it is not possible
-    * to lookup.
-    *
-    * @param ctx             The naming context to lookup destinations from.
-    * @param destinationJNDI The name to use when looking up destinations.
-    * @return The destination type, either derived from destinationJDNI or
-    *         DEFAULT_DESTINATION_TYPE
-    */
-   protected String getDestinationType(Context ctx, String destinationJNDI)
-   {
-      String destType = null;
-
-      if (destinationJNDI != null)
-      {
-         try
-         {
-            Destination dest = (Destination) ctx.lookup(destinationJNDI);
-            if (dest instanceof javax.jms.Topic)
-            {
-               destType = "javax.jms.Topic";
-            }
-            else if (dest instanceof javax.jms.Queue)
-            {
-               destType = "javax.jms.Queue";
-            }
-         }
-         catch (NamingException ex)
-         {
-            log.debug("Could not do heristic lookup of destination ", ex);
-         }
-
-      }
-      if (destType == null)
-      {
-         log.warn("Could not determine destination type, defaults to: " +
-                 DEFAULT_DESTINATION_TYPE);
-
-         destType = DEFAULT_DESTINATION_TYPE;
-      }
-
-      return destType;
-   }
-
-   private void setupDLQ(JMSProviderAdapter adapter) throws Exception
-   {
-      // Set up Dead Letter Queue handler
-      if (config.isUseDLQ())
-      {
-         dlqHandler = new DLQHandler(adapter, config);
-         dlqHandler.create();
-      }
-   }
-
-   /**
-    * Initialize the ON_MESSAGE reference.
-    */
-   protected Method getOnMessage()
-   {
-      if (ON_MESSAGE != null) return ON_MESSAGE;
-      try
-      {
-         final Class arg = Message.class;
-         if (javax.jms.MessageListener.class.isAssignableFrom(clazz))
-         {
-            ON_MESSAGE = clazz.getMethod("onMessage", new Class[]{arg});
-         }
-         else
-         {
-            Class messagingTypeClass = getMessagingType();
-            Method[] methods = messagingTypeClass.getDeclaredMethods();
-            ON_MESSAGE = methods[0];
-         }
-      }
-      catch (Exception e)
-      {
-         e.printStackTrace();
-         throw new ExceptionInInitializerError(e);
-      }
-
-      return ON_MESSAGE;
-   }
-
-   private void populateActivationSpec()
-   {
       DefaultActivationSpecs defaultSpecs = (DefaultActivationSpecs) resolveAnnotation(DefaultActivationSpecs.class);
       if (defaultSpecs != null)
       {
@@ -833,326 +157,4 @@
 
       activationSpec.merge(md.activationConfig());
    }
-
-   public Object localInvoke(Method method, Object[] args) throws Throwable
-   {
-      MethodInfo info = getMethodInfo(method);
-      if (info == null)
-      {
-         throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
-      }
-      return localInvoke(info, args);
-
-   }
-
-   public MethodInfo getMethodInfo(Method method)
-   {
-      long hash = MethodHashing.calculateHash(method);
-      MethodInfo info = (MethodInfo) methodInterceptors.get(hash);
-      return info;
-   }
-
-   public Object localInvoke(MethodInfo info, Object[] args) throws Throwable
-   {
-      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
-      ThreadLocalENCFactory.push(enc);
-      try
-      {
-         Interceptor[] aspects = info.interceptors;
-         EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects);
-         nextInvocation.setAdvisor(this);
-         nextInvocation.setArguments(args);
-         return nextInvocation.invokeNext();
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(oldLoader);
-         ThreadLocalENCFactory.pop();
-      }
-   }
-
-   public TimerService getTimerService()
-   {
-      return timerService;
-   }
-
-   public void callTimeout(Timer timer) throws Exception
-   {
-      Method timeout = callbackHandler.getTimeoutCallback();
-      if (timeout == null) throw new EJBException("No method has been annotated with @Timeout");
-      Object[] args = {timer};
-      try
-      {
-         localInvoke(timeout, args);
-      }
-      catch (Throwable throwable)
-      {
-         if (throwable instanceof Exception) throw (Exception) throwable;
-         throw new RuntimeException(throwable);
-      }
-   }
-
-   /**
-    * Stop done from inside, we should not stop the exceptionListener in inner
-    * stop.
-    */
-   protected void innerStop()
-   {
-      try
-      {
-         if (connection != null)
-         {
-            connection.setExceptionListener(null);
-            log.debug("unset exception listener");
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Could not set ExceptionListener to null", e);
-      }
-
-      // Stop the connection
-      try
-      {
-         if (connection != null)
-         {
-            connection.stop();
-            log.debug("connection stopped");
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Could not stop JMS connection", e);
-      }
-   }
-
-
-   public void stop() throws Exception
-   {
-      EjbTimerUtil.removeTimerService(this);
-      // Silence the exception listener
-      if (exListener != null)
-      {
-         exListener.stop();
-      }
-
-      innerStop();
-
-      if (dlqHandler != null)
-      {
-         dlqHandler.stop();
-      }
-
-      stopProxies();
-   }
-
-   protected void stopProxies() throws Exception
-   {
-      if (messageEndpointFactory != null)
-      {
-         messageEndpointFactory.stop();
-      }
-   }
-
-   public void innerDestroy() throws Exception
-   {
-
-      // close the connection consumer
-      try
-      {
-         if (connectionConsumer != null)
-         {
-            connectionConsumer.close();
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Failed to close connection consumer", e);
-      }
-
-      // clear the server session pool (if it is clearable)
-      try
-      {
-         if (serverSessionPool instanceof StdServerSessionPool)
-         {
-            StdServerSessionPool p = (StdServerSessionPool) serverSessionPool;
-            p.clear();
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Failed to clear session pool", e);
-      }
-
-      // close the connection
-      if (connection != null)
-      {
-         try
-         {
-            connection.close();
-            connection = null;
-         }
-         catch (Exception e)
-         {
-            log.error("Failed to close connection", e);
-         }
-      }
-
-      // Take down DLQ
-      try
-      {
-         if (dlqHandler != null)
-         {
-            dlqHandler.destroy();
-            dlqHandler = null;
-         }
-      }
-      catch (Exception e)
-      {
-         log.error("Failed to close the dlq handler", e);
-      }
-
-   }
-
-   public void destroy() throws Exception
-   {
-      innerDestroy();
-   }
-
-   /**
-    * An implementation of MessageListener that passes messages on to the
-    * container invoker.
-    */
-   class MessageListenerImpl
-           implements MessageListener
-   {
-      /**
-       * The container invoker.
-       */
-      MDB invoker;
-      // = null;
-
-      /**
-       * Construct a <tt>MessageListenerImpl</tt> .
-       *
-       * @param invoker The container invoker. Must not be null.
-       */
-      MessageListenerImpl(final MDB invoker)
-      {
-         // assert invoker != null;
-
-         this.invoker = invoker;
-      }
-
-      /**
-       * Process a message.
-       *
-       * @param message The message to process.
-       */
-      public void onMessage(final Message message)
-      {
-         // assert message != null;
-         if (log.isTraceEnabled())
-         {
-            log.trace("processing message: " + message);
-         }
-
-         // Invoke, shuld we catch any Exceptions??
-         try
-         {
-            Transaction tx = TxUtil.getTransactionManager().getTransaction();
-
-            // DLQHandling
-            if (config.isUseDLQ() && // Is Dead Letter Queue used at all
-                    message.getJMSRedelivered() && // Was message resent
-                    dlqHandler.handleRedeliveredMessage(message, tx)) //Did the DLQ handler take care of the message
-            {
-               // Message will be placed on Dead Letter Queue,
-               // if redelivered to many times
-               return;
-            }
-            invoker.localInvoke(ON_MESSAGE,
-                    new Object[]{message});
-
-         }
-         catch (RuntimeException e)
-         {
-            throw e;
-         }
-         catch (Throwable e)
-         {
-            log.error("Exception in JMSCI message listener", e);
-         }
-      }
-   }
-
-   /**
-    * ExceptionListener for failover handling.
-    */
-   class ExceptionListenerImpl
-           implements ExceptionListener
-   {
-      MDB invoker;
-      Thread currentThread;
-      boolean notStoped = true;
-
-      ExceptionListenerImpl(final MDB invoker)
-      {
-         this.invoker = invoker;
-      }
-
-      /**
-       * #Description of the Method
-       *
-       * @param ex Description of Parameter
-       */
-      public void onException(JMSException ex)
-      {
-         currentThread = Thread.currentThread();
-
-         log.warn("JMS provider failure detected: ", ex);
-         boolean tryIt = true;
-         while (tryIt && notStoped)
-         {
-            log.info("Trying to reconnect to JMS provider");
-            try
-            {
-               try
-               {
-                  Thread.sleep(config.getReconnectInterval());
-               }
-               catch (InterruptedException ie)
-               {
-                  tryIt = false;
-                  return;
-               }
-
-               // Reboot container
-               invoker.innerStop();
-               invoker.innerDestroy();
-               invoker.innerStart();
-               tryIt = false;
-
-               log.info("Reconnected to JMS provider");
-            }
-            catch (Exception e)
-            {
-               log.error("Reconnect failed: JMS provider failure detected:", e);
-            }
-         }
-         currentThread = null;
-      }
-
-      void stop()
-      {
-         log.debug("Stop requested");
-
-         notStoped = false;
-         if (currentThread != null)
-         {
-            currentThread.interrupt();
-            log.debug("Current thread interrupted");
-         }
-      }
-   }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ProducerFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ProducerFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ProducerFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -109,6 +109,18 @@
       jndiName = producer.getName();
    }
 
+   public Object createHomeProxy()
+   {
+      throw new UnsupportedOperationException("producer can't have a home interface");
+   }
+   
+   public Object createProxy(Object id)
+   {
+      if(id != null)
+         throw new IllegalArgumentException("producer proxy must not have an id");
+      return createProxy();
+   }
+   
    public void setContainer(Container container)
    {
    }
@@ -124,7 +136,7 @@
      
       try
       {
-         Util.bind(baseCtx, atom, ref);
+         Util.rebind(baseCtx, atom, ref);
       } catch (NamingException e)
       {
          NamingException namingException = new NamingException("Could not bind producer factory into JNDI under jndiName: " + baseCtx.getNameInNamespace() + "/" + atom);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ProducerManagerImpl.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ProducerManagerImpl.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/ProducerManagerImpl.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -44,6 +44,7 @@
 import org.jboss.aop.joinpoint.Invocation;
 import org.jboss.aop.joinpoint.MethodInvocation;
 import org.jboss.ejb3.EJB3Util;
+import org.jboss.logging.Logger;
 
 /**
  * comment
@@ -52,6 +53,8 @@
  */
 public class ProducerManagerImpl implements ProducerManager, Externalizable, Interceptor
 {
+   private static final Logger log = Logger.getLogger(ProducerManagerImpl.class);
+   
    private static final int PERSISTENT = javax.jms.DeliveryMode.PERSISTENT;
    private static final int NON_PERSISTENT = javax.jms.DeliveryMode.NON_PERSISTENT;
    

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/RemoteProducerFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/RemoteProducerFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/RemoteProducerFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -84,7 +84,7 @@
       Object factoryProxy = Remoting.createPojiProxy(jndiName + PROXY_FACTORY_NAME, interfaces, RemoteProxyFactory.DEFAULT_CLIENT_BINDING);
       try
       {
-         Util.bind(ctx, jndiName + PROXY_FACTORY_NAME, factoryProxy);
+         Util.rebind(ctx, jndiName + PROXY_FACTORY_NAME, factoryProxy);
       } catch (NamingException e)
       {
          NamingException namingException = new NamingException("Could not bind remote producer factory into JNDI under jndiName: " + ctx.getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/inflow/JBossMessageEndpointFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/inflow/JBossMessageEndpointFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/inflow/JBossMessageEndpointFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -40,8 +40,9 @@
 
 import org.jboss.deployment.DeploymentException;
 import org.jboss.ejb3.Container;
+import org.jboss.ejb3.KernelAbstractionFactory;
 import org.jboss.ejb3.tx.TxUtil;
-import org.jboss.ejb3.mdb.MDB;
+import org.jboss.ejb3.mdb.MessagingContainer;
 import org.jboss.mx.util.JMXExceptionDecoder;
 import org.jboss.logging.Logger;
 
@@ -62,11 +63,8 @@
    protected boolean trace = log.isTraceEnabled();
    
    /** Our container */
-   protected MDB container;
+   protected MessagingContainer container;
    
-   /** Our meta data */
-//   protected MessageDrivenMetaData metaData;
-   
    /** The activation properties */
    protected HashMap properties = new HashMap();
    
@@ -86,8 +84,6 @@
 
    /** The next proxy id */
    protected SynchronizedInt nextProxyId = new SynchronizedInt(0);
-
-   protected MBeanServer server;
     
    // Static --------------------------------------------------------
    
@@ -118,7 +114,7 @@
     * 
     * @return the container
     */
-   public MDB getContainer()
+   public MessagingContainer getContainer()
    {
       return container;
    }
@@ -131,9 +127,9 @@
       
       if (trace)
          log.trace("createEndpoint " + this + " xaResource=" + resource);
-         
+          
       MessageEndpoint endpoint = createProxy(resource);
-      
+        
       if (trace)
          log.trace("Created endpoint " + endpoint + " from " + this);
 
@@ -184,8 +180,6 @@
    
    public void start() throws Exception
    {
-      // Lets take a reference to our metadata
- //     metaData = (MessageDrivenMetaData) container.getBeanMetaData();
       // Resolve the message listener
       resolveMessageListener();
       resolveResourceAdapterName();
@@ -214,7 +208,7 @@
     */
    public void setContainer(final Container container)
    {
-      this.container = (MDB) container;
+      this.container = (MessagingContainer) container;
    }
    
    // Object overrides ----------------------------------------------
@@ -262,7 +256,6 @@
    {
       try
       {
-         server = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
          resourceAdapterObjectName = new ObjectName("jboss.jca:service=RARDeployment,name='" + resourceAdapterName + "'");
          // todo register with kernel and push dependencies to kernel
       }
@@ -271,19 +264,6 @@
          throw new RuntimeException(e);
       }
    }
-
-
-   /**
-    * Add activation config properties
-    * 
-    * @throws DeploymentException for any error
-    */
-   protected void augmentActivationConfigProperties() throws DeploymentException
-   {
-      String jndiName = container.getDestination();
-      if (jndiName != null)
-         properties.put("destination", jndiName);
-   }   
    
    /**
     * Create the activation spec
@@ -293,16 +273,16 @@
    protected void createActivationSpec() throws DeploymentException
    {
       properties = new HashMap(container.getActivationConfigProperties());
-      augmentActivationConfigProperties();
-      
+         
       Object[] params = new Object[] 
       {
          messagingTypeClass,
          properties.values()
       };
+    
       try
       {
-         activationSpec = (ActivationSpec) server.invoke(resourceAdapterObjectName, "createActivationSpec", params, createActivationSpecSig);
+         activationSpec = (ActivationSpec) KernelAbstractionFactory.getInstance().invoke(resourceAdapterObjectName, "createActivationSpec", params, createActivationSpecSig);
       }
       catch (Throwable t)
       {
@@ -318,11 +298,11 @@
     * @throws DeploymentException for any error
     */
    protected void activate() throws DeploymentException
-   {
+   {   
       Object[] params = new Object[] { this, activationSpec };
       try
       {
-         server.invoke(resourceAdapterObjectName, "endpointActivation", params, activationSig);
+         KernelAbstractionFactory.getInstance().invoke(resourceAdapterObjectName, "endpointActivation", params, activationSig);
       }
       catch (Throwable t)
       {
@@ -340,7 +320,7 @@
       Object[] params = new Object[] { this, activationSpec };
       try
       {
-         server.invoke(resourceAdapterObjectName, "endpointDeactivation", params, activationSig);
+         KernelAbstractionFactory.getInstance().invoke(resourceAdapterObjectName, "endpointDeactivation", params, activationSig);
       }
       catch (Throwable t)
       {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -34,6 +34,7 @@
 import org.jboss.aop.joinpoint.Invocation;
 import org.jboss.aop.joinpoint.MethodInvocation;
 import org.jboss.aop.MethodInfo;
+import org.jboss.ejb3.mdb.MessagingContainer;
 import org.jboss.ejb3.mdb.MDB;
 import org.jboss.ejb3.tx.TxUtil;
 import org.jboss.logging.Logger;
@@ -84,11 +85,11 @@
    private XAResource resource;
    private MessageEndpointFactory messageEndpointFactory;
    
-   MDB mdb;
+   MessagingContainer container;
 
-   protected MessageInflowLocalProxy(MDB mdb)
+   protected MessageInflowLocalProxy(MessagingContainer container)
    {
-      this.mdb = mdb;
+      this.container = container;
    }
 
    public void setMessageEndpointFactory(MessageEndpointFactory messageEndpointFactory)
@@ -125,7 +126,7 @@
       }
       else if (method.getName().equals("beforeDelivery"))
       {
-         before(proxy, mdb, method, args);
+         before(proxy, container, method, args);
          return null;
       }
       else if (method.getName().equals("afterDelivery"))
@@ -134,12 +135,12 @@
          return null;
       }
       else
-         return delivery(proxy, mdb, method, args);
+         return delivery(proxy, container, method, args);
    }
 
    public String toString()
    {
-      return mdb.getEjbName().toString();
+      return container.getEjbName().toString();
    }
    
    // -----------------------------------------------------------
@@ -178,7 +179,7 @@
     * @param mi the invocation
     * @throws Throwable for any error
     */
-   protected void before(Object proxy, MDB container, Method method, Object[] args) throws Throwable
+   protected void before(Object proxy, MessagingContainer container, Method method, Object[] args) throws Throwable
    {
       // Called out of sequence
       if (oldClassLoader != null)
@@ -197,8 +198,8 @@
       try
       {
          // Is the delivery transacted?
-         MethodInfo methodInfo = mdb.getMethodInfo((Method)args[0]);
-         boolean isTransacted = messageEndpointFactory.isDeliveryTransacted(methodInfo.advisedMethod);
+         MethodInfo methodInfo = container.getMethodInfo((Method)args[0]);
+         boolean isTransacted = messageEndpointFactory.isDeliveryTransacted(methodInfo.getAdvisedMethod());
 
          startTransaction("beforeDelivery", proxy, container, method, args, isTransacted);
       }
@@ -239,7 +240,7 @@
     * @return the result of the delivery
     * @throws Throwable for any error
     */
-   protected Object delivery(Object proxy, MDB container, Method method, Object[] args) throws Throwable
+   protected Object delivery(Object proxy, MessagingContainer container, Method method, Object[] args) throws Throwable
    {
       // Have we already delivered a message?
       if (delivered)
@@ -254,14 +255,14 @@
 
       boolean commit = true;
       // Is the delivery transacted?
-      MethodInfo methodInfo = mdb.getMethodInfo(method);
+      MethodInfo methodInfo = container.getMethodInfo(method);
 
       try
       {
          // Check for starting a transaction
          if (oldClassLoader == null)
          {
-            boolean isTransacted = messageEndpointFactory.isDeliveryTransacted(methodInfo.advisedMethod);
+            boolean isTransacted = messageEndpointFactory.isDeliveryTransacted(methodInfo.getAdvisedMethod());
             startTransaction("delivery", proxy, container, method, args, isTransacted);
          }
          return container.localInvoke(methodInfo, args);
@@ -329,7 +330,7 @@
     * @param container the container
     * @throws Throwable for any error
     */
-   protected void startTransaction(String context, Object proxy, MDB container, Method m, Object[] args, boolean isTransacted) throws Throwable
+   protected void startTransaction(String context, Object proxy, MessagingContainer container, Method m, Object[] args, boolean isTransacted) throws Throwable
    { 
       Method method;
       
@@ -523,7 +524,7 @@
     *
     * @return the container
     */
-   protected org.jboss.ejb3.mdb.MDB getContainer(Invocation mi)
+   protected MessagingContainer getContainer(Invocation mi)
    {
       return getMessageEndpointFactory(mi).getContainer();
    }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/.cvsignore
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/.cvsignore	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/.cvsignore	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1 +0,0 @@
-Callback.java

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/.cvsignore (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/.cvsignore)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ActivationConfig.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ActivationConfig.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ActivationConfig.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,63 +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 org.jboss.ejb3.metamodel;
-
-import java.util.List;
-import java.util.ArrayList;
-
-import org.jboss.metamodel.descriptor.NameValuePair;
-
-import org.jboss.logging.Logger;
-
-/**
- * Represents a activation-config element of the ejb-jar.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class ActivationConfig
-{
-   private static final Logger log = Logger.getLogger(ActivationConfig.class);
-
-   // ejb-jar.xml
-   private List properties = new ArrayList();
-
-   public List getActivationConfigProperties()
-   {
-      return properties;
-   }
-
-   public void addActivationConfigProperty(NameValuePair property)
-   {
-      properties.add(property);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append('[');
-      sb.append("activationConfigProperties=").append(properties);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ActivationConfig.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ActivationConfig.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ApplicationException.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ApplicationException.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ApplicationException.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,70 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-/**
- * Represents an <application-exception> element of the ejb-jar.xml deployment descriptor
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class ApplicationException
-{
-   private static final Logger log = Logger.getLogger(ApplicationException.class);
-
-   private String clazz;
-   private boolean rollback;
-
-   public String getExceptionClass()
-   {
-      return clazz;
-   }
-   
-   public void setExceptionClass(String clazz)
-   {
-      this.clazz = clazz;
-   }
-   
-   public boolean getRollback()
-   {
-      return rollback;
-   }
-
-   public void setRollback(boolean rollback)
-   {
-      this.rollback = rollback;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("class=").append(clazz);
-      sb.append(", rollback=").append(rollback);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ApplicationException.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ApplicationException.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/AssemblyDescriptor.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/AssemblyDescriptor.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/AssemblyDescriptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,180 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-import org.jboss.metamodel.descriptor.SecurityRole;
-
-/**
- * Represents <assembly-descriptor> elements of the ejb-jar.xml deployment descriptor for the 1.4
- * schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class AssemblyDescriptor
-{
-   private static final Logger log = Logger.getLogger(AssemblyDescriptor.class);
-
-   private List securityRoles = new ArrayList();
-
-   private List methodPermissions = new ArrayList();
-
-   private List containerTransactions = new ArrayList();
-   
-   private HashMap<String, MessageDestination> messageDestinations = new HashMap();
-
-   private ExcludeList excludeList;
-
-   private List applicationExceptions = new ArrayList();
-
-   private InitList initList;
-
-   private List injects = new ArrayList();
-   
-   public Collection getMessageDestinations()
-   {
-      return messageDestinations.values();
-   }
-
-   public void addMessageDestination(MessageDestination messageDestination)
-   {
-      messageDestinations.put(messageDestination.getMessageDestinationName(), messageDestination);
-   }
-   
-   public MessageDestination findMessageDestination(String name)
-   {
-      return messageDestinations.get(name);
-   }
-
-   private List interceptorBindings = new ArrayList();
-
-   public InitList getInitList()
-   {
-      return initList;
-   }
-
-   public void setInitList(InitList initList)
-   {
-      this.initList = initList;
-   }
-
-   public ExcludeList getExcludeList()
-   {
-      return excludeList;
-   }
-
-   public void setExcludeList(ExcludeList excludeList)
-   {
-      this.excludeList = excludeList;
-   }
-   
-   public List getApplicationExceptions()
-   {
-      return applicationExceptions;
-   }
-
-   public void addApplicationException(ApplicationException applicationException)
-   {
-      applicationExceptions.add(applicationException);
-   }
-
-   public List getSecurityRoles()
-   {
-      return securityRoles;
-   }
-
-   public void setSecurityRoles(List securityRoles)
-   {
-      this.securityRoles = securityRoles;
-   }
-
-   public void addSecurityRole(SecurityRole securityRole)
-   {
-      securityRoles.add(securityRole);
-   }
-
-   public List<InterceptorBinding> getInterceptorBindings()
-   {
-      return interceptorBindings;
-   }
-
-   public void addInterceptorBinding(InterceptorBinding binding)
-   {
-      interceptorBindings.add(binding);
-   }
-
-   public List getInjects()
-   {
-      return injects;
-   }
-
-   public void addInject(Inject inject)
-   {
-      injects.add(inject);
-   }
-
-   public List getMethodPermissions()
-   {
-      return methodPermissions;
-   }
-
-   public void setMethodPermissions(List methodPermissions)
-   {
-      this.methodPermissions = methodPermissions;
-   }
-
-   public void addMethodPermission(MethodPermission methodPermission)
-   {
-      methodPermissions.add(methodPermission);
-   }
-
-   public List getContainerTransactions()
-   {
-      return containerTransactions;
-   }
-
-   public void setContainerTransactions(List containerTransactions)
-   {
-      this.containerTransactions = containerTransactions;
-   }
-
-   public void addContainerTransaction(ContainerTransaction containerTransaction)
-   {
-      containerTransactions.add(containerTransaction);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("securityRoles=").append(securityRoles);
-      sb.append(", applicationExceptions=").append(applicationExceptions);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/AssemblyDescriptor.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/AssemblyDescriptor.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CacheConfig.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/CacheConfig.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CacheConfig.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,101 +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 org.jboss.ejb3.metamodel;
-
-
-/**
- * Represents an <cache-config> element of the jboss.xml deployment descriptor
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class CacheConfig
-{
-   private String cacheClass = null;
-   private String maxSize = null;
-   private String idleTimeoutSeconds = null;
-   private String name = null;
-   private String persistenceManager = null;
-
-   public String getPersistenceManager()
-   {
-      return persistenceManager;
-   }
-
-   public void setPersistenceManager(String persistenceManager)
-   {
-      this.persistenceManager = persistenceManager;
-   }
-   
-   public String getCacheClass()
-   {
-      return cacheClass;
-   }
-
-   public void setCacheClass(String cacheClass)
-   {
-      this.cacheClass = cacheClass;
-   }
-
-   public String getMaxSize()
-   {
-      return maxSize;
-   }
-
-   public void setMaxSize(String maxSize)
-   {
-      this.maxSize = maxSize;
-   }
-   
-   public String getIdleTimeoutSeconds()
-   {
-      return idleTimeoutSeconds;
-   }
-
-   public void setIdleTimeoutSeconds(String idleTimeoutSeconds)
-   {
-      this.idleTimeoutSeconds = idleTimeoutSeconds;
-   }
-   
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("cacheClass=").append(cacheClass);
-      sb.append(", maxSize=").append(maxSize);
-      sb.append(", idleTimeoutSeconds=").append(idleTimeoutSeconds);
-      sb.append(", name=").append(name);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CacheConfig.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/CacheConfig.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ClusterConfig.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ClusterConfig.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ClusterConfig.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,67 +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 org.jboss.ejb3.metamodel;
-
-
-/**
- * Represents an <cluster-config> element of the jboss.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class ClusterConfig
-{
-   private String loadBalancePolicy = null;
-
-   private String partition = null;
-
-   public String getLoadBalancePolicy()
-   {
-      return loadBalancePolicy;
-   }
-
-   public void setLoadBalancePolicy(String loadBalancePolicy)
-   {
-      this.loadBalancePolicy = loadBalancePolicy;
-   }
-
-   public String getPartition()
-   {
-      return partition;
-   }
-
-   public void setPartition(String partition)
-   {
-      this.partition = partition;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("loadBalancePolicy=").append(loadBalancePolicy);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ClusterConfig.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ClusterConfig.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmpField.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/CmpField.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmpField.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,54 +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 org.jboss.ejb3.metamodel;
-
-/**
- * Represents an cmp-field element of the ejb-jar.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class CmpField
-{
-
-   private String fieldName;
-
-   public String getFieldName()
-   {
-      return fieldName;
-   }
-
-   public void setFieldName(String fieldName)
-   {
-      this.fieldName = fieldName;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("fieldName=").append(fieldName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmpField.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/CmpField.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmrField.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/CmrField.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmrField.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,67 +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 org.jboss.ejb3.metamodel;
-
-/**
- * Represents an <cmr-field> element of the ejb-jar.xml deployment
- * descriptor for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class CmrField
-{
-
-   private String cmrFieldName;
-
-   private String cmrFieldType;
-
-   public String getCmrFieldName()
-   {
-      return cmrFieldName;
-   }
-
-   public void setCmrFieldName(String cmrFieldName)
-   {
-      this.cmrFieldName = cmrFieldName;
-   }
-
-   public String getCmrFieldType()
-   {
-      return cmrFieldType;
-   }
-
-   public void setCmrFieldType(String cmrFieldType)
-   {
-      this.cmrFieldType = cmrFieldType;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("cmrFieldName=").append(cmrFieldName);
-      sb.append(",cmrFieldType=").append(cmrFieldType);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CmrField.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/CmrField.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Consumer.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Consumer.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Consumer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -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 org.jboss.ejb3.metamodel;
-
-import org.jboss.logging.Logger;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class Consumer extends EnterpriseBean
-{
-   private static final Logger log = Logger.getLogger(Consumer.class);
-   
-   private String destination = null;
-   private String destinationType = null;
-   private CurrentMessage currentMessage = null;
-   private MessageProperties messageProperties = null;
-   private List producers = new ArrayList();
-   private List localProducers = new ArrayList();
-   
-   public String getDestination()
-   {
-      return destination;
-   }
-   
-   public void setDestination(String destination)
-   {
-      this.destination = destination;
-   }
-   
-   public String getDestinationType()
-   {
-      return destinationType;
-   }
-   
-   public void setDestinationType(String destinationType)
-   {
-      this.destinationType = destinationType;
-   }
-   
-   public CurrentMessage getCurrentMessage()
-   {
-      return currentMessage;
-   }
-   
-   public void setCurrentMessage(CurrentMessage currentMessage)
-   {
-      this.currentMessage = currentMessage;
-   }
-   
-   public MessageProperties getMessageProperties()
-   {
-      return messageProperties;
-   }
-   
-   public void setMessageProperties(MessageProperties messageProperties)
-   {
-      this.messageProperties = messageProperties;
-   }
-   
-   public List getProducers()
-   {
-      return producers;
-   }
-   
-   public void addProducer(Producer producer)
-   {
-      producers.add(producer);
-   }
-   
-   public List getLocalProducers()
-   {
-      return localProducers;
-   }
-   
-   public void addLocalProducer(Producer producer)
-   {
-      localProducers.add(producer);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[Consumer:");
-      sb.append(super.toString());
-      sb.append(", destination=" + destination);
-      sb.append(", destinationType=" + destinationType);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Consumer.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Consumer.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ContainerTransaction.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ContainerTransaction.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ContainerTransaction.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,67 +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 org.jboss.ejb3.metamodel;
-
-
-/**
- * Represents an <container-transaction> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class ContainerTransaction
-{
-
-   private String transAttribute;
-
-   private Method method;
-
-   public String getTransAttribute()
-   {
-      return transAttribute;
-   }
-
-   public void setTransAttribute(String transAttribute)
-   {
-      this.transAttribute = transAttribute;
-   }
-
-   public Method getMethod()
-   {
-      return method;
-   }
-
-   public void setMethod(Method method)
-   {
-      this.method = method;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbRelationName=").append(transAttribute);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ContainerTransaction.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ContainerTransaction.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CurrentMessage.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/CurrentMessage.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CurrentMessage.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,54 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class CurrentMessage
-{
-   private List methods = new ArrayList();
-
-   public List getMethods()
-   {
-      return methods;
-   }
-   
-   public void addMethod(Method method)
-   {
-      methods.add(method);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbName=").append(methods);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/CurrentMessage.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/CurrentMessage.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,165 +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 org.jboss.ejb3.metamodel;
-
-import java.util.HashMap;
-
-import org.jboss.logging.Logger;
-
-
-/**
- * Represents the ejb-jar.xml deployment descriptor for the 2.1 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class EjbJarDD
-{
-   private static final Logger log = Logger.getLogger(EjbJarDD.class);
-   
-   // ejb-jar.xml
-   private String version;
-
-   private String displayName;
-
-   private Relationships relationships;
-
-   private AssemblyDescriptor assemblyDescriptor;
-   
-   private Interceptors interceptors;
-
-   // jboss.xml
-   private String securityDomain;
-   
-   private String unauthenticatedPrincipal;
-
-   
-   private HashMap<String, ResourceManager> resourceManagers = new HashMap();
-
-   // both
-   private EnterpriseBeans enterpriseBeans;
-   
-   public void addResourceManager(ResourceManager manager)
-   {
-      resourceManagers.put(manager.getResourceName(), manager);
-   }
-   
-   public String resolveResourceManager(String resourceName)
-   {
-      ResourceManager manager = resourceManagers.get(resourceName);
-      if (manager != null)
-         return manager.getResourceJndiName();
-      
-      return null;
-   }
-
-   public String getSecurityDomain()
-   {
-      return securityDomain;
-   }
-
-   public void setSecurityDomain(String securityDomain)
-   {
-      this.securityDomain = securityDomain;
-   }
-   
-   public String getUnauthenticatedPrincipal()
-   {
-      return unauthenticatedPrincipal;
-   }
-
-   public void setUnauthenticatedPrincipal(String unauthenticatedPrincipal)
-   {
-      this.unauthenticatedPrincipal = unauthenticatedPrincipal;
-   }
-
-   public String getVersion()
-   {
-      return version;
-   }
-
-   public void setVersion(String version)
-   {
-      this.version = version;
-   }
-
-   public String getDisplayName()
-   {
-      return displayName;
-   }
-
-   public void setDisplayName(String displayName)
-   {
-      this.displayName = displayName;
-   }
-
-   public EnterpriseBeans getEnterpriseBeans()
-   {
-      return enterpriseBeans;
-   }
-
-   public void setEnterpriseBeans(EnterpriseBeans enterpriseBeans)
-   {
-      this.enterpriseBeans = enterpriseBeans;
-   }
-   
-   public Interceptors getInterceptors()
-   {
-      return interceptors;
-   }
-
-   public void setInterceptors(Interceptors interceptors)
-   {
-      this.interceptors = interceptors;
-   }
-
-   public Relationships getRelationships()
-   {
-      return relationships;
-   }
-
-   public void setRelationships(Relationships relationships)
-   {
-      this.relationships = relationships;
-   }
-
-   public AssemblyDescriptor getAssemblyDescriptor()
-   {
-      return assemblyDescriptor;
-   }
-
-   public void setAssemblyDescriptor(AssemblyDescriptor assemblyDescriptor)
-   {
-      this.assemblyDescriptor = assemblyDescriptor;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append('[');
-      sb.append("version=").append(version);
-      sb.append(",");
-      sb.append("displayName=").append(displayName);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,1620 +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 org.jboss.ejb3.metamodel;
-
-import java.io.IOException;
-import java.net.URL;
-
-import javax.management.ObjectName;
-import javax.persistence.PersistenceContextType;
-
-import org.jboss.ejb3.KernelAbstraction;
-import org.jboss.ejb3.KernelAbstractionFactory;
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-import org.jboss.metamodel.descriptor.DDObjectFactory;
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.EnvEntry;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.PersistenceUnitRef;
-import org.jboss.metamodel.descriptor.NameValuePair;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.RunAs;
-import org.jboss.metamodel.descriptor.WebServiceRef;
-import org.jboss.metamodel.descriptor.SecurityRole;
-import org.jboss.metamodel.descriptor.PersistenceContextRef;
-
-/**
- * org.jboss.xb.binding.ObjectModelFactory implementation that accepts data
- * chuncks from unmarshaller and assembles them into an EjbJarDD instance.
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 56531 $</tt>
- */
-public class EjbJarDDObjectFactory extends DDObjectFactory
-{
-
-   private static final Logger log = Logger
-           .getLogger(EjbJarDDObjectFactory.class);
-
-   public static EjbJarDD parse(URL ddResource)
-      throws JBossXBException, IOException
-   {
-      ObjectModelFactory factory = null;
-      Unmarshaller unmarshaller = null;
-      EjbJarDD dd = null;
-
-      if (ddResource != null)
-      {
-         log.debug("found ejb-jar.xml " + ddResource);
-
-         factory = new EjbJarDDObjectFactory();
-         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory
-               .newInstance();
-         unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
-         unmarshaller = unmarshallerFactory.newUnmarshaller();
-         JBossEntityResolver entityResolver = new JBossEntityResolver();
-         unmarshaller.setEntityResolver(entityResolver);
-
-         dd = (EjbJarDD) unmarshaller.unmarshal(ddResource.openStream(),
-               factory, null);
-      }
-
-      return dd;
-   }
-
-   public Object newRoot(Object root, UnmarshallingContext navigator,
-                         String namespaceURI, String localName, Attributes attrs)
-   {
-
-      final EjbJarDD dd;
-      if (root == null)
-      {
-         root = dd = new EjbJarDD();
-      }
-      else
-      {
-         dd = (EjbJarDD) root;
-      }
-
-      if (attrs.getLength() > 0)
-      {
-         for (int i = 0; i < attrs.getLength(); ++i)
-         {
-            if (attrs.getLocalName(i).equals("version"))
-            {
-               dd.setVersion(attrs.getValue(i));
-            }
-         }
-      }
-
-      return root;
-   }
-
-   public Object completeRoot(Object root, UnmarshallingContext ctx,
-                              String uri, String name)
-   {
-      return root;
-   }
-
-   // Methods discovered by introspection
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(EjbJarDD dd, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("enterprise-beans"))
-      {
-         child = new EnterpriseBeans();
-      }
-      if (localName.equals("interceptors"))
-      {
-         child = new Interceptors();
-      }
-      else if (localName.equals("relationships"))
-      {
-         child = new Relationships();
-      }
-      else if (localName.equals("assembly-descriptor"))
-      {
-         child = new AssemblyDescriptor();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(EnterpriseBeans ejbs, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("session"))
-      {
-         child = new SessionEnterpriseBean();
-      }
-      else if (localName.equals("entity"))
-      {
-         child = new EntityEnterpriseBean();
-      }
-      else if (localName.equals("message-driven"))
-      {
-         child = new MessageDrivenBean();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   private Object newEjbChild(EnterpriseBean parent, String localName)
-   {
-      Object child = null;
-
-      if ((child = super.newEnvRefGroupChild(localName)) != null)
-         return child;
-      return child;
-   }
-
-
-   private Object newEjbHasInterceptorsChild(EnterpriseBean parent, String localName)
-   {
-      Object child = null;
-
-      if (localName.equals("around-invoke"))
-      {
-         child = new Method();
-      }
-      else if (localName.equals("post-construct"))
-      {
-         child = new Method();
-      }
-      else if (localName.equals("pre-destroy"))
-      {
-         child = new Method();
-      }
-      else if (localName.equals("post-activate"))
-      {
-         child = new Method();
-      }
-      else if (localName.equals("pre-passivate"))
-      {
-         child = new Method();
-      }
-      return child;
-   }
-
-   public Object newChild(MessageDrivenBean parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = newEjbChild(parent, localName);
-      if (child != null) return child;
-
-      child = newEjbHasInterceptorsChild(parent, localName);
-      if (child != null) return child;
-
-      if (localName.equals("message-driven-destination"))
-      {
-         child = new MessageDrivenDestination();
-      }
-      else if (localName.equals("activation-config"))
-      {
-         child = new ActivationConfig();
-      }
-
-      return child;
-   }
-
-   public Object newChild(ActivationConfig parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-     if (localName.equals("activation-config-property"))
-     {
-         child = new NameValuePair();
-     }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(SessionEnterpriseBean parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = newEjbChild(parent, localName);
-      if (child != null) return child;
-
-      child = newEjbHasInterceptorsChild(parent, localName);
-      if (child != null) return child;
-
-      if (localName.equals("security-identity"))
-      {
-         child = new SecurityIdentity();
-      }
-      else if (localName.equals("remove-method"))
-      {
-         RemoveMethod method = new RemoveMethod();
-         parent.addRemoveMethod(method);
-         child = method;
-      }
-      else if (localName.equals("init-method"))
-      {
-         InitMethod method = new InitMethod();
-         parent.addInitMethod(method);
-         child = method;
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(EntityEnterpriseBean parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      child = newEjbChild(parent, localName);
-      if (child == null)
-      {
-         if (localName.equals("cmp-field"))
-         {
-            child = new CmpField();
-         }
-         else if (localName.equals("query"))
-         {
-            child = new Query();
-         }
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(SecurityIdentity parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("run-as"))
-      {
-         child = new RunAs();
-      }
-      else if (localName.equals("use-caller-identity"))
-      {
-         parent.setUseCallerIdentity(true);
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(RemoveMethod parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("bean-method"))
-      {
-         parent.setBeanMethod(new Method());
-         child = parent.getBeanMethod();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(InitMethod parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("bean-method"))
-      {
-         parent.setBeanMethod(new Method());
-         child = parent.getBeanMethod();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(RemoveMethod dd, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("retain-if-exception"))
-      {
-         dd.setRetainIfException(Boolean.parseBoolean(getValue(localName, value)));
-      }
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(Relationships relationships,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("ejb-relation"))
-      {
-         child = new EjbRelation();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(EjbRelation relation, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("ejb-relationship-role"))
-      {
-         child = new EjbRelationshipRole();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(EjbRelationshipRole parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("cascade-delete"))
-      {
-         parent.setCascadeDelete(true);
-      }
-      else if (localName.equals("relationship-role-source"))
-      {
-         child = new RelationshipRoleSource();
-      }
-      else if (localName.equals("cmr-field"))
-      {
-         child = new CmrField();
-      }
-
-      return child;
-   }
-
-   public Object newChild(Interceptors interceptors,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("interceptor"))
-      {
-         return new Interceptor();
-      }
-
-      return child;
-   }
-
-   public Object newChild(Interceptor interceptor,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if ((child = this.newEnvRefGroupChild(localName)) != null)
-         return child;
-
-      if (localName.equals("around-invoke"))
-      {
-         return new Method();
-      }
-      else if (localName.equals("post-construct"))
-      {
-         return new Method();
-      }
-      else if (localName.equals("pre-destroy"))
-      {
-         return new Method();
-      }
-      else if (localName.equals("post-activate"))
-      {
-         return new Method();
-      }
-      else if (localName.equals("pre-passivate"))
-      {
-         return new Method();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(AssemblyDescriptor relationships,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("security-role"))
-      {
-         child = new SecurityRole();
-      }
-      else if (localName.equals("method-permission"))
-      {
-         child = new MethodPermission();
-      }
-      if (localName.equals("container-transaction"))
-      {
-         child = new ContainerTransaction();
-      }
-      else if (localName.equals("inject"))
-      {
-         child = new Inject();
-      }
-      else if (localName.equals("exclude-list"))
-      {
-         child = new ExcludeList();
-      }
-      else if (localName.equals("application-exception"))
-      {
-         child = new ApplicationException();
-      }
-      else if (localName.equals("interceptor-binding"))
-      {
-         child = new InterceptorBinding();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(Inject inject,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("method"))
-      {
-         child = new Method();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(MethodPermission permission,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("method"))
-      {
-         child = new Method();
-      }
-      else if (localName.equals("unchecked"))
-      {
-         permission.setUnchecked(true);
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(ExcludeList list,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("method"))
-      {
-         child = new Method();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(InitList list,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("method"))
-      {
-         child = new Method();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(ContainerTransaction transaction,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("method"))
-      {
-         child = new Method();
-      }
-
-      return child;
-   }
-
-   public Object newChild(Method method,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("method-params"))
-      {
-         method.setHasParameters();
-      }
-
-      return child;
-   }
-
-
-   public Object newChild(InterceptorBinding binding,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("interceptor-order"))
-      {
-         child = new InterceptorOrder();
-      }
-      else if (localName.equals("exclude-default-interceptors"))
-      {
-         child = new ExcludeDefaultInterceptors();
-      }
-      else if (localName.equals("exclude-class-interceptors"))
-      {
-         child = new ExcludeClassInterceptors();
-      }
-      else if (localName.equals("method-params"))
-      {
-         binding.setHasParameters();
-      }
-
-
-      return child;
-   }
-
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageDrivenBean parent, ActivationConfig config,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setActivationConfig(config);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageDrivenBean parent, EjbRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageDrivenBean parent, EjbLocalRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbLocalRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageDrivenBean parent, EnvEntry entry,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEnvEntry(entry);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageDrivenBean parent, ResourceEnvRef envRef,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceEnvRef(envRef);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageDrivenBean parent, ResourceRef envRef,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceRef(envRef);
-   }
-
-   public void addChild(MessageDrivenBean parent, WebServiceRef envRef,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addWebServiceRef(envRef);
-   }
-   
-   public void addChild(MessageDrivenBean parent, MessageDestinationRef ref,
-         UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMessageDestinationRef(ref);
-   }
-
-   public void addChild(ActivationConfig parent, NameValuePair property,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addActivationConfigProperty(property);
-   }
-
-   public void addChild(EjbJarDD parent, EnterpriseBeans ejbs,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setEnterpriseBeans(ejbs);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, EnterpriseBean ejb,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEnterpriseBean(ejb);
-   }
-
-   public void addChild(SessionEnterpriseBean parent, SecurityIdentity si,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setSecurityIdentity(si);
-   }
-
-   public void addChild(SecurityIdentity parent, RunAs runAs,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setRunAs(runAs);
-   }
-
-   public void addChild(SessionEnterpriseBean parent, EjbLocalRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbLocalRef(ref);
-   }
-
-   public void addChild(SessionEnterpriseBean parent, EjbRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbRef(ref);
-   }
-
-   public void addChild(SessionEnterpriseBean parent, PersistenceContextRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addPersistenceContextRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(SessionEnterpriseBean parent, PersistenceUnitRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addPersistenceUnitRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(SessionEnterpriseBean parent, MessageDestinationRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMessageDestinationRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(SessionEnterpriseBean parent, EnvEntry entry,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEnvEntry(entry);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(SessionEnterpriseBean parent, ResourceEnvRef envRef,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceEnvRef(envRef);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(SessionEnterpriseBean parent, ResourceRef envRef,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceRef(envRef);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(SessionEnterpriseBean parent, WebServiceRef envRef,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addWebServiceRef(envRef);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(SessionEnterpriseBean parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      if (localName.equals("around-invoke"))
-      {
-         parent.setAroundInvoke(method);
-      }
-      else if (localName.equals("post-construct"))
-      {
-         parent.setPostConstruct(method);
-      }
-      else if (localName.equals("pre-destroy"))
-      {
-         parent.setPreDestroy(method);
-      }
-      else if (localName.equals("post-activate"))
-      {
-         parent.setPostActivate(method);
-      }
-      else if (localName.equals("pre-passivate"))
-      {
-         parent.setPrePassivate(method);
-      }
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EntityEnterpriseBean parent, CmpField field,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addCmpField(field);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EntityEnterpriseBean parent, Query query,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addQuery(query);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EjbJarDD parent, Relationships relationships,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setRelationships(relationships);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Relationships parent, EjbRelation relation,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbRelation(relation);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EjbRelation parent, EjbRelationshipRole role,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbRelationshipRole(role);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EjbRelationshipRole parent,
-                        RelationshipRoleSource source, UnmarshallingContext navigator,
-                        String namespaceURI, String localName)
-   {
-      parent.setRelationshipRoleSource(source);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EjbRelationshipRole parent, CmrField field,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setCmrField(field);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EjbJarDD parent, AssemblyDescriptor descriptor,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setAssemblyDescriptor(descriptor);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(AssemblyDescriptor parent, SecurityRole role,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addSecurityRole(role);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(AssemblyDescriptor parent, MethodPermission permission,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMethodPermission(permission);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(AssemblyDescriptor parent, ExcludeList list,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setExcludeList(list);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(AssemblyDescriptor parent, ApplicationException exception,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addApplicationException(exception);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(AssemblyDescriptor parent, InitList list,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInitList(list);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(AssemblyDescriptor parent, Inject inject,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addInject(inject);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(AssemblyDescriptor parent, InterceptorBinding binding,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addInterceptorBinding(binding);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(ExcludeList parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMethod(method);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(InitList parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMethod(method);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MethodPermission parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMethod(method);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Inject parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMethod(method);
-   }
-
-   public void addChild(EjbJarDD parent, Interceptors interceptors,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInterceptors(interceptors);
-   }
-
-   public void addChild(Interceptors parent, Interceptor interceptor,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addInterceptor(interceptor);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, EjbLocalRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbLocalRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, EjbRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, PersistenceContextRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addPersistenceContextRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, PersistenceUnitRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addPersistenceUnitRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, MessageDestinationRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMessageDestinationRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, EnvEntry entry,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEnvEntry(entry);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, ResourceEnvRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceEnvRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, ResourceRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Interceptor parent, WebServiceRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addWebServiceRef(ref);
-   }
-
-   public void addChild(Interceptor parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      if (localName.equals("around-invoke"))
-      {
-         parent.setAroundInvoke(method);
-      }
-      else if (localName.equals("post-construct"))
-      {
-         parent.setPostConstruct(method);
-      }
-      else if (localName.equals("pre-destroy"))
-      {
-         parent.setPreDestroy(method);
-      }
-      else if (localName.equals("post-activate"))
-      {
-         parent.setPostActivate(method);
-      }
-      else if (localName.equals("pre-passivate"))
-      {
-         parent.setPrePassivate(method);
-      }
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(InterceptorBinding parent,
-                        InterceptorOrder order, UnmarshallingContext navigator,
-                        String namespaceURI, String localName)
-   {
-      parent.setOrderedInterceptorClasses(order);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(InterceptorBinding parent,
-                        ExcludeDefaultInterceptors exclude, UnmarshallingContext navigator,
-                        String namespaceURI, String localName)
-   {
-      parent.setExcludeDefaultInterceptors(true);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(InterceptorBinding parent,
-                        ExcludeClassInterceptors exclude, UnmarshallingContext navigator,
-                        String namespaceURI, String localName)
-   {
-      parent.setExcludeClassInterceptors(true);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(ContainerTransaction parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setMethod(method);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageDrivenBean parent, MessageDrivenDestination destination,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setMessageDrivenDestination(destination);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageDrivenBean parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      if (localName.equals("around-invoke"))
-      {
-         parent.setAroundInvoke(method);
-      }
-      else if (localName.equals("post-construct"))
-      {
-         parent.setPostConstruct(method);
-      }
-      else if (localName.equals("pre-destroy"))
-      {
-         parent.setPreDestroy(method);
-      }
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(AssemblyDescriptor parent,
-                        ContainerTransaction transaction, UnmarshallingContext navigator,
-                        String namespaceURI, String localName)
-   {
-      parent.addContainerTransaction(transaction);
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(EjbJarDD dd, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("display-name"))
-      {
-         dd.setDisplayName(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(NameValuePair property, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("activation-config-property-name"))
-      {
-         property.setName(getValue(localName, value));
-      }
-      else if (localName.equals("activation-config-property-value"))
-      {
-         property.setValue(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   private boolean isEjbParentName(EnterpriseBean ejb, String localName,
-                                   String value)
-   {
-      if (localName.equals("ejb-name"))
-      {
-         ejb.setEjbName(getValue(localName, value));
-         return true;
-      }
-      else if (localName.equals("home"))
-      {
-         ejb.setHome(getValue(localName, value));
-         return true;
-      }
-      else if (localName.equals("remote"))
-      {
-         ejb.setRemote(getValue(localName, value));
-         return true;
-      }
-      else if (localName.equals("local-home"))
-      {
-         ejb.setLocalHome(getValue(localName, value));
-         return true;
-      }
-      else if (localName.equals("local"))
-      {
-         ejb.setLocal(getValue(localName, value));
-         return true;
-      }
-      else if (localName.equals("ejb-class"))
-      {
-         ejb.setEjbClass(getValue(localName, value));
-         return true;
-      }
-
-      return false;
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(MessageDrivenBean ejb,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (!isEjbParentName(ejb, localName, value))
-      {
-         if (localName.equals("acknowledge-mode"))
-         {
-            ejb.setAcknowledgeMode(getValue(localName, value));
-         }
-         else if (localName.equals("transaction-type"))
-         {
-            ejb.setTransactionType(getValue(localName, value));
-         }
-         else if (localName.equals("messaging-type"))
-         {
-            ejb.setMessagingType(getValue(localName, value));
-         }
-         else if (localName.equals("message-destination-type"))
-         {
-            MessageDrivenDestination destination = ejb.getMessageDrivenDestination();
-            if (destination == null)
-            {
-               destination = new MessageDrivenDestination();
-               ejb.setMessageDrivenDestination(destination);
-            }
-
-            destination.setDestinationType(getValue(localName, value));
-         }
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(MessageDrivenDestination destination,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (localName.equals("destination-type"))
-      {
-         destination.setDestinationType(getValue(localName, value));
-      }
-      else if (localName.equals("subscription-durability"))
-      {
-         destination.setSubscriptionDurability(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(SessionEnterpriseBean ejb,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (!isEjbParentName(ejb, localName, value))
-      {
-         if (localName.equals("session-type"))
-         {
-            ejb.setSessionType(getValue(localName, value));
-         }
-         else if (localName.equals("transaction-type"))
-         {
-            ejb.setTransactionManagementType(getValue(localName, value));
-         }
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(ApplicationException exception,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (localName.equals("exception-class"))
-      {
-         exception.setExceptionClass(getValue(localName, value));
-      }
-      else if (localName.equals("rollback"))
-      {
-         exception.setRollback(Boolean.valueOf(getValue(localName, value)));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(EntityEnterpriseBean ejb,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (!isEjbParentName(ejb, localName, value))
-      {
-         if (localName.equals("persistence-type"))
-         {
-            ejb.setPersistenceType(getValue(localName, value));
-         }
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(SecurityIdentity si, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("use-caller-identity"))
-      {
-         si.setUseCallerIdentity(true);
-      }
-   }
-
-   public void setValue(Interceptor interceptor, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("interceptor-class"))
-      {
-         interceptor.setInterceptorClass(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(EjbRelation relation, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("ejb-relation-name"))
-      {
-         relation.setEjbRelationName(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(EjbRelationshipRole role,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (localName.equals("ejb-relationship-role-name"))
-      {
-         role.setEjbRelationshipRoleName(getValue(localName, value));
-      }
-      else if (localName.equals("multiplicity"))
-      {
-         role.setMultiplicity(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(RelationshipRoleSource source,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (localName.equals("ejb-name"))
-      {
-         source.setEjbName(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(CmrField field, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("cmr-field-name"))
-      {
-         field.setCmrFieldName(getValue(localName, value));
-      }
-      else if (localName.equals("cmr-field-type"))
-      {
-         field.setCmrFieldType(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(SecurityRole role, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("role-name"))
-      {
-         role.setRoleName(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(MethodPermission permission,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (localName.equals("role-name"))
-      {
-         permission.addRoleName(getValue(localName, value));
-      }
-      else if (localName.equals("unchecked"))
-      {
-         permission.setUnchecked(true);
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(ContainerTransaction transaction,
-                        UnmarshallingContext navigator, String namespaceURI, String localName,
-                        String value)
-   {
-      if (localName.equals("trans-attribute"))
-      {
-         transaction.setTransAttribute(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(Method method, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("ejb-name"))
-      {
-         method.setEjbName(getValue(localName, value));
-      }
-      else if (localName.equals("method-name"))
-      {
-         method.setMethodName(getValue(localName, value));
-      }
-      else if (localName.equals("method-param"))
-      {
-         method.addMethodParam(getValue(localName, value));
-      }
-      else if (localName.equals("lifecycle-callback-method"))
-      {
-         method.setMethodName(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(Inject inject, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("jndi-name"))
-      {
-         inject.setJndiName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(InterceptorBinding binding, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("ejb-name"))
-      {
-         binding.setEjbName(getValue(localName, value));
-      }
-      else if (localName.equals("interceptor-class"))
-      {
-         binding.addInterceptorClass(getValue(localName, value));
-      }
-      else if (localName.equals("method-name"))
-      {
-         binding.setMethodName(getValue(localName, value));
-      }
-      else if (localName.equals("method-param"))
-      {
-         binding.addMethodParam(getValue(localName, value));
-      }
-      else if (localName.equals("exclude-default-interceptors"))
-      {
-         binding.setExcludeDefaultInterceptors(true);
-      }
-      else if (localName.equals("exclude-class-interceptors"))
-      {
-         binding.setExcludeClassInterceptors(true);
-      }
-   }
-
-   public void setValue(InterceptorOrder order, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("interceptor-class"))
-      {
-         order.addInterceptorClass(getValue(localName, value));
-      }
-   }
-   
-   protected String getValue(String name, String value)
-   {
-      if (value.startsWith("${") && value.endsWith("}"))
-      {
-         try
-         {
-            String propertyName = value.substring(2, value.length()-1);
-            ObjectName propertyServiceON = new ObjectName("jboss:type=Service,name=SystemProperties");
-            KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
-            String propertyValue = (String)kernelAbstraction.invoke(propertyServiceON, "get", new Object[]{propertyName}, new String[]{"java.lang.String"});
-            log.debug("Replaced ejb-jar.xml element " + name + " with value " + propertyValue);
-            return propertyValue;
-         }
-         catch (Exception e)
-         {
-            log.warn("Unable to look up property service for ejb-jar.xml element " + name + " with value " + value + ". Caused by " + e.getClass() + " " + e.getMessage());
-         }
-      }
-      
-      return value;
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelation.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelation.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelation.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,74 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents an ejb-relation element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class EjbRelation
-{
-
-   private String ejbRelationName = null;
-
-   private List ejbRelationshipRoles = new ArrayList();
-
-   public String getEjbRelationName()
-   {
-      return ejbRelationName;
-   }
-
-   public void setEjbRelationName(String ejbRelationName)
-   {
-      this.ejbRelationName = ejbRelationName;
-   }
-
-   public List getEjbRelationshipRoles()
-   {
-      return ejbRelationshipRoles;
-   }
-
-   public void setEjbRelationshipRoles(List ejbRelationshipRoles)
-   {
-      this.ejbRelationshipRoles = ejbRelationshipRoles;
-   }
-
-   public void addEjbRelationshipRole(EjbRelationshipRole role)
-   {
-      ejbRelationshipRoles.add(role);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbRelationName=").append(ejbRelationName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelation.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelation.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelationshipRole.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelationshipRole.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelationshipRole.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,120 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents an ejb-relationship-role element of the ejb-jar.xml deployment
- * descriptor for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class EjbRelationshipRole
-{
-
-   private String ejbRelationshipRoleName;
-
-   private String multiplicity;
-
-   private boolean cascadeDelete = false;
-
-   private List ejbRelationshipRoles = new ArrayList();
-
-   private RelationshipRoleSource relationshipRoleSource;;
-
-   private CmrField cmrField;
-
-   public String getEjbRelationshipRoleName()
-   {
-      return ejbRelationshipRoleName;
-   }
-
-   public void setEjbRelationshipRoleName(String ejbRelationName)
-   {
-      this.ejbRelationshipRoleName = ejbRelationName;
-   }
-
-   public String getMultiplicity()
-   {
-      return multiplicity;
-   }
-
-   public void setMultiplicity(String multiplicity)
-   {
-      this.multiplicity = multiplicity;
-   }
-
-   public boolean isCascadeDelete()
-   {
-      return cascadeDelete;
-   }
-
-   public void setCascadeDelete(boolean cascadeDelete)
-   {
-      this.cascadeDelete = cascadeDelete;
-   }
-
-   public List getEjbRelationshipRoles()
-   {
-      return ejbRelationshipRoles;
-   }
-
-   public void setEjbRelationshipRoles(List ejbRelationshipRoles)
-   {
-      this.ejbRelationshipRoles = ejbRelationshipRoles;
-   }
-
-   public void addEjbRelationshipRole(EjbRelationshipRole role)
-   {
-      ejbRelationshipRoles.add(role);
-   }
-
-   public RelationshipRoleSource getRelationshipRoleSource()
-   {
-      return relationshipRoleSource;
-   }
-
-   public void setRelationshipRoleSource(RelationshipRoleSource relationshipRoleSource)
-   {
-      this.relationshipRoleSource = relationshipRoleSource;
-   }
-
-   public CmrField getCmrField()
-   {
-      return cmrField;
-   }
-
-   public void setCmrField(CmrField cmrField)
-   {
-      this.cmrField = cmrField;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("ejbRelationshipRoleName=").append(ejbRelationshipRoleName);
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelationshipRole.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EjbRelationshipRole.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,361 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collection;
-import java.util.HashSet;
-import javax.ejb.TransactionManagementType;
-import org.jboss.logging.Logger;
-
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.metamodel.descriptor.InjectionTarget;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.PersistenceUnitRef;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.PersistenceContextRef;
-
-/**
- * Represents an EJB element of the ejb-jar.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 55512 $</tt>
- */
-public abstract class EnterpriseBean
-   extends EnvironmentRefGroup implements Injectable
-{
-   private static final Logger log = Logger.getLogger(EnterpriseBean.class);
-
-   public static final String BEAN = "Bean";
-
-   public static final String CONTAINER = "Container";
-
-   // ejb-jar.xml
-   private String ejbName = null;
-
-   private String home = null;
-
-   private String remote = null;
-
-   private String localHome = null;
-
-   private String local = null;
-
-   private String ejbClass = null;
-
-   private List<RemoteBinding> remoteBindings = new ArrayList();
-
-   private SecurityIdentity securityIdentity;
-
-   protected TransactionManagementType tmType = null;
-
-   // jboss.xml
-   private String jndiName;
-
-   private String localJndiName;
-
-   private String securityDomain;
-
-   private boolean callByValue = false;
-
-   private String aopDomainName = null;
-
-   private MethodAttributes methodAttributes = null;
-
-   private Collection<String> dependencies = new HashSet<String>();
-
-   private Collection<InjectionTarget> ignoreDependencies = new HashSet<InjectionTarget>();
-   
-   private Collection<XmlAnnotation> xmlAnnotations = new HashSet<XmlAnnotation>();
-
-   private PoolConfig poolConfig = null;
-   
-   public void addXmlAnnotation(XmlAnnotation annotation)
-   {
-      xmlAnnotations.add(annotation);
-   }
-
-   public Collection<XmlAnnotation> getXmlAnnotations()
-   {
-      return xmlAnnotations;
-   }
-
-   public void setPoolConfig(PoolConfig poolConfig)
-   {
-      this.poolConfig = poolConfig;
-   }
-
-   public PoolConfig getPoolConfig()
-   {
-      return poolConfig;
-   }
-
-   public void addRemoteBinding(RemoteBinding binding)
-   {
-      remoteBindings.add(binding);
-   }
-
-   public List<RemoteBinding> getRemoteBindings()
-   {
-      return remoteBindings;
-   }
-
-   public void addDependency(String depends)
-   {
-      dependencies.add(depends);
-   }
-
-   public Collection<String> getDependencies()
-   {
-      return dependencies;
-   }
-
-   public void addIgnoreDependency(InjectionTarget ignore)
-   {
-      ignoreDependencies.add(ignore);
-   }
-
-   public Collection<InjectionTarget> getIgnoreDependencies()
-   {
-      return ignoreDependencies;
-   }
-
-   public void mergeMessageDestinationRef(MessageDestinationRef ref)
-   {
-      MessageDestinationRef tmpRef = (MessageDestinationRef)messageDestinationRefs.get(ref.getMessageDestinationRefName());
-      if (tmpRef != null)
-         tmpRef.merge(ref);
-   }
-
-   public void mergeResourceRef(ResourceRef ref)
-   {
-      ResourceRef tmpRef = (ResourceRef)resourceRefs.get(ref.getResRefName());
-      if (tmpRef != null)
-         tmpRef.merge(ref);
-   }
-
-   public void mergeResourceEnvRef(ResourceEnvRef ref)
-   {
-      ResourceEnvRef tmpRef = (ResourceEnvRef)resourceEnvRefs.get(ref.getResRefName());
-      if (tmpRef != null)
-         tmpRef.merge(ref);
-   }
-
-   public void setMethodAttributes(MethodAttributes methodAttributes)
-   {
-      this.methodAttributes = methodAttributes;
-   }
-
-   public MethodAttributes getMethodAttributes()
-   {
-      return methodAttributes;
-   }
-
-   public void setAopDomainName(String aopDomainName)
-   {
-      this.aopDomainName = aopDomainName;
-   }
-
-   public String getAopDomainName()
-   {
-      return aopDomainName;
-   }
-
-   public void setRunAsPrincipal(String principal)
-   {
-      if (securityIdentity != null)
-         securityIdentity.setRunAsPrincipal(principal);
-   }
-
-   public void setCallByValue(boolean callByValue)
-   {
-      this.callByValue = callByValue;
-   }
-
-   public boolean isCallByValue()
-   {
-      return callByValue;
-   }
-
-   public String getSecurityDomain()
-   {
-      return securityDomain;
-   }
-
-   public void setSecurityDomain(String securityDomain)
-   {
-      this.securityDomain = securityDomain;
-   }
-
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-   }
-
-   public String getLocalJndiName()
-   {
-      return localJndiName;
-   }
-
-   public void setLocalJndiName(String localJndiName)
-   {
-      this.localJndiName = localJndiName;
-   }
-
-   public TransactionManagementType getTransactionManagementType()
-   {
-      return tmType;
-   }
-
-   public void setTransactionManagementType(String transactionType)
-   {
-      if (transactionType.equals(BEAN))
-         tmType = TransactionManagementType.BEAN;
-      else if (transactionType.equals(CONTAINER))
-         tmType = TransactionManagementType.CONTAINER;
-   }
-
-   public boolean isSessionBean()
-   {
-      return this instanceof SessionEnterpriseBean;
-   }
-
-   public boolean isConsumer()
-   {
-      return this instanceof Consumer;
-   }
-
-   public boolean isEntityBean()
-   {
-      return this instanceof EntityEnterpriseBean;
-   }
-
-   public boolean isMessageDrivenBean()
-   {
-      return this instanceof MessageDrivenBean;
-   }
-
-   public boolean isService()
-   {
-      return this instanceof Service;
-   }
-
-   public String getEjbName()
-   {
-      return ejbName;
-   }
-
-   public void setEjbName(String ejbName)
-   {
-      this.ejbName = ejbName;
-   }
-
-   public String getHome()
-   {
-      return home;
-   }
-
-   public void setHome(String home)
-   {
-      this.home = home;
-   }
-
-   public String getRemote()
-   {
-      return remote;
-   }
-
-   public void setRemote(String remote)
-   {
-      this.remote = remote;
-   }
-
-   public String getLocalHome()
-   {
-      return localHome;
-   }
-
-   public void setLocalHome(String localHome)
-   {
-      this.localHome = localHome;
-   }
-
-   public String getLocal()
-   {
-      return local;
-   }
-
-   public void setLocal(String local)
-   {
-      this.local = local;
-   }
-
-   public String getEjbClass()
-   {
-      return ejbClass;
-   }
-
-   public void setEjbClass(String ejbClass)
-   {
-      this.ejbClass = ejbClass;
-   }
-
-   public SecurityIdentity getSecurityIdentity()
-   {
-      return securityIdentity;
-   }
-
-   public void setSecurityIdentity(SecurityIdentity securityIdentity)
-   {
-      this.securityIdentity = securityIdentity;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("ejbName=").append(ejbName);
-      sb.append(",remoteBindings=").append(remoteBindings);
-      sb.append(",jndiName=").append(jndiName);
-      sb.append(",local=").append(local);
-      sb.append(",remote=").append(remote);
-      sb.append(",home=").append(home);
-      sb.append(",localHome=").append(localHome);
-      sb.append(",ejbClass=").append(ejbClass);
-      sb.append(",ejbRefs=").append(ejbRefs);
-      sb.append(",ejbLocalRefs=").append(ejbLocalRefs);
-      sb.append(",resourceRefs=").append(resourceRefs);
-      sb.append(",resourceEnvRefs=").append(resourceEnvRefs);
-      sb.append(",methodAttributes=").append(methodAttributes);
-      sb.append(",aopDomainName=").append(aopDomainName);
-      sb.append(",dependencies=").append(dependencies);
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,324 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.InjectionTarget;
-import org.jboss.metamodel.descriptor.JndiRef;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-
-/**
- * Represents EJB elements of the ejb-jar.xml deployment descriptor for the 1.4
- * schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- *         ejbs.setCurrentEjbName(value); } else if
- *         (localName.equals("jndi-name")){ ejbs.setJndiName(value);
- * @version <tt>$Revision: 55512 $</tt>
- */
-public class EnterpriseBeans
-{
-   private static final Logger log = Logger.getLogger(EnterpriseBeans.class);
-
-   private HashMap<String, EnterpriseBean> enterpriseBeans = new HashMap();
-
-   private EnterpriseBean currentEjb;
-   
-   public void setPoolConfig(PoolConfig config)
-   {
-      currentEjb.setPoolConfig(config);
-   }
-   
-   public void setDefaultActivationConfig(ActivationConfig config)
-   {
-      ((MessageDrivenBean)currentEjb).setDefaultActivationConfig(config);
-   }
-   
-   public void setCacheConfig(CacheConfig config)
-   {
-      ((SessionEnterpriseBean)currentEjb).setCacheConfig(config);
-   }
-   
-   public void setClustered(String clustered)
-   {
-      ((SessionEnterpriseBean)currentEjb).setClustered(clustered);
-   }
-   
-   public void setConcurrent(String concurrent)
-   {
-      ((SessionEnterpriseBean)currentEjb).setConcurrent(concurrent);
-   }
-   
-   public void addJndiRef(JndiRef ref)
-   {
-      currentEjb.addJndiRef(ref);
-   }
-   
-   public void addXmlAnnotation(XmlAnnotation xmlAnnotation)
-   {
-      currentEjb.addXmlAnnotation(xmlAnnotation);
-   }
-   
-   public void addRemoteBinding(RemoteBinding binding)
-   {
-      currentEjb.addRemoteBinding(binding);
-   }
-   
-   public void addIgnoreDependency(InjectionTarget ignore)
-   {
-      currentEjb.addIgnoreDependency(ignore);
-   }
-   
-   public void addResourceRef(ResourceRef ref)
-   {
-      currentEjb.mergeResourceRef(ref);
-   }
-   
-   public void addResourceEnvRef(ResourceEnvRef ref)
-   {
-      currentEjb.mergeResourceEnvRef(ref);
-   }
-   
-   public void addMessageDestinationRef(MessageDestinationRef ref)
-   {
-      currentEjb.mergeMessageDestinationRef(ref);
-   }
-   
-   public void setMethodAttributes(MethodAttributes attributes)
-   {
-      currentEjb.setMethodAttributes(attributes);
-   }
-
-   public void setCurrentEjbName(String currentEjbName, Class ejbClass)
-   {
-      currentEjb = createEjbByEjbName(currentEjbName, ejbClass);
-   }
-
-   public void addDependency(String depends)
-   {
-      currentEjb.addDependency(depends);
-   }
-
-   public void updateEjbRef(EjbRef ref)
-   {
-      currentEjb.updateEjbRef(ref);
-   }
-
-   public void updateEjbLocalRef(EjbLocalRef ref)
-   {
-      currentEjb.updateEjbLocalRef(ref);
-   }
-   
-   public void updateResourceRef(ResourceRef ref)
-   {
-      currentEjb.updateResourceRef(ref);
-   }
-   
-   public void updateResourceEnvRef(ResourceEnvRef ref)
-   {
-      currentEjb.updateResourceEnvRef(ref);
-   }
-   
-   public void updateMessageDestinationRef(MessageDestinationRef ref)
-   {
-      currentEjb.updateMessageDestinationRef(ref);
-   }
-   
-   public void setResourceAdapterName(String name)
-   {
-      ((MessageDrivenBean)currentEjb).setResourceAdaptorName(name);
-   }
-
-   public void setDestinationJndiName(String name)
-   {
-      ((MessageDrivenBean)currentEjb).setDestinationJndiName(name);
-   }
-
-   public void setMdbUser(String name)
-   {
-      ((MessageDrivenBean)currentEjb).setMdbUser(name);
-   }
-
-   public void setMdbPassword(String name)
-   {
-      ((MessageDrivenBean)currentEjb).setMdbPassword(name);
-   }
-   
-   public void setMdbSubscriptionId(String id)
-   {
-      ((MessageDrivenBean)currentEjb).setMdbSubscriptionId(id);
-   }
-
-   public void setAopDomainName(String aopDomainName)
-   {
-      currentEjb.setAopDomainName(aopDomainName);
-   }
-
-   public void setRunAsPrincipal(String principal)
-   {
-      currentEjb.setRunAsPrincipal(principal);
-   }
-
-   public void setClusterConfig(ClusterConfig config)
-   {
-      ((SessionEnterpriseBean)currentEjb).setClusterConfig(config);
-   }
-
-   public void setCallByValue(boolean callByValue)
-   {
-      currentEjb.setCallByValue(callByValue);
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      currentEjb.setJndiName(jndiName);
-   }
-
-   public void setSecurityDomain(String securityDomain)
-   {
-      currentEjb.setSecurityDomain(securityDomain);
-   }
-
-   public void setLocalJndiName(String jndiName)
-   {
-      currentEjb.setLocalJndiName(jndiName);
-   }
-
-   public EnterpriseBean createEjbByEjbName(String ejbName, Class ejbClass)
-   {
-      EnterpriseBean ejb = (EnterpriseBean) enterpriseBeans.get(ejbName);
-      if (ejb != null)
-         return ejb;
-      
-      try 
-      {
-         ejb = (EnterpriseBean)ejbClass.newInstance();
-         ejb.setEjbName(ejbName);
-         enterpriseBeans.put(ejbName, ejb);
-      }
-      catch (Exception e){}
-      
-      return ejb;
-   }
-   
-   public EnterpriseBean findEjbByEjbName(String ejbName)
-   {
-      return enterpriseBeans.get(ejbName);
-   }
-
-   public List<EnterpriseBean> findEjbsByClass(String className)
-   {
-      ArrayList<EnterpriseBean> result = new ArrayList<EnterpriseBean>();
-
-      Iterator ejbs = enterpriseBeans.values().iterator();
-      while (ejbs.hasNext())
-      {
-         EnterpriseBean ejb = (EnterpriseBean) ejbs.next();
-         String ejbClassName = ejb.getEjbClass();
-         if (ejbClassName != null && ejbClassName.equals(className))
-            result.add(ejb);
-      }
-      return result;
-   }
-
-   public EnterpriseBean findEjbByRemote(String remote)
-   {
-      Iterator ejbs = enterpriseBeans.values().iterator();
-      while (ejbs.hasNext())
-      {
-         EnterpriseBean ejb = (EnterpriseBean) ejbs.next();
-         if (ejb.getRemote() != null && ejb.getRemote().equals(remote))
-            return ejb;
-      }
-      return null;
-   }
-
-   public EnterpriseBean findEjbByLocal(String local)
-   {
-      Iterator ejbs = enterpriseBeans.values().iterator();
-      while (ejbs.hasNext())
-      {
-         EnterpriseBean ejb = (EnterpriseBean) ejbs.next();
-         if (ejb.getLocal() != null && ejb.getLocal().equals(local))
-            return ejb;
-      }
-      return null;
-   }
-
-   public Collection<EnterpriseBean> getEnterpriseBeans()
-   {
-      return enterpriseBeans.values();
-   }
-
-/*   public void setEnterpriseBeans(List enterpriseBeans)
-   {
-      this.enterpriseBeans = enterpriseBeans;
-   }*/
-
-   public void addEnterpriseBean(EnterpriseBean ejb)
-   {
-      enterpriseBeans.put(ejb.getEjbName(), ejb);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("enterpriseBeans=").append(enterpriseBeans);
-      sb.append("]");
-      return sb.toString();
-   }
-
-   public boolean equals(Object o)
-   {
-      if (this == o)
-         return true;
-      if (!(o instanceof EnterpriseBeans))
-         return false;
-
-      final EnterpriseBeans ejbs = (EnterpriseBeans) o;
-
-      if (enterpriseBeans != null ? !enterpriseBeans
-              .equals(ejbs.enterpriseBeans) : ejbs.enterpriseBeans != null)
-         return false;
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      int result;
-      result = (enterpriseBeans != null ? enterpriseBeans.hashCode() : 0);
-      // result = 29 * result + (version != null ? version.hashCode() : 0);
-      return result;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,93 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents an Entity EJB element of the ejb-jar.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class EntityEnterpriseBean extends EnterpriseBean
-{
-
-   private String persistenceType;
-
-   private List cmpFields = new ArrayList();
-
-   private List queries = new ArrayList();
-
-   public String getPersistenceType()
-   {
-      return persistenceType;
-   }
-
-   public void setPersistenceType(String persistenceType)
-   {
-      this.persistenceType = persistenceType;
-   }
-
-   public List getCmpFields()
-   {
-      return cmpFields;
-   }
-
-   public void setCmpFields(List cmpFields)
-   {
-      this.cmpFields = cmpFields;
-   }
-
-   public void addCmpField(CmpField cmpField)
-   {
-      cmpFields.add(cmpField);
-   }
-
-   public List getQueries()
-   {
-      return queries;
-   }
-
-   public void setQueries(List queries)
-   {
-      this.queries = queries;
-   }
-
-   public void addQuery(Query query)
-   {
-      queries.add(query);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append('[');
-      sb.append(super.toString());
-      sb.append(",");
-      sb.append("persistenceType=").append(persistenceType);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,32 +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 org.jboss.ejb3.metamodel;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 45242 $
- */
-public class ExcludeClassInterceptors
-{
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,32 +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 org.jboss.ejb3.metamodel;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 45242 $
- */
-public class ExcludeDefaultInterceptors
-{
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeList.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeList.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeList.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,59 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-/**
- * Represents an <exlude-list> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class ExcludeList
-{
-   private static final Logger log = Logger.getLogger(ExcludeList.class);
-
-   private List methods = new ArrayList();
-
-   public List getMethods()
-   {
-      return methods;
-   }
-
-   public void addMethod(Method method)
-   {
-      methods.add(method);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("methods=").append(methods);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeList.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ExcludeList.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitList.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/InitList.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitList.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,59 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-/**
- * Represents an <init-list> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class InitList
-{
-   private static final Logger log = Logger.getLogger(InitList.class);
-
-   private List methods = new ArrayList();
-
-   public List getMethods()
-   {
-      return methods;
-   }
-
-   public void addMethod(Method method)
-   {
-      methods.add(method);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("methods=").append(methods);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitList.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/InitList.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitMethod.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/InitMethod.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitMethod.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,64 +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 org.jboss.ejb3.metamodel;
-
-/**
- * Represents an <init-method> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class InitMethod
-{
-   private Method beanMethod;
-   private Method createMethod;
-
-   public Method getBeanMethod()
-   {
-      return beanMethod;
-   }
-
-   public void setBeanMethod(Method beanMethod)
-   {
-      this.beanMethod = beanMethod;
-   }
-
-   public Method getCreateMethod()
-   {
-      return createMethod;
-   }
-
-   public void setCreateMethod(Method createMethod)
-   {
-      this.createMethod = createMethod;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("method=").append(beanMethod);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InitMethod.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/InitMethod.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Inject.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Inject.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Inject.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,70 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-/**
- * Represents an <inject> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class Inject
-{
-   private static final Logger log = Logger.getLogger(Inject.class);
-
-   private List methods = new ArrayList();
-   private String jndiName;
-
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-   }
-
-   public List getMethods()
-   {
-      return methods;
-   }
-
-   public void addMethod(Method method)
-   {
-      methods.add(method);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("jndiName=").append(jndiName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Inject.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Inject.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,62 +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 org.jboss.ejb3.metamodel;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.JndiRef;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.PersistenceUnitRef;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.WebServiceRef;
-import org.jboss.metamodel.descriptor.PersistenceContextRef;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 46506 $
- */
-public interface Injectable
-{
-
-   Collection<EjbLocalRef> getEjbLocalRefs();
-
-   Collection<EjbRef> getEjbRefs();
-
-   Collection<ResourceEnvRef> getResourceEnvRefs();
-
-   Collection<ResourceRef> getResourceRefs();
-
-   Collection<WebServiceRef> getWebServiceRefs();
-
-   Collection<MessageDestinationRef> getMessageDestinationRefs();
-
-   List<PersistenceUnitRef> getPersistenceUnitRefs();
-
-   List<PersistenceContextRef> getPersistenceContextRefs();
-
-   Collection<JndiRef> getJndiRefs();
-}
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptor.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptor.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,133 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.metamodel.descriptor.PersistenceUnitRef;
-import org.jboss.metamodel.descriptor.PersistenceContextRef;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 46509 $
- */
-public class Interceptor
-   extends EnvironmentRefGroup implements Injectable
-{
-   String interceptorClass;
-   Method aroundInvoke;
-   Method postConstruct;
-   Method postActivate;
-   Method preDestroy;
-   Method prePassivate;
-
-   public Interceptor()
-   {
-   }
-
-   public Method getAroundInvoke()
-   {
-      return aroundInvoke;
-   }
-
-   public void setAroundInvoke(Method aroundInvoke)
-   {
-      this.aroundInvoke = aroundInvoke;
-   }
-
-   public String getInterceptorClass()
-   {
-      return interceptorClass;
-   }
-
-   public void setInterceptorClass(String interceptorClass)
-   {
-      this.interceptorClass = interceptorClass;
-   }
-
-   public Method getPostActivate()
-   {
-      return postActivate;
-   }
-
-   public void setPostActivate(Method postActivate)
-   {
-      this.postActivate = postActivate;
-   }
-
-   public Method getPostConstruct()
-   {
-      return postConstruct;
-   }
-
-   public void setPostConstruct(Method postConstruct)
-   {
-      this.postConstruct = postConstruct;
-   }
-
-   public Method getPreDestroy()
-   {
-      return preDestroy;
-   }
-
-   public void setPreDestroy(Method preDestroy)
-   {
-      this.preDestroy = preDestroy;
-   }
-
-   public Method getPrePassivate()
-   {
-      return prePassivate;
-   }
-
-   public void setPrePassivate(Method prePassivate)
-   {
-      this.prePassivate = prePassivate;
-   }
-
-   private List<PersistenceContextRef> persistenceContextRefs = new ArrayList<PersistenceContextRef>();
-   private List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
-
-   public List<PersistenceContextRef> getPersistenceContextRefs()
-   {
-      return persistenceContextRefs;
-   }
-
-   public List<PersistenceUnitRef> getPersistenceUnitRefs()
-   {
-      return persistenceUnitRefs;
-   }
-
-   public void addPersistenceContextRef(PersistenceContextRef ref)
-   {
-      persistenceContextRefs.add(ref);
-   }
-
-   public void addPersistenceUnitRef(PersistenceUnitRef ref)
-   {
-      persistenceUnitRefs.add(ref);
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptor.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptor.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorBinding.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorBinding.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorBinding.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,96 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 45242 $
- */
-public class InterceptorBinding extends Method
-{
-   Boolean ordered = null;
-   private ArrayList<String> interceptorClasses = new ArrayList<String>();
-   private boolean excludeDefaultInterceptors;
-   private boolean excludeClassInterceptors;
-   
-   public InterceptorBinding()
-   {
-      super();
-   }
-
-   public boolean getExcludeClassInterceptors()
-   {
-      return excludeClassInterceptors;
-   }
-
-   public void setExcludeClassInterceptors(boolean excludeClassInterceptors)
-   {
-      this.excludeClassInterceptors = excludeClassInterceptors;
-   }
-
-   public boolean getExcludeDefaultInterceptors()
-   {
-      return excludeDefaultInterceptors;
-   }
-
-   public void setExcludeDefaultInterceptors(boolean excludeDefaultInterceptors)
-   {
-      this.excludeDefaultInterceptors = excludeDefaultInterceptors;
-   }
-
-   public ArrayList<String> getInterceptorClasses()
-   {
-      return interceptorClasses;
-   }
-
-   public void addInterceptorClass(String interceptorClass)
-   {
-      if (ordered == null)
-      {
-         ordered = false;
-      }
-      if (ordered) throw new RuntimeException("Cannot have both interceptor-class and interceptor-order in interceptor-binding");
-      this.interceptorClasses.add(interceptorClass);
-   }
-
-   public void setOrderedInterceptorClasses(InterceptorOrder order)
-   {
-      if (ordered == null)
-      {
-         ordered = true;
-      }
-      if (!ordered) throw new RuntimeException("Cannot have both interceptor-class and interceptor-order in interceptor-binding");
-      this.interceptorClasses.addAll(order.getInterceptorClasses());
-   }
-
-   public boolean isOrdered()
-   {
-      if (ordered == null) return false;
-      return ordered;
-   }
-
-   
-   
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorBinding.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorBinding.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorOrder.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorOrder.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorOrder.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,50 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 45242 $
- */
-public class InterceptorOrder
-{
-   private ArrayList<String> interceptorClasses = new ArrayList<String>();
-
-   public InterceptorOrder()
-   {
-      // FIXME InterceptorOrder constructor
-      super();
-   }
-
-   public void addInterceptorClass(String interceptorClass)
-   {
-      this.interceptorClasses.add(interceptorClass);
-   }
-
-   public ArrayList<String> getInterceptorClasses()
-   {
-      return interceptorClasses;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorOrder.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/InterceptorOrder.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptors.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptors.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptors.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,50 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 45242 $
- */
-public class Interceptors
-{
-   ArrayList<Interceptor> interceptors = new ArrayList<Interceptor>();
-   
-   public Interceptors()
-   {
-      // FIXME Interceptors constructor
-      super();
-   }
-   
-   public void addInterceptor(Interceptor interceptor)
-   {
-      interceptors.add(interceptor);
-   }
-
-   public ArrayList<Interceptor> getInterceptors()
-   {
-      return interceptors;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptors.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Interceptors.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,1120 +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 org.jboss.ejb3.metamodel;
-
-import java.io.IOException;
-import java.net.URL;
-
-import javax.management.ObjectName;
-
-import org.jboss.ejb3.KernelAbstraction;
-import org.jboss.ejb3.KernelAbstractionFactory;
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-import org.jboss.metamodel.descriptor.DDObjectFactory;
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.EnvEntry;
-import org.jboss.metamodel.descriptor.InjectionTarget;
-import org.jboss.metamodel.descriptor.JndiRef;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.NameValuePair;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.SecurityRole;
-
-/**
- * Represents the jboss.xml deployment descriptor for the 2.1 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 56531 $</tt>
- */
-public class JBossDDObjectFactory extends DDObjectFactory
-{
-   private static final Logger log = Logger
-           .getLogger(JBossDDObjectFactory.class);
-
-   private EjbJarDD dd;
-   private Class ejbClass;
-   
-   public static EjbJarDD parse(URL ddResource, EjbJarDD dd)
-      throws JBossXBException, IOException
-   {
-      ObjectModelFactory factory = null;
-      Unmarshaller unmarshaller = null;
-      
-      if (ddResource != null)
-      {
-         log.debug("found jboss.xml " + ddResource);
-      
-         if (dd == null)
-            dd = new EjbJarDD();
-         
-         factory = new JBossDDObjectFactory(dd);
-         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory
-               .newInstance();
-         unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
-         unmarshaller = unmarshallerFactory.newUnmarshaller();
-         JBossEntityResolver entityResolver = new JBossEntityResolver();
-         unmarshaller.setEntityResolver(entityResolver);
-      
-         dd = (EjbJarDD) unmarshaller.unmarshal(ddResource.openStream(),
-               factory, null);
-      }
-   
-      return dd;
-   }
-
-   public JBossDDObjectFactory(EjbJarDD dd)
-   {
-      super();
-      this.dd = dd;
-   }
-
-   /**
-    * Return the root.
-    */
-   public Object newRoot(Object root, UnmarshallingContext navigator,
-                         String namespaceURI, String localName, Attributes attrs)
-   {
-      return dd;
-   }
-
-   public Object completeRoot(Object root, UnmarshallingContext ctx,
-                              String uri, String name)
-   {
-      return root;
-   }
-
-   // Methods discovered by introspection
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(EjbJarDD dd, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("enterprise-beans"))
-      {
-         child = dd.getEnterpriseBeans();
-         if (child == null)
-         {
-            dd.setEnterpriseBeans(new EnterpriseBeans());
-            child = dd.getEnterpriseBeans();
-         }
-      }
-      else if (localName.equals("assembly-descriptor"))
-      {
-         child = dd.getAssemblyDescriptor();
-         if (child == null)
-         {
-            dd.setAssemblyDescriptor(new AssemblyDescriptor());
-            child = dd.getAssemblyDescriptor();
-         }
-      }
-      else if (localName.equals("resource-manager"))
-      {
-         child = new ResourceManager();
-      }
-
-      return child;
-   }
-   
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(Consumer consumer, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-      
-      if ((child = this.newEnvRefGroupChild(localName)) != null)
-            return child;
-      
-      if (localName.equals("current-message"))
-      {
-         child = new CurrentMessage();
-      }
-      else if (localName.equals("message-properties"))
-      {
-         child = new MessageProperties();
-      }
-      else if (localName.equals("producer"))
-      {
-         child = new Producer(false);
-      }
-      else if (localName.equals("local-producer"))
-      {
-         child = new Producer(true);
-      }
-      else if (localName.equals("annotation"))
-      {
-         child = new XmlAnnotation();
-      }
-      else if (localName.equals("ignore-dependency"))
-      {
-         child = new InjectionTarget();
-      }
-      else if (localName.equals("remote-binding"))
-      {
-         child = new RemoteBinding();
-      }
-      else if (localName.equals("pool-config"))
-      {
-         child = new PoolConfig();
-      }
-      
-      return child;
-   }
-   
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(Service service, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-      
-      if ((child = this.newEnvRefGroupChild(localName)) != null)
-            return child;
-      
-      if (localName.equals("ignore-dependency"))
-      {
-         child = new InjectionTarget();
-      }
-      else if (localName.equals("annotation"))
-      {
-         child = new XmlAnnotation();
-      }
-      else if (localName.equals("remote-binding"))
-      {
-         child = new RemoteBinding();
-      }
-
-      return child;
-   }
-   
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(CurrentMessage message, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-      
-      if (localName.equals("method"))
-      {
-         child = new Method();
-      }
-
-      return child;
-   }
-   
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(MessageProperties properties, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-      
-      if (localName.equals("method"))
-      {
-         child = new Method();
-      }
-
-      return child;
-   }
-   
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(MethodAttributes attributes, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-      
-      if (localName.equals("method"))
-      {
-         child = new Method();
-      }
-
-      return child;
-   }
-   
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(AssemblyDescriptor descriptor,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-      if (localName.equals("message-destination"))
-      {
-         child = new MessageDestination();
-      }
-
-      return child;
-   }
-
-   /**
-    * Called when parsing of a new element started.
-    */
-   public Object newChild(EnterpriseBeans ejbs, UnmarshallingContext navigator,
-                          String namespaceURI, String localName, Attributes attrs)
-   {
-      Object child = null;
-
-      if ((child = this.newEnvRefGroupChild(localName)) != null)
-      {
-         return child;
-      }
-      
-      if (localName.equals("session"))
-      {
-         ejbClass = SessionEnterpriseBean.class;
-         child = ejbs;
-      }
-      else if (localName.equals("message-driven"))
-      {
-         ejbClass = MessageDrivenBean.class;
-         child = ejbs;
-      }
-      else if (localName.equals("service"))
-      {
-         child = new Service();
-      }
-      else if (localName.equals("consumer"))
-      {
-         child = new Consumer();
-      }
-      else if (localName.equals("method-attributes"))
-      {
-         child = new MethodAttributes();
-      }
-      else if (localName.equals("annotation"))
-      {
-         child = new XmlAnnotation();
-      }
-      else if (localName.equals("ignore-dependency"))
-      {
-         child = new InjectionTarget();
-      }
-      else if (localName.equals("cluster-config"))
-      {
-         child = new ClusterConfig();
-      }
-      else if (localName.equals("remote-binding"))
-      {
-         child = new RemoteBinding();
-      }
-      else if (localName.equals("cache-config"))
-      {
-         child = new CacheConfig();
-      }
-      else if (localName.equals("pool-config"))
-      {
-         child = new PoolConfig();
-      }
-      else if (localName.equals("default-activation-config"))
-      {
-         child = new ActivationConfig();
-      }
-      
-      return child;
-   }
-   
-   public Object newChild(ActivationConfig parent,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-
-     if (localName.equals("default-activation-config-property"))
-     {
-         child = new NameValuePair();
-     }
-
-      return child;
-   }
-   
-   public Object newChild(XmlAnnotation parent,
-         UnmarshallingContext navigator, String namespaceURI, String localName,
-         Attributes attrs)
-   {
-      Object child = null;
-   
-      if (localName.equals("injection-target"))
-      {
-         child = new InjectionTarget();
-      }
-      else if (localName.equals("property"))
-      {
-         child = new NameValuePair();
-      }
-      
-      return child;
-   }
-   
-   public void addChild(XmlAnnotation parent, NameValuePair property,
-         UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addProperty(property);
-   }
-   
-   public void addChild(XmlAnnotation parent, InjectionTarget injectionTarget,
-         UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(injectionTarget);
-   }
-   
-   public void addChild(EnterpriseBeans parent, ActivationConfig config,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setDefaultActivationConfig(config);
-   }
-   
-   public void addChild(ActivationConfig parent, NameValuePair property,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addActivationConfigProperty(property);
-   }
-   
-   public void addChild(Consumer parent, Producer producer,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      if (producer.isLocal())
-         parent.addLocalProducer(producer);
-      else
-         parent.addProducer(producer);
-   }
-   
-   public void addChild(Consumer parent, RemoteBinding binding,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addRemoteBinding(binding);
-   }
-  
-   public void addChild(AssemblyDescriptor parent, MessageDestination destination,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMessageDestination(destination);
-   }
-   
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, CacheConfig config,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setCacheConfig(config);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, PoolConfig config,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setPoolConfig(config);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, MethodAttributes attributes,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setMethodAttributes(attributes);
-   }
-   
-   public void addChild(EnterpriseBeans parent, RemoteBinding binding,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addRemoteBinding(binding);
-   }
-   
-   public void addChild(EnterpriseBeans parent, InjectionTarget ignoreDependency,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addIgnoreDependency(ignoreDependency);
-   }
-   
-   public void addChild(EnterpriseBeans parent, XmlAnnotation xmlAnnotation,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addXmlAnnotation(xmlAnnotation);
-   }
-   
-   public void addChild(MethodAttributes parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMethod(method);
-   }
-   
-   public void addChild(Consumer parent, CurrentMessage message,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setCurrentMessage(message);
-   }
-   
-   public void addChild(Consumer parent, PoolConfig config,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setPoolConfig(config);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Consumer parent, MessageProperties message,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setMessageProperties(message);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(CurrentMessage parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMethod(method);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(MessageProperties parent, Method method,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addMethod(method);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, Service service,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEnterpriseBean(service);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Service parent, EjbRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Service parent, RemoteBinding binding,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addRemoteBinding(binding);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Service parent, EjbLocalRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbLocalRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Service parent, ResourceRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Service parent, JndiRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addJndiRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Service parent, ResourceEnvRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceEnvRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Consumer parent, EjbRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Consumer parent, EjbLocalRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEjbLocalRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Consumer parent, ResourceRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Consumer parent, JndiRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addJndiRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(Consumer parent, ResourceEnvRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceEnvRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, Consumer consumer,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addEnterpriseBean(consumer);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, JndiRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addJndiRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EjbJarDD parent, ResourceManager manager,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.addResourceManager(manager);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, EnterpriseBeans ejbs,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, EjbRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.updateEjbRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, EjbLocalRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.updateEjbLocalRef(ref);
-   }
-
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, ClusterConfig config,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setClusterConfig(config);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, ResourceRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.updateResourceRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, MessageDestinationRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.updateMessageDestinationRef(ref);
-   }
-   
-   /**
-    * Called when parsing character is complete.
-    */
-   public void addChild(EnterpriseBeans parent, ResourceEnvRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.updateResourceEnvRef(ref);
-   }
-   
-   public void setValue(XmlAnnotation xmlAnnotation, UnmarshallingContext navigator,
-         String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("annotation-class"))
-      {
-         xmlAnnotation.setAnnotationClass(getValue(localName, value));
-      }
-      else if (localName.equals("annotation-implementation-class"))
-      {
-         xmlAnnotation.setAnnotationImplementationClass(getValue(localName, value));
-      }
-   }
-   
-   public void setValue(NameValuePair property, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("activation-config-property-name") || localName.equals("message-driven-config-property-name")  || localName.equals("property-name"))
-      {
-         property.setName(getValue(localName, value));
-      }
-      else if (localName.equals("activation-config-property-value") || localName.equals("message-driven-config-property-value") || localName.equals("property-value"))
-      {
-         property.setValue(getValue(localName, value));
-      }
-   }
-   
-   public void setValue(ResourceManager manager, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("res-name"))
-      {
-         manager.setResourceName(getValue(localName, value));
-      }
-      else if (localName.equals("res-jndi-name"))
-      {
-         manager.setResourceJndiName(getValue(localName, value));
-      }
-   }
-   
-   public void setValue(MessageDestination destination, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("message-destination-name"))
-      {
-         destination.setMessageDestinationName(getValue(localName, value));
-      }
-      else if (localName.equals("jndi-name"))
-      {
-         destination.setJndiName(getValue(localName, value));
-      }
-   }
-   
-   public void setValue(EnterpriseBeans ejbs, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("ejb-name"))
-      {
-         ejbs.setCurrentEjbName(value, ejbClass);
-      }
-      else if (localName.equals("jndi-name"))
-      {
-         ejbs.setJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("local-jndi-name"))
-      {
-         ejbs.setLocalJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("security-domain"))
-      {
-         ejbs.setSecurityDomain(getValue(localName, value));
-      }
-      else if (localName.equals("depends"))
-      {
-         ejbs.addDependency(getValue(localName, value));
-      }
-      else if (localName.equals("run-as-principal"))
-      {
-         ejbs.setRunAsPrincipal(getValue(localName, value));
-      }
-      else if (localName.equals("aop-domain-name"))
-      {
-         ejbs.setAopDomainName(getValue(localName, value));
-      }
-      else if (localName.equals("resource-adapter-name"))
-      {
-         ejbs.setResourceAdapterName(getValue(localName, value));
-      }
-      else if (localName.equals("destination-jndi-name"))
-      {
-         ejbs.setDestinationJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("mdb-user"))
-      {
-         ejbs.setMdbUser(getValue(localName, value));
-      }
-      else if (localName.equals("mdb-passwd"))
-      {
-         ejbs.setMdbPassword(getValue(localName, value));
-      }
-      else if (localName.equals("mdb-subscription-id"))
-      {
-         ejbs.setMdbSubscriptionId(getValue(localName, value));
-      }
-      else if (localName.equals("clustered"))
-      {
-         ejbs.setClustered(getValue(localName, value));
-      }
-      else if (localName.equals("concurrent"))
-      {
-         ejbs.setConcurrent(getValue(localName, value));
-      }
-   }
-   
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(Service service, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("ejb-name"))
-      {
-         service.setEjbName(getValue(localName, value));
-      }
-      if (localName.equals("object-name"))
-      {
-         service.setObjectName(getValue(localName, value));
-      }
-      else if (localName.equals("ejb-class"))
-      {
-         service.setEjbClass(getValue(localName, value));
-      }
-      else if (localName.equals("local"))
-      {
-         service.setLocal(getValue(localName, value));
-      }
-      else if (localName.equals("remote"))
-      {
-         service.setRemote(getValue(localName, value));
-      }
-      else if (localName.equals("management"))
-      {
-         service.setManagement(getValue(localName, value));
-      }
-      else if (localName.equals("jndi-name"))
-      {
-         service.setJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("local-jndi-name"))
-      {
-         service.setLocalJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("security-domain"))
-      {
-         service.setSecurityDomain(getValue(localName, value));
-      }
-      else if (localName.equals("aop-domain-name"))
-      {
-         service.setAopDomainName(getValue(localName, value));
-      }
-      else if (localName.equals("depends"))
-      {
-         service.addDependency(getValue(localName, value));
-      }
-   }
-   
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(Consumer consumer, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("message-destination"))
-      {
-         consumer.setDestination(getValue(localName, value));
-      }
-      else if (localName.equals("message-destination-type"))
-      {
-         consumer.setDestinationType(getValue(localName, value));
-      }
-      else if (localName.equals("ejb-class"))
-      {
-         consumer.setEjbClass(getValue(localName, value));
-         consumer.setEjbName(getValue(localName, value));
-      }
-      else if (localName.equals("local"))
-      {
-         consumer.setLocal(getValue(localName, value));
-      }
-      else if (localName.equals("remote"))
-      {
-         consumer.setRemote(getValue(localName, value));
-      }
-      else if (localName.equals("jndi-name"))
-      {
-         consumer.setJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("local-jndi-name"))
-      {
-         consumer.setLocalJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("security-domain"))
-      {
-         consumer.setSecurityDomain(getValue(localName, value));
-      }
-      else if (localName.equals("run-as-principal"))
-      {
-         consumer.setRunAsPrincipal(getValue(localName, value));
-      }
-      else if (localName.equals("aop-domain-name"))
-      {
-         consumer.setAopDomainName(getValue(localName, value));
-      }
-      else if (localName.equals("depends"))
-      {
-         consumer.addDependency(getValue(localName, value));
-      }
-   }
-   
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(RemoteBinding binding, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("jndi-name"))
-      {
-         binding.setJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("client-bind-url"))
-      {
-         binding.setClientBindUrl(getValue(localName, value));
-      }
-      else if (localName.equals("proxy-factory"))
-      {
-         binding.setProxyFactory(getValue(localName, value));
-      }
-      else if (localName.equals("interceptor-stack"))
-      {
-         binding.setInterceptorStack(getValue(localName, value));
-      }
-   }
-   
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(MessageProperties properties, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("delivery"))
-      {
-         properties.setDelivery(getValue(localName, value));
-      }
-      else if (localName.equals("class"))
-      {
-         properties.setClassName(getValue(localName, value));
-      }
-      else if (localName.equals("priority"))
-      {
-         properties.setPriority(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(ClusterConfig config, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("load-balance-policy"))
-      {
-         config.setLoadBalancePolicy(getValue(localName, value));
-      }
-      else if (localName.equals("partition-name"))
-      {
-         config.setPartition(getValue(localName, value));
-      }
-   }
-   
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(CacheConfig config, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("cache-class"))
-      {
-         config.setCacheClass(getValue(localName, value));
-      }
-      else if (localName.equals("cache-max-size"))
-      {
-         config.setMaxSize(getValue(localName, value));
-      }
-      else if (localName.equals("idle-timeout-seconds"))
-      {
-         config.setIdleTimeoutSeconds(getValue(localName, value));
-      }
-      else if (localName.equals("cache-name"))
-      {
-         config.setName(getValue(localName, value));
-      }
-      else if (localName.equals("persistence-manager"))
-      {
-         config.setPersistenceManager(getValue(localName, value));
-      }
-   }
-   
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(PoolConfig config, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("pool-class"))
-      {
-         config.setPoolClass(getValue(localName, value));
-      }
-      else if (localName.equals("pool-max-size"))
-      {
-         config.setMaxSize(getValue(localName, value));
-      }
-      else if (localName.equals("pool-timeout"))
-      {
-         config.setTimeout(getValue(localName, value));
-      }
-   }
-   
-   
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(Method method, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("method-name"))
-      {
-         method.setMethodName(getValue(localName, value));
-      }
-      else if (localName.equals("transaction-timeout"))
-      {
-         method.setTransactionTimeout(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(EjbJarDD dd, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("security-domain"))
-      {
-         dd.setSecurityDomain(getValue(localName, value));
-      }
-      else if (localName.equals("unauthenticated-principal"))
-      {
-         dd.setUnauthenticatedPrincipal(getValue(localName, value));
-      }
-   }
-   
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(Producer producer, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("class"))
-      {
-         producer.setClassName(getValue(localName, value));
-      }
-      else if (localName.equals("connection-factory"))
-      {
-         producer.setConnectionFactory(getValue(localName, value));
-      }
-   }
-   
-   protected String getValue(String name, String value)
-   {
-      if (value.startsWith("${") && value.endsWith("}"))
-      {
-         try
-         {
-            String propertyName = value.substring(2, value.length()-1);
-            ObjectName propertyServiceON = new ObjectName("jboss:type=Service,name=SystemProperties");
-            KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
-            String propertyValue = (String)kernelAbstraction.invoke(propertyServiceON, "get", new Object[]{propertyName}, new String[]{"java.lang.String"});
-            log.debug("Replaced jboss.xml element " + name + " with value " + propertyValue);
-            return propertyValue;
-         }
-         catch (Exception e)
-         {
-            log.warn("Unable to look up property service for jboss.xml element " + name + " with value " + value + ". Caused by " + e.getClass() + " " + e.getMessage());
-         }
-      }
-      
-      return value;
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDestination.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDestination.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDestination.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,71 +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 org.jboss.ejb3.metamodel;
-
-import org.jboss.logging.Logger;
-
-
-/**
- * Represents a <message-destination> element of the jboss.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class MessageDestination
-{
-   private static final Logger log = Logger.getLogger(MessageDestination.class);
-   
-   private String messageDestinationName;
-   
-   private String jndiName;
-   
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-   }
-
-   public String getMessageDestinationName()
-   {
-      return messageDestinationName;
-   }
-
-   public void setMessageDestinationName(String messageDestinationName)
-   {
-      this.messageDestinationName = messageDestinationName;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[MessageDestination: ");
-      sb.append("messageDestinationName=").append(messageDestinationName);
-      sb.append(", jndiName=").append(jndiName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDestination.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDestination.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenBean.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,224 +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 org.jboss.ejb3.metamodel;
-
-import javax.ejb.TransactionManagementType;
-import org.jboss.logging.Logger;
-
-/**
- * Represents a message-driven element of the ejb-jar.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 46471 $</tt>
- */
-public class MessageDrivenBean extends EnterpriseBean
-{
-   private static final Logger log = Logger.getLogger(MessageDrivenBean.class);
-
-   public static final String BEAN = "Bean";
-
-   public static final String CONTAINER = "Container";
-
-   // ejb-jar.xml
-   private String acknowledgeMode;
-
-   private String transactionType;
-   
-   private String messagingType;
-   
-   private String resourceAdaptorName;
-
-   private MessageDrivenDestination messageDrivenDestination;
-   
-   private ActivationConfig activationConfig;
-   private ActivationConfig defaultActivationConfig;
-   
-   private String destinationJndiName;
-   
-   private String mdbUser;
-   private String mdbPassword;
-   private String mdbSubscriptionId;
-
-   private Method aroundInvoke;
-   private Method postConstruct;
-   private Method postActivate;
-   private Method preDestroy;
-   private Method prePassivate;
-   
-   public ActivationConfig getDefaultActivationConfig()
-   {
-      return defaultActivationConfig;
-   }
-
-   public void setDefaultActivationConfig(ActivationConfig defaultActivationConfig)
-   {
-      this.defaultActivationConfig = defaultActivationConfig;
-   }
-   
-   public MessageDrivenDestination getMessageDrivenDestination()
-   {
-      return messageDrivenDestination;
-   }
-
-   public void setMessageDrivenDestination(MessageDrivenDestination messageDrivenDestination)
-   {
-      this.messageDrivenDestination = messageDrivenDestination;
-   }
-   
-   public ActivationConfig getActivationConfig()
-   {
-      return activationConfig;
-   }
-
-   public void setActivationConfig(ActivationConfig activationConfig)
-   {
-      this.activationConfig = activationConfig;
-   }
-   
-   public void setDestinationJndiName(String name)
-   {
-      destinationJndiName = name;
-   }
-   
-   public String getDestinationJndiName()
-   {
-      return destinationJndiName;
-   }
-
-   public String getAcknowledgeMode()
-   {
-      return acknowledgeMode;
-   }
-
-   public void setAcknowledgeMode(String acknowledgeMode)
-   {
-      this.acknowledgeMode = acknowledgeMode;
-   }
-   
-   public String getMessagingType()
-   {
-      return messagingType;
-   }
-
-   public void setMessagingType(String messagingType)
-   {
-      this.messagingType = messagingType;
-   }
-   
-   public String getResourceAdaptorName()
-   {
-      return resourceAdaptorName;
-   }
-
-   public void setResourceAdaptorName(String resourceAdaptorName)
-   {
-      this.resourceAdaptorName = resourceAdaptorName;
-   }
-
-   public String getTransactionType()
-   {
-      return transactionType;
-   }
-
-   public void setTransactionType(String transactionType)
-   {
-      if (transactionType.equals(BEAN))
-         tmType = TransactionManagementType.BEAN;
-      else if (transactionType.equals(CONTAINER))
-         tmType = TransactionManagementType.CONTAINER;
-      this.transactionType = transactionType;
-   }
-   
-   public String getMdbPassword()
-   {
-      return mdbPassword;
-   }
-
-   public void setMdbPassword(String mdbPassword)
-   {
-      this.mdbPassword = mdbPassword;
-   }
-
-   public String getMdbUser()
-   {
-      return mdbUser;
-   }
-
-   public void setMdbUser(String mdbUser)
-   {
-      this.mdbUser = mdbUser;
-   }
-   
-   public String getMdbSubscriptionId()
-   {
-      return mdbSubscriptionId;
-   }
-
-   public void setMdbSubscriptionId(String mdbSubscriptionId)
-   {
-      this.mdbSubscriptionId = mdbSubscriptionId;
-   }
-
-   public Method getAroundInvoke()
-   {
-      return aroundInvoke;
-   }
-
-   public void setAroundInvoke(Method aroundInvoke)
-   {
-      this.aroundInvoke = aroundInvoke;
-   }
-
-   public Method getPostConstruct()
-   {
-      return postConstruct;
-   }
-
-   public void setPostConstruct(Method postConstruct)
-   {
-      this.postConstruct = postConstruct;
-   }
-
-   public Method getPreDestroy()
-   {
-      return preDestroy;
-   }
-
-   public void setPreDestroy(Method preDestroy)
-   {
-      this.preDestroy = preDestroy;
-   }
-   
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[MessageDrivenBean:");
-      sb.append(super.toString());
-      sb.append(",");
-      sb.append("acknowledgeMode=").append(acknowledgeMode);
-      sb.append("destination=").append(messageDrivenDestination);
-      sb.append("messagingType=").append(messagingType);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenBean.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenDestination.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenDestination.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenDestination.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,70 +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 org.jboss.ejb3.metamodel;
-
-import org.jboss.logging.Logger;
-
-/**
- * Represents a message-driven-destination element of the ejb-jar.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class MessageDrivenDestination
-{
-   private static final Logger log = Logger.getLogger(MessageDrivenDestination.class);
-
-   // ejb-jar.xml
-   private String destinationType;
-
-   private String subscriptionDurability;
-
-   public String getDestinationType()
-   {
-      return destinationType;
-   }
-
-   public void setDestinationType(String destinationType)
-   {
-      this.destinationType = destinationType;
-   }
-
-   public String getSubscriptionDurability()
-   {
-      return subscriptionDurability;
-   }
-
-   public void setSubscriptionDurability(String subscriptionDurability)
-   {
-      this.subscriptionDurability = subscriptionDurability;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append('[');
-      sb.append("destinationType=").append(destinationType);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenDestination.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MessageDrivenDestination.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageProperties.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MessageProperties.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageProperties.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,90 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class MessageProperties
-{
-   private List methods = new ArrayList();
-   private String delivery;
-   private String priority;
-   private String className;
-
-   public List getMethods()
-   {
-      return methods;
-   }
-   
-   public void addMethod(Method method)
-   {
-      methods.add(method);
-   }
-   
-   public String getDelivery()
-   {
-      return delivery;
-   }
-   
-   public void setDelivery(String delivery)
-   {
-      this.delivery = delivery;
-   }
-   
-   public String getClassName()
-   {
-      return className;
-   }
-   
-   public void setClassName(String className)
-   {
-      this.className = className;
-   }
-   
-   public String getPriority()
-   {
-      return priority;
-   }
-   
-   public void setPriority(String priority)
-   {
-      this.priority = priority;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("className=").append(className);
-      sb.append(", priority=").append(priority);
-      sb.append(", delivery=").append(delivery);
-      sb.append(", methods=").append(methods);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MessageProperties.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MessageProperties.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Method.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Method.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Method.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,100 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents an <method> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class Method
-{
-
-   private String ejbName = null;
-
-   private String methodName = null;
-   
-   private String transactionTimeout = null;
-
-   private List methodParams;
-
-   public String getTransactionTimeout()
-   {
-      return transactionTimeout;
-   }
-
-   public void setTransactionTimeout(String transactionTimeout)
-   {
-      this.transactionTimeout = transactionTimeout;
-   }
-   
-   public String getEjbName()
-   {
-      return ejbName;
-   }
-
-   public void setEjbName(String ejbName)
-   {
-      this.ejbName = ejbName;
-   }
-
-   public String getMethodName()
-   {
-      return methodName;
-   }
-
-   public void setMethodName(String methodName)
-   {
-      this.methodName = methodName;
-   }
-
-   public void setHasParameters()
-   {
-      methodParams = new ArrayList();
-   }
-   
-   public void addMethodParam(String methodParam)
-   {
-      methodParams.add(methodParam);
-   }
-
-   public List getMethodParams()
-   {
-      return methodParams;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbName=").append(ejbName);
-      sb.append(", methodName=").append(methodName);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Method.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Method.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodAttributes.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MethodAttributes.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodAttributes.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,59 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-/**
- * Represents an <method-attributes> element of the jboss.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class MethodAttributes
-{
-   private static final Logger log = Logger.getLogger(MethodAttributes.class);
-
-   private List<Method> methods = new ArrayList();
-
-   public List<Method> getMethods()
-   {
-      return methods;
-   }
-
-   public void addMethod(Method method)
-   {
-      methods.add(method);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("methods=").append(methods);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodAttributes.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MethodAttributes.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodPermission.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MethodPermission.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodPermission.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,81 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-/**
- * Represents an <method-permission> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class MethodPermission
-{
-   private static final Logger log = Logger.getLogger(MethodPermission.class);
-
-   private List roleNames = new ArrayList();
-   private boolean isUnchecked = false;
-   private List<Method> methods = new ArrayList();
-
-   public boolean isUnchecked()
-   {
-      return isUnchecked;
-   }
-
-   public void setUnchecked(boolean isUnchecked)
-   {
-      this.isUnchecked = isUnchecked;
-   }
-
-   public List getRoleNames()
-   {
-      return roleNames;
-   }
-
-   public void addRoleName(String roleName)
-   {
-      roleNames.add(roleName);
-   }
-
-   public List<Method> getMethods()
-   {
-      return methods;
-   }
-
-   public void addMethod(Method method)
-   {
-      methods.add(method);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("roleNames=").append(roleNames);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/MethodPermission.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/MethodPermission.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/PoolConfig.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/PoolConfig.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/PoolConfig.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,78 +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 org.jboss.ejb3.metamodel;
-
-
-/**
- * Represents an <pool-config> element of the jboss.xml deployment descriptor
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class PoolConfig
-{
-   private String poolClass = null;
-   private String maxSize = null;
-   private String timeout = null;
-   
-   public String getPoolClass()
-   {
-      return poolClass;
-   }
-
-   public void setPoolClass(String poolClass)
-   {
-      this.poolClass = poolClass;
-   }
-
-   public String getMaxSize()
-   {
-      return maxSize;
-   }
-
-   public void setMaxSize(String maxSize)
-   {
-      this.maxSize = maxSize;
-   }
-   
-   public String getTimeout()
-   {
-      return timeout;
-   }
-
-   public void setTimeout(String timeout)
-   {
-      this.timeout = timeout;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("poolClass=").append(poolClass);
-      sb.append(", maxSize=").append(maxSize);
-      sb.append(", timeout=").append(timeout);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/PoolConfig.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/PoolConfig.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Producer.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Producer.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Producer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,84 +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 org.jboss.ejb3.metamodel;
-
-import java.util.List;
-import java.util.ArrayList;
-
-import org.jboss.logging.Logger;
-
-/**
- * Represents a producer element of the jboss.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class Producer
-{
-   private static final Logger log = Logger.getLogger(Producer.class);
-
-   // jboss.xml
-   private String className;
-   private String connectionFactory;
-   private boolean local = false;
-   
-   public Producer(boolean local)
-   {
-      this.local = local;
-   }
-   
-   public boolean isLocal()
-   {
-      return local;
-   }
-
-   public String getClassName()
-   {
-      return className;
-   }
-
-   public void setClassName(String className)
-   {
-      this.className = className;
-   }
-   
-   public String getConnectionFactory()
-   {
-      return connectionFactory;
-   }
-
-   public void setConnectionFactory(String connectionFactory)
-   {
-      this.connectionFactory = connectionFactory;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append('[');
-      sb.append("className=").append(className);
-      sb.append(", connectionFactory=").append(connectionFactory);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Producer.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Producer.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Query.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Query.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Query.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,66 +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 org.jboss.ejb3.metamodel;
-
-/**
- * Represents an query element of the ejb-jar.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class Query
-{
-
-   private String ejbQl;
-
-   private QueryMethod queryMethod;
-
-   public String getEjbQl()
-   {
-      return ejbQl;
-   }
-
-   public void setEjbQl(String ejbQl)
-   {
-      this.ejbQl = ejbQl;
-   }
-
-   public QueryMethod getQueryMethod()
-   {
-      return queryMethod;
-   }
-
-   public void setQueryMethod(QueryMethod queryMethod)
-   {
-      this.queryMethod = queryMethod;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbQl=").append(ejbQl);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Query.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Query.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/QueryMethod.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/QueryMethod.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/QueryMethod.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,73 +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 org.jboss.ejb3.metamodel;
-
-import java.util.List;
-
-/**
- * Represents an query-method element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class QueryMethod
-{
-
-   private String methodName;
-
-   private List methodParams;
-
-   public String getMethodName()
-   {
-      return methodName;
-   }
-
-   public void setMethodName(String methodName)
-   {
-      this.methodName = methodName;
-   }
-
-   public List getMethodParams()
-   {
-      return methodParams;
-   }
-
-   public void setMethodParams(List methodParams)
-   {
-      this.methodParams = methodParams;
-   }
-
-   public void addMethodParam(String methodParam)
-   {
-      methodParams.add(methodParam);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("methodName=").append(methodName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/QueryMethod.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/QueryMethod.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RelationshipRoleSource.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/RelationshipRoleSource.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RelationshipRoleSource.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,54 +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 org.jboss.ejb3.metamodel;
-
-/**
- * Represents an ejb-relationship-role element of the ejb-jar.xml deployment
- * descriptor for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class RelationshipRoleSource
-{
-
-   private String ejbName;
-
-   public String getEjbName()
-   {
-      return ejbName;
-   }
-
-   public void setEjbName(String ejbName)
-   {
-      this.ejbName = ejbName;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbName=").append(ejbName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RelationshipRoleSource.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/RelationshipRoleSource.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Relationships.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Relationships.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Relationships.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,62 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents <relationships> elements of the ejb-jar.xml deployment descriptor for the 1.4
- * schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class Relationships
-{
-
-   private List ejbRelations = new ArrayList();
-
-   public List getEjbRelations()
-   {
-      return ejbRelations;
-   }
-
-   public void setEjbRelations(List ejbRelations)
-   {
-      this.ejbRelations = ejbRelations;
-   }
-
-   public void addEjbRelation(EjbRelation ejbRelation)
-   {
-      ejbRelations.add(ejbRelation);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbRelations=").append(ejbRelations);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Relationships.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Relationships.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoteBinding.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/RemoteBinding.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoteBinding.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,92 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents an <remote-binding> element of the jboss.xml deployment descriptor
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class RemoteBinding
-{
-   private String jndiName = null;
-   private String proxyFactory = null;
-   private String clientBindUrl = null;
-   private String interceptorStack = null;
-
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-   }
-   
-   public String getProxyFactory()
-   {
-      return proxyFactory;
-   }
-
-   public void setProxyFactory(String proxyFactory)
-   {
-      this.proxyFactory = proxyFactory;
-   }
-
-   public String getClientBindUrl()
-   {
-      return clientBindUrl;
-   }
-
-   public void setClientBindUrl(String clientBindUrl)
-   {
-      this.clientBindUrl = clientBindUrl;
-   }
-
-   public String getInterceptorStack()
-   {
-      return interceptorStack;
-   }
-
-   public void setInterceptorStack(String interceptorStack)
-   {
-      this.interceptorStack = interceptorStack;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("jndiName=").append(jndiName);
-      sb.append(", proxyFactory=").append(proxyFactory);
-      sb.append(", interceptorStack=").append(interceptorStack);
-      sb.append(", clientBindUrl=").append(clientBindUrl);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoteBinding.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/RemoteBinding.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveList.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveList.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveList.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,59 +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 org.jboss.ejb3.metamodel;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.logging.Logger;
-
-/**
- * Represents an <remove-list> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class RemoveList
-{
-   private static final Logger log = Logger.getLogger(RemoveList.class);
-
-   private List methods = new ArrayList();
-
-   public List getMethods()
-   {
-      return methods;
-   }
-
-   public void addMethod(Method method)
-   {
-      methods.add(method);
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("methods=").append(methods);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveList.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveList.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveMethod.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveMethod.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveMethod.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,66 +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 org.jboss.ejb3.metamodel;
-
-/**
- * Represents an <remove-list> element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class RemoveMethod
-{
-
-   private Method beanMethod;
-   private boolean retainIfException;
-
-   public Method getBeanMethod()
-   {
-      return beanMethod;
-   }
-
-   public void setBeanMethod(Method beanMethod)
-   {
-      this.beanMethod = beanMethod;
-   }
-
-   public boolean isRetainIfException()
-   {
-      return retainIfException;
-   }
-
-   public void setRetainIfException(boolean retainIfException)
-   {
-      this.retainIfException = retainIfException;
-   }
-
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("method=").append(beanMethod);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveMethod.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/RemoveMethod.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ResourceManager.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ResourceManager.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ResourceManager.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,55 +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 org.jboss.ejb3.metamodel;
-
-/**
- * Represents a resource-manager element of the jboss.xml deployment descriptor for
- * the 4.0 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class ResourceManager
-{
-   private String resourceName;
-   private String resourceJndiName;
-   
-   public String getResourceName()
-   {
-      return resourceName;
-   }
-   
-   public void setResourceName(String resourceName)
-   {
-      this.resourceName = resourceName;
-   }
-   
-   public String getResourceJndiName()
-   {
-      return resourceJndiName;
-   }
-   
-   public void setResourceJndiName(String resourceJndiName)
-   {
-      this.resourceJndiName = resourceJndiName;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/ResourceManager.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/ResourceManager.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SecurityIdentity.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/SecurityIdentity.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SecurityIdentity.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,92 +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 org.jboss.ejb3.metamodel;
-
-import org.jboss.metamodel.descriptor.RunAs;
-
-/**
- * Represents a <security-identity> element of the ejb-jar.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class SecurityIdentity
-{
-   private String id;
-
-   private boolean useCallerIdentity = false;
-
-   private RunAs runAs;
-
-   private String runAsPrincipal;
-
-   public String getId()
-   {
-      return id;
-   }
-
-   public void setId(String id)
-   {
-      this.id = id;
-   }
-
-   public boolean isUseCallerIdentity()
-   {
-      return useCallerIdentity;
-   }
-
-   public void setUseCallerIdentity(boolean useCallerIdentity)
-   {
-      this.useCallerIdentity = useCallerIdentity;
-   }
-
-   public RunAs getRunAs()
-   {
-      return runAs;
-   }
-
-   public void setRunAs(RunAs runAs)
-   {
-      this.runAs = runAs;
-   }
-
-   public String getRunAsPrincipal()
-   {
-      return runAsPrincipal;
-   }
-
-   public void setRunAsPrincipal(String runAsPrincipal)
-   {
-      this.runAsPrincipal = runAsPrincipal;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbName=").append(id);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SecurityIdentity.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/SecurityIdentity.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Service.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Service.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Service.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,67 +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 org.jboss.ejb3.metamodel;
-
-import org.jboss.logging.Logger;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45242 $</tt>
- */
-public class Service extends EnterpriseBean
-{
-   private static final Logger log = Logger.getLogger(Service.class);
-   
-   private String management = null;
-   private String objectName = null;
-   
-   public String getManagement()
-   {
-      return management;
-   }
-   
-   public void setManagement(String management)
-   {
-      this.management = management;
-   }
-   
-   public String getObjectName()
-   {
-      return objectName;
-   }
-   
-   public void setObjectName(String objectName)
-   {
-      this.objectName = objectName;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[Service:");
-      sb.append(super.toString());
-      sb.append(", management=" + management);
-      sb.append(", objectName=" + objectName);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/Service.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/Service.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,204 +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 org.jboss.ejb3.metamodel;
-
-import java.util.List;
-import java.util.ArrayList;
-import org.jboss.logging.Logger;
-
-import org.jboss.metamodel.descriptor.PersistenceUnitRef;
-
-/**
- * Represents a Session EJB element of the ejb-jar.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45712 $</tt>
- */
-public class SessionEnterpriseBean extends EnterpriseBean
-{
-   private static final Logger log = Logger
-           .getLogger(SessionEnterpriseBean.class);
-
-   public static final String STATELESS = "Stateless";
-
-   public static final String STATEFUL = "Stateful";
-
-   // ejb-jar.xml
-   private String sessionType = STATELESS;
-   private Method aroundInvoke;
-   private Method postConstruct;
-   private Method postActivate;
-   private Method preDestroy;
-   private Method prePassivate;
-   private List<RemoveMethod> removeMethods = new ArrayList<RemoveMethod>();
-   private List<InitMethod> initMethods = new ArrayList<InitMethod>();
-   
-   private String clustered = null;
-   private ClusterConfig clusterConfig = null;
-   private CacheConfig cacheConfig = null;
-   
-   private String concurrent = null;
-   
-   public CacheConfig getCacheConfig()
-   {
-      return cacheConfig;
-   }
-   
-   public void setCacheConfig(CacheConfig cacheConfig)
-   {
-      this.cacheConfig = cacheConfig;
-   }
-   
-   public String getConcurrent()
-   {
-      return concurrent;
-   }
-   
-   public void setConcurrent(String concurrent)
-   {
-      this.concurrent = concurrent;
-   }
-   
-   public String getClustered()
-   {
-      return clustered;
-   }
-   
-   public void setClustered(String clustered)
-   {
-      this.clustered = clustered;
-   }
-   
-   public ClusterConfig getClusterConfig()
-   {
-      return clusterConfig;
-   }
-   
-   public void setClusterConfig(ClusterConfig clusterConfig)
-   {
-      this.clusterConfig = clusterConfig;
-   }
-
-   public List<RemoveMethod> getRemoveMethods()
-   {
-      return removeMethods;
-   }
-   
-   public void addRemoveMethod(RemoveMethod method)
-   {
-      removeMethods.add(method);
-   }
-   
-   public List<InitMethod> getInitMethods()
-   {
-      return initMethods;
-   }
-   
-   public void addInitMethod(InitMethod method)
-   {
-      initMethods.add(method);
-   }
-
-   public boolean isStateless()
-   {
-      return sessionType.equals(STATELESS);
-   }
-
-   public boolean isStateful()
-   {
-      return sessionType.equals(STATEFUL);
-   }
-
-   public String getSessionType()
-   {
-      return sessionType;
-   }
-
-   public void setSessionType(String sessionType)
-   {
-      this.sessionType = sessionType;
-   }
-
-   public Method getAroundInvoke()
-   {
-      return aroundInvoke;
-   }
-
-   public void setAroundInvoke(Method aroundInvoke)
-   {
-      this.aroundInvoke = aroundInvoke;
-   }
-
-   public Method getPostActivate()
-   {
-      if (sessionType.equals(STATELESS)) return null;
-      return postActivate;
-   }
-
-   public void setPostActivate(Method postActivate)
-   {
-      this.postActivate = postActivate;
-   }
-
-   public Method getPostConstruct()
-   {
-      return postConstruct;
-   }
-
-   public void setPostConstruct(Method postConstruct)
-   {
-      this.postConstruct = postConstruct;
-   }
-
-   public Method getPreDestroy()
-   {
-      return preDestroy;
-   }
-
-   public void setPreDestroy(Method preDestroy)
-   {
-      this.preDestroy = preDestroy;
-   }
-
-   public Method getPrePassivate()
-   {
-      if (sessionType.equals(STATELESS)) return null;
-      return prePassivate;
-   }
-
-   public void setPrePassivate(Method prePassivate)
-   {
-      this.prePassivate = prePassivate;
-   }
-   
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append('[');
-      sb.append(super.toString());
-      sb.append(",");
-      sb.append("sessionType=").append(sessionType);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/XmlAnnotation.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/XmlAnnotation.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/XmlAnnotation.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,93 +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 org.jboss.ejb3.metamodel;
-
-import java.util.Collection;
-import java.util.HashSet;
-
-import org.jboss.metamodel.descriptor.InjectionTarget;
-import org.jboss.metamodel.descriptor.NameValuePair;
-
-
-/**
- * Represents an <annotation> element of the jboss.xml deployment descriptor
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- */
-public class XmlAnnotation
-{
-   private InjectionTarget injectionTarget = null;
-   private String annotationClass = null;
-   private String annotationImplementationClass = null;
-   private Collection<NameValuePair> properties = new HashSet<NameValuePair>();
-   
-   public Collection<NameValuePair> getProperties()
-   {
-      return properties;
-   }
-   
-   public void addProperty(NameValuePair property)
-   {
-      properties.add(property);
-   }
-
-   public String getAnnotationClass()
-   {
-      return annotationClass;
-   }
-
-   public void setAnnotationClass(String annotationClass)
-   {
-      this.annotationClass = annotationClass;
-   }
-   
-   public String getAnnotationImplementationClass()
-   {
-      return annotationImplementationClass;
-   }
-
-   public void setAnnotationImplementationClass(String annotationImplementationClass)
-   {
-      this.annotationImplementationClass = annotationImplementationClass;
-   }
-   
-   public InjectionTarget getInjectionTarget()
-   {
-      return injectionTarget;
-   }
-   
-   public void setInjectionTarget(InjectionTarget injectionTarget)
-   {
-      this.injectionTarget = injectionTarget;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("annotationClass=").append(annotationClass);
-      sb.append(", injectionTarget=").append(injectionTarget);
-      sb.append("]");
-      return sb.toString();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/metamodel/XmlAnnotation.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/metamodel/XmlAnnotation.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/naming)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/BrainlessContext.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/naming/BrainlessContext.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/BrainlessContext.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,183 +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 org.jboss.ejb3.naming;
-
-import javax.naming.*;
-import java.util.Hashtable;
-
-/**
- * A naming context which can't do anything.
- *
- * @author carlo
- */
-public class BrainlessContext implements Context
-{
-   public BrainlessContext()
-   {
-      super();
-   }
-
-   public Object lookup(Name name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Object lookup(String name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void bind(Name name, Object obj) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void bind(String name, Object obj) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void rebind(Name name, Object obj) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void rebind(String name, Object obj) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void unbind(Name name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void unbind(String name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void rename(Name oldName, Name newName) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void rename(String oldName, String newName) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public NamingEnumeration<NameClassPair> list(Name name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public NamingEnumeration<NameClassPair> list(String name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public NamingEnumeration<Binding> listBindings(Name name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public NamingEnumeration<Binding> listBindings(String name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void destroySubcontext(Name name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void destroySubcontext(String name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Context createSubcontext(Name name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Context createSubcontext(String name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Object lookupLink(Name name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Object lookupLink(String name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public NameParser getNameParser(Name name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public NameParser getNameParser(String name) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Name composeName(Name name, Name prefix) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public String composeName(String name, String prefix) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Object addToEnvironment(String propName, Object propVal) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Object removeFromEnvironment(String propName) throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public Hashtable<?, ?> getEnvironment() throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public void close() throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-
-   public String getNameInNamespace() throws NamingException
-   {
-      throw new OperationNotSupportedException();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/BrainlessContext.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/naming/BrainlessContext.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/naming/client)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/naming/client/java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/java/javaURLContextFactory.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/naming/client/java/javaURLContextFactory.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/java/javaURLContextFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,80 +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 org.jboss.ejb3.naming.client.java;
-
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.Name;
-import javax.naming.NameNotFoundException;
-import javax.naming.NameParser;
-import javax.naming.NamingException;
-import javax.naming.spi.ObjectFactory;
-
-import org.jboss.corba.ORBFactory;
-import org.jboss.ejb3.naming.BrainlessContext;
-import org.jboss.naming.client.java.HandleDelegateFactory;
-
-/**
- * Creates objects for in the java:comp namespace.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class javaURLContextFactory implements ObjectFactory
-{
-
-   /* (non-Javadoc)
-    * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
-    */
-   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)
-         throws Exception
-   {
-      if(nameCtx == null)
-         nameCtx = new InitialContext(environment); 
-      final Context lookupCtx = nameCtx;
-      return new BrainlessContext() 
-      {
-         @Override
-         public Object lookup(Name name) throws NamingException
-         {
-            if (name.size() > 0 && "java:comp".equals(name.get(0)))
-            {
-               if (name.size() == 2 && "ORB".equals(name.get(1)))
-                  return ORBFactory.getORB();
-               else if (name.size() == 2 && "HandleDelegate".equals(name.get(1)))
-                  return HandleDelegateFactory.getHandleDelegateSingleton();
-            }
-            throw new NameNotFoundException(name.toString());
-         }
-         
-         @Override
-         public Object lookup(String name) throws NamingException
-         {
-            NameParser parser = lookupCtx.getNameParser("");
-            return lookup(parser.parse(name));
-         }
-      };
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/naming/client/java/javaURLContextFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/naming/client/java/javaURLContextFactory.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/remoting/IsLocalInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/remoting/IsLocalInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/remoting/IsLocalInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,6 +22,8 @@
 package org.jboss.ejb3.remoting;
 
 import java.io.Serializable;
+import java.util.Map;
+
 import org.jboss.aop.Dispatcher;
 import org.jboss.aop.Advisor;
 import org.jboss.aop.advice.Interceptor;
@@ -39,6 +41,7 @@
 public class IsLocalInterceptor implements Interceptor, Serializable
 {
    public static final String IS_LOCAL = "IS_LOCAL";
+   public static final String IS_LOCAL_EXCEPTION = "IS_LOCAL_EXCEPTION";
    public String getName()
    {
       return getClass().getName();
@@ -50,11 +53,20 @@
       Container container = Ejb3Registry.getContainer(oid.toString());
       if (container != null)
       {
-         Invocation copy = (Invocation)new MarshalledObjectForLocalCalls(invocation).get();
+         Invocation copy = (Invocation) new MarshalledObjectForLocalCalls(invocation).get();
          copy.getMetaData().addMetaData(IS_LOCAL, IS_LOCAL, Boolean.TRUE);
-         org.jboss.aop.joinpoint.InvocationResponse response = ((Advisor)container).dynamicInvoke(null, copy);
+         org.jboss.aop.joinpoint.InvocationResponse response = ((Advisor) container).dynamicInvoke(null, copy);
+         Map contextInfo = response.getContextInfo();
+         if (contextInfo != null)
+         {
+            MarshalledObjectForLocalCalls wrappedException = (MarshalledObjectForLocalCalls) response.getContextInfo().get(IS_LOCAL_EXCEPTION);
+            if (wrappedException != null)
+            {
+               throw (Throwable) wrappedException.get();
+            }
+         }
          invocation.setResponseContextInfo(response.getContextInfo());
-         MarshalledObjectForLocalCalls wrapped = (MarshalledObjectForLocalCalls)response.getResponse();
+         MarshalledObjectForLocalCalls wrapped = (MarshalledObjectForLocalCalls) response.getResponse();
          Object rtn = null;
          if (wrapped != null)
          {
@@ -64,4 +76,5 @@
       }
       return invocation.invokeNext();
    }
+
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/Ejb3AuthenticationInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/Ejb3AuthenticationInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/Ejb3AuthenticationInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -25,6 +25,7 @@
 import java.security.Principal;
 import java.util.Set;
 import java.util.HashSet;
+import java.lang.reflect.Field;
 
 import javax.security.auth.Subject;
 
@@ -35,8 +36,10 @@
 import org.jboss.logging.Logger;
 
 import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.aop.joinpoint.MethodInvocation;
 
 import org.jboss.aspects.security.AuthenticationInterceptor;
+import org.jboss.aspects.security.SecurityContext;
 import org.jboss.security.AuthenticationManager;
 import org.jboss.security.RealmMapping;
 import org.jboss.security.RunAsIdentity;
@@ -50,12 +53,40 @@
  * @version $Revision$
  */
 public class Ejb3AuthenticationInterceptor extends AuthenticationInterceptor
-{
+{ 
    private static final Logger log = Logger.getLogger(Ejb3AuthenticationInterceptor.class);
 
    private EJBContainer container;
    protected RealmMapping realmMapping;
 
+
+   // this is needed because 4.0.5 exposes a getCurrentDomain() field
+   protected static Field currentDomainField;
+   static
+   {
+      try
+      {
+         currentDomainField = SecurityContext.class.getDeclaredField("currentDomain");
+      }
+      catch (NoSuchFieldException e)
+      {
+         throw new RuntimeException("Could not get SecuritContext.currentDomain field");
+      }
+
+   }
+
+   protected static ThreadLocal getCurrentDomain()
+   {
+      try
+      {
+         return (ThreadLocal)currentDomainField.get(null);
+      }
+      catch (IllegalAccessException e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
    public Ejb3AuthenticationInterceptor(AuthenticationManager manager, Container container)
    {
       super(manager);
@@ -68,5 +99,35 @@
       throw new EJBAccessException("Authentication failure", gse);
    }
 
+   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable
+   {
+      MethodInvocation mi = (MethodInvocation)invocation;
+      SecurityDomain domain = (SecurityDomain)container.resolveAnnotation(SecurityDomain.class);
+      
+      if (domain != null && domain.unauthenticatedPrincipal() != null && domain.unauthenticatedPrincipal().length() != 0)
+      {
+         Principal principal = (Principal)invocation.getMetaData("security", "principal");
+         if (principal == null)
+            principal = SecurityAssociation.getPrincipal();
+           
+         if (principal == null)
+         {
+            invocation.getMetaData().addMetaData("security", "principal", new SimplePrincipal(domain.unauthenticatedPrincipal()));
+            
+            Object oldDomain = getCurrentDomain().get();
+            
+            try
+            {
+               getCurrentDomain().set(authenticationManager);
+               return invocation.invokeNext();
+            }
+            finally
+            {
+               getCurrentDomain().set(oldDomain);
+            }
+         }
+      }
 
+      return super.invoke(invocation);
+   }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,6 +21,7 @@
   */
 package org.jboss.ejb3.security;
 
+import java.lang.reflect.Method;
 import java.util.HashSet;
 import java.util.Set;
 import javax.annotation.security.DenyAll;
@@ -28,6 +29,9 @@
 import javax.annotation.security.RolesAllowed;
 import javax.ejb.EJBAccessException;
 import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.ejb3.Container;
+import org.jboss.ejb3.EJBContainer;
 import org.jboss.logging.Logger;
 import org.jboss.security.AnybodyPrincipal;
 import org.jboss.security.AuthenticationManager;
@@ -47,25 +51,29 @@
 {
    private static final Logger log = Logger.getLogger(RoleBasedAuthorizationInterceptor.class);
    
-   public RoleBasedAuthorizationInterceptor(AuthenticationManager manager, RealmMapping realmMapping)
+   private EJBContainer container;
+   
+   public RoleBasedAuthorizationInterceptor(AuthenticationManager manager, RealmMapping realmMapping, Container container)
    {
       super(manager, realmMapping);
+      this.container = (EJBContainer)container;
    }
 
    protected Set getRoleSet(Invocation invocation)
    {
-      HashSet set = new HashSet();
+      Method method = ((MethodInvocation)invocation).getActualMethod();
 
       Class[] classes = new Class[]{DenyAll.class, PermitAll.class, RolesAllowed.class};
 
-      Object annotation = invocation.resolveAnnotation(classes);
+      Object annotation = container.resolveAnnotation(method, classes);
       
       int classIndex = 0;
       while (annotation == null && classIndex < 3)
       {
-         annotation = invocation.resolveClassAnnotation(classes[classIndex++]);
+         annotation = container.resolveAnnotation(classes[classIndex++]);
       }
-      
+         
+      HashSet set = new HashSet();
       if (annotation != null)
       {
          if (annotation instanceof DenyAll)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptorFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptorFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RoleBasedAuthorizationInterceptorFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -41,9 +41,9 @@
    public Object createPerClass(Advisor advisor)
    {
       Object domain = null;
+      Container container = (Container)advisor;
       try
       {
-         Container container = (Container)advisor;
          InitialContext ctx = container.getInitialContext();
          org.jboss.annotation.security.SecurityDomain securityAnnotation = (org.jboss.annotation.security.SecurityDomain) advisor.resolveAnnotation(org.jboss.annotation.security.SecurityDomain.class);
          domain = ctx.lookup("java:/jaas/" + securityAnnotation.value());
@@ -55,7 +55,7 @@
       AuthenticationManager manager = (AuthenticationManager) domain;
       RealmMapping mapping = (RealmMapping) domain;
       if (manager == null) throw new RuntimeException("Unable to find Security Domain");
-      return new RoleBasedAuthorizationInterceptor(manager, mapping);
+      return new RoleBasedAuthorizationInterceptor(manager, mapping, container);
    }
 
    public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -45,46 +45,22 @@
 public class RunAsSecurityInterceptor extends org.jboss.aspects.security.RunAsSecurityInterceptor
 {
    private static final Logger log = Logger.getLogger(RunAsSecurityInterceptor.class);
-   
-   public RunAsSecurityInterceptor(AuthenticationManager manager, RealmMapping realmMapping)
+   private RunAsIdentity runAsIdentity;
+
+   public RunAsSecurityInterceptor(AuthenticationManager manager, RealmMapping realmMapping, RunAsIdentity id)
    {
       super(manager, realmMapping);
+      this.runAsIdentity = id;
    }
-   
+
    protected RunAsIdentity getRunAsIdentity(Invocation invocation)
    {
-      RunAsIdentity runAsRole = null;
-      RunAs runAs = (RunAs) invocation.resolveClassAnnotation(RunAs.class);
-      if (runAs == null) return null;
-      Principal principal = SecurityAssociation.getPrincipal();
-      Set extraRoles = realmMapping.getUserRoles(principal);
-      if (extraRoles != null)
-      {
-         Iterator roles = extraRoles.iterator();
-         Set extraRoleNames = new HashSet();
-         while (roles.hasNext())
-         {
-            extraRoleNames.add( ((SimplePrincipal)roles.next()).getName());
-         }
-         if (principal == null)
-            runAsRole = new RunAsIdentity(runAs.value(), null, extraRoleNames);
-         else
-            runAsRole = new RunAsIdentity(runAs.value(), principal.getName(), extraRoleNames);
-      } else
-      {
-         runAsRole = new RunAsIdentity(runAs.value(), null);
-      }
-      
-      return runAsRole;
+      return runAsIdentity;
    }
-   
+
    public Object invoke(Invocation invocation) throws Throwable
    {
-      try 
-      {
-         return super.invoke(invocation);
-      } finally {
-      }
+      return super.invoke(invocation);
    }
 
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptorFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptorFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptorFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,30 +23,67 @@
 
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import javax.annotation.security.RunAs;
+
 import org.jboss.aop.Advisor;
 import org.jboss.aop.InstanceAdvisor;
 import org.jboss.aop.advice.AspectFactory;
 import org.jboss.aop.joinpoint.Joinpoint;
+import org.jboss.aop.joinpoint.Invocation;
 import org.jboss.logging.Logger;
 import org.jboss.security.AuthenticationManager;
 import org.jboss.security.RealmMapping;
+import org.jboss.security.RunAsIdentity;
+import org.jboss.security.SecurityAssociation;
 import org.jboss.ejb3.Container;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.tx.NullInterceptor;
+import org.jboss.annotation.security.RunAsPrincipal;
 
+import java.security.Principal;
+import java.util.Set;
+import java.util.Iterator;
+import java.util.HashSet;
+
 public class RunAsSecurityInterceptorFactory implements AspectFactory
 {
    private static final Logger log = Logger.getLogger(RunAsSecurityInterceptorFactory.class);
-   
+
    public Object createPerVM()
    {
       throw new RuntimeException("PER_VM not supported for this interceptor factory, only PER_CLASS");
    }
 
+
+   protected RunAsIdentity getRunAsIdentity(EJBContainer container)
+   {
+      RunAs runAs = (RunAs) container.resolveAnnotation(RunAs.class);
+      if (runAs == null) return null;
+      if (container.getXml() != null && container.getXml().getSecurityIdentity() != null)
+      {
+         if (container.getXml().getSecurityIdentity().isUseCallerIdentity()) return null;
+      }
+      RunAsPrincipal rap = (RunAsPrincipal) container.resolveAnnotation(RunAsPrincipal.class);
+      String runAsPrincipal = null;
+      if (rap != null) runAsPrincipal = rap.value();
+
+      HashSet extraRoles = new HashSet(); // todo get extra mapped roles.
+
+      return new RunAsIdentity(runAs.value(), runAsPrincipal, extraRoles);
+   }
+
+
    public Object createPerClass(Advisor advisor)
    {
       Object domain = null;
+      EJBContainer container = (EJBContainer)advisor;
+      RunAsIdentity runAsIdentity = getRunAsIdentity(container);
+      if (runAsIdentity == null)
+      {
+         return new NullInterceptor();
+      }
       try
       {
-         Container container = (Container)advisor;
          InitialContext ctx = container.getInitialContext();
          org.jboss.annotation.security.SecurityDomain securityAnnotation = (org.jboss.annotation.security.SecurityDomain) advisor.resolveAnnotation(org.jboss.annotation.security.SecurityDomain.class);
          domain = ctx.lookup("java:/jaas/" + securityAnnotation.value());
@@ -58,7 +95,7 @@
       AuthenticationManager manager = (AuthenticationManager) domain;
       RealmMapping mapping = (RealmMapping) domain;
       if (manager == null) throw new RuntimeException("Unable to find Security Domain");
-      return new RunAsSecurityInterceptor(manager, mapping);
+      return new RunAsSecurityInterceptor(manager, mapping, getRunAsIdentity(container));
    }
 
    public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/BaseServiceProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/BaseServiceProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/BaseServiceProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -45,6 +45,18 @@
    protected Container container;
    protected Advisor advisor;
 
+   public Object createHomeProxy()
+   {
+      throw new UnsupportedOperationException("service can't have a home interface");
+   }
+   
+   public Object createProxy(Object id)
+   {
+      if(id != null)
+         throw new IllegalArgumentException("service proxy must not have an id");
+      return createProxy();
+   }
+   
    public void start() throws Exception
    {
       initializeJndiName();
@@ -56,7 +68,7 @@
 
       try
       {
-         Util.bind(container.getInitialContext(), jndiName, createProxy());
+         Util.rebind(container.getInitialContext(), jndiName, createProxy());
       } catch (NamingException e)
       {
          NamingException namingException = new NamingException("Could not bind service proxy factory for EJB container with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + container.getInitialContext().getNameInNamespace() + "/" + jndiName);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/ServiceContainer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/ServiceContainer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/ServiceContainer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -18,11 +18,15 @@
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/ 
+*/
 package org.jboss.ejb3.service;
 
 import java.lang.reflect.Method;
 import java.util.Hashtable;
+
+import javax.ejb.EJBException;
+import javax.ejb.Handle;
+import javax.ejb.Timer;
 import javax.ejb.TimerService;
 import javax.management.Attribute;
 import javax.management.AttributeList;
@@ -33,33 +37,38 @@
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 import javax.management.ReflectionException;
+
 import org.jboss.annotation.ejb.Management;
 import org.jboss.annotation.ejb.Service;
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.MethodInfo;
 import org.jboss.aop.advice.Interceptor;
-import org.jboss.aop.annotation.AnnotationRepository;
 import org.jboss.aop.joinpoint.Invocation;
 import org.jboss.aop.joinpoint.InvocationResponse;
 import org.jboss.aop.joinpoint.MethodInvocation;
 import org.jboss.aop.util.MethodHashing;
 import org.jboss.aop.util.PayloadKey;
 import org.jboss.aspects.asynch.FutureHolder;
+import org.jboss.ejb.AllowedOperationsAssociation;
+import org.jboss.ejb.AllowedOperationsFlags;
 import org.jboss.ejb3.BeanContext;
 import org.jboss.ejb3.EJBContainerInvocation;
 import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.ProxyFactory;
 import org.jboss.ejb3.SessionContainer;
 import org.jboss.ejb3.ThreadLocalENCFactory;
 import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
-import org.jboss.ejb3.injection.Injector;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
+import org.jboss.ejb3.timerservice.TimedObjectInvoker;
+import org.jboss.ejb3.timerservice.TimerServiceFactory;
 import org.jboss.logging.Logger;
+import org.jboss.injection.Injector;
 
 /**
  * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
  * @version $Revision$
  */
-public class ServiceContainer extends SessionContainer
+public class ServiceContainer extends SessionContainer implements TimedObjectInvoker
 {
    ServiceMBeanDelegate delegate;
    Object singleton;
@@ -67,6 +76,7 @@
    BeanContext beanContext;
    MBeanServer mbeanServer;
    ObjectName delegateObjectName;
+   private TimerService timerService;
 
    private static final Logger log = Logger.getLogger(ServiceContainer.class);
 
@@ -78,17 +88,41 @@
       beanContextClass = ServiceBeanContext.class;
       this.mbeanServer = server;
    }
-   
-   public void setMbeanServer(MBeanServer server)
+
+   public void callTimeout(Timer timer) throws Exception
    {
-      this.mbeanServer = server;
+      Method timeout = callbackHandler.getTimeoutCallback();
+      if (timeout == null) throw new EJBException("No method has been annotated with @Timeout");
+      Object[] args = {timer};
+      AllowedOperationsAssociation.pushInMethodFlag(AllowedOperationsFlags.IN_EJB_TIMEOUT);
+      try
+      {
+         localInvoke(timeout, args);
+      }
+      catch(Throwable throwable)
+      {
+         if (throwable instanceof Exception) throw (Exception) throwable;
+         if(throwable instanceof Error) throw (Error) throwable;
+         throw new RuntimeException(throwable);
+      }
+      finally
+      {
+         AllowedOperationsAssociation.popInMethodFlag();
+      }
    }
 
+   protected Object createSession(Class initTypes[], Object initArgs[])
+   {
+//      if((initTypes != null && initTypes.length > 0) || (initArgs != null && initArgs.length > 0))
+//         throw new IllegalArgumentException("service bean create method must take no arguments");
+      throw new RuntimeException("NYI");
+   }
+
    public Object getSingleton()
    {
       return singleton;
    }
-   
+
    public void create() throws Exception
    {
       super.create();
@@ -98,28 +132,33 @@
    public void start() throws Exception
    {
       super.start();
-      
+
       try
-      {              
-         singleton = super.construct(); 
-                         
-         resolveInterceptorInjectors();
-         
+      {
+         singleton = super.construct();
+
          initBeanContext();
-         
+
+         // make sure the timer service is there before injection takes place
+         timerService = TimerServiceFactory.getInstance().createTimerService(this.getObjectName(), this);
+
          injectDependencies(beanContext);
+
+         registerManagementInterface();
          
-         registerManagementInterface();    
+         TimerServiceFactory.getInstance().restoreTimerService(timerService);
       }
       catch (Exception e)
       {
          e.printStackTrace();
          stop();
-      }     
+      }
    }
 
    public void stop() throws Exception
    {
+      if (timerService != null) TimerServiceFactory.getInstance().removeTimerService(timerService);
+
       super.stop();
 
       if (delegate != null)
@@ -128,7 +167,7 @@
       }
       injected = false;
    }
-   
+
    public void destroy() throws Exception
    {
       super.destroy();
@@ -141,9 +180,15 @@
 
    public TimerService getTimerService()
    {
-      throw new RuntimeException("TimerService not implemented for container");
+      return timerService;
    }
 
+   public TimerService getTimerService(Object pKey)
+   {
+      assert timerService != null : "Timer Service not yet initialized";
+      return timerService;
+   }
+   
    public void invokePostConstruct(BeanContext beanContext)
    {
       //Ignore
@@ -184,7 +229,7 @@
          {
             throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
          }
-         Interceptor[] aspects = info.interceptors;
+         Interceptor[] aspects = info.getInterceptors();
          EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects);
          nextInvocation.setAdvisor(this);
          nextInvocation.setArguments(args);
@@ -217,7 +262,7 @@
          {
             throw new RuntimeException("Could not resolve beanClass method from proxy call");
          }
-         Interceptor[] aspects = info.interceptors;
+         Interceptor[] aspects = info.getInterceptors();
          newSi = new EJBContainerInvocation(info, aspects);
          newSi.setArguments(si.getArguments());
          newSi.setMetaData(si.getMetaData());
@@ -225,7 +270,16 @@
 
          newSi = populateInvocation(newSi);
 
-         InvocationResponse response = SessionContainer.marshallResponse(invocation, newSi.invokeNext(), newSi.getResponseContextInfo());
+         Object rtn = null;
+         try
+         {
+            rtn = newSi.invokeNext();
+         }
+         catch (Throwable throwable)
+         {
+            return marshallException(invocation, throwable, newSi.getResponseContextInfo());
+         }
+         InvocationResponse response = SessionContainer.marshallResponse(invocation, rtn, newSi.getResponseContextInfo());
 
          return response;
       }
@@ -234,7 +288,7 @@
          Thread.currentThread().setContextClassLoader(oldLoader);
       }
    }
-   
+
    protected void initBeanContext() throws RuntimeException
    {
       if (beanContext == null)
@@ -263,6 +317,7 @@
       }
    }
 
+   @Override
    protected EJBContainerInvocation populateInvocation(EJBContainerInvocation invocation)
    {
       invocation.setTargetObject(singleton);
@@ -277,11 +332,11 @@
          try
          {
             ThreadLocalENCFactory.push(enc);
-         for (int i = 0; i < injectors.length; i++)
-         {
-            injectors[i].inject(ctx);
+            for (Injector injector : injectors)
+            {
+               injector.inject(ctx);
+            }
          }
-         }
          finally
          {
             ThreadLocalENCFactory.pop();
@@ -320,6 +375,11 @@
       return delegate.invoke(actionName, params, signature);
    }
 
+   @Override
+   protected Object invokeEJBObjectMethod(ProxyFactory factory, Object id, MethodInfo info, Object[] args) throws Exception
+   {
+      throw new RuntimeException("NYI");
+   }
 
    public MBeanInfo getMBeanInfo()
    {
@@ -353,8 +413,11 @@
          if (intf != null)
          {
             if (mbeanServer == null)
+               mbeanServer = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
+
+            if (mbeanServer == null)
                throw new RuntimeException("There is a @Management interface on " + ejbName + " but the MBeanServer has not been initialized for it");
-            
+
             Service service = (Service)resolveAnnotation(Service.class);
 
             String objname = service.objectName();
@@ -362,11 +425,11 @@
                             new ObjectName(getObjectName().getCanonicalName() + ",type=ManagementInterface") : new ObjectName(service.objectName());
 
             delegate = new ServiceMBeanDelegate(mbeanServer, this, intf, delegateObjectName);
-            
+
             Object securityDomainAnnotation = resolveAnnotation(org.jboss.annotation.security.SecurityDomain.class);
-                    
+
             getDeployment().getKernelAbstraction().installMBean(delegateObjectName, getDependencyPolicy(), delegate);
-          
+
          }
       }
       catch (Exception e)
@@ -375,4 +438,8 @@
       }
    }
 
+   protected void removeHandle(Handle handle)
+   {
+      throw new RuntimeException("Don't do this");
+   }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/ServiceRemoteProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/ServiceRemoteProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/service/ServiceRemoteProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -62,7 +62,7 @@
 
    public void start() throws Exception
    {
-      String clientBindUrl = binding.clientBindUrl();
+      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
       locator = new InvokerLocator(clientBindUrl);
       super.start();
    }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/session/BaseSessionProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/session/BaseSessionProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/session/BaseSessionProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -48,6 +48,11 @@
    protected Container container;
    protected Advisor advisor;
   
+   public Object createHomeProxy()
+   {
+      throw new RuntimeException("NYI");
+   }
+   
    public void setContainer(Container container)
    {
       this.container = container;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/BaseStatefulProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/BaseStatefulProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/BaseStatefulProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -73,7 +73,7 @@
       Reference ref = new Reference("java.lang.Object", refAddr, JndiProxyFactory.class.getName(), null);
       try 
       {
-         Util.bind(ctx, atom, ref);
+         Util.rebind(ctx, atom, ref);
       } catch (NamingException e)
       {
          NamingException namingException = new NamingException("Could not bind stateful proxy with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + ctx.getNameInNamespace() + "/" + atom);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -74,7 +74,6 @@
                   && ctx.getContainer().getObjectName().getCanonicalName()
                         .equals(containerId))
             {
-               parentRef = null;
                delegate = ctx;
                break;
             }
@@ -89,8 +88,12 @@
    {
       out.writeObject(oid);
       out.writeUTF(containerId);
-      out.writeObject(new StatefulBeanContextReference(getDelegate()
-            .getContainedIn()));
+      if(parentRef == null)
+      {
+         parentRef = new StatefulBeanContextReference(getDelegate()
+            .getContainedIn());
+      }
+      out.writeObject(parentRef);
    }
 
    public void readExternal(ObjectInput in) throws IOException,
@@ -101,15 +104,13 @@
       parentRef = (StatefulBeanContextReference) in.readObject();
    }
 
-   public void prePassivate()
-   {
-      // noop
-   }
+//   public void prePassivate()
+//   {
+//   }
 
-   public void postActivate()
-   {
-      // noop
-   }
+//   public void postActivate()
+//   {
+//   }
 
    public List<StatefulBeanContext> getContains()
    {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -180,7 +180,7 @@
 
    public void postActivate()
    {
-      // container.invokePostActivate(this); handled in getInstance()
+      getContainer().invokePostActivate(this); // handled in getInstance()
    }
 
    public void popContainedIn()
@@ -307,7 +307,7 @@
       if (bean == null)
       {
          extractBeanAndInterceptors();
-         getContainer().invokePostActivate(this);
+         // getContainer().invokePostActivate(this);
       }
       return bean;
    }
@@ -352,6 +352,7 @@
             }
          }
          contains = (List<StatefulBeanContext>) beanAndInterceptors[3];
+/* We should let pm to handle this.
          if (contains != null)
          {
             for (StatefulBeanContext ctx : contains)
@@ -359,6 +360,7 @@
                ctx.getContainer().invokePostActivate(ctx);
             }
          }
+*/
       }
       catch (IOException e)
       {
@@ -391,6 +393,7 @@
             beanAndInterceptors[2] = list;
          }
          beanAndInterceptors[3] = contains;
+/* Since replication also uses this. We c'ant call this directly. Let pm handle this.
          if (contains != null)
          {
             for (StatefulBeanContext ctx : contains)
@@ -398,6 +401,7 @@
                ctx.prePassivate();
             }
          }
+*/
          beanMO = new MarshalledObject(beanAndInterceptors);
          out.writeObject(beanMO);
       }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -82,7 +82,7 @@
 
    public void start() throws Exception
    {
-      String clientBindUrl = binding.clientBindUrl();
+      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
       locator = new InvokerLocator(clientBindUrl);
       Clustered clustered = (Clustered) advisor.resolveAnnotation(Clustered.class);
       if (clustered == null) throw new RuntimeException("Could not find @Clustered annotation.  Cannot deploy.");
@@ -103,10 +103,10 @@
       wrapper = new FamilyWrapper(proxyFamilyName, hatarget.getReplicants());
       super.start();
       Class[] interfaces = {ProxyFactory.class};
-      Object factoryProxy = Remoting.createPojiProxy(jndiName + PROXY_FACTORY_NAME, interfaces, binding.clientBindUrl());
+      Object factoryProxy = Remoting.createPojiProxy(jndiName + PROXY_FACTORY_NAME, interfaces, ProxyFactoryHelper.getClientBindUrl(binding));
       try
       {
-         Util.bind(container.getInitialContext(), jndiName + PROXY_FACTORY_NAME, factoryProxy);
+         Util.rebind(container.getInitialContext(), jndiName + PROXY_FACTORY_NAME, factoryProxy);
       } catch (NamingException e)
       {
          NamingException namingException = new NamingException("Could not bind stateful cluster proxy with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + container.getInitialContext().getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);
@@ -149,6 +149,11 @@
       }
    }
 
+   public Object createProxy(Object id)
+   {
+      throw new RuntimeException("NYI");
+   }
+   
    public void stop() throws Exception
    {
       super.stop();

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,19 +21,6 @@
 */
 package org.jboss.ejb3.stateful;
 
-import java.lang.reflect.Method;
-import java.util.Hashtable;
-import javax.ejb.EJBHome;
-import javax.ejb.EJBObject;
-import javax.ejb.Init;
-import javax.ejb.PostActivate;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.ejb.PrePassivate;
-import javax.ejb.Remote;
-import javax.ejb.TimerService;
-import javax.ejb.RemoteHome;
-
 import org.jboss.annotation.ejb.LocalBinding;
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.annotation.ejb.RemoteBindings;
@@ -48,15 +35,35 @@
 import org.jboss.ejb3.BeanContext;
 import org.jboss.ejb3.EJBContainerInvocation;
 import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.ProxyFactory;
+import org.jboss.ejb3.ProxyFactoryHelper;
 import org.jboss.ejb3.ProxyUtils;
 import org.jboss.ejb3.SessionContainer;
 import org.jboss.ejb3.ThreadLocalENCFactory;
 import org.jboss.ejb3.cache.StatefulCache;
+import org.jboss.injection.Injector;
+import org.jboss.injection.JndiFieldInjector;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
-import org.jboss.logging.Logger;
 import org.jboss.ejb3.proxy.EJBMetaDataImpl;
 import org.jboss.ejb3.proxy.handle.HomeHandleImpl;
+import org.jboss.logging.Logger;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.ejb.EJBHome;
+import javax.ejb.EJBObject;
+import javax.ejb.Handle;
+import javax.ejb.Init;
+import javax.ejb.PostActivate;
+import javax.ejb.PrePassivate;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.TimerService;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+import java.util.Map;
+
 /**
  * Comment
  *
@@ -139,7 +146,7 @@
          {
             throw new RuntimeException(
                     "Could not resolve beanClass method from proxy call: "
-                    + method.toString());
+                            + method.toString());
          }
          return invokeLocalHomeMethod(info, args);
       }
@@ -168,35 +175,37 @@
          {
             throw new RuntimeException(
                     "Could not resolve beanClass method from proxy call: "
-                    + method.toString());
+                            + method.toString());
          }
-          
-         if (info.unadvisedMethod != null)
-            invokedMethod.put(this, info.unadvisedMethod);
 
-         if (info.unadvisedMethod != null && isHomeMethod(info.unadvisedMethod))
+         Method unadvisedMethod = info.getUnadvisedMethod();
+
+         if (unadvisedMethod != null && isHomeMethod(unadvisedMethod))
          {
             return invokeLocalHomeMethod(info, args);
          }
-         else if (info.unadvisedMethod != null
-                  && isEJBObjectMethod(info.unadvisedMethod))
+         else if (unadvisedMethod != null
+                 && isEJBObjectMethod(unadvisedMethod))
          {
             return invokeEJBLocalObjectMethod(id, info, args);
          }
-         
-         if (info.unadvisedMethod != null)
-         {
-            invokedMethod.put(id, info.unadvisedMethod);
-         }
 
-         Interceptor[] aspects = info.interceptors;
+         Interceptor[] aspects = info.getInterceptors();
          StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(
                  info, aspects, id);
          nextInvocation.setAdvisor(this);
          nextInvocation.setArguments(args);
 
          ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
-         return nextInvocation.invokeNext();
+         try
+         {
+            invokedMethod.push(new InvokedMethod(true, method));
+            return nextInvocation.invokeNext();
+         }
+         finally
+         {
+            invokedMethod.pop();
+         }
       }
       finally
       {
@@ -247,6 +256,11 @@
       }
    }
 
+   protected void destroySession(Object id)
+   {
+      getCache().remove(id);
+   }
+
    /**
     * This should be a remote invocation call
     *
@@ -268,25 +282,26 @@
          {
             throw new RuntimeException("Could not resolve beanClass method from proxy call");
          }
-         
+
          InvocationResponse response = null;
-         if (info != null && info.unadvisedMethod != null && isHomeMethod(info.unadvisedMethod))
+         Method unadvisedMethod = info.getUnadvisedMethod();
+         if (info != null && unadvisedMethod != null && isHomeMethod(unadvisedMethod))
          {
             response = invokeHomeMethod(info, si);
          }
-         else if (info != null && info.unadvisedMethod != null && isEJBObjectMethod(info.unadvisedMethod))
+         else if (info != null && unadvisedMethod != null && isEJBObjectMethod(unadvisedMethod))
          {
             response = invokeEJBObjectMethod(info, si);
          }
          else
          {
-            Interceptor[] aspects = info.interceptors;
+            Interceptor[] aspects = info.getInterceptors();
             Object newId = null;
 
             if (si.getId() == null)
             {
                StatefulBeanContext ctx = getCache().create();
-               newId = ctx.getId();         
+               newId = ctx.getId();
             }
             else
             {
@@ -296,33 +311,33 @@
             newSi.setArguments(si.getArguments());
             newSi.setMetaData(si.getMetaData());
             newSi.setAdvisor(this);
-            
-            if (info.unadvisedMethod != null)
-            {
-               invokedMethod.put(newId, info.unadvisedMethod);
-            }
 
             Object rtn = null;
             try
             {
+               invokedMethod.push(new InvokedMethod(false, unadvisedMethod));
                rtn = newSi.invokeNext();
             }
             catch (Throwable throwable)
             {
+               Throwable exception = throwable;
                if (newId != null)
                {
-                  throw new ForwardId(throwable, newId);
+                  exception = new ForwardId(throwable, newId);
                }
-               else
-               {
-                  throw throwable;
-               }
+               Map responseContext = newSi.getResponseContextInfo();
+               response = marshallException(invocation, exception, responseContext);
+               return response;
             }
+            finally
+            {
+               invokedMethod.pop();
+            }
 
             response = marshallResponse(invocation, rtn, newSi.getResponseContextInfo());
             if (newId != null) response.addAttachment(StatefulConstants.NEW_ID, newId);
-         }        
-         
+         }
+
          return response;
       }
       finally
@@ -335,13 +350,29 @@
 
    public TimerService getTimerService()
    {
-      throw new RuntimeException(
-              "Illegal operation.  StrictlyPooledSessionBean beans can't access TimerService");
+      throw new UnsupportedOperationException("stateful bean doesn't support TimerService (EJB3 18.2#2)");
    }
 
+   public TimerService getTimerService(Object pKey)
+   {
+      return getTimerService();
+   }
+   
    @Override
    public void invokePostActivate(BeanContext beanContext)
    {
+      for (Injector injector : injectors)
+      {
+         if (injector instanceof JndiFieldInjector)
+         {
+            Field field = ((JndiFieldInjector) injector).getField();
+            if (field.isAnnotationPresent(javax.ejb.EJB.class))
+            {
+               continue; // skip nested EJB injection since the local proxy will be (de)serialized correctly
+            }
+            injector.inject(beanContext);
+         }
+      }
       callbackHandler.postActivate(beanContext);
    }
 
@@ -370,7 +401,7 @@
             if (methods[i].getParameterTypes().length == 0)
             {
                if ((methods[i].getAnnotation(Init.class) != null)
-                   || (resolveAnnotation(methods[i], Init.class) != null))
+                       || (resolveAnnotation(methods[i], Init.class) != null))
                {
                   methods[i].invoke(bean, new Object[0]);
                }
@@ -393,10 +424,10 @@
          for (int i = 0; i < methods.length; i++)
          {
             if ((methods[i].getAnnotation(Init.class) != null)
-                || (resolveAnnotation(methods[i], Init.class) != null))
+                    || (resolveAnnotation(methods[i], Init.class) != null))
             {
                Object[] parameters = getInitParameters(methods[i],
-                                                       initParameterTypes, initParameterValues);
+                       initParameterTypes, initParameterValues);
 
                if (parameters != null)
                   methods[i].invoke(bean, parameters);
@@ -419,7 +450,7 @@
             Class formal = method.getParameterTypes()[i];
             Class actual = initParameterTypes[i];
             if (!isMethodInvocationConvertible(formal, actual == null ? null
-                                                       : actual))
+                    : actual))
                return null;
          }
          return initParameterValues;
@@ -474,21 +505,21 @@
          if (formal == Byte.TYPE && actual == Byte.class)
             return true;
          if (formal == Short.TYPE
-             && (actual == Short.class || actual == Byte.class))
+                 && (actual == Short.class || actual == Byte.class))
             return true;
          if (formal == Integer.TYPE
-             && (actual == Integer.class || actual == Short.class || actual == Byte.class))
+                 && (actual == Integer.class || actual == Short.class || actual == Byte.class))
             return true;
          if (formal == Long.TYPE
-             && (actual == Long.class || actual == Integer.class
+                 && (actual == Long.class || actual == Integer.class
                  || actual == Short.class || actual == Byte.class))
             return true;
          if (formal == Float.TYPE
-             && (actual == Float.class || actual == Long.class
+                 && (actual == Float.class || actual == Long.class
                  || actual == Integer.class || actual == Short.class || actual == Byte.class))
             return true;
          if (formal == Double.TYPE
-             && (actual == Double.class || actual == Float.class
+                 && (actual == Double.class || actual == Float.class
                  || actual == Long.class || actual == Integer.class
                  || actual == Short.class || actual == Byte.class))
             return true;
@@ -499,27 +530,24 @@
    private Object invokeEJBLocalObjectMethod(Object id, MethodInfo info,
                                              Object[] args) throws Exception
    {
-      if (info.unadvisedMethod.getName().equals("remove"))
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if (unadvisedMethod.getName().equals("remove"))
       {
-         BeanContext ctx = getCache().get(id);
+         destroySession(id);
 
-         invokePreDestroy(ctx);
-
-         getCache().remove(id);
-
          return null;
       }
-      else if (info.unadvisedMethod.getName().equals("getEJBLocalHome"))
+      else if (unadvisedMethod.getName().equals("getEJBLocalHome"))
       {
          Object bean = getCache().get(id).getInstance();
 
          return bean;
       }
-      else if (info.unadvisedMethod.getName().equals("getPrimaryKey"))
+      else if (unadvisedMethod.getName().equals("getPrimaryKey"))
       {
          return id;
       }
-      else if (info.unadvisedMethod.getName().equals("isIdentical"))
+      else if (unadvisedMethod.getName().equals("isIdentical"))
       {
          EJBObject bean = (EJBObject) args[0];
 
@@ -538,15 +566,16 @@
    private Object invokeLocalHomeMethod(MethodInfo info, Object[] args)
            throws Exception
    {
-      if (info.unadvisedMethod.getName().equals("create"))
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if (unadvisedMethod.getName().equals("create"))
       {
          Class[] initParameterTypes =
                  {};
          Object[] initParameterValues =
                  {};
-         if (info.unadvisedMethod.getParameterTypes().length > 0)
+         if (unadvisedMethod.getParameterTypes().length > 0)
          {
-            initParameterTypes = info.unadvisedMethod.getParameterTypes();
+            initParameterTypes = unadvisedMethod.getParameterTypes();
             initParameterValues = args;
          }
 
@@ -558,20 +587,16 @@
          factory.init();
 
          Object proxy = factory.createProxy(initParameterTypes,
-                                            initParameterValues);
+                 initParameterValues);
 
          return proxy;
       }
-      else if (info.unadvisedMethod.getName().equals("remove"))
+      else if (unadvisedMethod.getName().equals("remove"))
       {
          StatefulHandleImpl handle = (StatefulHandleImpl) args[0];
 
-         BeanContext ctx = getCache().get(handle.id);
+         destroySession(handle.id);
 
-         invokePreDestroy(ctx);
-
-         getCache().remove(handle.id);
-
          return null;
       }
       else
@@ -583,15 +608,16 @@
    protected InvocationResponse invokeHomeMethod(MethodInfo info,
                                                  StatefulRemoteInvocation statefulInvocation) throws Throwable
    {
-      if (info.unadvisedMethod.getName().equals("create"))
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if (unadvisedMethod.getName().equals("create"))
       {
          Class[] initParameterTypes =
                  {};
          Object[] initParameterValues =
                  {};
-         if (info.unadvisedMethod.getParameterTypes().length > 0)
+         if (unadvisedMethod.getParameterTypes().length > 0)
          {
-            initParameterTypes = info.unadvisedMethod.getParameterTypes();
+            initParameterTypes = unadvisedMethod.getParameterTypes();
             initParameterValues = statefulInvocation.getArguments();
          }
 
@@ -620,25 +646,21 @@
          InvocationResponse response = marshallResponse(statefulInvocation, proxy, newStatefulInvocation.getResponseContextInfo());
          if (newStatefulInvocation.getId() != null)
             response.addAttachment(StatefulConstants.NEW_ID,
-                                   newStatefulInvocation.getId());
+                    newStatefulInvocation.getId());
          return response;
       }
-      else if (info.unadvisedMethod.getName().equals("remove"))
+      else if (unadvisedMethod.getName().equals("remove"))
       {
          StatefulHandleImpl handle = (StatefulHandleImpl) statefulInvocation
                  .getArguments()[0];
 
-         BeanContext ctx = getCache().get(handle.id);
+         destroySession(handle.id);
 
-         invokePreDestroy(ctx);
-
-         getCache().remove(handle.id);
-
          InvocationResponse response = new InvocationResponse(null);
          response.setContextInfo(statefulInvocation.getResponseContextInfo());
          return response;
       }
-      else if (info.unadvisedMethod.getName().equals("getEJBMetaData"))
+      else if (unadvisedMethod.getName().equals("getEJBMetaData"))
       {
          Class remote = null;
          Class home = null;
@@ -657,12 +679,12 @@
                     .jndiBinding());
 
          EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass,
-                                                        true, false, homeHandle);
+                 true, false, homeHandle);
 
          InvocationResponse response = marshallResponse(statefulInvocation, metadata, null);
          return response;
       }
-      else if (info.unadvisedMethod.getName().equals("getHomeHandle"))
+      else if (unadvisedMethod.getName().equals("getHomeHandle"))
       {
          HomeHandleImpl homeHandle = null;
 
@@ -684,7 +706,8 @@
    protected InvocationResponse invokeEJBObjectMethod(MethodInfo info,
                                                       StatefulRemoteInvocation statefulInvocation) throws Throwable
    {
-      if (info.unadvisedMethod.getName().equals("getHandle"))
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if (unadvisedMethod.getName().equals("getHandle"))
       {
          StatefulContainerInvocation newStatefulInvocation = buildInvocation(
                  info, statefulInvocation);
@@ -697,18 +720,14 @@
          InvocationResponse response = marshallResponse(statefulInvocation, handle, null);
          return response;
       }
-      else if (info.unadvisedMethod.getName().equals("remove"))
+      else if (unadvisedMethod.getName().equals("remove"))
       {
-         BeanContext ctx = getCache().get(statefulInvocation.getId());
+         destroySession(statefulInvocation.getId());
 
-         invokePreDestroy(ctx);
-
-         getCache().remove(statefulInvocation.getId());
-
          InvocationResponse response = new InvocationResponse(null);
          return response;
       }
-      else if (info.unadvisedMethod.getName().equals("getEJBHome"))
+      else if (unadvisedMethod.getName().equals("getEJBHome"))
       {
          HomeHandleImpl homeHandle = null;
 
@@ -722,14 +741,14 @@
          InvocationResponse response = marshallResponse(statefulInvocation, ejbHome, null);
          return response;
       }
-      else if (info.unadvisedMethod.getName().equals("getPrimaryKey"))
+      else if (unadvisedMethod.getName().equals("getPrimaryKey"))
       {
          Object id = statefulInvocation.getId();
 
          InvocationResponse response = marshallResponse(statefulInvocation, id, null);
          return response;
       }
-      else if (info.unadvisedMethod.getName().equals("isIdentical"))
+      else if (unadvisedMethod.getName().equals("isIdentical"))
       {
          Object id = statefulInvocation.getId();
          EJBObject bean = (EJBObject) statefulInvocation.getArguments()[0];
@@ -752,7 +771,7 @@
                                                           Class[] initParameterTypes, Object[] initParameterValues)
    {
       StatefulContainerInvocation newStatefulInvocation = null;
-      Interceptor[] aspects = info.interceptors;
+      Interceptor[] aspects = info.getInterceptors();
       Object newId = null;
 
       StatefulBeanContext ctx = null;
@@ -763,7 +782,7 @@
 
       newId = ctx.getId();
       newStatefulInvocation = new StatefulContainerInvocation(info, aspects,
-                                                              newId);
+              newId);
 
       newStatefulInvocation.setArguments(statefulInvocation.getArguments());
       newStatefulInvocation.setMetaData(statefulInvocation.getMetaData());
@@ -776,19 +795,19 @@
                                                        StatefulRemoteInvocation statefulInvocation)
    {
       StatefulContainerInvocation newStatefulInvocation = null;
-      Interceptor[] aspects = info.interceptors;
+      Interceptor[] aspects = info.getInterceptors();
       Object newId = null;
       if (statefulInvocation.getId() == null)
       {
          StatefulBeanContext ctx = getCache().create();
          newId = ctx.getId();
          newStatefulInvocation = new StatefulContainerInvocation(info, aspects,
-                                                                 newId);
+                 newId);
       }
       else
       {
          newStatefulInvocation = new StatefulContainerInvocation(info, aspects,
-                                                                 statefulInvocation.getId());
+                 statefulInvocation.getId());
       }
 
       newStatefulInvocation.setArguments(statefulInvocation.getArguments());
@@ -797,30 +816,66 @@
 
       return newStatefulInvocation;
    }
-   
-   public Object getInvokedBusinessInterface(BeanContext beanContext) throws IllegalStateException
+
+   @Override
+   public Object getBusinessObject(BeanContext beanContext, Class businessInterface) throws IllegalStateException
    {
-      Method method = (Method)invokedMethod.get(beanContext.getInvokedMethodKey());
-      
-      if (method == null)
-         throw new IllegalStateException("No invocation");
-      
-      return getInvokedInterface(method);
+      StatefulBeanContext ctx = (StatefulBeanContext) beanContext;
+
+      boolean isRemote = false;
+      boolean found = false;
+      Class[] remoteInterfaces = ProxyFactoryHelper.getRemoteInterfaces(this);
+      if (remoteInterfaces != null)
+      {
+         for (Class intf : remoteInterfaces)
+         {
+            if (intf.getName().equals(businessInterface.getName()))
+            {
+               isRemote = true;
+               found = true;
+               break;
+            }
+         }
+      }
+      if (found == false)
+      {
+         Class[] localInterfaces = ProxyFactoryHelper.getLocalInterfaces(this);
+         if (localInterfaces != null)
+         {
+            for (Class intf : remoteInterfaces)
+            {
+               if (intf.getName().equals(businessInterface.getName()))
+               {
+                  found = true;
+                  break;
+               }
+            }
+
+         }
+      }
+      if (found == false) throw new IllegalStateException(businessInterface.getName() + " is not a business interface");
+
+      for (ProxyFactory factory : proxyDeployer.getProxyFactories())
+      {
+         if (isRemote && factory instanceof StatefulRemoteProxyFactory)
+         {
+            return ((StatefulRemoteProxyFactory) factory).createProxy(ctx.getId());
+         }
+         else if (!isRemote && factory instanceof StatefulLocalProxyFactory)
+         {
+            return ((StatefulLocalProxyFactory) factory).createProxy(ctx.getId());
+         }
+      }
+      throw new IllegalStateException("Unable to create proxy for getBusinessObject as a proxy factory was not found");
    }
-   
-   public Object getBusinessObject(BeanContext beanContext, Class businessInterface) throws IllegalStateException
+
+   protected void removeHandle(Handle arg) throws Exception
    {
-      Method method = (Method)invokedMethod.get(beanContext.getInvokedMethodKey());
-      
-      if (method == null)
-         throw new IllegalStateException("No invocation");
-      
-      Object invokedInterface = getInvokedInterface(method);
-      
-      if (!invokedInterface.equals(businessInterface))
-         throw new IllegalStateException("Business interface " + businessInterface + " was not invoked interface");
-      
-      return invokedInterface;
+      /*
+      StatefulHandleImpl handle = (StatefulHandleImpl) arg;
+
+      destroySession(handle.id);
+      */
+      arg.getEJBObject().remove();
    }
-
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulInstanceInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulInstanceInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulInstanceInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,13 +22,15 @@
 package org.jboss.ejb3.stateful;
 
 import java.util.Iterator;
+import java.util.List;
 
 import java.rmi.RemoteException;
+
+import javax.ejb.ConcurrentAccessException;
 import javax.ejb.EJBException;
 import javax.ejb.ApplicationException;
 import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.dd.ApplicationExceptionList;
-import org.jboss.ejb3.dd.AssemblyDescriptor;
+import org.jboss.ejb3.metamodel.AssemblyDescriptor;
 import org.jboss.annotation.ejb.SerializedConcurrentAccess;
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.aop.joinpoint.Invocation;
@@ -68,7 +70,7 @@
       {
          synchronized (target)
          {
-            if (target.isInInvocation()) throw new EJBException("Application Error: no concurrent calls on stateful beans");
+            if (target.isInInvocation()) throw new ConcurrentAccessException("no concurrent calls on stateful bean '" + container.getName() + "' (EJB3 4.3.13)");
             target.setInInvocation(true);
          }
       }
@@ -103,7 +105,7 @@
       }
    }
    
-   public static boolean isApplicationException(Class exceptionClass, EJBContainer container)
+   public static boolean isApplicationException(Class<?> exceptionClass, EJBContainer container)
    {
       if (exceptionClass.isAnnotationPresent(ApplicationException.class))
          return true;
@@ -111,14 +113,14 @@
       AssemblyDescriptor assembly = container.getAssemblyDescriptor();
       if (assembly != null)
       {
-         ApplicationExceptionList exceptionList = assembly.getApplicationExceptionList();
-         if (exceptionList != null)
+         List exceptions = assembly.getApplicationExceptions();
+         if (exceptions.size() > 0)
          {
-            Iterator exceptionClasses = exceptionList.getClassList().iterator();
-            while (exceptionClasses.hasNext())
+            Iterator exceptionIterator = exceptions.iterator();
+            while (exceptionIterator.hasNext())
             {
-               String className = (String)exceptionClasses.next();
-               if (className.equals(exceptionClass.getName()))
+               org.jboss.ejb3.metamodel.ApplicationException exception = (org.jboss.ejb3.metamodel.ApplicationException)exceptionIterator.next();
+               if (exception.getExceptionClass().equals(exceptionClass.getName()))
                   return true;
             }
          }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -62,7 +62,7 @@
 
       try
       {
-         NonSerializableFactory.bind(container.getInitialContext(), jndiName + PROXY_FACTORY_NAME, this);
+         NonSerializableFactory.rebind(container.getInitialContext(), jndiName + PROXY_FACTORY_NAME, this);
       }
       catch (NamingException e)
       {
@@ -77,7 +77,7 @@
          Class[] interfaces = {localHome.value()};
          Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(container.getBeanClass().getClassLoader(),
                                                                      interfaces, new StatefulLocalHomeProxy(container));
-         NonSerializableFactory.bind(container.getInitialContext(), jndiName + "Home", homeProxy);
+         NonSerializableFactory.rebind(container.getInitialContext(), jndiName + "Home", homeProxy);
       }
    }
 
@@ -119,6 +119,31 @@
       }
    }
 
+   public Object createProxy(Object id)
+   {
+      try
+      {
+         StatefulContainer sfsb = (StatefulContainer) container;
+         Object[] args = {new StatefulLocalProxy(container, id)};
+         return proxyConstructor.newInstance(args);
+      }
+      catch (InstantiationException e)
+      {
+         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
+      }
+      catch (IllegalAccessException e)
+      {
+         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
+      }
+      catch (IllegalArgumentException e)
+      {
+         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
+      }
+      catch (InvocationTargetException e)
+      {
+         throw new RuntimeException(e.getTargetException());  //To change body of catch statement use Options | File Templates.
+      }
+   }
    public Object createProxy(Class[] initTypes, Object[] initValues)
    {
       try

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -77,7 +77,7 @@
    public void init() throws Exception
    {
       super.init();
-      String clientBindUrl = binding.clientBindUrl();
+      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
       locator = new InvokerLocator(clientBindUrl);
    }
 
@@ -87,10 +87,10 @@
 
       super.start();
       Class[] interfaces = {ProxyFactory.class};
-      Object factoryProxy = Remoting.createPojiProxy(jndiName + PROXY_FACTORY_NAME, interfaces, binding.clientBindUrl());
+      Object factoryProxy = Remoting.createPojiProxy(jndiName + PROXY_FACTORY_NAME, interfaces, ProxyFactoryHelper.getClientBindUrl(binding));
       try
       {
-         Util.bind(container.getInitialContext(), jndiName + PROXY_FACTORY_NAME, factoryProxy);
+         Util.rebind(container.getInitialContext(), jndiName + PROXY_FACTORY_NAME, factoryProxy);
       }
       catch (NamingException e)
       {
@@ -105,7 +105,7 @@
       if (remoteHome != null)
       {
          Object homeProxy = createHomeProxy(remoteHome.value());
-         Util.bind(container.getInitialContext(), jndiName + "Home", homeProxy);
+         Util.rebind(container.getInitialContext(), jndiName + "Home", homeProxy);
       }
    }
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -42,12 +42,12 @@
 
    public Object createPerClass(Advisor advisor)
    {
-      throw new IllegalStateException("PER_VM NOT APPLICABLE");
+      throw new IllegalStateException("PER_CLASS NOT APPLICABLE");
    }
 
    public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
    {
-      throw new IllegalStateException("PER_VM NOT APPLICABLE");
+      throw new IllegalStateException("PER_INSTANCE NOT APPLICABLE");
    }
 
    public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
@@ -58,7 +58,7 @@
 
    public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
    {
-      throw new IllegalStateException("PER_VM NOT APPLICABLE");
+      throw new IllegalStateException("PER_CLASS_JOINPOINT NOT APPLICABLE");
    }
 
    public String getName()

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -123,6 +123,8 @@
       }
       else
       {
+         // Release it properly.
+         StatefulBeanContext ctx = container.getCache().get(id);
          container.getCache().remove(id);
       }
    }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,8 +21,16 @@
   */
 package org.jboss.ejb3.stateless;
 
+import java.io.Serializable;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import javassist.util.proxy.MethodHandler;
+import javassist.util.proxy.ProxyObject;
+
 import javax.naming.Context;
 import javax.naming.NamingException;
 
@@ -42,32 +50,184 @@
 {
    private static final Logger log = Logger.getLogger(BaseStatelessProxyFactory.class);
 
-   protected Class proxyClass;
-   protected Constructor proxyConstructor;
+//   protected Class proxyClass;
+//   protected Constructor proxyConstructor;
    protected Context proxyFactoryContext;
    protected String jndiName;
+   
+   private javassist.util.proxy.ProxyFactory proxyFactory;
+   private Class proxyClass;
+   private Constructor proxyConstructor;
+   
+   /**
+    * Adapt the JDK to cglib.
+    * 
+    * This is a named class because it implements both InvocationHandler and Serializable.
+    */
+   /* TODO: fix EJBTHREE-485 without cglib 
+   private static class CGLibInvocationHandlerAdapter implements net.sf.cglib.proxy.InvocationHandler, Serializable
+   {
+      private static final long serialVersionUID = 1L;
 
+      private InvocationHandler delegate;
+      
+      private CGLibInvocationHandlerAdapter(InvocationHandler delegate)
+      {
+         if(delegate == null)
+            throw new IllegalArgumentException("delegate must not be null");
+         this.delegate = delegate;
+      }
+      
+      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+      {
+         return delegate.invoke(proxy, method, args);
+      }
+      
+   }
+   */
+   
+   /**
+    * Adapt the InvocationHandler to MethodHandler.
+    * 
+    * This is a named class because it implements both MethodHandler and Serializable.
+    */
+   private static class MethodHandlerAdapter implements MethodHandler, Serializable
+   {
+      private static final long serialVersionUID = 1L;
+      
+      private InvocationHandler delegate;
+      
+      private MethodHandlerAdapter(InvocationHandler delegate)
+      {
+         if(delegate == null)
+            throw new IllegalArgumentException("delegate must not be null");
+         this.delegate = delegate;
+      }
+      
+      public Object invoke(Object self, Method thisMethod, Method process, Object[] args) throws Throwable
+      {
+         return delegate.invoke(self, thisMethod, args);
+      }         
+   }
+   
+   /**
+    * Hide the fact that I'm now using javassist.
+    * 
+    * @param handler    a JDK proxy InvocationHandler
+    * @return           a true proxy
+    */
+   protected Object constructProxy(final InvocationHandler handler)
+   {
+      try
+      {
+         /* plain jdk */
+         Object args[] = { handler };
+         Object proxy = proxyConstructor.newInstance(args);
+         
+         /* javassist */
+         /*
+         MethodHandler realHandler = new MethodHandlerAdapter(handler);
+//         ProxyObject proxy = (ProxyObject) proxyConstructor.newInstance((Object[]) null);
+//         proxy.setHandler(realHandler);
+         JavassistProxy proxy = (JavassistProxy) proxyConstructor.newInstance((Object[]) null);
+         proxy.setMethodHandler(realHandler);
+         JavassistProxy.pokeInterfaces(proxy, getInterfaces());
+         */
+         
+         /* cglib */
+         /*
+         Object args[] = { new CGLibInvocationHandlerAdapter(handler) };
+         Object proxy = proxyConstructor.newInstance(args);
+         */
+         
+         return proxy;
+      }
+      catch (IllegalArgumentException e)
+      {
+         throw new RuntimeException(e);
+      }
+      catch (InstantiationException e)
+      {
+         throw new RuntimeException(e);
+      }
+      catch (IllegalAccessException e)
+      {
+         throw new RuntimeException(e);
+      }
+      catch (InvocationTargetException e)
+      {
+         throw new RuntimeException(e.getTargetException());
+      }
+   }
+   
+   public final Object createProxy(Object id)
+   {
+      assert id == null : "stateless bean must not have an id";
+      return createProxy();
+   }
+   
    public void init() throws Exception
    {
       initializeJndiName();
       Class[] interfaces = getInterfaces();
+      
+      /* plain jdk */
       Class proxyClass = java.lang.reflect.Proxy.getProxyClass(container.getBeanClass().getClassLoader(), interfaces);
       final Class[] constructorParams =
               {InvocationHandler.class};
       proxyConstructor = proxyClass.getConstructor(constructorParams);
+      
+      /* javassist */
+      /*
+      proxyFactory = new javassist.util.proxy.ProxyFactory()
+      {
+         @Override
+         protected ClassLoader getClassLoader()
+         {
+            return container.getBeanClass().getClassLoader();
+         }
+      };
+      proxyFactory.setInterfaces(interfaces);
+      proxyFactory.setSuperclass(JavassistProxy.class);
+      proxyClass = proxyFactory.createClass();
+      proxyConstructor = proxyClass.getConstructor((Class[]) null);
+      */
+      
+      /* cglib */
+      /*
+      proxyClass = net.sf.cglib.proxy.Proxy.getProxyClass(container.getBeanClass().getClassLoader(), interfaces);
+      final Class[] constructorParams = {net.sf.cglib.proxy.InvocationHandler.class};
+      proxyConstructor = proxyClass.getConstructor(constructorParams);
+      */
    }
 
+   /* for debugging purposes * /
+   private static void describeClass(Class cls) {
+      System.err.println("class " + cls + " has the following:");
+      for(Class i : cls.getInterfaces()) {
+         System.err.println("  interface: " + i);
+      }
+      for(Method m : cls.getDeclaredMethods()) {
+         System.err.println("  method: " + m);
+      }
+      System.err.println("  classloader = " + cls.getClassLoader());
+      if(cls.getSuperclass() != null)
+         describeClass(cls.getSuperclass());
+   }
+   */
+   
    public void start() throws Exception
    {
       init();
 
       Object proxy = createProxy();
+      //describeClass(proxy.getClass());
       try
       {
-         Util.bind(container.getInitialContext(), jndiName, proxy);
+         Util.rebind(container.getInitialContext(), jndiName, proxy);
       } catch (NamingException e)
       {
-         NamingException namingException = new NamingException("Could not bind statless proxy with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + container.getInitialContext().getNameInNamespace() + "/" + jndiName);
+         NamingException namingException = new NamingException("Could not bind stateless proxy with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + container.getInitialContext().getNameInNamespace() + "/" + jndiName);
          namingException.setRootCause(e);
          throw namingException;
       }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/JavassistProxy.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/stateless/JavassistProxy.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/JavassistProxyReplacement.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/stateless/JavassistProxyReplacement.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessClusterProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessClusterProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessClusterProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -75,7 +75,7 @@
 
    public void start() throws Exception
    {
-      String clientBindUrl = binding.clientBindUrl();
+      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
       locator = new InvokerLocator(clientBindUrl);
       Clustered clustered = (Clustered) advisor.resolveAnnotation(Clustered.class);
       if (clustered == null) throw new RuntimeException("Could not find @Clustered annotation.  Cannot deploy.");
@@ -106,7 +106,7 @@
 
    public Object createProxy()
    {
-      try
+//      try
       {
          Object containerId = container.getObjectName().getCanonicalName();
          String stackName = "ClusteredStatelessSessionClientInterceptors";
@@ -115,9 +115,13 @@
             stackName = binding.interceptorStack();
          }
          AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
+         /*
          Object[] args = {new StatelessClusteredProxy(containerId, stack.createInterceptors((Advisor) container, null), wrapper, lbPolicy)};
          return proxyConstructor.newInstance(args);
+         */
+         return constructProxy(new StatelessClusteredProxy(containerId, stack.createInterceptors((Advisor) container, null), wrapper, lbPolicy));
       }
+      /*
       catch (InstantiationException e)
       {
          throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
@@ -134,6 +138,7 @@
       {
          throw new RuntimeException(e.getTargetException());  //To change body of catch statement use Options | File Templates.
       }
+      */
    }
 
    protected StatelessHandleImpl getHandle()

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -18,16 +18,10 @@
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/ 
+*/
 package org.jboss.ejb3.stateless;
 
 
-import java.lang.reflect.Method;
-import java.util.Hashtable;
-import java.util.Map;
-import javax.ejb.EJBException;
-import javax.ejb.Timer;
-import javax.ejb.TimerService;
 import org.jboss.annotation.ejb.LocalBinding;
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.annotation.ejb.RemoteBindings;
@@ -41,18 +35,31 @@
 import org.jboss.aspects.asynch.FutureHolder;
 import org.jboss.ejb.AllowedOperationsAssociation;
 import org.jboss.ejb.AllowedOperationsFlags;
-import org.jboss.ejb.txtimer.TimedObjectInvoker;
 import org.jboss.ejb3.EJBContainerInvocation;
 import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.EjbTimerUtil;
+import org.jboss.ejb3.ProxyFactoryHelper;
 import org.jboss.ejb3.ProxyUtils;
 import org.jboss.ejb3.SessionContainer;
+import org.jboss.ejb3.BeanContext;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
+import org.jboss.ejb3.timerservice.TimedObjectInvoker;
+import org.jboss.ejb3.timerservice.TimerServiceFactory;
 import org.jboss.logging.Logger;
 import org.jboss.proxy.ejb.handle.HomeHandleImpl;
 import org.jboss.proxy.ejb.handle.StatelessHandleImpl;
+import org.jboss.injection.EncInjector;
 
+import javax.ejb.EJBException;
+import javax.ejb.Handle;
+import javax.ejb.Timer;
+import javax.ejb.TimerService;
+import javax.naming.NamingException;
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.HashMap;
 
+
 /**
  * Comment
  *
@@ -73,12 +80,24 @@
       beanContextClass = StatelessBeanContext.class;
    }
 
+   public Object createSession(Class initTypes[], Object initArgs[])
+   {
+      if((initTypes != null && initTypes.length > 0) || (initArgs != null && initArgs.length > 0))
+         throw new IllegalArgumentException("stateless bean create method must take no arguments (EJB3 4.5)");
+      // a stateless bean has no sessions
+      // TODO: pool stuff
+      return null;
+   }
+   
    public void start() throws Exception
    {
       try
       {
          super.start();
-         timerService = EjbTimerUtil.getTimerService(this, this);
+         //timerService = EjbTimerUtil.getTimerService(this, this);
+         timerService = TimerServiceFactory.getInstance().createTimerService(this.getObjectName(), this);
+         
+         TimerServiceFactory.getInstance().restoreTimerService(timerService);
       }
       catch (Exception e)
       {
@@ -96,7 +115,8 @@
 
    public void stop() throws Exception
    {
-      if (timerService != null) EjbTimerUtil.removeTimerService(this);
+      //if (timerService != null) EjbTimerUtil.removeTimerService(this);
+      if (timerService != null) TimerServiceFactory.getInstance().removeTimerService(timerService);
       super.stop();
    }
 
@@ -105,6 +125,12 @@
       return timerService;
    }
 
+   public TimerService getTimerService(Object pKey)
+   {
+      assert timerService != null : "Timer Service not yet initialized";
+      return timerService;
+   }
+   
    public void callTimeout(Timer timer) throws Exception
    {
       Method timeout = callbackHandler.getTimeoutCallback();
@@ -117,7 +143,7 @@
          try
          {
             MethodInfo info = (MethodInfo) methodInterceptors.get(callbackHandler.getTimeoutCalllbackHash());
-            Interceptor[] aspects = info.interceptors;
+            Interceptor[] aspects = info.getInterceptors();
             EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects);
             nextInvocation.setAdvisor(this);
             nextInvocation.setArguments(args);
@@ -163,22 +189,31 @@
          {
             throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
          }
-         
-         if (info.unadvisedMethod != null)
-            invokedMethod.put(this, info.unadvisedMethod);
 
-         if (info.unadvisedMethod != null && isHomeMethod(info.unadvisedMethod))
+         Method unadvisedMethod = info.getUnadvisedMethod();
+
+
+         try
          {
-            return invokeLocalHomeMethod(info, args);
-         }
+            invokedMethod.push(new InvokedMethod(true, unadvisedMethod));
 
-         Interceptor[] aspects = info.interceptors;
-         EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects);
-         nextInvocation.setAdvisor(this);
-         nextInvocation.setArguments(args);
+            if (unadvisedMethod != null && isHomeMethod(unadvisedMethod))
+            {
+               return invokeLocalHomeMethod(info, args);
+            }
 
-         ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
-         return nextInvocation.invokeNext();
+            Interceptor[] aspects = info.getInterceptors();
+            EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects);
+            nextInvocation.setAdvisor(this);
+            nextInvocation.setArguments(args);
+
+            ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
+            return nextInvocation.invokeNext();
+         }
+         finally
+         {
+            invokedMethod.pop();
+         }
       }
       finally
       {
@@ -198,36 +233,50 @@
          {
             throw new RuntimeException("Could not resolve beanClass method from proxy call");
          }
-         
-         if (info.unadvisedMethod != null)
-            invokedMethod.put(this, info.unadvisedMethod);
 
-         Map responseContext = null;
-         Object rtn = null;
-         if (info.unadvisedMethod != null && isHomeMethod(info.unadvisedMethod))
+         Method unadvisedMethod = info.getUnadvisedMethod();
+         try
          {
-            rtn = invokeHomeMethod(info, si);
+            invokedMethod.push(new InvokedMethod(false, unadvisedMethod));
+            Map responseContext = null;
+            Object rtn = null;
+            if (unadvisedMethod != null && isHomeMethod(unadvisedMethod))
+            {
+               rtn = invokeHomeMethod(info, si);
+            }
+            else if (info != null && unadvisedMethod != null && isEJBObjectMethod(unadvisedMethod))
+            {
+               rtn = invokeEJBObjectMethod(info, si);
+            }
+            else
+            {
+
+               EJBContainerInvocation newSi = null;
+               Interceptor[] aspects = info.getInterceptors();
+
+               newSi = new EJBContainerInvocation(info, aspects);
+               newSi.setArguments(si.getArguments());
+               newSi.setMetaData(si.getMetaData());
+               newSi.setAdvisor(this);
+               try
+               {
+                  rtn = newSi.invokeNext();
+                  responseContext = newSi.getResponseContextInfo();
+               }
+               catch (Throwable throwable)
+               {
+                  responseContext = newSi.getResponseContextInfo();
+                  return marshallException(invocation, throwable, responseContext);
+               }
+            }
+
+            InvocationResponse response = marshallResponse(invocation, rtn, responseContext);
+            return response;
          }
-         else if (info != null && info.unadvisedMethod != null && isEJBObjectMethod(info.unadvisedMethod))
+         finally
          {
-            rtn = invokeEJBObjectMethod(info, si);
+            invokedMethod.pop();
          }
-         else
-         {
-
-            EJBContainerInvocation newSi = null;
-            Interceptor[] aspects = info.interceptors;
-
-            newSi = new EJBContainerInvocation(info, aspects);
-            newSi.setArguments(si.getArguments());
-            newSi.setMetaData(si.getMetaData());
-            newSi.setAdvisor(this);
-            rtn = newSi.invokeNext();
-            responseContext = newSi.getResponseContextInfo();
-         }
-
-         InvocationResponse response = marshallResponse(invocation, rtn, responseContext);
-         return response;
       }
       finally
       {
@@ -238,7 +287,8 @@
 
    protected Object invokeEJBObjectMethod(MethodInfo info, MethodInvocation invocation) throws Throwable
    {
-      if (info.unadvisedMethod.getName().equals("getHandle"))
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if (unadvisedMethod.getName().equals("getHandle"))
       {
          StatelessHandleImpl handle = null;
          RemoteBinding remoteBindingAnnotation = (RemoteBinding) resolveAnnotation(RemoteBinding.class);
@@ -247,11 +297,11 @@
 
          return handle;
       }
-      else if (info.unadvisedMethod.getName().equals("remove"))
+      else if (unadvisedMethod.getName().equals("remove"))
       {
          return null;
       }
-      else if (info.unadvisedMethod.getName().equals("getEJBHome"))
+      else if (unadvisedMethod.getName().equals("getEJBHome"))
       {
          HomeHandleImpl homeHandle = null;
 
@@ -261,11 +311,11 @@
 
          return homeHandle.getEJBHome();
       }
-      else if (info.unadvisedMethod.getName().equals("getPrimaryKey"))
+      else if (unadvisedMethod.getName().equals("getPrimaryKey"))
       {
          return null;
       }
-      else if (info.unadvisedMethod.getName().equals("isIdentical"))
+      else if (unadvisedMethod.getName().equals("isIdentical"))
       {
          return false;
       }
@@ -277,7 +327,8 @@
 
    private Object invokeLocalHomeMethod(MethodInfo info, Object[] args) throws Exception
    {
-      if (info.unadvisedMethod.getName().equals("create"))
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if (unadvisedMethod.getName().equals("create"))
       {
          LocalBinding binding = (LocalBinding) resolveAnnotation(LocalBinding.class);
 
@@ -297,7 +348,8 @@
 
    protected Object invokeHomeMethod(MethodInfo info, MethodInvocation invocation) throws Throwable
    {
-      if (info.unadvisedMethod.getName().equals("create"))
+      Method unadvisedMethod = info.getUnadvisedMethod();
+      if (unadvisedMethod.getName().equals("create"))
       {
          RemoteBinding binding = null;
 
@@ -319,29 +371,24 @@
          return null;
       }
    }
-   
-   public Object getInvokedBusinessInterface(Object key) throws IllegalStateException
+
+   @Override
+   public Object getBusinessObject(BeanContext ctx, Class intf)
    {
-      Method method = (Method)invokedMethod.get(this);
-      
-      if (method == null)
-         throw new IllegalStateException("No invocation");
-      
-      return getInvokedInterface(method);
+      try
+      {
+         String jndiName = ProxyFactoryHelper.getJndiName(this, intf);
+         if (jndiName == null) throw new IllegalStateException("Cannot find BusinessObject for interface: " + intf.getName());
+         return getInitialContext().lookup(ProxyFactoryHelper.getJndiName(this, intf));
+      }
+      catch (NamingException e)
+      {
+         throw new RuntimeException("failed to invoke getBusinessObject", e);
+      }
    }
-   
-   public Object getBusinessObject(Object key, Class businessInterface) throws IllegalStateException
+
+   protected void removeHandle(Handle handle)
    {
-      Method method = (Method)invokedMethod.get(this);
-      
-      if (method == null)
-         throw new IllegalStateException("No invocation");
-      
-      Object invokedInterface = getInvokedInterface(method);
-      
-      if (!invokedInterface.equals(businessInterface))
-         throw new IllegalStateException("Business interface " + businessInterface + " was not invoked interface");
-      
-      return invokedInterface;
+      throw new RuntimeException("NYI");
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -68,7 +68,7 @@
          Class[] interfaces = {localHome.value()};
          Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(container.getBeanClass().getClassLoader(),
                                                                      interfaces, new StatelessLocalProxy(container));
-         NonSerializableFactory.bind(container.getInitialContext(), jndiName + "Home", homeProxy);
+         NonSerializableFactory.rebind(container.getInitialContext(), jndiName + "Home", homeProxy);
       }
    }
 
@@ -87,6 +87,7 @@
 
    public Object createProxy()
    {
+      /*
       try
       {
          Object[] args = {new StatelessLocalProxy(container)};
@@ -108,6 +109,8 @@
       {
          throw new RuntimeException(e.getTargetException());  //To change body of catch statement use Options | File Templates.
       }
+      */
+      return constructProxy(new StatelessLocalProxy(container));
    }
 
    protected StatelessHandleImpl getHandle()

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,6 @@
   */
 package org.jboss.ejb3.stateless;
 
-import java.lang.reflect.InvocationTargetException;
 import javax.ejb.RemoteHome;
 import javax.naming.NamingException;
 import org.jboss.annotation.ejb.RemoteBinding;
@@ -76,7 +75,7 @@
    public void init() throws Exception
    {
       super.init();
-      String clientBindUrl = binding.clientBindUrl();
+      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
       locator = new InvokerLocator(clientBindUrl);
    }
 
@@ -90,7 +89,7 @@
          Object homeProxy = createHomeProxy(remoteHome.value());
          try
          {
-            Util.bind(container.getInitialContext(), jndiName + "Home", homeProxy);
+            Util.rebind(container.getInitialContext(), jndiName + "Home", homeProxy);
          }
          catch (NamingException e)
          {
@@ -148,7 +147,7 @@
 
    public Object createProxy()
    {
-      try
+//      try
       {
          Object containerId = container.getObjectName().getCanonicalName();
          ;
@@ -160,9 +159,13 @@
          AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
          StatelessRemoteProxy proxy = new StatelessRemoteProxy(containerId, stack.createInterceptors((Advisor) container, null), locator);
          setEjb21Objects(proxy);
+         /*
          Object[] args = {proxy};
          return proxyConstructor.newInstance(args);
+         */
+         return constructProxy(proxy);
       }
+      /*
       catch (InstantiationException e)
       {
          throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
@@ -179,6 +182,7 @@
       {
          throw new RuntimeException(e.getTargetException());  //To change body of catch statement use Options | File Templates.
       }
+      */
    }
 
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimedObjectInvoker.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/TimedObjectInvoker.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimedObjectInvoker.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,47 +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 org.jboss.ejb3.timerservice;
-
-// $Id: TimedObjectInvoker.java,v 1.1 2006/06/07 09:26:15 wolfc Exp $
-
-import javax.ejb.Timer;
-
-/**
- * An implementation can invoke the ejbTimeout method on a TimedObject.
- *
- * The TimedObjectInvoker has knowledge of the TimedObjectId, it
- * knows which object to invoke.
- *
- * @author Thomas.Diesler at jboss.org
- * @version $Revision: 1.1 $
- * @since 07-Apr-2004
- */
-public interface TimedObjectInvoker extends org.jboss.ejb.txtimer.TimedObjectInvoker
-{
-   /**
-    * Invokes the ejbTimeout method on the TimedObject with the given id.
-    *
-    * @param timer the Timer that is passed to ejbTimeout
-    */
-   void callTimeout(Timer timer) throws Exception;
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimedObjectInvoker.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/TimedObjectInvoker.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimerServiceFactory.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/TimerServiceFactory.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimerServiceFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,87 +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 org.jboss.ejb3.timerservice;
-
-import javax.ejb.EJBException;
-import javax.ejb.TimerService;
-import javax.management.ObjectName;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public abstract class TimerServiceFactory
-{
-   private static TimerServiceFactory instance;
-   
-   private synchronized static TimerServiceFactory createInstance()
-   {
-      if(instance != null)
-         return instance;
-      
-      String factoryClass = "org.jboss.ejb3.timerservice.jboss.JBossTimerServiceFactory";
-      factoryClass = System.getProperty("org.jboss.ejb3.timerservice.factory", factoryClass);
-      
-      try
-      {
-         Class cls = Class.forName(factoryClass);
-         instance = (TimerServiceFactory) cls.newInstance();
-         
-         return instance;
-      }
-      catch(ClassNotFoundException e)
-      {
-         throw new EJBException(e);
-      }
-      catch(InstantiationException e)
-      {
-         throw new EJBException(e);
-      }
-      catch(IllegalAccessException e)
-      {
-         throw new EJBException(e);
-      }
-   }
-   
-   public abstract TimerService createTimerService(ObjectName objectName, TimedObjectInvoker invoker);
-   
-   public static TimerServiceFactory getInstance()
-   {
-      if(instance == null)
-      {
-         createInstance();
-      }
-      
-      return instance;
-   }
-   
-   public abstract void removeTimerService(TimerService timerService);
-   
-   /**
-    * Restores the timers held with the specified timer service.
-    * 
-    * @param timerService
-    */
-   public abstract void restoreTimerService(TimerService timerService);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/TimerServiceFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/TimerServiceFactory.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/jboss)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/JBossTimerServiceFactory.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/JBossTimerServiceFactory.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/JBossTimerServiceFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,122 +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 org.jboss.ejb3.timerservice.jboss;
-
-import javax.ejb.TimerService;
-import javax.management.ObjectName;
-
-import org.jboss.ejb.txtimer.EJBTimerService;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.timerservice.TimedObjectInvoker;
-import org.jboss.ejb3.timerservice.TimerServiceFactory;
-import org.jboss.logging.Logger;
-import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.mx.util.MBeanServerLocator;
-
-/**
- * Factory to create timer services which use the JBoss EJB Timer Service.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class JBossTimerServiceFactory extends TimerServiceFactory
-{
-   private static Logger log = Logger.getLogger(JBossTimerServiceFactory.class);
-   
-   /* (non-Javadoc)
-    * @see org.jboss.ejb3.timerservice.TimerServiceFactory#createTimerService(javax.management.ObjectName, org.jboss.ejb3.timerservice.TimedObjectInvoker)
-    */
-   @Override
-   public TimerService createTimerService(ObjectName containerId, TimedObjectInvoker invoker)
-   {
-      TimerService timerService = null;
-      try
-      {
-         EJBTimerService service = getEJBTimerService();
-         TimerService delegate = service.createTimerService(containerId, null, invoker);
-         timerService = new TimerServiceFacade(containerId, delegate);
-      }
-      catch (Exception e)
-      {
-         //throw new EJBException("Could not create timer service", e);
-         if (log.isTraceEnabled())
-         {
-            log.trace("Unable to initialize timer service", e);
-         }
-         else
-         {
-            log.trace("Unable to initialize timer service");
-         }
-      }
-      return timerService;
-   }
-
-   protected EJBTimerService getEJBTimerService()
-   {
-      return (EJBTimerService) MBeanProxyExt.create(EJBTimerService.class, EJBTimerService.OBJECT_NAME, MBeanServerLocator.locateJBoss());
-   }
-   
-   /* (non-Javadoc)
-    * @see org.jboss.ejb3.timerservice.TimerServiceFactory#removeTimerService(javax.ejb.TimerService)
-    */
-   @Override
-   public void removeTimerService(TimerService timerService)
-   {
-      removeTimerService(((TimerServiceFacade) timerService).getContainerId());
-   }
-
-   protected void removeTimerService(ObjectName containerId)
-   {
-      try
-      {
-         EJBTimerService service = getEJBTimerService();
-         service.removeTimerService(containerId, true);
-      }
-      catch (Exception e)
-      {
-         //throw new EJBException("Could not remove timer service", e);
-         if (log.isTraceEnabled())
-         {
-            log.trace("Unable to initialize timer service", e);
-         }
-         else
-         {
-            log.trace("Unable to initialize timer service");
-         }
-      }
-   }
-   
-   public void restoreTimerService(TimerService aTimerService)
-   {
-      if (aTimerService == null)
-      {
-         log.warn("TIMER SERVICE IS NOT INSTALLED");
-         return;
-      }
-      TimerServiceFacade timerService = (TimerServiceFacade) aTimerService;
-      EJBContainer container = timerService.getContainer();
-      // FIXME: do not assume that a TimedObjectInvoker is an EJBContainer
-      ClassLoader loader = container.getClassloader();
-      
-      getEJBTimerService().restoreTimers(timerService.getContainerId(), loader);
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/JBossTimerServiceFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/JBossTimerServiceFactory.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/TimerServiceFacade.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/TimerServiceFacade.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/TimerServiceFacade.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,88 +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 org.jboss.ejb3.timerservice.jboss;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Date;
-
-import javax.ejb.EJBException;
-import javax.ejb.Timer;
-import javax.ejb.TimerService;
-import javax.management.ObjectName;
-
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Registry;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class TimerServiceFacade implements TimerService
-{
-   private TimerService delegate;
-   
-   private ObjectName containerId;
-   
-   protected TimerServiceFacade(ObjectName containerId, TimerService delegate)
-   {
-      this.containerId = containerId;
-      this.delegate = delegate;
-   }
-
-   public Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException
-   {
-      return delegate.createTimer(initialExpiration, intervalDuration, info);
-   }
-
-   public Timer createTimer(Date expiration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException
-   {
-      return delegate.createTimer(expiration, info);
-   }
-
-   public Timer createTimer(long initialDuration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException
-   {
-      return delegate.createTimer(initialDuration, intervalDuration, info);
-   }
-
-   public Timer createTimer(long duration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException
-   {
-      return delegate.createTimer(duration, info);
-   }
-
-   protected EJBContainer getContainer()
-   {
-      return (EJBContainer) Ejb3Registry.getContainer(getContainerId().getCanonicalName());
-   }
-   
-   protected ObjectName getContainerId()
-   {
-      return containerId;
-   }
-   
-   public Collection getTimers() throws IllegalStateException, EJBException
-   {
-      return delegate.getTimers();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/TimerServiceFacade.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/jboss/TimerServiceFacade.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/package.html
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/package.html	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/package.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1 +0,0 @@
-This package forms the bridge between EJB3 and a timer service.
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/package.html (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/package.html)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/PersistentTimer.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/PersistentTimer.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/PersistentTimer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,96 +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 org.jboss.ejb3.timerservice.quartz;
-
-import java.io.Serializable;
-
-import javax.ejb.EJBException;
-import javax.ejb.NoSuchObjectLocalException;
-import javax.ejb.Timer;
-import javax.ejb.TimerHandle;
-import javax.management.ObjectName;
-
-import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.timerservice.TimedObjectInvoker;
-import org.jboss.logging.Logger;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.Trigger;
-
-/**
- * This class contains all the info for find a persistent timer.
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 56169 $
- */
-public class PersistentTimer implements Serializable, TimerHandle
-{
-   private static final Logger log = Logger.getLogger(PersistentTimer.class);
-   
-   private static final long serialVersionUID = 1L;
-
-   //private String schedulerName;
-   //private String jobName;
-   //private String jobGroup;
-   private String triggerName;
-   private String triggerGroup;
-   private ObjectName objectName;
-   
-   private Serializable info;
-   
-   protected PersistentTimer(Trigger trigger, ObjectName objectName, Serializable info)
-   {
-      assert trigger != null;
-      assert objectName != null;
-      
-      this.triggerName = trigger.getName();
-      this.triggerGroup = trigger.getGroup();
-      this.objectName = objectName;
-      this.info = info;
-   }
-   
-   protected TimedObjectInvoker getTimedObjectInvoker()
-   {
-      // TODO: a hack to get back the container. This needs thinking.
-      TimedObjectInvoker invoker = (TimedObjectInvoker) Ejb3Registry.getContainer(objectName.getCanonicalName());
-      assert invoker != null;
-      return invoker;
-   }
-   
-   public Timer getTimer() throws IllegalStateException, NoSuchObjectLocalException, EJBException
-   {
-      // TODO: check state
-      try
-      {
-         Scheduler scheduler = QuartzTimerServiceFactory.getScheduler();
-         Trigger trigger = scheduler.getTrigger(triggerName, triggerGroup);
-         if(trigger == null)
-            throw new NoSuchObjectLocalException("can't find trigger '" + triggerName + "' in group '" + triggerGroup + "'");
-         return new TimerImpl(scheduler, trigger, info);
-      }
-      catch(SchedulerException e)
-      {
-         log.error("getTimer failed", e);
-         throw new EJBException(e);
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/PersistentTimer.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/PersistentTimer.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerJob.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerJob.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerJob.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,48 +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 org.jboss.ejb3.timerservice.quartz;
-
-import org.jboss.ejb3.timerservice.TimedObjectInvoker;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 56169 $
- */
-public class QuartzTimerJob implements Job
-{
-   public void execute(JobExecutionContext context) throws JobExecutionException
-   {
-      PersistentTimer timer = (PersistentTimer) context.getJobDetail().getJobDataMap().get("timer");
-      TimedObjectInvoker invoker = timer.getTimedObjectInvoker();
-      try {
-         invoker.callTimeout(timer.getTimer());
-      }
-      catch(Exception e) {
-         throw new JobExecutionException(e);
-      }
-   }  
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerJob.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerJob.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerServiceFactory.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerServiceFactory.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerServiceFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,274 +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 org.jboss.ejb3.timerservice.quartz;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-import java.util.Properties;
-
-import javax.ejb.TimerService;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.SystemException;
-import javax.transaction.TransactionManager;
-
-import org.jboss.ejb3.timerservice.TimedObjectInvoker;
-import org.jboss.ejb3.timerservice.TimerServiceFactory;
-import org.jboss.logging.Logger;
-import org.jboss.tm.TransactionManagerService;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerFactory;
-import org.quartz.impl.StdSchedulerFactory;
-import org.quartz.utils.DBConnectionManager;
-import org.quartz.utils.JNDIConnectionProvider;
-
-/**
- * Creates timer service objects for use in EJB3 containers. For this
- * two methods are provided: createTimerService and removeTimerService.
- * 
- * The factory can be started and stopped within both an embedded and full stack.
- * 
- * For now only one scheduler is supported. Each bean container has its own
- * job and trigger group within Quartz.
- * 
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 56116 $
- */
-public class QuartzTimerServiceFactory extends TimerServiceFactory
-{
-   @SuppressWarnings("unused")
-   private static final Logger log = Logger.getLogger(QuartzTimerServiceFactory.class);
-   
-   private TransactionManager tm;
-   
-   private static Scheduler scheduler;
-   
-   private Properties properties;
-   
-   /**
-    * Contains the sql statements to create the database schema.
-    */
-   private Properties sqlProperties;
-   
-   private void createSchema()
-   {
-      try
-      {
-         tm.begin();
-         try
-         {
-            Connection conn = getConnection();
-            try
-            {
-               boolean success = execute(conn, "CREATE_TABLE_JOB_DETAILS");
-               if(success)
-               {
-                  execute(conn, "CREATE_TABLE_JOB_LISTENERS");
-                  execute(conn, "CREATE_TABLE_TRIGGERS");
-                  execute(conn, "CREATE_TABLE_SIMPLE_TRIGGERS");
-                  execute(conn, "CREATE_TABLE_CRON_TRIGGERS");
-                  execute(conn, "CREATE_TABLE_BLOB_TRIGGERS");
-                  execute(conn, "CREATE_TABLE_TRIGGER_LISTENERS");
-                  execute(conn, "CREATE_TABLE_CALENDARS");
-                  execute(conn, "CREATE_TABLE_PAUSED_TRIGGER_GRPS");
-                  execute(conn, "CREATE_TABLE_FIRED_TRIGGERS");
-                  execute(conn, "CREATE_TABLE_SCHEDULER_STATE");
-                  execute(conn, "CREATE_TABLE_LOCKS");
-                  
-                  execute(conn, "INSERT_TRIGGER_ACCESS");
-                  execute(conn, "INSERT_JOB_ACCESS");
-                  execute(conn, "INSERT_CALENDAR_ACCESS");
-                  execute(conn, "INSERT_STATE_ACCESS");
-                  execute(conn, "INSERT_MISFIRE_ACCESS");
-               }
-            }
-            finally
-            {
-               conn.close();
-            }
-            tm.commit();
-         }
-         catch(SQLException e)
-         {
-            throw new RuntimeException(e);
-         }
-         catch (RollbackException e)
-         {
-            throw new RuntimeException(e);
-         }
-         catch (HeuristicMixedException e)
-         {
-            throw new RuntimeException(e);
-         }
-         catch (HeuristicRollbackException e)
-         {
-            throw new RuntimeException(e);
-         }
-         finally
-         {
-            if(tm.getStatus() == Status.STATUS_ACTIVE)
-               tm.rollback();
-         }
-      }
-      catch(SystemException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (NotSupportedException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   /**
-    * Create a TimerService for use in a bean container.
-    * 
-    * @param objectName the name of the bean container
-    * @param invoker    the invoker to call on timeouts
-    * @return           an EJB TimerService
-    */
-   public TimerService createTimerService(ObjectName objectName, TimedObjectInvoker invoker)
-   {
-      Scheduler scheduler = getScheduler();
-      if (scheduler == null) return null;
-      
-      return new TimerServiceImpl(scheduler, objectName, invoker);
-   }
-   
-   private boolean execute(Connection conn, String stmtName) throws SQLException
-   {
-      String sql = sqlProperties.getProperty(stmtName);
-      if(sql == null)
-         throw new IllegalStateException("No sql set for '" + stmtName + "'");
-      
-      PreparedStatement stmt = conn.prepareStatement(sql);
-      try
-      {
-         stmt.execute();
-         return true;
-      }
-      catch(SQLException e)
-      {
-         log.warn("sql failed: " + sql);
-         if(log.isDebugEnabled())
-            log.debug("sql failed: " + sql, e);
-         return false;
-      }
-      finally
-      {
-         stmt.close();
-      }
-   }
-   
-   private Connection getConnection() throws SQLException
-   {
-      return DBConnectionManager.getInstance().getConnection("myDS");
-   }
-   
-   /**
-    * @return   the scheduler for package use
-    */
-   protected static Scheduler getScheduler()
-   {
-      if(scheduler == null)
-      {
-         return null;
-         //throw new IllegalStateException("TimerServiceFactory hasn't been started yet");
-      }
-      
-      return scheduler;
-   }
-   
-   public void removeTimerService(TimerService aTimerService)
-   {
-      TimerServiceImpl timerService = (TimerServiceImpl) aTimerService;
-      timerService.shutdown();
-   }
-   
-   public void restoreTimerService(TimerService aTimerService)
-   {
-      // TODO: implement Quartz restore timer service
-   }
-   
-   public void setDataSource(String jndiName)
-   {
-      JNDIConnectionProvider connectionProvider = new JNDIConnectionProvider(jndiName, false);
-      // FIXME: remove hardcoding
-      DBConnectionManager.getInstance().addConnectionProvider("myDS", connectionProvider);
-   }
-   
-   public void setProperties(final Properties props)
-   {
-//      if(scheduler != null)
-//         throw new IllegalStateException("already started");
-      
-      // TODO: precondition the prop
-      properties = props;
-   }
-   
-   public void setSqlProperties(Properties props)
-   {
-      this.sqlProperties = props;
-   }
-   
-   public synchronized void start() throws Exception
-   {
-      if(scheduler != null)
-         throw new IllegalStateException("already started");
-      
-      log.debug("properties = " + properties);
-      
-      InitialContext ctx = new InitialContext();
-      tm = (TransactionManager) ctx.lookup(TransactionManagerService.JNDI_NAME);
-      
-      createSchema();
-      
-      // TODO: bind in JNDI, or is this done by the JMX bean?
-      SchedulerFactory factory;
-      if(properties == null)
-         factory = new StdSchedulerFactory();
-      else
-         factory = new StdSchedulerFactory(properties);
-      scheduler = factory.getScheduler();
-      // TODO: really start right away?
-      scheduler.start();
-   }
-   
-   public synchronized void stop() throws Exception
-   {
-      if(scheduler == null)
-         throw new IllegalStateException("already stopped");
-      
-      // TODO: unbind from JNDI
-      
-      // TODO: standby or shutdown?
-      scheduler.shutdown();
-      
-      scheduler = null;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerServiceFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/QuartzTimerServiceFactory.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerImpl.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerImpl.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerImpl.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,152 +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 org.jboss.ejb3.timerservice.quartz;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.ejb.EJBException;
-import javax.ejb.NoSuchObjectLocalException;
-import javax.ejb.Timer;
-import javax.ejb.TimerHandle;
-
-import org.jboss.logging.Logger;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.Trigger;
-
-/**
- * A view on an actual (persistent) timer.
- * 
- * This object must never be serializable (EJB3 18.4.1)
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 56169 $
- */
-public class TimerImpl implements Timer
-{
-   private static final Logger log = Logger.getLogger(TimerImpl.class);
-   
-   private Scheduler scheduler;
-   private Trigger trigger;
-   private Serializable info;
-   
-   protected TimerImpl(Scheduler scheduler, Trigger trigger, Serializable info) {
-      assert scheduler != null;
-      assert trigger != null;
-      
-      this.scheduler = scheduler;
-      this.trigger = trigger;
-      this.info = info;
-   }
-   
-   protected void checkState()
-   {
-      // TODO: implement bean state checking to see if a call is allowed
-      
-      if(trigger.getNextFireTime() == null)
-         throw new NoSuchObjectLocalException("timer has expired");
-   }
-   
-   /**
-    * 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
-   {
-      checkState();
-      
-      try {
-         // TODO: call TimerServiceImpl.cancelTimer instead
-         scheduler.unscheduleJob(trigger.getName(), trigger.getGroup());
-      }
-      catch(SchedulerException e) {
-         log.error("cancel failed", e);
-         throw new EJBException(e.getMessage());
-      }
-   }
-
-   /**
-    * Get the number of milliseconds that will elapse before the next scheduled timer expiration.
-    * 
-    * @return   The 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
-   {
-      // leave all checks to getNextTimeout
-      return getNextTimeout().getTime() - System.currentTimeMillis();
-   }
-
-   /**
-    * Get the point in time at which the next timer expiration is scheduled to occur.
-    * 
-    * @return   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
-   {
-      checkState();
-      
-      Date nextTimeout = trigger.getNextFireTime();
-      if(nextTimeout == null)
-         throw new IllegalStateException("trigger does not have a next fire time"); // TODO: proper EJB3 state check & exception
-      return nextTimeout;
-   }
-
-   /**
-    * 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
-   {
-      checkState();
-      
-      return info;
-   }
-
-   /**
-    * Get a serializable handle to the timer. This handle can be used at a later time to re-obtain the timer reference.
-    * 
-    * @return   A serializable handle to 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
-   {
-      checkState();
-      
-      return null; // FIXME: implement getHandle
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerImpl.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerServiceImpl.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerServiceImpl.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerServiceImpl.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,233 +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 org.jboss.ejb3.timerservice.quartz;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Date;
-
-import javax.ejb.EJBException;
-import javax.ejb.Timer;
-import javax.ejb.TimerService;
-import javax.management.ObjectName;
-
-import org.jboss.ejb3.timerservice.TimedObjectInvoker;
-import org.jboss.logging.Logger;
-import org.quartz.JobDetail;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.SimpleTrigger;
-import org.quartz.Trigger;
-
-/**
- * Implements the EJB3 Timer Service specification (EJB3 chapter 18).
- * 
- * Each bean container has its own job and trigger group.
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 56169 $
- */
-public class TimerServiceImpl implements TimerService
-{
-   private static final Logger log = Logger.getLogger(TimerServiceImpl.class);
-   
-   private Scheduler scheduler;
-   private ObjectName objectName;
-   private String groupName;
-   private long jobNum = 0;
-   private long triggerNum = 0;
-   
-   protected TimerServiceImpl(Scheduler scheduler, ObjectName objectName, TimedObjectInvoker invoker) {
-      assert scheduler != null;
-      assert objectName != null;
-      assert invoker != null;
-      
-      this.scheduler = scheduler;
-      this.objectName = objectName;
-      this.groupName = objectName.getCanonicalName();
-   }
-   
-   protected Timer createTimer(Trigger trigger, Serializable info)
-   {
-      try {
-         String name = "myJob" + jobNum;
-         jobNum++;
-         
-         Class jobClass = QuartzTimerJob.class;
-         
-         Timer timer = new TimerImpl(scheduler, trigger, info);
-         
-         PersistentTimer persistentTimer = new PersistentTimer(trigger, objectName, info);
-         
-         JobDetail jobDetail = new JobDetail(name, groupName, jobClass);
-         jobDetail.getJobDataMap().put("timer", persistentTimer);
-         
-         scheduler.scheduleJob(jobDetail, trigger);
-         
-         return timer;
-      }
-      catch(SchedulerException e) {
-         // translate the exception, because the client might not have quartz
-         log.error("createTimer failed", e);
-         throw new EJBException(e.getMessage());
-      }
-      
-   }
-   
-   /**
-    * 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 fails due to a system-level failure.
-    */
-   public Timer createTimer(long duration, Serializable info) throws IllegalArgumentException, IllegalStateException,
-         EJBException
-   {
-      if(duration < 0) throw new IllegalArgumentException("duration must not be negative");
-      // TODO: check state
-      
-      Date expiration = new Date(System.currentTimeMillis() + duration);
-      return createTimer(expiration, info);
-   }
-
-   /**
-    * 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. 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
-   {
-      if(initialDuration < 0) throw new IllegalArgumentException("initialDuration must not be negative");
-      if(intervalDuration < 0) throw new IllegalArgumentException("intervalDuration must not be negative");
-      // TODO: check state
-      
-      Date initialExpiration = new Date(System.currentTimeMillis() + initialDuration);
-      
-      return createTimer(initialExpiration, intervalDuration, info);
-   }
-
-   /**
-    * 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
-   {
-      if(expiration == null) throw new IllegalArgumentException("expiration must not be null");
-      if(expiration.getTime() < 0) throw new IllegalArgumentException("expiration.time must not be negative");
-      // TODO: check state
-      
-      String triggerName = "myTrigger" + triggerNum;
-      triggerNum++;
-      
-      Trigger trigger = new SimpleTrigger(triggerName, groupName, expiration);
-      
-      return createTimer(trigger, info);
-   }
-
-   /**
-    * 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
-   {
-      if(initialExpiration == null) throw new IllegalArgumentException("initialExpiration must not be null");
-      if(initialExpiration.getTime() < 0) throw new IllegalArgumentException("initialExpiration.time must not be negative");
-      if(intervalDuration < 0) throw new IllegalArgumentException("intervalDuration must not be negative");
-      // TODO: check state
-      
-      String triggerName = "myTrigger" + triggerNum;
-      triggerNum++;
-      Date endTime = null;
-      
-      Trigger trigger = new SimpleTrigger(triggerName, groupName, initialExpiration, endTime, SimpleTrigger.REPEAT_INDEFINITELY, intervalDuration);
-      
-      return createTimer(trigger, info);
-   }
-
-   protected Scheduler getScheduler()
-   {
-      return scheduler;
-   }
-
-   /**
-    * 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
-   {
-      throw new RuntimeException("NYI");
-   }
-
-   protected void shutdown()
-   {
-      log.info("shutting down " + this);
-      try
-      {
-         String triggerNames[] = scheduler.getTriggerNames(groupName);
-         for(String triggerName : triggerNames)
-            scheduler.unscheduleJob(triggerName, groupName);
-         String jobNames[] = scheduler.getJobNames(groupName);
-         for(String jobName : jobNames)
-            scheduler.deleteJob(jobName, groupName);
-      }
-      catch(SchedulerException e)
-      {
-         log.error("shutdown failed", e);
-         // TODO: ignore?
-      }
-   }
-   
-   public String toString()
-   {
-      return "Timer Service " + objectName;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerServiceImpl.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/TimerServiceImpl.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerService.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerService.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerService.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,114 +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 org.jboss.ejb3.timerservice.quartz.jmx;
-
-import java.util.Properties;
-
-import javax.management.ObjectName;
-
-import org.jboss.ejb3.timerservice.quartz.QuartzTimerServiceFactory;
-import org.jboss.system.ServiceMBeanSupport;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 56169 $
- */
-public class EJB3TimerService extends ServiceMBeanSupport
-   implements EJB3TimerServiceMBean
-{
-   private QuartzTimerServiceFactory delegate;
-   private ObjectName dataSource;
-   
-   public EJB3TimerService()
-   {
-      delegate = new QuartzTimerServiceFactory();
-   }
-   
-   @Override
-   protected void createService() throws Exception
-   {
-      super.createService();
-   }
-
-   @Override
-   protected void destroyService() throws Exception
-   {
-      //this.delegate.shutdown();
-      super.destroyService();
-   }
-   
-   /**
-    * @jmx:managed-attribute
-    * 
-    * @return   the object name of the data source to use
-    */
-   public ObjectName getDataSource()
-   {
-      return dataSource;
-   }
-   
-   /**
-    * @jmx:managed-attribute
-    */
-   public void setDataSource(ObjectName dataSource)
-   {
-      this.dataSource = dataSource;
-   }
-   
-   /**
-    * @jmx:managed-attribute
-    * 
-    * @param props
-    */
-   public void setProperties(final Properties props)
-   {
-      delegate.setProperties(props);
-   }
-   
-   /**
-    * @jmx:managed-attribute
-    * 
-    * @param props
-    */
-   public void setSqlProperties(Properties props)
-   {
-      delegate.setSqlProperties(props);
-   }
-   
-   @Override
-   protected void startService() throws Exception
-   {
-      super.startService();
-      String jndiName = (String) server.getAttribute(dataSource, "BindName");
-      delegate.setDataSource(jndiName);
-      delegate.start();
-   }
-   
-   @Override
-   protected void stopService() throws Exception
-   {
-      delegate.stop();
-      super.stopService();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerService.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerService.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerServiceMBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerServiceMBean.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerServiceMBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,47 +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 org.jboss.ejb3.timerservice.quartz.jmx;
-
-import java.util.Properties;
-
-import javax.management.ObjectName;
-
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.system.ServiceMBean;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 56169 $
- */
-public interface EJB3TimerServiceMBean extends ServiceMBean
-{
-    /** The default object name */
-    ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ejb:service=EJB3TimerService");
-    
-    void setDataSource(ObjectName dataSource);
-    
-    void setProperties(final Properties props);
-    
-    void setSqlProperties(Properties props);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerServiceMBean.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/jmx/EJB3TimerServiceMBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/package.html
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/package.html	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/package.html	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,17 +0,0 @@
-<head>
-	<body>
-		This package provides the EJB Timer Service to the EJB3 stack.
-		<p/>
-		It replaces the org.jboss.ejb.txtimer package.
-		<p/>
-		The Jboss EJB3 Timer Service package depends on:
-		<ul>
-			<li>EJB3 API</li>
-			<li>Quartz</li>
-			<li>JTA</li>
-		</ul>
-		<p/>
-		Note that almost all exceptions are caught and rethrown as EJBExceptions, thus
-		making sure that no Quartz API is exposed either compile time or run time.
-	</body>
-</head>
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/package.html (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/ejb3/timerservice/quartz/package.html)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/Ejb3TxPolicy.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/Ejb3TxPolicy.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/Ejb3TxPolicy.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,6 +23,7 @@
 
 import java.rmi.RemoteException;
 import java.util.Iterator;
+import java.util.List;
 
 import javax.ejb.ApplicationException;
 import javax.ejb.EJBException;
@@ -33,8 +34,7 @@
 import org.jboss.aop.joinpoint.Invocation;
 import org.jboss.aop.joinpoint.MethodInvocation;
 import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.dd.ApplicationExceptionList;
-import org.jboss.ejb3.dd.AssemblyDescriptor;
+import org.jboss.ejb3.metamodel.AssemblyDescriptor;
 import org.jboss.ejb3.stateful.StatefulContainer;
 import org.jboss.ejb3.stateful.StatefulContainerInvocation;
 
@@ -105,18 +105,15 @@
       
       if (assembly != null)
       {
-         ApplicationExceptionList exceptionList = assembly.getApplicationExceptionList();
-         if (exceptionList != null)
+         List exceptions = assembly.getApplicationExceptions();
+         if (exceptions.size() > 0)
          {
-            Iterator exceptionClasses = exceptionList.getClassList().iterator();
-            Iterator rollbacks = exceptionList.getRollbackList().iterator();
-            while (exceptionClasses.hasNext())
+            Iterator exceptionIterator = exceptions.iterator();
+            while (exceptionIterator.hasNext())
             {
-               String className = (String)exceptionClasses.next();
-               Boolean rollback = (Boolean)rollbacks.next();
-         
-               if (className.equals(exceptionClass.getName()))
-                  return new ApplicationExceptionImpl(rollback);
+               org.jboss.ejb3.metamodel.ApplicationException exception = (org.jboss.ejb3.metamodel.ApplicationException)exceptionIterator.next();
+               if (exception.getExceptionClass().equals(exceptionClass.getName()))
+                  return new ApplicationExceptionImpl(exception.getRollback());
             }
          }
          

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/TxInterceptorFactory.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/TxInterceptorFactory.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/TxInterceptorFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -31,6 +31,7 @@
 import org.jboss.aop.joinpoint.MethodJoinpoint;
 import org.jboss.aspects.tx.TxInterceptor;
 import org.jboss.logging.Logger;
+import org.jboss.tm.TransactionManagerLocator;
 import org.jboss.tm.TxManager;
 import org.jboss.ejb3.stateful.StatefulContainer;
 import org.jboss.ejb3.stateless.StatelessContainer;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/TxUtil.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/TxUtil.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/ejb3/tx/TxUtil.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,6 +23,8 @@
 
 import javax.ejb.TransactionManagement;
 import javax.ejb.TransactionManagementType;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
 import javax.transaction.TransactionManager;
 import org.jboss.aop.Advisor;
 import org.jboss.tm.TxManager;
@@ -35,9 +37,19 @@
  */
 public class TxUtil
 {
-   public static TransactionManager getTransactionManager()
+   public static TransactionManager getTransactionManager() throws RuntimeException
    {
-      return TxManager.getInstance();
+      try
+      {
+         //return TxManager.getInstance();
+         InitialContext jndiContext = new InitialContext();
+         TransactionManager tm = (TransactionManager)jndiContext.lookup("java:TransactionManager");
+         return tm;
+      } 
+      catch (NamingException e)
+      {
+         throw new RuntimeException("Unable to lookup TransactionManager", e);
+      }
    }
 
    public static TransactionManagementType getTransactionManagementType(Advisor c)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsFieldInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/DependsFieldInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsFieldInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,82 +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 org.jboss.injection;
-
-import java.lang.reflect.Field;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.ObjectName;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.mx.util.MBeanProxyExt;
-
-/**
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision: 46510 $
- */
-public class DependsFieldInjector implements Injector
-{
-   Field field;
-   ObjectName on;
-
-   public DependsFieldInjector(Field field, ObjectName on)
-   {
-      this.field = field;
-      this.on = on;
-      field.setAccessible(true);
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      Object instance = ctx.getInstance();
-      inject(instance);
-   }
-
-   public void inject(Object instance)
-   {
-      Class clazz = field.getType();
-      Object value = null;
-
-      if (clazz == ObjectName.class)
-      {
-         value = on;
-      }
-      else
-      {
-         MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
-         value = MBeanProxyExt.create(clazz, on, server);
-      }
-
-      try
-      {
-         field.set(instance, value);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public Class getInjectionClass()
-   {
-      return field.getType();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsFieldInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/DependsFieldInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsHandler.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/DependsHandler.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,103 +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 org.jboss.injection;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.AccessibleObject;
-import java.util.Map;
-import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
-
-import org.jboss.annotation.ejb.Depends;
-import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-
-/**
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision: 55144 $
- */
-public class DependsHandler implements InjectionHandler
-{
-   private static final Logger log = Logger.getLogger(DependsHandler.class);
-
-   public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
-   {
-   }
-
-   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      Depends dep = container.getAnnotation(Depends.class, method.getDeclaringClass(), method);
-      if (dep != null)
-      {
-         if (!method.getName().startsWith("set"))
-            throw new RuntimeException("@EJB can only be used with a set method: " + method);
-         String[] names = dep.value();
-         if (names.length != 1)
-            throw new RuntimeException("@Depends on a field can only take one object name: " + method);
-         ObjectName on = null;
-         try
-         {
-            on = new ObjectName(names[0]);
-         }
-         catch (MalformedObjectNameException e)
-         {
-            throw new RuntimeException(e);
-         }
-         injectors.put(method, new DependsMethodInjector(method, on));
-         container.getDependencyPolicy().addDependency(names[0]);
-      }
-   }
-
-   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      Depends dep = container.getAnnotation(Depends.class, field.getDeclaringClass(), field);
-      if (dep != null)
-      {
-         String[] names = dep.value();
-         if (names.length != 1)
-            throw new RuntimeException("@Depends on a field can only take one object name: " + field);
-         ObjectName on = null;
-         try
-         {
-            on = new ObjectName(names[0]);
-         }
-         catch (MalformedObjectNameException e)
-         {
-            throw new RuntimeException(e);
-         }
-         injectors.put(field, new DependsFieldInjector(field, on));
-         container.getDependencyPolicy().addDependency(names[0]);
-      }
-   }
-
-   public void handleClassAnnotations(Class clazz, InjectionContainer container)
-   {
-      Depends dep = (Depends)container.getAnnotation(Depends.class, clazz);
-      if (dep == null) return;
-      for (String dependency : dep.value())
-      {
-         container.getDependencyPolicy().addDependency(dependency);
-      }
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsHandler.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/DependsHandler.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsMethodInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/DependsMethodInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsMethodInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,87 +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 org.jboss.injection;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.ObjectName;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.mx.util.MBeanProxyExt;
-
-/**
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision: 46510 $
- */
-public class DependsMethodInjector implements Injector
-{
-   Method method;
-   ObjectName on;
-
-   public DependsMethodInjector(Method method, ObjectName on)
-   {
-      this.method = method;
-      this.on = on;
-      method.setAccessible(true);
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      Object instance = ctx.getInstance();
-      inject(instance);
-   }
-
-   public void inject(Object instance)
-   {
-      Class clazz = method.getParameterTypes()[0];
-      Object value = null;
-
-      if (clazz == ObjectName.class)
-      {
-         value = on;
-      }
-      else
-      {
-         MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
-         value = MBeanProxyExt.create(clazz, on, server);
-      }
-
-      try
-      {
-         method.invoke(instance, value);
-      }
-      catch (InvocationTargetException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public Class getInjectionClass()
-   {
-      return method.getParameterTypes()[0];
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/DependsMethodInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/DependsMethodInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextFieldInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EJBContextFieldInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextFieldInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,69 +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 org.jboss.injection;
-
-import java.lang.reflect.Field;
-import org.jboss.ejb3.BeanContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class EJBContextFieldInjector implements Injector, PojoInjector
-{
-   private Field field;
-
-   public EJBContextFieldInjector(Field field)
-   {
-      this.field = field;
-      field.setAccessible(true);
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      inject(ctx, ctx.getInstance());
-   }
-   
-   public void inject(BeanContext ctx, Object instance)
-   {
-      try
-      {
-         field.set(instance, ctx.getEJBContext());
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public void inject(Object instance)
-   {
-      throw new RuntimeException("Illegal operation");
-   }
-
-   public Class getInjectionClass()
-   {
-      return field.getType();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextFieldInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EJBContextFieldInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextMethodInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EJBContextMethodInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextMethodInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,81 +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 org.jboss.injection;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import org.jboss.ejb3.BeanContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class EJBContextMethodInjector implements Injector, PojoInjector
-{
-   private Method setMethod;
-
-   public EJBContextMethodInjector(Method setMethod)
-   {
-      this.setMethod = setMethod;
-      setMethod.setAccessible(true);
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      inject(ctx, ctx.getInstance());
-   }
-   
-   public void inject(BeanContext ctx, Object instance)
-   {
-
-      Object[] args = {ctx.getEJBContext()};
-      try
-      {
-         setMethod.invoke(instance, args);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException("Failed in setting EntityManager on setter method: " + setMethod.toString());
-      }
-      catch (InvocationTargetException e)
-      {
-         throw new RuntimeException(e.getCause());  //To change body of catch statement use Options | File Templates.
-      }
-   }
-
-   public void inject(Object instance)
-   {
-      throw new RuntimeException("Illegal operation");
-   }
-
-  
-   public Class getInjectionClass()
-   {
-      return setMethod.getParameterTypes()[0];
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBContextMethodInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EJBContextMethodInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBHandler.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EJBHandler.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,407 +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 org.jboss.injection;
-
-import org.jboss.annotation.IgnoreDependency;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.BaseEjbRef;
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-
-import javax.ejb.EJB;
-import javax.ejb.EJBs;
-import javax.naming.NameNotFoundException;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Searches bean class for all @Inject and create Injectors
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56489 $
- */
-public class EJBHandler implements InjectionHandler
-{
-   private static final Logger log = Logger.getLogger(EJBHandler.class);
-
-   protected void addDependency(String refName, EJBContainer refcon, InjectionContainer container)
-   {
-      // Do not depend on myself
-      if(!container.equals(refcon))
-         container.getDependencyPolicy().addDependency(refcon.getObjectName().getCanonicalName());
-   }
-
-   public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
-   {
-      if (xml != null)
-      {
-         if (xml.getEjbLocalRefs() != null) loadEjbLocalXml(xml.getEjbLocalRefs(), container);
-         if (xml.getEjbRefs() != null) loadEjbRefXml(xml.getEjbRefs(), container);
-      }
-   }
-
-   protected void loadEjbLocalXml(Collection<EjbLocalRef> refs, InjectionContainer container)
-   {
-      for (EjbLocalRef ref : refs)
-      {
-         String interfaceName = ref.getLocal();
-         String errorType = "<ejb-local-ref>";
-
-         ejbRefXml(ref, interfaceName, container, errorType);
-      }
-   }
-
-   protected void loadEjbRefXml(Collection<EjbRef> refs, InjectionContainer container)
-   {
-      for (EjbRef ref : refs)
-      {
-         String interfaceName = ref.getRemote();
-         String errorType = "<ejb-ref>";
-
-         ejbRefXml(ref, interfaceName, container, errorType);
-      }
-   }
-
-   protected void ejbRefXml(BaseEjbRef ref, String interfaceName, InjectionContainer container, String errorType)
-   {
-      String encName = "env/" + ref.getEjbRefName();
-      InjectionUtil.injectionTarget(encName, ref, container, container.getEncInjections());
-      if (container.getEncInjectors().containsKey(encName))
-         return;
-
-      String mappedName = ref.getMappedName();
-      if (mappedName != null && mappedName.equals("")) mappedName = null;
-
-      String link = ref.getEjbLink();
-      if (link != null && link.trim().equals("")) link = null;
-
-      Class refClass = null;
-
-      if (interfaceName != null)
-      {
-         try
-         {
-            refClass = container.getClassloader().loadClass(interfaceName);
-         }
-         catch (ClassNotFoundException e)
-         {
-            throw new RuntimeException("could not find " + errorType + "'s local interface " + interfaceName + " in " + container.getDeploymentDescriptorType() + " of " + container.getIdentifier());
-         }
-      }
-      
-      //----- injectors
-
-      if (mappedName == null && refClass == null && link == null)
-      {
-         // must be jboss.xml only with @EJB used to define reference.  jboss.xml used to tag for ignore dependency
-         // i think it is ok to assume this because the ejb-jar.xml schema should handle any missing elements
-      }
-      else
-      {
-         ejbRefEncInjector(mappedName, encName, refClass, link, errorType, container);
-         if (ref.isIgnoreDependency())
-         {
-            log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
-            return;
-         }
-
-         ejbRefDependency(link, container, refClass, errorType, encName);
-      }
-   }
-
-   protected void ejbRefDependency(String link, InjectionContainer container, Class refClass, String errorType, String encName)
-   {
-      EJBContainer refcon = null;
-
-      if (refClass != null && (refClass.equals(Object.class) || refClass.equals(void.class))) refClass = null;
-
-      if (refClass != null)
-      {
-         if (link != null && !link.trim().equals(""))
-         {
-            refcon = (EJBContainer) container.resolveEjbContainer(link, refClass);
-            if (refcon == null)
-            {
-               String msg = "IGNORING DEPENDENCY: unable to find " + errorType + " of interface " + refClass.getName() + " and ejbLink of " + link + " in  " + container.getDeploymentDescriptorType() + " of " + container.getIdentifier() + " it might not be deployed yet";
-               log.warn(msg);
-            }
-         }
-         else
-         {
-            try
-            {
-               refcon = (EJBContainer) container.resolveEjbContainer(refClass);
-               if (refcon == null)
-               {
-                  String msg = "IGNORING DEPENDENCY: unable to find " + errorType + " from interface only " + refClass.getName() + " in " + container.getDeploymentDescriptorType() + " of " + container.getIdentifier();
-                  log.warn(msg);
-               }
-            }
-            catch (NameNotFoundException e)
-            {
-               String msg = "IGNORING DEPENDENCY: unable to find " + errorType + " from interface only " + refClass.getName() + " in " + container.getDeploymentDescriptorType() + " of " + container.getIdentifier() + e.getMessage();
-               log.warn(msg);
-            }
-         }
-      }
-      else
-      {
-         String msg = "IGNORING DEPENDENCY: unable to resolve dependency of EJB, there is too little information";
-         log.warn(msg);
-      }
-
-      if (refcon != null)
-      {
-         addDependency(encName, refcon, container);
-      }
-   }
-
-   protected void ejbRefEncInjector(String mappedName, String encName, Class refClass, String link, String errorType, InjectionContainer container)
-   {
-      if (refClass != null && (refClass.equals(Object.class) || refClass.equals(void.class))) refClass = null;
-      if (mappedName != null && mappedName.trim().equals("")) mappedName = null;
-
-      EncInjector injector = null;
-
-      if (mappedName == null)
-      {
-         injector = new EjbEncInjector(encName, refClass, link, errorType);
-      }
-      else
-      {
-         injector = new EjbEncInjector(encName, mappedName, errorType);
-      }
-
-      container.getEncInjectors().put(encName, injector);
-   }
-
-   public static EJBContainer getEjbContainer(EJB ref, InjectionContainer container, Class memberType)
-   {
-      EJBContainer rtn = null;
-
-      if (ref.mappedName() != null && !"".equals(ref.mappedName()))
-      {
-         return null;
-      }
-
-      if (ref.beanName().equals("") && memberType == null)
-         throw new RuntimeException("For deployment " + container.getIdentifier() + "not enough information for @EJB.  Please fill out the beanName and/or businessInterface attributes");
-
-      Class businessInterface = memberType;
-      if (!ref.beanInterface().getName().equals(Object.class.getName()))
-      {
-         businessInterface = ref.beanInterface();
-      }
-
-      if (ref.beanName().equals(""))
-      {
-         try
-         {
-            rtn = (EJBContainer) container.resolveEjbContainer(businessInterface);
-         }
-         catch (NameNotFoundException e)
-         {
-            log.warn("For deployment " + container.getIdentifier() + " could not find jndi binding based on interface only for @EJB(" + businessInterface.getName() + ") " + e.getMessage());
-         }
-      }
-      else
-      {
-         rtn = (EJBContainer) container.resolveEjbContainer(ref.beanName(), businessInterface);
-      }
-
-      return rtn;
-   }
-
-   public static String getJndiName(EJB ref, InjectionContainer container, Class memberType)
-   {
-      String jndiName;
-
-      if (ref.mappedName() != null && !"".equals(ref.mappedName()))
-      {
-         return ref.mappedName();
-      }
-
-      if (ref.beanName().equals("") && memberType == null)
-         throw new RuntimeException("For deployment " + container.getIdentifier() + "not enough information for @EJB.  Please fill out the beanName and/or businessInterface attributes");
-
-      Class businessInterface = memberType;
-      if (!ref.beanInterface().getName().equals(Object.class.getName()))
-      {
-         businessInterface = ref.beanInterface();
-      }
-
-      if (ref.beanName().equals(""))
-      {
-         try
-         {
-            jndiName = container.getEjbJndiName(businessInterface);
-         }
-         catch (NameNotFoundException e)
-         {
-            throw new RuntimeException("For deployment " + container.getIdentifier() + " could not find jndi binding based on interface only for @EJB(" + businessInterface.getName() + ") " + e.getMessage());
-         }
-         if (jndiName == null)
-         {
-            throw new RuntimeException("For deployment " + container.getIdentifier() + " could not find jndi binding based on interface only for @EJB(" + businessInterface.getName() + ")");
-         }
-      }
-      else
-      {
-         jndiName = container.getEjbJndiName(ref.beanName(), businessInterface);
-         if (jndiName == null)
-         {
-            throw new RuntimeException("For EJB " + container.getIdentifier() + "could not find jndi binding based on beanName and business interface for @EJB(" + ref.beanName() + ", " + businessInterface.getName() + ")");
-         }
-      }
-
-      return jndiName;
-   }
-
-   public void handleClassAnnotations(Class clazz, InjectionContainer container)
-   {
-      EJBs ref = container.getAnnotation(EJBs.class, clazz);
-      if (ref != null)
-      {
-         EJB[] ejbs = ref.value();
-
-         for (EJB ejb : ejbs)
-         {
-            handleClassAnnotation(ejb, clazz, container);
-         }
-      }
-      EJB ejbref = container.getAnnotation(EJB.class, clazz);
-      if (ejbref != null) handleClassAnnotation(ejbref, clazz, container);
-   }
-
-   protected void handleClassAnnotation(EJB ejb, Class clazz, InjectionContainer container)
-   {
-      String encName = ejb.name();
-      if (encName == null || encName.equals(""))
-      {
-         throw new RuntimeException("JBoss requires the name of the @EJB in the @EJBs: " + clazz);
-      }
-      encName = "env/" + encName;
-
-      if (container.getEncInjectors().containsKey(encName)) return;
-      ejbRefEncInjector(ejb.mappedName(), encName, ejb.beanInterface(), ejb.beanName(), "@EJB", container);
-
-      // handle dependencies
-
-      if (isIgnoreDependency(container, ejb))
-         log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
-      else
-         ejbRefDependency(ejb.beanName(), container, ejb.beanInterface(), "@EJB", encName);
-   }
-
-   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      
-      EJB ref = method.getAnnotation(EJB.class);
-      if (ref != null)
-      {
-         if (!method.getName().startsWith("set"))
-            throw new RuntimeException("@EJB can only be used with a set method: " + method);
-         String encName = ref.name();
-         if (encName == null || encName.equals(""))
-         {
-            encName = InjectionUtil.getEncName(method);
-         }
-         else
-         {
-            encName = "env/" + encName;
-         }
-         if (!container.getEncInjectors().containsKey(encName))
-         {
-            ejbRefEncInjector(ref.mappedName(), encName, method.getParameterTypes()[0], ref.beanName(), "@EJB", container);
-            
-            if (container.getAnnotation(IgnoreDependency.class, method) == null)
-            {
-               if (isIgnoreDependency(container, ref))
-                  log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
-               else
-                  ejbRefDependency(ref.beanName(), container, method.getParameterTypes()[0], "@EJB", encName);
-            }
-         }
-
-         injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
-      }
-   }
-
-   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      EJB ref = field.getAnnotation(EJB.class);
-      if (ref != null)
-      {
-         String encName = ref.name();
-         if (encName == null || encName.equals(""))
-         {
-            encName = InjectionUtil.getEncName(field);
-         }
-         else
-         {
-            encName = "env/" + encName;
-         }
-         if (!container.getEncInjectors().containsKey(encName))
-         {
-            if (container.getAnnotation(IgnoreDependency.class, field) == null)
-            {
-               if (isIgnoreDependency(container, ref))
-                  log.debug("IGNORING <ejb-ref> DEPENDENCY: " + encName);
-               else
-                  ejbRefDependency(ref.beanName(), container, field.getType(), "@EJB", encName);
-            }
-            ejbRefEncInjector(ref.mappedName(), encName, field.getType(), ref.beanName(), "@EJB", container);
-         }
-         injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
-
-      }
-   }
-
-   protected boolean isIgnoreDependency(InjectionContainer container, EJB ref)
-   {
-      EnvironmentRefGroup refGroup =  (EnvironmentRefGroup)container.getEnvironmentRefGroup();
-      
-      if (refGroup != null)
-      {
-         Iterator<EjbRef> ejbRefs = refGroup.getEjbRefs().iterator();
-         while (ejbRefs.hasNext())
-         {
-            EjbRef ejbRef = ejbRefs.next();
-            if (ejbRef.getEjbRefName().equals(ref.name()))
-            {
-               if (ejbRef.isIgnoreDependency())
-                  return true;
-               else
-                  return false;
-            }
-         }
-      }
-      
-      return false;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EJBHandler.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EJBHandler.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EjbEncInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EjbEncInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EjbEncInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,102 +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 org.jboss.injection;
-
-import org.jboss.logging.Logger;
-import org.jboss.naming.Util;
-
-import javax.naming.NameNotFoundException;
-import javax.naming.LinkRef;
-import javax.naming.NamingException;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56518 $
- */
-public class EjbEncInjector implements EncInjector
-{
-   private static final Logger log = Logger.getLogger(EjbEncInjector.class);
-   
-   private String ejbLink;
-   private Class refClass;
-   private String jndiName;
-   private String error;
-   private String encName;
-
-   public EjbEncInjector(String name, String mappedName, String error)
-   {
-      this.jndiName = mappedName;
-      this.error = error;
-      this.encName = name;
-   }
-
-   public EjbEncInjector(String name, Class refClass, String ejbLink, String error)
-   {
-      this.refClass = refClass;
-      String refClassName = refClass == null ? "NULL" : refClass.getName();
-      this.ejbLink = ejbLink;
-      this.error = error;
-      this.encName = name;
-      if (refClass == null && ejbLink == null) throw new RuntimeException("cannot have null refClass and ejbLink for encName: " + name);
-   }
-
-
-   public void inject(InjectionContainer container)
-   {
-      if (jndiName == null || jndiName.equals(""))
-      {
-         if (ejbLink != null && !"".equals(ejbLink))
-         {
-            jndiName = container.getEjbJndiName(ejbLink, refClass);
-         }
-         else
-         {
-            try
-            {
-               if (refClass != null)
-               {
-                  jndiName = container.getEjbJndiName(refClass);
-               }
-               else
-               {
-                  throw new RuntimeException("searching for @EJB" + encName + " has null refClass and null ejbLink.");
-               }
-            }
-            catch (NameNotFoundException e)
-            {
-               throw new RuntimeException("could not resolve global JNDI name for " + error + " for container " + container.getIdentifier() + ": reference class: " + refClass.getName() + " ejbLink: " + ejbLink + " " + e.getMessage());
-            }
-         }
-      }
-      try
-      {
-         if (jndiName == null) throw new RuntimeException("Failed to populate ENC: " + encName + " global jndi name was null");
-         Util.rebind(container.getEnc(), encName, new LinkRef(jndiName));
-      }
-      catch (NamingException e)
-      {
-         throw new RuntimeException("could not bind enc name '" +  encName + "' for " + error + " for container " + container.getIdentifier() + ": reference class: " + refClass.getName() + " ejbLink: " + ejbLink + " " + e.getMessage());
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EjbEncInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EjbEncInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EncInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EncInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EncInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,33 +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 org.jboss.injection;
-
-/**
- * Responsible for populating ENC
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public interface EncInjector
-{
-   void inject(InjectionContainer container);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EncInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EncInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryFieldInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EntityManagerFactoryFieldInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryFieldInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,78 +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 org.jboss.injection;
-
-import java.lang.reflect.Field;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class EntityManagerFactoryFieldInjector implements Injector, PojoInjector
-{
-   private static final Logger log = Logger.getLogger(EntityManagerFactoryFieldInjector.class);
-   private Field field;
-   private Object factory;
-
-   public EntityManagerFactoryFieldInjector(Field field, Object factory)
-   {
-      this.field = field;
-      this.field.setAccessible(true);
-      this.factory = factory;
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      inject(ctx, ctx.getInstance());
-   }
-   
-   public void inject(BeanContext ctx, Object instance)
-   {
-      inject(instance);
-   }
-
-   public void inject(Object instance)
-   {
-      try
-      {
-         field.set(instance, factory);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException("Failed in setting EntityManager on setter field: " + field.toString());
-      }
-   }
-
-   public Class getInjectionClass()
-   {
-      return field.getType();
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryFieldInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EntityManagerFactoryFieldInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryMethodInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EntityManagerFactoryMethodInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryMethodInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,83 +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 org.jboss.injection;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class EntityManagerFactoryMethodInjector implements Injector, PojoInjector
-{
-   private static final Logger log = Logger.getLogger(EntityManagerFactoryMethodInjector.class);
-   private Method setMethod;
-   private Object factory;
-
-   public EntityManagerFactoryMethodInjector(Method setMethod, Object factory)
-   {
-      this.setMethod = setMethod;
-      setMethod.setAccessible(true);
-      this.factory = factory;
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      inject(ctx, ctx.getInstance());
-   }
-   
-   public void inject(BeanContext ctx, Object instance)
-   {
-      inject(instance);
-   }
-
-   public void inject(Object instance)
-   {
-      try
-      {
-         Object[] args = {factory};
-         setMethod.invoke(instance, args);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException("Failed in setting EntityManager on setter method: " + setMethod.toString());
-      }
-      catch (InvocationTargetException e)
-      {
-         throw new RuntimeException(e.getCause());  //To change body of catch statement use Options | File Templates.
-      }
-   }
-
-   public Class getInjectionClass()
-   {
-      return setMethod.getParameterTypes()[0];
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EntityManagerFactoryMethodInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EntityManagerFactoryMethodInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EnvEntryEncInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EnvEntryEncInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EnvEntryEncInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,120 +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 org.jboss.injection;
-
-import org.jboss.logging.Logger;
-import org.jboss.naming.Util;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56518 $
- */
-public class EnvEntryEncInjector implements EncInjector
-{
-   private static final Logger log = Logger.getLogger(EnvEntryEncInjector.class);
-
-   private String name;
-   private String entryType;
-   private String value;
-
-
-   public EnvEntryEncInjector(String encName, String entryType, String value)
-   {
-      this.name = encName;
-      this.entryType = entryType;
-      this.value = value;
-   }
-
-   public void inject(InjectionContainer container)
-   {
-      try
-      {
-         Util.rebind(container.getEnc(),
-                 name,
-                 getEnvEntryValue());
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("Invalid <env-entry> name: " + name, e);
-      }
-   }
-
-
-   protected Object getEnvEntryValue() throws ClassNotFoundException
-   {
-      Class type = Thread.currentThread().getContextClassLoader().loadClass(entryType);
-      if (type == String.class)
-      {
-         return value;
-      }
-      else if (type == Integer.class)
-      {
-         return new Integer(value);
-      }
-      else if (type == Long.class)
-      {
-         return new Long(value);
-      }
-      else if (type == Double.class)
-      {
-         return new Double(value);
-      }
-      else if (type == Float.class)
-      {
-         return new Float(value);
-      }
-      else if (type == Byte.class)
-      {
-         return new Byte(value);
-      }
-      else if (type == Character.class)
-      {
-         String input = value;
-         if (input == null || input.length() == 0)
-         {
-            return new Character((char) 0);
-         }
-         else
-         {
-            if (input.length() > 1)
-               // TODO: Add deployment context
-               log.warn("Warning character env-entry is too long: binding="
-                       + name + " value=" + input);
-            return new Character(input.charAt(0));
-         }
-      }
-      else if (type == Short.class)
-      {
-         return new Short(value);
-      }
-      else if (type == Boolean.class)
-      {
-         return new Boolean(value);
-      }
-      else
-      {
-         return value;
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/EnvEntryEncInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/EnvEntryEncInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ExtendedPersistenceContextInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/ExtendedPersistenceContextInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ExtendedPersistenceContextInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,72 +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 org.jboss.injection;
-
-import javax.persistence.EntityManager;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.ejb3.entity.ManagedEntityManagerFactory;
-import org.jboss.ejb3.stateful.StatefulBeanContext;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class ExtendedPersistenceContextInjector implements Injector, PojoInjector
-{
-   protected static final Logger log = Logger.getLogger(ExtendedPersistenceContextInjector.class);
-   protected ManagedEntityManagerFactory factory;
-
-   protected ExtendedPersistenceContextInjector(ManagedEntityManagerFactory factory)
-   {
-      this.factory = factory;
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      inject(ctx, ctx.getInstance());
-   }
-
-   public void inject(BeanContext beanContext, Object instance)
-   {
-      StatefulBeanContext ctx = (StatefulBeanContext)beanContext;
-      EntityManager pc = ctx.getExtendedPersistenceContext(factory.getKernelName());
-      if (pc == null)
-      {
-         pc = factory.createEntityManager();
-         ctx.addExtendedPersistenceContext(factory.getKernelName(), pc);
-      }
-   }
-
-   public void inject(Object instance)
-   {
-      throw new RuntimeException("Illegal operation");
-   }
-
-   public Class getInjectionClass()
-   {
-      return null;
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ExtendedPersistenceContextInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/ExtendedPersistenceContextInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionContainer.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/InjectionContainer.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionContainer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,119 +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 org.jboss.injection;
-
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.DependencyPolicy;
-import org.jboss.ejb3.entity.PersistenceUnitDeployment;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-
-import javax.naming.Context;
-import javax.naming.NameNotFoundException;
-import java.util.Map;
-import java.util.List;
-import java.lang.reflect.Method;
-import java.lang.reflect.Field;
-import java.lang.reflect.AccessibleObject;
-
-/**
- * This is the container that manages all injections.  Could be an EJB Container
- * or a WAR.
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56037 $
- */
-public interface InjectionContainer
-{
-   /**
-    * Some identifier that can be used in error messages
-    *
-    * @return
-    */
-   String getIdentifier();
-
-   /**
-    * For error messages
-    *
-    * @return  ejb-jar.xml, web.xml, etc..
-    */
-   String getDeploymentDescriptorType();
-
-   ClassLoader getClassloader();
-
-   Map<String, EncInjector> getEncInjectors();
-   Map<String, Map<AccessibleObject, Injector>> getEncInjections();
-
-   // EncInjectors/Handlers may need to add extra instance injectors
-   List<Injector> getInjectors();
-
-   Context getEnc();
-   Context getEncEnv();
-
-
-   PersistenceUnitDeployment getPersistenceUnitDeployment(String unitName) throws NameNotFoundException;
-
-   Container resolveEjbContainer(String link, Class businessIntf);
-   Container resolveEjbContainer(Class businessIntf) throws NameNotFoundException;
-   String getEjbJndiName(Class businessInterface) throws NameNotFoundException;
-   String getEjbJndiName(String link, Class businessInterface);
-
-   /**
-    * If class has container overridable annotations, this method will
-    * discover those overriden annotations.
-    *
-    * @param annotationType
-    * @param clazz
-    * @return
-    */
-   <T> T getAnnotation(Class<T> annotationType, Class clazz);
-   
-   /**
-    * If class has container overridable annotations, this method will
-    * discover those overriden annotations.
-
-    * @param annotationType
-    * @param clazz
-    * @param method
-    * @return
-    */
-   <T> T getAnnotation(Class<T> annotationType, Class clazz, Method method);
-   
-   <T> T getAnnotation(Class<T> annotationType, Method method);
-
-   /**
-    * If class has container overridable annotations, this method will
-    * discover those overriden annotations.
-
-    * @param annotationType
-    * @param clazz
-    * @param field
-    * @return
-    */
-   <T> T getAnnotation(Class<T> annotationType, Class clazz, Field field);
-   
-   <T> T getAnnotation(Class<T> annotationType, Field field);
-
-   DependencyPolicy getDependencyPolicy();
-   
-   EnvironmentRefGroup getEnvironmentRefGroup();
-   
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionContainer.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/InjectionContainer.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionHandler.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/InjectionHandler.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,43 +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 org.jboss.injection;
-
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public interface InjectionHandler
-{
-   public void loadXml(EnvironmentRefGroup xml, InjectionContainer container);
-   public void handleClassAnnotations(Class clazz, InjectionContainer container);
-   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors);
-   public void handleFieldAnnotations(Field Field, InjectionContainer container, Map<AccessibleObject, Injector> injectors);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionHandler.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/InjectionHandler.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionUtil.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/InjectionUtil.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionUtil.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,291 +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 org.jboss.injection;
-
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.InjectionTarget;
-import org.jboss.metamodel.descriptor.Ref;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56046 $
- */
-public class InjectionUtil
-{
-   private static final Logger log = Logger
-           .getLogger(InjectionUtil.class);
-
-
-   /**
-    * This method will take a set of XML loaded injectors and collapse them based on spec inheritance rules
-    * It will remove injectors that should not be used in the injection of the base component class.
-    *
-    * @param visitedMethods
-    * @param clazz
-    * @param xmlDefinedInjectors
-    * @param classInjectors
-    */
-   public static void collapseXmlMethodInjectors(Set<String> visitedMethods, Class clazz, Map<String, Map<AccessibleObject, Injector>> xmlDefinedInjectors, Map<AccessibleObject, Injector> classInjectors)
-   {
-      if (clazz == null || clazz.equals(Object.class))
-      {
-         return;
-      }
-      Map<AccessibleObject, Injector> xmlInjectors = xmlDefinedInjectors.get(clazz.getName());
-      if (xmlInjectors != null)
-      {
-         Method[] methods = clazz.getDeclaredMethods();
-         for (Method method : methods)
-         {
-            if (method.getParameterTypes().length != 1) continue;
-
-            if (!Modifier.isPrivate(method.getModifiers()))
-            {
-               if (visitedMethods.contains(method.getName()))
-               {
-                  xmlInjectors.remove(method); // if not private then it has been overriden
-                  continue;
-               }
-               visitedMethods.add(method.getName());
-            }
-         }
-         classInjectors.putAll(xmlInjectors);
-      }
-      // recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored
-      collapseXmlMethodInjectors(visitedMethods, clazz.getSuperclass(), xmlDefinedInjectors, classInjectors);
-   }
-
-   public static void processMethodAnnotations(InjectionContainer container, Collection<InjectionHandler> handlers, Set<String> visitedMethods, Class clazz, Map<AccessibleObject, Injector> classInjectors)
-   {
-      if (clazz == null || clazz.equals(Object.class))
-      {
-         return;
-      }
-      Method[] methods = clazz.getDeclaredMethods();
-      for (Method method : methods)
-      {
-         if (method.getParameterTypes().length != 1) continue;
-
-         if (!Modifier.isPrivate(method.getModifiers()))
-         {
-            if (visitedMethods.contains(method.getName()))
-            {
-               continue;
-            }
-            visitedMethods.add(method.getName());
-         }
-        
-         if (handlers != null)
-         {
-            for (InjectionHandler handler : handlers)
-            {
-               handler.handleMethodAnnotations(method, container, classInjectors);
-            }
-         }
-      }
-      // recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored
-      processMethodAnnotations(container, handlers, visitedMethods, clazz.getSuperclass(), classInjectors);
-   }
-
-   public static void processFieldAnnotations(InjectionContainer container, Collection<InjectionHandler> handlers, Class clazz, Map<AccessibleObject, Injector> classInjectors)
-   {
-      if (clazz == null || clazz.equals(Object.class))
-      {
-         return;
-      }
- 
-      if (handlers != null)
-      {
-         Field[] fields = clazz.getDeclaredFields();
-         for (Field field : fields)
-         {
-            for (InjectionHandler handler : handlers)
-            {
-               handler.handleFieldAnnotations(field, container, classInjectors);
-            }
-         }
-      }
-      
-      // recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored
-      processFieldAnnotations(container, handlers, clazz.getSuperclass(), classInjectors);
-   }
-
-   public static void processClassAnnotations(InjectionContainer container, Collection<InjectionHandler> handlers, Class clazz)
-   {
-      if (clazz == null || clazz.equals(Object.class))
-      {
-         return;
-      }
-    
-      if (handlers != null)
-      {
-         for (InjectionHandler handler : handlers)
-         {
-            handler.handleClassAnnotations(clazz, container);
-         }
-      }
-      
-      // recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored
-      processClassAnnotations(container, handlers, clazz.getSuperclass());
-   }
-
-   public static Map<AccessibleObject, Injector> processAnnotations(InjectionContainer container, Collection<InjectionHandler> handlers, Class clazz)
-   {
-      Map<AccessibleObject, Injector> classInjectors = new HashMap<AccessibleObject, Injector>();
-      HashSet<String> visitedMethods = new HashSet<String>();
-      collapseXmlMethodInjectors(visitedMethods, clazz, container.getEncInjections(), classInjectors);
-
-      processClassAnnotations(container, handlers, clazz);
-      visitedMethods = new HashSet<String>();
-      processMethodAnnotations(container, handlers, visitedMethods, clazz, classInjectors);
-      processFieldAnnotations(container, handlers, clazz, classInjectors);
-      return classInjectors;
-   }
-
-   public static AccessibleObject findInjectionTarget(ClassLoader loader, InjectionTarget target)
-   {
-      Class clazz = null;
-      try
-      {
-         clazz = loader.loadClass(target.getTargetClass());
-      }
-      catch (ClassNotFoundException e)
-      {
-         throw new RuntimeException("<injection-target> class: " + target.getTargetClass() + " was not found nin deployment");
-      }
-
-      for (Field field : clazz.getDeclaredFields())
-      {
-         if (target.getTargetName().equals(field.getName())) return field;
-      }
-
-      for (java.lang.reflect.Method method : clazz.getDeclaredMethods())
-      {
-         if (method.getName().equals(target.getTargetName())) return method;
-      }
-
-      throw new RuntimeException("<injection-target> could not be found: " + target.getTargetClass() + "." + target.getTargetName());
-
-   }
-
-   public static String getEncName(Method method)
-   {
-      String encName = method.getName().substring(3);
-      if (encName.length() > 1)
-      {
-         encName = encName.substring(0, 1).toLowerCase() + encName.substring(1);
-      }
-      else
-      {
-         encName = encName.toLowerCase();
-      }
-
-      encName = "env/" + method.getDeclaringClass().getName() + "/" + encName;
-      return encName;
-   }
-
-   public static String getEncName(Field field)
-   {
-      return "env/" + field.getDeclaringClass().getName() + "/" + field.getName();
-   }
-
-   public static Object getAnnotation(Class annotation, EJBContainer container, Class annotatedClass, boolean isContainer)
-   {
-      if (isContainer)
-      {
-         return container.resolveAnnotation(annotation);
-      }
-      else
-      {
-         return annotatedClass.getAnnotation(annotation);
-      }
-   }
-
-   public static Object getAnnotation(Class annotation, EJBContainer container, Method method, boolean isContainer)
-   {
-      if (isContainer)
-      {
-         return container.resolveAnnotation(method, annotation);
-      }
-      else
-      {
-         return method.getAnnotation(annotation);
-      }
-   }
-
-   public static Object getAnnotation(Class annotation, EJBContainer container, Field field, boolean isContainer)
-   {
-      if (isContainer)
-      {
-         return container.resolveAnnotation(field, annotation);
-      }
-      else
-      {
-         return field.getAnnotation(annotation);
-      }
-   }
-
-   public static Class injectionTarget(String encName, Ref ref, InjectionContainer container, Map<String, Map<AccessibleObject, Injector>> classInjectors)
-   {
-      if (ref.getInjectionTarget() != null)
-      {
-         Class injectionType;
-         // todo, get injection target class
-         AccessibleObject ao = findInjectionTarget(container.getClassloader(), ref.getInjectionTarget());
-         Map<AccessibleObject, Injector> injectors = classInjectors.get(ref.getInjectionTarget().getTargetClass());
-         if (injectors == null)
-         {
-            injectors = new HashMap<AccessibleObject, Injector>();
-            classInjectors.put(ref.getInjectionTarget().getTargetClass().trim(), injectors);
-         }
-         if (ao instanceof Field)
-         {
-            injectionType = ((Field) ao).getType();
-            injectors.put(ao, new JndiFieldInjector((Field) ao, encName, container.getEnc()));
-         }
-         else
-         {
-            injectionType = ((Method) ao).getParameterTypes()[0];
-            injectors.put(ao, new JndiMethodInjector((Method) ao, encName, container.getEnc()));
-         }
-         return injectionType;
-      }
-      else
-      {
-         return null;
-      }
-
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/InjectionUtil.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/InjectionUtil.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/Injector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/Injector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/Injector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,39 +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 org.jboss.injection;
-
-import org.jboss.ejb3.BeanContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public interface Injector
-{
-   void inject(BeanContext ctx);
-
-   void inject(Object instance);
-   
-   Class getInjectionClass();
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/Injector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/Injector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,142 +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 org.jboss.injection;
-
-import java.lang.reflect.Field;
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.jboss.logging.Logger;
-
-import org.jboss.ejb3.BeanContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56038 $
- */
-public class JndiFieldInjector implements Injector, PojoInjector
-{
-   private static final Logger log = Logger.getLogger(JndiFieldInjector.class);
-   
-   private Field field;
-   private String jndiName;
-   private Context ctx;
-
-   public JndiFieldInjector(Field field, String jndiName, Context ctx)
-   {
-      this.field = field;
-      this.field.setAccessible(true);
-      this.jndiName = jndiName;
-      this.ctx = ctx;
-   }
-
-   public JndiFieldInjector(Field field, Context ctx)
-   {
-      this(field, field.getName(), ctx);
-   }
-
-   public void inject(BeanContext bctx)
-   {
-      inject(bctx, bctx.getInstance());
-   }
-
-   public Class getInjectionClass()
-   {
-      return field.getType();
-   }
-
-   public Field getField()
-   {
-      return field;
-   }
-
-   protected Object lookup(String jndiName, Class field)
-   {
-      Object dependency = null;
-
-      try
-      {
-         dependency = ctx.lookup(jndiName);
-
-         if (dependency instanceof javax.xml.rpc.Service && !field.isAssignableFrom(javax.xml.rpc.Service.class))
-         {
-            javax.xml.rpc.Service service = (javax.xml.rpc.Service)dependency;
-            dependency = service.getPort(field);
-         }
-      }
-      catch (NamingException e)
-      {
-         e.printStackTrace();
-         throw new RuntimeException("Unable to inject jndi dependency: " + jndiName + " into field " + field, e);
-      }
-      catch (javax.xml.rpc.ServiceException e)
-      {
-         e.printStackTrace();
-         throw new RuntimeException("Unable to inject jndi webservice dependency: " + jndiName + " into field " + field, e);
-      }
-      
-      return dependency;
-   }
-   
-   public void inject(BeanContext bctx, Object instance)
-   {
-      inject(instance);
-   }
-
-   public void inject(Object instance)
-   {
-      
-      Object dependency = lookup(jndiName, field.getType());
- //     log.info("!! inject jndiName " + jndiName + " " + field.getType() + " " + dependency);
-      
-      try
-      {
- //        log.info("!!! inject " + instance + " " + field.getType() + " " + dependency.getClass());
- //        Class[] interfacs = dependency.getClass().getInterfaces();
- //        for (Class interfac : interfacs)
- //           log.info("!! interface " + interfac);
-         field.set(instance, dependency);
-      }
-      catch (IllegalArgumentException e)
-      {
-         String type = "UNKNOWN";
-         String interfaces = "";
-         if (dependency != null)
-         {
- //           log.info("!!! inject failed " + instance + " " + field.getType() + " " + dependency.getClass());
- //           Class[] interfacs = dependency.getClass().getInterfaces();
- //           for (Class interfac : interfacs)
- //              log.info("!! interface " + interfac);
-            type = dependency.getClass().getName();
-            Class[] intfs = dependency.getClass().getInterfaces();
-            for (Class intf : intfs) interfaces += ", " + intf.getName();
-         }
-         throw new RuntimeException("Non matching type for inject of field: " + field + " for type: " + type + " of jndiName " + jndiName + "\nintfs: " + interfaces, e);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiInjectHandler.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/JndiInjectHandler.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiInjectHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,96 +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 org.jboss.injection;
-
-import org.jboss.annotation.JndiInject;
-import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.metamodel.descriptor.JndiRef;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * Searches bean class for all @Inject and create Injectors
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 55144 $
- */
-public class JndiInjectHandler implements InjectionHandler
-{
-   private static final Logger log = Logger.getLogger(JndiInjectHandler.class);
-   
-   public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
-   {
-      if (xml == null) return;
-      if (xml.getJndiRefs() == null) return;
-      for (JndiRef ref : xml.getJndiRefs())
-      {
-         if (ref.getMappedName() == null || ref.getMappedName().equals(""))
-            throw new RuntimeException("mapped-name is required for " + ref.getJndiRefName() + " of container " + container.getIdentifier());
-
-         String encName = "env/" + ref.getJndiRefName();
-         if (!container.getEncInjectors().containsKey(encName))
-         {
-            container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.getMappedName(), "jndi ref"));
-         }
-         InjectionUtil.injectionTarget(encName, ref, container, container.getEncInjections());
-      }
-   }
-
-   public void handleClassAnnotations(Class clazz, InjectionContainer container)
-   {
-      // complete
-   }
-
-   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      JndiInject ref = method.getAnnotation(JndiInject.class);
-      if (ref != null)
-      {
-         if (!method.getName().startsWith("set"))
-            throw new RuntimeException("@EJB can only be used with a set method: " + method);
-         String encName = InjectionUtil.getEncName(method);
-         if (!container.getEncInjectors().containsKey(encName))
-         {
-            container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.jndiName(), "@JndiInject"));
-         }
-         injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
-      }
-   }
-   
-   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      JndiInject ref = field.getAnnotation(JndiInject.class);
-      if (ref != null)
-      {
-         String encName = InjectionUtil.getEncName(field);
-         if (!container.getEncInjectors().containsKey(encName))
-         {
-            container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.jndiName(), "@JndiInject"));
-         }
-         injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiInjectHandler.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/JndiInjectHandler.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,120 +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 org.jboss.injection;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class JndiMethodInjector implements Injector, PojoInjector
-{
-   private static final Logger log = Logger.getLogger(JndiMethodInjector.class);
-   
-   private Method setMethod;
-   private String jndiName;
-   private Context ctx;
-
-   public JndiMethodInjector(Method setMethod, String jndiName, Context ctx)
-   {
-      this.setMethod = setMethod;
-      setMethod.setAccessible(true);
-      this.jndiName = jndiName;
-      this.ctx = ctx;
-   }
-
-   public void inject(BeanContext bctx)
-   {
-      inject(bctx, bctx.getInstance());
-   }
-   
-   public Class getInjectionClass()
-   {
-      return setMethod.getParameterTypes()[0];
-   }
-   
-   protected Object lookup(String jndiName, Class param)
-   {
-      Object dependency = null;
-      
-      try
-      {
-         dependency = ctx.lookup(jndiName);
-            
-         if (dependency instanceof javax.xml.rpc.Service && !param.isAssignableFrom(javax.xml.rpc.Service.class))
-         {
-            javax.xml.rpc.Service service = (javax.xml.rpc.Service)dependency;
-            dependency = service.getPort(param);
-         }
-      }
-      catch (NamingException e)
-      {
-         e.printStackTrace();
-         throw new RuntimeException("Unable to @Inject jndi dependency: " + jndiName + " into method " + setMethod, e);
-      }
-      catch (javax.xml.rpc.ServiceException e)
-      {
-         e.printStackTrace();
-         throw new RuntimeException("Unable to @Inject webservice jndi dependency: " + jndiName + " into method " + setMethod, e);
-      }
-      
-      return dependency;
-   }
-   
-   public void inject(BeanContext bctx, Object instance)
-   {
-      inject(instance);
-   }
-
-   public void inject(Object instance)
-   {
-      Object dependency = lookup(jndiName, setMethod.getParameterTypes()[0]);
-
-      Object[] args = {dependency};
-      try
-      {
-         setMethod.invoke(instance, args);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         String type = "UNKNOWN";
-         if (dependency != null) type = dependency.getClass().getName();
-         throw new RuntimeException("Non matching type for @Inject of setter: " + setMethod + " for type: " + type, e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (InvocationTargetException e)
-      {
-         throw new RuntimeException(e.getCause());  //To change body of catch statement use Options | File Templates.
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/LinkRefEncInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/LinkRefEncInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/LinkRefEncInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,59 +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 org.jboss.injection;
-
-import org.jboss.naming.Util;
-
-import javax.naming.LinkRef;
-import javax.naming.NamingException;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56518 $
- */
-public class LinkRefEncInjector implements EncInjector
-{
-   private String jndiName;
-   private String error;
-   private String encName;
-
-   public LinkRefEncInjector(String name, String mappedName, String error)
-   {
-      this.jndiName = mappedName;
-      this.error = error;
-      this.encName = name;
-   }
-
-   public void inject(InjectionContainer container)
-   {
-      try
-      {
-         Util.rebind(container.getEnc(), encName, new LinkRef(jndiName));
-      }
-      catch (NamingException e)
-      {
-         throw new RuntimeException(new StringBuilder().append("could not bind enc name '").append(encName).append("' for ").append(error).append(" for container ").append(container.getIdentifier()).append(e.getMessage()).toString());
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/LinkRefEncInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/LinkRefEncInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PcEncInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PcEncInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PcEncInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,123 +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 org.jboss.injection;
-
-import org.jboss.ejb3.entity.ManagedEntityManagerFactory;
-import org.jboss.ejb3.entity.ExtendedEntityManager;
-import org.jboss.ejb3.entity.ExtendedHibernateSession;
-import org.jboss.ejb3.entity.TransactionScopedEntityManager;
-import org.jboss.ejb3.entity.TransactionScopedHibernateSession;
-import org.jboss.ejb3.stateful.StatefulContainer;
-import org.jboss.naming.Util;
-
-import javax.persistence.PersistenceContextType;
-import javax.persistence.EntityManager;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56518 $
- */
-public class PcEncInjector implements EncInjector
-{
-   private String encName;
-   private String unitName;
-   private PersistenceContextType type;
-   private Class injectionType;
-   private String error;
-
-   public PcEncInjector(String encName, String unitName, PersistenceContextType type, Class injectionType, String error)
-   {
-      this.encName = encName;
-      this.unitName = unitName;
-      this.type = type;
-      this.injectionType = injectionType;
-      this.error = error;
-   }
-
-   public void inject(InjectionContainer container)
-   {
-      String error1 = error;
-      ManagedEntityManagerFactory factory = null;
-      try
-      {
-         factory = PersistenceUnitHandler.getManagedEntityManagerFactory(
-                 container, unitName);
-      }
-      catch (NameNotFoundException e)
-      {
-         error1 += " " + e.getMessage();
-      }
-      if (factory == null)
-      {
-         throw new RuntimeException(error1);
-      }
-      if (type == PersistenceContextType.EXTENDED)
-      {
-         if (!(container instanceof StatefulContainer))
-            throw new RuntimeException("It is illegal to inject an EXTENDED PC into something other than a SFSB");
-         container.getInjectors().add(0, new ExtendedPersistenceContextInjector(factory));
-         Object extendedPc = null;
-         if (injectionType == null
-                 || injectionType.getName().equals(EntityManager.class.getName()))
-         {
-            extendedPc = new ExtendedEntityManager(factory.getKernelName());
-         }
-         else
-         {
-            extendedPc = new ExtendedHibernateSession(factory.getKernelName());
-         }
-         try
-         {
-            Util.rebind(container.getEnc(), encName, extendedPc);
-         }
-         catch (NamingException e)
-         {
-            throw new RuntimeException(error1, e);
-         }
-      }
-      else
-      {
-         Object entityManager = null;
-         if (injectionType == null
-                 || injectionType.getName().equals(EntityManager.class.getName()))
-         {
-            entityManager = new TransactionScopedEntityManager(factory);
-         }
-         else
-         {
-            entityManager = new TransactionScopedHibernateSession(factory);
-         }
-         try
-         {
-            Util.rebind(container.getEnc(), encName, entityManager);
-         }
-         catch (NamingException e)
-         {
-            throw new RuntimeException(error1, e);
-         }
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PcEncInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PcEncInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceContextHandler.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PersistenceContextHandler.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceContextHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,193 +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 org.jboss.injection;
-
-import org.jboss.metamodel.descriptor.PersistenceContextRef;
-import org.jboss.logging.Logger;
-import org.jboss.annotation.IgnoreDependency;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-
-import javax.naming.NameNotFoundException;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
-import javax.persistence.PersistenceContexts;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * Searches bean class for all
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 55144 $
- * @Inject and create Injectors
- */
-public class PersistenceContextHandler implements InjectionHandler
-{
-   private static final Logger log = Logger
-           .getLogger(PersistenceContextHandler.class);
-
-   public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
-   {
-      if (xml == null) return;
-      if (xml.getPersistenceContextRefs() == null) return;
-      for (PersistenceContextRef ref : xml.getPersistenceContextRefs())
-      {
-         String encName = "env/" + ref.getRefName();
-         // we add injection target no matter what.  enc injection might be overridden but
-         // XML injection cannot be overriden
-         Class injectionType = InjectionUtil.injectionTarget(encName, ref, container, container.getEncInjections());
-
-         if (container.getEncInjectors().containsKey(encName))
-            continue;
-         // add it to list of
-         String error = "unable to load <persistence-context-ref> for unitName: "
-                 + ref.getUnitName() + " <ref-name>: " + ref.getRefName();
-         PersistenceContextType type = ref.getPersistenceContextType();
-         String unitName = ref.getUnitName();
-         container.getEncInjectors().put(encName, new PcEncInjector(encName, unitName, type, injectionType, error));
-         try
-         {
-            PersistenceUnitHandler.addPUDependency(ref.getUnitName(), container);
-         }
-         catch (NameNotFoundException e)
-         {
-            throw new RuntimeException("Illegal <persistence-context-ref> of " + ref.getRefName() + " :" + e.getMessage());
-         }
-      }
-   }
-
-   public void handleClassAnnotations(Class clazz, InjectionContainer container)
-   {
-      PersistenceContexts resources = container.getAnnotation(PersistenceContexts.class, clazz);
-      if (resources != null)
-      {
-         for (PersistenceContext ref : resources.value())
-         {
-            loadPersistenceContextClassAnnotation(ref, container, clazz);
-         }
-      }
-      PersistenceContext pc = container.getAnnotation(PersistenceContext.class, clazz);
-
-      if (pc != null)
-      {
-         loadPersistenceContextClassAnnotation(pc, container, clazz);
-      }
-
-   }
-
-   private static void loadPersistenceContextClassAnnotation(
-           PersistenceContext ref, InjectionContainer container, Class clazz)
-   {
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         throw new RuntimeException(
-                 "JBoss requires name() for class level @PersistenceContext");
-      }
-      encName = "env/" + ref.name();
-      if (container.getEncInjectors().containsKey(encName)) return;
-
-      String error = "Unable to load class-level @PersistenceContext("
-              + ref.unitName() + ") on " + container.getIdentifier();
-      container.getEncInjectors().put(encName, new PcEncInjector(encName, ref.unitName(), ref.type(), null, error));
-      try
-      {
-         PersistenceUnitHandler.addPUDependency(ref.unitName(), container);
-      }
-      catch (NameNotFoundException e)
-      {
-         throw new RuntimeException("Illegal @PersistenceUnit on " + clazz.getName() + " of unitname " + ref.unitName() + " :" + e.getMessage());
-      }
-   }
-
-   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      PersistenceContext ref = method.getAnnotation(PersistenceContext.class);
-      if (ref == null) return;
-      if (!method.getName().startsWith("set"))
-         throw new RuntimeException("@PersistenceUnit can only be used with a set method: " + method);
-
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         encName = InjectionUtil.getEncName(method);
-      }
-      else
-      {
-         encName = "env/" + ref.name();
-      }
-      if (!container.getEncInjectors().containsKey(encName))
-      {
-         try
-         {
-            if (!method.isAnnotationPresent(IgnoreDependency.class)) PersistenceUnitHandler.addPUDependency(ref.unitName(), container);
-         }
-         catch (NameNotFoundException e)
-         {
-            throw new RuntimeException("Illegal @PersistenceUnit on " + method + " :" + e.getMessage());
-         }
-         String error = "@PersistenceContext(name='" + encName
-                 + "',unitName='" + ref.unitName() + "') on EJB: "
-                 + container.getIdentifier() + " failed to inject on method "
-                 + method.toString();
-         container.getEncInjectors().put(encName, new PcEncInjector(encName, ref.unitName(), ref.type(), method.getParameterTypes()[0], error));
-      }
-      injectors.put(method, new JndiMethodInjector(method,
-              encName, container.getEnc()));
-   }
-
-   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      PersistenceContext ref = field.getAnnotation(PersistenceContext.class);
-      if (ref == null) return;
-
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         encName = InjectionUtil.getEncName(field);
-      }
-      else
-      {
-         encName = "env/" + ref.name();
-      }
-      if (!container.getEncInjectors().containsKey(encName))
-      {
-         try
-         {
-            if (!field.isAnnotationPresent(IgnoreDependency.class)) PersistenceUnitHandler.addPUDependency(ref.unitName(), container);
-         }
-         catch (NameNotFoundException e)
-         {
-            throw new RuntimeException("Illegal @PersistenceUnit on " + field + " :" + e.getMessage());
-         }
-         String error = "@PersistenceContext(name='" + encName
-                 + "',unitName='" + ref.unitName() + "') on EJB: "
-                 + container.getIdentifier() + " failed to inject on field "
-                 + field.toString();
-         container.getEncInjectors().put(encName, new PcEncInjector(encName, ref.unitName(), ref.type(), field.getType(), error));
-      }
-      injectors.put(field, new JndiFieldInjector(field,
-              encName, container.getEnc()));
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceContextHandler.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PersistenceContextHandler.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceUnitHandler.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PersistenceUnitHandler.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceUnitHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,252 +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 org.jboss.injection;
-
-import org.hibernate.SessionFactory;
-import org.jboss.annotation.IgnoreDependency;
-import org.jboss.ejb3.entity.InjectedEntityManagerFactory;
-import org.jboss.ejb3.entity.InjectedSessionFactory;
-import org.jboss.ejb3.entity.ManagedEntityManagerFactory;
-import org.jboss.ejb3.entity.PersistenceUnitDeployment;
-import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.metamodel.descriptor.PersistenceUnitRef;
-
-import javax.naming.NameNotFoundException;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.PersistenceUnit;
-import javax.persistence.PersistenceUnits;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * Searches bean class for all @Inject and create Injectors
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 55144 $
- */
-public class PersistenceUnitHandler implements InjectionHandler
-{
-   private static final Logger log = Logger
-           .getLogger(PersistenceContextHandler.class);
-
-   public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
-   {
-      if (xml == null) return;
-      if (xml.getPersistenceUnitRefs() == null) return;
-
-      for (PersistenceUnitRef ref : xml.getPersistenceUnitRefs())
-      {
-         String encName = "env/" + ref.getRefName();
-         // we add injection target no matter what.  enc injection might be overridden but
-         // XML injection cannot be overriden
-         Class injectionType = InjectionUtil.injectionTarget(encName, ref, container, container.getEncInjections());
-         if (container.getEncInjectors().containsKey(encName))
-            return;
-         container.getEncInjectors().put(encName, new PuEncInjector(encName, injectionType, ref.getUnitName(), "<persistence-unit-ref>"));
-         try
-         {
-            addPUDependency(ref.getUnitName(), container);
-         }
-         catch (NameNotFoundException e)
-         {
-            throw new RuntimeException("Illegal <persistence-unit-ref> of " + ref.getRefName() + " :" + e.getMessage());
-         }
-      }
-   }
-
-
-   public void handleClassAnnotations(Class clazz, InjectionContainer container)
-   {
-      PersistenceUnits resources = container.getAnnotation(
-              PersistenceUnits.class, clazz);
-      if (resources != null)
-      {
-         for (PersistenceUnit ref : resources.value())
-         {
-            handleClassAnnotation(ref, container, clazz);
-         }
-      }
-      PersistenceUnit pu = container.getAnnotation(PersistenceUnit.class, clazz);
-      if (pu != null)
-      {
-         handleClassAnnotation(pu, container, clazz);
-      }
-   }
-
-   private static void handleClassAnnotation(PersistenceUnit ref, InjectionContainer container, Class clazz)
-   {
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         throw new RuntimeException("JBoss requires name() for class level @PersistenceUnit");
-      }
-      encName = "env/" + encName;
-      if (container.getEncInjectors().containsKey(encName)) return;
-      container.getEncInjectors().put(encName, new PuEncInjector(encName, null, ref.unitName(), "@PersistenceUnit"));
-      try
-      {
-         addPUDependency(ref.unitName(), container);
-      }
-      catch (NameNotFoundException e)
-      {
-         throw new RuntimeException("Illegal @PersistenceUnit on " + clazz.getName() + " of unitname " + ref.unitName() + " :" + e.getMessage());
-      }
-   }
-
-   public static void addPUDependency(String unitName, InjectionContainer container) throws NameNotFoundException
-   {
-      PersistenceUnitDeployment deployment = null;
-      // look in EAR first
-      deployment = container.getPersistenceUnitDeployment(unitName);
-      if (deployment != null)
-      {
-         container.getDependencyPolicy().addDependency(deployment.getKernelName());
-         return;
-      }
-      // probably not deployed yet.
-      // todo not sure if we should do this in JBoss 5
-      container.getDependencyPolicy().addDependency(PersistenceUnitDeployment.getDefaultKernelName(unitName));
-   }
-
-   public static ManagedEntityManagerFactory getManagedEntityManagerFactory(InjectionContainer container, String unitName)
-           throws NameNotFoundException
-   {
-      ManagedEntityManagerFactory factory;
-      PersistenceUnitDeployment deployment = container.getPersistenceUnitDeployment(unitName);
-      if (deployment != null)
-      {
-         factory = deployment.getManagedFactory();
-      }
-      else
-      {
-         throw new NameNotFoundException("Unable to find persistence unit: " + unitName + " for deployment: " + container.getIdentifier());
-      }
-      return factory;
-   }
-
-
-   public static EntityManagerFactory getEntityManagerFactory(PersistenceUnit ref, InjectionContainer container) throws NameNotFoundException
-   {
-      return getEntityManagerFactory(ref.unitName(), container);
-   }
-
-   public static Object getFactory(Class type, String unitName, InjectionContainer container) throws NameNotFoundException
-   {
-      if (type != null && type.getName().equals(SessionFactory.class.getName()))
-         return getSessionFactory(unitName, container);
-      return getEntityManagerFactory(unitName, container);
-   }
-
-   public static EntityManagerFactory getEntityManagerFactory(String unitName, InjectionContainer container) throws NameNotFoundException
-   {
-      ManagedEntityManagerFactory managedFactory;
-      PersistenceUnitDeployment deployment = container.getPersistenceUnitDeployment(unitName);
-      if (deployment != null)
-      {
-         managedFactory = deployment.getManagedFactory();
-      }
-      else
-      {
-         return null;
-      }
-      return new InjectedEntityManagerFactory(managedFactory);
-   }
-
-
-   private static SessionFactory getSessionFactory(String ref, InjectionContainer container) throws NameNotFoundException
-   {
-      ManagedEntityManagerFactory managedFactory;
-      PersistenceUnitDeployment deployment = container.getPersistenceUnitDeployment(ref);
-      if (deployment != null)
-      {
-         managedFactory = deployment.getManagedFactory();
-      }
-      else
-      {
-         return null;
-      }
-      return new InjectedSessionFactory(managedFactory);
-   }
-
-   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      PersistenceUnit ref = method.getAnnotation(PersistenceUnit.class);
-      if (ref == null) return;
-      if (!method.getName().startsWith("set"))
-         throw new RuntimeException("@PersistenceUnit can only be used with a set method: " + method);
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         encName = InjectionUtil.getEncName(method);
-      }
-      else
-      {
-         encName = "env/" + encName;
-      }
-      if (!container.getEncInjectors().containsKey(encName))
-      {
-         container.getEncInjectors().put(encName, new PuEncInjector(encName, method.getParameterTypes()[0], ref.unitName(), "@PersistenceUnit"));
-         try
-         {
-            if (!method.isAnnotationPresent(IgnoreDependency.class)) addPUDependency(ref.unitName(), container);
-         }
-         catch (NameNotFoundException e)
-         {
-            throw new RuntimeException("Illegal @PersistenceUnit on " + method + " :" + e.getMessage());
-         }
-      }
-
-      injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
-   }
-
-   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      PersistenceUnit ref = field.getAnnotation(PersistenceUnit.class);
-      if (ref == null) return;
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         encName = InjectionUtil.getEncName(field);
-      }
-      else
-      {
-         encName = "env/" + encName;
-      }
-      if (!container.getEncInjectors().containsKey(encName))
-      {
-         container.getEncInjectors().put(encName, new PuEncInjector(encName, field.getType(), ref.unitName(), "@PersistenceUnit"));
-         try
-         {
-            if (!field.isAnnotationPresent(IgnoreDependency.class)) addPUDependency(ref.unitName(), container);
-         }
-         catch (NameNotFoundException e)
-         {
-            throw new RuntimeException("Illegal @PersistenceUnit on " + field + " :" + e.getMessage());
-         }
-      }
-
-      injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PersistenceUnitHandler.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PersistenceUnitHandler.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PojoInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PojoInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PojoInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -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 org.jboss.injection;
-
-import org.jboss.ejb3.BeanContext;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 46510 $
- */
-public interface PojoInjector
-{
-   void inject(BeanContext ctx, Object instance);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PojoInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PojoInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PuEncInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PuEncInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PuEncInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,74 +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 org.jboss.injection;
-
-import org.jboss.naming.Util;
-
-import javax.naming.NameNotFoundException;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56518 $
- */
-public class PuEncInjector implements EncInjector
-{
-   private String encName;
-   private Class injectionType;
-   private String unitName;
-   private String error;
-
-   public PuEncInjector(String encName, Class injectionType, String unitName, String error)
-   {
-      this.encName = encName;
-      this.injectionType = injectionType;
-      this.error = error;
-      this.unitName = unitName;
-   }
-
-   public void inject(InjectionContainer container)
-   {
-      Object factory = null;
-      try
-      {
-         factory = PersistenceUnitHandler.getFactory(injectionType, unitName, container);
-      }
-      catch (NameNotFoundException e)
-      {
-         throw new RuntimeException(e);
-      }
-      if (factory == null)
-      {
-         throw new RuntimeException("Failed to locate " + error + " of unit name: " + unitName + " for " + container.getIdentifier());
-      }
-
-      try
-      {
-         Util.rebind(container.getEnc(), encName, factory);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("Failed to bind " + error + " of unit name: " + unitName + " ref-name" + encName + " for container " + container.getIdentifier(), e);
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/PuEncInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/PuEncInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ResourceHandler.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/ResourceHandler.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ResourceHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,312 +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 org.jboss.injection;
-
-import org.jboss.ejb3.Container;
-import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.EnvEntry;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-
-import javax.annotation.Resource;
-import javax.annotation.Resources;
-import javax.ejb.EJBContext;
-import javax.ejb.TimerService;
-import javax.transaction.UserTransaction;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.Map;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-/**
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 56236 $
- */
-public class ResourceHandler implements InjectionHandler
-{
-   private static final Logger log = Logger.getLogger(ResourceHandler.class);
-
-   private static void loadEnvEntry(InjectionContainer container, Collection<EnvEntry> envEntries)
-   {
-      for (EnvEntry envEntry : envEntries)
-      {
-         String encName = "env/" + envEntry.getEnvEntryName();
-         InjectionUtil.injectionTarget(encName, envEntry, container, container.getEncInjections());
-         if (container.getEncInjectors().containsKey(encName)) continue;
-         container.getEncInjectors().put(encName, new EnvEntryEncInjector(encName, envEntry.getEnvEntryType(), envEntry.getEnvEntryValue()));
-      }
-   }
-
-   private static void loadXmlResourceRefs(InjectionContainer container, Collection<ResourceRef> refs)
-   {
-      for (ResourceRef envRef : refs)
-      {
-         String encName = "env/" + envRef.getResRefName();
-         if (container.getEncInjectors().containsKey(encName)) continue;
-         if (envRef.getMappedName() == null || envRef.getMappedName().equals(""))
-         {
-            if (envRef.getResUrl() != null)
-            {
-               try
-               {
-                  container.getEncInjectors().put(encName, new ValueEncInjector(encName, new URL(envRef.getResUrl().trim()), "<resource-ref>"));
-               }
-               catch (MalformedURLException e)
-               {
-                  throw new RuntimeException(e);
-               }
-            }
-            else
-            {
-               throw new RuntimeException("mapped-name is required for " + envRef.getResRefName() + " of deployment " + container.getIdentifier());
-            }
-         }
-         container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, envRef.getMappedName(), "<resource-ref>"));
-         InjectionUtil.injectionTarget(encName, envRef, container, container.getEncInjections());
-      }
-   }
-
-   private static void loadXmlResourceEnvRefs(InjectionContainer container, Collection<ResourceEnvRef> refs)
-   {
-      for (ResourceEnvRef envRef : refs)
-      {
-         String encName = "env/" + envRef.getResRefName();
-         if (container.getEncInjectors().containsKey(encName)) continue;
-         if (envRef.getMappedName() == null || envRef.getMappedName().equals(""))
-         {
-            throw new RuntimeException("mapped-name is required for " + envRef.getResRefName() + " of deployment " + container.getIdentifier());
-         }
-         container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, envRef.getMappedName(), "<resource-ref>"));
-         InjectionUtil.injectionTarget(encName, envRef, container, container.getEncInjections());
-      }
-   }
-
-   private static void loadXmlMessageDestinationRefs(InjectionContainer container, Collection<MessageDestinationRef> refs)
-   {
-      for (MessageDestinationRef envRef : refs)
-      {
-         String encName = "env/" + envRef.getMessageDestinationRefName();
-         if (container.getEncInjectors().containsKey(encName)) continue;
-         if (envRef.getMappedName() == null || envRef.getMappedName().equals(""))
-         {
-            // Look for a message-destination-link
-            String link = envRef.getMessageDestinationLink();
-            if( link != null )
-            {
-               // TODO: Resolve the link...
-            }
-            throw new RuntimeException("mapped-name is required for " + envRef.getMessageDestinationRefName() + " of deployment " + container.getIdentifier());
-         }
-         container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, envRef.getMappedName(), "<message-destination-ref>"));
-         InjectionUtil.injectionTarget(encName, envRef, container, container.getEncInjections());
-      }
-   }
-
-   public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
-   {
-      if (xml == null) return;
-      if (xml.getMessageDestinationRefs() != null) loadXmlMessageDestinationRefs(container, xml.getMessageDestinationRefs());
-      if (xml.getResourceEnvRefs() != null) loadXmlResourceEnvRefs(container, xml.getResourceEnvRefs());
-      if (xml.getResourceRefs() != null) loadXmlResourceRefs(container, xml.getResourceRefs());
-      if (xml.getEnvEntries() != null) loadEnvEntry(container, xml.getEnvEntries());
-   }
-
-   public void handleClassAnnotations(Class clazz, InjectionContainer container)
-   {
-      Resources resources = container.getAnnotation(Resources.class, clazz);
-      if (resources != null)
-      {
-      for (Resource ref : resources.value())
-      {
-         handleClassAnnotation(ref, container, clazz);
-      }
-      }
-      Resource res = container.getAnnotation(Resource.class, clazz);
-      if (res != null) handleClassAnnotation(res, container, clazz);
-   }
-
-   private void handleClassAnnotation(Resource ref, InjectionContainer container, Class clazz)
-   {
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         throw new RuntimeException("JBoss requires name() for class level @Resource");
-      }
-      encName = "env/" + ref.name();
-      if (container.getEncInjectors().containsKey(encName)) return;
-
-      String mappedName = ref.mappedName();
-      if (mappedName == null || mappedName.equals(""))
-      {
-         throw new RuntimeException("You did not specify a @Resource.mappedName() on " + clazz.getName() + " and there is no binding for that enc name in XML");
-      }
-      container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@Resource"));
-   }
-
-
-   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      Resource ref = method.getAnnotation(Resource.class);
-      if (ref == null) return;
-
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         encName = InjectionUtil.getEncName(method);
-      }
-      else
-      {
-         encName = "env/" + encName;
-      }
-
-      method.setAccessible(true);
-
-      if (!method.getName().startsWith("set"))
-         throw new RuntimeException("@Resource can only be used with a set method: " + method);
-      if (method.getParameterTypes().length != 1)
-         throw new RuntimeException("@Resource can only be used with a set method of one parameter: " + method);
-
-      Class type = method.getParameterTypes()[0];
-      if (!ref.type().equals(Object.class))
-      {
-         type = ref.type();
-      }
-      if (type.equals(UserTransaction.class))
-      {
-         injectors.put(method, new UserTransactionMethodInjector(method, container));
-      }
-      else if (type.equals(TimerService.class))
-      {
-         injectors.put(method, new TimerServiceMethodInjector(method, (Container) container)); // only EJBs
-      }
-      else if (EJBContext.class.isAssignableFrom(type))
-      {
-         injectors.put(method, new EJBContextMethodInjector(method));
-      }
-      else if (type.equals(String.class)
-              || type.equals(Character.class)
-              || type.equals(Byte.class)
-              || type.equals(Short.class)
-              || type.equals(Integer.class)
-              || type.equals(Long.class)
-              || type.equals(Boolean.class)
-              || type.equals(Double.class)
-              || type.equals(Float.class)
-              || type.isPrimitive()
-              )
-      {
-
-         // don't add an injector if no XML <env-entry is present as there will be no value to inject
-         if (container.getEncInjectors().containsKey(encName))
-         {
-            injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
-         }
-      }
-      else
-      {
-         if (!container.getEncInjectors().containsKey(encName))
-         {
-            String mappedName = ref.mappedName();
-            if (mappedName == null || mappedName.equals(""))
-            {
-              throw new RuntimeException("You did not specify a @Resource.mappedName() on " + method + " and there is no binding for that enc name in XML");
-            }
-            container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@Resource"));
-         }
-         injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
-      }
-   }
-   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      Resource ref = field.getAnnotation(Resource.class);
-      if (ref == null) return;
-
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         encName = InjectionUtil.getEncName(field);
-      }
-      else
-      {
-         encName = "env/" + encName;
-      }
-
-      field.setAccessible(true);
-
-      Class type = field.getType();
-      if (!ref.type().equals(Object.class))
-      {
-         type = ref.type();
-      }
-      if (type.equals(UserTransaction.class))
-      {
-         injectors.put(field, new UserTransactionFieldInjector(field, container));
-      }
-      else if (type.equals(TimerService.class))
-      {
-         injectors.put(field, new TimerServiceFieldInjector(field, (Container) container)); // only EJBs
-      }
-      else if (EJBContext.class.isAssignableFrom(type))
-      {
-         injectors.put(field, new EJBContextFieldInjector(field));
-      }
-      else if (type.equals(String.class)
-              || type.equals(Character.class)
-              || type.equals(Byte.class)
-              || type.equals(Short.class)
-              || type.equals(Integer.class)
-              || type.equals(Long.class)
-              || type.equals(Boolean.class)
-              || type.equals(Double.class)
-              || type.equals(Float.class)
-              || type.isPrimitive()
-              )
-      {
-
-         // don't add an injector if no XML <env-entry is present as there will be no value to inject
-         if (container.getEncInjectors().containsKey(encName))
-         {
-            injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
-         }
-      }
-      else
-      {
-         if (!container.getEncInjectors().containsKey(encName))
-         {
-            String mappedName = ref.mappedName();
-            if (mappedName == null || mappedName.equals(""))
-            {
-              throw new RuntimeException("You did not specify a @Resource.mappedName() on " + field + " and there is no binding for that enc name in XML");
-            }
-            container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@Resource"));
-         }
-         injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
-      }
-   }
-
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ResourceHandler.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/ResourceHandler.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceFieldInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/TimerServiceFieldInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceFieldInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,71 +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 org.jboss.injection;
-
-import java.lang.reflect.Field;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.ejb3.Container;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class TimerServiceFieldInjector implements Injector
-{
-   private Field field;
-   private Container container;
-
-   public TimerServiceFieldInjector(Field field, Container container)
-   {
-      this.field = field;
-      this.field.setAccessible(true);
-      this.container = container;
-   }
-
-   public void inject(Object instance)
-   {
-      throw new RuntimeException("SHOULD NOT BE INVOKED");
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      try
-      {
-         field.set(ctx.getInstance(), container.getTimerService());
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException("Failed in setting EntityManager on setter field: " + field.toString());
-      }
-   }
-   
-   public Class getInjectionClass()
-   {
-      return field.getType();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceFieldInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/TimerServiceFieldInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceMethodInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/TimerServiceMethodInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceMethodInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,78 +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 org.jboss.injection;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.ejb3.Container;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class TimerServiceMethodInjector implements Injector
-{
-   private Method setMethod;
-   private Container container;
-
-   public TimerServiceMethodInjector(Method setMethod, Container container)
-   {
-      this.setMethod = setMethod;
-      setMethod.setAccessible(true);
-      this.container = container;
-   }
-
-   public void inject(Object instance)
-   {
-      throw new RuntimeException("SHOULD NOT BE INVOKED");
-   }
-
-   public void inject(BeanContext ctx)
-   {
-
-      Object[] args = {container.getTimerService()};
-      try
-      {
-         setMethod.invoke(ctx.getInstance(), args);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException("Failed in setting EntityManager on setter method: " + setMethod.toString());
-      }
-      catch (InvocationTargetException e)
-      {
-         throw new RuntimeException(e.getCause());  //To change body of catch statement use Options | File Templates.
-      }
-   }
-   
-   public Class getInjectionClass()
-   {
-      return setMethod.getParameterTypes()[0];
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/TimerServiceMethodInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/TimerServiceMethodInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionFieldInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/UserTransactionFieldInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionFieldInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,82 +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 org.jboss.injection;
-
-import java.lang.reflect.Field;
-import javax.ejb.TransactionManagementType;
-import javax.transaction.UserTransaction;
-import org.jboss.aop.Advisor;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.tx.TxUtil;
-import org.jboss.ejb3.tx.UserTransactionImpl;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class UserTransactionFieldInjector implements Injector
-{
-   private Field field;
-
-   public UserTransactionFieldInjector(Field field, InjectionContainer container)
-   {
-      if (container instanceof Container)
-      {
-         TransactionManagementType type = TxUtil.getTransactionManagementType(((Advisor) container));
-         if (type != TransactionManagementType.BEAN)
-            throw new IllegalStateException("Container " + ((Container) container).getEjbName() + ": it is illegal to inject UserTransaction into a CMT bean");
-      }
-      this.field = field;
-      this.field.setAccessible(true);
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      Object instance = ctx.getInstance();
-      inject(instance);
-   }
-
-   public void inject(Object instance)
-   {
-      UserTransaction ut = new UserTransactionImpl();
-      try
-      {
-         field.set(instance, ut);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException("Failed in setting EntityManager on setter field: " + field.toString());
-      }
-   }
-
-   public Class getInjectionClass()
-   {
-      return field.getType();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionFieldInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/UserTransactionFieldInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionMethodInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/UserTransactionMethodInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionMethodInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,89 +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 org.jboss.injection;
-
-import org.jboss.aop.Advisor;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.tx.TxUtil;
-import org.jboss.ejb3.tx.UserTransactionImpl;
-
-import javax.ejb.TransactionManagementType;
-import javax.transaction.UserTransaction;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class UserTransactionMethodInjector implements Injector
-{
-   private Method setMethod;
-
-   public UserTransactionMethodInjector(Method setMethod, InjectionContainer container)
-   {
-      if (container instanceof Container)
-      {
-         TransactionManagementType type = TxUtil.getTransactionManagementType(((Advisor) container));
-         if (type != TransactionManagementType.BEAN)
-            throw new IllegalStateException("Container " + ((Container) container).getEjbName() + ": it is illegal to inject UserTransaction into a CMT bean");
-      }
-      this.setMethod = setMethod;
-      setMethod.setAccessible(true);
-   }
-
-   public void inject(BeanContext ctx)
-   {
-      Object instance = ctx.getInstance();
-      inject(instance);
-   }
-
-   public void inject(Object instance)
-   {
-      UserTransaction ut = new UserTransactionImpl();
-      Object[] args = {ut};
-      try
-      {
-         setMethod.invoke(instance, args);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException("Failed in setting EntityManager on setter method: " + setMethod.toString());
-      }
-      catch (InvocationTargetException e)
-      {
-         throw new RuntimeException(e.getCause());  //To change body of catch statement use Options | File Templates.
-      }
-   }
-
-   public Class getInjectionClass()
-   {
-      return setMethod.getParameterTypes()[0];
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/UserTransactionMethodInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/UserTransactionMethodInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ValueEncInjector.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/ValueEncInjector.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ValueEncInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,59 +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 org.jboss.injection;
-
-import org.jboss.naming.Util;
-
-import javax.naming.LinkRef;
-import javax.naming.NamingException;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46510 $
- */
-public class ValueEncInjector implements EncInjector
-{
-   private Object obj;
-   private String encName;
-   private String error;
-
-   public ValueEncInjector(String name, Object obj, String error)
-   {
-      this.obj = obj;
-      this.encName = name;
-      this.error = error;
-   }
-
-   public void inject(InjectionContainer container)
-   {
-      try
-      {
-         Util.rebind(container.getEnc(), encName, obj);
-      }
-      catch (NamingException e)
-      {
-         throw new RuntimeException(new StringBuilder().append("could not bind enc name '").append(encName).append("' for ").append(error).append(" for container ").append(container.getIdentifier()).append(e.getMessage()).toString());
-      }
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/ValueEncInjector.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/ValueEncInjector.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/WebServiceHandler.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/injection/WebServiceHandler.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/WebServiceHandler.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,122 +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 org.jboss.injection;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-import org.jboss.metamodel.descriptor.WebServiceRef;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.logging.Logger;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 55144 $</tt>
- */
-public class WebServiceHandler implements InjectionHandler
-{
-   private static final Logger log = Logger.getLogger(WebServiceHandler.class);
-
-   public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
-   {
-      if (xml == null) return;
-      if (xml.getWebServiceRefs() == null) return;
-      for (WebServiceRef wsRef : xml.getWebServiceRefs())
-      {
-         if (wsRef.getMappedName() == null || wsRef.getMappedName().equals(""))
-            throw new RuntimeException("mapped-name is required for <service-ref> " + wsRef.getServiceRefName() + " of " + container.getIdentifier());
-
-         String encName = "env/" + wsRef.getServiceRefName();
-         if (!container.getEncInjectors().containsKey(encName))
-         {
-            container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, wsRef.getMappedName(), "jndi ref"));
-         }
-         InjectionUtil.injectionTarget(encName, wsRef, container, container.getEncInjections());
-      }
-   }
-
-   public void handleClassAnnotations(Class clazz, InjectionContainer container)
-   {
-      javax.xml.ws.WebServiceRef ref = container.getAnnotation(javax.xml.ws.WebServiceRef.class, clazz);
-      if (ref == null) return;
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         throw new RuntimeException("JBoss requires name() for class level @WebServiceRef");
-      }
-      encName = "env/" + ref.name();
-      if (container.getEncInjectors().containsKey(encName)) return;
-
-      String mappedName = ref.mappedName();
-      if (mappedName == null || mappedName.equals(""))
-      {
-         throw new RuntimeException("You did not specify a @WebServiceRef.mappedName() on " + clazz.getName() + " and there is no binding for that enc name in XML");
-      }
-      container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@WebServiceRef"));
-   }
-
-   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      javax.xml.ws.WebServiceRef ref = method.getAnnotation(javax.xml.ws.WebServiceRef.class);
-      if (ref == null) return;
-      if (!method.getName().startsWith("set"))
-         throw new RuntimeException("@ javax.xml.ws.WebServiceRef can only be used with a set method: " + method);
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         encName = InjectionUtil.getEncName(method);
-      }
-      else
-      {
-         encName = "env/" + encName;
-      }
-      if (!container.getEncInjectors().containsKey(encName))
-      {
-         container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@ javax.xml.ws.WebServiceRef"));
-      }
-
-      injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
-   }
-
-   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
-   {
-      javax.xml.ws.WebServiceRef ref = field.getAnnotation(javax.xml.ws.WebServiceRef.class);
-      if (ref == null) return;
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
-      {
-         encName = InjectionUtil.getEncName(field);
-      }
-      else
-      {
-         encName = "env/" + encName;
-      }
-      if (!container.getEncInjectors().containsKey(encName))
-      {
-         container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@ javax.xml.ws.WebServiceRef"));
-      }
-
-      injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/injection/WebServiceHandler.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/injection/WebServiceHandler.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/BaseEjbRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/BaseEjbRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/BaseEjbRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,76 +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 org.jboss.metamodel.descriptor;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46506 $
- */
-public class BaseEjbRef extends Ref
-{
-   protected String ejbRefName;
-   protected String ejbRefType;
-   private String ejbLink;
-   protected String mappedName;
-
-   public String getMappedName()
-   {
-      return mappedName;
-   }
-
-   public void setMappedName(String mappedName)
-   {
-      this.mappedName = mappedName;
-   }
-
-   public String getEjbRefName()
-   {
-      return ejbRefName;
-   }
-
-   public void setEjbRefName(String ejbRefName)
-   {
-      this.ejbRefName = ejbRefName;
-   }
-
-   public String getEjbRefType()
-   {
-      return ejbRefType;
-   }
-
-   public void setEjbRefType(String ejbRefType)
-   {
-      this.ejbRefType = ejbRefType;
-   }
-
-   public String getEjbLink()
-   {
-      return ejbLink;
-   }
-
-   public void setEjbLink(String ejbLink)
-   {
-      this.ejbLink = ejbLink;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/BaseEjbRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/BaseEjbRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,583 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-
-import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.EnvEntry;
-import org.jboss.metamodel.descriptor.InjectionTarget;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.SecurityRole;
-import org.xml.sax.Attributes;
-
-import javax.persistence.PersistenceContextType;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 56531 $</tt>
- */
-public abstract class DDObjectFactory implements ObjectModelFactory
-{
-   private static final Logger log = Logger
-   .getLogger(DDObjectFactory.class);
-
-   public Object newChild(PersistenceUnitRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(PersistenceContextRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(EnvEntry ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(EjbRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(EjbLocalRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(ResourceRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(ResourceEnvRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(MessageDestinationRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(WebServiceRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public Object newChild(JndiRef ref,
-                          UnmarshallingContext navigator, String namespaceURI, String localName,
-                          Attributes attrs)
-   {
-      return newRefChild(ref, localName);
-   }
-
-   public void addChild(PersistenceUnitRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(PersistenceContextRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(EnvEntry parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(EjbRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(EjbLocalRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(ResourceRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(ResourceEnvRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(MessageDestinationRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(WebServiceRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void addChild(JndiRef parent, InjectionTarget target,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      parent.setInjectionTarget(target);
-   }
-
-   public void setValue(EjbLocalRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("ejb-ref-name"))
-      {
-         ref.setEjbRefName(getValue(localName, value));
-      }
-      else if (localName.equals("ejb-ref-type"))
-      {
-         ref.setEjbRefType(getValue(localName, value));
-      }
-      else if (localName.equals("local-home"))
-      {
-         ref.setLocalHome(getValue(localName, value));
-      }
-      else if (localName.equals("local"))
-      {
-         ref.setLocal(getValue(localName, value));
-      }
-      else if (localName.equals("ejb-link"))
-      {
-         ref.setEjbLink(getValue(localName, value));
-      }
-      else if (localName.equals("mapped-name") || localName.equals("local-jndi-name") || localName.equals("jndi-name"))
-      {
-         ref.setMappedName(getValue(localName, value));
-      }
-      else if (localName.equals("ignore-dependency"))
-      {
-         ref.setIgnoreDependency(true);
-      }
-   }
-
-   public void setValue(EjbRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("ejb-ref-name"))
-      {
-         ref.setEjbRefName(getValue(localName, value));
-      }
-      else if (localName.equals("ejb-ref-type"))
-      {
-         ref.setEjbRefType(getValue(localName, value));
-      }
-      else if (localName.equals("home"))
-      {
-         ref.setHome(getValue(localName, value));
-      }
-      else if (localName.equals("remote"))
-      {
-         ref.setRemote(getValue(localName, value));
-      }
-      else if (localName.equals("ejb-link"))
-      {
-         ref.setEjbLink(getValue(localName, value));
-      }
-      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
-      {
-         ref.setMappedName(getValue(localName, value));
-      }
-      else if (localName.equals("ignore-dependency"))
-      {
-         ref.setIgnoreDependency(true);
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(InjectionTarget target, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("injection-target-class"))
-      {
-         target.setTargetClass(getValue(localName, value));
-      }
-      else if (localName.equals("injection-target-name"))
-      {
-         target.setTargetName(getValue(localName, value));
-      }
-   }
-
-   /**
-    * Called when a child element with simple content is read for DD.
-    */
-   public void setValue(MessageDestinationRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("description"))
-      {
-         ref.setDescription(getValue(localName, value));
-      }
-      else if (localName.equals("message-destination-ref-name"))
-      {
-         ref.setMessageDestinationRefName(getValue(localName, value));
-      }
-      else if (localName.equals("message-destination-type"))
-      {
-         ref.setMessageDestinationType(getValue(localName, value));
-      }
-      else if (localName.equals("message-destination-usage"))
-      {
-         ref.setMessageDestinationUsage(getValue(localName, value));
-      }
-      else if (localName.equals("message-destination-link"))
-      {
-         ref.setMessageDestinationLink(getValue(localName, value));
-      }
-      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
-      {
-         ref.setMappedName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(EnvEntry entry, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("description"))
-      {
-         entry.setDescription(getValue(localName, value));
-      }
-      else if (localName.equals("env-entry-name"))
-      {
-         entry.setEnvEntryName(getValue(localName, value));
-      }
-      else if (localName.equals("env-entry-type"))
-      {
-         entry.setEnvEntryType(getValue(localName, value));
-      }
-      else if (localName.equals("env-entry-value"))
-      {
-         entry.setEnvEntryValue(getValue(localName, value));
-      }
-   }
-
-   public void setValue(ResourceEnvRef envRef, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("res-ref-name")
-              || localName.equals("resource-env-ref-name"))
-      {
-         envRef.setResRefName(getValue(localName, value));
-      }
-      else if (localName.equals("res-type")
-              || localName.equals("resource-env-ref-type"))
-      {
-         envRef.setResType(getValue(localName, value));
-      }
-      else if (localName.equals("res-auth"))
-      {
-         envRef.setResAuth(getValue(localName, value));
-      }
-      else if (localName.equals("res-sharing-scope"))
-      {
-         envRef.setResSharingScope(getValue(localName, value));
-      }
-      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
-      {
-         envRef.setMappedName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(ResourceRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("res-ref-name")
-              || localName.equals("resource-env-ref-name"))
-      {
-         ref.setResRefName(getValue(localName, value));
-      }
-      else if (localName.equals("res-type")
-              || localName.equals("resource-env-ref-type"))
-      {
-         ref.setResType(getValue(localName, value));
-      }
-      else if (localName.equals("res-auth"))
-      {
-         ref.setResAuth(getValue(localName, value));
-      }
-      else if (localName.equals("res-sharing-scope"))
-      {
-         ref.setResSharingScope(getValue(localName, value));
-      }
-      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
-      {
-         ref.setMappedName(getValue(localName, value));
-         ref.setJndiName(getValue(localName, value));
-      }
-      else if (localName.equals("res-url"))
-      {
-         ref.setResUrl(getValue(localName, value));
-      }
-      else if (localName.equals("resource-name"))
-      {
-         ref.setResourceName(getValue(localName, value));
-         ref.setMappedName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(WebServiceRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("service-ref-name"))
-      {
-         ref.setServiceRefName(getValue(localName, value));
-      }
-      else if (localName.equals("service-res-type"))
-      {
-         ref.setResType(getValue(localName, value));
-      }
-      else if (localName.equals("service-interface"))
-      {
-         ref.setServiceInterface(getValue(localName, value));
-      }
-      else if (localName.equals("wsdl-file"))
-      {
-         ref.setWsdlFile(getValue(localName, value));
-      }
-      else if (localName.equals("jaxrpc-mapping-file"))
-      {
-         ref.setJaxRpcMappingFile(getValue(localName, value));
-      }
-      else if (localName.equals("mapped-name"))
-      {
-         ref.setMappedName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(SecurityRole role, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("role-name"))
-      {
-         role.setRoleName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(JndiRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("mapped-name"))
-      {
-         ref.setMappedName(getValue(localName, value));
-      }
-      else if (localName.equals("jndi-ref-name"))
-      {
-         ref.setJndiRefName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(RunAs runAs, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("role-name"))
-      {
-         runAs.setRoleName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(SecurityRoleRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("role-name"))
-      {
-         ref.setRoleName(getValue(localName, value));
-      }
-      else if (localName.equals("role-link"))
-      {
-         ref.setRoleLink(getValue(localName, value));
-      }
-   }
-
-   public void setValue(Listener listener, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("listener-class"))
-      {
-         listener.setListenerClass(getValue(localName, value));
-      }
-   }
-
-   public void setValue(MessageDestination destination, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("message-destination-name"))
-      {
-         destination.setMessageDestinationName(getValue(localName, value));
-      }
-      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
-      {
-         destination.setMappedName(getValue(localName, value));
-      }
-   }
-
-   public void setValue(PersistenceUnitRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("persistence-unit-ref-name"))
-      {
-         ref.setRefName(getValue(localName, value));
-      }
-      else if (localName.equals("persistence-unit-name"))
-      {
-         ref.setUnitName(getValue(localName, value));
-      }
-      else
-      {
-         throw new RuntimeException("INVALID element<" + localName + "> in <persistence-unit-ref>");
-      }
-   }
-
-   protected Object newEnvRefGroupChild(String localName)
-   {
-      Object child = null;
-
-      if (localName.equals("ejb-local-ref"))
-      {
-         child = new EjbLocalRef();
-      }
-      else if (localName.equals("ejb-ref"))
-      {
-         child = new EjbRef();
-      }
-      else if (localName.equals("resource-ref"))
-      {
-         child = new ResourceRef();
-      }
-      else if (localName.equals("resource-env-ref"))
-      {
-         child = new ResourceEnvRef();
-      }
-      else if (localName.equals("env-entry"))
-      {
-         child = new EnvEntry();
-      }
-      else if (localName.equals("message-destination-ref"))
-      {
-         child = new MessageDestinationRef();
-      }
-      else if (localName.equals("service-ref"))
-      {
-         child = new WebServiceRef();
-      }
-      else if (localName.equals("jndi-ref"))
-      {
-         child = new JndiRef();
-      }
-      else if (localName.equals("persistence-unit-ref"))
-      {
-         child = new PersistenceUnitRef();
-      }
-      else if (localName.equals("persistence-context-ref"))
-      {
-         child = new PersistenceContextRef();
-      }
-
-      return child;
-   }
-
-   protected Object newRefChild(Ref ref, String localName)
-   {
-      Object child = null;
-
-      if (localName.equals("ignore-dependency"))
-      {
-         ref.setIgnoreDependency(true);
-      }
-      else if (localName.equals("injection-target"))
-      {
-         InjectionTarget target = new InjectionTarget();
-         child = target;
-      }
-
-      return child;
-   }
-
-   public void setValue(PersistenceContextRef ref, UnmarshallingContext navigator,
-                        String namespaceURI, String localName, String value)
-   {
-      if (localName.equals("persistence-context-ref-name"))
-      {
-         ref.setRefName(getValue(localName, value));
-      }
-      else if (localName.equals("persistence-unit-name"))
-      {
-         ref.setUnitName(getValue(localName, value));
-      }
-      else if(localName.equals("persistence-context-type"))
-      {
-         if (value.toLowerCase().equals("transaction"))
-         {
-            ref.setPersistenceContextType(PersistenceContextType.TRANSACTION);
-         }
-         else
-         {
-            ref.setPersistenceContextType(PersistenceContextType.EXTENDED);
-         }
-      }
-   }
-   
-   protected String getValue(String name, String value)
-   {
-      return value;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,65 +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 org.jboss.metamodel.descriptor;
-
-/**
- * Represents an ejb-local-ref element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 46506 $</tt>
- */
-public class EjbLocalRef extends BaseEjbRef
-{
-   private String localHome;
-
-   private String local;
-
-   public String getLocalHome()
-   {
-      return localHome;
-   }
-
-   public void setLocalHome(String localHome)
-   {
-      this.localHome = localHome;
-   }
-
-   public String getLocal()
-   {
-      return local;
-   }
-
-   public void setLocal(String local)
-   {
-      this.local = local;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbRefName=").append(ejbRefName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/EjbRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,69 +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 org.jboss.metamodel.descriptor;
-
-/**
- * Represents an ejb-ref element of the ejb-jar.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 46506 $</tt>
- */
-public class EjbRef extends BaseEjbRef
-{
-
-   private String home;
-   
-   private String remote;
-
-   public String getHome()
-   {
-      return home;
-   }
-
-   public void setHome(String home)
-   {
-      this.home = home;
-   }
-
-   public String getRemote()
-   {
-      return remote;
-   }
-
-   public void setRemote(String remote)
-   {
-      this.remote = remote;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("ejbRefName=").append(ejbRefName);
-      sb.append(", ejbRefType=").append(ejbRefType);
-      sb.append(", remote=").append(remote);
-      sb.append(", jndiName=").append(mappedName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EjbRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/EjbRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvEntry.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/EnvEntry.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvEntry.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,91 +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 org.jboss.metamodel.descriptor;
-
-/**
- * Represents an env-entry element of the ejb-jar.xml deployment descriptor for
- * the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45240 $</tt>
- */
-public class EnvEntry extends Ref
-{
-   private String description;
-
-   private String envEntryName;
-
-   private String envEntryType;
-
-   private String envEntryValue;
-
-   public String getDescription()
-   {
-      return description;
-   }
-
-   public void setDescription(String description)
-   {
-      this.description = description;
-   }
-
-   public String getEnvEntryName()
-   {
-      return envEntryName;
-   }
-
-   public void setEnvEntryName(String envEntryName)
-   {
-      this.envEntryName = envEntryName;
-   }
-
-   public String getEnvEntryType()
-   {
-      return envEntryType;
-   }
-
-   public void setEnvEntryType(String envEntryType)
-   {
-      this.envEntryType = envEntryType;
-   }
-
-   public String getEnvEntryValue()
-   {
-      return envEntryValue;
-   }
-
-   public void setEnvEntryValue(String envEntryValue)
-   {
-      this.envEntryValue = envEntryValue;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("envEntryName=").append(envEntryName);
-      sb.append(",envEntryType=").append(envEntryType);
-      sb.append(",envEntryValue=").append(envEntryValue);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvEntry.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/EnvEntry.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,249 +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 org.jboss.metamodel.descriptor;
-
-import java.util.HashMap;
-import java.util.Collection;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.jboss.logging.Logger;
-
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.EnvEntry;
-import org.jboss.metamodel.descriptor.JndiRef;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.WebServiceRef;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 56237 $</tt>
- */
-public abstract class EnvironmentRefGroup
-{
-   private static final Logger log = Logger.getLogger(EnvironmentRefGroup.class);
-
-   protected HashMap<String, EjbLocalRef> ejbLocalRefs = new HashMap<String, EjbLocalRef>();
-   protected HashMap<String, EjbRef> ejbRefs = new HashMap<String, EjbRef>();
-   protected HashMap<String, EnvEntry> envEntries = new HashMap<String, EnvEntry>();
-   protected HashMap<String, ResourceEnvRef> resourceEnvRefs = new HashMap<String, ResourceEnvRef>();
-   protected HashMap<String, ResourceRef> resourceRefs = new HashMap<String, ResourceRef>();
-   protected HashMap<String, MessageDestinationRef> messageDestinationRefs = new HashMap<String, MessageDestinationRef>();
-   /** An index of MessageDestinationRef keyed by message-destination-link values */
-   protected HashMap<String, MessageDestinationRef> messageDestinationRefsByLink = new HashMap<String, MessageDestinationRef>();
-   protected HashMap<String, WebServiceRef> webServiceRefs = new HashMap<String, WebServiceRef>();
-   protected HashMap<String, JndiRef> jndiRefs = new HashMap<String, JndiRef>();
-   protected List<PersistenceContextRef> persistenceContextRefs = new ArrayList<PersistenceContextRef>();
-   protected List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
-
-   public Collection<MessageDestinationRef> getMessageDestinationRefs()
-   {
-      return messageDestinationRefs.values();
-   }
-
-   public void addMessageDestinationRef(MessageDestinationRef ref)
-   {
-      log.debug("addMessageDestinationRef, "+ref);
-      messageDestinationRefs.put(ref.getMessageDestinationRefName(), ref);
-      String link = ref.getMessageDestinationLink();
-      if( link != null )
-      {
-         messageDestinationRefsByLink.put(link, ref);
-      }
-   }
-
-   public Collection<EjbLocalRef> getEjbLocalRefs()
-   {
-      return ejbLocalRefs.values();
-   }
-
-   public void addEjbLocalRef(EjbLocalRef ref)
-   {
-      ejbLocalRefs.put(ref.getEjbRefName(), ref);
-   }
-
-   public Collection<EjbRef> getEjbRefs()
-   {
-      return ejbRefs.values();
-   }
-
-   public void addEjbRef(EjbRef ref)
-   {
-      ejbRefs.put(ref.getEjbRefName(), ref);
-   }
-  
-   public Collection<EnvEntry> getEnvEntries()
-   {
-      return envEntries.values();
-   }
-
-   public void addEnvEntry(EnvEntry entry)
-   {
-      envEntries.put(entry.getEnvEntryName(), entry);
-   }
-
-   public Collection<ResourceEnvRef> getResourceEnvRefs()
-   {
-      return resourceEnvRefs.values();
-   }
-
-   public void addResourceEnvRef(ResourceEnvRef envRef)
-   {
-      resourceEnvRefs.put(envRef.getResRefName(), envRef);
-   }
-   
-   public Collection<ResourceRef> getResourceRefs()
-   {
-      return resourceRefs.values();
-   }
-
-   public void addResourceRef(ResourceRef ref)
-   {
-      resourceRefs.put(ref.getResRefName(), ref);
-   }
-   
-   public Collection<JndiRef> getJndiRefs()
-   {
-      return jndiRefs.values();
-   }
-
-   public void addJndiRef(JndiRef ref)
-   {
-      jndiRefs.put(ref.getJndiRefName(), ref);
-   }
-   
-   public Collection<WebServiceRef> getWebServiceRefs()
-   {
-      return webServiceRefs.values();
-   }
-
-   public void addWebServiceRef(WebServiceRef ref)
-   {
-      webServiceRefs.put(ref.getServiceRefName(), ref);
-   }
-   
-   public void updateEjbRef(EjbRef updatedRef)
-   {
-      EjbRef ref = (EjbRef)ejbRefs.get(updatedRef.getEjbRefName());
-      if (ref != null)
-      {
-         ref.setMappedName(updatedRef.getMappedName());
-         ref.setIgnoreDependency(updatedRef.isIgnoreDependency());
-      }
-      else
-      {
-         ejbRefs.put(updatedRef.getEjbRefName(), updatedRef);
-      }
-   }
-
-   public void updateEjbLocalRef(EjbLocalRef updatedRef)
-   {
-      EjbLocalRef ref = (EjbLocalRef)ejbLocalRefs.get(updatedRef.getEjbRefName());
-      if (ref != null)
-      {
-         ref.setMappedName(updatedRef.getMappedName());
-         ref.setIgnoreDependency(updatedRef.isIgnoreDependency());
-      }
-      else
-      {
-         ejbLocalRefs.put(updatedRef.getEjbRefName(), updatedRef);
-      }
-   }
-   
-   public void updateResourceRef(ResourceRef updatedRef)
-   {
-      ResourceRef ref = (ResourceRef)resourceRefs.get(updatedRef.getResRefName());
-      if (ref != null)
-      {
-         ref.setMappedName(updatedRef.getMappedName());
-         ref.setResUrl(updatedRef.getResUrl());
-         ref.setResourceName(updatedRef.getResourceName());
-      }
-      else
-      {
-         resourceRefs.put(updatedRef.getResRefName(), updatedRef);
-      }
-   }
-   
-   public void updateResourceEnvRef(ResourceEnvRef updatedRef)
-   {
-      ResourceEnvRef ref = (ResourceEnvRef)resourceEnvRefs.get(updatedRef.getResRefName());
-      if (ref != null)
-      {
-         ref.setMappedName(updatedRef.getMappedName());
-      }
-      else
-      {
-         resourceEnvRefs.put(updatedRef.getResRefName(), updatedRef);
-      }
-   }
-   
-   public void updateMessageDestinationRef(MessageDestinationRef updatedRef)
-   {
-      log.debug("updateMessageDestinationRef, "+updatedRef);
-      MessageDestinationRef ref = (MessageDestinationRef)messageDestinationRefs.get(updatedRef.getMessageDestinationRefName());
-      if (ref != null)
-      {
-         ref.setMappedName(updatedRef.getMappedName());
-      }
-      else
-      {
-         messageDestinationRefs.put(updatedRef.getMessageDestinationRefName(), updatedRef);
-         ref = updatedRef;
-      }
-   }
- 
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      return sb.toString();
-   }
-
-   public List<PersistenceContextRef> getPersistenceContextRefs()
-   {
-      return persistenceContextRefs;
-   }
-
-   public List<PersistenceUnitRef> getPersistenceUnitRefs()
-   {
-      return persistenceUnitRefs;
-   }
-
-   public void addPersistenceContextRef(PersistenceContextRef ref)
-   {
-      persistenceContextRefs.add(ref);
-   }
-
-   public void addPersistenceUnitRef(PersistenceUnitRef ref)
-   {
-      persistenceUnitRefs.add(ref);
-   }
-
-   public MessageDestinationRef getMessageDestinationRefForLink(String link)
-   {
-      MessageDestinationRef ref = messageDestinationRefsByLink.get(link);
-      return ref;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/InjectionTarget.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/InjectionTarget.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/InjectionTarget.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,64 +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 org.jboss.metamodel.descriptor;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 45240 $
- */
-public class InjectionTarget
-{
-   private String targetClass;
-   private String targetName;
-
-   public String getTargetClass()
-   {
-      return targetClass;
-   }
-
-   public void setTargetClass(String targetClass)
-   {
-      this.targetClass = targetClass;
-   }
-
-   public String getTargetName()
-   {
-      return targetName;
-   }
-
-   public void setTargetName(String targetName)
-   {
-      this.targetName = targetName;
-   }
-   
-   public String toString()
-   {
-      StringBuffer buffer = new StringBuffer(100);
-      buffer.append("[InjectionTarget:targetClass=" + targetClass);
-      buffer.append(", targetName=" + targetName);
-      buffer.append("]");
-      
-      return buffer.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/InjectionTarget.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/InjectionTarget.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/JndiRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/JndiRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/JndiRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,70 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-import org.jboss.metamodel.descriptor.InjectionTarget;
-
-/**
- * Represents a <jndi-ref> element of the jboss.xml deployment descriptor
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45249 $</tt>
- */
-public class JndiRef extends Ref
-{
-   private static final Logger log = Logger.getLogger(JndiRef.class);
-   
-   private String jndiRefName;
-   
-   private String mappedName;
-   
-   public String getJndiRefName()
-   {
-      return jndiRefName;
-   }
-
-   public void setJndiRefName(String jndiRefName)
-   {
-      this.jndiRefName = jndiRefName;
-   }
-
-   public String getMappedName()
-   {
-      return mappedName;
-   }
-
-   public void setMappedName(String mappedName)
-   {
-      this.mappedName = mappedName;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[" + this.getClass().getName() + ": ");
-      sb.append("mappedName=").append(mappedName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/JndiRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/JndiRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Listener.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/Listener.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Listener.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,53 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-/**
- * Represents a <listener> element of the deployment descriptor
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class Listener
-{
-   private static final Logger log = Logger.getLogger(Listener.class);
-   
-   protected String clazz;
-   
-   public String getListenerClass()
-   {
-      return clazz;
-   }
-   
-   public void setListenerClass(String clazz)
-   {
-      this.clazz = clazz;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Listener.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/Listener.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestination.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestination.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestination.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,71 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-
-/**
- * Represents a <message-destination> element of the web.xml deployment descriptor for the
- * 2.5 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class MessageDestination
-{
-   private static final Logger log = Logger.getLogger(MessageDestination.class);
-
-   private String messageDestinationName;
-
-   private String mappedName;
-
-   public String getMappedName()
-   {     
-      return mappedName;
-   }
-
-   public void setMappedName(String mappedName)
-   {
-      this.mappedName = mappedName;
-   }
-   
-   public String getMessageDestinationName()
-   {
-      return messageDestinationName;
-   }
-
-   public void setMessageDestinationName(String messageDestinationName)
-   {
-      this.messageDestinationName = messageDestinationName;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("messageDestinationRefName=").append(messageDestinationName);
-      sb.append(", mappedName=").append(mappedName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestination.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestination.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestinationRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestinationRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestinationRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,145 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-
-/**
- * Represents a <message-destination-ref> element of the ejb-jar.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 56237 $</tt>
- */
-public class MessageDestinationRef extends Ref
-{
-   private static final Logger log = Logger.getLogger(MessageDestinationRef.class);
-   
-   private String description;
-
-   private String messageDestinationRefName;
-
-   private String messageDestinationType;
-
-   private String messageDestinationUsage;
-
-   private String messageDestinationLink;
-
-   private String mappedName;
-   
-   private String jndiName;
-   
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-   }
-
-   public String getMappedName()
-   {     
-      return mappedName;
-   }
-
-   public void setMappedName(String mappedName)
-   {
-      this.mappedName = mappedName;
-   }
-
-   public String getDescription()
-   {
-      return description;
-   }
-
-   public void setDescription(String description)
-   {
-      this.description = description;
-   }
-
-   public String getMessageDestinationRefName()
-   {
-      return messageDestinationRefName;
-   }
-
-   public void setMessageDestinationRefName(String messageDestinationRefName)
-   {
-      this.messageDestinationRefName = messageDestinationRefName;
-   }
-
-   public String getMessageDestinationType()
-   {
-      return messageDestinationType;
-   }
-
-   public void setMessageDestinationType(String messageDestinationType)
-   {
-      this.messageDestinationType = messageDestinationType;
-   }
-
-   public String getMessageDestinationUsage()
-   {
-      return messageDestinationUsage;
-   }
-
-   public void setMessageDestinationUsage(String messageDestinationUsage)
-   {
-      this.messageDestinationUsage = messageDestinationUsage;
-   }
-
-   public String getMessageDestinationLink()
-   {
-      return messageDestinationLink;
-   }
-
-   public void setMessageDestinationLink(String messageDestinationLink)
-   {
-      this.messageDestinationLink = messageDestinationLink;
-   }
-   
-   public void merge(MessageDestinationRef ref)
-   {
-      if (ref.getJndiName() != null)
-      {
-         this.setJndiName(ref.getJndiName());
-         
-         setMappedName(ref.getJndiName());
-      }
-   }
-
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("messageDestinationRefName=").append(messageDestinationRefName);
-      sb.append(", messageDestinationType=").append(messageDestinationType);
-      sb.append(", messageDestinationLink=").append(messageDestinationLink);
-      sb.append(", messageDestinationUsage=").append(messageDestinationUsage);
-      sb.append(", mappedName=").append(mappedName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestinationRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/MessageDestinationRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/NameValuePair.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/NameValuePair.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/NameValuePair.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,66 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class NameValuePair
-{
-   private static final Logger log = Logger.getLogger(NameValuePair.class);
-
-   private String name;
-   private String value;
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-   
-   public String getValue()
-   {
-      return value;
-   }
-
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append('[');
-      sb.append("name=").append(name);
-      sb.append(", value=").append(value);
-      sb.append(']');
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/NameValuePair.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/NameValuePair.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceContextRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceContextRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceContextRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,69 +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 org.jboss.metamodel.descriptor;
-
-import javax.persistence.PersistenceContextType;
-
-import org.jboss.metamodel.descriptor.Ref;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 46506 $
- */
-public class PersistenceContextRef extends Ref
-{
-   private String refName;
-   private String unitName;
-   private PersistenceContextType persistenceContextType;
-
-   public String getRefName()
-   {
-      return refName;
-   }
-
-   public void setRefName(String refName)
-   {
-      this.refName = refName;
-   }
-
-   public String getUnitName()
-   {
-      return unitName;
-   }
-
-   public void setUnitName(String unitName)
-   {
-      this.unitName = unitName;
-   }
-
-   public PersistenceContextType getPersistenceContextType()
-   {
-      return persistenceContextType;
-   }
-
-   public void setPersistenceContextType(PersistenceContextType persistenceContextType)
-   {
-      this.persistenceContextType = persistenceContextType;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceContextRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceContextRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceUnitRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceUnitRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceUnitRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,67 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.metamodel.descriptor.Ref;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 45712 $
- */
-public class PersistenceUnitRef extends Ref
-{
-   private String refName;
-   private String unitName;
-
-   public String getRefName()
-   {
-      return refName;
-   }
-
-   public void setRefName(String refName)
-   {
-      this.refName = refName;
-   }
-
-   public String getUnitName()
-   {
-      return unitName;
-   }
-
-   public void setUnitName(String unitName)
-   {
-      this.unitName = unitName;
-   }
-   
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[" + this.getClass().getName() + ": ");
-      sb.append("refName=").append(refName);
-      sb.append(", unitName=").append(unitName);
-      sb.append(", unitName=").append(unitName);
-      sb.append(", " + super.toString());
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceUnitRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/PersistenceUnitRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Ref.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/Ref.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Ref.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,61 +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 org.jboss.metamodel.descriptor;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45790 $</tt>
- */
-public abstract class Ref
-{
-   protected InjectionTarget injectionTarget;
-   private boolean ignoreDependency;
-
-   public InjectionTarget getInjectionTarget()
-   {
-      return injectionTarget;
-   }
-
-   public void setInjectionTarget(InjectionTarget injectionTarget)
-   {
-      this.injectionTarget = injectionTarget;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append(", injectionTarget=").append(injectionTarget);
-      sb.append("]");
-      return sb.toString();
-   }
-
-   public boolean isIgnoreDependency()
-   {
-      return ignoreDependency;
-   }
-
-   public void setIgnoreDependency(boolean ignoreDependency)
-   {
-      this.ignoreDependency = ignoreDependency;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/Ref.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/Ref.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceEnvRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceEnvRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceEnvRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,167 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-/**
- * Represents a <resource-env-ref> element of the ejb-jar.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45240 $</tt>
- */
-public class ResourceEnvRef extends Ref
-{
-   private static final Logger log = Logger.getLogger(ResourceEnvRef.class);
-   
-   private String resRefName;
-
-   private String resType;
-
-   private String resAuth;
-
-   private String resSharingScope;
-
-   private String mappedName;
-   
-   private String jndiName;
-   
-   private String resourceName;
-   
-   public String getResourceName()
-   {
-      return resourceName;
-   }
-
-   public void setResourceName(String resourceName)
-   {
-      this.resourceName = resourceName;
-   }
-   
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-      this.mappedName = jndiName;
-   }
-
-   public String getMappedName()
-   {
-      return mappedName;
-   }
-
-   public void setMappedName(String mappedName)
-   {
-      this.mappedName = mappedName;
-   }
-
-   public String getResRefName()
-   {
-      return resRefName;
-   }
-
-   public void setResRefName(String resRefName)
-   {
-      this.resRefName = resRefName;
-   }
-
-   public String getResType()
-   {
-      return resType;
-   }
-
-   public void setResType(String resType)
-   {
-      this.resType = resType;
-   }
-
-   public String getResAuth()
-   {
-      return resAuth;
-   }
-
-   public void setResAuth(String resAuth)
-   {
-      this.resAuth = resAuth;
-   }
-
-   public String getAuthorizationType()
-   {
-      return resAuth;
-   }
-
-   public String getResSharingScope()
-   {
-      return resSharingScope;
-   }
-
-   public void setResSharingScope(String resSharingScope)
-   {
-      this.resSharingScope = resSharingScope;
-   }
-
-   public boolean isShareable()
-   {
-      if (resSharingScope == null || resSharingScope.equals("Shareable"))
-         return true;
-      else
-         return false;
-   }
-   
-   public void merge(ResourceEnvRef ref)
-   {
-      if (ref.getJndiName() != null)
-      {
-         this.setJndiName(ref.getJndiName());
-         
-         setMappedName(ref.getJndiName());
-      }
-      
-      if (ref.getResourceName() != null)
-      {
-         this.setResourceName(ref.getResourceName());
-         
-         String mappedName = ref.getResourceName();
-         if (mappedName.startsWith("java:"))
-            this.setMappedName(ref.getResourceName());
-         else
-            this.setMappedName("java:" + ref.getResourceName());
-      }
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[ResourceEnvRef:");
-      sb.append("resRefName=").append(resRefName);
-      sb.append(",resType=").append(resType);
-      sb.append(",jndiName=").append(jndiName);
-      sb.append(",mappedName=").append(mappedName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceEnvRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceEnvRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,188 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-/**
- * Represents a <resource-ref> element of the ejb-jar.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45249 $</tt>
- */
-public class ResourceRef extends Ref
-{
-   private static final Logger log = Logger.getLogger(ResourceRef.class);
-   
-   private String resRefName;
-
-   private String resType;
-
-   private String resAuth;
-
-   private String resSharingScope;
-
-   private String mappedName;
-   
-   private String jndiName;
-   
-   private String resourceName;
-   
-   private String resUrl;
-   
-   public String getResUrl()
-   {
-      return resUrl;
-   }
-
-   public void setResUrl(String resUrl)
-   {
-      this.resUrl = resUrl;
-   }
-   
-   public String getResourceName()
-   {
-      return resourceName;
-   }
-
-   public void setResourceName(String resourceName)
-   {
-      this.resourceName = resourceName;
-   }
-   
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-   }
-
-   public String getMappedName()
-   {
-      return mappedName;
-   }
-
-   public void setMappedName(String mappedName)
-   {
-      this.mappedName = mappedName;
-   }
-
-   public String getResRefName()
-   {
-      return resRefName;
-   }
-
-   public void setResRefName(String resRefName)
-   {
-      this.resRefName = resRefName;
-   }
-
-   public String getResType()
-   {
-      return resType;
-   }
-
-   public void setResType(String resType)
-   {
-      this.resType = resType;
-   }
-
-   public String getResAuth()
-   {
-      return resAuth;
-   }
-
-   public void setResAuth(String resAuth)
-   {
-      this.resAuth = resAuth;
-   }
-
-   public String getAuthorizationType()
-   {
-      return resAuth;
- /*     if (resAuth == null || resAuth.equals("Container"))
-         return AuthenticationType.CONTAINER;
-      else
-         return AuthenticationType.APPLICATION;*/
-   }
-
-   public String getResSharingScope()
-   {
-      return resSharingScope;
-   }
-
-   public void setResSharingScope(String resSharingScope)
-   {
-      this.resSharingScope = resSharingScope;
-   }
-
-   public boolean isShareable()
-   {
-      if (resSharingScope == null || resSharingScope.equals("Shareable"))
-         return true;
-      else
-         return false;
-   }
-   
-   public void merge(ResourceRef ref)
-   {
-      if (ref.getJndiName() != null)
-      {
-         this.setJndiName(ref.getJndiName());
-         
-         String mappedName = ref.getJndiName();
-         if (mappedName.startsWith("java:"))
-            this.setMappedName(ref.getJndiName());
-         else
-            this.setMappedName("java:" + ref.getJndiName());
-      }
-      
-      if (ref.getResourceName() != null)
-      {
-         this.setResourceName(ref.getResourceName());
-         
-         String mappedName = ref.getResourceName();
-         if (mappedName.startsWith("java:"))
-            this.setMappedName(ref.getResourceName());
-         else
-            this.setMappedName("java:" + ref.getResourceName());
-      }
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[" + this.getClass().getName() + ": ");
-      sb.append("resRefName=").append(resRefName);
-      sb.append(", jndiName=").append(jndiName);
-      sb.append(", resourceName=").append(resourceName);
-      sb.append(", resType=").append(resType);
-      sb.append(", mappedName=").append(mappedName);
-      sb.append(", injectionTarget=").append(injectionTarget);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/ResourceRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/RunAs.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/RunAs.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/RunAs.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,56 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-/**
- * Represents a <run-as> element
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class RunAs
-{
-   private static final Logger log = Logger.getLogger(RunAs.class);
-   
-   private String roleName;
-    
-   public String getRoleName()
-   {
-      return roleName;
-   }
-
-   public void setRoleName(String roleName)
-   {
-      this.roleName = roleName;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[" + this.getClass().getName() + ": ");
-      sb.append("roleName=").append(roleName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/RunAs.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/RunAs.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRole.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRole.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRole.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,54 +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 org.jboss.metamodel.descriptor;
-
-
-/**
- * Represents an security-role element of the ejb-jar.xml deployment descriptor
- * for the 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45417 $</tt>
- */
-public class SecurityRole
-{
-   private String roleName = null;
-
-   public String getRoleName()
-   {
-      return roleName;
-   }
-
-   public void setRoleName(String roleName)
-   {
-      this.roleName = roleName;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("roleName=").append(roleName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRole.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRole.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRoleRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRoleRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRoleRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,64 +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 org.jboss.metamodel.descriptor;
-
-
-/**
- * Represents an <security-role-ref> 
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45409 $</tt>
- */
-public class SecurityRoleRef
-{
-   protected String roleName = null;
-   protected String roleLink = null;
-
-   public String getRoleName()
-   {
-      return roleName;
-   }
-
-   public void setRoleName(String roleName)
-   {
-      this.roleName = roleName;
-   }
-   
-   public String getRoleLink()
-   {
-      return roleLink;
-   }
-
-   public void setRoleLink(String roleLink)
-   {
-      this.roleLink = roleLink;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append("roleName=").append(roleName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRoleRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/SecurityRoleRef.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java
===================================================================
--- branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java	2006-09-12 22:05:35 UTC (rev 56787)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,135 +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 org.jboss.metamodel.descriptor;
-
-import org.jboss.logging.Logger;
-
-import org.jboss.metamodel.descriptor.Ref;
-
-/**
- * Represents a <resource-ref> element of the ejb-jar.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision: 45249 $</tt>
- */
-public class WebServiceRef extends Ref
-{
-   private static final Logger log = Logger.getLogger(WebServiceRef.class);
-   
-   private String serviceRefName;
-
-   private String resType;
-
-   private String serviceInterface;
-
-   private String wsdlFile;
-
-   private String mappedName;
-   
-   private String jndiName;
-   
-   private String jaxRpcMappingFile;
-   
-   public String getJaxRpcMappingFile()
-   {
-      return jaxRpcMappingFile;
-   }
-
-   public void setJaxRpcMappingFile(String jaxRpcMappingFile)
-   {
-      this.jaxRpcMappingFile = jaxRpcMappingFile;
-   }
-   
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-   }
-
-   public String getMappedName()
-   {
-      return mappedName;
-   }
-
-   public void setMappedName(String mappedName)
-   {
-      this.mappedName = mappedName;
-   }
-
-   public String getServiceRefName()
-   {
-      return serviceRefName;
-   }
-
-   public void setServiceRefName(String serviceRefName)
-   {
-      this.serviceRefName = serviceRefName;
-   }
-
-   public String getResType()
-   {
-      return resType;
-   }
-
-   public void setResType(String resType)
-   {
-      this.resType = resType;
-   }
-
-   public String getServiceInterface()
-   {
-      return serviceInterface;
-   }
-
-   public void setServiceInterface(String serviceInterface)
-   {
-      this.serviceInterface = serviceInterface;
-   }
-
-   public String getWsdlFile()
-   {
-      return wsdlFile;
-   }
-
-   public void setWsdlFile(String wsdlFile)
-   {
-      this.wsdlFile = wsdlFile;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[" + this.getClass().getName() + ": ");
-      sb.append("serviceRefName=").append(serviceRefName);
-      sb.append(", jndiName=").append(jndiName);
-      sb.append(", jaxRpcMappingFile=").append(jaxRpcMappingFile);
-      sb.append(", resType=").append(resType);
-      sb.append(", mappedName=").append(mappedName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java (from rev 56787, branches/Branch_4_0/ejb3/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/ejb3-interceptors-aop.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/ejb3-interceptors-aop.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/ejb3-interceptors-aop.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -281,26 +281,10 @@
          <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
       </bind>
       <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
-         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
+         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30, timeout=10000)
       </annotation>
    </domain>
-
-   <domain name="Message Inflow Driven Bean">
-      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
-         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
-      </bind>
-      <bind pointcut="execution(public * *->*(..))">
-         <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
-         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
-         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
-         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
-         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
-      </bind>
-      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
-         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
-      </annotation>
-   </domain>
-
+   
    <domain name="Consumer Bean">
       <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
          <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
@@ -318,7 +302,7 @@
          <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
       </bind>
       <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
-         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
+         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30, timeout=10000)
       </annotation>
    </domain>
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/ejb3-timer-service.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/ejb3-timer-service.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/application-client_5.xsd
===================================================================
(Binary files differ)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/application_5.xsd
===================================================================
(Binary files differ)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/ejb-jar_3_0.xsd (from rev 56789, branches/Branch_4_0/ejb3/src/resources/schema/ejb-jar_3_0.xsd)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/ejb-jar_3_0a.xsd
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/ejb-jar_3_0a.xsd	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/ejb-jar_3_0a.xsd	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,2418 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
-	    targetNamespace="http://java.sun.com/xml/ns/j2ee"
-	    xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
-	    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-	    elementFormDefault="qualified"
-	    attributeFormDefault="unqualified"
-	    version="3.0">
-  <xsd:annotation>
-    <xsd:documentation>
-      @(#)ejb-jar_2_1.xsds	1.23 08/01/03
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:annotation>
-    <xsd:documentation>
-
-      Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
-      Road, Palo Alto, California 94303, U.S.A. All rights
-      reserved.
-
-      Sun Microsystems, Inc. has intellectual property rights
-      relating to technology described in this document. In
-      particular, and without limitation, these intellectual
-      property rights may include one or more of the U.S. patents
-      listed at http://www.sun.com/patents and one or more
-      additional patents or pending patent applications in the
-      U.S. and other countries.
-
-      This document and the technology which it describes are
-      distributed under licenses restricting their use, copying,
-      distribution, and decompilation. No part of this document
-      may be reproduced in any form by any means without prior
-      written authorization of Sun and its licensors, if any.
-
-      Third-party software, including font technology, is
-      copyrighted and licensed from Sun suppliers.
-
-      Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
-      JavaServer Pages, Enterprise JavaBeans and the Java Coffee
-      Cup logo are trademarks or registered trademarks of Sun
-      Microsystems, Inc. in the U.S. and other countries.
-
-      Federal Acquisitions: Commercial Software - Government Users
-      Subject to Standard License Terms and Conditions.
-
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:annotation>
-    <xsd:documentation>
-      <![CDATA[
-
-	This is the XML Schema for the EJB 3.0 deployment descriptor.
-	The deployment descriptor must be named "META-INF/ejb-jar.xml" in
-	the EJB's jar file.  All EJB deployment descriptors must indicate
-	the ejb-jar schema by using the J2EE namespace:
-
-	http://java.sun.com/xml/ns/j2ee
-
-	and by indicating the version of the schema by
-	using the version element as shown below:
-
-	    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
-	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-		  http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
-	      version="3.0">
-	      ...
-	    </ejb-jar>
-
-	The instance documents may indicate the published version of
-	the schema using the xsi:schemaLocation attribute for the
-	J2EE namespace with the following location:
-
-	http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd
-
-	]]>
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:annotation>
-    <xsd:documentation>
-
-      The following conventions apply to all J2EE
-      deployment descriptor elements unless indicated otherwise.
-
-      - In elements that specify a pathname to a file within the
-	same JAR file, relative filenames (i.e., those not
-	starting with "/") are considered relative to the root of
-	the JAR file's namespace.  Absolute filenames (i.e., those
-	starting with "/") also specify names in the root of the
-	JAR file's namespace.  In general, relative names are
-	preferred.  The exception is .war files where absolute
-	names are preferred for consistency with the Servlet API.
-
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:include schemaLocation="file:///C:/eclipse3.1M6/workspace/xml-test/j2ee_5_0a.xsd"/>
-
-<!-- **************************************************** -->
-
-
-  <xsd:element name="ejb-jar" type="j2ee:ejb-jarType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	This is the root of the ejb-jar deployment descriptor.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:key name="ejb-name-key">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The ejb-name element contains the name of an enterprise
-	  bean. The name must be unique within the ejb-jar file.
-
-	</xsd:documentation>
-      </xsd:annotation>
-      <xsd:selector xpath="j2ee:enterprise-beans/*"/>
-      <xsd:field    xpath="j2ee:ejb-name"/>
-    </xsd:key>
-
-    <xsd:keyref name="ejb-name-references"
-		refer="j2ee:ejb-name-key">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The keyref indicates the references from
-	  relationship-role-source must be to a specific ejb-name
-	  defined within the scope of enterprise-beans element.
-
-	</xsd:documentation>
-      </xsd:annotation>
-      <xsd:selector
-	   xpath=".//j2ee:ejb-relationship-role/j2ee:relationship-role-source"/>
-      <xsd:field
-	   xpath="j2ee:ejb-name"/>
-    </xsd:keyref>
-
-    <xsd:key name="role-name-key">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  A role-name-key is specified to allow the references
-	  from the security-role-refs.
-
-	</xsd:documentation>
-      </xsd:annotation>
-      <xsd:selector xpath="j2ee:assembly-descriptor/j2ee:security-role"/>
-      <xsd:field    xpath="j2ee:role-name"/>
-    </xsd:key>
-
-    <xsd:keyref name="role-name-references"
-		refer="j2ee:role-name-key">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The keyref indicates the references from
-	  security-role-ref to a specified role-name.
-
-	</xsd:documentation>
-      </xsd:annotation>
-      <xsd:selector xpath="j2ee:enterprise-beans/*/j2ee:security-role-ref"/>
-      <xsd:field    xpath="j2ee:role-link"/>
-    </xsd:keyref>
-  </xsd:element>
-
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="activation-config-propertyType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The activation-config-propertyType contains a name/value
-	configuration property pair for a message-driven bean.
-
-	The properties that are recognized for a particular
-	message-driven bean are determined by the messaging type.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="activation-config-property-name"
-		   type="j2ee:xsdStringType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The activation-config-property-name element contains
-	    the name for an activation configuration property of
-	    a message-driven bean.
-
-	    For JMS message-driven beans, the following property
-	    names are recognized: acknowledgeMode,
-	    messageSelector, destinationType, subscriptionDurability
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="activation-config-property-value"
-		   type="j2ee:xsdStringType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The activation-config-property-value element
-	    contains the value for an activation configuration
-	    property of a message-driven bean.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="activation-configType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The activation-configType defines information about the
-	expected configuration properties of the message-driven bean
-	in its operational environment. This may include information
-	about message acknowledgement, message selector, expected
-	destination type, etc.
-
-	The configuration information is expressed in terms of
-	name/value configuration properties.
-
-	The properties that are recognized for a particular
-	message-driven bean are determined by the messaging type.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="activation-config-property"
-		   type="j2ee:activation-config-propertyType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="assembly-descriptorType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The assembly-descriptorType defines
-	application-assembly information.
-
-	The application-assembly information consists of the
-	following parts: the definition of security roles, the
-	definition of method permissions, the definition of
-	transaction attributes for enterprise beans with
-	container-managed transaction demarcation and a list of
-	methods to be excluded from being invoked.
-
-	All the parts are optional in the sense that they are
-	omitted if the lists represented by them are empty.
-
-	Providing an assembly-descriptor in the deployment
-	descriptor is optional for the ejb-jar file producer.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="callback"
-		   type="j2ee:callbackType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="remove-list"
-		   type="j2ee:remove-listType"
-		   minOccurs="0"/>
-      <xsd:element name="init-list"
-		   type="j2ee:init-listType"
-		   minOccurs="0"/>
-      <xsd:element name="security-role"
-		   type="j2ee:security-roleType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method-permission"
-		   type="j2ee:method-permissionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="container-transaction"
-		   type="j2ee:container-transactionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="message-destination"
-		   type="j2ee:message-destinationType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="exclude-list"
-		   type="j2ee:exclude-listType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="cmp-fieldType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The cmp-fieldType describes a container-managed field. The
-	cmp-fieldType contains an optional description of the field,
-	and the name of the field.
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="field-name"
-		   type="j2ee:java-identifierType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The field-name element specifies the name of a
-	    container managed field.
-
-	    The name of the cmp-field of an entity bean with
-	    cmp-version 2.x must begin with a lowercase
-	    letter. This field is accessed by methods whose
-	    names consists of the name of the field specified by
-	    field-name in which the first letter is uppercased,
-	    prefixed by "get" or "set".
-
-	    The name of the cmp-field of an entity bean with
-	    cmp-version 1.x must denote a public field of the
-	    enterprise bean class or one of its superclasses.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="cmp-versionType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The cmp-versionType specifies the version of an entity bean
-	with container-managed persistence. It is used by
-	cmp-version elements.
-
-	The value must be one of the two following:
-
-	    1.x
-	    2.x
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="1.x"/>
-	<xsd:enumeration value="2.x"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="cmr-field-typeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The cmr-field-type element specifies the class of a
-	collection-valued logical relationship field in the entity
-	bean class. The value of an element using cmr-field-typeType
-	must be either: java.util.Collection or java.util.Set.
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="java.util.Collection"/>
-	<xsd:enumeration value="java.util.Set"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="cmr-fieldType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The cmr-fieldType describes the bean provider's view of
-	a relationship. It consists of an optional description, and
-	the name and the class type of a field in the source of a
-	role of a relationship. The cmr-field-name element
-	corresponds to the name used for the get and set accessor
-	methods for the relationship. The cmr-field-type element is
-	used only for collection-valued cmr-fields. It specifies the
-	type of the collection that is used.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="cmr-field-name"
-		   type="j2ee:string">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The cmr-field-name element specifies the name of a
-	    logical relationship field in the entity bean
-	    class. The name of the cmr-field must begin with a
-	    lowercase letter. This field is accessed by methods
-	    whose names consist of the name of the field
-	    specified by cmr-field-name in which the first
-	    letter is uppercased, prefixed by "get" or "set".
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="cmr-field-type"
-		   type="j2ee:cmr-field-typeType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="container-transactionType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The container-transactionType specifies how the container
-	must manage transaction scopes for the enterprise bean's
-	method invocations. It defines an optional description, a
-	list of method elements, and a transaction attribute. The
-	transaction attribute is to be applied to all the specified
-	methods.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="trans-attribute"
-		   type="j2ee:trans-attributeType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-classType">
-    <xsd:annotation>
-      <xsd:documentation>
-	<![CDATA[
-
-	  The ejb-classType contains the fully-qualified name of the
-	  enterprise bean's class. It is used by ejb-class elements.
-
-	  Example:
-
-	      <ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
-
-	  ]]>
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:fully-qualified-classType"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="callback-listenerType">
-    <xsd:annotation>
-      <xsd:documentation>
-	<![CDATA[
-
-	  The ejb-classType contains the fully-qualified name of the
-	  enterprise bean's callback listener. 
-
-	  Example:
-
-	      <callback-listener>com.wombat.empl.EmployeeCallbackListener</callback-listener>
-
-	  ]]>
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:fully-qualified-classType"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="interceptorType">
-    <xsd:annotation>
-      <xsd:documentation>
-	<![CDATA[
-
-	  The ejb-interceptorType contains the fully-qualified name of an
-	  interceptor for the enterprise bean. 
-
-	  Example:
-
-	      <interceptor>com.wombat.empl.Interceptor</interceptor>
-
-	  ]]>
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:fully-qualified-classType"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="interceptorsType">
-    <xsd:annotation>
-      <xsd:documentation>
-	<![CDATA[
-
-	  The ejb-interceptorsType contains a comma separated list of fully-qualified
-	  names of a interceptors for the enterprise bean. 
-
-	  Example:
-
-	      <interceptors>com.wombat.empl.Interceptor1,com.wombat.empl.Interceptor2</interceptors>
-
-	  ]]>
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:fully-qualified-classType"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-jarType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The ejb-jarType defines the root element of the EJB
-	deployment descriptor. It contains
-
-	    - an optional description of the ejb-jar file
-	    - an optional display name
-	    - an optional icon that contains a small and a large
-	      icon file name
-	    - mandatory structural information about all included
-	      enterprise beans
-	    - a descriptor for container managed relationships,
-	      if any
-	    - an optional application-assembly descriptor
-	    - an optional name of an ejb-client-jar file for the
-	      ejb-jar.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:group ref="j2ee:descriptionGroup"/>
-      <xsd:element name="enterprise-beans"
-		   type="j2ee:enterprise-beansType"
-		   minOccurs="0"/>
-      <xsd:element name="relationships"
-		   type="j2ee:relationshipsType"
-		   minOccurs="0">
-	<xsd:unique name="relationship-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-relation-name contains the name of a
-	      relation. The name must be unique within
-	      relationships.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-relation"/>
-	  <xsd:field    xpath="j2ee:ejb-relation-name"/>
-	</xsd:unique>
-      </xsd:element>
-      <xsd:element name="assembly-descriptor"
-		   type="j2ee:assembly-descriptorType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    Providing an assembly-descriptor in the deployment
-	    descriptor is optional for the ejb-jar file
-	    producer.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="ejb-client-jar"
-		   type="j2ee:pathType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-	    <![CDATA[
-
-	      The optional ejb-client-jar element specifies a JAR
-	      file that contains the class files necessary for a
-	      client program to access the
-	      enterprise beans in the ejb-jar file.
-
-	      Example:
-
-		  <ejb-client-jar>employee_service_client.jar
-		  </ejb-client-jar>
-
-	      ]]>
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="version"
-		   type="j2ee:dewey-versionType"
-		   fixed="3.0"
-		   use="required">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The version specifies the version of the
-	  EJB specification that the instance document must
-	  comply with. This information enables deployment tools
-	  to validate a particular EJB Deployment
-	  Descriptor with respect to a specific version of the EJB
-	  schema.
-
-	</xsd:documentation>
-      </xsd:annotation>
-    </xsd:attribute>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-nameType">
-    <xsd:annotation>
-      <xsd:documentation>
-	<![CDATA[
-
-	  The ejb-nameType specifies an enterprise bean's name. It is
-	  used by ejb-name elements. This name is assigned by the
-	  ejb-jar file producer to name the enterprise bean in the
-	  ejb-jar file's deployment descriptor. The name must be
-	  unique among the names of the enterprise beans in the same
-	  ejb-jar file.
-
-	  There is no architected relationship between the used
-	  ejb-name in the deployment descriptor and the JNDI name that
-	  the Deployer will assign to the enterprise bean's home.
-
-	  The name for an entity bean must conform to the lexical
-	  rules for an NMTOKEN.
-
-	  Example:
-
-	  <ejb-name>EmployeeService</ejb-name>
-
-	  ]]>
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:xsdNMTOKENType"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-relationType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The ejb-relationType describes a relationship between two
-	entity beans with container-managed persistence.  It is used
-	by ejb-relation elements. It contains a description; an
-	optional ejb-relation-name element; and exactly two
-	relationship role declarations, defined by the
-	ejb-relationship-role elements. The name of the
-	relationship, if specified, is unique within the ejb-jar
-	file.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="ejb-relation-name"
-		   type="j2ee:string"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The ejb-relation-name element provides a unique name
-	    within the ejb-jar file for a relationship.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="ejb-relationship-role"
-		   type="j2ee:ejb-relationship-roleType"/>
-      <xsd:element name="ejb-relationship-role"
-		   type="j2ee:ejb-relationship-roleType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-relationship-roleType">
-    <xsd:annotation>
-      <xsd:documentation>
-	<![CDATA[
-
-	  The ejb-relationship-roleType describes a role within a
-	  relationship. There are two roles in each relationship.
-
-	  The ejb-relationship-roleType contains an optional
-	  description; an optional name for the relationship role; a
-	  specification of the multiplicity of the role; an optional
-	  specification of cascade-delete functionality for the role;
-	  the role source; and a declaration of the cmr-field, if any,
-	  by means of which the other side of the relationship is
-	  accessed from the perspective of the role source.
-
-	  The multiplicity and role-source element are mandatory.
-
-	  The relationship-role-source element designates an entity
-	  bean by means of an ejb-name element. For bidirectional
-	  relationships, both roles of a relationship must declare a
-	  relationship-role-source element that specifies a cmr-field
-	  in terms of which the relationship is accessed. The lack of
-	  a cmr-field element in an ejb-relationship-role specifies
-	  that the relationship is unidirectional in navigability and
-	  the entity bean that participates in the relationship is
-	  "not aware" of the relationship.
-
-	  Example:
-
-	  <ejb-relation>
-	      <ejb-relation-name>Product-LineItem</ejb-relation-name>
-	      <ejb-relationship-role>
-		  <ejb-relationship-role-name>product-has-lineitems
-		  </ejb-relationship-role-name>
-		  <multiplicity>One</multiplicity>
-		  <relationship-role-source>
-		  <ejb-name>ProductEJB</ejb-name>
-		  </relationship-role-source>
-	       </ejb-relationship-role>
-	  </ejb-relation>
-
-	  ]]>
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="ejb-relationship-role-name"
-		   type="j2ee:string"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The ejb-relationship-role-name element defines a
-	    name for a role that is unique within an
-	    ejb-relation. Different relationships can use the
-	    same name for a role.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="multiplicity"
-		   type="j2ee:multiplicityType"/>
-      <xsd:element name="cascade-delete"
-		   type="j2ee:emptyType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The cascade-delete element specifies that, within a
-	    particular relationship, the lifetime of one or more
-	    entity beans is dependent upon the lifetime of
-	    another entity bean. The cascade-delete element can
-	    only be specified for an ejb-relationship-role
-	    element contained in an ejb-relation element in
-	    which the other ejb-relationship-role
-	    element specifies a multiplicity of One.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="relationship-role-source"
-		   type="j2ee:relationship-role-sourceType"/>
-      <xsd:element name="cmr-field"
-		   type="j2ee:cmr-fieldType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="enterprise-beansType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The enterprise-beansType declares one or more enterprise
-	beans. Each bean can be a session, entity or message-driven
-	bean.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:choice maxOccurs="unbounded">
-      <xsd:element name="session"
-		   type="j2ee:session-beanType">
-	<xsd:unique name="session-ejb-local-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of
-	      an EJB reference. The EJB reference is an entry in
-	      the component's environment and is relative to the
-	      java:comp/env context.  The name must be unique within
-	      the component.
-
-	      It is recommended that name be prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-local-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-ejb-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of an EJB
-	      reference. The EJB reference is an entry in the
-	      component's environment and is relative to the
-	      java:comp/env context. The name must be unique
-	      within the component.
-
-	      It is recommended that name is prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-resource-env-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The resource-env-ref-name element specifies the name
-	      of a resource environment reference; its value is
-	      the environment entry name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-env-ref"/>
-	  <xsd:field    xpath="j2ee:resource-env-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-message-destination-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The message-destination-ref-name element specifies the name
-	      of a message destination reference; its value is
-	      the message destination reference name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:message-destination-ref"/>
-	  <xsd:field    xpath="j2ee:message-destination-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-res-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The res-ref-name element specifies the name of a
-	      resource manager connection factory reference.  The name
-	      is a JNDI name relative to the java:comp/env context.
-	      The name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-ref"/>
-	  <xsd:field    xpath="j2ee:res-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-env-entry-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The env-entry-name element contains the name of a
-	      component's environment entry.  The name is a JNDI
-	      name relative to the java:comp/env context.  The
-	      name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:env-entry"/>
-	  <xsd:field    xpath="j2ee:env-entry-name"/>
-	</xsd:unique>
-      </xsd:element>
-
-      <xsd:element name="entity"
-		   type="j2ee:entity-beanType">
-	<xsd:unique name="entity-ejb-local-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of
-	      an EJB reference. The EJB reference is an entry in
-	      the component's environment and is relative to the
-	      java:comp/env context.  The name must be unique within
-	      the component.
-
-	      It is recommended that name be prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-local-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-ejb-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of an EJB
-	      reference. The EJB reference is an entry in the
-	      component's environment and is relative to the
-	      java:comp/env context. The name must be unique
-	      within the component.
-
-	      It is recommended that name is prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-resource-env-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The resource-env-ref-name element specifies the name
-	      of a resource environment reference; its value is
-	      the environment entry name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-env-ref"/>
-	  <xsd:field    xpath="j2ee:resource-env-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-message-destination-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The message-destination-ref-name element specifies the name
-	      of a message destination reference; its value is
-	      the message destination reference name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:message-destination-ref"/>
-	  <xsd:field    xpath="j2ee:message-destination-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-res-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The res-ref-name element specifies the name of a
-	      resource manager connection factory reference.  The name
-	      is a JNDI name relative to the java:comp/env context.
-	      The name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-ref"/>
-	  <xsd:field    xpath="j2ee:res-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-env-entry-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The env-entry-name element contains the name of a
-	      component's environment entry.  The name is a JNDI
-	      name relative to the java:comp/env context.  The
-	      name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:env-entry"/>
-	  <xsd:field    xpath="j2ee:env-entry-name"/>
-	</xsd:unique>
-      </xsd:element>
-
-      <xsd:element name="message-driven"
-		   type="j2ee:message-driven-beanType">
-	<xsd:unique name="messaged-ejb-local-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of
-	      an EJB reference. The EJB reference is an entry in
-	      the component's environment and is relative to the
-	      java:comp/env context.  The name must be unique within
-	      the component.
-
-	      It is recommended that name be prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-local-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-ejb-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of an EJB
-	      reference. The EJB reference is an entry in the
-	      component's environment and is relative to the
-	      java:comp/env context. The name must be unique
-	      within the component.
-
-	      It is recommended that name is prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-resource-env-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The resource-env-ref-name element specifies the name
-	      of a resource environment reference; its value is
-	      the environment entry name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-env-ref"/>
-	  <xsd:field    xpath="j2ee:resource-env-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-message-destination-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The message-destination-ref-name element specifies the name
-	      of a message destination reference; its value is
-	      the message destination reference name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:message-destination-ref"/>
-	  <xsd:field    xpath="j2ee:message-destination-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-res-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The res-ref-name element specifies the name of a
-	      resource manager connection factory reference.  The name
-	      is a JNDI name relative to the java:comp/env context.
-	      The name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-ref"/>
-	  <xsd:field    xpath="j2ee:res-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-env-entry-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The env-entry-name element contains the name of a
-	      component's environment entry.  The name is a JNDI
-	      name relative to the java:comp/env context.  The
-	      name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:env-entry"/>
-	  <xsd:field    xpath="j2ee:env-entry-name"/>
-	</xsd:unique>
-      </xsd:element>
-
-    </xsd:choice>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="entity-beanType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The entity-beanType declares an entity bean. The declaration
-	consists of:
-
-	    - an optional description
-	    - an optional display name
-	    - an optional icon element that contains a small and a large
-	      icon file name
-	    - a unique name assigned to the enterprise bean
-	      in the deployment descriptor
-	    - the names of the entity bean's remote home
-	      and remote interfaces, if any
-	    - the names of the entity bean's local home and local
-	      interfaces, if any
-	    - the entity bean's implementation class
-	    - the entity bean's persistence management type
-	    - the entity bean's primary key class name
-	    - an indication of the entity bean's reentrancy
-	    - an optional specification of the
-	      entity bean's cmp-version
-	    - an optional specification of the entity bean's
-	      abstract schema name
-	    - an optional list of container-managed fields
-	    - an optional specification of the primary key
-	      field
-	    - an optional declaration of the bean's environment
-	      entries
-	    - an optional declaration of the bean's EJB
-	      references
-	    - an optional declaration of the bean's local
-	      EJB references
-	    - an optional declaration of the bean's web
-	      service references
-	    - an optional declaration of the security role
-	      references
-	    - an optional declaration of the security identity
-	      to be used for the execution of the bean's methods
-	    - an optional declaration of the bean's
-	      resource manager connection factory references
-	    - an optional declaration of the bean's
-	      resource environment references
-	    - an optional declaration of the bean's message
-	      destination references
-	    - an optional set of query declarations
-	      for finder and select methods for an entity
-	      bean with cmp-version 2.x.
-
-	The optional abstract-schema-name element must be specified
-	for an entity bean with container-managed persistence and
-	cmp-version 2.x.
-
-	The optional primkey-field may be present in the descriptor
-	if the entity's persistence-type is Container.
-
-	The optional cmp-version element may be present in the
-	descriptor if the entity's persistence-type is Container. If
-	the persistence-type is Container and the cmp-version
-	element is not specified, its value defaults to 2.x.
-
-	The optional home and remote elements must be specified if
-	the entity bean cmp-version is 1.x.
-
-	The optional home and remote elements must be specified if
-	the entity bean has a remote home and remote interface.
-
-	The optional local-home and local elements must be specified
-	if the entity bean has a local home and local interface.
-
-	Either both the local-home and the local elements or both
-	the home and the remote elements must be specified.
-
-	The optional query elements must be present if the
-	persistence-type is Container and the cmp-version is 2.x and
-	query methods other than findByPrimaryKey have been defined
-	for the entity bean.
-
-	The other elements that are optional are "optional" in the
-	sense that they are omitted if the lists represented by them
-	are empty.
-
-	At least one cmp-field element must be present in the
-	descriptor if the entity's persistence-type is Container and
-	the cmp-version is 1.x, and none must not be present if the
-	entity's persistence-type is Bean.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:group ref="j2ee:descriptionGroup"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"/>
-      <xsd:element name="home"
-		   type="j2ee:homeType"
-		   minOccurs="0"/>
-      <xsd:element name="remote"
-		   type="j2ee:remoteType"
-		   minOccurs="0"/>
-      <xsd:element name="local-home"
-		   type="j2ee:local-homeType"
-		   minOccurs="0"/>
-      <xsd:element name="local"
-		   type="j2ee:localType"
-		   minOccurs="0"/>
-      <xsd:element name="ejb-class"
-		   type="j2ee:ejb-classType"
-                   minOccurs="0"/>
-      <xsd:element name="persistence-type"
-		   type="j2ee:persistence-typeType"
-                   minOccurs="0"/>
-      <xsd:element name="callback-listener"
-		   type="j2ee:callback-listenerType"
-		   minOccurs="0"/>
-      <xsd:element name="interceptor"
-		   type="j2ee:interceptorType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="interceptors"
-		   type="j2ee:interceptorsType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="prim-key-class"
-		   type="j2ee:fully-qualified-classType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The prim-key-class element contains the
-	    fully-qualified name of an
-	    entity bean's primary key class.
-
-	    If the definition of the primary key class is
-	    deferred to deployment time, the prim-key-class
-	    element should specify java.lang.Object.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="reentrant"
-		   type="j2ee:true-falseType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The reentrant element specifies whether an entity
-	    bean is reentrant or not.
-
-	    The reentrant element must be one of the two
-	    following: true or false
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="cmp-version"
-		   type="j2ee:cmp-versionType"
-		   minOccurs="0"/>
-      <xsd:element name="abstract-schema-name"
-		   type="j2ee:java-identifierType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The abstract-schema-name element specifies the name
-	    of the abstract schema type of an entity bean with
-	    cmp-version 2.x. It is used in EJB QL queries.
-
-	    For example, the abstract-schema-name for an entity
-	    bean whose local interface is
-	    com.acme.commerce.Order might be Order.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="cmp-field"
-		   type="j2ee:cmp-fieldType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="primkey-field"
-		   type="j2ee:string"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The primkey-field element is used to specify the
-	    name of the primary key field for an entity with
-	    container-managed persistence.
-
-	    The primkey-field must be one of the fields declared
-	    in the cmp-field element, and the type of the field
-	    must be the same as the primary key type.
-
-	    The primkey-field element is not used if the primary
-	    key maps to multiple container-managed fields
-	    (i.e. the key is a compound key). In this case, the
-	    fields of the primary key class must be public, and
-	    their names must correspond to the field names of
-	    the entity bean class that comprise the key.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
-      <xsd:element name="security-role-ref"
-		   type="j2ee:security-role-refType"
-		   minOccurs="0" maxOccurs="unbounded"/>
-      <xsd:element name="security-identity"
-		   type="j2ee:security-identityType"
-		   minOccurs="0"/>
-      <xsd:element name="query"
-		   type="j2ee:queryType"
-		   minOccurs="0" maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="exclude-listType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The exclude-listType specifies one or more methods which
-	the Assembler marks to be uncallable.
-
-	If the method permission relation contains methods that are
-	in the exclude list, the Deployer should consider those
-	methods to be uncallable.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="remove-listType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The remove-listType specifies one or more methods which
-	the Assembler marks to remove a stateful session.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="init-listType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The remove-listType specifies one or more methods which
-	the Assembler marks to initialize a stateful session.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="message-driven-beanType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The message-driven element declares a message-driven
-	bean. The declaration consists of:
-
-	    - an optional description
-	    - an optional display name
-	    - an optional icon element that contains a small and a large
-	      icon file name.
-	    - a name assigned to the enterprise bean in
-	      the deployment descriptor
-	    - the message-driven bean's implementation class
-	    - an optional declaration of the bean's messaging
-	      type
-	    - the message-driven bean's transaction management type
-	    - an optional declaration of the bean's
-	      message-destination-type
-	    - an optional declaration of the bean's
-	      message-destination-link
-	    - an optional declaration of the message-driven bean's
-	      activation configuration properties
-	    - an optional declaration of the bean's environment
-	      entries
-	    - an optional declaration of the bean's EJB references
-	    - an optional declaration of the bean's local EJB
-	      references
-	    - an optional declaration of the bean's web service
-	      references
-	    - an optional declaration of the security
-	      identity to be used for the execution of the bean's
-	      methods
-	    - an optional declaration of the bean's
-	      resource manager connection factory
-	      references
-	    - an optional declaration of the bean's resource
-	      environment references.
-	    - an optional declaration of the bean's message
-	      destination references
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:group ref="j2ee:descriptionGroup"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"/>
-      <xsd:element name="ejb-class"
-		   type="j2ee:ejb-classType"
-                   minOccurs="0"/>
-      <xsd:element name="messaging-type"
-		   type="j2ee:fully-qualified-classType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The messaging-type element specifies the message
-	    listener interface of the message-driven bean. If
-	    the messaging-type element is not specified, it is
-	    assumed to be javax.jms.MessageListener.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="transaction-type"
-		   type="j2ee:transaction-typeType"/>
-      <xsd:element name="callback-listener"
-		   type="j2ee:callback-listenerType"
-		   minOccurs="0"/>
-      <xsd:element name="interceptor"
-		   type="j2ee:interceptorType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="interceptors"
-		   type="j2ee:interceptorsType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="message-destination-type"
-		   type="j2ee:message-destination-typeType"
-		   minOccurs="0"/>
-      <xsd:element name="message-destination-link"
-		   type="j2ee:message-destination-linkType"
-		   minOccurs="0"/>
-      <xsd:element name="activation-config"
-		   type="j2ee:activation-configType"
-		   minOccurs="0"/>
-      <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
-      <xsd:element name="security-identity"
-		   type="j2ee:security-identityType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="method-intfType">
-
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The method-intf element allows a method element to
-	differentiate between the methods with the same name and
-	signature that are multiply defined across the home and
-	component interfaces (e.g, in both an enterprise bean's
-	remote and local interfaces or in both an enterprise bean's
-	home and remote interfaces, etc.); the component and web
-	service endpoint interfaces, and so on.
-
-	The method-intf element must be one of the following:
-
-	    Home
-	    Remote
-	    LocalHome
-	    Local
-	    ServiceEndpoint
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Home"/>
-	<xsd:enumeration value="Remote"/>
-	<xsd:enumeration value="LocalHome"/>
-	<xsd:enumeration value="Local"/>
-	<xsd:enumeration value="ServiceEndpoint"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="method-nameType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The method-nameType contains a name of an enterprise
-	bean method or the asterisk (*) character. The asterisk is
-	used when the element denotes all the methods of an
-	enterprise bean's client view interfaces.
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="method-paramsType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The method-paramsType defines a list of the
-	fully-qualified Java type names of the method parameters.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="method-param"
-		   type="j2ee:java-typeType"
-		   minOccurs="0"
-		   maxOccurs="unbounded">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The method-param element contains a primitive
-	    or a fully-qualified Java type name of a method
-	    parameter.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="callbackType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The callbackType specifies one or more methods as enterprise
-	bean callbacks (i.e. PostConstruct, PostActivate, PrePassivate,
-	or PreDestroy)
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="annotation"
-		   type="j2ee:annotationType"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="annotationType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The annotationType designates the name of a callback
-	annotation.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:pattern value="(PostConstruct|PostActivate|PrePassivate|PreDestroy)"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="method-permissionType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The method-permissionType specifies that one or more
-	security roles are allowed to invoke one or more enterprise
-	bean methods. The method-permissionType consists of an
-	optional description, a list of security role names or an
-	indicator to state that the method is unchecked for
-	authorization, and a list of method elements.
-
-	The security roles used in the method-permissionType
-	must be defined in the security-role elements of the
-	deployment descriptor, and the methods must be methods
-	defined in the enterprise bean's home, component and/or web
-	service endpoint interfaces.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:choice>
-	<xsd:element name="role-name"
-		     type="j2ee:role-nameType"
-		     maxOccurs="unbounded"/>
-	<xsd:element name="unchecked"
-		     type="j2ee:emptyType">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The unchecked element specifies that a method is
-	      not checked for authorization by the container
-	      prior to invocation of the method.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	</xsd:element>
-      </xsd:choice>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="methodType">
-    <xsd:annotation>
-      <xsd:documentation>
-	<![CDATA[
-
-	  The methodType is used to denote a method of an enterprise
-	  bean's home, component, and/or web service endpoint
-	  interface, or, in the case of a message-driven bean, the
-	  bean's message listener method, or a set of such
-	  methods. The ejb-name element must be the name of one of the
-	  enterprise beans declared in the deployment descriptor; the
-	  optional method-intf element allows to distinguish between a
-	  method with the same signature that is multiply defined
-	  across the home, component, and/or web service endpoint
-	  interfaces; the method-name element specifies the method
-	  name; and the optional method-params elements identify a
-	  single method among multiple methods with an overloaded
-	  method name.
-
-	  There are three possible styles of using methodType element
-	  within a method element:
-
-	  1.
-	  <method>
-	      <ejb-name>EJBNAME</ejb-name>
-	      <method-name>*</method-name>
-	  </method>
-
-	     This style is used to refer to all the methods of the
-	     specified enterprise bean's home, component, and/or web
-	     service endpoint interfaces.
-
-	  2.
-	  <method>
-	      <ejb-name>EJBNAME</ejb-name>
-	      <method-name>METHOD</method-name>
-	  </method>
-
-	     This style is used to refer to the specified method of
-	     the specified enterprise bean. If there are multiple
-	     methods with the same overloaded name, the element of
-	     this style refers to all the methods with the overloaded
-	     name.
-
-	  3.
-	  <method>
-	      <ejb-name>EJBNAME</ejb-name>
-	      <method-name>METHOD</method-name>
-	      <method-params>
-		  <method-param>PARAM-1</method-param>
-		  <method-param>PARAM-2</method-param>
-		  ...
-		  <method-param>PARAM-n</method-param>
-	      </method-params>
-	  </method>
-
-	     This style is used to refer to a single method within a
-	     set of methods with an overloaded name. PARAM-1 through
-	     PARAM-n are the fully-qualified Java types of the
-	     method's input parameters (if the method has no input
-	     arguments, the method-params element contains no
-	     method-param elements). Arrays are specified by the
-	     array element's type, followed by one or more pair of
-	     square brackets (e.g. int[][]). If there are multiple
-	     methods with the same overloaded name, this style refers
-	     to all of the overloaded methods.
-
-	  Examples:
-
-	  Style 1: The following method element refers to all the
-	  methods of the EmployeeService bean's home, component,
-	  and/or web service endpoint interfaces:
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-name>*</method-name>
-	  </method>
-
-	  Style 2: The following method element refers to all the
-	  create methods of the EmployeeService bean's home
-	  interface(s).
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-name>create</method-name>
-	  </method>
-
-	  Style 3: The following method element refers to the
-	  create(String firstName, String LastName) method of the
-	  EmployeeService bean's home interface(s).
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-name>create</method-name>
-	      <method-params>
-		  <method-param>java.lang.String</method-param>
-		  <method-param>java.lang.String</method-param>
-	      </method-params>
-	  </method>
-
-	  The following example illustrates a Style 3 element with
-	  more complex parameter types. The method
-	  foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
-	  mypackage.MyClass[][] myclaar) would be specified as:
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-name>foobar</method-name>
-	      <method-params>
-		  <method-param>char</method-param>
-		  <method-param>int</method-param>
-		  <method-param>int[]</method-param>
-		  <method-param>mypackage.MyClass</method-param>
-		  <method-param>mypackage.MyClass[][]</method-param>
-	      </method-params>
-	  </method>
-
-	  The optional method-intf element can be used when it becomes
-	  necessary to differentiate between a method that is multiply
-	  defined across the enterprise bean's home, component, and/or
-	  web service endpoint interfaces with the same name and
-	  signature.
-
-	  For example, the method element
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-intf>Remote</method-intf>
-	      <method-name>create</method-name>
-	      <method-params>
-		  <method-param>java.lang.String</method-param>
-		  <method-param>java.lang.String</method-param>
-	      </method-params>
-	  </method>
-
-	  can be used to differentiate the create(String, String)
-	  method defined in the remote interface from the
-	  create(String, String) method defined in the remote home
-	  interface, which would be defined as
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-intf>Home</method-intf>
-	      <method-name>create</method-name>
-	      <method-params>
-		  <method-param>java.lang.String</method-param>
-		  <method-param>java.lang.String</method-param>
-	      </method-params>
-	  </method>
-
-	  and the create method that is defined in the local home
-	  interface which would be defined as
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-intf>LocalHome</method-intf>
-	      <method-name>create</method-name>
-	      <method-params>
-		  <method-param>java.lang.String</method-param>
-		  <method-param>java.lang.String</method-param>
-	      </method-params>
-	  </method>
-
-	  The method-intf element can be used with all th ree Styles
-	  of the method element usage. For example, the following
-	  method element example could be used to refer to all the
-	  methods of the EmployeeService bean's remote home interface.
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-intf>Home</method-intf>
-	      <method-name>*</method-name>
-	  </method>
-
-	  ]]>
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0" maxOccurs="unbounded"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"/>
-      <xsd:element name="method-intf"
-		   type="j2ee:method-intfType"
-		   minOccurs="0">
-      </xsd:element>
-      <xsd:element name="method-name"
-		   type="j2ee:method-nameType"/>
-      <xsd:element name="method-params"
-		   type="j2ee:method-paramsType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="multiplicityType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The multiplicityType describes the multiplicity of the
-	role that participates in a relation.
-
-	The value must be one of the two following:
-
-	    One
-	    Many
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="One"/>
-	<xsd:enumeration value="Many"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="persistence-typeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The persistence-typeType specifies an entity bean's persistence
-	management type.
-
-	The persistence-type element must be one of the two following:
-
-	    Bean
-	    Container
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Bean"/>
-	<xsd:enumeration value="Container"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="query-methodType">
-    <xsd:annotation>
-      <xsd:documentation>
-	<![CDATA[
-
-	  The query-method specifies the method for a finder or select
-	  query.
-
-	  The method-name element specifies the name of a finder or select
-	  method in the entity bean's implementation class.
-
-	  Each method-param must be defined for a query-method using the
-	  method-params element.
-
-	  It is used by the query-method element.
-
-	  Example:
-
-	  <query>
-	      <description>Method finds large orders</description>
-	      <query-method>
-		  <method-name>findLargeOrders</method-name>
-		  <method-params></method-params>
-	      </query-method>
-	      <ejb-ql>
-		SELECT OBJECT(o) FROM Order o
-		  WHERE o.amount &gt; 1000
-	      </ejb-ql>
-	  </query>
-
-	  ]]>
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="method-name"
-		   type="j2ee:method-nameType"/>
-      <xsd:element name="method-params"
-		   type="j2ee:method-paramsType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="queryType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The queryType defines a finder or select
-	query. It contains
-	    - an optional description of the query
-	    - the specification of the finder or select
-	      method it is used by
-		- an optional specification of the result type
-		  mapping, if the query is for a select method
-		  and entity objects are returned.
-		- the EJB QL query string that defines the query.
-
-	Queries that are expressible in EJB QL must use the ejb-ql
-	element to specify the query. If a query is not expressible
-	in EJB QL, the description element should be used to
-	describe the semantics of the query and the ejb-ql element
-	should be empty.
-
-	The result-type-mapping is an optional element. It can only
-	be present if the query-method specifies a select method
-	that returns entity objects.  The default value for the
-	result-type-mapping element is "Local".
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType" minOccurs="0"/>
-      <xsd:element name="query-method"
-		   type="j2ee:query-methodType"/>
-      <xsd:element name="result-type-mapping"
-		   type="j2ee:result-type-mappingType"
-		   minOccurs="0"/>
-      <xsd:element name="ejb-ql"
-		   type="j2ee:xsdStringType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="relationship-role-sourceType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The relationship-role-sourceType designates the source of a
-	role that participates in a relationship. A
-	relationship-role-sourceType is used by
-	relationship-role-source elements to uniquely identify an
-	entity bean.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="relationshipsType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The relationshipsType describes the relationships in
-	which entity beans with container-managed persistence
-	participate. The relationshipsType contains an optional
-	description; and a list of ejb-relation elements, which
-	specify the container managed relationships.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="ejb-relation"
-		   type="j2ee:ejb-relationType"
-		   maxOccurs="unbounded">
-
-	<xsd:unique name="role-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-relationship-role-name contains the name of a
-	      relationship role. The name must be unique within
-	      a relationship, but can be reused in different
-	      relationships.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector
-	       xpath=".//j2ee:ejb-relationship-role-name"/>
-	  <xsd:field
-	       xpath="."/>
-	</xsd:unique>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="result-type-mappingType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The result-type-mappingType is used in the query element to
-	specify whether an abstract schema type returned by a query
-	for a select method is to be mapped to an EJBLocalObject or
-	EJBObject type.
-
-	The value must be one of the following:
-
-	    Local
-	    Remote
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Local"/>
-	<xsd:enumeration value="Remote"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="security-identityType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The security-identityType specifies whether the caller's
-	security identity is to be used for the execution of the
-	methods of the enterprise bean or whether a specific run-as
-	identity is to be used. It contains an optional description
-	and a specification of the security identity to be used.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:choice>
-	<xsd:element name="use-caller-identity"
-		     type="j2ee:emptyType">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The use-caller-identity element specifies that
-	      the caller's security identity be used as the
-	      security identity for the execution of the
-	      enterprise bean's methods.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	</xsd:element>
-	<xsd:element name="run-as"
-		     type="j2ee:run-asType"/>
-      </xsd:choice>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="session-beanType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The session-beanType declares an session bean. The
-	declaration consists of:
-
-	    - an optional description
-	    - an optional display name
-	    - an optional icon element that contains a small and a large
-	      icon file name
-	    - a name assigned to the enterprise bean
-	      in the deployment description
-	    - the names of the session bean's remote home and
-	      remote interfaces, if any
-	    - the names of the session bean's local home and
-	      local interfaces, if any
-	    - the name of the session bean's web service endpoint
-	      interface, if any
-	    - the session bean's implementation class
-	    - the session bean's state management type
-	    - the session bean's transaction management type
-	    - an optional declaration of the bean's
-	      environment entries
-	    - an optional declaration of the bean's EJB references
-	    - an optional declaration of the bean's local
-	      EJB references
-	    - an optional declaration of the bean's web
-	      service references
-	    - an optional declaration of the security role
-	      references
-	    - an optional declaration of the security identity
-	      to be used for the execution of the bean's methods
-	    - an optional declaration of the bean's resource
-	      manager connection factory references
-	    - an optional declaration of the bean's resource
-	      environment references.
-	    - an optional declaration of the bean's message
-	      destination references
-
-	The elements that are optional are "optional" in the sense
-	that they are omitted when if lists represented by them are
-	empty.
-
-	Either both the local-home and the local elements or both
-	the home and the remote elements must be specified for the
-	session bean.
-
-	The service-endpoint element may only be specified if the
-	bean is a stateless session bean.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:group ref="j2ee:descriptionGroup"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"/>
-      <xsd:element name="home"
-		   type="j2ee:homeType"
-		   minOccurs="0"/>
-      <xsd:element name="remote"
-		   type="j2ee:remoteType"
-		   minOccurs="0"/>
-      <xsd:element name="local-home"
-		   type="j2ee:local-homeType"
-		   minOccurs="0"/>
-      <xsd:element name="local"
-		   type="j2ee:localType"
-		   minOccurs="0"/>
-      <xsd:element name="service-endpoint"
-		   type="j2ee:fully-qualified-classType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The service-endpoint element contains the
-	    fully-qualified name of the enterprise bean's web
-	    service endpoint interface. The service-endpoint
-	    element may only be specified for a stateless
-	    session bean. The specified interface must be a
-	    valid JAX-RPC service endpoint interface.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="ejb-class"
-		   type="j2ee:ejb-classType"
-                   minOccurs="0"/>
-      <xsd:element name="session-type"
-		   type="j2ee:session-typeType"
-                   minOccurs="0"/>
-      <xsd:element name="transaction-type"
-		   type="j2ee:transaction-typeType"
-                   minOccurs="0"/>
-      <xsd:element name="callback-listener"
-		   type="j2ee:callback-listenerType"
-		   minOccurs="0"/>
-      <xsd:element name="interceptor"
-		   type="j2ee:interceptorType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="interceptors"
-		   type="j2ee:interceptorsType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
-      <xsd:element name="security-role-ref"
-		   type="j2ee:security-role-refType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="security-identity"
-		   type="j2ee:security-identityType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="session-typeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The session-typeType describes whether the session bean is a
-	stateful session or stateless session. It is used by
-	session-type elements.
-
-	The value must be one of the two following:
-
-	    Stateful
-	    Stateless
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Stateful"/>
-	<xsd:enumeration value="Stateless"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="trans-attributeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The trans-attributeType specifies how the container must
-	manage the transaction boundaries when delegating a method
-	invocation to an enterprise bean's business method.
-
-	The value must be one of the following:
-
-	    NotSupported
-	    Supports
-	    Required
-	    RequiresNew
-	    Mandatory
-	    Never
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="NotSupported"/>
-	<xsd:enumeration value="Supports"/>
-	<xsd:enumeration value="Required"/>
-	<xsd:enumeration value="RequiresNew"/>
-	<xsd:enumeration value="Mandatory"/>
-	<xsd:enumeration value="Never"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="transaction-typeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The transaction-typeType specifies an enterprise bean's
-	transaction management type.
-
-	The transaction-type must be one of the two following:
-
-	    Bean
-	    Container
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Bean"/>
-	<xsd:enumeration value="Container"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-</xsd:schema>
-

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/javaee_5.xsd
===================================================================
(Binary files differ)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/javaee_web_services_1_2.xsd
===================================================================
(Binary files differ)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/javaee_web_services_client_1_2.xsd
===================================================================
(Binary files differ)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/jboss_5_0.xsd
===================================================================
(Binary files differ)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/sun-ejb-jar_3_0.xsd
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/sun-ejb-jar_3_0.xsd	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/schema/sun-ejb-jar_3_0.xsd	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,2403 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
-	    targetNamespace="http://java.sun.com/xml/ns/j2ee"
-	    xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
-	    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-	    elementFormDefault="qualified"
-	    attributeFormDefault="unqualified"
-	    version="3.0">
-  <xsd:annotation>
-    <xsd:documentation>
-      @(#)ejb-jar_3_0.xsds	1.44 06/07/05
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:annotation>
-    <xsd:documentation>
-
-	This is the XML Schema for the EJB 3.0 deployment descriptor.
-	The deployment descriptor must be named "META-INF/ejb-jar.xml" in
-	the EJB's jar file.  All EJB deployment descriptors must indicate
-	the ejb-jar schema by using the J2EE namespace:
-
-	http://java.sun.com/xml/ns/j2ee
-
-	and by indicating the version of the schema by
-	using the version element as shown below:
-
-	    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
-	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-		  http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd"
-	      version="3.0">
-	      ...
-	    </ejb-jar>
-
-	The instance documents may indicate the published version of
-	the schema using the xsi:schemaLocation attribute for the
-	J2EE namespace with the following location:
-
-	http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd
-
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:annotation>
-    <xsd:documentation>
-
-      The following conventions apply to all J2EE
-      deployment descriptor elements unless indicated otherwise.
-
-      - In elements that specify a pathname to a file within the
-	same JAR file, relative filenames (i.e., those not
-	starting with "/") are considered relative to the root of
-	the JAR file's namespace.  Absolute filenames (i.e., those
-	starting with "/") also specify names in the root of the
-	JAR file's namespace.  In general, relative names are
-	preferred.  The exception is .war files where absolute
-	names are preferred for consistency with the Servlet API.
-
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:include schemaLocation="j2ee_5_0.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
-  <xsd:element name="ejb-jar" type="j2ee:ejb-jarType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	This is the root of the ejb-jar deployment descriptor.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:key name="ejb-name-key">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The ejb-name element contains the name of an enterprise
-	  bean. The name must be unique within the ejb-jar file.
-
-	</xsd:documentation>
-      </xsd:annotation>
-      <xsd:selector xpath="j2ee:enterprise-beans/*"/>
-      <xsd:field    xpath="j2ee:ejb-name"/>
-    </xsd:key>
-
-    <xsd:keyref name="ejb-name-references"
-		refer="j2ee:ejb-name-key">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The keyref indicates the references from
-	  relationship-role-source must be to a specific ejb-name
-	  defined within the scope of enterprise-beans element.
-
-	</xsd:documentation>
-      </xsd:annotation>
-      <xsd:selector
-	   xpath=".//j2ee:ejb-relationship-role/j2ee:relationship-role-source"/>
-      <xsd:field
-	   xpath="j2ee:ejb-name"/>
-    </xsd:keyref>
-
-    <xsd:key name="role-name-key">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  A role-name-key is specified to allow the references
-	  from the security-role-refs.
-
-	</xsd:documentation>
-      </xsd:annotation>
-      <xsd:selector xpath="j2ee:assembly-descriptor/j2ee:security-role"/>
-      <xsd:field    xpath="j2ee:role-name"/>
-    </xsd:key>
-
-    <xsd:keyref name="role-name-references"
-		refer="j2ee:role-name-key">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The keyref indicates the references from
-	  security-role-ref to a specified role-name.
-
-	</xsd:documentation>
-      </xsd:annotation>
-      <xsd:selector xpath="j2ee:enterprise-beans/*/j2ee:security-role-ref"/>
-      <xsd:field    xpath="j2ee:role-link"/>
-    </xsd:keyref>
-  </xsd:element>
-
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="activation-config-propertyType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The activation-config-propertyType contains a name/value
-	configuration property pair for a message-driven bean.
-
-	The properties that are recognized for a particular
-	message-driven bean are determined by the messaging type.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="activation-config-property-name"
-		   type="j2ee:xsdStringType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The activation-config-property-name element contains
-	    the name for an activation configuration property of
-	    a message-driven bean.
-
-	    For JMS message-driven beans, the following property
-	    names are recognized: acknowledgeMode,
-	    messageSelector, destinationType, subscriptionDurability
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="activation-config-property-value"
-		   type="j2ee:xsdStringType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The activation-config-property-value element
-	    contains the value for an activation configuration
-	    property of a message-driven bean.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="activation-configType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The activation-configType defines information about the
-	expected configuration properties of the message-driven bean
-	in its operational environment. This may include information
-	about message acknowledgement, message selector, expected
-	destination type, etc.
-
-	The configuration information is expressed in terms of
-	name/value configuration properties.
-
-	The properties that are recognized for a particular
-	message-driven bean are determined by the messaging type.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="activation-config-property"
-		   type="j2ee:activation-config-propertyType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="application-exceptionType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-        The application-exceptionType declares an application
-        exception. The declaration consists of:
-
-            - the exception class. When the container receives
-              an exception of this type, it is required to
-              forward this exception as an applcation exception
-              to the client regardless of whether it is a checked
-              or unchecked exception.
-            - an optional rollback element. If this element is
-              present, the container must rollback the current
-              transaction before forwarding the exception to the
-              client.
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:sequence>
-      <xsd:element name="exception-class"
-		   type="j2ee:fully-qualified-classType"/>
-      <xsd:element name="rollback"
-                   type="j2ee:emptyType"
-                   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="assembly-descriptorType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The assembly-descriptorType defines
-	application-assembly information.
-
-	The application-assembly information consists of the
-	following parts: the definition of security roles, the
-	definition of method permissions, the definition of
-	transaction attributes for enterprise beans with
-	container-managed transaction demarcation and a list of
-	methods to be excluded from being invoked.
-
-	All the parts are optional in the sense that they are
-	omitted if the lists represented by them are empty.
-
-	Providing an assembly-descriptor in the deployment
-	descriptor is optional for the ejb-jar file producer.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="security-role"
-		   type="j2ee:security-roleType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method-permission"
-		   type="j2ee:method-permissionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="container-transaction"
-		   type="j2ee:container-transactionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="message-destination"
-		   type="j2ee:message-destinationType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="exclude-list"
-		   type="j2ee:exclude-listType"
-		   minOccurs="0"/>
-      <xsd:element name="application-exception"
-                   type="j2ee:application-exceptionType"
-                   minOccurs="0"
-                   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="callback-listenerType">
-    <xsd:sequence>
-      <xsd:element name="callback-listener-class"
-		   type="j2ee:fully-qualified-classType"/>
-      <xsd:element name="post-construct-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="pre-destroy-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="post-activate-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="pre-passivate-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="cmp-fieldType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The cmp-fieldType describes a container-managed field. The
-	cmp-fieldType contains an optional description of the field,
-	and the name of the field.
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="field-name"
-		   type="j2ee:java-identifierType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The field-name element specifies the name of a
-	    container managed field.
-
-	    The name of the cmp-field of an entity bean with
-	    cmp-version 2.x must begin with a lowercase
-	    letter. This field is accessed by methods whose
-	    names consists of the name of the field specified by
-	    field-name in which the first letter is uppercased,
-	    prefixed by "get" or "set".
-
-	    The name of the cmp-field of an entity bean with
-	    cmp-version 1.x must denote a public field of the
-	    enterprise bean class or one of its superclasses.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="cmp-versionType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The cmp-versionType specifies the version of an entity bean
-	with container-managed persistence. It is used by
-	cmp-version elements.
-
-	The value must be one of the two following:
-
-	    1.x
-	    2.x
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="1.x"/>
-	<xsd:enumeration value="2.x"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="cmr-field-typeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The cmr-field-type element specifies the class of a
-	collection-valued logical relationship field in the entity
-	bean class. The value of an element using cmr-field-typeType
-	must be either: java.util.Collection or java.util.Set.
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="java.util.Collection"/>
-	<xsd:enumeration value="java.util.Set"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="cmr-fieldType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The cmr-fieldType describes the bean provider's view of
-	a relationship. It consists of an optional description, and
-	the name and the class type of a field in the source of a
-	role of a relationship. The cmr-field-name element
-	corresponds to the name used for the get and set accessor
-	methods for the relationship. The cmr-field-type element is
-	used only for collection-valued cmr-fields. It specifies the
-	type of the collection that is used.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="cmr-field-name"
-		   type="j2ee:string">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The cmr-field-name element specifies the name of a
-	    logical relationship field in the entity bean
-	    class. The name of the cmr-field must begin with a
-	    lowercase letter. This field is accessed by methods
-	    whose names consist of the name of the field
-	    specified by cmr-field-name in which the first
-	    letter is uppercased, prefixed by "get" or "set".
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="cmr-field-type"
-		   type="j2ee:cmr-field-typeType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="container-transactionType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The container-transactionType specifies how the container
-	must manage transaction scopes for the enterprise bean's
-	method invocations. It defines an optional description, a
-	list of method elements, and a transaction attribute. The
-	transaction attribute is to be applied to all the specified
-	methods.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="trans-attribute"
-		   type="j2ee:trans-attributeType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-classType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	  The ejb-classType contains the fully-qualified name of the
-	  enterprise bean's class. It is used by ejb-class elements.
-
-	  Example:
-
-	      <ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:fully-qualified-classType"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-jarType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The ejb-jarType defines the root element of the EJB
-	deployment descriptor. It contains
-
-	    - an optional description of the ejb-jar file
-	    - an optional display name
-	    - an optional icon that contains a small and a large
-	      icon file name
-	    - structural information about all included
-	      enterprise beans that is not specified through annotations
-	    - a descriptor for container managed relationships,
-	      if any.
-	    - an optional application-assembly descriptor
-	    - an optional name of an ejb-client-jar file for the
-	      ejb-jar.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:group ref="j2ee:descriptionGroup"/>
-      <xsd:element name="enterprise-beans"
-		   type="j2ee:enterprise-beansType"
-                   minOccurs="0"/>
-      <xsd:element name="relationships"
-		   type="j2ee:relationshipsType"
-		   minOccurs="0">
-	<xsd:unique name="relationship-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-relation-name contains the name of a
-	      relation. The name must be unique within
-	      relationships.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-relation"/>
-	  <xsd:field    xpath="j2ee:ejb-relation-name"/>
-	</xsd:unique>
-      </xsd:element>
-      <xsd:element name="assembly-descriptor"
-		   type="j2ee:assembly-descriptorType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    Providing an assembly-descriptor in the deployment
-	    descriptor is optional for the ejb-jar file
-	    producer.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="ejb-client-jar"
-		   type="j2ee:pathType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	      The optional ejb-client-jar element specifies a JAR
-	      file that contains the class files necessary for a
-	      client program to access the
-	      enterprise beans in the ejb-jar file.
-
-	      Example:
-
-		  <ejb-client-jar>employee_service_client.jar
-		  </ejb-client-jar>
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="version"
-		   type="j2ee:dewey-versionType"
-		   fixed="3.0"
-		   use="required">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The version specifies the version of the
-	  EJB specification that the instance document must
-	  comply with. This information enables deployment tools
-	  to validate a particular EJB Deployment
-	  Descriptor with respect to a specific version of the EJB
-	  schema.
-
-	</xsd:documentation>
-      </xsd:annotation>
-    </xsd:attribute>
-    <xsd:attribute name="full" type="xsd:boolean">
-      <xsd:annotation>
-	<xsd:documentation>
-
-	  The full attribute defines whether this deployment
-	  descriptor is complete, or whether the class files
-	  of the jar file should be examined for annotations
-	  that specify deployment information.
-
-	  If full is set to "true", the deployment tool
-	  must ignore any EJB annotations present in the
-	  class files of the application.
-
-	  If full is not specified or is set to "false", the
-	  deployment tool must examine the class files of the
-	  application for annotations, as specified by the EJB
-	  specifications.
-
-	</xsd:documentation>
-      </xsd:annotation>
-
-    </xsd:attribute>
-
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-nameType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	  The ejb-nameType specifies an enterprise bean's name. It is
-	  used by ejb-name elements. This name is assigned by the
-	  ejb-jar file producer to name the enterprise bean in the
-	  ejb-jar file's deployment descriptor. The name must be
-	  unique among the names of the enterprise beans in the same
-	  ejb-jar file.
-
-	  There is no architected relationship between the used
-	  ejb-name in the deployment descriptor and the JNDI name that
-	  the Deployer will assign to the enterprise bean's home.
-
-	  The name for an entity bean must conform to the lexical
-	  rules for an NMTOKEN.
-
-	  Example:
-
-	  <ejb-name>EmployeeService</ejb-name>
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:xsdNMTOKENType"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-relationType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The ejb-relationType describes a relationship between two
-	entity beans with container-managed persistence.  It is used
-	by ejb-relation elements. It contains a description; an
-	optional ejb-relation-name element; and exactly two
-	relationship role declarations, defined by the
-	ejb-relationship-role elements. The name of the
-	relationship, if specified, is unique within the ejb-jar
-	file.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="ejb-relation-name"
-		   type="j2ee:string"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The ejb-relation-name element provides a unique name
-	    within the ejb-jar file for a relationship.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="ejb-relationship-role"
-		   type="j2ee:ejb-relationship-roleType"/>
-      <xsd:element name="ejb-relationship-role"
-		   type="j2ee:ejb-relationship-roleType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="ejb-relationship-roleType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	  The ejb-relationship-roleType describes a role within a
-	  relationship. There are two roles in each relationship.
-
-	  The ejb-relationship-roleType contains an optional
-	  description; an optional name for the relationship role; a
-	  specification of the multiplicity of the role; an optional
-	  specification of cascade-delete functionality for the role;
-	  the role source; and a declaration of the cmr-field, if any,
-	  by means of which the other side of the relationship is
-	  accessed from the perspective of the role source.
-
-	  The multiplicity and role-source element are mandatory.
-
-	  The relationship-role-source element designates an entity
-	  bean by means of an ejb-name element. For bidirectional
-	  relationships, both roles of a relationship must declare a
-	  relationship-role-source element that specifies a cmr-field
-	  in terms of which the relationship is accessed. The lack of
-	  a cmr-field element in an ejb-relationship-role specifies
-	  that the relationship is unidirectional in navigability and
-	  the entity bean that participates in the relationship is
-	  "not aware" of the relationship.
-
-	  Example:
-
-	  <ejb-relation>
-	      <ejb-relation-name>Product-LineItem</ejb-relation-name>
-	      <ejb-relationship-role>
-		  <ejb-relationship-role-name>product-has-lineitems
-		  </ejb-relationship-role-name>
-		  <multiplicity>One</multiplicity>
-		  <relationship-role-source>
-		  <ejb-name>ProductEJB</ejb-name>
-		  </relationship-role-source>
-	       </ejb-relationship-role>
-	  </ejb-relation>
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="ejb-relationship-role-name"
-		   type="j2ee:string"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The ejb-relationship-role-name element defines a
-	    name for a role that is unique within an
-	    ejb-relation. Different relationships can use the
-	    same name for a role.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="multiplicity"
-		   type="j2ee:multiplicityType"/>
-      <xsd:element name="cascade-delete"
-		   type="j2ee:emptyType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The cascade-delete element specifies that, within a
-	    particular relationship, the lifetime of one or more
-	    entity beans is dependent upon the lifetime of
-	    another entity bean. The cascade-delete element can
-	    only be specified for an ejb-relationship-role
-	    element contained in an ejb-relation element in
-	    which the other ejb-relationship-role
-	    element specifies a multiplicity of One.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="relationship-role-source"
-		   type="j2ee:relationship-role-sourceType"/>
-      <xsd:element name="cmr-field"
-		   type="j2ee:cmr-fieldType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="enterprise-beansType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The enterprise-beansType declares one or more enterprise
-	beans. Each bean can be a session, entity or message-driven
-	bean.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:choice maxOccurs="unbounded">
-      <xsd:element name="session"
-		   type="j2ee:session-beanType">
-	<xsd:unique name="session-ejb-local-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of
-	      an EJB reference. The EJB reference is an entry in
-	      the component's environment and is relative to the
-	      java:comp/env context.  The name must be unique within
-	      the component.
-
-	      It is recommended that name be prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-local-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-ejb-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of an EJB
-	      reference. The EJB reference is an entry in the
-	      component's environment and is relative to the
-	      java:comp/env context. The name must be unique
-	      within the component.
-
-	      It is recommended that name is prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-resource-env-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The resource-env-ref-name element specifies the name
-	      of a resource environment reference; its value is
-	      the environment entry name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-env-ref"/>
-	  <xsd:field    xpath="j2ee:resource-env-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-message-destination-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The message-destination-ref-name element specifies the name
-	      of a message destination reference; its value is
-	      the message destination reference name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:message-destination-ref"/>
-	  <xsd:field    xpath="j2ee:message-destination-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-res-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The res-ref-name element specifies the name of a
-	      resource manager connection factory reference.  The name
-	      is a JNDI name relative to the java:comp/env context.
-	      The name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-ref"/>
-	  <xsd:field    xpath="j2ee:res-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="session-env-entry-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The env-entry-name element contains the name of a
-	      component's environment entry.  The name is a JNDI
-	      name relative to the java:comp/env context.  The
-	      name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:env-entry"/>
-	  <xsd:field    xpath="j2ee:env-entry-name"/>
-	</xsd:unique>
-      </xsd:element>
-
-      <xsd:element name="entity"
-		   type="j2ee:entity-beanType">
-	<xsd:unique name="entity-ejb-local-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of
-	      an EJB reference. The EJB reference is an entry in
-	      the component's environment and is relative to the
-	      java:comp/env context.  The name must be unique within
-	      the component.
-
-	      It is recommended that name be prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-local-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-ejb-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of an EJB
-	      reference. The EJB reference is an entry in the
-	      component's environment and is relative to the
-	      java:comp/env context. The name must be unique
-	      within the component.
-
-	      It is recommended that name is prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-resource-env-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The resource-env-ref-name element specifies the name
-	      of a resource environment reference; its value is
-	      the environment entry name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-env-ref"/>
-	  <xsd:field    xpath="j2ee:resource-env-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-message-destination-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The message-destination-ref-name element specifies the name
-	      of a message destination reference; its value is
-	      the message destination reference name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:message-destination-ref"/>
-	  <xsd:field    xpath="j2ee:message-destination-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-res-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The res-ref-name element specifies the name of a
-	      resource manager connection factory reference.  The name
-	      is a JNDI name relative to the java:comp/env context.
-	      The name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-ref"/>
-	  <xsd:field    xpath="j2ee:res-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="entity-env-entry-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The env-entry-name element contains the name of a
-	      component's environment entry.  The name is a JNDI
-	      name relative to the java:comp/env context.  The
-	      name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:env-entry"/>
-	  <xsd:field    xpath="j2ee:env-entry-name"/>
-	</xsd:unique>
-      </xsd:element>
-
-      <xsd:element name="message-driven"
-		   type="j2ee:message-driven-beanType">
-	<xsd:unique name="messaged-ejb-local-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of
-	      an EJB reference. The EJB reference is an entry in
-	      the component's environment and is relative to the
-	      java:comp/env context.  The name must be unique within
-	      the component.
-
-	      It is recommended that name be prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-local-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-ejb-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-ref-name element contains the name of an EJB
-	      reference. The EJB reference is an entry in the
-	      component's environment and is relative to the
-	      java:comp/env context. The name must be unique
-	      within the component.
-
-	      It is recommended that name is prefixed with "ejb/".
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:ejb-ref"/>
-	  <xsd:field    xpath="j2ee:ejb-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-resource-env-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The resource-env-ref-name element specifies the name
-	      of a resource environment reference; its value is
-	      the environment entry name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-env-ref"/>
-	  <xsd:field    xpath="j2ee:resource-env-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-message-destination-ref-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The message-destination-ref-name element specifies the name
-	      of a message destination reference; its value is
-	      the message destination reference name used in the component
-	      code. The name is a JNDI name relative to the
-	      java:comp/env context and must be unique within an
-	      component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:message-destination-ref"/>
-	  <xsd:field    xpath="j2ee:message-destination-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-res-ref-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The res-ref-name element specifies the name of a
-	      resource manager connection factory reference.  The name
-	      is a JNDI name relative to the java:comp/env context.
-	      The name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:resource-ref"/>
-	  <xsd:field    xpath="j2ee:res-ref-name"/>
-	</xsd:unique>
-
-	<xsd:unique name="messaged-env-entry-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The env-entry-name element contains the name of a
-	      component's environment entry.  The name is a JNDI
-	      name relative to the java:comp/env context.  The
-	      name must be unique within an component.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector xpath="j2ee:env-entry"/>
-	  <xsd:field    xpath="j2ee:env-entry-name"/>
-	</xsd:unique>
-      </xsd:element>
-
-    </xsd:choice>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="entity-beanType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The entity-beanType declares an entity bean. The declaration
-	consists of:
-
-	    - an optional description
-	    - an optional display name
-	    - an optional icon element that contains a small and a large
-	      icon file name
-	    - a unique name assigned to the enterprise bean
-	      in the deployment descriptor
-	    - the names of the entity bean's remote home
-	      and remote interfaces, if any
-	    - the names of the entity bean's local home and local
-	      interfaces, if any
-	    - the entity bean's implementation class
-	    - the optional entity bean's persistence management type. If
-              this element is not specified it is defaulted to Container.
-	    - the entity bean's primary key class name
-	    - an indication of the entity bean's reentrancy
-	    - an optional specification of the
-	      entity bean's cmp-version
-	    - an optional specification of the entity bean's
-	      abstract schema name
-	    - an optional list of container-managed fields
-	    - an optional specification of the primary key
-	      field
-	    - an optional declaration of the bean's environment
-	      entries
-	    - an optional declaration of the bean's EJB
-	      references
-	    - an optional declaration of the bean's local
-	      EJB references
-	    - an optional declaration of the bean's web
-	      service references
-	    - an optional declaration of the security role
-	      references
-	    - an optional declaration of the security identity
-	      to be used for the execution of the bean's methods
-	    - an optional declaration of the bean's
-	      resource manager connection factory references
-	    - an optional declaration of the bean's
-	      resource environment references
-	    - an optional declaration of the bean's message
-	      destination references
-	    - an optional set of query declarations
-	      for finder and select methods for an entity
-	      bean with cmp-version 2.x.
-
-	The optional abstract-schema-name element must be specified
-	for an entity bean with container-managed persistence and
-	cmp-version 2.x.
-
-	The optional primkey-field may be present in the descriptor
-	if the entity's persistence-type is Container.
-
-	The optional cmp-version element may be present in the
-	descriptor if the entity's persistence-type is Container. If
-	the persistence-type is Container and the cmp-version
-	element is not specified, its value defaults to 2.x.
-
-	The optional home and remote elements must be specified if
-	the entity bean cmp-version is 1.x.
-
-	The optional home and remote elements must be specified if
-	the entity bean has a remote home and remote interface.
-
-	The optional local-home and local elements must be specified
-	if the entity bean has a local home and local interface.
-
-	Either both the local-home and the local elements or both
-	the home and the remote elements must be specified.
-
-	The optional query elements must be present if the
-	persistence-type is Container and the cmp-version is 2.x and
-	query methods other than findByPrimaryKey have been defined
-	for the entity bean.
-
-	The other elements that are optional are "optional" in the
-	sense that they are omitted if the lists represented by them
-	are empty.
-
-	At least one cmp-field element must be present in the
-	descriptor if the entity's persistence-type is Container and
-	the cmp-version is 1.x, and none must not be present if the
-	entity's persistence-type is Bean.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:group ref="j2ee:descriptionGroup"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"/>
-      <xsd:element name="home"
-		   type="j2ee:homeType"
-		   minOccurs="0"/>
-      <xsd:element name="remote"
-		   type="j2ee:remoteType"
-		   minOccurs="0"/>
-      <xsd:element name="local-home"
-		   type="j2ee:local-homeType"
-		   minOccurs="0"/>
-      <xsd:element name="local"
-		   type="j2ee:localType"
-		   minOccurs="0"/>
-      <xsd:element name="ejb-class"
-		   type="j2ee:ejb-classType"/>
-      <xsd:element name="persistence-type"
-		   type="j2ee:persistence-typeType"
-                   minOccurs="0"/>
-      <xsd:element name="prim-key-class"
-		   type="j2ee:fully-qualified-classType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The prim-key-class element contains the
-	    fully-qualified name of an
-	    entity bean's primary key class.
-
-	    If the definition of the primary key class is
-	    deferred to deployment time, the prim-key-class
-	    element should specify java.lang.Object.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="reentrant"
-		   type="j2ee:true-falseType">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The reentrant element specifies whether an entity
-	    bean is reentrant or not.
-
-	    The reentrant element must be one of the two
-	    following: true or false
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="cmp-version"
-		   type="j2ee:cmp-versionType"
-		   minOccurs="0"/>
-      <xsd:element name="abstract-schema-name"
-		   type="j2ee:java-identifierType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The abstract-schema-name element specifies the name
-	    of the abstract schema type of an entity bean with
-	    cmp-version 2.x. It is used in EJB QL queries.
-
-	    For example, the abstract-schema-name for an entity
-	    bean whose local interface is
-	    com.acme.commerce.Order might be Order.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="cmp-field"
-		   type="j2ee:cmp-fieldType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="primkey-field"
-		   type="j2ee:string"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The primkey-field element is used to specify the
-	    name of the primary key field for an entity with
-	    container-managed persistence.
-
-	    The primkey-field must be one of the fields declared
-	    in the cmp-field element, and the type of the field
-	    must be the same as the primary key type.
-
-	    The primkey-field element is not used if the primary
-	    key maps to multiple container-managed fields
-	    (i.e. the key is a compound key). In this case, the
-	    fields of the primary key class must be public, and
-	    their names must correspond to the field names of
-	    the entity bean class that comprise the key.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
-      <xsd:element name="security-role-ref"
-		   type="j2ee:security-role-refType"
-		   minOccurs="0" maxOccurs="unbounded"/>
-      <xsd:element name="security-identity"
-		   type="j2ee:security-identityType"
-		   minOccurs="0"/>
-      <xsd:element name="query"
-		   type="j2ee:queryType"
-		   minOccurs="0" maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="exclude-listType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The exclude-listType specifies one or more methods which
-	the Assembler marks to be uncallable.
-
-	If the method permission relation contains methods that are
-	in the exclude list, the Deployer should consider those
-	methods to be uncallable.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="init-methodType">
-    <xsd:sequence>
-      <xsd:element name="create-method"
-		   type="j2ee:named-methodType"/>
-      <xsd:element name="bean-method"
-		   type="j2ee:named-methodType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="interceptorType">
-    <xsd:sequence>
-      <xsd:element name="interceptor-class"
-		   type="j2ee:fully-qualified-classType"/>
-      <xsd:element name="around-invoke-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="message-driven-beanType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The message-driven element declares a message-driven
-	bean. The declaration consists of:
-
-	    - an optional description
-	    - an optional display name
-	    - an optional icon element that contains a small and a large
-	      icon file name.
-	    - an optional declaration of the enterprise bean's name
-	    - an optional declaration of the message-driven bean's 
-	      implementation class
-	    - an optional declaration of the bean's messaging
-	      type
-	    - the optional message-driven bean's transaction management
-              type. If it is not defined, it is defaulted to Container.
-	    - an optional declaration of the bean's
-	      message-destination-type
-	    - an optional declaration of the bean's
-	      message-destination-link
-	    - an optional declaration of the message-driven bean's
-	      activation configuration properties
-	    - an optional declaration of the bean's environment
-	      entries
-	    - an optional declaration of the bean's EJB references
-	    - an optional declaration of the bean's local EJB
-	      references
-	    - an optional declaration of the bean's web service
-	      references
-	    - an optional declaration of the security
-	      identity to be used for the execution of the bean's
-	      methods
-	    - an optional declaration of the bean's
-	      resource manager connection factory
-	      references
-	    - an optional declaration of the bean's resource
-	      environment references.
-	    - an optional declaration of the bean's message
-	      destination references
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:group ref="j2ee:descriptionGroup"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"
-		   minOccurs="0"/>
-      <xsd:element name="ejb-class"
-		   type="j2ee:ejb-classType"
-		   minOccurs="0"/>
-      <xsd:element name="messaging-type"
-		   type="j2ee:fully-qualified-classType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The messaging-type element specifies the message
-	    listener interface of the message-driven bean. If
-	    the messaging-type element is not specified, it is
-	    assumed to be javax.jms.MessageListener.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="interceptor"
-                   type="j2ee:interceptorType"
-                   minOccurs="0"
-                   maxOccurs="unbounded"/>
-      <xsd:element name="around-invoke-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="callback-listener"
-                   type="j2ee:callback-listenerType"
-                   minOccurs="0"/>
-      <xsd:element name="post-construct-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="pre-destroy-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="post-activate-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="pre-passivate-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="timeout-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="transaction-type"
-		   type="j2ee:transaction-typeType"
-                   minOccurs="0"/>
-      <xsd:element name="message-destination-type"
-		   type="j2ee:message-destination-typeType"
-		   minOccurs="0"/>
-      <xsd:element name="message-destination-link"
-		   type="j2ee:message-destination-linkType"
-		   minOccurs="0"/>
-      <xsd:element name="activation-config"
-		   type="j2ee:activation-configType"
-		   minOccurs="0"/>
-      <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
-      <xsd:element name="security-identity"
-		   type="j2ee:security-identityType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="method-intfType">
-
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The method-intf element allows a method element to
-	differentiate between the methods with the same name and
-	signature that are multiply defined across the home and
-	component interfaces (e.g, in both an enterprise bean's
-	remote and local interfaces or in both an enterprise bean's
-	home and remote interfaces, etc.); the component and web
-	service endpoint interfaces, and so on. The Local applies to
-        both local component interface and local business interface.
-        Similarly, Remote applies to both remote component interface
-        and the remote business interface.
-
-	The method-intf element must be one of the following:
-
-	    Home
-	    Remote
-	    LocalHome
-	    Local
-	    ServiceEndpoint
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Home"/>
-	<xsd:enumeration value="Remote"/>
-	<xsd:enumeration value="LocalHome"/>
-	<xsd:enumeration value="Local"/>
-	<xsd:enumeration value="ServiceEndpoint"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="method-nameType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The method-nameType contains a name of an enterprise
-	bean method or the asterisk (*) character. The asterisk is
-	used when the element denotes all the methods of an
-	enterprise bean's client view interfaces.
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string"/>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="method-paramsType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The method-paramsType defines a list of the
-	fully-qualified Java type names of the method parameters.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="method-param"
-		   type="j2ee:java-typeType"
-		   minOccurs="0"
-		   maxOccurs="unbounded">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The method-param element contains a primitive
-	    or a fully-qualified Java type name of a method
-	    parameter.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="method-permissionType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The method-permissionType specifies that one or more
-	security roles are allowed to invoke one or more enterprise
-	bean methods. The method-permissionType consists of an
-	optional description, a list of security role names or an
-	indicator to state that the method is unchecked for
-	authorization, and a list of method elements.
-
-	The security roles used in the method-permissionType
-	must be defined in the security-role elements of the
-	deployment descriptor, and the methods must be methods
-	defined in the enterprise bean's business, home, component
-        and/or web service endpoint interfaces.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:choice>
-	<xsd:element name="role-name"
-		     type="j2ee:role-nameType"
-		     maxOccurs="unbounded"/>
-	<xsd:element name="unchecked"
-		     type="j2ee:emptyType">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The unchecked element specifies that a method is
-	      not checked for authorization by the container
-	      prior to invocation of the method.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	</xsd:element>
-      </xsd:choice>
-      <xsd:element name="method"
-		   type="j2ee:methodType"
-		   maxOccurs="unbounded"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="methodType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	  The methodType is used to denote a method of an enterprise
-	  bean's business, home, component, and/or web service endpoint
-	  interface, or, in the case of a message-driven bean, the
-	  bean's message listener method, or a set of such
-	  methods. The ejb-name element must be the name of one of the
-	  enterprise beans declared in the deployment descriptor; the
-	  optional method-intf element allows to distinguish between a
-	  method with the same signature that is multiply defined
-	  across the business, home, component, and/or web service
-          endpoint nterfaces; the method-name element specifies the
-          method name; and the optional method-params elements identify
-          a single method among multiple methods with an overloaded
-	  method name.
-
-	  There are three possible styles of using methodType element
-	  within a method element:
-
-	  1.
-	  <method>
-	      <ejb-name>EJBNAME</ejb-name>
-	      <method-name>*</method-name>
-	  </method>
-
-	     This style is used to refer to all the methods of the
-	     specified enterprise bean's business, home, component,
-             and/or web service endpoint interfaces.
-
-	  2.
-	  <method>
-	      <ejb-name>EJBNAME</ejb-name>
-	      <method-name>METHOD</method-name>
-	  </method>
-
-	     This style is used to refer to the specified method of
-	     the specified enterprise bean. If there are multiple
-	     methods with the same overloaded name, the element of
-	     this style refers to all the methods with the overloaded
-	     name.
-
-	  3.
-	  <method>
-	      <ejb-name>EJBNAME</ejb-name>
-	      <method-name>METHOD</method-name>
-	      <method-params>
-		  <method-param>PARAM-1</method-param>
-		  <method-param>PARAM-2</method-param>
-		  ...
-		  <method-param>PARAM-n</method-param>
-	      </method-params>
-	  </method>
-
-	     This style is used to refer to a single method within a
-	     set of methods with an overloaded name. PARAM-1 through
-	     PARAM-n are the fully-qualified Java types of the
-	     method's input parameters (if the method has no input
-	     arguments, the method-params element contains no
-	     method-param elements). Arrays are specified by the
-	     array element's type, followed by one or more pair of
-	     square brackets (e.g. int[][]). If there are multiple
-	     methods with the same overloaded name, this style refers
-	     to all of the overloaded methods.
-
-	  Examples:
-
-	  Style 1: The following method element refers to all the
-	  methods of the EmployeeService bean's business, home,
-          component, and/or web service endpoint interfaces:
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-name>*</method-name>
-	  </method>
-
-	  Style 2: The following method element refers to all the
-	  create methods of the EmployeeService bean's home
-	  interface(s).
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-name>create</method-name>
-	  </method>
-
-	  Style 3: The following method element refers to the
-	  create(String firstName, String LastName) method of the
-	  EmployeeService bean's home interface(s).
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-name>create</method-name>
-	      <method-params>
-		  <method-param>java.lang.String</method-param>
-		  <method-param>java.lang.String</method-param>
-	      </method-params>
-	  </method>
-
-	  The following example illustrates a Style 3 element with
-	  more complex parameter types. The method
-	  foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
-	  mypackage.MyClass[][] myclaar) would be specified as:
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-name>foobar</method-name>
-	      <method-params>
-		  <method-param>char</method-param>
-		  <method-param>int</method-param>
-		  <method-param>int[]</method-param>
-		  <method-param>mypackage.MyClass</method-param>
-		  <method-param>mypackage.MyClass[][]</method-param>
-	      </method-params>
-	  </method>
-
-	  The optional method-intf element can be used when it becomes
-	  necessary to differentiate between a method that is multiply
-	  defined across the enterprise bean's business, home, component,
-          and/or web service endpoint interfaces with the same name and
-	  signature. However, if the same method is a method of both the
-          local business interface, and the local component interface,
-          the same attribute applies to the method for both interfaces.
-          Likewise, if the same method is a method of both the remote
-          business interface and the remote component interface, the same
-          attribute applies to the method for both interfaces.
-
-	  For example, the method element
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-intf>Remote</method-intf>
-	      <method-name>create</method-name>
-	      <method-params>
-		  <method-param>java.lang.String</method-param>
-		  <method-param>java.lang.String</method-param>
-	      </method-params>
-	  </method>
-
-	  can be used to differentiate the create(String, String)
-	  method defined in the remote interface from the
-	  create(String, String) method defined in the remote home
-	  interface, which would be defined as
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-intf>Home</method-intf>
-	      <method-name>create</method-name>
-	      <method-params>
-		  <method-param>java.lang.String</method-param>
-		  <method-param>java.lang.String</method-param>
-	      </method-params>
-	  </method>
-
-	  and the create method that is defined in the local home
-	  interface which would be defined as
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-intf>LocalHome</method-intf>
-	      <method-name>create</method-name>
-	      <method-params>
-		  <method-param>java.lang.String</method-param>
-		  <method-param>java.lang.String</method-param>
-	      </method-params>
-	  </method>
-
-	  The method-intf element can be used with all three Styles
-	  of the method element usage. For example, the following
-	  method element example could be used to refer to all the
-	  methods of the EmployeeService bean's remote home interface
-          and the remote business interface.
-
-	  <method>
-	      <ejb-name>EmployeeService</ejb-name>
-	      <method-intf>Home</method-intf>
-	      <method-name>*</method-name>
-	  </method>
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0" maxOccurs="unbounded"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"/>
-      <xsd:element name="method-intf"
-		   type="j2ee:method-intfType"
-		   minOccurs="0">
-      </xsd:element>
-      <xsd:element name="method-name"
-		   type="j2ee:method-nameType"/>
-      <xsd:element name="method-params"
-		   type="j2ee:method-paramsType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="multiplicityType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The multiplicityType describes the multiplicity of the
-	role that participates in a relation.
-
-	The value must be one of the two following:
-
-	    One
-	    Many
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="One"/>
-	<xsd:enumeration value="Many"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="named-methodType">
-    <xsd:sequence>
-      <xsd:element name="method-name"
-		   type="j2ee:string"/>
-      <xsd:element name="method-params"
-		   type="j2ee:method-paramsType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="persistence-typeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The persistence-typeType specifies an entity bean's persistence
-	management type.
-
-	The persistence-type element must be one of the two following:
-
-	    Bean
-	    Container
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Bean"/>
-	<xsd:enumeration value="Container"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="query-methodType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	  The query-method specifies the method for a finder or select
-	  query.
-
-	  The method-name element specifies the name of a finder or select
-	  method in the entity bean's implementation class.
-
-	  Each method-param must be defined for a query-method using the
-	  method-params element.
-
-	  It is used by the query-method element.
-
-	  Example:
-
-	  <query>
-	      <description>Method finds large orders</description>
-	      <query-method>
-		  <method-name>findLargeOrders</method-name>
-		  <method-params></method-params>
-	      </query-method>
-	      <ejb-ql>
-		SELECT OBJECT(o) FROM Order o
-		  WHERE o.amount &gt; 1000
-	      </ejb-ql>
-	  </query>
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="method-name"
-		   type="j2ee:method-nameType"/>
-      <xsd:element name="method-params"
-		   type="j2ee:method-paramsType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="queryType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The queryType defines a finder or select
-	query. It contains
-	    - an optional description of the query
-	    - the specification of the finder or select
-	      method it is used by
-		- an optional specification of the result type
-		  mapping, if the query is for a select method
-		  and entity objects are returned.
-		- the EJB QL query string that defines the query.
-
-	Queries that are expressible in EJB QL must use the ejb-ql
-	element to specify the query. If a query is not expressible
-	in EJB QL, the description element should be used to
-	describe the semantics of the query and the ejb-ql element
-	should be empty.
-
-	The result-type-mapping is an optional element. It can only
-	be present if the query-method specifies a select method
-	that returns entity objects.  The default value for the
-	result-type-mapping element is "Local".
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType" minOccurs="0"/>
-      <xsd:element name="query-method"
-		   type="j2ee:query-methodType"/>
-      <xsd:element name="result-type-mapping"
-		   type="j2ee:result-type-mappingType"
-		   minOccurs="0"/>
-      <xsd:element name="ejb-ql"
-		   type="j2ee:xsdStringType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="relationship-role-sourceType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The relationship-role-sourceType designates the source of a
-	role that participates in a relationship. A
-	relationship-role-sourceType is used by
-	relationship-role-source elements to uniquely identify an
-	entity bean.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="relationshipsType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The relationshipsType describes the relationships in
-	which entity beans with container-managed persistence
-	participate. The relationshipsType contains an optional
-	description; and a list of ejb-relation elements, which
-	specify the container managed relationships.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:element name="ejb-relation"
-		   type="j2ee:ejb-relationType"
-		   maxOccurs="unbounded">
-
-	<xsd:unique name="role-name-uniqueness">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The ejb-relationship-role-name contains the name of a
-	      relationship role. The name must be unique within
-	      a relationship, but can be reused in different
-	      relationships.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	  <xsd:selector
-	       xpath=".//j2ee:ejb-relationship-role-name"/>
-	  <xsd:field
-	       xpath="."/>
-	</xsd:unique>
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="remove-methodType">
-    <xsd:sequence>
-      <xsd:element name="bean-method"
-		   type="j2ee:named-methodType"/>
-      <xsd:element name="retain-if-exception"
-		   type="j2ee:emptyType"
-		   minOccurs="0"/>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="result-type-mappingType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The result-type-mappingType is used in the query element to
-	specify whether an abstract schema type returned by a query
-	for a select method is to be mapped to an EJBLocalObject or
-	EJBObject type.
-
-	The value must be one of the following:
-
-	    Local
-	    Remote
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Local"/>
-	<xsd:enumeration value="Remote"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="security-identityType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The security-identityType specifies whether the caller's
-	security identity is to be used for the execution of the
-	methods of the enterprise bean or whether a specific run-as
-	identity is to be used. It contains an optional description
-	and a specification of the security identity to be used.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:element name="description"
-		   type="j2ee:descriptionType"
-		   minOccurs="0"
-		   maxOccurs="unbounded"/>
-      <xsd:choice>
-	<xsd:element name="use-caller-identity"
-		     type="j2ee:emptyType">
-	  <xsd:annotation>
-	    <xsd:documentation>
-
-	      The use-caller-identity element specifies that
-	      the caller's security identity be used as the
-	      security identity for the execution of the
-	      enterprise bean's methods.
-
-	    </xsd:documentation>
-	  </xsd:annotation>
-	</xsd:element>
-	<xsd:element name="run-as"
-		     type="j2ee:run-asType"/>
-      </xsd:choice>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="session-beanType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The session-beanType declares an session bean. The
-	declaration consists of:
-
-	    - an optional description
-	    - an optional display name
-	    - an optional icon element that contains a small and a large
-	      icon file name
-	    - an optional declaration of the enterprise bean's name
-            - the names of all the remote or local business interfaces,
-              if any
-	    - the names of the session bean's remote home and
-	      remote interfaces, if any
-	    - the names of the session bean's local home and
-	      local interfaces, if any
-	    - the name of the session bean's web service endpoint
-	      interface, if any
-	    - an optional declaration of the message-driven bean's 
-	      implementation class
-	    - the session bean's state management type
-	    - the optional session bean's transaction management type.
-              If it is not present, it is defaulted to Container.
-	    - an optional declaration of the bean's
-	      environment entries
-	    - an optional declaration of the bean's EJB references
-	    - an optional declaration of the bean's local
-	      EJB references
-	    - an optional declaration of the bean's web
-	      service references
-	    - an optional declaration of the security role
-	      references
-	    - an optional declaration of the security identity
-	      to be used for the execution of the bean's methods
-	    - an optional declaration of the bean's resource
-	      manager connection factory references
-	    - an optional declaration of the bean's resource
-	      environment references.
-	    - an optional declaration of the bean's message
-	      destination references
-
-	The elements that are optional are "optional" in the sense
-	that they are omitted when if lists represented by them are
-	empty.
-
-	Either both the local-home and the local elements or both
-	the home and the remote elements must be specified for the
-	session bean.
-
-	The service-endpoint element may only be specified if the
-	bean is a stateless session bean.
-
-      </xsd:documentation>
-    </xsd:annotation>
-
-    <xsd:sequence>
-      <xsd:group ref="j2ee:descriptionGroup"/>
-      <xsd:element name="ejb-name"
-		   type="j2ee:ejb-nameType"
-		   minOccurs="0"/>
-      <xsd:element name="home"
-		   type="j2ee:homeType"
-		   minOccurs="0"/>
-      <xsd:element name="remote"
-		   type="j2ee:remoteType"
-		   minOccurs="0"/>
-      <xsd:element name="local-home"
-		   type="j2ee:local-homeType"
-		   minOccurs="0"/>
-      <xsd:element name="local"
-		   type="j2ee:localType"
-		   minOccurs="0"/>
-      <xsd:element name="business-local"
-		   type="j2ee:fully-qualified-classType"
-		   minOccurs="0"
-                   maxOccurs="unbounded"/>
-      <xsd:element name="business-remote"
-		   type="j2ee:fully-qualified-classType"
-		   minOccurs="0"
-                   maxOccurs="unbounded"/>
-      <xsd:element name="service-endpoint"
-		   type="j2ee:fully-qualified-classType"
-		   minOccurs="0">
-	<xsd:annotation>
-	  <xsd:documentation>
-
-	    The service-endpoint element contains the
-	    fully-qualified name of the enterprise bean's web
-	    service endpoint interface. The service-endpoint
-	    element may only be specified for a stateless
-	    session bean. The specified interface must be a
-	    valid JAX-RPC service endpoint interface.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="ejb-class"
-		   type="j2ee:ejb-classType"
-		   minOccurs="0"/>
-      <xsd:element name="session-type"
-		   type="j2ee:session-typeType"
-                   minOccurs="0"/>
-      <xsd:element name="interceptor"
-                   type="j2ee:interceptorType"
-                   minOccurs="0"
-                   maxOccurs="unbounded"/>
-      <xsd:element name="around-invoke-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="callback-listener"
-                   type="j2ee:callback-listenerType"
-                   minOccurs="0"/>
-      <xsd:element name="post-construct-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="pre-destroy-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="post-activate-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="pre-passivate-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="timeout-method"
-                   type="j2ee:named-methodType"
-                   minOccurs="0"/>
-      <xsd:element name="init-method"
-                   type="j2ee:init-methodType"
-                   minOccurs="0"
-                   maxOccurs="unbounded">
-        <xsd:annotation>
-	  <xsd:documentation>
-
-	    The init-method element specifies the mappings for
-	    EJB 2.x style create methods for an EJB 3.0 bean.
-	    This element can only be specified for stateful
-            session beans.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="remove-method"
-                   type="j2ee:remove-methodType"
-                   minOccurs="0"
-                   maxOccurs="unbounded">
-        <xsd:annotation>
-	  <xsd:documentation>
-
-	    The remove-method element specifies the mappings for
-	    EJB 2.x style remove methods for an EJB 3.0 bean.
-	    This element can only be specified for stateful
-            session beans.
-
-	  </xsd:documentation>
-	</xsd:annotation>
-      </xsd:element>
-      <xsd:element name="transaction-type"
-		   type="j2ee:transaction-typeType"
-                   minOccurs="0"/>
-      <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
-      <xsd:element name="security-role-ref"
-		   type="j2ee:security-role-refType"
-		   minOccurs="0"
-		   maxOccurs="unbounded">
-      </xsd:element>
-      <xsd:element name="security-identity"
-		   type="j2ee:security-identityType"
-		   minOccurs="0">
-      </xsd:element>
-    </xsd:sequence>
-    <xsd:attribute name="id" type="xsd:ID"/>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="session-typeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The session-typeType describes whether the session bean is a
-	stateful session or stateless session. It is used by
-	session-type elements.
-
-	The value must be one of the two following:
-
-	    Stateful
-	    Stateless
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Stateful"/>
-	<xsd:enumeration value="Stateless"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="trans-attributeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The trans-attributeType specifies how the container must
-	manage the transaction boundaries when delegating a method
-	invocation to an enterprise bean's business method.
-
-	The value must be one of the following:
-
-	    NotSupported
-	    Supports
-	    Required
-	    RequiresNew
-	    Mandatory
-	    Never
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="NotSupported"/>
-	<xsd:enumeration value="Supports"/>
-	<xsd:enumeration value="Required"/>
-	<xsd:enumeration value="RequiresNew"/>
-	<xsd:enumeration value="Mandatory"/>
-	<xsd:enumeration value="Never"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-<!-- **************************************************** -->
-
-  <xsd:complexType name="transaction-typeType">
-    <xsd:annotation>
-      <xsd:documentation>
-
-	The transaction-typeType specifies an enterprise bean's
-	transaction management type.
-
-	The transaction-type must be one of the two following:
-
-	    Bean
-	    Container
-
-      </xsd:documentation>
-    </xsd:annotation>
-    <xsd:simpleContent>
-      <xsd:restriction base="j2ee:string">
-	<xsd:enumeration value="Bean"/>
-	<xsd:enumeration value="Container"/>
-      </xsd:restriction>
-    </xsd:simpleContent>
-  </xsd:complexType>
-
-</xsd:schema>
-
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/security (from rev 56789, branches/Branch_4_0/ejb3/src/resources/security)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/security/tst.policy
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/security/tst.policy	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/security/tst.policy	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,3 +0,0 @@
-grant {
-        permission java.security.AllPermission;
-};

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/security/tst.policy (from rev 56789, branches/Branch_4_0/ejb3/src/resources/security/tst.policy)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/embedded-jboss-beans.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/standalone/embedded-jboss-beans.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/jboss-jms-beans.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/standalone/jboss-jms-beans.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/jndi.properties
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/jndi.properties	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/jndi.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,2 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/log4j.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/standalone/log4j.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/login-config.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/standalone/login-config.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/standalone/security-beans.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/standalone/security-beans.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/bank/META-INF/ejb-jar.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/bank/META-INF/ejb-jar.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/bank/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -66,7 +66,7 @@
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Container</res-auth>
             <res-sharing-scope>Shareable</res-sharing-scope>
-            <mapped-name>java:/DefaultDS</mapped-name>
+            <mapped-name>${test.datasource.jndi}</mapped-name>
             <injection-target>
                <injection-target-class>org.jboss.ejb3.test.bank.BankBean</injection-target-class>
                <injection-target-name>customerDb</injection-target-name>
@@ -84,7 +84,7 @@
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Container</res-auth>
             <res-sharing-scope>Shareable</res-sharing-scope>
-            <mapped-name>java:/DefaultDS</mapped-name>
+            <mapped-name>${test.datasource.jndi}</mapped-name>
             <injection-target>
                <injection-target-class>org.jboss.ejb3.test.bank.BankBean21</injection-target-class>
                <injection-target-name>customerDb</injection-target-name>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/bank/META-INF/jboss.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/bank/META-INF/jboss.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/bank/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -29,9 +29,11 @@
       </session>
       <session>
          <ejb-name>Teller</ejb-name>
-         <jndi-name>bank/Teller</jndi-name>
-         <interceptor-stack>TellerClientInterceptors</interceptor-stack>
-         <proxy-factory>org.jboss.ejb3.test.bank.TellerRemoteProxyFactory</proxy-factory>
+         <remote-binding>
+            <jndi-name>bank/Teller</jndi-name>
+            <interceptor-stack>TellerClientInterceptors</interceptor-stack>
+            <proxy-factory>org.jboss.ejb3.test.bank.TellerRemoteProxyFactory</proxy-factory>
+         </remote-binding>
          <security-identity>
             <run-as-principal>teller</run-as-principal>
          </security-identity> 
@@ -42,6 +44,14 @@
                <transaction-timeout>1</transaction-timeout>
              </method>
           </method-attributes>
+         <jndi-ref>
+            <jndi-ref-name>TellerTM</jndi-ref-name>
+            <mapped-name>${test.transactionmanager.jndi}</mapped-name>
+            <injection-target>
+               <injection-target-class>org.jboss.ejb3.test.bank.TellerBean</injection-target-class>
+               <injection-target-name>tm</injection-target-name>
+            </injection-target>
+         </jndi-ref>
       </session>
    </enterprise-beans>
 </jboss>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/cache/testejb3-cache-service.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/cache/testejb3-cache-service.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/cache/testejb3-cache-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -36,13 +36,34 @@
                <attribute name="maxNodes">5000</attribute>
                <attribute name="timeToIdleSeconds">1000</attribute>
             </region>
-
          </config>
       </attribute>
 
+      <attribute name="CacheLoaderConfiguration">
+            <config>
+                <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
+                <passivation>true</passivation>
+                <preload>/</preload>
+                <shared>false</shared>
 
-      <attribute name="CacheLoaderClass">org.jboss.ejb3.cache.tree.PassivationCacheLoader</attribute>
-      <attribute name="CacheLoaderConfig">location=stateful</attribute>
+                <!-- we can now have multiple cache loaders, which get chained -->
+                <cacheloader>
+                    <class>org.jboss.ejb3.cache.tree.PassivationCacheLoader</class>
+                    <!-- same as the old CacheLoaderConfig attribute -->
+                    <properties>
+                        location=server/all/tmp/stateful
+                    </properties>
+                    <!-- whether the cache loader writes are asynchronous -->
+                    <async>false</async>
+                    <!-- only one cache loader in the chain may set fetchPersistentState to true.
+                        An exception is thrown if more than one cache loader sets this to true. -->
+                    <fetchPersistentState>true</fetchPersistentState>
+                    <!-- determines whether this cache loader ignores writes - defaults to false. -->
+                    <ignoreModifications>false</ignoreModifications>
+                </cacheloader>
+
+            </config>
+        </attribute>
    </mbean>
 
 </server>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/cache/testejb3-statefulcache-service.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/cache/testejb3-statefulcache-service.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/cache/testejb3-statefulcache-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -40,9 +40,31 @@
          </config>
       </attribute>
 
+      <attribute name="CacheLoaderConfiguration">
+            <config>
+                <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
+                <passivation>true</passivation>
+                <preload>/</preload>
+                <shared>false</shared>
 
-      <attribute name="CacheLoaderClass">org.jboss.ejb3.cache.tree.StatefulCacheLoader</attribute>
-      <attribute name="CacheLoaderConfig">location=stateful</attribute>
+                <!-- we can now have multiple cache loaders, which get chained -->
+                <cacheloader>
+                    <class>org.jboss.ejb3.cache.tree.StatefulCacheLoader</class>
+                    <!-- same as the old CacheLoaderConfig attribute -->
+                    <properties>
+                        location=server/all/tmp/stateful
+                    </properties>
+                    <!-- whether the cache loader writes are asynchronous -->
+                    <async>false</async>
+                    <!-- only one cache loader in the chain may set fetchPersistentState to true.
+                        An exception is thrown if more than one cache loader sets this to true. -->
+                    <fetchPersistentState>true</fetchPersistentState>
+                    <!-- determines whether this cache loader ignores writes - defaults to false. -->
+                    <ignoreModifications>false</ignoreModifications>
+                </cacheloader>
+
+            </config>
+        </attribute>
    </mbean>
 
 </server>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/circulardependency/META-INF/jboss.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/circulardependency/META-INF/jboss.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/circulardependency/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -8,12 +8,14 @@
    <enterprise-beans>
       <session>
          <ejb-name>StatelessBean2</ejb-name>
-         <ignore-dependency>
+         <annotation>
+            <annotation-class>org.jboss.annotation.IgnoreDependency</annotation-class>
+            <annotation-implementation-class>org.jboss.annotation.IgnoreDependencyImpl</annotation-implementation-class>
             <injection-target>
                <injection-target-class>org.jboss.ejb3.test.circulardependecy.StatelessBean2</injection-target-class>
                <injection-target-name>stateless</injection-target-name>
             </injection-target>
-         </ignore-dependency>
+         </annotation>
       </session>
    </enterprise-beans>
 </jboss>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredentity/META-INF/persistence.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredentity/META-INF/persistence.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredentity/META-INF/persistence.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -5,6 +5,7 @@
       <properties>
          <property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook"/>
          <property name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache"/>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
       </properties>
    </persistence-unit>
 </persistence>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/clusteredservice)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/WEB-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/clusteredservice/WEB-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/WEB-INF/web.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/clusteredservice/WEB-INF/web.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/WEB-INF/web.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app version="2.4"
-   xmlns="http://java.sun.com/xml/ns/j2ee"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
-   <description>EJB3 Servlet Access Test</description>
-
-   <servlet>
-      <servlet-name>EJBServlet</servlet-name>
-      <servlet-class>org.jboss.ejb3.test.clusteredservice.servlets.EJBServlet</servlet-class>
-   </servlet>
-
-   <!-- The servlet and jsp page mappings -->
-   <servlet-mapping>
-      <servlet-name>EJBServlet</servlet-name>
-      <url-pattern>/EJBServlet</url-pattern>
-   </servlet-mapping>
-</web-app>
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredservice/WEB-INF/web.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/clusteredservice/WEB-INF/web.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/clusteredsession)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/clusteredsession/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/clusteredsession/META-INF/ejb-jar.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ejb-jar
-        xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
-        version="3.0">
-   <enterprise-beans>
-      <session>
-         <ejb-name>NonClusteredStateful</ejb-name>
-         <remote>org.jboss.ejb3.test.clusteredsession.OverrideStatefulRemote</remote>
-         <ejb-class>org.jboss.ejb3.test.clusteredsession.OverrideStatefulBean</ejb-class>
-         <session-type>Stateful</session-type>
-         <transaction-type>Container</transaction-type>
-      </session>
-   </enterprise-beans>
-</ejb-jar>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/ejb-jar.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/clusteredsession/META-INF/ejb-jar.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<jboss
-        xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                            http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
-        version="3.0">
-      <enterprise-beans>
-         <session>
-            <ejb-name>OverrideStateful</ejb-name>
-            <jndi-name>OverrideStatefulRemote</jndi-name>
-            <clustered>true</clustered>
-            <cluster-config>
-               <partition-name>DefaultPartition</partition-name>
-               <load-balance-policy>org.jboss.ha.framework.interfaces.RandomRobin</load-balance-policy>
-            </cluster-config>
-         </session>
-         <session>
-            <ejb-name>NonClusteredStateful</ejb-name>
-            <jndi-name>NonClusteredStatefulRemote</jndi-name>
-            <clustered>false</clustered>
-            <cache-config>
-               <cache-class>org.jboss.ejb3.cache.simple.SimpleStatefulCache</cache-class>
-               <cache-max-size>1000</cache-max-size>
-               <idle-timeout-seconds>100</idle-timeout-seconds>
-            </cache-config>
-         </session>
-      </enterprise-beans>
-   </jboss>
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/clusteredsession/META-INF/jboss.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/persistence.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/clusteredsession/META-INF/persistence.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/persistence.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence>
-   <persistence-unit name="tempdb">
-      <jta-data-source>java:/DefaultDS</jta-data-source>
-      <properties>
-          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-      </properties>
-   </persistence-unit>
-</persistence>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/clusteredsession/META-INF/persistence.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/clusteredsession/META-INF/persistence.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/mdb/META-INF/ejb-jar.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/mdb/META-INF/ejb-jar.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/mdb/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -121,6 +121,14 @@
           	<activation-config-property-name>subscriptionDurability</activation-config-property-name>
           	<activation-config-property-value>Durable</activation-config-property-value>
           </activation-config-property>
+          <activation-config-property>
+          	<activation-config-property-name>subscriptionName</activation-config-property-name>
+          	<activation-config-property-value>DurableTopicTest</activation-config-property-value>
+          </activation-config-property>
+          <!--activation-config-property>
+          	<activation-config-property-name>clientId</activation-config-property-name>
+          	<activation-config-property-value>DurableTopicTest</activation-config-property-value>
+          </activation-config-property-->
         </activation-config>
       </message-driven>
 
@@ -129,6 +137,12 @@
 	    <ejb-class>org.jboss.ejb3.test.dd.mdb.ExQueueBean</ejb-class>
         <transaction-type>Container</transaction-type>
         <message-destination-type>javax.jms.Queue</message-destination-type>
+        <activation-config>   
+          <activation-config-property>
+          	<activation-config-property-name>dLQMaxResent</activation-config-property-name>
+          	<activation-config-property-value>10</activation-config-property-value>
+          </activation-config-property>
+        </activation-config>
       </message-driven>
 
       <message-driven>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/mdb/META-INF/jboss.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/mdb/META-INF/jboss.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/mdb/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -42,9 +42,9 @@
       <message-driven>
          <ejb-name>DurableTopicBean</ejb-name>
          <destination-jndi-name>topic/testDurableTopic</destination-jndi-name>
-         <mdb-user>john</mdb-user>
-         <mdb-passwd>needle</mdb-passwd>
-         <mdb-subscription-id>DurableSubscriberExample</mdb-subscription-id>
+         <mdb-user>dynsub</mdb-user>
+         <mdb-passwd>dynsub</mdb-passwd>
+         <mdb-subscription-id>DurableTopicTest</mdb-subscription-id>
       </message-driven>
       <message-driven>
          <ejb-name>ExQueueBean</ejb-name>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/web/META-INF/application.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/web/META-INF/application.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/web/META-INF/application.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -3,6 +3,10 @@
 <application>
     <display-name>EJB3 Web Container Testsuite</display-name>
 
+   <module>
+       <ejb>dd-web-ejbs.jar</ejb>
+   </module>
+
     <module>
     <web>
         <description>The testsuite war</description>
@@ -11,8 +15,5 @@
     </web>
     </module>
  
-    <module>
-        <ejb>dd-web-ejbs.jar</ejb>
-    </module>
 </application>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/web/WEB-INF/jbosstest-web.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/web/WEB-INF/jbosstest-web.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/dd/web/WEB-INF/jbosstest-web.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -394,12 +394,17 @@
       <env-entry-value>com.sun.model.dao.CatalogDAOImpl</env-entry-value>
    </env-entry>
 
+   <env-entry>
+      <env-entry-name>overridenConstant</env-entry-name>
+      <env-entry-type>java.lang.Integer</env-entry-type>
+      <env-entry-value>42</env-entry-value>
+   </env-entry>
    <!-- ### EJB References (java:comp/env/ejb) -->
    <ejb-ref>
       <ejb-ref-name>ejb/OptimizedEJB</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>org.jboss.ejb3.test.dd.web.interfaces.StatelessSessionHome</home>
-      <remote>org.jboss.ejb3.test.dd.web.interfaces.StatelessSession</remote>\
+      <remote>org.jboss.ejb3.test.dd.web.interfaces.StatelessSession</remote>
       <ejb-link>OptimizedEJB</ejb-link>
    </ejb-ref>
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/iiop)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/custom.jndi.properties
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/iiop/custom.jndi.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/custom.jndi.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,3 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-java.naming.provider.url=jnp://localhost:1099
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/custom.jndi.properties (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/iiop/custom.jndi.properties)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/jndi.properties
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/iiop/jndi.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/jndi.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,8 +0,0 @@
-java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
-java.naming.provider.url=corbaloc::localhost:3528/NameService
-#java.naming.provider.url=corbaloc::localhost:3528/JBoss/Naming/root
-java.naming.factory.object=org.jboss.tm.iiop.client.IIOPClientUserTransactionObjectFactory
-# use java: client namespace
-java.naming.factory.url.pkgs=org.jboss.ejb3.naming.client:org.jnp.interfaces
-# hack to get java: client namespace up
-j2ee.clientName=iiop-unit-test

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/iiop/jndi.properties (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/iiop/jndi.properties)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/jca/inflow/jmsmdbtest-service.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/jca/inflow/jmsmdbtest-service.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/META-INF/ejb-jar.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/META-INF/ejb-jar.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -8,8 +8,23 @@
 
     <enterprise-beans>
       <message-driven>
+        <ejb-name>QueueTestMDB</ejb-name>
+        <activation-config>
+          <activation-config-property>
+            <activation-config-property-name>maxSession</activation-config-property-name>
+              <activation-config-property-value>1</activation-config-property-value>
+          </activation-config-property>
+        </activation-config>
+      </message-driven>
+      <message-driven>
         <ejb-name>OverrideTestMDB</ejb-name>
         <message-destination-type>javax.jms.Queue</message-destination-type>
+          <activation-config>
+            <activation-config-property>
+              <activation-config-property-name>maxSession</activation-config-property-name>
+              <activation-config-property-value>100</activation-config-property-value>
+            </activation-config-property>
+          </activation-config>
       </message-driven>
     </enterprise-beans>
   </ejb-jar>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/META-INF/jboss.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/META-INF/jboss.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -11,5 +11,14 @@
          <ejb-name>OverrideTestMDB</ejb-name>
          <destination-jndi-name>queue/overridequeuetest</destination-jndi-name>
       </message-driven>
+      <message-driven>
+         <ejb-name>OverrideDefaultedQueueTestMDB</ejb-name>
+         <default-activation-config>
+            <default-activation-config-property>
+               <activation-config-property-name>destinationType</activation-config-property-name>
+               <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
+            </default-activation-config-property>
+         </default-activation-config>
+      </message-driven>
    </enterprise-beans>
 </jboss>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/mdbtest-service.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/mdbtest-service.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdb/mdbtest-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -11,6 +11,12 @@
       <attribute name="JNDIName">queue/defaultedmdbtest</attribute>
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
    </mbean>
+   
+   <mbean code="org.jboss.mq.server.jmx.Queue"
+      name="jboss.mq.destination:service=Queue,name=overridedefaultedqueuetest">
+      <attribute name="JNDIName">queue/overridedefaultedmdbtest</attribute>
+      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+   </mbean>
 
    <mbean code="org.jboss.mq.server.jmx.Queue"
       name="jboss.mq.destination:service=Queue,name=nondurablequeuetest">
@@ -36,4 +42,18 @@
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
    </mbean>
 
+   <mbean code="org.jboss.mq.server.jmx.Queue"
+      name="jboss.mq.destination:service=Queue,name=expirytest">
+      <attribute name="JNDIName">queue/expirytest</attribute>
+      <attribute name="ExpiryDestination">jboss.mq.destination:service=Queue,name=DLQ</attribute>
+      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+   </mbean>
+   
+   <mbean code="org.jboss.mq.server.jmx.Queue"
+      name="jboss.mq.destination:service=Queue,name=dlqtest">
+      <attribute name="JNDIName">queue/dlqtest</attribute>
+      <attribute name="ExpiryDestination">jboss.mq.destination:service=Queue,name=DLQ</attribute>
+      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+   </mbean>
+
 </server>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/META-INF/ejb-jar.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE ejb-jar PUBLIC
-  "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
-  "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">
-
-<ejb-jar>
-  <enterprise-beans>
-    <message-driven>
-	  <ejb-name>QueueBean21</ejb-name>
-	  <ejb-class>org.jboss.ejb3.test.mdbtransactions.QueueBean21</ejb-class>
-      <transaction-type>Container</transaction-type>
-      <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
-      <message-driven-destination>
-        <destination-type>javax.jms.Queue</destination-type>
-      </message-driven-destination>
-    </message-driven>
-  </enterprise-beans>
-  <assembly-descriptor>
-    <container-transaction>
-      <method>
-        <ejb-name>QueueBean21</ejb-name>
-          <method-name>onMessage</method-name>
-          <method-params>
-            <method-param>javax.jms.Message</method-param>
-          </method-params>
-        </method>
-      <trans-attribute>Required</trans-attribute>
-    </container-transaction>  
-  </assembly-descriptor>
-</ejb-jar>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/ejb-jar.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/META-INF/ejb-jar.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/META-INF/jboss.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE jboss PUBLIC
-      "-//JBoss//DTD JBOSS 3.2//EN"
-      "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
-<jboss>
-   <!--invoker-proxy-bindings>
-      <invoker-proxy-binding>
-         <name>my-message-driven-bean</name>
-         <invoker-mbean>default</invoker-mbean>
-         <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
-         <proxy-factory-config>
-            <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
-            <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
-            <MaximumSize>15</MaximumSize>
-            <MaxMessages>1</MaxMessages>
-            <MDBConfig>
-               <ReconnectIntervalSec>10</ReconnectIntervalSec>
-               <DLQConfig>
-                  <DestinationQueue>queue/DLQ</DestinationQueue>
-                  <MaxTimesRedelivered>10</MaxTimesRedelivered>
-                  <TimeToLive>0</TimeToLive>
-               </DLQConfig>
-            </MDBConfig>
-         </proxy-factory-config>
-      </invoker-proxy-binding>
-   </invoker-proxy-bindings-->
-
-   <enterprise-beans>
-      <message-driven>
-         <ejb-name>QueueBean21</ejb-name>
-         <destination-jndi-name>queue/mdb21test</destination-jndi-name>
-      </message-driven>
-   </enterprise-beans>
-</jboss>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/jboss.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/META-INF/jboss.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/persistence.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/META-INF/persistence.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/persistence.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence>
-   <persistence-unit name="tempdb">
-      <jta-data-source>java:/DefaultDS</jta-data-source>
-      <properties>
-          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-      </properties>
-   </persistence-unit>
-</persistence>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/META-INF/persistence.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/META-INF/persistence.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/mdbtransactionstest-service.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/mdbtransactionstest-service.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/mdbtransactionstest-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-   <mbean code="org.jboss.mq.server.jmx.Queue"
-      name="jboss.mq.destination:service=Queue,name=queuetest">
-      <attribute name="JNDIName">queue/mdbtest</attribute>
-      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-   </mbean>
-   <mbean code="org.jboss.mq.server.jmx.Queue"
-      name="jboss.mq.destination:service=Queue,name=rollbackqueuetest">
-      <attribute name="JNDIName">queue/rollbackmdbtest</attribute>
-      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-   </mbean>
-   <mbean code="org.jboss.mq.server.jmx.Queue"
-      name="jboss.mq.destination:service=Queue,name=queue21test">
-      <attribute name="JNDIName">queue/mdb21test</attribute>
-      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-   </mbean>
-</server>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/mdbtransactions/mdbtransactionstest-service.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/mdbtransactions/mdbtransactionstest-service.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/naming-errors/ejb-jar-method-field.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/naming-errors/ejb-jar-method-field.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/naming-errors/ejb-jar-method-field.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -11,13 +11,15 @@
       <session>
          <description>A session bean on looks up stuff in the ENC</description>
          <ejb-name>BadFieldMethodBean</ejb-name>
-         <ejb-class>org.jboss.ejb3.test.naming.bad.BadFieldMethodBean</ejb-class>
-
          <env-entry>
             <description>A flag indicating if the bean should perform the full ENC testsuite</description>
             <env-entry-name>key</env-entry-name>
             <env-entry-type>java.lang.String</env-entry-type>
             <env-entry-value>BadFieldMethodBean</env-entry-value>
+            <injection-target>
+               <injection-target-class>org.jboss.ejb3.test.naming.bad.BadFieldMethodBean</injection-target-class>
+               <injection-target-name>key</injection-target-name>
+            </injection-target>
          </env-entry>
       </session>
    </enterprise-beans>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485 (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/regression/ejbthree485)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/regression/ejbthree485/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/META-INF/application.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/regression/ejbthree485/META-INF/application.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/META-INF/application.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE application PUBLIC
-   "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
-   "http://java.sun.com/dtd/application_1_3.dtd">
-
-<application>
-   <display-name>EJB3 Ear test</display-name>
-
-   <module>
-      <ejb>ejbthree485.jar</ejb>
-   </module>
-</application>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree485/META-INF/application.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/regression/ejbthree485/META-INF/application.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625 (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/regression/ejbthree625)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/regression/ejbthree625/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/regression/ejbthree625/META-INF/ejb-jar.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ejb-jar
-        xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
-        version="3.0">
-   <assembly-descriptor>
-      <interceptor-binding>
-         <ejb-name>*</ejb-name>
-         <interceptor-class>org.jboss.ejb3.test.regression.ejbthree625.StupidInterceptor</interceptor-class>
-      </interceptor-binding>
-   </assembly-descriptor>
-</ejb-jar>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/regression/ejbthree625/META-INF/ejb-jar.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/regression/ejbthree625/META-INF/ejb-jar.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/ejb-jar.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
-	<assembly-descriptor>
-		<interceptor-binding>
-			<ejb-name>*</ejb-name>
-			<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
-		</interceptor-binding>
-	</assembly-descriptor>
-</ejb-jar>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/ejb-jar.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/ejb-jar.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/maven)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.properties
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,5 +0,0 @@
-#Generated by Maven
-#Fri May 12 18:10:37 PDT 2006
-version=2.0-SNAPSHOT
-groupId=com.adapt.crm
-artifactId=crm-ejb

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.properties (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.properties)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,20 +0,0 @@
-<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>com.adapt.crm</groupId>
-		<artifactId>crm-shared</artifactId>
-		<version>2.0-SNAPSHOT</version>
-	</parent>
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>crm-ejb</artifactId>
-	<packaging>ejb</packaging>
-	<name>MarketFinder CRM EJBs</name>
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.maven.plugins</groupId>
-			<artifactId>maven-ejb-plugin</artifactId>
-			<version>2.0-adapt</version>
-			<scope>provided</scope>
-		</dependency>
-	</dependencies>
-</project>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/META-INF/maven/com.adapt.crm/crm-ejb/pom.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/jboss-seam.jar
===================================================================
(Binary files differ)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/jboss-seam.jar (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/jboss-seam.jar)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/seam.properties
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/seam/seam.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/seam.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1 +0,0 @@
-org.jboss.seam.core.init.jndiPattern=seam-test/#{ejbName}/remote

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/seam/seam.properties (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/seam/seam.properties)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/META-INF/application.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/META-INF/application.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/META-INF/application.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -11,6 +11,10 @@
     </web>
     </module>
  
+   <module>
+       <ejb>servlet-client.jar</ejb>
+   </module>
+
     <module>
         <ejb>servlet-ejbs.jar</ejb>
     </module>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/META-INF/jboss.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/META-INF/jboss.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -5,10 +5,10 @@
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                             http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
         version="3.0">
-   <loader-repository>
+   <!--loader-repository>
       jboss.test:war=servlet.war
       <loader-repository-config>
          java2ParentDelegaton=false
       </loader-repository-config>
-   </loader-repository>
+   </loader-repository-->
 </jboss>

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/WEB-INF/jboss-web.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/WEB-INF/jboss-web.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/WEB-INF/jboss-web.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -5,18 +5,23 @@
     "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 
 <jboss-web>
-   <class-loading>
+   <!--class-loading>
       <loader-repository>
          jboss.test:war=servlet.war
          <loader-repository-config>
             java2ParentDelegation=false
          </loader-repository-config>
       </loader-repository>
-   </class-loading>
+   </class-loading-->
    
    <ejb-ref>
-      <ejb-ref-name>ejb/Session30</ejb-ref-name>
-      <jndi-name>Session30</jndi-name>
+      <ejb-ref-name>ejb/remote/Session30</ejb-ref-name>
+      <jndi-name>ejb/Session30Home</jndi-name>
    </ejb-ref>
+   
+   <ejb-local-ref>
+      <ejb-ref-name>ejb/local/Session30</ejb-ref-name>
+      <local-jndi-name>ejb/Session30LocalHome</local-jndi-name>
+   </ejb-local-ref>
 </jboss-web>
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/WEB-INF/test-web.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/WEB-INF/test-web.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/WEB-INF/test-web.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -20,11 +20,17 @@
    </servlet-mapping>
    
    <ejb-ref>
-      <ejb-ref-name>ejb/Session30</ejb-ref-name>
+      <ejb-ref-name>ejb/remote/Session30</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>org.jboss.ejb3.test.servlet.Session30Home</home>
       <remote>org.jboss.ejb3.test.servlet.Session30</remote>
-      <ejb-link>servlet-ejb2.jar#Session30</ejb-link>
    </ejb-ref>
+   
+   <ejb-local-ref>
+      <ejb-ref-name>ejb/local/Session30</ejb-ref-name>
+      <ejb-ref-type>Session</ejb-ref-type>
+      <local-home>org.jboss.ejb3.test.servlet.Session30LocalHome</local-home>
+      <local>org.jboss.ejb3.test.servlet.Session30</local>
+   </ejb-local-ref>
 </web-app>
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/roles.properties (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/servlet/roles.properties)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/servlet/users.properties (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/servlet/users.properties)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/ssladvanced)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/ssladvanced/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/ssladvanced/META-INF/jboss.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-<jboss
-   xmlns="http://java.sun.com/xml/ns/javaee"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-   http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
-   version="3.0">
-   <enterprise-beans>
-      <session>
-         <ejb-name>OverrideStatefulClusteredBean</ejb-name>
-         <remote-binding>
-            <jndi-name>OverrideStatefulClusteredSSL</jndi-name>
-            <client-bind-url>sslsocket://0.0.0.0:3843</client-bind-url>
-         </remote-binding>
-         <remote-binding>
-            <jndi-name>OverrideStatefulClusteredNormal</jndi-name>
-            <client-bind-url>socket://0.0.0.0:3873</client-bind-url>
-         </remote-binding>
-      </session>
-   </enterprise-beans>
-</jboss>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/ssladvanced/META-INF/jboss.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/ssladvanced/META-INF/jboss.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/stateful/META-INF/ejb-jar.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/stateful/META-INF/ejb-jar.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/stateful/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -19,5 +19,21 @@
             <retain-if-exception>false</retain-if-exception>
          </remove-method>
       </session>
+      <session>
+         <ejb-name>CustomRemoveBean</ejb-name>
+         <remove-method>
+            <bean-method>
+               <method-name>destroy</method-name>
+            </bean-method>
+            <retain-if-exception>false</retain-if-exception>
+         </remove-method>
+      </session>
+      <session>
+         <ejb-name>OverrideConcurrentStateful</ejb-name>
+         <remote>org.jboss.ejb3.test.stateful.ConcurrentStateful</remote>
+         <ejb-class>org.jboss.ejb3.test.stateful.ConcurrentStatefulBean</ejb-class>
+         <session-type>Stateful</session-type>
+         <transaction-type>Container</transaction-type>
+      </session>
    </enterprise-beans>
 </ejb-jar>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/stateful/META-INF/jboss.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/stateful/META-INF/jboss.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/strictpool/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/strictpool/META-INF/jboss.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<jboss
-        xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                            http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
-        version="3.0">
-      <enterprise-beans>
-         <session>
-            <ejb-name>OverrideStrictlyPooledSessionBean</ejb-name>
-            <annotation>
-               <annotation-class>org.jboss.annotation.ejb.PoolClass</annotation-class>
-               <annotation-implementation-class>org.jboss.annotation.ejb.PoolClassImpl</annotation-implementation-class>
-               <property>
-                  <property-name>value</property-name>
-                  <property-value>org.jboss.ejb3.StrictMaxPool</property-value>
-               </property>
-               <property>
-                  <property-name>maxSize</property-name>
-                  <property-value>5</property-value>
-               </property>
-               <property>
-                  <property-name>timeout</property-name>
-                  <property-value>10000</property-value>
-               </property>
-            </annotation>
-            <!--pool-config>
-               <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
-               <pool-max-size>5</pool-max-size>
-               <pool-timeout>10000</pool-timeout>
-            </pool-config-->
-         </session>
-         <message-driven>
-            <ejb-name>OverrideStrictlyPooledMDB</ejb-name>
-            <!--annotation>
-               <annotation-class>org.jboss.annotation.ejb.PoolClass</annotation-class>
-               <annotation-implementation-class>org.jboss.annotation.ejb.PoolClassImpl</annotation-implementation-class>
-               <property>
-                  <property-name>value</property-name>
-                  <property-value>org.jboss.ejb3.StrictMaxPool</property-value>
-               </property>
-               <property>
-                  <property-name>maxSize</property-name>
-                  <property-value>5</property-value>
-               </property>
-               <property>
-                  <property-name>timeout</property-name>
-                  <property-value>10000</property-value>
-               </property>
-            </annotation-->
-            <pool-config>
-               <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
-               <pool-max-size>5</pool-max-size>
-               <pool-timeout>10000</pool-timeout>
-            </pool-config>
-         </message-driven>
-      </enterprise-beans>
-   </jboss>
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/META-INF/jboss.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/strictpool/META-INF/jboss.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/strictpool_mdbtest-service.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/strictpool_mdbtest-service.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/strictpool/strictpool_mdbtest-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -12,4 +12,10 @@
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
    </mbean>
 
+   <mbean code="org.jboss.mq.server.jmx.Queue"
+      name="jboss.mq.destination:service=Queue,name=queueC">
+      <attribute name="JNDIName">queue/queueC</attribute>
+      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+   </mbean>
+
 </server>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/ejb-jar.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/ejb-jar.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,16 +0,0 @@
-<ejb-jar
-        xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
-        version="3.0">
-  <enterprise-beans>
-    <session>
-      <ejb-name>StatelessBean</ejb-name>
-      <remote>org.jboss.ejb3.test.unauthenticatedprincipal.StatelessRemote</remote>
-      <ejb-class>org.jboss.ejb3.test.unauthenticatedprincipal.StatelessBean</ejb-class>
-      <session-type>Stateless</session-type>
-      <transaction-type>Container</transaction-type>
-    </session>
-  </enterprise-beans>
-</ejb-jar>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/ejb-jar.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/ejb-jar.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/jboss.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/jboss.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jboss
-        xmlns="http://java.sun.com/xml/ns/javaee"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                            http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
-        version="3.0">
-   <security-domain>java:/jaas/other</security-domain>
-   <unauthenticated-principal>somebody</unauthenticated-principal>
-</jboss>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/jboss.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/META-INF/jboss.xml)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/roles.properties
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/roles.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/roles.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1 +0,0 @@
-somebody=allowed
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/roles.properties (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/roles.properties)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/users.properties
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/users.properties	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/users.properties	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1 +0,0 @@
-somebody=password

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test/unauthenticatedprincipal/users.properties (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test/unauthenticatedprincipal/users.properties)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/ejb3-jacc/deploy/ejb3-interceptors-aop.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/ejb3-jacc/deploy/ejb3-interceptors-aop.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/ejb3-jacc/deploy/jacc-service.xml
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/ejb3-jacc/deploy/jacc-service.xml	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/ejb3-jacc/deploy/jacc-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -32,7 +32,7 @@
       <xmbean>
          <descriptors>
             <injection id="MBeanServerType" setMethod="setMBeanServer" />
-            <injection id="ObjectNameType" setMethod="setObjectName" />
+            <!--injection id="ObjectNameType" setMethod="setObjectName" /-->
          </descriptors>
          <attribute access="read-write" getMethod="getPolicyName" setMethod="setPolicyName">
             <description>The policy provider MBean name</description>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/jboss-service.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/jboss-service.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/jboss-service.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,299 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   JBoss EJB3Deployer
-   
-   $Id: jboss-service.xml 41488 2006-02-25 00:14:09Z dimitris $
--->
-<server>
-
-   <mbean code="org.jboss.remoting.transport.Connector"
-          xmbean-dd="org/jboss/remoting/transport/Connector.xml"
-          name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
-      <depends>jboss.aop:service=AspectDeployer</depends>
-      <attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>
-      <attribute name="Configuration">
-         <handlers>
-            <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
-         </handlers>
-      </attribute>
-   </mbean>
-  
-   <mbean code="org.jboss.ejb3.JarsIgnoredForScanning" name="jboss.ejb3:service=JarsIgnoredForScanning">
-      <attribute name="IgnoredJars">
-         snmp-adaptor.jar,
-         otherimages.jar,
-         applet.jar,
-         jcommon.jar,
-         console-mgr-classes.jar,
-         jfreechart.jar,
-         juddi-service.jar,
-         wsdl4j.jar,
-         commons-collections.jar,
-         commons-pool.jar,
-         juddi.jar,
-         commons-discovery.jar,
-         uddi4j.jar,
-         axis.jar,
-         commons-dbcp.jar,
-         jboss-juddiaxis.jar,
-         trove.jar,
-         javassist.jar,
-         jboss-aop-jdk50.jar,
-         jboss-aspect-library-jdk50.jar,
-         ejb3-persistence.jar,
-         commons-validator-1.1.3.jar,
-         commons-collections.jar,
-         commons-fileupload.jar,
-         commons-pool.jar,
-         hibernate-entitymanager.jar,
-         jboss-ejb3x.jar,
-         commons-digester-1.6.jar,
-         cglib-2.1.1.jar,
-         commons-discovery.jar,
-         jboss-annotations-ejb3.jar,
-         jaxen-1.1-beta-4.jar,
-         hibernate-annotations.jar,
-         commons-httpclient.jar,
-         commons-logging.jar,
-         commons-vfs.jar,
-         hibernate3.jar,
-         commons-logging-api.jar,
-         asm.jar,
-         asm-attrs.jar,
-         commons-lang-2.0.jar,
-         commons-beanutils.jar,
-         jboss-ejb3.jar,
-         dom4j.jar,
-         commons-codec-1.2.jar,
-         wsdl4j.jar,
-         xmlsec.jar,
-         jbossws.jar,
-         jboss-bean-deployer.jar,
-         jboss-microcontainer.jar,
-         jboss-dependency.jar,
-         jboss-container.jar,
-         tomcat-coyote.jar,
-         commons-collections.jar,
-         myfaces.jar,
-         jstl.jar,
-         commons-digester-1.6.jar,
-         myfaces-impl.jar,
-         commons-beanutils.jar,
-         myfaces-jsf-api.jar,
-         commons-codec-1.2.jar,
-         catalina-optional.jar,
-         tomcat-util.jar,
-         jasper-compiler.jar,
-         commons-el.jar,
-         jasper-compiler-jdt.jar,
-         tomcat-http.jar,
-         catalina-manager.jar,
-         jasper-runtime.jar,
-         tomcat55-service.jar,
-         servlets-invoker.jar,
-         catalina.jar,
-         naming-resources.jar,
-         servlets-default.jar,
-         tomcat-ajp.jar,
-         commons-modeler.jar,
-         tomcat-apr.jar,
-         servlets-webdav.jar
-      </attribute>
-   </mbean>
-
-   <mbean code="org.jboss.ejb3.EJB3Deployer" name="jboss.ejb3:service=EJB3Deployer" xmbean-dd="">
-
-      <!-- Inline XMBean Descriptor BEGIN -->
-      <xmbean>
-         <description>The EJB3Deployer responsible for ejb3 deployment</description>
-         <descriptors>
-            <interceptors>
-               <!-- comment out DynamicInterceptor to disable dynamic addition of interceptors -->
-               <interceptor code="org.jboss.mx.interceptor.DynamicInterceptor"/>
-            </interceptors>
-         </descriptors>
-         <class>org.jboss.ejb3.EJB3Deployer</class>
-
-         <!-- ServiceMBean attributes -->
-         <attribute access="read-only" getMethod="getName">
-            <description>The class name of the MBean</description>
-            <name>Name</name>
-            <type>java.lang.String</type>
-         </attribute>
-
-         <attribute access="read-only" getMethod="getState">
-            <description>The status of the MBean</description>
-            <name>State</name>
-            <type>int</type>
-         </attribute>
-
-         <attribute access="read-only" getMethod="getStateString">
-            <description>The status of the MBean in text form</description>
-            <name>StateString</name>
-            <type>java.lang.String</type>
-         </attribute>
-
-         <!-- SubDeployerMBean attributes -->
-         <attribute access="read-only" getMethod="getServiceName">
-            <description>The ObjectName of the Subdeployer</description>
-            <name>ServiceName</name>
-            <type>javax.management.ObjectName</type>
-         </attribute>
-
-         <attribute access="read-write" getMethod="getSuffixes" setMethod="setSuffixes">
-            <description>The suffixes of interest to this deployer</description>
-            <name>Suffixes</name>
-            <type>[Ljava.lang.String;</type>
-         </attribute>
-
-         <attribute access="read-write" getMethod="getRelativeOrder" setMethod="setRelativeOrder">
-            <description>The relative order of the suffixes in the global suffixes list</description>
-            <name>RelativeOrder</name>
-            <type>int</type>
-         </attribute>
-
-         <!-- EJB3DeployerMBean attributes -->
-         <attribute access="read-only" getMethod="getDefaultProperties">
-            <name>DefaultProperties</name>
-            <type>java.util.Properties</type>
-         </attribute>
-
-         <attribute access="write-only" setMethod="setJarsIgnoredForScanning">
-            <description>mbean that has list of jars to ignore</description>
-            <name>JarsIgnoredForScanning</name>
-            <type>org.jboss.ejb3.JarsIgnoredForScanningMBean</type>
-         </attribute>
-
-         <!-- ServiceMBean operations -->
-         <operation>
-            <description>Standard MBean lifecycle method</description>
-            <name>create</name>
-         </operation>
-
-         <operation>
-            <description>The start lifecycle operation</description>
-            <name>start</name>
-         </operation>
-
-         <operation>
-            <description>The stop lifecycle operation</description>
-            <name>stop</name>
-         </operation>
-
-         <operation>
-            <description>The destroy lifecycle operation</description>
-            <name>destroy</name>
-         </operation>
-
-         <operation>
-            <description>The detyped lifecycle operation (for internal use only)</description>
-            <name>jbossInternalLifecycle</name>
-            <parameter>
-               <description>The lifecycle operation</description>
-               <name>method</name>
-               <type>java.lang.String</type>
-            </parameter>
-            <return-type>void</return-type>
-         </operation>
-
-         <!-- SubDeployerMBean operations -->
-         <operation>
-            <description>Accept a module for deployment</description>
-            <name>accepts</name>
-            <parameter>
-               <name>info</name>
-               <type>org.jboss.deployment.DeploymentInfo</type>
-            </parameter>
-            <return-type>boolean</return-type>
-         </operation>
-
-         <operation>
-            <description>Initialize deployment step</description>
-            <name>init</name>
-            <parameter>
-               <name>info</name>
-               <type>org.jboss.deployment.DeploymentInfo</type>
-            </parameter>
-         </operation>
-
-         <operation>
-            <description>Create deployment step</description>
-            <name>create</name>
-            <parameter>
-               <name>info</name>
-               <type>org.jboss.deployment.DeploymentInfo</type>
-            </parameter>
-         </operation>
-
-         <operation>
-            <description>Start deployment step</description>
-            <name>start</name>
-            <parameter>
-               <name>info</name>
-               <type>org.jboss.deployment.DeploymentInfo</type>
-            </parameter>
-         </operation>
-
-         <operation>
-            <description>Stop deployment step</description>
-            <name>stop</name>
-            <parameter>
-               <name>info</name>
-               <type>org.jboss.deployment.DeploymentInfo</type>
-            </parameter>
-         </operation>
-
-         <operation>
-            <description>Destroy deployment step</description>
-            <name>destroy</name>
-            <parameter>
-               <name>info</name>
-               <type>org.jboss.deployment.DeploymentInfo</type>
-            </parameter>
-         </operation>
-
-         <!-- Interceptable operations -->
-         <operation>
-            <description>Add dynamically an operation interceptor</description>
-            <name>addOperationInterceptor</name>
-            <parameter>
-               <description>The Interceptor</description>
-               <name>interceptor</name>
-               <type>org.jboss.mx.interceptor.Interceptor</type>
-            </parameter>
-         </operation>
-
-         <operation>
-            <description>Remove dynamically an operation interceptor</description>
-            <name>removeOperationInterceptor</name>
-            <parameter>
-               <description>The Interceptor</description>
-               <name>interceptor</name>
-               <type>org.jboss.mx.interceptor.Interceptor</type>
-            </parameter>
-         </operation>
-      </xmbean>
-      <!-- Inline XMBean Descriptor END -->
-
-      <depends>jboss.aop:service=AspectDeployer</depends>
-      <depends>jboss.ejb:service=EJBDeployer</depends>
-      <depends optional-attribute-name="JarsIgnoredForScanning" proxy-type="org.jboss.ejb3.JarsIgnoredForScanningMBean">jboss.ejb3:service=JarsIgnoredForScanning</depends>
-   </mbean>
-
-   <mbean code="org.jboss.remoting.transport.Connector"
-      xmbean-dd="org/jboss/remoting/transport/Connector.xml"
-      name="jboss.remoting:service=Connector,transport=Servlet"
-      display-name="Servlet transport Connector">
-      <depends>jboss.aop:service=AspectDeployer</depends>
-      <attribute name="InvokerLocator">
-         servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet
-      </attribute>
-      
-      <attribute name="Configuration">
-         <handlers>
-            <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
-         </handlers>
-      </attribute>
-   </mbean>
-
-</server>

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/jboss-service.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/ejb3.deployer/META-INF/jboss-service.xml)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.class
===================================================================
(Binary files differ)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.class (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/classes/org/jboss/remoting/transport/servlet/web/ServerInvokerServlet.class)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/web.xml
===================================================================
--- branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/web.xml	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/web.xml	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC
-   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-   "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<!-- The the JBossRemoting server invoker servlet web.xml descriptor
-$Id: web.xml,v 1.1 2005/06/16 21:12:48 telrod Exp $
--->
-<web-app>
-    <servlet>
-        <servlet-name>ServerInvokerServlet</servlet-name>
-        <description>The ServerInvokerServlet receives requests via HTTP
-           protocol from within a web container and passes it onto the
-           ServletServerInvoker for processing.
-        </description>
-        <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
-        <init-param>
-            <param-name>invokerName</param-name>
-            <param-value>jboss.remoting:service=invoker,transport=servlet</param-value>
-            <description>The servlet server invoker</description>
-        </init-param>
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-    <servlet-mapping>
-        <servlet-name>ServerInvokerServlet</servlet-name>
-        <url-pattern>/ServerInvokerServlet/*</url-pattern>
-    </servlet-mapping>
-</web-app>
-

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/web.xml (from rev 56789, branches/Branch_4_0/ejb3/src/resources/test-configs/invoker/deploy/servlet-invoker.war/WEB-INF/web.xml)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/asynchronous/SecuredStatelessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/asynchronous/SecuredStatelessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/asynchronous/SecuredStatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,7 +22,7 @@
 package org.jboss.ejb3.test.asynchronous;
 
 import java.lang.reflect.InvocationTargetException;
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.annotation.security.DenyAll;
 import javax.annotation.security.PermitAll;
 import javax.annotation.security.RolesAllowed;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Account.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Account.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Account.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -56,12 +56,9 @@
 /*
  * $Id$ Currently locked
  * by:$Locker$ Revision: $Log$
- * by:$Locker:  $ Revision: Revision 1.2.2.9  2006/05/11 04:18:08  bill
- * by:$Locker:  $ Revision: merge from head
+ * by:$Locker:  $ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
+ * by:$Locker:  $ Revision: Update the jboss LGPL headers
  * by:$Locker:  $ Revision:
- * by:$Locker$ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
- * by:$Locker$ Revision: Update the jboss LGPL headers
- * by:$Locker$ Revision:
  * by:$Locker$ Revision: Revision 1.2  2005/05/03 23:51:01  bdecoste
  * by:$Locker$ Revision: fixed formatting
  * by:$Locker$ Revision: Revision 1.1 2005/05/03

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -55,12 +55,9 @@
 /*
  * $Id$ Currently
  * locked by:$Locker$ Revision: $Log$
- * locked by:$Locker:  $ Revision: Revision 1.3.2.9  2006/05/11 04:18:08  bill
- * locked by:$Locker:  $ Revision: merge from head
+ * locked by:$Locker:  $ Revision: Revision 1.4  2005/10/30 00:06:46  starksm
+ * locked by:$Locker:  $ Revision: Update the jboss LGPL headers
  * locked by:$Locker:  $ Revision:
- * locked by:$Locker$ Revision: Revision 1.4  2005/10/30 00:06:46  starksm
- * locked by:$Locker$ Revision: Update the jboss LGPL headers
- * locked by:$Locker$ Revision:
  * locked by:$Locker$ Revision: Revision 1.3  2005/05/17 22:37:42  bdecoste
  * locked by:$Locker$ Revision: remove ejb2.1 rules
  * locked by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountBeanCMP.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountBeanCMP.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountBeanCMP.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -124,12 +124,9 @@
 /*
  * $Id$ Currently
  * locked by:$Locker$ Revision: $Log$
- * locked by:$Locker:  $ Revision: Revision 1.3.2.9  2006/05/11 04:18:08  bill
- * locked by:$Locker:  $ Revision: merge from head
+ * locked by:$Locker:  $ Revision: Revision 1.5  2006/03/09 05:12:58  starksm
+ * locked by:$Locker:  $ Revision: cleanup unused imports
  * locked by:$Locker:  $ Revision:
- * locked by:$Locker$ Revision: Revision 1.5  2006/03/09 05:12:58  starksm
- * locked by:$Locker$ Revision: cleanup unused imports
- * locked by:$Locker$ Revision:
  * locked by:$Locker$ Revision: Revision 1.4  2005/10/30 00:06:46  starksm
  * locked by:$Locker$ Revision: Update the jboss LGPL headers
  * locked by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountData.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountData.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountData.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -76,12 +76,9 @@
 /*
  * $Id$ Currently
  * locked by:$Locker$ Revision: $Log$
- * locked by:$Locker:  $ Revision: Revision 1.2.2.9  2006/05/11 04:18:08  bill
- * locked by:$Locker:  $ Revision: merge from head
+ * locked by:$Locker:  $ Revision: Revision 1.4  2006/03/09 05:12:58  starksm
+ * locked by:$Locker:  $ Revision: cleanup unused imports
  * locked by:$Locker:  $ Revision:
- * locked by:$Locker$ Revision: Revision 1.4  2006/03/09 05:12:58  starksm
- * locked by:$Locker$ Revision: cleanup unused imports
- * locked by:$Locker$ Revision:
  * locked by:$Locker$ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
  * locked by:$Locker$ Revision: Update the jboss LGPL headers
  * locked by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountHome.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountHome.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/AccountHome.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -62,12 +62,9 @@
 /*
  * $Id$ Currently
  * locked by:$Locker$ Revision: $Log$
- * locked by:$Locker:  $ Revision: Revision 1.2.2.9  2006/05/11 04:18:08  bill
- * locked by:$Locker:  $ Revision: merge from head
+ * locked by:$Locker:  $ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
+ * locked by:$Locker:  $ Revision: Update the jboss LGPL headers
  * locked by:$Locker:  $ Revision:
- * locked by:$Locker$ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
- * locked by:$Locker$ Revision: Update the jboss LGPL headers
- * locked by:$Locker$ Revision:
  * locked by:$Locker$ Revision: Revision 1.2  2005/05/03 23:51:01  bdecoste
  * locked by:$Locker$ Revision: fixed formatting
  * locked by:$Locker$ Revision: Revision 1.1

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Bank.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Bank.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Bank.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -62,12 +62,9 @@
 /*
  * $Id$ Currently locked
  * by:$Locker$ Revision: $Log$
- * by:$Locker:  $ Revision: Revision 1.8.2.9  2006/05/11 04:18:08  bill
- * by:$Locker:  $ Revision: merge from head
+ * by:$Locker:  $ Revision: Revision 1.11  2005/10/30 00:06:46  starksm
+ * by:$Locker:  $ Revision: Update the jboss LGPL headers
  * by:$Locker:  $ Revision:
- * by:$Locker$ Revision: Revision 1.11  2005/10/30 00:06:46  starksm
- * by:$Locker$ Revision: Update the jboss LGPL headers
- * by:$Locker$ Revision:
  * by:$Locker$ Revision: Revision 1.10  2005/10/13 19:14:42  bdecoste
  * by:$Locker$ Revision: added transaction timeouts via annotation or jboss.xml
  * by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -172,12 +172,9 @@
 /*
  * $Id$ Currently locked
  * by:$Locker$ Revision: $Log$
- * by:$Locker:  $ Revision: Revision 1.9.2.9  2006/05/11 04:18:08  bill
- * by:$Locker:  $ Revision: merge from head
+ * by:$Locker:  $ Revision: Revision 1.17  2006/03/29 19:19:29  bdecoste
+ * by:$Locker:  $ Revision: removed logging
  * by:$Locker:  $ Revision:
- * by:$Locker$ Revision: Revision 1.17  2006/03/29 19:19:29  bdecoste
- * by:$Locker$ Revision: removed logging
- * by:$Locker$ Revision:
  * by:$Locker$ Revision: Revision 1.16  2006/03/29 02:03:35  bdecoste
  * by:$Locker$ Revision: injection for all bean types
  * by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankBean21.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankBean21.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankBean21.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -148,12 +148,9 @@
 /*
  * $Id$ Currently locked
  * by:$Locker$ Revision: $Log$
- * by:$Locker:  $ Revision: Revision 1.1.2.9  2006/05/11 04:18:08  bill
- * by:$Locker:  $ Revision: merge from head
+ * by:$Locker:  $ Revision: Revision 1.2  2005/10/30 00:06:46  starksm
+ * by:$Locker:  $ Revision: Update the jboss LGPL headers
  * by:$Locker:  $ Revision:
- * by:$Locker$ Revision: Revision 1.2  2005/10/30 00:06:46  starksm
- * by:$Locker$ Revision: Update the jboss LGPL headers
- * by:$Locker$ Revision:
  * by:$Locker$ Revision: Revision 1.1  2005/06/02 23:25:14  bdecoste
  * by:$Locker$ Revision: ejb3 jboss.xml support
  * by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankException.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankException.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankException.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -63,12 +63,9 @@
 /*
  * $Id$ Currently
  * locked by:$Locker$ Revision: $Log$
- * locked by:$Locker:  $ Revision: Revision 1.2.2.9  2006/05/11 04:18:08  bill
- * locked by:$Locker:  $ Revision: merge from head
+ * locked by:$Locker:  $ Revision: Revision 1.4  2006/03/09 05:12:58  starksm
+ * locked by:$Locker:  $ Revision: cleanup unused imports
  * locked by:$Locker:  $ Revision:
- * locked by:$Locker$ Revision: Revision 1.4  2006/03/09 05:12:58  starksm
- * locked by:$Locker$ Revision: cleanup unused imports
- * locked by:$Locker$ Revision:
  * locked by:$Locker$ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
  * locked by:$Locker$ Revision: Update the jboss LGPL headers
  * locked by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankHome.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankHome.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/BankHome.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -50,12 +50,9 @@
 /*
  * $Id$ Currently locked
  * by:$Locker$ Revision: $Log$
- * by:$Locker:  $ Revision: Revision 1.2.2.9  2006/05/11 04:18:08  bill
- * by:$Locker:  $ Revision: merge from head
+ * by:$Locker:  $ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
+ * by:$Locker:  $ Revision: Update the jboss LGPL headers
  * by:$Locker:  $ Revision:
- * by:$Locker$ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
- * by:$Locker$ Revision: Update the jboss LGPL headers
- * by:$Locker$ Revision:
  * by:$Locker$ Revision: Revision 1.2  2005/05/03 23:51:01  bdecoste
  * by:$Locker$ Revision: fixed formatting
  * by:$Locker$ Revision: Revision 1.1 2005/05/03

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Customer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Customer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Customer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -55,12 +55,9 @@
 /*
  * $Id$ Currently locked
  * by:$Locker$ Revision: $Log$
- * by:$Locker:  $ Revision: Revision 1.2.2.9  2006/05/11 04:18:08  bill
- * by:$Locker:  $ Revision: merge from head
+ * by:$Locker:  $ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
+ * by:$Locker:  $ Revision: Update the jboss LGPL headers
  * by:$Locker:  $ Revision:
- * by:$Locker$ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
- * by:$Locker$ Revision: Update the jboss LGPL headers
- * by:$Locker$ Revision:
  * by:$Locker$ Revision: Revision 1.2  2005/05/03 23:51:01  bdecoste
  * by:$Locker$ Revision: fixed formatting
  * by:$Locker$ Revision: Revision 1.1 2005/05/03

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/CustomerBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/CustomerBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/CustomerBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -102,12 +102,9 @@
 /*
  * $Id$ Currently
  * locked by:$Locker$ Revision: $Log$
- * locked by:$Locker:  $ Revision: Revision 1.3.2.9  2006/05/11 04:18:08  bill
- * locked by:$Locker:  $ Revision: merge from head
+ * locked by:$Locker:  $ Revision: Revision 1.4  2005/10/30 00:06:46  starksm
+ * locked by:$Locker:  $ Revision: Update the jboss LGPL headers
  * locked by:$Locker:  $ Revision:
- * locked by:$Locker$ Revision: Revision 1.4  2005/10/30 00:06:46  starksm
- * locked by:$Locker$ Revision: Update the jboss LGPL headers
- * locked by:$Locker$ Revision:
  * locked by:$Locker$ Revision: Revision 1.3  2005/05/17 22:37:42  bdecoste
  * locked by:$Locker$ Revision: remove ejb2.1 rules
  * locked by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/CustomerHome.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/CustomerHome.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/CustomerHome.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -56,12 +56,9 @@
 /*
  * $Id$ Currently
  * locked by:$Locker$ Revision: $Log$
- * locked by:$Locker:  $ Revision: Revision 1.2.2.9  2006/05/11 04:18:08  bill
- * locked by:$Locker:  $ Revision: merge from head
+ * locked by:$Locker:  $ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
+ * locked by:$Locker:  $ Revision: Update the jboss LGPL headers
  * locked by:$Locker:  $ Revision:
- * locked by:$Locker$ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
- * locked by:$Locker$ Revision: Update the jboss LGPL headers
- * locked by:$Locker$ Revision:
  * locked by:$Locker$ Revision: Revision 1.2  2005/05/03 23:51:01  bdecoste
  * locked by:$Locker$ Revision: fixed formatting
  * locked by:$Locker$ Revision: Revision 1.1

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Teller.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Teller.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/Teller.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -74,12 +74,9 @@
 /*
  * $Id$ Currently locked
  * by:$Locker$ Revision: $Log$
- * by:$Locker:  $ Revision: Revision 1.8.2.9  2006/05/11 04:18:08  bill
- * by:$Locker:  $ Revision: merge from head
+ * by:$Locker:  $ Revision: Revision 1.10  2005/10/30 00:06:46  starksm
+ * by:$Locker:  $ Revision: Update the jboss LGPL headers
  * by:$Locker:  $ Revision:
- * by:$Locker$ Revision: Revision 1.10  2005/10/30 00:06:46  starksm
- * by:$Locker$ Revision: Update the jboss LGPL headers
- * by:$Locker$ Revision:
  * by:$Locker$ Revision: Revision 1.9  2005/10/13 19:14:42  bdecoste
  * by:$Locker$ Revision: added transaction timeouts via annotation or jboss.xml
  * by:$Locker$ Revision:

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/TellerBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/TellerBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/TellerBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -28,7 +28,6 @@
 import javax.naming.InitialContext;
 import javax.transaction.TransactionManager;
 import org.jboss.logging.Logger;
-import org.jboss.annotation.JndiInject;
 
 /**
  * @see <related>
@@ -40,7 +39,7 @@
    private static final Logger log = Logger.getLogger(TellerBean.class);
 
    @Resource private TimerService ts;
-   @JndiInject(jndiName="java:/TransactionManager") private TransactionManager tm;
+   private TransactionManager tm;
    private Bank bank;
    private boolean constructed = false;
    private String defaultValue = "original";

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/TellerHome.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/TellerHome.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/TellerHome.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -50,12 +50,9 @@
 /*
  * $Id$ Currently
  * locked by:$Locker$ Revision: $Log$
- * locked by:$Locker:  $ Revision: Revision 1.2.2.9  2006/05/11 04:18:08  bill
- * locked by:$Locker:  $ Revision: merge from head
+ * locked by:$Locker:  $ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
+ * locked by:$Locker:  $ Revision: Update the jboss LGPL headers
  * locked by:$Locker:  $ Revision:
- * locked by:$Locker$ Revision: Revision 1.3  2005/10/30 00:06:46  starksm
- * locked by:$Locker$ Revision: Update the jboss LGPL headers
- * locked by:$Locker$ Revision:
  * locked by:$Locker$ Revision: Revision 1.2  2005/05/03 23:51:01  bdecoste
  * locked by:$Locker$ Revision: fixed formatting
  * locked by:$Locker$ Revision: Revision 1.1

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/unit/BankDeploymentDescriptorTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/unit/BankDeploymentDescriptorTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bank/unit/BankDeploymentDescriptorTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,7 +23,11 @@
 
 import javax.ejb.EJBAccessException;
 import javax.ejb.EJBException;
+import javax.management.ObjectName;
 import javax.naming.InitialContext;
+
+import org.jboss.ejb3.ClientKernelAbstraction;
+import org.jboss.ejb3.KernelAbstractionFactory;
 import org.jboss.ejb3.test.bank.Bank;
 import org.jboss.ejb3.test.bank.ProxyFactoryInterface;
 import org.jboss.ejb3.test.bank.Teller;
@@ -345,10 +349,29 @@
    protected void setUp() throws Exception
    {
    }
+   
+   protected void tearDown() throws Exception
+   {
+   }
 
    public static Test suite() throws Exception
    {
-   //   return new TestSuite(BankDeploymentDescriptorTestCase.class);
+      ClientKernelAbstraction kernel = KernelAbstractionFactory.getClientInstance();
+      ObjectName propertiesServiceON = new ObjectName("jboss:type=Service,name=SystemProperties");
+      kernel.invoke(
+            propertiesServiceON,
+            "set",
+            new Object[]{"test.datasource.jndi","java:/DefaultDS"},
+            new String[]{"java.lang.String", "java.lang.String"}
+      );
+      
+      kernel.invoke(
+            propertiesServiceON,
+            "set",
+            new Object[]{"test.transactionmanager.jndi","java:/TransactionManager"},
+            new String[]{"java.lang.String", "java.lang.String"}
+      );
+      
       return getDeploySetup(BankDeploymentDescriptorTestCase.class, "bank.jar");
    }
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bmt/DeploymentDescriptorTesterBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bmt/DeploymentDescriptorTesterBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bmt/DeploymentDescriptorTesterBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,10 +21,9 @@
   */
 package org.jboss.ejb3.test.bmt;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.TransactionAttribute;
 import javax.ejb.TransactionAttributeType;
-import javax.ejb.Stateless;
 import javax.transaction.TransactionManager;
 import javax.transaction.Transaction;
 import javax.naming.InitialContext;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bmt/TesterBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bmt/TesterBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/bmt/TesterBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.bmt;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.TransactionAttribute;
 import javax.ejb.TransactionAttributeType;
 import javax.ejb.Stateless;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/SimpleStatefulBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/SimpleStatefulBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/SimpleStatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -62,7 +62,7 @@
 
    public void longRunning() throws Exception
    {
-      Thread.sleep(5000);
+      Thread.sleep(11000);
    }
 
    public boolean getPostActivate()

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -26,6 +26,7 @@
 import javax.ejb.PrePassivate;
 import javax.ejb.Remote;
 import javax.ejb.Stateful;
+import javax.ejb.Remove;
 import javax.naming.InitialContext;
 import org.jboss.annotation.ejb.cache.Cache;
 import org.jboss.annotation.ejb.cache.tree.CacheConfig;
@@ -64,9 +65,13 @@
 
    public void longRunning() throws Exception
    {
-      Thread.sleep(5000);
+      Thread.sleep(11000);
    }
 
+   @Remove
+   public void done() {
+   }
+
    public boolean getPostActivate()
    {
       return postActivateCalled;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulLocal.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulLocal.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulLocal.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -40,4 +40,6 @@
    String getState();
 
    void reset();
+
+   void done();
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulRemote.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulRemote.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/StatefulRemote.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -44,4 +44,6 @@
    long bench(int iterations) throws Exception;
 
    void longRunning() throws Exception;
+
+   void done();
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/Tester.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/Tester.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/Tester.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -26,7 +26,7 @@
 import javax.naming.InitialContext;
 import org.jboss.cache.TreeCacheMBean;
 import org.jboss.cache.loader.FileCacheLoader;
-import org.jboss.ejb3.cache.tree.PassivationEvictionPolicy;
+//import org.jboss.ejb3.cache.tree.PassivationEvictionPolicy;
 import org.jboss.ejb3.cache.tree.PassivationTreeCache;
 import org.jboss.mx.util.MBeanProxy;
 import org.jboss.system.ServiceMBeanSupport;
@@ -45,8 +45,8 @@
       ObjectName cacheON = new ObjectName("jboss.cache:service=EJB3TreeCache");
       TreeCacheMBean mbean = (TreeCacheMBean) MBeanProxy.get(TreeCacheMBean.class, cacheON, server);
       PassivationTreeCache cache = (PassivationTreeCache) mbean.getInstance();
-      PassivationEvictionPolicy policy = (PassivationEvictionPolicy) cache.getEvictionPolicy();
-      policy.createRegion("/mySFSB", 100, 1L);
+//      PassivationEvictionPolicy policy = (PassivationEvictionPolicy) cache.getEvictionPolicy();
+//      policy.createRegion("/mySFSB", 100, 1L);
 
       cache.put("/mySFSB/1234", "hello", "world");
       System.out.println("After PUT");
@@ -62,14 +62,26 @@
       if (cache.exists("/mySFSB/1234"))
       {
          cache.remove("/mySFSB/1234");
-         synchronized (policy)
-         {
-            policy.removeRegion("/mySFSB");
-         }
+//         synchronized (policy)
+//         {
+//            policy.removeRegion("/mySFSB");
+//         }
          cache.remove("/mySFSB");
       }
    }
 
+   public void testSimpleRemote() throws Exception
+   {
+      SimpleStatefulRemote remote = (SimpleStatefulRemote) new InitialContext().lookup("SimpleStatefulBean/remote");
+      remote.reset();
+      remote.setState("hello");
+      remote.longRunning();
+      if (!"hello".equals(remote.getState())) throw new RuntimeException("failed state");
+      if (!remote.getPostActivate()) throw new RuntimeException("failed to postActivate");
+      if (!remote.getPrePassivate()) throw new RuntimeException("failed to prePassivate");
+
+   }
+
    public void testSimpleLocal() throws Exception
    {
       SimpleStatefulLocal local = (SimpleStatefulLocal) new InitialContext().lookup("SimpleStatefulBean/local");

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/TesterMBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/TesterMBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/TesterMBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -34,4 +34,6 @@
    void test() throws Exception;
 
    void testSimpleLocal() throws Exception;
+
+   void testSimpleRemote() throws Exception;
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStateful.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStateful.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStateful.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,20 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.ejb3.test.cache.nested;
-
-/**
- * Comment
- *
- * @author Ben Wang
- * @version $Revision$
- */
-public interface NestedStateful
-{
-   int increment();
-   void reset();
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStateful.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStateful.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStatefulBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStatefulBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.ejb3.test.cache.nested;
-
-import org.jboss.logging.Logger;
-
-import javax.ejb.*;
-import java.rmi.dgc.VMID;
-
-/**
- * Nested SFSB
- *
- * @author Ben Wang
- * @version $Revision$
- */
- at Stateful(name="testNestedStateful")
- at org.jboss.annotation.ejb.cache.simple.CacheConfig(maxSize = 1000, idleTimeoutSeconds = 1)
-public class NestedStatefulBean implements java.io.Serializable, NestedStateful
-{
-   private static Logger log = Logger.getLogger(NestedStatefulBean.class);
-   private int counter = 0;
-
-   public int increment()
-   {
-      log.debug("INCREMENT - nested counter: " + (counter++));
-      return counter;
-   }
-
-   public static int postActivateCalled = 0;
-   public static int prePassivateCalled = 0;
-
-   public int getPostActivate()
-   {
-      return postActivateCalled;
-   }
-
-   public int getPrePassivate()
-   {
-      return prePassivateCalled;
-   }
-
-   public void reset()
-   {
-      counter = 0;
-      NestedStatefulBean.postActivateCalled = 0;
-      NestedStatefulBean.prePassivateCalled = 0;
-   }
-
-   @PostActivate
-   public void postActivate()
-   {
-      ++NestedStatefulBean.postActivateCalled;
-   }
-
-   @PrePassivate
-   public void prePassivate()
-   {
-      ++NestedStatefulBean.prePassivateCalled;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStatefulBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested/NestedStatefulBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,170 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.ejb3.test.cache.nested;
-
-import org.jboss.logging.Logger;
-import org.jboss.system.server.ServerConfig;
-
-import javax.interceptor.Interceptors;
-import javax.annotation.PostConstruct;
-import javax.ejb.EJB;
-import javax.ejb.Stateful;
-import javax.ejb.Remote;
-import javax.ejb.PostActivate;
-import javax.ejb.PrePassivate;
-import javax.ejb.Remove;
-import javax.ejb.EJBException;
-import java.rmi.dgc.VMID;
-
-/**
- * SFSB with nested bean
- *
- * @author Ben Wang
- * @version $Revision$
- */
- at Stateful(name="testParentStateful")
- at org.jboss.annotation.ejb.cache.simple.CacheConfig(maxSize = 1000, idleTimeoutSeconds = 1)
- at Remote(ParentStatefulRemote.class)
-public class ParentStatefulBean implements java.io.Serializable, ParentStatefulRemote
-{
-   private static Logger log = Logger.getLogger(ParentStatefulBean.class);
-   private int counter = 0;
-   private String state;
-   public transient VMID myId = null;
-   public String name;
-
-   @EJB
-   private NestedStateful nested;
-
-   public int increment()
-   {
-      counter = nested.increment();
-
-      log.debug("INCREMENT - parent counter: " + counter);
-      return counter;
-   }
-
-   public String getHostAddress()
-   {
-      return System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
-   }
-
-   public static int postActivateCalled = 0;
-   public static int prePassivateCalled = 0;
-
-   /**
-    * Sleep to test
-    * @throws Exception
-    */
-   public void longRunning() throws Exception
-   {
-      log.debug("+++ longRunning() enter ");
-      Thread.sleep(10000);
-      log.debug("+++ longRunning() leave ");
-   }
-
-   public int getPostActivate()
-   {
-      return ParentStatefulBean.postActivateCalled;
-   }
-
-   public int getPrePassivate()
-   {
-      return ParentStatefulBean.prePassivateCalled;
-   }
-
-   public int getNestedPostActivate()
-   {
-      return NestedStatefulBean.postActivateCalled;
-   }
-
-   public int getNestedPrePassivate()
-   {
-      return NestedStatefulBean.prePassivateCalled;
-   }
-
-   public void setState(String state)
-   {
-      this.state = state;
-   }
-
-   public String getState()
-   {
-      log.debug("getState(): entering ...");
-      return this.state;
-   }
-
-   public void reset()
-   {
-      state = null;
-      counter = 0;
-      ParentStatefulBean.postActivateCalled = 0;
-      ParentStatefulBean.prePassivateCalled = 0;
-   }
-
-   public void resetActivationCounter()
-   {
-      ParentStatefulBean.postActivateCalled = 0;
-      ParentStatefulBean.prePassivateCalled = 0;
-      NestedStatefulBean.postActivateCalled = 0;
-      NestedStatefulBean.prePassivateCalled = 0;
-   }
-
-   @PostActivate
-   public void postActivate()
-   {
-      ++ParentStatefulBean.postActivateCalled;
-      if (this.myId == null)
-      {
-         //it is a failover: we need to assign ourself an id
-         this.myId = new VMID();
-      }
-      log.debug("Activate. My ID: " + this.myId + " name: " + this.name);
-   }
-
-   @PrePassivate
-   public void prePassivate()
-   {
-      ++ParentStatefulBean.prePassivateCalled;
-      log.debug("Passivate. My ID: " + this.myId + " name: " + this.name);
-   }
-
-   @Remove
-   public void remove()
-   {
-   }
-
-   @PostConstruct
-   public void ejbCreate()
-   {
-      this.myId = new VMID();
-      log.debug("My ID: " + this.myId);
-   }
-
-   // Remote Interface implementation ----------------------------------------------
-
-   public void setName(String name)
-   {
-      this.name = name;
-      log.debug("Name set to " + name);
-   }
-
-   public void setNameOnlyOnNode(String name, VMID node)
-   {
-      if (node.equals(this.myId))
-         this.setName(name);
-      else
-         throw new EJBException("Trying to assign value on node " + this.myId + " but this node expected: " + node);
-   }
-
-   public void setUpFailover(String failover) {
-      // To setup the failover property
-      log.debug("Setting up failover property: " +failover);
-      System.setProperty ("JBossCluster-DoFail", failover);
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulRemote.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulRemote.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulRemote.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.ejb3.test.cache.nested;
-
-import java.rmi.dgc.VMID;
-
-/**
- * Comment
- *
- * @author Ben Wang
- * @version $Revision$
- */
-public interface ParentStatefulRemote
-{
-   int increment();
-   String getHostAddress();
-
-   int getPostActivate();
-
-   int getPrePassivate();
-
-   int getNestedPostActivate();
-
-   int getNestedPrePassivate();
-
-   void setState(String state);
-
-   String getState();
-
-   void reset();
-
-   void resetActivationCounter();
-
-   void longRunning() throws Exception;
-
-   void remove();
-
-   public void setName(String name);
-
-   public void setNameOnlyOnNode(String name, VMID node);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulRemote.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/nested/ParentStatefulRemote.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/CacheUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/CacheUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/CacheUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -52,11 +52,13 @@
 
    public void testSimple() throws Exception
    {
-	   MBeanServerConnection server = getServer();
+      /* Tests are in StatefulUnit now.
+      MBeanServerConnection server = getServer();
       ObjectName testerName = new ObjectName("jboss.ejb3:service=Tester,test=cache");
       Object[] params = {};
       String[] sig = {};
       server.invoke(testerName, "test", params, sig);
+      */
    }
 
    public static Test suite() throws Exception

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/NestedBeanUnitTestCase.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/cache/unit/NestedBeanUnitTestCase.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/StatefulUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/StatefulUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/cache/unit/StatefulUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -55,10 +55,11 @@
       StatefulRemote remote = (StatefulRemote) getInitialContext().lookup("StatefulBean/remote");
       remote.reset();
       remote.setState("hello");
-      Thread.sleep(5000);
+      Thread.sleep(11000);
       assertEquals("hello", remote.getState());
       assertTrue(remote.getPostActivate());
       assertTrue(remote.getPrePassivate());
+      remote.done(); // remove this
    }
 
    public void testStatefulLongRunning() throws Exception
@@ -67,9 +68,14 @@
       remote.reset();
       remote.setState("hello");
       remote.longRunning();
+      // It is in use so not yet passivated
+      assertFalse(remote.getPrePassivate());
+      Thread.sleep(11000);
+      // Now it will be.
       assertEquals("hello", remote.getState());
       assertTrue(remote.getPostActivate());
       assertTrue(remote.getPrePassivate());
+      remote.done(); // remove this
    }
 
    public void testSimpleStatefulLongRunning() throws Exception
@@ -107,7 +113,7 @@
    {
       StatefulRemote remote = (StatefulRemote) getInitialContext().lookup("StatefulBean/remote");
       System.out.println("bench: " + remote.bench(1000));
-
+      remote.done(); // remove this
    }
 
    public void testBenchSimple() throws Exception

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/circulardependency/StatelessBean1.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/circulardependency/StatelessBean1.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/circulardependency/StatelessBean1.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.circulardependency;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import javax.ejb.Remote;
 import javax.naming.NamingException;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/circulardependency/StatelessBean2.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/circulardependency/StatelessBean2.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/circulardependency/StatelessBean2.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.circulardependency;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import javax.ejb.Remote;
 import javax.naming.NamingException;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/mdb/unit/MDBUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/mdb/unit/MDBUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/mdb/unit/MDBUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -238,7 +238,7 @@
    }
 
 
-   public void testWaitForCompleation() throws Exception {
+   public void testWaitForCompletion() throws Exception {
       try { Thread.currentThread().sleep(1000*20);
       } catch ( InterruptedException e ) {}
    }
@@ -282,7 +282,7 @@
       suite.addTest(new MDBUnitTestCase("testTopic","topic/testDurableTopic"));
       suite.addTest(new MDBUnitTestCase("testQueue","queue/ex"));
       suite.addTest(new MDBUnitTestCase("testQueue","queue/A"));
-      suite.addTest(new MDBUnitTestCase("testWaitForCompleation",""));
+      suite.addTest(new MDBUnitTestCase("testWaitForCompletion",""));
       suite.addTest(new MDBUnitTestCase("testQueue","queue/B"));
 
      return new JBossTestSetup(getDeploySetup(suite, "dd-mdb-service.xml, dd-mdb.jar"));

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/unit/EjbJarXmlTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/unit/EjbJarXmlTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/unit/EjbJarXmlTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -25,30 +25,26 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-import org.jboss.ejb3.dd.ActivationConfigProperty;
-import org.jboss.ejb3.dd.AssemblyDescriptor;
-import org.jboss.ejb3.dd.CmrField;
-import org.jboss.ejb3.dd.ContainerTransaction;
-import org.jboss.ejb3.dd.EjbJarDD;
-import org.jboss.ejb3.dd.EjbJarDDObjectFactory;
-import org.jboss.ejb3.dd.EjbLocalRef;
-import org.jboss.ejb3.dd.EjbRelation;
-import org.jboss.ejb3.dd.EjbRelationshipRole;
-import org.jboss.ejb3.dd.EnterpriseBean;
-import org.jboss.ejb3.dd.EnterpriseBeans;
-import org.jboss.ejb3.dd.EntityEnterpriseBean;
-import org.jboss.ejb3.dd.JBossDDObjectFactory;
-import org.jboss.ejb3.dd.MessageDrivenBean;
-import org.jboss.ejb3.dd.MessageDrivenDestination;
-import org.jboss.ejb3.dd.Method;
-import org.jboss.ejb3.dd.MethodPermission;
-import org.jboss.ejb3.dd.RelationshipRoleSource;
-import org.jboss.ejb3.dd.Relationships;
-import org.jboss.ejb3.dd.ResourceRef;
-import org.jboss.ejb3.dd.SecurityIdentity;
-import org.jboss.ejb3.dd.SecurityRole;
-import org.jboss.ejb3.dd.Service;
-import org.jboss.ejb3.dd.SessionEnterpriseBean;
+import org.jboss.ejb3.metamodel.AssemblyDescriptor;
+import org.jboss.ejb3.metamodel.CmrField;
+import org.jboss.ejb3.metamodel.ContainerTransaction;
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.EjbJarDDObjectFactory;
+import org.jboss.ejb3.metamodel.EjbRelation;
+import org.jboss.ejb3.metamodel.EjbRelationshipRole;
+import org.jboss.ejb3.metamodel.EnterpriseBean;
+import org.jboss.ejb3.metamodel.EnterpriseBeans;
+import org.jboss.ejb3.metamodel.EntityEnterpriseBean;
+import org.jboss.ejb3.metamodel.JBossDDObjectFactory;
+import org.jboss.ejb3.metamodel.MessageDrivenBean;
+import org.jboss.ejb3.metamodel.MessageDrivenDestination;
+import org.jboss.ejb3.metamodel.Method;
+import org.jboss.ejb3.metamodel.MethodPermission;
+import org.jboss.ejb3.metamodel.RelationshipRoleSource;
+import org.jboss.ejb3.metamodel.Relationships;
+import org.jboss.ejb3.metamodel.SecurityIdentity;
+import org.jboss.ejb3.metamodel.Service;
+import org.jboss.ejb3.metamodel.SessionEnterpriseBean;
 import org.jboss.logging.Logger;
 import org.jboss.xb.binding.ObjectModelFactory;
 import org.jboss.xb.binding.Unmarshaller;
@@ -57,6 +53,11 @@
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
+import org.jboss.metamodel.descriptor.EjbLocalRef;
+import org.jboss.metamodel.descriptor.NameValuePair;
+import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.metamodel.descriptor.SecurityRole;
+
 /**
  * JUnit TestCase for JbossXB usage for ejb-jar.xml deployment descriptor for
  * version 1.4 schema
@@ -262,7 +263,7 @@
       assertEquals("org.jboss.ejb3.test.dd.mdb.ObjectMessageBean",ejb.getEjbClass());
       assertTrue(ejb instanceof MessageDrivenBean);
       MessageDrivenBean mdb = (MessageDrivenBean) ejb;
-      ActivationConfigProperty property = (ActivationConfigProperty)mdb.getActivationConfig().getActivationConfigProperties().get(0);
+      NameValuePair property = (NameValuePair)mdb.getActivationConfig().getActivationConfigProperties().get(0);
       assertEquals("AUTO_ACKNOWLEDGE", property.getValue());
       assertEquals("Bean", mdb.getTransactionType());
       MessageDrivenDestination destination = mdb.getMessageDrivenDestination();

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp/InjectionTest.jsp
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp/InjectionTest.jsp	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp/InjectionTest.jsp	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,63 +0,0 @@
-<%@ page import="java.util.Hashtable,
-                 javax.naming.*" %>
-<%@ page import="java.lang.reflect.Proxy"%>
-<%@ page import="org.jboss.ejb3.Ejb3Registry"%>
-<%@ page import="org.jboss.ejb3.Container"%>
-<%@ page import="java.util.Iterator"%>
-<%@ page import="javax.ejb.EJB"%>
-<%@ page import="org.jboss.ejb3.test.dd.web.interfaces.Session30"%>
-<%@ page import="javax.persistence.PersistenceContext"%>
-<%@ page import="javax.persistence.EntityManager"%>
-<%@ page import="javax.persistence.PersistenceUnit"%>
-<%@ page import="javax.persistence.EntityManagerFactory"%>
-<%@ page import="javax.annotation.Resource"%>
-<%@ page import="javax.transaction.UserTransaction"%>
-<%@ page import="org.jboss.ejb3.test.dd.web.ejb.Address"%>
-
-<%!
-
-   @EJB Session30 injectedSession30;
-   @PersistenceContext(unitName="../dd-web-ejbs.jar#tempdb") EntityManager injectedEntityManager;
-   @PersistenceUnit(unitName="../dd-web-ejbs.jar#tempdb") EntityManagerFactory injectedEntityManagerFactory;
-   @Resource int nonOverridentConstant = 5;
-   @Resource(name="overridenConstant") int overridenConstant = 1;
-   @Resource UserTransaction tx;
-
-%>
-
-<html>
-<body>
-<%
-   System.out.println("HERE!!!!!!!!!!!!!!!!!!!!!!!!");
-   String access = injectedSession30.access();
-   System.out.println("After injectSession30.access() HERE!!!!!!!!!!!!!!!!!!!!!!!!");
-
-   Address address = new Address();
-   address.setStreet("Clarendon Street");
-   address.setCity("Boston");
-   address.setState("MA");
-   address.setZip("02116");
-
-   Address address2 = new Address();
-   address.setStreet("Clarendon Street");
-   address.setCity("Boston");
-   address.setState("MA");
-   address.setZip("02116");
-
-   Address address3 = new Address();
-   address.setStreet("Clarendon Street");
-   address.setCity("Boston");
-   address.setState("MA");
-   address.setZip("02116");
-
-   //tx = (UserTransaction)ctx.lookup("UserTransaction");
-   EntityManager em = injectedEntityManagerFactory.createEntityManager();
-   tx.begin();
-   injectedEntityManager.persist(address2);
-   em.persist(address3);
-   tx.commit();
-   em.close();
-%>
-<h1>Test passed!</h1>
-</body>
-</html>
\ No newline at end of file

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp/InjectionTest.jsp (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/dd/web/jsp/InjectionTest.jsp)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/servlets/EJBServlet.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/servlets/EJBServlet.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/servlets/EJBServlet.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -27,12 +27,18 @@
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.PersistenceUnit;
+import javax.persistence.EntityManagerFactory;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.transaction.UserTransaction;
+import javax.ejb.EJB;
+import javax.annotation.Resource;
+
 import org.jboss.ejb3.test.dd.web.ejb.Address;
 import org.jboss.ejb3.test.dd.web.interfaces.ReferenceTest;
 import org.jboss.ejb3.test.dd.web.interfaces.Session30;
@@ -43,8 +49,9 @@
 import org.jboss.security.SecurityAssociation;
 import org.jboss.security.SimplePrincipal;
 
-/** A servlet that accesses an EJB and tests whether the call argument
- is serialized.
+/**
+ *
+ * tests injection annotations of @EJB, @PersistenceContext, @PersistenceUnit, etc...
 
  @author  Scott.Stark at jboss.org
  @version $Revision$
@@ -52,7 +59,7 @@
 public class EJBServlet extends HttpServlet
 {
    private static final Logger log = Logger.getLogger(EJBServlet.class);
-   
+
    public void init(ServletConfig config) throws ServletException
    {
        String param = config.getInitParameter("failOnError");
@@ -85,7 +92,6 @@
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException
    {
-      UserTransaction tx = null;
       try
       {
          SecurityAssociation.setPrincipal(new SimplePrincipal("jduke"));
@@ -101,7 +107,7 @@
          
          Session30 session30 = (Session30)ctx.lookup("java:comp/env/ejb/Session30");
          String access = session30.access();
-               
+
          //TODO EMPTYSTRING can't be right - correct lookup when fixed
          EntityManager entityManager = (EntityManager)ctx.lookup("java:/WebDDEntityManager");
          
@@ -111,21 +117,21 @@
          address.setState("MA");
          address.setZip("02116");
          
-         tx = (UserTransaction)ctx.lookup("UserTransaction");
-         tx.begin();
-         entityManager.persist(address);
-         tx.commit();
+         Address address2 = new Address();
+         address.setStreet("Clarendon Street");
+         address.setCity("Boston");
+         address.setState("MA");
+         address.setZip("02116");
+
+         Address address3 = new Address();
+         address.setStreet("Clarendon Street");
+         address.setCity("Boston");
+         address.setState("MA");
+         address.setZip("02116");
+
       }
       catch (Exception e)
       {
-         if (tx != null)
-         {
-            try {
-               tx.rollback();
-            } catch (Exception e1){
-              
-            }
-         }
          throw new ServletException("Failed to call OptimizedEJB/Session30 through remote and local interfaces", e);
       }
       response.setContentType("text/html");

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/unit/WebIntegrationUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/unit/WebIntegrationUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/dd/web/unit/WebIntegrationUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -62,8 +62,22 @@
          throw e;
       }
    }
-   
-/* 
+
+
+   /*
+   public void testInjectionJsp() throws Exception
+   {
+      try {
+         URL url = new URL(baseURL+"dd/InjectionTest.jsp");
+         HttpUtils.accessURL(url);
+      } catch (Exception e){
+         e.printStackTrace();
+         throw e;
+      }
+   }
+   */
+
+/*
    public void testRealPath() throws Exception
    {
       URL url = new URL(baseURL+"dd/APIServlet?op=testGetRealPath");

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/Stateful.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/Stateful.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/Stateful.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,6 +21,7 @@
   */
 package org.jboss.ejb3.test.ejbcontext;
 
+import javax.ejb.Remote;
 
 
 /**
@@ -29,14 +30,21 @@
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  * @version $Revision$
  */
+ at Remote
 public interface Stateful
 {
    public void testEjbContext() throws Exception;
-   
+
    public void test();
-   
-   public Object testInvokedBusinessInterface() throws Exception;
-   
-   public Object testLocalInvokedBusinessInterface() throws Exception;
 
+   public Class testInvokedBusinessInterface() throws Exception;
+
+   public Class testLocalInvokedBusinessInterface() throws Exception;
+
+   public Object getBusinessObject() throws Exception;
+
+
+   String getState();
+
+   void setState(String state);
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatefulBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatefulBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,10 +21,8 @@
   */
 package org.jboss.ejb3.test.ejbcontext;
 
-import java.security.Principal;
-
 import javax.annotation.Resource;
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.EJBContext;
 import javax.ejb.Remote;
 import javax.ejb.SessionContext;
@@ -43,7 +41,6 @@
  * @version $Revision$
  */
 @Stateful(name="Stateful")
- at Remote({org.jboss.ejb3.test.ejbcontext.Stateful.class, StatefulRemote.class})
 @RemoteBindings({@RemoteBinding(jndiBinding = "Stateful"), @RemoteBinding(jndiBinding = "StatefulRemote")})
 public class StatefulBean
    implements org.jboss.ejb3.test.ejbcontext.Stateful, StatefulRemote
@@ -55,6 +52,8 @@
    
    @EJB(mappedName="StatefulRemote")
    StatefulRemote statefulRemote = null;
+
+   String state = "";
    
    public void testEjbContext() throws Exception
    {
@@ -67,18 +66,34 @@
    {
       
    }
-   
-   public Object testInvokedBusinessInterface() throws Exception
+
+   public String getState()
    {
-      return sessionContext.getInvokedBusinessInterface();
+      return state;
    }
+
+   public void setState(String state)
+   {
+      this.state = state;
+   }
+
+   public Object getBusinessObject() throws Exception
+   {
+      return sessionContext.getBusinessObject(org.jboss.ejb3.test.ejbcontext.Stateful.class);
+   }
+
+
+   public Class testInvokedBusinessInterface() throws Exception
+   {
+      return (Class)sessionContext.getInvokedBusinessInterface();
+   }
    
-   public Object testInvokedBusinessInterface2() throws Exception
+   public Class testInvokedBusinessInterface2() throws Exception
    {
-      return sessionContext.getInvokedBusinessInterface();
+      return (Class)sessionContext.getInvokedBusinessInterface();
    }
    
-   public Object testLocalInvokedBusinessInterface() throws Exception
+   public Class testLocalInvokedBusinessInterface() throws Exception
    {
       return statefulRemote.testInvokedBusinessInterface2();
    }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatefulRemote.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatefulRemote.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatefulRemote.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,6 +21,7 @@
   */
 package org.jboss.ejb3.test.ejbcontext;
 
+import javax.ejb.Remote;
 
 
 /**
@@ -29,8 +30,8 @@
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  * @version $Revision$
  */
+ at Remote
 public interface StatefulRemote
 {
-   public Object testInvokedBusinessInterface2() throws Exception;
-
+   public Class testInvokedBusinessInterface2() throws Exception;
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/Stateless.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/Stateless.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/Stateless.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -33,11 +33,13 @@
 {
    public void testEjbContextLookup() throws Exception;
    
-   public Object testInvokedBusinessInterface() throws Exception;
+   public Class testInvokedBusinessInterface() throws Exception;
    
    public Object testBusinessObject(Class businessInterface) throws Exception;
    
    public void testEjbObject() throws Exception;
 
    public void testEjbLocalObject() throws Exception;
+
+   public void noop();
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatelessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatelessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -49,6 +49,11 @@
    
    @Resource
    SessionContext sessionContext;
+
+   public void noop()
+   {
+      
+   }
    
    public void testEjbContextLookup() throws Exception
    {
@@ -56,9 +61,9 @@
       stateful.test();
    }
    
-   public Object testInvokedBusinessInterface() throws Exception
+   public Class testInvokedBusinessInterface() throws Exception
    {
-      return sessionContext.getInvokedBusinessInterface();
+      return (Class)sessionContext.getInvokedBusinessInterface();
    }
    
    public Object testBusinessObject(Class businessInterface) throws Exception

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatelessLocal.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatelessLocal.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/StatelessLocal.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -31,5 +31,16 @@
  */
 public interface StatelessLocal
 {
-  
+   public void testEjbContextLookup() throws Exception;
+
+   public Class testInvokedBusinessInterface() throws Exception;
+
+   public Object testBusinessObject(Class businessInterface) throws Exception;
+
+   public void testEjbObject() throws Exception;
+
+   public void testEjbLocalObject() throws Exception;
+
+   public void noop();
+   
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/unit/EjbContextUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/unit/EjbContextUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ejbcontext/unit/EjbContextUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -44,38 +44,41 @@
       super(name);
    }
    
-   public void atestEjbContextJndi() throws Exception
+   public void testEjbContextJndi() throws Exception
    {
      Stateful stateful = (Stateful)getInitialContext().lookup("Stateful");
      stateful.testEjbContext();
    }
    
-   public void atestEjbContextLookup() throws Exception
+   public void testEjbContextLookup() throws Exception
    {
      Stateless stateless = (Stateless)getInitialContext().lookup("Stateless");
      stateless.testEjbContextLookup();
    }
    
-   public void atestStatelessInvokedBusinessInterface() throws Exception
+   public void testStatelessInvokedBusinessInterface() throws Exception
    {
       Stateless stateless1 = (Stateless)getInitialContext().lookup("Stateless");
       Stateless stateless2 = (Stateless)getInitialContext().lookup("Stateless");
       
-      Object interfc = stateless1.testInvokedBusinessInterface();
+      Class interfc = stateless1.testInvokedBusinessInterface();
       assertEquals(interfc, Stateless.class);
       
       interfc = stateless2.testInvokedBusinessInterface();
       assertEquals(interfc, Stateless.class);
       
-      interfc = stateless1.testBusinessObject(Stateless.class);
+      Stateless stateless = (Stateless)stateless1.testBusinessObject(Stateless.class);
+      stateless.noop();
+
       assertEquals(interfc, Stateless.class);
       
       try{
-         interfc = stateless1.testBusinessObject(Stateful.class);
+         stateless1.testBusinessObject(Stateful.class);
          fail("IllegalStateException not thrown");
       }
       catch (javax.ejb.EJBException e)
       {
+         if (!(e.getCause() instanceof IllegalStateException)) throw e;
          assertEquals(IllegalStateException.class, e.getCause().getClass());
       }
       
@@ -89,7 +92,7 @@
       Stateful stateful1 = (Stateful)getInitialContext().lookup("Stateful");
       StatefulRemote stateful2 = (StatefulRemote)getInitialContext().lookup("StatefulRemote");
       
-      Object interfc = stateful1.testInvokedBusinessInterface();
+      Class interfc = stateful1.testInvokedBusinessInterface();
       assertEquals(interfc, Stateful.class);
       
       interfc = stateful2.testInvokedBusinessInterface2();
@@ -98,6 +101,11 @@
       interfc = stateful1.testLocalInvokedBusinessInterface();
       assertEquals(interfc, StatefulRemote.class);
       
+      stateful1.setState("same");
+      Stateful stateful3 = (Stateful)stateful1.getBusinessObject();
+      assertEquals("same", stateful3.getState());
+
+      
    }
 
    public static Test suite() throws Exception

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/Airport.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/Airport.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/Airport.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -36,8 +36,8 @@
  */
 @Entity
 @NamedQueries (
-      {@NamedQuery(name="allAirports", query="from Airport"),
-      @NamedQuery(name="airportById", query="from Airport a where a.id=:id")})
+      {@NamedQuery(name="allAirports", query="select a from Airport a"),
+      @NamedQuery(name="airportById", query="select a from Airport a where a.id=:id")})
 public class Airport
 {
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/EntityTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/EntityTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/EntityTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -75,7 +75,7 @@
       Query q = manager.createQuery("SELECT c FROM Customer c");
       List l = q.getResultList();
       if (l.size() == 0) throw new RuntimeException("failed");
-      org.hibernate.Query q2 = session.createQuery("FROM Customer c");
+      org.hibernate.Query q2 = session.createQuery("Select c FROM Customer c");
       l = q2.list();
       if (l.size() == 0) throw new RuntimeException("failed");
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/FieldAirport.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/FieldAirport.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entity/FieldAirport.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -34,7 +34,7 @@
  * @version $Revision$
  */
 @Entity
- at NamedQuery(name="airportByCode", query="from FieldAirport a where a.code=:code")
+ at NamedQuery(name="airportByCode", query="select a from FieldAirport a where a.code=:code")
 public class FieldAirport
 {
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entityexception/ExceptionTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entityexception/ExceptionTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/entityexception/ExceptionTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -253,7 +253,7 @@
       createEntry(new Person(12, "B"));
       createEntry(new Person(13, "C"));
       
-      Query query = manager.createQuery("from Person");
+      Query query = manager.createQuery("select p from Person p");
       try
       {
          query.getSingleResult();
@@ -263,7 +263,7 @@
       {
       }
       
-      Query query2 = manager.createQuery("from Person where id=999");
+      Query query2 = manager.createQuery("select p from Person p where id=999");
       try
       {
          query2.getSingleResult();
@@ -279,7 +279,7 @@
       
       try
       {
-         Query query = manager.createQuery("from Person");
+         Query query = manager.createQuery("select p from Person p");
          query.setHint("org.hibernate.timeout", "Not an integer");
          throw new RuntimeException("IllegalArgumentException not thrown for setHint");
       }
@@ -287,7 +287,7 @@
       {
       }
       
-      Query query = manager.createQuery("from Person where id=:id and name=:name");
+      Query query = manager.createQuery("select p from Person p where id=:id and name=:name");
       try
       {
          query.setParameter("nosuchparam", "Whateverrrr");
@@ -307,7 +307,7 @@
       {
       }
       
-      query = manager.createQuery("from Person where id=? and name=?");
+      query = manager.createQuery("select p from Person p where id=? and name=?");
       query.setParameter(0, 1);
       query.setParameter(1, "XXX");
       try

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/factory/Session1Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/factory/Session1Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/factory/Session1Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -24,11 +24,11 @@
 import javax.ejb.Remote;
 import javax.ejb.SessionContext;
 import javax.ejb.Stateless;
+import javax.ejb.EJB;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.PersistenceContext;
 import javax.persistence.PersistenceUnit;
-import javax.annotation.EJB;
 import javax.annotation.Resource;
 
 import org.hibernate.SessionFactory;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/factory/Session2Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/factory/Session2Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/factory/Session2Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,7 +23,7 @@
 
 import org.jboss.annotation.IgnoreDependency;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Remote;
 import javax.ejb.Stateless;
 import javax.naming.InitialContext;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/hbm/EntityTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/hbm/EntityTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/hbm/EntityTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -58,11 +58,11 @@
 
    public List findAnnotated()
    {
-      return em.createQuery("from Annotated an").getResultList();
+      return em.createQuery("select an from Annotated an").getResultList();
    }
 
    public List findHBM()
    {
-      return em.createQuery("from HBM hbm").getResultList();
+      return em.createQuery("select hbm from HBM hbm").getResultList();
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/ClassInjectedBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/ClassInjectedBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/ClassInjectedBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,8 +21,8 @@
   */
 package org.jboss.ejb3.test.initial;
 
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.ejb.Remote;
 import javax.ejb.SessionContext;
@@ -34,13 +34,13 @@
  * @version $Revision$
  */
 @Stateless
- at EJBs({@EJB(name="injected", businessInterface=org.jboss.ejb3.test.initial.TestStatus.class, beanName="TestStatusBean")})
+ at EJBs({@EJB(name="injected", beanInterface=org.jboss.ejb3.test.initial.TestStatus.class, beanName="TestStatusBean")})
 @Remote(ClassInjected.class)
 public class ClassInjectedBean implements ClassInjected
 {
    @Resource
    SessionContext ctx;
-   
+
    public boolean isInjected() throws Exception
    {
       TestStatus status = (TestStatus)ctx.lookup("injected");

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/InterceptedSFTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/InterceptedSFTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/InterceptedSFTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -81,7 +81,7 @@
          ejbCtx.setRollbackOnly();
          val = (Integer) ctx.getContextData().get("DATA");
          ret += val;
-         if (ctx.getBean() != this) throw new RuntimeException("ctx.getBean() != this: " + ctx.getBean() + " != " + this);
+         if (ctx.getTarget() != this) throw new RuntimeException("ctx.getBean() != this: " + ctx.getTarget() + " != " + this);
          return ret;
       }
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/InterceptedSLTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/InterceptedSLTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/initial/InterceptedSLTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -65,7 +65,7 @@
       ejbCtx.setRollbackOnly();
       val = (Integer)ctx.getContextData().get("DATA");
       ret += val;
-      if (ctx.getBean() != this) throw new RuntimeException("ctx.getBean() != this: " + ctx.getBean() + " != " + this);
+      if (ctx.getTarget() != this) throw new RuntimeException("ctx.getBean() != this: " + ctx.getTarget() + " != " + this);
       return ret;
    }
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors/MyBaseInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors/MyBaseInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors/MyBaseInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,7 +23,7 @@
 
 import java.util.ArrayList;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.annotation.Resource;
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.InvocationContext;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors/MyInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors/MyInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors/MyInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.interceptors;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.annotation.Resource;
 import javax.transaction.TransactionManager;
 import javax.sql.DataSource;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/AnnotatedOnlySLSB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/AnnotatedOnlySLSB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/AnnotatedOnlySLSB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
 */ 
 package org.jboss.ejb3.test.interceptors2;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.annotation.PostConstruct;
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.ExcludeClassInterceptors;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/InheritingSFSB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/InheritingSFSB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/InheritingSFSB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
 */ 
 package org.jboss.ejb3.test.interceptors2;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.annotation.PostConstruct;
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.ExcludeDefaultInterceptors;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/MixedClassInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/MixedClassInterceptor.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/interceptors2/MixedClassInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
 */ 
 package org.jboss.ejb3.test.interceptors2;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.InvocationContext;
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/StatefulBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/StatefulBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/StatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -37,7 +37,7 @@
 @javax.ejb.Stateful
 @Remote (Stateful.class)
 @SecurityDomain ("other")
- at AspectDomain("JACC Stateful Bean")
+//@AspectDomain("JACC Stateful Bean")
 public class StatefulBean implements Stateful, java.io.Serializable
 {
    @PermitAll

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/StatelessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/StatelessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/StatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -39,7 +39,7 @@
 @javax.ejb.Stateless
 @Remote (Stateless.class)
 @SecurityDomain ("other")
- at AspectDomain("JACC Stateless Bean")
+//@AspectDomain("JACC Stateless Bean")
 public class StatelessBean implements Stateless
 {
    //TODO: put this in again once we update the hibernate jars (changes already made to hibernate)
@@ -86,7 +86,7 @@
    @PermitAll
    public void deleteAllEntity(AllEntity e)
    {
-      em.remove(e);
+      em.remove(em.find(AllEntity.class, e.id));
    }
 
    @PermitAll
@@ -114,7 +114,7 @@
    @PermitAll
    public void deleteStarEntity(StarEntity e)
    {
-      em.remove(e);
+      em.remove(em.find(StarEntity.class, e.id));
    }
 
 
@@ -143,6 +143,6 @@
    @PermitAll
    public void deleteSomeEntity(SomeEntity e)
    {
-      em.remove(e);
+      em.remove(em.find(SomeEntity.class, e.id));
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/unit/JaccTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/unit/JaccTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jacc/unit/JaccTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -354,8 +354,6 @@
       }
 
 
-      System.out.println("Deleting...");
-      stateless.deleteSomeEntity(e);
       System.out.println("Inserting...");
       e = stateless.insertSomeEntity();
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/DeploymentDescriptorTestMDBMessageListener.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/DeploymentDescriptorTestMDBMessageListener.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/DeploymentDescriptorTestMDBMessageListener.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,15 +21,9 @@
   */
 package org.jboss.ejb3.test.jca.inflowmdb;
 
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.EJBException;
-import javax.ejb.MessageDriven;
-import javax.ejb.MessageDrivenBean;
 import javax.ejb.MessageDrivenContext;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
 
-import org.jboss.ejb3.mdb.MessageInflowLocalProxy;
+import org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy;
 import org.jboss.ejb3.test.jca.inflow.TestMessage;
 import org.jboss.ejb3.test.jca.inflow.TestMessageListener;
 import org.jboss.logging.Logger;

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSMDBBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSMDBBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSTest.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSTest.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSTestBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/JMSTestBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/StatelessBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/StatelessBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/StatelessRemote.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/StatelessRemote.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/TestMDBMessageListener.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/TestMDBMessageListener.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/TestMDBMessageListener.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,14 +22,11 @@
 package org.jboss.ejb3.test.jca.inflowmdb;
 
 import javax.ejb.ActivationConfigProperty;
-import javax.ejb.EJBException;
 import javax.ejb.MessageDriven;
-import javax.ejb.MessageDrivenBean;
-import javax.ejb.MessageDrivenContext;
 import javax.ejb.TransactionAttribute;
 import javax.ejb.TransactionAttributeType;
 
-import org.jboss.ejb3.mdb.MessageInflowLocalProxy;
+import org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy;
 import org.jboss.ejb3.test.jca.inflow.TestMessage;
 import org.jboss.ejb3.test.jca.inflow.TestMessageListener;
 import org.jboss.logging.Logger;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/DeploymentDescriptorInflowUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/DeploymentDescriptorInflowUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/DeploymentDescriptorInflowUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -59,8 +59,8 @@
       return t2;
    }
    
-  /* public static Test suite() throws Exception
+   /*public static Test suite() throws Exception
    {
-      return getDeploySetup(ServiceUnitTestCase.class, "jcainflowmdb.jar, jcainflow.rar");
+      return getDeploySetup(DeploymentDescriptorInflowUnitTestCase.class, "");
    } */
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/InflowUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/InflowUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/InflowUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,9 +21,17 @@
   */
 package org.jboss.ejb3.test.jca.inflowmdb.unit;
 
+import javax.management.ObjectName;
+
+import org.jboss.ejb3.InitialContextFactory;
+import org.jboss.ejb3.ClientKernelAbstraction;
+import org.jboss.ejb3.KernelAbstractionFactory;
+
 import org.jboss.ejb3.test.jca.inflow.TestResourceAdapter;
 import org.jboss.ejb3.test.jca.inflow.TestResourceAdapterInflowResults;
 import org.jboss.ejb3.test.jca.inflowmdb.QuartzTest;
+import org.jboss.ejb3.test.jca.inflowmdb.JMSTest;
+import org.jboss.ejb3.test.jca.inflowmdb.StatelessRemote;
 import org.jboss.test.JBossTestCase;
 import junit.framework.Test;
 
@@ -42,7 +50,8 @@
 
    public void testInflow() throws Throwable
    {
-      TestResourceAdapterInflowResults results = (TestResourceAdapterInflowResults) getServer().invoke
+      ClientKernelAbstraction kernel = KernelAbstractionFactory.getClientInstance();
+      TestResourceAdapterInflowResults results = (TestResourceAdapterInflowResults)kernel.invoke
       (
           TestResourceAdapter.mbean,
           "testInflow",
@@ -55,20 +64,27 @@
 
    public void testQuartz() throws Exception
    {
-      QuartzTest test = (QuartzTest)getInitialContext().lookup("QuartzTestBean/remote");
+      QuartzTest test = (QuartzTest)InitialContextFactory.getInitialContext().lookup("QuartzTestBean/remote");
       Thread.sleep(5000); // sleep so that quartz mdb runs.
       assertTrue(test.wasCalled());
    }
    
+   public void testJMS() throws Exception
+   {
+      StatelessRemote stateless = (StatelessRemote)InitialContextFactory.getInitialContext().lookup("StatelessBean/remote");
+      assertNotNull(stateless);
+      stateless.sendMessage();
+      
+      JMSTest test = (JMSTest)InitialContextFactory.getInitialContext().lookup("JMSTestBean/remote");
+      Thread.sleep(5000); // sleep so that jms mdb runs.
+      assertTrue(test.wasCalled());
+   }
+
+   
    public static Test suite() throws Exception
    {
-      Test t1 = getDeploySetup(InflowUnitTestCase.class, "jcainflowmdb.jar, quartzmdb.jar");
+      Test t1 = getDeploySetup(InflowUnitTestCase.class, "quartzmdb.jar, jmsinflowmdb.jar, jcainflowmdb.jar"); 
       Test t2 = getDeploySetup(t1, "jcainflow.rar");
       return t2;
    }
-   
-  /* public static Test suite() throws Exception
-   {
-      return getDeploySetup(ServiceUnitTestCase.class, "jcainflowmdb.ejb3, jcainflow.rar");
-   } */
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/joininheritance/EntityTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/joininheritance/EntityTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/joininheritance/EntityTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -95,13 +95,13 @@
 
    public void test1() throws Exception
    {
-      assertEquals(manager.createQuery("from Person").getResultList().size(), 3);
-      assertEquals(manager.createQuery("from Person p where p.class = Customer").getResultList().size(), 1);
+      assertEquals(manager.createQuery("select p from Person p").getResultList().size(), 3);
+      assertEquals(manager.createQuery("select p from Person p where p.class = Customer").getResultList().size(), 1);
    }
 
    public void test2() throws Exception
    {
-      List customers = manager.createQuery("from Customer c left join fetch c.salesperson").getResultList();
+      List customers = manager.createQuery("select c from Customer c left join fetch c.salesperson").getResultList();
       for (Iterator iter = customers.iterator(); iter.hasNext();)
       {
          Customer c = (Customer) iter.next();
@@ -112,7 +112,7 @@
 
    public void test3() throws Exception
    {
-      List customers = manager.createQuery("from Customer").getResultList();
+      List customers = manager.createQuery("select c from Customer c").getResultList();
       for (Iterator iter = customers.iterator(); iter.hasNext();)
       {
          Customer c = (Customer) iter.next();
@@ -128,10 +128,10 @@
       Person yomomma = manager.find(Person.class, new Long(ids[2]));
 
       mark.setZip("30306");
-      assertEquals(manager.createQuery("from Person p where p.zip = '30306'").getResultList().size(), 1);
+      assertEquals(manager.createQuery("select p from Person p where p.zip = '30306'").getResultList().size(), 1);
       manager.remove(mark);
       manager.remove(joe);
       manager.remove(yomomma);
-      assertTrue(manager.createQuery("from Person").getResultList().isEmpty());
+      assertTrue(manager.createQuery("select p from Person p").getResultList().isEmpty());
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/longlived/HibernateShoppingCartBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/longlived/HibernateShoppingCartBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/longlived/HibernateShoppingCartBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.longlived;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Remote;
 import javax.ejb.Remove;
 import javax.ejb.Stateful;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/longlived/ShoppingCartBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/longlived/ShoppingCartBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/longlived/ShoppingCartBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,7 +22,7 @@
 package org.jboss.ejb3.test.longlived;
 
 import java.io.Serializable;
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Remote;
 import javax.ejb.Remove;
 import javax.ejb.Stateful;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/BMTQueueTestMDB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/BMTQueueTestMDB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/BMTQueueTestMDB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -25,10 +25,12 @@
 import javax.ejb.MessageDriven;
 import javax.ejb.TransactionManagement;
 import javax.ejb.TransactionManagementType;
+import javax.ejb.MessageDrivenContext;
 import javax.jms.Message;
 import javax.jms.MessageListener;
 
 import javax.annotation.security.RunAs;
+import javax.annotation.Resource;
 
 import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.logging.Logger;
@@ -52,10 +54,12 @@
    private static final Logger log = Logger.getLogger(BMTQueueTestMDB.class);
    
    private static boolean thrownException = false;
-   
+   @Resource MessageDrivenContext ctx;
+
    public void onMessage(Message recvMsg)
    {
-      System.out.println("BMTQueueTestMDB onMessage " + thrownException);
+      System.out.println("*** BMTQueueTestMDB onMessage " + thrownException);
+      if (ctx == null) throw new RuntimeException("FAILED ON CTX LOOKUP");
       
       if (!thrownException)
       {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/DefaultedQueueTestMDB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/DefaultedQueueTestMDB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/DefaultedQueueTestMDB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,10 +23,12 @@
 
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
+import javax.ejb.MessageDrivenContext;
 import javax.jms.Message;
 import javax.jms.MessageListener;
 
 import javax.annotation.security.RunAs;
+import javax.annotation.Resource;
 
 import org.jboss.annotation.ejb.DefaultActivationSpecs;
 import org.jboss.annotation.security.SecurityDomain;
@@ -50,10 +52,13 @@
 public class DefaultedQueueTestMDB implements MessageListener
 {
    private static final Logger log = Logger.getLogger(DefaultedQueueTestMDB.class);
-   
+
+   @Resource MessageDrivenContext ctx;
+
    public void onMessage(Message recvMsg)
    {
-      System.out.println("DefaultedQueueTestMDB onMessage");
+      System.out.println("*** DefaultedQueueTestMDB onMessage");
+      if (ctx == null) throw new RuntimeException("FAILED ON CTX LOOKUP");
       TestStatusBean.defaultedQueueRan++;
    }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/DlqTestMDB.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/mdb/DlqTestMDB.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/LocalStatelessBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/mdb/LocalStatelessBean.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/NondurableQueueTestMDB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/NondurableQueueTestMDB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/NondurableQueueTestMDB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,11 +23,13 @@
 
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
+import javax.ejb.MessageDrivenContext;
 import javax.jms.Message;
 import javax.jms.MessageListener;
 import javax.jms.DeliveryMode;
 
 import javax.annotation.security.RunAs;
+import javax.annotation.Resource;
 
 import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.logging.Logger;
@@ -42,19 +44,21 @@
         {
         @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
         @ActivationConfigProperty(propertyName="destination", propertyValue="queue/nondurablemdbtest"),
-        @ActivationConfigProperty(propertyName="durability", propertyValue="NON_DURABLE")
+        @ActivationConfigProperty(propertyName="subscriptionDurability", propertyValue="NON_DURABLE")
         })
 @RunAs("TestRole")
 @SecurityDomain("other")
 public class NondurableQueueTestMDB implements MessageListener
 {
    private static final Logger log = Logger.getLogger(NondurableQueueTestMDB.class);
-   
+   @Resource MessageDrivenContext ctx;
+
    public void onMessage(Message recvMsg)
    {
+      if (ctx == null) throw new RuntimeException("FAILED ON CTX LOOKUP");
       try
       {
-         System.out.println("QueueTestMDB onMessage");
+         System.out.println("*** NondurableQueueTestMDB onMessage");
          if (recvMsg.getJMSDeliveryMode() != DeliveryMode.NON_PERSISTENT)
             log.error("Message is PERSISTENT - should be NON PERSISTENT");
          else

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideDefaultedQueueTestMDB.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideDefaultedQueueTestMDB.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideTestMDB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideTestMDB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideTestMDB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,8 +23,10 @@
 
 import javax.ejb.ActivationConfigProperty;
 import javax.ejb.MessageDriven;
+import javax.ejb.MessageDrivenContext;
 import javax.jms.Message;
 import javax.jms.MessageListener;
+import javax.annotation.Resource;
 
 import org.jboss.logging.Logger;
 
@@ -40,10 +42,13 @@
 public class OverrideTestMDB implements MessageListener
 {
    private static final Logger log = Logger.getLogger(OverrideTestMDB.class);
-   
+   @Resource MessageDrivenContext ctx;
+
    public void onMessage(Message recvMsg)
    {
-      System.out.println("OverrideTestMDB onMessage");
+      if (ctx == null) throw new RuntimeException("FAILED ON CTX LOOKUP");
       TestStatusBean.overrideQueueRan++;
+      
+      System.out.println("*** OverrideTestMDB onMessage " + TestStatusBean.overrideQueueRan);
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/QueueTestMDB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/QueueTestMDB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/QueueTestMDB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -25,8 +25,11 @@
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.InvocationContext;
 import javax.ejb.MessageDriven;
+import javax.ejb.MessageDrivenContext;
+import javax.ejb.EJB;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
 import javax.jms.Message;
 import javax.jms.MessageListener;
 import javax.naming.InitialContext;
@@ -53,20 +56,40 @@
 {
    private static final Logger log = Logger.getLogger(QueueTestMDB.class);
    
+   @EJB(beanName="LocalStateless")
+   Stateless localStateless;
+   
+   public int count = 0;
+
+   @Resource MessageDrivenContext ctx;
+   
    public void onMessage(Message recvMsg)
    {
-      System.out.println("QueueTestMDB onMessage");
-      TestStatusBean.queueRan++;
+      if (ctx == null) throw new RuntimeException("FAILED ON CTX LOOKUP");
+      ++count;
+      ++TestStatusBean.queueRan;
+      TestStatusBean.messageCount = count;
       
+      System.out.println("+++ QueueTestMDB onMessage " + TestStatusBean.queueRan + " " + count + " " + this);
+      
+      testInjections();
+
       try {
          InitialContext jndiContext = new InitialContext();
-         Stateless stateful = (Stateless)jndiContext.lookup("Stateless");
-         stateful.setState("Set");
+         Stateless stateless = (Stateless)jndiContext.lookup("Stateless");
+         stateless.setState("Set");
       } catch (Exception e)
       {
          e.printStackTrace();
       }
+      System.out.println("--- QueueTestMDB onMessage " + TestStatusBean.queueRan + " " + count + " " + this);
+
    }
+   
+   protected void testInjections()
+   {
+      localStateless.setState("testing");
+   }
 
    @AroundInvoke
    public Object intercept(InvocationContext ctx) throws Exception

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/StatelessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/StatelessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/StatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,7 +23,7 @@
 
 import javax.annotation.security.RolesAllowed;
 import javax.ejb.Remote;
-import javax.ejb.Stateful;
+import javax.ejb.Stateless;
 
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.annotation.security.SecurityDomain;
@@ -34,7 +34,7 @@
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  * @version $Revision$
  */
- at Stateful(name="Stateless")
+ at Stateless(name="Stateless")
 @Remote(org.jboss.ejb3.test.mdb.Stateless.class)
 @RemoteBinding(jndiBinding = "Stateless")
 @SecurityDomain("other")

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TestStatus.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TestStatus.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TestStatus.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -41,10 +41,14 @@
    int nondurableQueueFired();
    
    int defaultedQueueFired();
+   
+   int overrideDefaultedQueueFired();
 
    int topicFired();
    
    int bmtQueueRan();
+   
+   int messageCount();
 
    boolean interceptedTopic();
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TestStatusBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TestStatusBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TestStatusBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -42,9 +42,11 @@
    public static int queueRan = 0;
    public static int overrideQueueRan = 0;
    public static int defaultedQueueRan = 0;
+   public static int overrideDefaultedQueueRan = 0;
    public static int nondurableQueueRan = 0;
    public static int topicRan = 0;
    public static int bmtQueueRan = 0;
+   public static int messageCount = 0;
    public static boolean interceptedTopic = false;
    public static boolean interceptedQueue = false;
    public static boolean postConstruct = false;
@@ -56,6 +58,10 @@
       topicRan = 0;
       bmtQueueRan = 0;
       overrideQueueRan = 0;
+      defaultedQueueRan = 0;
+      overrideDefaultedQueueRan = 0;
+      messageCount = 0;
+      nondurableQueueRan = 0;
       interceptedTopic = false;
       interceptedQueue = false;
       postConstruct = false;
@@ -72,6 +78,11 @@
       return overrideQueueRan;
    }
    
+   public int overrideDefaultedQueueFired()
+   {
+      return overrideDefaultedQueueRan;
+   }
+   
    public int defaultedQueueFired()
    {
       return defaultedQueueRan;
@@ -111,4 +122,9 @@
    {
       return preDestroy;
    }
+   
+   public int messageCount()
+   {
+      return messageCount;
+   }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TopicTestMDB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TopicTestMDB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/TopicTestMDB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -25,8 +25,12 @@
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.InvocationContext;
 import javax.ejb.MessageDriven;
+import javax.ejb.MessageDrivenContext;
 import javax.jms.Message;
 import javax.jms.MessageListener;
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
 
 /**
  * Comment
@@ -38,15 +42,17 @@
         {
         @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
         @ActivationConfigProperty(propertyName="destination", propertyValue="topic/mdbtest"),
-        @ActivationConfigProperty(propertyName="durability", propertyValue="Durable"),
+        @ActivationConfigProperty(propertyName="subscriptionDurability", propertyValue="Durable"),
         @ActivationConfigProperty(propertyName="subscriptionName", propertyValue="topicmdb")
         })
 public class TopicTestMDB implements MessageListener
 {
+   @Resource MessageDrivenContext ctx;
    public void onMessage(Message recvMsg)
    {
+      if (ctx == null) throw new RuntimeException("FAILED ON CTX LOOKUP");
       TestStatusBean.topicRan++;
-      System.out.println("TopicTestMDB onMessage " + TestStatusBean.topicRan + " " + recvMsg);
+      System.out.println("*** TopicTestMDB onMessage " + TestStatusBean.topicRan + " " + recvMsg);
    }
 
    @AroundInvoke

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/unit/MDBUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/unit/MDBUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/mdb/unit/MDBUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,60 +1,74 @@
 /*
-  * 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.
-  */
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.ejb3.test.mdb.unit;
 
+import java.util.Enumeration;
+import java.util.List;
+
 import javax.jms.MessageProducer;
 import javax.jms.DeliveryMode;
 import javax.jms.Queue;
+import javax.jms.QueueBrowser;
 import javax.jms.QueueConnection;
 import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
 import javax.jms.QueueSender;
 import javax.jms.QueueSession;
+import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
 import javax.jms.TopicConnection;
 import javax.jms.TopicConnectionFactory;
 import javax.jms.TopicSession;
+
+import javax.management.Attribute;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
+import org.jboss.ejb3.InitialContextFactory;
 import org.jboss.ejb3.test.mdb.Stateless;
 import org.jboss.ejb3.test.mdb.TestStatus;
 import org.jboss.logging.Logger;
 import org.jboss.security.SecurityAssociation;
 import org.jboss.security.SimplePrincipal;
 import org.jboss.test.JBossTestCase;
+import org.jboss.util.collection.CollectionsUtil;
+
 import junit.framework.Test;
 
 /**
  * Sample client for the jboss container.
- *
+ * 
  * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
  * @version $Id$
  */
-
-public class MDBUnitTestCase
-        extends JBossTestCase
+public class MDBUnitTestCase extends JBossTestCase
 {
-   private static final Logger log = Logger
-   .getLogger(MDBUnitTestCase.class);
+   private static final Logger log = Logger.getLogger(MDBUnitTestCase.class);
 
    static boolean deployed = false;
+
    static int test = 0;
 
    public MDBUnitTestCase(String name)
@@ -63,20 +77,22 @@
       super(name);
 
    }
-   
+
    public void testOverrideQueue() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("anyone"));
       SecurityAssociation.setCredential("password".toCharArray());
-      
-      TestStatus status = (TestStatus) getInitialContext().lookup("TestStatusBean/remote");
-      status.clear();
+
+      TestStatus status = (TestStatus) getInitialContext().lookup(
+            "TestStatusBean/remote");
+      clear(status);
       QueueConnection cnn = null;
       QueueSender sender = null;
       QueueSession session = null;
 
-      Queue queue = (Queue) getInitialContext().lookup("queue/overridequeuetest");
-      QueueConnectionFactory factory = (QueueConnectionFactory) getInitialContext().lookup("ConnectionFactory");
+      Queue queue = (Queue) getInitialContext().lookup(
+            "queue/overridequeuetest");
+      QueueConnectionFactory factory = getQueueConnectionFactory();
       cnn = factory.createQueueConnection();
       session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
 
@@ -84,24 +100,28 @@
 
       sender = session.createSender(queue);
       sender.send(msg);
+      session.close();
+      cnn.close();
 
-      Thread.sleep(1000);
+      Thread.sleep(5000);
       assertEquals(1, status.overrideQueueFired());
    }
-   
+
    public void testNondurableQueue() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("anyone"));
       SecurityAssociation.setCredential("password".toCharArray());
-      
-      TestStatus status = (TestStatus) getInitialContext().lookup("TestStatusBean/remote");
-      status.clear();
+
+      TestStatus status = (TestStatus) getInitialContext().lookup(
+            "TestStatusBean/remote");
+      clear(status);
       QueueConnection cnn = null;
       QueueSender sender = null;
       QueueSession session = null;
 
-      Queue queue = (Queue) getInitialContext().lookup("queue/nondurablemdbtest");
-      QueueConnectionFactory factory = (QueueConnectionFactory) getInitialContext().lookup("ConnectionFactory");
+      Queue queue = (Queue) getInitialContext().lookup(
+            "queue/nondurablemdbtest");
+      QueueConnectionFactory factory = getQueueConnectionFactory();
       cnn = factory.createQueueConnection();
       session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
 
@@ -111,24 +131,28 @@
       sender = session.createSender(queue);
       sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
       sender.send(msg);
+      session.close();
+      cnn.close();
 
-      Thread.sleep(1000);
+      Thread.sleep(2000);
       assertEquals(1, status.nondurableQueueFired());
    }
-   
+
    public void testDefaultedQueue() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("anyone"));
       SecurityAssociation.setCredential("password".toCharArray());
-      
-      TestStatus status = (TestStatus) getInitialContext().lookup("TestStatusBean/remote");
-      status.clear();
+
+      TestStatus status = (TestStatus) getInitialContext().lookup(
+            "TestStatusBean/remote");
+      clear(status);
       QueueConnection cnn = null;
       QueueSender sender = null;
       QueueSession session = null;
 
-      Queue queue = (Queue) getInitialContext().lookup("queue/defaultedmdbtest");
-      QueueConnectionFactory factory = (QueueConnectionFactory) getInitialContext().lookup("ConnectionFactory");
+      Queue queue = (Queue) getInitialContext()
+            .lookup("queue/defaultedmdbtest");
+      QueueConnectionFactory factory = getQueueConnectionFactory();
       cnn = factory.createQueueConnection();
       session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
 
@@ -136,24 +160,55 @@
 
       sender = session.createSender(queue);
       sender.send(msg);
+      session.close();
+      cnn.close();
 
-      Thread.sleep(1000);
+      Thread.sleep(2000);
       assertEquals(1, status.defaultedQueueFired());
    }
 
-   public void testQueue() throws Exception
+   public void testOverrideDefaultedQueue() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("anyone"));
       SecurityAssociation.setCredential("password".toCharArray());
-      
-      TestStatus status = (TestStatus) getInitialContext().lookup("TestStatusBean/remote");
-      status.clear();
+
+      TestStatus status = (TestStatus) getInitialContext().lookup(
+            "TestStatusBean/remote");
+      clear(status);
       QueueConnection cnn = null;
       QueueSender sender = null;
       QueueSession session = null;
 
+      Queue queue = (Queue) getInitialContext().lookup(
+            "queue/overridedefaultedmdbtest");
+      QueueConnectionFactory factory = getQueueConnectionFactory();
+      cnn = factory.createQueueConnection();
+      session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+
+      TextMessage msg = session.createTextMessage("Hello World");
+
+      sender = session.createSender(queue);
+      sender.send(msg);
+      session.close();
+      cnn.close();
+
+      Thread.sleep(2000);
+      assertEquals(1, status.overrideDefaultedQueueFired());
+   }
+
+   public void testQueue() throws Exception
+   {
+      setSecurity("anyone", "password");
+
+      TestStatus status = (TestStatus) getInitialContext().lookup(
+            "TestStatusBean/remote");
+      clear(status);
+      QueueConnection cnn = null;
+      QueueSender sender = null;
+      QueueSession session = null;
+
       Queue queue = (Queue) getInitialContext().lookup("queue/mdbtest");
-      QueueConnectionFactory factory = (QueueConnectionFactory) getInitialContext().lookup("ConnectionFactory");
+      QueueConnectionFactory factory = getQueueConnectionFactory();
       cnn = factory.createQueueConnection();
       session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
 
@@ -161,16 +216,23 @@
 
       sender = session.createSender(queue);
       sender.send(msg);
+      sender.send(msg);
+      sender.send(msg);
+      sender.send(msg);
+      sender.send(msg);
+      session.close();
+      cnn.close();
 
-      Thread.sleep(1000);
-      assertEquals(1, status.queueFired());
+      Thread.sleep(2000);
+      assertEquals(5, status.queueFired());
       assertTrue(status.interceptedQueue());
       assertTrue(status.postConstruct());
+      assertEquals(5, status.messageCount());
 
-      //TODO: Figure out how to test preDestroy gets invoked
-      //assertTrue(status.preDestroy());
-      
-      Stateless stateless = (Stateless)getInitialContext().lookup("Stateless");
+      // TODO: Figure out how to test preDestroy gets invoked
+      // assertTrue(status.preDestroy());
+
+      Stateless stateless = (Stateless) getInitialContext().lookup("Stateless");
       assertNotNull(stateless);
       String state = stateless.getState();
       assertEquals("Set", state);
@@ -178,14 +240,15 @@
 
    public void testTopic() throws Exception
    {
-      TestStatus status = (TestStatus) getInitialContext().lookup("TestStatusBean/remote");
-      status.clear();
+      TestStatus status = (TestStatus) getInitialContext().lookup(
+            "TestStatusBean/remote");
+      clear(status);
       TopicConnection cnn = null;
       MessageProducer sender = null;
       TopicSession session = null;
 
       Topic topic = (Topic) getInitialContext().lookup("topic/mdbtest");
-      TopicConnectionFactory factory = (TopicConnectionFactory) getInitialContext().lookup("ConnectionFactory");
+      TopicConnectionFactory factory = getTopicConnectionFactory();
       cnn = factory.createTopicConnection();
       session = cnn.createTopicSession(false, QueueSession.AUTO_ACKNOWLEDGE);
 
@@ -193,39 +256,235 @@
 
       sender = session.createProducer(topic);
       sender.send(msg);
+      session.close();
+      cnn.close();
 
-      Thread.sleep(1000);
+      Thread.sleep(2000);
       assertEquals(1, status.topicFired());
       assertTrue(status.interceptedTopic());
       assertFalse(status.postConstruct());
       assertFalse(status.preDestroy());
-   } 
-   
+   }
+
    public void testRuntimeException() throws Exception
    {
-      TestStatus status = (TestStatus) getInitialContext().lookup("TestStatusBean/remote");
-      status.clear();
+      TestStatus status = (TestStatus) getInitialContext().lookup(
+            "TestStatusBean/remote");
+      clear(status);
       QueueConnection cnn = null;
       QueueSender sender = null;
       QueueSession session = null;
 
       Queue queue = (Queue) getInitialContext().lookup("queue/bmtmdbtest");
-      QueueConnectionFactory factory = (QueueConnectionFactory) getInitialContext().lookup("ConnectionFactory");
+      QueueConnectionFactory factory = getQueueConnectionFactory();
       cnn = factory.createQueueConnection();
       session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
 
       TextMessage msg = session.createTextMessage("Hello World");
+      msg.setIntProperty("JMS_JBOSS_REDELIVERY_LIMIT", 1);
 
       sender = session.createSender(queue);
       sender.send(msg);
+      session.close();
+      cnn.close();
 
-      Thread.sleep(1000);
+      Thread.sleep(2000);
       assertEquals(1, status.bmtQueueRan());
    }
 
+   /**
+    * Test that expired messages are moved to a separate queue.
+    */
+   public void testExpiredMessagesMove() throws Exception
+   {
+      QueueConnection connection = null;
+      QueueSender sender = null;
+      QueueSession session = null;
+
+      QueueConnectionFactory factory = getQueueConnectionFactory();
+      connection = factory.createQueueConnection();
+      connection.start();
+      session = connection.createQueueSession(false,
+            QueueSession.AUTO_ACKNOWLEDGE);
+
+      Queue queue = (Queue) getInitialContext().lookup("queue/expirytest");
+      sender = session.createSender(queue);
+
+      Queue dlq = (Queue) getInitialContext().lookup("queue/DLQ");
+
+      ObjectName dlqName = new ObjectName(
+            "jboss.mq.destination:service=Queue,name=DLQ");
+      getServer().invoke(dlqName, "removeAllMessages", null, null);
+
+      long now = System.currentTimeMillis();
+
+      TextMessage message = session.createTextMessage();
+      message.setStringProperty("foo", "bar");
+      message.setStringProperty("null", null);
+      String text = "expire on server";
+      message.setText(text);
+
+      sender.send(message, DeliveryMode.PERSISTENT, 4, 1);
+
+      Thread.sleep(1000);
+
+      assertSize(session, queue, 0);
+      assertSize(session, dlq, 1);
+
+      QueueReceiver receiver = session.createReceiver(dlq);
+      message = (TextMessage) receiver.receiveNoWait();
+      assertNotNull(message);
+      assertEquals("QUEUE.expirytest", message
+            .getStringProperty("JBOSS_ORIG_DESTINATION"));
+      assertTrue(message.getLongProperty("JBOSS_ORIG_EXPIRATION") > now);
+      assertEquals(0L, message.getJMSExpiration());
+      assertEquals(text, message.getText());
+      assertEquals("bar", message.getStringProperty("foo"));
+      assertNull(message.getStringProperty("null"));
+
+      sender.close();
+      receiver.close();
+
+      session.close();
+      connection.close();
+   }
+
+   public void testDlqMaxResent() throws Exception
+   {
+      QueueConnection connection = null;
+      QueueSender sender = null;
+      QueueSession session = null;
+
+      QueueConnectionFactory factory = getQueueConnectionFactory();
+      connection = factory.createQueueConnection();
+      connection.start();
+      session = connection.createQueueSession(false,
+            QueueSession.AUTO_ACKNOWLEDGE);
+
+      Queue queue = (Queue) getInitialContext().lookup("queue/dlqtest");
+      sender = session.createSender(queue);
+
+      Queue dlq = (Queue) getInitialContext().lookup("queue/DLQ");
+
+      ObjectName dlqName = new ObjectName(
+            "jboss.mq.destination:service=Queue,name=DLQ");
+      getServer().invoke(dlqName, "removeAllMessages", null, null);
+
+      TextMessage message = session.createTextMessage();
+      message.setStringProperty("foo", "bar");
+      message.setStringProperty("null", null);
+      String text = "expire on server";
+      message.setText(text);
+
+      sender.send(message);
+
+      Thread.sleep(1000);
+
+      assertSize(session, queue, 0);
+      assertSize(session, dlq, 1);
+
+      QueueReceiver receiver = session.createReceiver(dlq);
+      message = (TextMessage) receiver.receiveNoWait();
+      assertNotNull(message);
+      assertEquals("QUEUE.dlqtest", message
+            .getStringProperty("JBOSS_ORIG_DESTINATION"));
+      assertEquals(0L, message.getJMSExpiration());
+      assertEquals(text, message.getText());
+      assertEquals("bar", message.getStringProperty("foo"));
+      assertNull(message.getStringProperty("null"));
+
+      sender.close();
+      receiver.close();
+
+      session.close();
+      connection.close();
+   }
+
+   private List list(QueueSession session, Queue queue) throws Exception
+   {
+      QueueBrowser browser = session.createBrowser(queue);
+      Enumeration e = browser.getEnumeration();
+      List messages = CollectionsUtil.list(e);
+
+      browser.close();
+
+      return messages;
+   }
+
+   private int size(QueueSession session, Queue queue) throws Exception
+   {
+      List l = list(session, queue);
+      return l.size();
+   }
+
+   private void assertSize(QueueSession session, Queue queue, int size)
+         throws Exception
+   {
+      assertEquals(size, size(session, queue));
+   }
+
+   protected QueueConnectionFactory getQueueConnectionFactory()
+         throws Exception
+   {
+      try
+      {
+         return (QueueConnectionFactory) getInitialContext().lookup(
+               "ConnectionFactory");
+      } catch (NamingException e)
+      {
+         return (QueueConnectionFactory) getInitialContext().lookup(
+               "java:/ConnectionFactory");
+      }
+   }
+
+   protected TopicConnectionFactory getTopicConnectionFactory()
+         throws Exception
+   {
+      try
+      {
+         return (TopicConnectionFactory) getInitialContext().lookup(
+               "ConnectionFactory");
+      } catch (NamingException e)
+      {
+         return (TopicConnectionFactory) getInitialContext().lookup(
+               "java:/ConnectionFactory");
+      }
+   }
+
+   protected void clear(TestStatus status)
+   {
+      status.clear();
+      assertEquals(0, status.bmtQueueRan());
+      assertEquals(0, status.defaultedQueueFired());
+      assertEquals(0, status.messageCount());
+      assertEquals(0, status.nondurableQueueFired());
+      assertEquals(0, status.overrideDefaultedQueueFired());
+      assertEquals(0, status.overrideQueueFired());
+      assertEquals(0, status.queueFired());
+      assertEquals(0, status.topicFired());
+      assertFalse(status.interceptedQueue());
+      assertFalse(status.interceptedTopic());
+      assertFalse(status.postConstruct());
+      assertFalse(status.preDestroy());
+   }
+
+   protected void setSecurity(String user, String password)
+   {
+      SecurityAssociation.setPrincipal(new SimplePrincipal(user));
+      SecurityAssociation.setCredential(password.toCharArray());
+
+      InitialContextFactory.setSecurity(user, password);
+   }
+
+   protected InitialContext getInitialContext() throws Exception
+   {
+      return InitialContextFactory.getInitialContext();
+   }
+
    public static Test suite() throws Exception
    {
-      return getDeploySetup(MDBUnitTestCase.class, "mdbtest-service.xml, mdb-test.jar");
+      return getDeploySetup(MDBUnitTestCase.class,
+            "mdbtest-service.xml, mdb-test.jar");
    }
 
-}
+}
\ No newline at end of file

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/bad/BadFieldMethodBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/bad/BadFieldMethodBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/bad/BadFieldMethodBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -50,9 +50,10 @@
       System.out.println("setKey, key="+key);
    }
 
-   public void ping()
+   public String getKey()
    {
       System.out.println("ping, key="+key);
+      return key;
    }
 
    @Remove

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/bad/BadInjector.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/bad/BadInjector.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/bad/BadInjector.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -32,6 +32,6 @@
 @Remote
 public interface BadInjector
 {
-   public void ping();
+   public String getKey();
    public void remove();
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/unit/BadInjectionsUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/unit/BadInjectionsUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/unit/BadInjectionsUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -58,7 +58,7 @@
       Object ref = ctx.lookup("BadFieldMethodBean/remote");
       log.info("Found BadInjector");
       BadInjector bean = (BadInjector) ref;
-      bean.ping();
+      assertEquals("BadFieldMethodBean", bean.getKey());
       bean.remove();
       super.undeploy("bad-field-method.jar");
    }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/unit/BindFailureTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/unit/BindFailureTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/naming/unit/BindFailureTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -51,12 +51,16 @@
    {
       try
       {
+// test was originally to catch redeploying with the same jndi name, but now we are
+// using rebind instead of bind
          this.redeploy("bind-failure-test.jar");
-         fail();
+         this.redeploy("bind-failure-test.jar");
+//         fail();
       } catch (Exception e)
       {
          log.info("caught " + e.getClass().getName() + " " + e.getMessage() + " " + e.getCause());
          System.out.println("caught " + e.getClass().getName() + " " + e.getMessage() + " " + e.getCause());
+         fail();
       }
       
       this.undeploy("bind-failure-test.jar");
@@ -66,7 +70,6 @@
    public static Test suite() throws Exception
    {
       TestSuite suite = new TestSuite();
-      suite.addTest(new TestSuite(BindFailureTestCase.class));
       return suite;
    }
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/GlobalSession30Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/GlobalSession30Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/GlobalSession30Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,23 +21,11 @@
   */
 package org.jboss.ejb3.test.reference21_30;
 
-import java.rmi.*;
-import java.sql.Connection;
-
 import javax.naming.*;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
-import javax.ejb.Init;
 import javax.ejb.Remote;
-import javax.ejb.SessionContext;
 import javax.ejb.Stateless;
-import javax.sql.DataSource;
 
 import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.annotation.security.SecurityDomain;
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.test.longlived.StatelessLocal;
-import org.jboss.ejb3.test.stateless.CheckedStateless;
 import org.jboss.logging.Logger;
 
 /**

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session30Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session30Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session30Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,8 +22,8 @@
 package org.jboss.ejb3.test.reference21_30;
 
 import javax.naming.*;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.ejb.Remote;
 import javax.ejb.Stateless;
 import javax.ejb.Local;
@@ -42,7 +42,7 @@
 @Local(LocalSession30.class)
 @RemoteBinding(jndiBinding = "Session30")
 @LocalBinding(jndiBinding = "LocalSession30")
- at EJBs({@EJB(name="injected", businessInterface=org.jboss.ejb3.test.reference21_30.Session21.class, beanName="Session21")})
+ at EJBs({@EJB(name="injected", beanInterface=org.jboss.ejb3.test.reference21_30.Session21.class, beanName="Session21")})
 public class Session30Bean 
 {
    private static final Logger log = Logger.getLogger(Session30Bean.class);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Test3Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Test3Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Test3Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -24,9 +24,9 @@
 import javax.ejb.Remote;
 import javax.ejb.RemoteHome;
 import javax.ejb.Stateless;
+import javax.ejb.EJB;
 import javax.naming.InitialContext;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJBs;
 
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.ejb3.Container;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/InheritanceSessionBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/InheritanceSessionBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/InheritanceSessionBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -81,7 +81,7 @@
 
    public List getContacts()
    {
-      Query query = em.createQuery("from Contact");
+      Query query = em.createQuery("select c from Contact c");
       return query.getResultList();
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree249/MyServiceBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree249/MyServiceBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree249/MyServiceBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.regression.ejbthree249;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import org.jboss.annotation.ejb.Management;
 import org.jboss.annotation.ejb.Service;
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree290/DAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree290/DAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree290/DAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -24,10 +24,9 @@
 import javax.ejb.Stateless;
 import javax.persistence.PersistenceContext;
 import javax.persistence.EntityManager;
-import javax.persistence.FlushModeType;
 import javax.persistence.EntityNotFoundException;
 import javax.ejb.Remote;
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 
 /**
  * Comment

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree454/AEJBBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree454/AEJBBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree454/AEJBBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,7 +22,7 @@
 package org.jboss.ejb3.test.regression.ejbthree454;
 
 import javax.ejb.Stateless;
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 
 /**
  * Comment

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree454/BEJBBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree454/BEJBBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree454/BEJBBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,7 +22,7 @@
 package org.jboss.ejb3.test.regression.ejbthree454;
 
 import javax.ejb.Stateless;
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 
 /**
  * Comment

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485 (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyException.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyException.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyException.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,38 +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 org.jboss.ejb3.test.regression.ejbthree485;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 45000 $
- */
-public class MyException extends Exception
-{
-   private static final long serialVersionUID = 1L;
-
-   public MyException(String message)
-   {
-      super(message);
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyException.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyException.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyRemote.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyRemote.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyRemote.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,39 +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 org.jboss.ejb3.test.regression.ejbthree485;
-
-import java.io.Serializable;
-
-import javax.ejb.Remote;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 46054 $
- */
- at Remote
-public interface MyRemote //extends Serializable
-{
-   void giveMeAnException() throws MyException;
-   void giveMeARuntimeException();
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyRemote.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/MyRemote.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/StatelessBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/StatelessBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/StatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,42 +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 org.jboss.ejb3.test.regression.ejbthree485;
-
-import javax.ejb.Stateless;
-
-/**
- * For EJBTHREE-485 unit test
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 45000 $
- */
- at Stateless
-public class StatelessBean implements MyRemote
-{
-   public void giveMeAnException() throws MyException {
-      throw new MyException("Here you are");
-   }
-   
-   public void giveMeARuntimeException() {
-      throw new RuntimeException("Sure, no problem");
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/StatelessBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/StatelessBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/ClassNameTestCase.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/ClassNameTestCase.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/ClassNameTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,98 +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 org.jboss.ejb3.test.regression.ejbthree485.unit;
-
-import java.rmi.RMISecurityManager;
-
-import javax.naming.Context;
-import junit.framework.Test;
-
-import org.jboss.ejb3.test.regression.ejbthree485.MyException;
-import org.jboss.ejb3.test.regression.ejbthree485.MyRemote;
-import org.jboss.test.JBossTestCase;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo at nerdnet.nl">Carlo de Wolf</a>
- * @version $Revision: 46054 $
- */
-public class ClassNameTestCase extends JBossTestCase
-{
-   public ClassNameTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void testException() throws Exception {
-      Context ctx = getInitialContext();
-      MyRemote remote = (MyRemote) ctx.lookup("StatelessBean/remote");
-      try {
-         remote.giveMeAnException();
-         
-         fail("expected an exception");
-      }
-      catch(MyException e) {
-         e.printStackTrace();
-         
-         StackTraceElement stackTrace[] = e.getStackTrace();
-         int i = 0;
-         while(i < stackTrace.length && !stackTrace[i].getClassName().equals(ClassNameTestCase.class.getName()))
-            i++;
-         //assertTrue(i < stackTrace.length); // let's error if this happens
-         i--;
-         String actual = stackTrace[i].getClassName();
-         String expected = "?";
-         assertFalse("class name must not start with $Proxy", actual.startsWith("$Proxy"));
-         assertEquals(expected, actual);
-         return;
-      }
-   }
-   
-   public void testRuntimeException() throws Exception {
-      Context ctx = getInitialContext();
-      MyRemote remote = (MyRemote) ctx.lookup("StatelessBean/remote");
-      try {
-         remote.giveMeARuntimeException();
-         
-         fail("expected an exception");
-      }
-      catch(RuntimeException re) {
-         Throwable e = re.getCause();
-         StackTraceElement stackTrace[] = e.getStackTrace();
-         int i = 0;
-         while(i < stackTrace.length && !stackTrace[i].getClassName().equals(ClassNameTestCase.class.getName()))
-            i++;
-         //assertTrue(i < stackTrace.length); // let's error if this happens
-         i--;
-         String actual = stackTrace[i].getClassName();
-         String expected = "?";
-         assertFalse("class name must not start with $Proxy", actual.startsWith("$Proxy"));
-         assertEquals(expected, actual);
-      }
-   }
-   
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(ClassNameTestCase.class, "ejbthree485.jar");
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/ClassNameTestCase.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree485/unit/ClassNameTestCase.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620 (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/Calculator.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/Calculator.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/Calculator.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,38 +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 org.jboss.ejb3.test.regression.ejbthree620;
-
-import javax.ejb.Remote;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: 46056 $
- */
- at Remote
-public interface Calculator
-{
-   int add(int a, int b);
-   
-   int performAddition(int a, int b);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/Calculator.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/Calculator.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/CalculatorBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/CalculatorBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/CalculatorBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,53 +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 org.jboss.ejb3.test.regression.ejbthree620;
-
-import javax.ejb.EJB;
-//import javax.ejb.EJBException;
-import javax.ejb.Stateless;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: 46096 $
- */
- at Stateless
-public class CalculatorBean implements Calculator
-{
-   @EJB(beanInterface=Calculator.class) Object other;
-//   @EJB(businessInterface=Calculator.class) Object deprecatedOther;
-   
-   public int add(int a, int b)
-   {
-      int result1 = ((Calculator) other).performAddition(a, b);
-//      int result2 = ((Calculator) deprecatedOther).performAddition(a, b);
-//      if(result1 != result2)
-//         throw new EJBException("something horrible happened");
-      return result1;
-   }
-
-   public int performAddition(int a, int b)
-   {
-      return a + b;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/CalculatorBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/CalculatorBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/EJBBeanInterfaceTestCase.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/EJBBeanInterfaceTestCase.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/EJBBeanInterfaceTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,54 +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 org.jboss.ejb3.test.regression.ejbthree620.unit;
-
-import javax.naming.Context;
-
-import junit.framework.Test;
-
-import org.jboss.ejb3.test.regression.ejbthree620.Calculator;
-import org.jboss.test.JBossTestCase;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: 46056 $
- */
-public class EJBBeanInterfaceTestCase extends JBossTestCase
-{
-   public EJBBeanInterfaceTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void testAddition() throws Exception {
-      Context ctx = getInitialContext();
-      Calculator calculator = (Calculator) ctx.lookup("CalculatorBean/remote");
-      assertEquals(3, calculator.add(1, 2));
-   }
-   
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(EJBBeanInterfaceTestCase.class, "ejbthree620.jar");
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/EJBBeanInterfaceTestCase.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree620/unit/EJBBeanInterfaceTestCase.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625 (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/Silly.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/Silly.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/Silly.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,40 +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 org.jboss.ejb3.test.regression.ejbthree625;
-
-import javax.ejb.Remote;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 45664 $
- */
- at Remote
-public interface Silly
-{
-   int add(int x, int y);
-
-   int sub(int x, int y);
-
-   void clear();
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/Silly.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/Silly.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/SillyBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/SillyBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/SillyBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,51 +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 org.jboss.ejb3.test.regression.ejbthree625;
-
-import javax.ejb.Stateless;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 45664 $
- */
- at Stateless
-public class SillyBean implements Silly
-{
-   public int add(int x, int y)
-   {
-      if (StupidInterceptor.count != 1) throw new RuntimeException("count is wrong: " + StupidInterceptor.count);
-      return x + y;
-   }
-
-   public int sub(int x, int y)
-   {
-      if (StupidInterceptor.count != 1) throw new RuntimeException("count is wrong: " + StupidInterceptor.count);
-      return x-y;
-   }
-
-   public void clear()
-   {
-      StupidInterceptor.count = 0;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/SillyBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/SillyBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/StupidInterceptor.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/StupidInterceptor.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/StupidInterceptor.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,42 +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 org.jboss.ejb3.test.regression.ejbthree625;
-
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.InvocationContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 45664 $
- */
-public class StupidInterceptor
-{
-   public static int count = 0;
-   @AroundInvoke
-   public Object intercept(InvocationContext ic) throws Exception
-   {
-       count++;
-       return ic.proceed();
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/StupidInterceptor.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/StupidInterceptor.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/Ejb625UnitTestCase.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/Ejb625UnitTestCase.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/Ejb625UnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,65 +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 org.jboss.ejb3.test.regression.ejbthree625.unit;
-
-import org.jboss.test.JBossTestCase;
-import org.jboss.ejb3.test.regression.ejbthree290.DAO;
-import org.jboss.ejb3.test.regression.ejbthree290.MyEntity;
-import org.jboss.ejb3.test.regression.ejbthree290.unit.Ejb290UnitTestCase;
-import org.jboss.ejb3.test.regression.ejbthree625.Silly;
-import junit.framework.Test;
-
-/**
- *
- * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
- * @version $Id: Ejb625UnitTestCase.java 45664 2006-06-19 14:13:44Z bill $
- */
-
-public class Ejb625UnitTestCase
-extends JBossTestCase
-{
-   org.apache.log4j.Category log = getLog();
-
-   static boolean deployed = false;
-   static int test = 0;
-
-   public Ejb625UnitTestCase(String name)
-   {
-
-      super(name);
-
-   }
-
-   public void testDefaultInterceptors() throws Exception
-   {
-      Silly silly = (Silly)getInitialContext().lookup("SillyBean/remote");
-      assertEquals(2, silly.add(1, 1));
-      silly.clear();
-      assertEquals(0, silly.sub(1, 1));
-   }
-
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(Ejb625UnitTestCase.class, "regression-ejbthree625-test.jar");
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/Ejb625UnitTestCase.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree625/unit/Ejb625UnitTestCase.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653 (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,37 +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 org.jboss.ejb3.test.regression.ejbthree653;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.EJBObject;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface MyStateful21 extends EJBObject
-{
-   String sayHelloTo(String name) throws RemoteException;
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Bean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Bean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,75 +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 org.jboss.ejb3.test.regression.ejbthree653;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.EJB;
-import javax.ejb.EJBException;
-import javax.ejb.Remote;
-import javax.ejb.RemoteHome;
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
-import javax.ejb.Stateful;
-
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
- at Stateful
- at Remote(MyStateful21.class)
- at RemoteHome(MyStateful21Home.class)
-public class MyStateful21Bean implements SessionBean
-{
-   private static final long serialVersionUID = 1L;
-
-   @SuppressWarnings("unused")
-   private static final Logger log = Logger.getLogger(MyStateful21Bean.class);
-   
-   @EJB
-   private MyStateless delegate;
-   
-   public void ejbActivate() throws EJBException, RemoteException
-   {
-   }
-
-   public void ejbPassivate() throws EJBException, RemoteException
-   {
-   }
-
-   public void ejbRemove() throws EJBException, RemoteException
-   {
-   }
-
-   public void setSessionContext(SessionContext ctx) throws EJBException, RemoteException
-   {
-   }
-
-   public String sayHelloTo(String name)
-   {
-      return delegate.sayHelloTo(name);
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Bean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Bean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Home.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Home.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Home.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,38 +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 org.jboss.ejb3.test.regression.ejbthree653;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBHome;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface MyStateful21Home extends EJBHome
-{
-   MyStateful21 create() throws CreateException, RemoteException;
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Home.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateful21Home.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateless.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateless.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateless.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,33 +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 org.jboss.ejb3.test.regression.ejbthree653;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface MyStateless
-{
-   String sayHelloTo(String name);
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateless.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStateless.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStatelessBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStatelessBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,71 +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 org.jboss.ejb3.test.regression.ejbthree653;
-
-import javax.annotation.PostConstruct;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
- at Stateless
- at Remote(MyStateless.class)
-public class MyStatelessBean
-{
-   private static long currentThreadId;
-   
-   /**
-    * EJBCreate method.
-    */
-   @PostConstruct
-   public void ejb3Create() 
-   {
-      System.out.println("New SessionBean " + this);
-      System.out.println("Thread " + Thread.currentThread().getId());
-      //setupBean();
-      if(currentThreadId == 0)
-      {
-         currentThreadId = Thread.currentThread().getId();
-      }
-      else
-      {
-         if(Thread.currentThread().getId() == currentThreadId)
-         {
-            throw new IllegalStateException("no new instance should be created");
-         }
-         else
-         {
-            // could happen with remoting 2.0
-            currentThreadId = Thread.currentThread().getId();
-         }
-      }
-   } 
-   
-   public String sayHelloTo(String name)
-   {
-      return "Hi " + name;
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStatelessBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/MyStatelessBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,63 +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 org.jboss.ejb3.test.regression.ejbthree653.unit;
-
-import java.util.Date;
-
-import junit.framework.Test;
-
-import org.jboss.ejb3.test.regression.ejbthree653.MyStateful21;
-import org.jboss.ejb3.test.regression.ejbthree653.MyStateful21Home;
-import org.jboss.test.JBossTestCase;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class PoolingSLBSTestCase extends JBossTestCase
-{
-
-   public PoolingSLBSTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void test1() throws Exception
-   {
-      MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/remoteHome");
-      MyStateful21 session = home.create();
-      for(int i = 0; i < 1000; i++)
-      {
-         String me = new Date().toString();
-         String expected = "Hi " + me;
-         String actual = session.sayHelloTo(me);
-         assertEquals(expected, actual);
-      }
-   }
-   
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(PoolingSLBSTestCase.class, "ejbthree653.jar");
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670 (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,35 +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 org.jboss.ejb3.test.regression.ejbthree670;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface MyStateful
-{
-   void remove();
-   void setName(String name);
-   String sayHello();
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,35 +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 org.jboss.ejb3.test.regression.ejbthree670;
-
-import javax.ejb.EJBObject;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface MyStateful21 extends EJBObject, MyStateful
-{
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Bean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Bean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,90 +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 org.jboss.ejb3.test.regression.ejbthree670;
-
-import java.rmi.RemoteException;
-
-import javax.annotation.PreDestroy;
-import javax.ejb.EJBException;
-import javax.ejb.Remote;
-import javax.ejb.RemoteHome;
-import javax.ejb.Remove;
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
-import javax.ejb.Stateful;
-
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
- at Stateful
- at Remote(MyStateful21.class)
- at RemoteHome(MyStateful21Home.class)
-public class MyStateful21Bean implements SessionBean
-{
-   private static final Logger log = Logger.getLogger(MyStateful21Bean.class);
-   
-   private String name;
-   private int preDestroyCalls = 0;
-   
-   public void ejbActivate() throws EJBException, RemoteException
-   {
-   }
-
-   public void ejbPassivate() throws EJBException, RemoteException
-   {
-   }
-
-   public void ejbRemove() throws EJBException, RemoteException
-   {
-      log.info("remove");
-   }
-
-   public void setSessionContext(SessionContext ctx) throws EJBException, RemoteException
-   {
-   }
-
-   @PreDestroy
-   public void preDestroy()
-   {
-      //new Exception().printStackTrace();
-      preDestroyCalls++;
-      log.info("pre destroy");
-      if(preDestroyCalls > 1)
-         throw new IllegalStateException("pre destroy called multiple times");
-   }
-   
-   public String sayHello()
-   {
-      return "Hi " + name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Bean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Bean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Home.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Home.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Home.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,38 +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 org.jboss.ejb3.test.regression.ejbthree670;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBHome;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface MyStateful21Home extends EJBHome
-{
-   MyStateful21 create() throws CreateException, RemoteException;
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Home.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStateful21Home.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStatefulBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStatefulBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,73 +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 org.jboss.ejb3.test.regression.ejbthree670;
-
-import javax.annotation.PreDestroy;
-import javax.ejb.Remote;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-
-import org.jboss.annotation.ejb.cache.Cache;
-import org.jboss.ejb3.cache.simple.SimpleStatefulCache;
-import org.jboss.logging.Logger;
-
-/**
- * Test how many times pre destroy is called.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
- at Stateful
- at Remote(MyStateful.class)
-public class MyStatefulBean implements MyStateful
-{
-   private static final Logger log = Logger.getLogger(MyStatefulBean.class);
-   
-   private String name;
-   private int preDestroyCalls = 0;
-   
-   @PreDestroy
-   public void preDestroy()
-   {
-      preDestroyCalls++;
-      log.info("pre destroy");
-      if(preDestroyCalls > 1)
-         throw new IllegalStateException("pre destroy called multiple times");
-   }
-   
-   @Remove
-   public void remove()
-   {
-      log.info("remove");
-   }
-   
-   public String sayHello()
-   {
-      return "Hi " + name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStatefulBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/MyStatefulBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,105 +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 org.jboss.ejb3.test.regression.ejbthree670.unit;
-
-import junit.framework.Test;
-
-import org.jboss.ejb3.test.regression.ejbthree670.MyStateful;
-import org.jboss.ejb3.test.regression.ejbthree670.MyStateful21;
-import org.jboss.ejb3.test.regression.ejbthree670.MyStateful21Home;
-import org.jboss.test.JBossTestCase;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class PreDestroyCallsTestCase extends JBossTestCase
-{
-
-   public PreDestroyCallsTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void test1() throws Exception
-   {
-      MyStateful session = (MyStateful) getInitialContext().lookup("MyStatefulBean/remote");
-      session.setName("Test");
-      String actual = session.sayHello();
-      assertEquals("Hi Test", actual);
-      try
-      {
-         session.remove();
-      }
-      catch(RuntimeException e)
-      {
-         if(e.getCause().getMessage().equals("pre destroy called multiple times"))
-            fail("pre destroy called multiple times");
-         throw e;
-      }
-   }
-   
-   public void test21() throws Exception
-   {
-      MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/remoteHome");
-      MyStateful21 session = home.create();
-      session.setName("Test");
-      String actual = session.sayHello();
-      assertEquals("Hi Test", actual);
-      try
-      {
-         session.remove();
-      }
-      catch(RuntimeException e)
-      {
-         if(e.getCause().getMessage().equals("pre destroy called multiple times"))
-            fail("pre destroy called multiple times");
-         throw e;
-      }
-   }
-   
-   public void testRemoveByHandle() throws Exception
-   {
-      MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/remoteHome");
-      MyStateful21 session = home.create();
-      session.setName("Test");
-      String actual = session.sayHello();
-      assertEquals("Hi Test", actual);
-      try
-      {
-         home.remove(session.getHandle());
-      }
-      catch(RuntimeException e)
-      {
-         if(e.getCause().getMessage().equals("pre destroy called multiple times"))
-            fail("pre destroy called multiple times");
-         throw e;
-      }
-   }
-   
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(PreDestroyCallsTestCase.class, "ejbthree670.jar");
-   }
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/salesforce7123/DataAccessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/salesforce7123/DataAccessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/salesforce7123/DataAccessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -51,7 +51,7 @@
 
    public List findMyBeans()
    {
-      List list = manager.createQuery("FROM BaseData base").getResultList();
+      List list = manager.createQuery("SELECT base FROM BaseData base").getResultList();
       for (Object obj : list)
       {
          BaseData data = (BaseData)obj;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/salesforce7123/MyBusinessSessionBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/salesforce7123/MyBusinessSessionBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/salesforce7123/MyBusinessSessionBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -26,7 +26,7 @@
 import javax.ejb.Stateless;
 import javax.ejb.TransactionAttribute;
 import javax.ejb.TransactionAttributeType;
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 
 /**
  * Comment

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/ClientBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/ClientBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/ClientBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -44,5 +44,12 @@
       cust = remote.findCustomer(id);
       if (!cust.getName().equals("Bill")) throw new RuntimeException("Failed to persist");
 
+      try
+      {
+         remote.throwException();
+      }
+      catch (ScopedException ignored) {}
+
    }
+
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/ScopedException.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/ScopedException.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/StatelessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/StatelessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/StatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -51,4 +51,9 @@
    {
       return manager.find(Customer.class, id);
    }
+
+   public void throwException() throws ScopedException
+   {
+      throw new ScopedException();
+   }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/StatelessRemote.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/StatelessRemote.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regression/scopedclassloader/StatelessRemote.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -37,4 +37,6 @@
    int createCustomer(Customer cust);
 
    Customer findCustomer(int id);
+
+   void throwException() throws ScopedException;
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regressionHHH275/SearchDAO.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regressionHHH275/SearchDAO.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/regressionHHH275/SearchDAO.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -60,7 +60,7 @@
 
    public int find()
    {
-      Query q = em.createQuery("From SavedSearch s WHERE (s.id = 'u1' OR s.id = 'USER_ALL_USERS') AND s.searchTitle = 'CRAP'");
+      Query q = em.createQuery("select s From SavedSearch s WHERE (s.id = 'u1' OR s.id = 'USER_ALL_USERS') AND s.searchTitle = 'CRAP'");
       return q.getResultList().size();
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/schema/unit/SchemaTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/schema/unit/SchemaTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/schema/unit/SchemaTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -108,6 +108,7 @@
       DocumentBuilder builder = getDocumentBuilder();
       
       validateFile("../src/resources/test/bank/META-INF/jboss.xml", builder);
+      validateFile("../src/resources/test/clusteredsession/META-INF/jboss.xml", builder);
       validateFile("../src/resources/test/consumer/META-INF/jboss.xml", builder);
       validateFile("../src/resources/test/dd/mdb/META-INF/jboss.xml", builder);
       validateFile("../src/resources/test/dd/web/META-INF/jboss.xml", builder);
@@ -122,6 +123,8 @@
       validateFile("../src/resources/test/reference21_30/META-INF/jboss-reference.xml", builder);
       validateFile("../src/resources/test/securitydomain/META-INF/jboss.xml", builder);
       validateFile("../src/resources/test/service/META-INF/jboss.xml", builder);
+      validateFile("../src/resources/test/ssladvanced/META-INF/jboss.xml", builder);
+      validateFile("../src/resources/test/strictpool/META-INF/jboss.xml", builder);
    }
    
    public void testTutorialJBoss() throws Exception
@@ -134,6 +137,7 @@
       validateFile("../docs/tutorial/jboss_deployment_descriptor/META-INF/jboss.xml", builder);
       validateFile("../docs/tutorial/jboss_resource_ref/META-INF/jboss.xml", builder);
       validateFile("../docs/tutorial/jca/inflow/swiftmq/resources/META-INF/jboss.xml", builder);
+      validateFile("../docs/tutorial/mdb_deployment_descriptor/META-INF/jboss.xml", builder);
       validateFile("../docs/tutorial/service_deployment_descriptor/META-INF/jboss.xml", builder);
       validateFile("../docs/tutorial/stateful_deployment_descriptor/META-INF/jboss.xml", builder);
       validateFile("../docs/tutorial/stateless_deployment_descriptor/META-INF/jboss.xml", builder);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CalledSession.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CalledSession.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CalledSession.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -33,7 +33,7 @@
    /** This method should call echo on a StatelessSessionLocal */
    public String invokeEcho(String arg);
    /** This method should call invokeEcho on another CalledSession */
-   public void callEcho();
+   public String callEcho();
    /**
     * A method that does nothing but is not assiged a
     * method-permission in the ejb-jar.xml descriptor

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -28,10 +28,7 @@
 import javax.ejb.Stateless;
 import javax.naming.Context;
 import javax.naming.InitialContext;
-import javax.rmi.PortableRemoteObject;
 
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
 import javax.annotation.security.RunAs;
@@ -47,14 +44,12 @@
  * @version $Revision$
  */
 @Stateless(name="CallerBean")
- at Remote(org.jboss.ejb3.test.security.CalledSession.class)
+ at Remote(CalledSession.class)
 @RemoteBinding(jndiBinding = "spec.CallerBean")
 @RunAs("InternalRole")
 @RolesAllowed({"Echo"})
 @SecurityDomain("spec-test")
-//@EJBs({@EJB(name="Caller2", businessInterface=org.jboss.ejb3.test.security.CalledSession.class, beanName="CallerBean2"),
-//   @EJB(name="Callee", businessInterface=org.jboss.ejb3.test.security.StatelessSessionLocal.class, beanName="CalleeBean")})
-public class CallerBean 
+public class CallerBean implements CalledSession
 {
    private static Category log = Category.getInstance(CallerBean.class);
    @Resource  SessionContext sessionContext;
@@ -108,7 +103,7 @@
    /**
     * This method should call invokeEcho on another CalledSession
     */
-   public void callEcho()
+   public String callEcho()
    {
       try
       {
@@ -117,6 +112,9 @@
          CalledSession bean = (CalledSession)ic.lookup(Container.ENC_CTX_NAME + "/env/ejb/Caller2");
          String echo = bean.invokeEcho("Level1");
          log.info("echo, callee.invokeEcho=" + echo);
+         
+         String principal = sessionContext.getCallerPrincipal().getName();
+         return principal;
       }
       catch (Exception e)
       {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerBean2.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerBean2.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerBean2.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -28,13 +28,11 @@
 import javax.ejb.Stateless;
 import javax.naming.Context;
 import javax.naming.InitialContext;
-import javax.rmi.PortableRemoteObject;
 
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
-import javax.annotation.security.RunAs;
 
 import org.apache.log4j.Category;
 import org.jboss.annotation.ejb.RemoteBinding;
@@ -47,12 +45,12 @@
  * @version $Revision$
  */
 @Stateless(name="CallerBean2")
- at Remote(org.jboss.ejb3.test.security.CalledSession.class)
+ at Remote(CalledSession.class)
 @RemoteBinding(jndiBinding = "spec.Level2CallerBean")
 @RolesAllowed({"InternalRole"})
 @SecurityDomain("spec-test")
- at EJBs({@EJB(name="Callee", businessInterface=org.jboss.ejb3.test.security.StatelessSessionLocal.class, beanName="CalleeBean")})
-public class CallerBean2 
+ at EJBs({@EJB(name="Callee", beanInterface=org.jboss.ejb3.test.security.StatelessSessionLocal.class, beanName="CalleeBean")})
+public class CallerBean2 implements CalledSession
 {
    private static Category log = Category.getInstance(CallerBean2.class);
    @Resource  SessionContext sessionContext;
@@ -102,7 +100,7 @@
    /**
     * This method should call invokeEcho on another CalledSession
     */
-   public void callEcho()
+   public String callEcho()
    {
       try
       {
@@ -113,6 +111,9 @@
          CalledSession bean = (CalledSession)ic.lookup(Container.ENC_CTX_NAME + "/env/ejb/Caller");
          String echo = bean.invokeEcho("Level2");
          log.info("echo, callee.invokeEcho=" + echo);
+         
+         String principal = sessionContext.getCallerPrincipal().getName();
+         return principal;
       }
       catch (Exception e)
       {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerFacadeBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerFacadeBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/CallerFacadeBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,8 +22,8 @@
 package org.jboss.ejb3.test.security;
 
 import java.security.Principal;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
 import javax.ejb.EJBException;
@@ -46,7 +46,7 @@
 @RemoteBinding(jndiBinding = "spec.CallerFacadeBean-testRunAsSFSB")
 @SecurityDomain("spec-test")
 @RolesAllowed({"Echo"})
- at EJBs({@EJB(name="CalledSessionLocal", businessInterface=org.jboss.ejb3.test.security.CalledSessionLocal.class, beanName="CallerFacadeTargetSFSB")})
+ at EJBs({@EJB(name="CalledSessionLocal", beanInterface=org.jboss.ejb3.test.security.CalledSessionLocal.class, beanName="CallerFacadeTargetSFSB")})
 public class CallerFacadeBean 
 {
    private static Category log = Category.getInstance(CallerFacadeBean.class);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/FacadeTargetBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/FacadeTargetBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/FacadeTargetBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,8 +22,8 @@
 package org.jboss.ejb3.test.security;
 
 import java.security.Principal;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.ejb.EJBException;
 import javax.ejb.Local;
@@ -46,7 +46,7 @@
 @Remote(org.jboss.ejb3.test.security.CalledSession.class)
 @RemoteBinding(jndiBinding="spec.CallerFacadeTargetSFSB")
 @SecurityDomain("spec-test")
- at EJBs({@EJB(name="StatelessSessionLocal", businessInterface=org.jboss.ejb3.test.security.StatelessSessionLocal.class, beanName="CalleeBean")})
+ at EJBs({@EJB(name="StatelessSessionLocal", beanInterface=org.jboss.ejb3.test.security.StatelessSessionLocal.class, beanName="CalleeBean")})
 public class FacadeTargetBean
 {
    private static Category log = Category.getInstance(FacadeTargetBean.class);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/Level1CallerBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/Level1CallerBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/Level1CallerBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,8 +22,8 @@
 package org.jboss.ejb3.test.security;
 
 import java.security.Principal;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
 import javax.annotation.security.RunAs;
@@ -44,16 +44,16 @@
  * @version $Revision$
  */
 @Stateless(name="Level1CallerBean")
- at Remote(org.jboss.ejb3.test.security.CalledSession.class)
+ at Remote(CalledSession.class)
 @RemoteBinding(jndiBinding = "spec.Level1CallerBean")
 @RunAs("InternalRole")
 @RolesAllowed({"Echo"})
 @SecurityDomain("spec-test")
- at EJBs({@EJB(name="Caller2", businessInterface=org.jboss.ejb3.test.security.CalledSession.class, beanName="CallerBean2"),
-   @EJB(name="Callee", businessInterface=org.jboss.ejb3.test.security.StatelessSessionLocal.class, beanName="CalleeBean")})
-public class Level1CallerBean 
+ at EJBs({@EJB(name="Caller2", beanInterface=org.jboss.ejb3.test.security.CalledSession.class, beanName="CallerBean2"),
+   @EJB(name="Callee", beanInterface=org.jboss.ejb3.test.security.StatelessSessionLocal.class, beanName="CalleeBean")})
+public class Level1CallerBean implements CalledSession
 {
-   private static Category log = Category.getInstance(CallerBean.class);
+   private static Category log = Category.getInstance(Level1CallerBean.class);
    @Resource  SessionContext sessionContext;
 
    /**
@@ -102,15 +102,18 @@
    /**
     * This method should call invokeEcho on another CalledSession
     */
-   public void callEcho()
+   public String callEcho()
    {
       try
       {
          InitialContext ic = new InitialContext();
-       
+         log.info("caller principal: " + sessionContext.getCallerPrincipal().getName());
          CalledSession bean = (CalledSession)ic.lookup(Container.ENC_CTX_NAME + "/env/Caller2");
          String echo = bean.invokeEcho("Level1");
          log.info("echo, callee.invokeEcho=" + echo);
+         
+         String principal = sessionContext.getCallerPrincipal().getName();
+         return principal;
       }
       catch (Exception e)
       {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PrivateSessionBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PrivateSessionBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PrivateSessionBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,13 +23,9 @@
 
 import java.security.Principal;
 
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
-import javax.ejb.CreateException;
 import javax.ejb.Remote;
-import javax.ejb.SessionBean;
 import javax.ejb.SessionContext;
 import javax.ejb.Stateless;
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PublicSessionBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PublicSessionBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PublicSessionBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,8 +22,8 @@
 package org.jboss.ejb3.test.security;
 
 import java.security.Principal;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
 import javax.ejb.Remote;
@@ -45,7 +45,7 @@
 @RemoteBinding(jndiBinding = "spec.PublicSession")
 @SecurityDomain("spec-test")
 @RolesAllowed({"Echo"})
- at EJBs({@EJB(name="PrivateSession", businessInterface=org.jboss.ejb3.test.security.Session.class, beanName="PrivateSession")})
+ at EJBs({@EJB(name="PrivateSession", beanInterface=org.jboss.ejb3.test.security.Session.class, beanName="PrivateSession")})
 public class PublicSessionBean
 {
    @Resource SessionContext sessionContext;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PublicSessionFacade.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PublicSessionFacade.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/PublicSessionFacade.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,8 +23,8 @@
 
 import java.rmi.RemoteException;
 import java.security.Principal;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
 import javax.ejb.Remote;
@@ -45,7 +45,7 @@
 @RemoteBinding(jndiBinding = "spec.PublicSessionFacade")
 @SecurityDomain("spec-test")
 @RolesAllowed({"Echo"})
- at EJBs({@EJB(name="TargetEJB", businessInterface=org.jboss.ejb3.test.security.Session.class, beanName="PublicSession")})
+ at EJBs({@EJB(name="TargetEJB", beanInterface=org.jboss.ejb3.test.security.Session.class, beanName="PublicSession")})
 public class PublicSessionFacade
 {
    @Resource SessionContext sessionContext;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/SecurityContextBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/SecurityContextBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/SecurityContextBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -23,8 +23,8 @@
 
 import java.util.Iterator;
 import java.util.Set;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
 import javax.ejb.Remote;
@@ -45,7 +45,7 @@
 @RemoteBinding(jndiBinding = "spec.UserInRoleContextSession")
 @SecurityDomain("spec-test")
 @RolesAllowed({"Role1", "Role2"})
- at EJBs({@EJB(name="CalledBean", businessInterface=org.jboss.ejb3.test.security.SecurityContext.class, beanName="UserInRoleContextSessionTarget")})
+ at EJBs({@EJB(name="CalledBean", beanInterface=org.jboss.ejb3.test.security.SecurityContext.class, beanName="UserInRoleContextSessionTarget")})
 public class SecurityContextBean implements SecurityContext
 {
    static Logger log = Logger.getLogger(SecurityContextBean.class);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -57,7 +57,8 @@
     
     public void testGetBusinessObject()
     {
-       Object businessObject = sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+       StatelessSession ss = (StatelessSession)sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+       ss.noop();
     }
 
     @RolesAllowed({"Echo"})

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean2.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean2.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean2.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,8 +22,8 @@
 package org.jboss.ejb3.test.security;
 
 import java.security.Principal;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.annotation.security.RolesAllowed;
 import javax.ejb.EJBException;
@@ -47,7 +47,7 @@
 @RemoteBinding(jndiBinding = "spec.StatelessSession2")
 @RolesAllowed({"Echo"})
 @SecurityDomain("spec-test")
- at EJBs({@EJB(name="Session", businessInterface=org.jboss.ejb3.test.security.StatelessSession.class, beanName="StatelessSession")})
+ at EJBs({@EJB(name="Session", beanInterface=org.jboss.ejb3.test.security.StatelessSession.class, beanName="StatelessSession")})
 public class StatelessSessionBean2
 {
    private static final Logger log = Logger
@@ -57,7 +57,8 @@
     
     public void testGetBusinessObject()
     {
-       Object businessObject = sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+       StatelessSession ss = (StatelessSession)sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+       ss.noop();
     }
 
     public String echo(String arg)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean3.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean3.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean3.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -60,7 +60,8 @@
    
    public void testGetBusinessObject()
    {
-      Object businessObject = sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+      StatelessSession ss = (StatelessSession)sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+      ss.noop();
    }
 
    /** This method creates an instance of the entity bean bound under

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBeanInDomain.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBeanInDomain.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBeanInDomain.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -57,7 +57,8 @@
     
     public void testGetBusinessObject()
     {
-       Object businessObject = sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+       StatelessSession ss = (StatelessSession)sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+       ss.noop();
     }
 
     @RolesAllowed({"Echo"})

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean_test.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean_test.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/StatelessSessionBean_test.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -55,7 +55,8 @@
     
     public void testGetBusinessObject()
     {
-       Object businessObject = sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+       StatelessSession ss = (StatelessSession)sessionContext.getBusinessObject(org.jboss.ejb3.test.security.StatelessSession.class);
+       ss.noop();
     }
 
     @RolesAllowed({"Echo"})

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/TimerTesterBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/TimerTesterBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/TimerTesterBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -84,8 +84,6 @@
       log.info("PrincipalFromSecurityAssociation: "+SecurityAssociation.getPrincipal()+"."); 
       log.info("CallerPricipalFromSecurityAssociation: "+SecurityAssociation.getCallerPrincipal()+"."); 
 
-      timer.cancel();
-      
       try 
       {
          UncheckedStateless tester =

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/UnsecuredStatelessSessionBean2.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/UnsecuredStatelessSessionBean2.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/UnsecuredStatelessSessionBean2.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,8 +22,8 @@
 package org.jboss.ejb3.test.security;
 
 import java.security.Principal;
-import javax.annotation.EJB;
-import javax.annotation.EJBs;
+import javax.ejb.EJB;
+import javax.ejb.EJBs;
 import javax.annotation.Resource;
 import javax.ejb.EJBException;
 import javax.ejb.Remote;
@@ -42,7 +42,7 @@
 @Stateless
 @Remote(org.jboss.ejb3.test.security.StatelessSession.class)
 @RemoteBinding(jndiBinding = "spec.UnsecureStatelessSession2")
- at EJBs({@EJB(name="Session", businessInterface=org.jboss.ejb3.test.security.StatelessSession.class, beanName="StatelessSession")})
+ at EJBs({@EJB(name="Session", beanInterface=org.jboss.ejb3.test.security.StatelessSession.class, beanName="StatelessSession")})
 public class UnsecuredStatelessSessionBean2
 {
     org.apache.log4j.Category log = org.apache.log4j.Category.getInstance(getClass());

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/unit/EJBSpecUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/unit/EJBSpecUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/security/unit/EJBSpecUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,8 +21,19 @@
   */
 package org.jboss.ejb3.test.security.unit;
 
-import java.util.HashSet;
-import javax.ejb.EJBException;
+import junit.framework.Test;
+import org.jboss.ejb3.test.security.AppCallbackHandler;
+import org.jboss.ejb3.test.security.CalledSession;
+import org.jboss.ejb3.test.security.SecurityContext;
+import org.jboss.ejb3.test.security.SessionFacade;
+import org.jboss.ejb3.test.security.StatefulSession;
+import org.jboss.ejb3.test.security.StatelessSession;
+import org.jboss.logging.Logger;
+import org.jboss.security.SimplePrincipal;
+import org.jboss.security.auth.login.XMLLoginConfigImpl;
+import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
+import org.jboss.test.JBossTestCase;
+
 import javax.jms.Message;
 import javax.jms.Queue;
 import javax.jms.QueueConnection;
@@ -37,35 +48,25 @@
 import javax.naming.InitialContext;
 import javax.security.auth.login.Configuration;
 import javax.security.auth.login.LoginContext;
-import org.jboss.ejb3.test.security.AppCallbackHandler;
-import org.jboss.ejb3.test.security.CalledSession;
-import org.jboss.ejb3.test.security.SecurityContext;
-import org.jboss.ejb3.test.security.SessionFacade;
-import org.jboss.ejb3.test.security.StatefulSession;
-import org.jboss.ejb3.test.security.StatelessSession;
-import org.jboss.logging.Logger;
-import org.jboss.security.SimplePrincipal;
-import org.jboss.security.auth.login.XMLLoginConfigImpl;
-import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
-import org.jboss.test.JBossTestCase;
-import junit.framework.Test;
+import java.util.HashSet;
 
 
-/** Test of EJB spec conformace using the security-spec.jar
- deployment unit. These test the basic role based access model.
- 
- @author Scott.Stark at jboss.org
- @version $Revision$
+/**
+ * Test of EJB spec conformace using the security-spec.jar
+ * deployment unit. These test the basic role based access model.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
  */
 public class EJBSpecUnitTestCase
-   extends JBossTestCase
+        extends JBossTestCase
 {
    private static final Logger log = Logger.getLogger(EJBSpecUnitTestCase.class);
-   
+
    static String username = "scott";
    static char[] password = "echoman".toCharArray();
    static String QUEUE_FACTORY = "ConnectionFactory";
-   
+
    LoginContext lc;
    boolean loggedIn;
 
@@ -73,24 +74,24 @@
    {
       super(name);
    }
-   
+
    protected void tearDown() throws Exception
    {
       logout();
    }
 
-   /** Validate that the users have the expected logins and roles.
-    * 
+   /**
+    * Validate that the users have the expected logins and roles.
+    *
     * @throws Exception
-    */ 
    public void testSecurityDomain() throws Exception
    {
       log.info("+++ testSecurityDomain, domain=spec-test");
       MBeanServerConnection conn = (MBeanServerConnection) getServer();
       ObjectName secMgrName = new ObjectName("jboss.security:service=JaasSecurityManager");
       JaasSecurityManagerServiceMBean secMgr = (JaasSecurityManagerServiceMBean)
-         MBeanServerInvocationHandler.newProxyInstance(conn, secMgrName,
-         JaasSecurityManagerServiceMBean.class, false);
+              MBeanServerInvocationHandler.newProxyInstance(conn, secMgrName,
+                      JaasSecurityManagerServiceMBean.class, false);
 
       // Test the spec-test security domain
       String domain = "spec-test";
@@ -127,120 +128,125 @@
       testRole.clear();
       testRole.add(new SimplePrincipal("ProjectUser"));
       hasRole = secMgr.doesUserHaveRole(domain, user, password, testRole);
-      assertTrue("scott has ProjectUser role", hasRole);      
+      assertTrue("scott has ProjectUser role", hasRole);
 
       isValid = secMgr.isValid(domain, user, "badpass".toCharArray());
       assertTrue("badpass is an invalid password for scott", isValid == false);
    }
+    */
 
-   /** Test that:
-    1. SecureBean returns a non-null principal when getCallerPrincipal
-    is called with a security context and that this is propagated
-    to its Entity bean ref.
-    
-    2. UnsecureBean throws an IllegalStateException when getCallerPrincipal
-    is called without a security context.
-    */
+   /**
+    * Test that:
+    * 1. SecureBean returns a non-null principal when getCallerPrincipal
+    * is called with a security context and that this is propagated
+    * to its Entity bean ref.
+    * <p/>
+    * 2. UnsecureBean throws an IllegalStateException when getCallerPrincipal
+    * is called without a security context.
    public void testGetCallerPrincipal() throws Exception
-   {   
+   {
       log.debug("+++ testGetCallerPrincipal()");
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.UnsecureStatelessSession2");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.UnsecureStatelessSession2");
       log.debug("Created spec.UnsecureStatelessSession2");
-      
+
       try
       {
          // This should fail because echo calls getCallerPrincipal()
          bean.echo("Hello from nobody?");
          fail("Was able to call StatelessSession.echo");
       }
-      catch(Exception e)
+      catch (Exception e)
       {
          log.debug("echo failed as expected");
       }
-      
+
       login();
-      bean = (StatelessSession)getInitialContext().lookup("spec.StatelessSession2");
+      bean = (StatelessSession) getInitialContext().lookup("spec.StatelessSession2");
       log.debug("Created spec.StatelessSession2");
       // Test that the Entity bean sees username as its principal
       String echo = bean.echo(username);
-      log.debug("bean.echo(username) = "+echo);
+      log.debug("bean.echo(username) = " + echo);
       assertTrue("username == echo", echo.equals(username));
-      
+
       logout();
    }
-   
-   /** Test the use of getCallerPrincipal from within the ejbCreate
+    */
+
+   /**
+    * Test the use of getCallerPrincipal from within the ejbCreate
     * in a stateful session bean
-    */
    public void testStatefulCreateCaller() throws Exception
    {
       log.debug("+++ testStatefulCreateCaller");
       login();
       InitialContext jndiContext = new InitialContext();
-     
-      StatefulSession bean = (StatefulSession)jndiContext.lookup("spec.StatefulSession");
+
+      StatefulSession bean = (StatefulSession) jndiContext.lookup("spec.StatefulSession");
       // Need to invoke a method to ensure an ejbCreate call
       bean.echo("testStatefulCreateCaller");
       log.debug("Bean.echo(), ok");
 
       logout();
    }
+    */
 
    /**
     * Test that a call interacting with different security domains does not
-    * change the 
+    * change the
+    *
     * @throws Exception
-    */ 
    public void testDomainInteraction() throws Exception
    {
       logout();
       login("testDomainInteraction", "testDomainInteraction".toCharArray());
       log.debug("+++ testDomainInteraction()");
-      SecurityContext bean = (SecurityContext)getInitialContext().lookup("spec.UserInRoleContextSession");
+      SecurityContext bean = (SecurityContext) getInitialContext().lookup("spec.UserInRoleContextSession");
       log.debug("Created spec.UserInRoleContextSession");
       HashSet roles = new HashSet();
       roles.add("Role1");
       roles.add("Role2");
-      bean.testDomainInteraction(roles);   
+      bean.testDomainInteraction(roles);
    }
+    */
 
-   /** Test that the calling principal is propagated across bean calls.
-    */
+   /**
+    * Test that the calling principal is propagated across bean calls.
    public void testPrincipalPropagation() throws Exception
    {
       log.debug("+++ testPrincipalPropagation");
       logout();
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.UnsecureStatelessSession2");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.UnsecureStatelessSession2");
       log.debug("Created spec.UnsecureStatelessSession2");
-      log.debug("Bean.forward('testPrincipalPropagation') -> "+bean.forward("testPrincipalPropagation"));
+      log.debug("Bean.forward('testPrincipalPropagation') -> " + bean.forward("testPrincipalPropagation"));
    }
-   
+
    public void testMethodAccess() throws Exception
    {
       log.debug("+++ testMethodAccess");
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.StatelessSession");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.StatelessSession");
       log.debug("Created spec.StatelessSession");
-      log.debug("Bean.echo('Hello') -> "+bean.echo("Hello"));
+      log.debug("Bean.echo('Hello') -> " + bean.echo("Hello"));
 
       // This should be allowed in ejb3
       bean.noop();
    }
+    */
 
-   /** Test that the echo method is accessible by an Echo
-    role. Since the excluded() method of the StatelessSession
-    bean has been placed into the excluded set it should not
-    accessible by any user. This uses the security domain of the
-    JaasSecurityDomain service to test its use as an authentication mgr.
-    */
+   /**
+    * Test that the echo method is accessible by an Echo
+    * role. Since the excluded() method of the StatelessSession
+    * bean has been placed into the excluded set it should not
+    * accessible by any user. This uses the security domain of the
+    * JaasSecurityDomain service to test its use as an authentication mgr.
    public void testDomainMethodAccess() throws Exception
    {
       log.debug("+++ testDomainMethodAccess");
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.StatelessSessionInDomain");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.StatelessSessionInDomain");
       log.debug("Created spec.StatelessSessionInDomain");
-      log.debug("Bean.echo('testDomainMethodAccess') -> "+bean.echo("testDomainMethodAccess"));
+      log.debug("Bean.echo('testDomainMethodAccess') -> " + bean.echo("testDomainMethodAccess"));
 
       try
       {
@@ -248,96 +254,103 @@
          bean.excluded();
          fail("Was able to call StatelessSession.excluded");
       }
-      catch(Exception e)
+      catch (Exception e)
       {
          log.debug("StatelessSession.excluded failed as expected");
       }
    }
+    */
 
-   /** Test that the permissions assigned to the stateless session bean:
-    with ejb-name=org/jboss/test/security/ejb/StatelessSession_test
-    are read correctly.
-    */
+   /**
+    * Test that the permissions assigned to the stateless session bean:
+    * with ejb-name=org/jboss/test/security/ejb/StatelessSession_test
+    * are read correctly.
    public void testMethodAccess2() throws Exception
    {
       log.debug("+++ testMethodAccess2");
       login();
       InitialContext jndiContext = new InitialContext();
-      StatelessSession bean = (StatelessSession)jndiContext.lookup("spec.StatelessSession_test");
+      StatelessSession bean = (StatelessSession) jndiContext.lookup("spec.StatelessSession_test");
       log.debug("Created spec.StatelessSession_test");
-      log.debug("Bean.echo('testMethodAccess2') -> "+bean.echo("testMethodAccess2"));
+      log.debug("Bean.echo('testMethodAccess2') -> " + bean.echo("testMethodAccess2"));
    }
+    */
 
-   /** Test a user with Echo and EchoLocal roles can access the CalleeBean
-    through its local interface by calling the CallerBean and that a user
-    with only a EchoLocal cannot call the CallerBean.
+   /**
+    * Test a user with Echo and EchoLocal roles can access the CalleeBean
+    * through its local interface by calling the CallerBean and that a user
+    * with only a EchoLocal cannot call the CallerBean.
     */
    public void a1testLocalMethodAccess() throws Exception
    {
       log.debug("+++ testLocalMethodAccess");
       login();
       InitialContext jndiContext = new InitialContext();
-      CalledSession bean = (CalledSession)jndiContext.lookup("spec.CallerBean");
+      CalledSession bean = (CalledSession) jndiContext.lookup("spec.CallerBean");
       log.debug("Created spec.CallerBean");
-      log.debug("Bean.invokeEcho('testLocalMethodAccess') -> "+bean.invokeEcho("testLocalMethodAccess"));
+      log.debug("Bean.invokeEcho('testLocalMethodAccess') -> " + bean.invokeEcho("testLocalMethodAccess"));
    }
 
-   /** Test access to a bean with a mix of remote interface permissions and
+   /**
+    * Test access to a bean with a mix of remote interface permissions and
     * unchecked permissions with the unchecked permissions declared first.
+    *
     * @throws Exception
-    */ 
    public void testUncheckedRemote() throws Exception
    {
       log.debug("+++ testUncheckedRemote");
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.UncheckedSessionRemoteLast");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.UncheckedSessionRemoteLast");
       log.debug("Created spec.UncheckedSessionRemoteLast");
-      log.debug("Bean.echo('testUncheckedRemote') -> "+bean.echo("testUncheckedRemote"));
+      log.debug("Bean.echo('testUncheckedRemote') -> " + bean.echo("testUncheckedRemote"));
       try
       {
          bean.excluded();
          fail("Was able to call UncheckedSessionRemoteLast.excluded");
       }
-      catch(Exception e)
+      catch (Exception e)
       {
-         log.debug("UncheckedSessionRemoteLast.excluded failed as expected");         
+         log.debug("UncheckedSessionRemoteLast.excluded failed as expected");
       }
       logout();
    }
+    */
 
-   /** Test access to a bean with a mix of remote interface permissions and
+   /**
+    * Test access to a bean with a mix of remote interface permissions and
     * unchecked permissions with the unchecked permissions declared last.
+    *
     * @throws Exception
-    */ 
    public void testRemoteUnchecked() throws Exception
    {
       log.debug("+++ testRemoteUnchecked");
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.UncheckedSessionRemoteFirst");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.UncheckedSessionRemoteFirst");
       log.debug("Created spec.UncheckedSessionRemoteFirst");
-      log.debug("Bean.echo('testRemoteUnchecked') -> "+bean.echo("testRemoteUnchecked"));
+      log.debug("Bean.echo('testRemoteUnchecked') -> " + bean.echo("testRemoteUnchecked"));
       try
       {
          bean.excluded();
          fail("Was able to call UncheckedSessionRemoteFirst.excluded");
       }
-      catch(Exception e)
+      catch (Exception e)
       {
-         log.debug("UncheckedSessionRemoteFirst.excluded failed as expected");         
+         log.debug("UncheckedSessionRemoteFirst.excluded failed as expected");
       }
       logout();
    }
+    */
 
-   /** Test that a user with a role that has not been assigned any
-    method permissions in the ejb-jar descriptor is able to access a
-    method that has been marked as unchecked.
-    */
+   /**
+    * Test that a user with a role that has not been assigned any
+    * method permissions in the ejb-jar descriptor is able to access a
+    * method that has been marked as unchecked.
    public void testUnchecked() throws Exception
    {
       log.debug("+++ testUnchecked");
       // Login as scott to create the bean
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.StatelessSession");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.StatelessSession");
       log.debug("Created spec.StatelessSession");
       // Logout and login back in as stark to test access to the unchecked method
       logout();
@@ -346,128 +359,134 @@
       log.debug("Called Bean.unchecked()");
       logout();
    }
+    */
 
-   /** Test that a user with a valid role is able to access a
-    bean for which all methods have been marked as unchecked.
-    */
+   /**
+    * Test that a user with a valid role is able to access a
+    * bean for which all methods have been marked as unchecked.
    public void testUncheckedWithLogin() throws Exception
    {
       log.debug("+++ testUncheckedWithLogin");
       // Login as scott to see that a user with roles is allowed access
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.UncheckedSession");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.UncheckedSession");
       log.debug("Created spec.StatelessSession");
       bean.unchecked();
       log.debug("Called Bean.unchecked()");
       logout();
    }
+    */
 
-   /** Test that user scott who has the Echo role is not able to
-    access the StatelessSession2.excluded method even though
-    the Echo role has been granted access to all methods of
-    StatelessSession2 to test that the excluded-list takes
-    precendence over the method-permissions.
-    */
+   /**
+    * Test that user scott who has the Echo role is not able to
+    * access the StatelessSession2.excluded method even though
+    * the Echo role has been granted access to all methods of
+    * StatelessSession2 to test that the excluded-list takes
+    * precendence over the method-permissions.
    public void testExcluded() throws Exception
    {
       log.debug("+++ testExcluded");
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.StatelessSession2");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.StatelessSession2");
       log.debug("Created spec.StatelessSession2");
       try
       {
          bean.excluded();
          fail("Was able to call Bean.excluded()");
       }
-      catch(Exception e)
+      catch (Exception e)
       {
          log.debug("Bean.excluded() failed as expected");
          // This is what we expect
       }
       logout();
    }
-   
-   /** This method tests the following call chains:
-    1. RunAsStatelessSession.echo() -> PrivateEntity.echo()
-    2. RunAsStatelessSession.noop() -> RunAsStatelessSession.excluded()
-    3. RunAsStatelessSession.forward() -> StatelessSession.echo()
-    1. Should succeed because the run-as identity of RunAsStatelessSession
-    is valid for accessing PrivateEntity.
-    2. Should succeed because the run-as identity of RunAsStatelessSession
-    is valid for accessing RunAsStatelessSession.excluded().
-    3. Should fail because the run-as identity of RunAsStatelessSession
-    is not Echo.
     */
+
+   /**
+    * This method tests the following call chains:
+    * 1. RunAsStatelessSession.echo() -> PrivateEntity.echo()
+    * 2. RunAsStatelessSession.noop() -> RunAsStatelessSession.excluded()
+    * 3. RunAsStatelessSession.forward() -> StatelessSession.echo()
+    * 1. Should succeed because the run-as identity of RunAsStatelessSession
+    * is valid for accessing PrivateEntity.
+    * 2. Should succeed because the run-as identity of RunAsStatelessSession
+    * is valid for accessing RunAsStatelessSession.excluded().
+    * 3. Should fail because the run-as identity of RunAsStatelessSession
+    * is not Echo.
    public void testRunAs() throws Exception
    {
       log.debug("+++ testRunAs");
       login();
-      StatelessSession bean = (StatelessSession)getInitialContext().lookup("spec.RunAsStatelessSession");
+      StatelessSession bean = (StatelessSession) getInitialContext().lookup("spec.RunAsStatelessSession");
       log.debug("Created spec.RunAsStatelessSession");
-      log.debug("Bean.echo('testRunAs') -> "+bean.echo("testRunAs"));
+      log.debug("Bean.echo('testRunAs') -> " + bean.echo("testRunAs"));
       bean.noop();
       log.debug("Bean.noop(), ok");
-      
+
       try
       {
          // This should not be allowed
          bean.forward("Hello");
          fail("Was able to call RunAsStatelessSession.forward");
       }
-      catch(Exception e)
+      catch (Exception e)
       {
          log.debug("StatelessSession.forward failed as expected");
       }
-      
+
       logout();
    }
 
-   /** This method tests the following call chain:
-    Level1CallerBean.callEcho() -> Level2CallerBean.invokeEcho()
-      -> Level3CalleeBean.echo()
-    The Level1CallerBean uses a run-as of InternalRole and the Level2CallerBean
-    and Level3CalleeBean are only accessible by InternalRole.
-    */   
-   public void testDeepRunAs() throws Exception
-   {
-      log.debug("+++ testDeepRunAs");
-      login();
-     
-      CalledSession bean = (CalledSession)getInitialContext().lookup("spec.Level1CallerBean");
-      log.debug("Created spec.Level1CallerBean");
-      bean.callEcho();
-      log.debug("Bean.callEcho() ok");
-   }
-
    public void testRunAsSFSB() throws Exception
    {
       log.info("+++ testRunAsSFSB");
       login();
       log.debug("Found CallerFacadeBean-testRunAsSFSB Home");
-      CalledSession bean = (CalledSession)getInitialContext().lookup("spec.CallerFacadeBean-testRunAsSFSB");
+      CalledSession bean = (CalledSession) getInitialContext().lookup("spec.CallerFacadeBean-testRunAsSFSB");
       log.debug("Created spec.CallerFacadeBean-testRunAsSFSB");
       bean.invokeEcho("testRunAsSFSB");
       log.debug("Bean.invokeEcho() ok");
    }
+    */
 
    /**
-    * Test the run-as side-effects raised in 
+    * Test the run-as side-effects raised in
     * http://jira.jboss.com/jira/browse/JBAS-1852
-    * 
+    *
     * @throws Exception
-    */ 
    public void testJBAS1852() throws Exception
    {
       log.info("+++ testJBAS1852");
       login();
-      SessionFacade bean = (SessionFacade)getInitialContext().lookup("spec.PublicSessionFacade");
+      SessionFacade bean = (SessionFacade) getInitialContext().lookup("spec.PublicSessionFacade");
       log.debug("Created PublicSessionFacade");
       log.debug("Bean.callEcho('testJBAS1852') -> " + bean.callEcho("testJBAS1852"));
    }
+    */
 
-   /** Test that an MDB with a run-as identity is able to access secure EJBs
-    that require the identity.
+   /**
+    * This method tests the following call chain:
+    * Level1CallerBean.callEcho() -> Level2CallerBean.invokeEcho()
+    * -> Level3CalleeBean.echo()
+    * The Level1CallerBean uses a run-as of InternalRole and the Level2CallerBean
+    * and Level3CalleeBean are only accessible by InternalRole.
     */
+   public void testDeepRunAs() throws Exception
+   {
+      log.debug("+++ testDeepRunAs");
+      login();
+      CalledSession bean = (CalledSession) getInitialContext().lookup("spec.Level1CallerBean");
+      log.debug("Created spec.Level1CallerBean");
+      String principal = bean.callEcho();
+      assertEquals("scott", principal);
+      log.debug("Bean.callEcho() ok");
+   }
+
+   /**
+    * Test that an MDB with a run-as identity is able to access secure EJBs
+    * that require the identity.
+    */
    public void a1testMDBRunAs() throws Exception
    {
       log.debug("+++ testMDBRunAs");
@@ -487,23 +506,24 @@
       queueConn.start();
       QueueReceiver recv = session.createReceiver(queB);
       msg = recv.receive(5000);
-      log.debug("Recv msg: "+msg);
+      log.debug("Recv msg: " + msg);
       String info = msg.getStringProperty("reply");
       recv.close();
       session.close();
       queueConn.close();
 
-      if( info == null || info.startsWith("Failed") )
+      if (info == null || info.startsWith("Failed"))
       {
-         fail("Recevied exception reply, info="+info);
+         fail("Recevied exception reply, info=" + info);
       }
    }
 
-   /** Test that an MDB with a run-as identity is able to access secure EJBs
-    that require the identity. DeepRunAsMDB -> Level1MDBCallerBean.callEcho() ->
-      Level2CallerBean.invokeEcho() -> Level3CalleeBean.echo()
-    The MDB uses a run-as of InternalRole and the Level2CallerBean
-    and Level3CalleeBean are only accessible by InternalRole.
+   /**
+    * Test that an MDB with a run-as identity is able to access secure EJBs
+    * that require the identity. DeepRunAsMDB -> Level1MDBCallerBean.callEcho() ->
+    * Level2CallerBean.invokeEcho() -> Level3CalleeBean.echo()
+    * The MDB uses a run-as of InternalRole and the Level2CallerBean
+    * and Level3CalleeBean are only accessible by InternalRole.
     */
    public void a1testMDBDeepRunAs() throws Exception
    {
@@ -520,23 +540,24 @@
       QueueSender sender = session.createSender(queD);
       sender.send(msg);
       sender.close();
-      log.debug("Sent msg to "+queD);
+      log.debug("Sent msg to " + queD);
       queueConn.start();
       QueueReceiver recv = session.createReceiver(queB);
       msg = recv.receive(5000);
-      log.debug("Recv msg: "+msg);
+      log.debug("Recv msg: " + msg);
       String info = msg.getStringProperty("reply");
       recv.close();
       session.close();
       queueConn.close();
 
-      if( info == null || info.startsWith("Failed") )
+      if (info == null || info.startsWith("Failed"))
       {
-         fail("Recevied exception reply, info="+info);
+         fail("Recevied exception reply, info=" + info);
       }
    }
 
-   /** This method tests that the RunAsWithRolesMDB is assigned multiple roles
+   /**
+    * This method tests that the RunAsWithRolesMDB is assigned multiple roles
     * within its onMessage so that it can call into the ProjRepository session
     * bean's methods that required ProjectAdmin, CreateFolder and DeleteFolder
     * roles.
@@ -560,41 +581,44 @@
       queueConn.start();
       QueueReceiver recv = session.createReceiver(queB);
       msg = recv.receive(5000);
-      log.debug("Recv msg: "+msg);
+      log.debug("Recv msg: " + msg);
       String info = msg.getStringProperty("reply");
       recv.close();
       session.close();
       queueConn.close();
 
-      if( info == null || info.startsWith("Failed") )
+      if (info == null || info.startsWith("Failed"))
       {
-         fail("Recevied exception reply, info="+info);
+         fail("Recevied exception reply, info=" + info);
       }
    }
 
-   /** Login as user scott using the conf.name login config or
-    'spec-test' if conf.name is not defined.
+   /**
+    * Login as user scott using the conf.name login config or
+    * 'spec-test' if conf.name is not defined.
     */
    private void login() throws Exception
    {
       login(username, password);
    }
+
    private void login(String username, char[] password) throws Exception
    {
-      if( loggedIn )
+      if (loggedIn)
          return;
-      
+
       String confName = System.getProperty("conf.name", "spec-test");
       AppCallbackHandler handler = new AppCallbackHandler(username, password);
-      log.debug("Creating LoginContext("+confName+")");
+      log.debug("Creating LoginContext(" + confName + ")");
       lc = new LoginContext(confName, handler);
       lc.login();
-      log.debug("Created LoginContext, subject="+lc.getSubject());
+      log.debug("Created LoginContext, subject=" + lc.getSubject());
       loggedIn = true;
    }
+
    private void logout() throws Exception
    {
-      if( lc != null )
+      if (lc != null)
       {
          loggedIn = false;
          lc.logout();
@@ -608,7 +632,15 @@
     */
    public static Test suite() throws Exception
    {
-      Configuration.setConfiguration(new XMLLoginConfigImpl());
-      return getDeploySetup(EJBSpecUnitTestCase.class, "security.jar");
+      try
+      {
+         Configuration.setConfiguration(new XMLLoginConfigImpl());
+         return getDeploySetup(EJBSpecUnitTestCase.class, "security.jar");
+      }
+      catch (Exception e)
+   {
+      e.printStackTrace();
+      throw e;
    }
 }
+}

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/ServiceOne.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/ServiceOne.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/ServiceOne.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,15 +21,13 @@
   */
 package org.jboss.ejb3.test.service;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Remote;
 import javax.ejb.Local;
 
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
-import javax.persistence.Query;
 
-import org.jboss.annotation.ejb.Depends;
 import org.jboss.annotation.ejb.Management;
 import org.jboss.annotation.ejb.Service;
 import org.jboss.annotation.security.SecurityDomain;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/ServiceThree.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/ServiceThree.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/ServiceThree.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.service;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.InvocationContext;
 import org.jboss.annotation.ejb.Depends;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/Session.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/Session.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/Session.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,6 @@
   */
 package org.jboss.ejb3.test.service;
 
-import javax.annotation.EJB;
 import javax.ejb.Remote;
 import javax.ejb.Stateless;
 import javax.management.ObjectName;

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionService.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionService.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionServiceIF.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/service/TestResourceInjectionServiceIF.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/unit/ServiceUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/unit/ServiceUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/service/unit/ServiceUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -137,6 +137,14 @@
       assertEquals("There should only ever be one instance of the service", 1, test.getInstances());
       assertEquals("Wrong number of remote method calls", count * count, test.getRemoteMethodCalls());
    }
+   
+   public void testEJB3_587() throws Exception
+   {
+      MBeanServerConnection server = getServer();
+      ObjectName testerName = new ObjectName("jboss.ejb3.bugs:service=TestResourceInjectionService");
+      boolean success = (Boolean)server.getAttribute(testerName, "TestedSuccessful");
+      assertTrue(success);
+   }
 
    public void testServiceWithDefaultLocalJNDIName() throws Exception
    {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,8 +21,6 @@
   */
 package org.jboss.ejb3.test.servlet;
 
-import java.rmi.*;
-
 /**
  * @version <tt>$Revision$</tt>
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
@@ -31,6 +29,10 @@
 {
    String access(TestObject o);
    
+   TestObject createTestObject();
+   
+   boolean checkEqPointer(TestObject to);
+   
    WarTestObject getWarTestObject();
 }
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30Bean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30Bean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30Bean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,14 +21,18 @@
   */
 package org.jboss.ejb3.test.servlet;
 
+import javax.ejb.EJB;
+import javax.ejb.Local;
 import javax.ejb.Remote;
+import javax.ejb.LocalHome;
 import javax.ejb.RemoteHome;
 import javax.ejb.Stateless;
 
+import org.jboss.annotation.ejb.LocalBinding;
 import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.logging.Logger;
 
-import org.jboss.ejb3.test.reference21_30.Test3Home;
 import org.jboss.ejb3.test.servlet.Session30;
 
 /**
@@ -37,17 +41,36 @@
  */
 @Stateless(name="Session30")
 @Remote(Session30.class)
- at RemoteBinding(jndiBinding = "Session30")
+ at Local(Session30.class)
+ at RemoteBinding(jndiBinding = "ejb/Session30")
+ at LocalBinding(jndiBinding = "ejb/Session30Local")
 @RemoteHome(Session30Home.class)
+ at LocalHome(Session30LocalHome.class)
+ at SecurityDomain("other")
 public class Session30Bean implements Session30
 {
    private static final Logger log = Logger.getLogger(Session30Bean.class);
    
+   @EJB private StatefulRemote stateful;
+   
+   private TestObject testObject;
+   
    public String access(TestObject o)
    {
-      return "Session30";
+      return stateful.access(o);
    }
    
+   public TestObject createTestObject()
+   {
+      testObject = new TestObject();
+      return testObject;
+   }
+   
+   public boolean checkEqPointer(TestObject to)
+   {
+      return to == testObject;
+   }
+   
    public WarTestObject getWarTestObject()
    {
       return new WarTestObject();

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30LocalHome.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/Session30LocalHome.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulLocal.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulLocal.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulRemote.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/servlet/StatefulRemote.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/servlets/EJBServlet.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/servlets/EJBServlet.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/servlets/EJBServlet.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -25,6 +25,7 @@
 import java.io.PrintWriter;
 import java.net.URL;
 import javax.naming.InitialContext;
+import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
@@ -34,10 +35,13 @@
 
 import org.jboss.ejb3.Container;
 import org.jboss.ejb3.test.servlet.Session30;
+import org.jboss.ejb3.test.servlet.Session30LocalHome;
 import org.jboss.ejb3.test.servlet.Session30Home;
 import org.jboss.ejb3.test.servlet.TestObject;
 import org.jboss.ejb3.test.servlet.WarTestObject;
 import org.jboss.logging.Logger;
+import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SimplePrincipal;
 
 /** A servlet that accesses an EJB and tests whether the call argument
  is serialized.
@@ -54,18 +58,38 @@
    {
       try
       {
+         SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
+         SecurityAssociation.setCredential("password".toCharArray());
+         
          InitialContext ctx = new InitialContext();
         
-         Session30 session = (Session30)ctx.lookup("Session30");
+         Session30 session = (Session30)ctx.lookup("ejb/Session30");
          TestObject o = new TestObject();
          session.access(o);
+         o = session.createTestObject();
          
+         session = (Session30)ctx.lookup("ejb/Session30Local");
+         o = new TestObject();
+         session.access(o);
+         o = session.createTestObject();
+         
          WarTestObject warObject = (WarTestObject)session.getWarTestObject();
          
-         Session30Home home = (Session30Home)ctx.lookup("Session30Home");
+         Session30Home home = (Session30Home)ctx.lookup("ejb/Session30Home");
          session = home.create();
          session.access(o);
-       
+         
+         Session30LocalHome localHome = (Session30LocalHome)ctx.lookup("ejb/Session30LocalHome");
+         session = localHome.create();
+         session.access(o);
+         
+         home = (Session30Home)ctx.lookup("java:comp/env/ejb/remote/Session30");
+         session = home.create();
+         session.access(o);
+         
+         localHome = (Session30LocalHome)ctx.lookup("java:comp/env/ejb/local/Session30");
+         session = localHome.create();
+         session.access(o);
       }
       catch (Exception e)
       {
@@ -81,6 +105,21 @@
       out.println("</html>");
       out.close();
    }
+   
+   private void lookup(String name)
+   {
+      log.info("lookup " + name);
+      try {
+         InitialContext jndiContext = new InitialContext();
+         NamingEnumeration names = jndiContext.list(name);
+         if (names != null){
+            while (names.hasMore()){
+               log.info("  " + names.next());
+            }
+         }
+      } catch (Exception e){
+      }
+   }
 
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/unit/ServletUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/unit/ServletUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/servlet/unit/ServletUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -72,7 +72,7 @@
     */
    public static Test suite() throws Exception
    {
-      return getDeploySetup(ServletUnitTestCase.class, "servlet.war, servlet-ejbs.jar");
+      return getDeploySetup(ServletUnitTestCase.class, "servlet-client.jar, servlet-ejbs.jar, servlet.war");
    }
 
 

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/singletableinheritance/EntityTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/singletableinheritance/EntityTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/singletableinheritance/EntityTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -94,15 +94,15 @@
 
    public void test1() throws Exception
    {
-      assertEquals(manager.createQuery("from java.io.Serializable").getResultList().size(), 0);
+      assertEquals(manager.createQuery("select s from java.io.Serializable s").getResultList().size(), 0);
 
-      assertEquals(manager.createQuery("from Person").getResultList().size(), 3);
-      assertEquals(manager.createQuery("from Person p where p.class = Customer").getResultList().size(), 1);
+      assertEquals(manager.createQuery("select p from Person p").getResultList().size(), 3);
+      assertEquals(manager.createQuery("select p from Person p where p.class = Customer").getResultList().size(), 1);
    }
 
    public void test2() throws Exception
    {
-      List customers = manager.createQuery("from Customer c left join fetch c.salesperson").getResultList();
+      List customers = manager.createQuery("select c from Customer c left join fetch c.salesperson").getResultList();
       for (Iterator iter = customers.iterator(); iter.hasNext();)
       {
          Customer c = (Customer) iter.next();
@@ -113,7 +113,7 @@
 
    public void test3() throws Exception
    {
-      List customers = manager.createQuery("from Customer").getResultList();
+      List customers = manager.createQuery("select c from Customer c").getResultList();
       for (Iterator iter = customers.iterator(); iter.hasNext();)
       {
          Customer c = (Customer) iter.next();
@@ -129,10 +129,10 @@
       Person yomomma = manager.find(Person.class, new Long(ids[2]));
 
       mark.setZip("30306");
-      assertEquals(manager.createQuery("from Person p where p.zip = '30306'").getResultList().size(), 1);
+      assertEquals(manager.createQuery("select p from Person p where p.zip = '30306'").getResultList().size(), 1);
       manager.remove(mark);
       manager.remove(joe);
       manager.remove(yomomma);
-      assertTrue(manager.createQuery("from Person").getResultList().isEmpty());
+      assertTrue(manager.createQuery("select p from Person p").getResultList().isEmpty());
    }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/OverrideStatefulClusteredBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/OverrideStatefulClusteredBean.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/unit/SSLUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/unit/SSLUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/ssladvanced/unit/SSLUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -79,6 +79,14 @@
       System.out.println("*** success");
    }
    
+   public void testOverrideSSLBindings() throws Exception
+   {
+      System.out.println("*** TEST SSL Bindings");
+      InitialContext ctx = new InitialContext();
+      BusinessInterface sf = (BusinessInterface)ctx.lookup("OverrideStatefulClusteredSSL");
+      assertEquals(sf.echo("123"), "123");
+   }
+   
    public void testNormalBindings() throws Exception
    {
       System.out.println("*** TEST Normal Bindings");
@@ -98,6 +106,14 @@
       System.out.println("*** success");
    }
    
+   public void testOverrideNormalBindings() throws Exception
+   {
+      System.out.println("*** TEST Normal Bindings");
+      InitialContext ctx = new InitialContext();
+      BusinessInterface sf = (BusinessInterface)ctx.lookup("OverrideStatefulClusteredNormal");
+      assertEquals(sf.echo("123"), "123");
+   }
+   
 
    public static Test suite() throws Exception
    {

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/ConcurrentStateful.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/ConcurrentStateful.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/ConcurrentStatefulBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/ConcurrentStatefulBean.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/RemoteTx.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/RemoteTx.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -29,12 +29,8 @@
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  * @version $Revision$
  */
-public interface Stateful
+public interface Stateful extends ConcurrentStateful
 {
-   String getState();
-
-   void setState(String state);
-   
    boolean interceptorAccessed();
 
    boolean testSessionContext();
@@ -50,5 +46,7 @@
    public void testSerializedState(String state);
    
    public void removeBean();
+   
+   void testResources() throws Exception;
 
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -27,14 +27,20 @@
 import java.io.IOException;
 
 import javax.annotation.Resource;
+import javax.annotation.Resources;
 import javax.ejb.Init;
 import javax.ejb.Local;
 import javax.ejb.Remote;
 import javax.ejb.SessionContext;
 import javax.ejb.Stateful;
 import javax.ejb.PrePassivate;
+import javax.ejb.PostActivate;
 import javax.interceptor.Interceptors;
+import javax.naming.InitialContext;
+import javax.naming.NamingEnumeration;
 
+import org.jboss.ejb3.Container;
+
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.annotation.ejb.cache.simple.CacheConfig;
 import org.jboss.annotation.security.SecurityDomain;
@@ -56,13 +62,21 @@
                factory = org.jboss.ejb3.test.stateful.StatefulRemoteProxyFactory.class)
 @CacheConfig(maxSize = 1000, idleTimeoutSeconds = 1)
 @SecurityDomain("test")
+ at Resources({@Resource(name="jdbc/ds", mappedName="java:/DefaultDS")})
 public class StatefulBean implements org.jboss.ejb3.test.stateful.Stateful
 {
    private static final Logger log = Logger.getLogger(StatefulBean.class);
    
-   @Resource private SessionContext sessionContext;
+   @Resource
+   private SessionContext sessionContext;
+   
+   @Resource(mappedName="java:/DefaultDS")
+   private transient javax.sql.DataSource datasource;
+   
+   @Resource(mappedName="java:/ConnectionFactory")
+   public transient javax.jms.QueueConnectionFactory connectionFactory; 
 
-   private String state ;
+   private String state;
    private int stuff;
 
    @Interceptors(MyInterceptor.class)
@@ -81,14 +95,25 @@
    {
       return sessionContext.isCallerInRole("role");
    }
+   
+   public void testResources() throws Exception
+   {
+      datasource.toString();
+      connectionFactory.toString();
+      
+      javax.sql.DataSource ds = (javax.sql.DataSource)new InitialContext().lookup(Container.ENC_CTX_NAME + "/env/jdbc/ds");
+      ds.toString();
+   }
 
-   public String getState()
+   public String getState() throws Exception
    {
+      Thread.sleep(1000);
       return state;
    }
 
-   public void setState(String state)
+   public void setState(String state) throws Exception
    {
+      Thread.sleep(1000);
       this.state = state;
    }
 
@@ -111,9 +136,15 @@
    @PrePassivate
    public void passivate()
    {
-      System.out.println("************ passivating");
+      log.info("************ passivating");  
       wasPassivated = true;
    }
+   
+   @PostActivate
+   public void activate()
+   {
+      log.info("************ activating");
+   }
 
    private static boolean wasPassivated = false;
 

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulInvoker.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulInvoker.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulTx.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulTx.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulTx.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -29,9 +29,11 @@
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  * @version $Revision$
  */
-public interface StatefulTx
+public interface StatefulTx extends RemoteTx<State>
 {
    boolean isGlobalTransacted() throws javax.transaction.SystemException;
    
    boolean isLocalTransacted() throws javax.transaction.SystemException;
+   
+   void testTxRollback();
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulTxBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulTxBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulTxBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,14 +21,19 @@
   */
 package org.jboss.ejb3.test.stateful;
 
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.RolesAllowed;
 import javax.ejb.Remote;
 import javax.ejb.Stateful;
 import javax.ejb.TransactionAttribute;
 import javax.ejb.TransactionAttributeType;
+import javax.naming.InitialContext;
+import javax.naming.NamingEnumeration;
 import javax.transaction.TransactionManager;
 
 import org.jboss.annotation.JndiInject;
 import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.logging.Logger;
 
 /**
@@ -41,21 +46,38 @@
 @Remote(StatefulTx.class)
 @RemoteBinding(jndiBinding = "StatefulTx")
 @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) 
+ at SecurityDomain("test")
+ at DenyAll
 public class StatefulTxBean implements StatefulTx
 {
    private static final Logger log = Logger.getLogger(StatefulTxBean.class);
    
    @JndiInject(jndiName="java:/TransactionManager") private TransactionManager tm;
    
+   @RolesAllowed("allowed")
    public boolean isGlobalTransacted() throws javax.transaction.SystemException
    {
       return (tm.getTransaction() != null);
    }
    
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
+   @RolesAllowed("allowed")
    public boolean isLocalTransacted() throws javax.transaction.SystemException
    {
       return (tm.getTransaction() != null);
    }
-
+   
+   @TransactionAttribute(TransactionAttributeType.REQUIRED)
+   @RolesAllowed("allowed")
+   public void testTxRollback()
+   {
+      throw new RuntimeException("test rollback");
+   }
+   
+   @TransactionAttribute(value = TransactionAttributeType.MANDATORY)
+   @RolesAllowed("allowed")
+   public State testMandatoryTx(State o)
+   {
+      return o;
+   }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStateful.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStateful.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStateful.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,20 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.ejb3.test.stateful.nested;
-
-/**
- * Comment
- *
- * @author Ben Wang
- * @version $Revision: 45372 $
- */
-public interface NestedStateful
-{
-   int increment();   
-   void reset();
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStateful.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStateful.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStatefulBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStatefulBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.ejb3.test.stateful.nested;
-
-import org.jboss.annotation.ejb.cache.tree.CacheConfig;
-import org.jboss.logging.Logger;
-
-import javax.ejb.*;
-
-/**
- * Nested SFSB
- *
- * @author Ben Wang
- * @version $Revision: 45372 $
- */
- at Stateful(name="testNestedStateful")
- at CacheConfig(maxSize=1000, idleTimeoutSeconds=3)   // this will get evicted the second time eviction thread wakes up
-public class NestedStatefulBean implements java.io.Serializable, NestedStateful
-{
-   private Logger log = Logger.getLogger(NestedStatefulBean.class);
-   private int counter = 0;
-
-   public int increment()
-   {
-      log.debug("INCREMENT - counter: " + (counter++));
-      return counter;
-   }
-
-   public static int postActivateCalled = 0;
-   public static int prePassivateCalled = 0;
-
-   public int getPostActivate()
-   {
-      return postActivateCalled;
-   }
-
-   public int getPrePassivate()
-   {
-      return prePassivateCalled;
-   }
-
-   public void reset()
-   {
-      counter = 0;
-      NestedStatefulBean.postActivateCalled = 0;
-      NestedStatefulBean.prePassivateCalled = 0;
-   }
-
-   @PostActivate
-   public void postActivate()
-   {
-      ++NestedStatefulBean.postActivateCalled;
-      log.debug("Activate with counter: " + counter);
-   }
-
-   @PrePassivate
-   public void prePassivate()
-   {
-      ++NestedStatefulBean.prePassivateCalled;
-      log.debug("Passivate with counter: " + counter);
-   }
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStatefulBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/NestedStatefulBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulBean.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulBean.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.ejb3.test.stateful.nested;
-
-import org.jboss.annotation.ejb.cache.simple.CacheConfig;
-import org.jboss.logging.Logger;
-
-import javax.ejb.*;
-import javax.annotation.PostConstruct;
-import javax.ejb.EJB;
-
-/**
- * Parent SFSB that contains nested SFSB
- *
- * @author Ben Wang
- * @version $Revision: 45473 $
- */
- at Stateful(name="testParentStateful")
- at CacheConfig(maxSize=1000, idleTimeoutSeconds=3)   // this will get evicted the second time eviction thread wakes up
- at Remote(ParentStatefulRemote.class)
-public class ParentStatefulBean implements java.io.Serializable, ParentStatefulRemote
-{
-   private Logger log = Logger.getLogger(ParentStatefulBean.class);
-   private int counter = 0;
-
-   @EJB
-   private NestedStateful nested;
-
-   public int increment()
-   {
-      counter = nested.increment();
-
-      log.debug("INCREMENT - counter: " + counter);
-      return counter;
-   }
-
-   public static int postActivateCalled = 0;
-   public static int prePassivateCalled = 0;
-
-   /**
-    * Sleep to test
-    * @throws Exception
-    */
-   public void longRunning() throws Exception
-   {
-      log.debug("+++ longRunning() enter ");
-      Thread.sleep(10000);
-      log.debug("+++ longRunning() leave ");
-   }
-
-   public int getPostActivate()
-   {
-      return ParentStatefulBean.postActivateCalled;
-   }
-
-   public int getPrePassivate()
-   {
-      return ParentStatefulBean.prePassivateCalled;
-   }
-
-   public void reset()
-   {
-      counter = 0;
-      ParentStatefulBean.postActivateCalled = 0;
-      ParentStatefulBean.prePassivateCalled = 0;
-   }
-
-   @PostActivate
-   public void postActivate()
-   {
-      ++ParentStatefulBean.postActivateCalled;
-      log.debug("Activate with counter: " + counter);
-   }
-
-   @PrePassivate
-   public void prePassivate()
-   {
-      ++ParentStatefulBean.prePassivateCalled;
-      log.debug("Passivate with counter: " + counter);
-   }
-
-   @Remove
-   public void remove()
-   {
-   }
-
-   @PostConstruct
-   public void ejbCreate()
-   {
-   }
-
-   // Remote Interface implementation ----------------------------------------------
-
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulBean.java)

Deleted: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulRemote.java
===================================================================
--- branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulRemote.java	2006-09-12 23:04:38 UTC (rev 56789)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulRemote.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.ejb3.test.stateful.nested;
-
-/**
- * Parent sfsb interface
- *
- * @author Ben Wang
- * @version $Revision: 45372 $
- */
-public interface ParentStatefulRemote
-{
-   int increment();
-
-   int getPostActivate();
-
-   int getPrePassivate();
-
-   void reset();
-
-   void longRunning() throws Exception;
-
-   void remove();
-}

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulRemote.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/nested/ParentStatefulRemote.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/NestedBeanUnitTestCase.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/NestedBeanUnitTestCase.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -22,15 +22,17 @@
 package org.jboss.ejb3.test.stateful.unit;
 
 import javax.ejb.EJBNoSuchObjectException;
+import javax.naming.InitialContext;
 
-import javax.naming.NamingException;
-
+import org.jboss.ejb3.test.stateful.ConcurrentStateful;
 import org.jboss.ejb3.test.stateful.SmallCacheStateful;
 import org.jboss.ejb3.test.stateful.Stateful;
+import org.jboss.ejb3.test.stateful.StatefulInvoker;
 import org.jboss.ejb3.test.stateful.StatefulLocal;
 import org.jboss.ejb3.test.stateful.StatefulTx;
 import org.jboss.ejb3.test.stateful.ProxyFactoryInterface;
 import org.jboss.ejb3.test.stateful.RemoteBindingInterceptor;
+import org.jboss.ejb3.test.stateful.State;
 import org.jboss.ejb3.test.stateful.StatefulHome;
 import org.jboss.ejb3.test.stateful.ExtendedState;
 import org.jboss.ejb3.test.stateful.Tester;
@@ -149,12 +151,40 @@
       
       StatefulTx stateful = (StatefulTx)getInitialContext().lookup("StatefulTx");
       assertNotNull(stateful);
+      
       boolean transacted = stateful.isLocalTransacted();
       assertTrue(transacted);
       transacted = stateful.isGlobalTransacted();
       assertFalse(transacted);
+      
+      try
+      {
+         stateful.testTxRollback();
+         fail("should have caught exception");
+      }
+      catch (javax.ejb.EJBException e)
+      {
+      }
    }
    
+   public void testTemplateInterfaceTx() throws Exception
+   {
+      SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
+      SecurityAssociation.setCredential("password".toCharArray());
+      
+      StatefulTx stateful = (StatefulTx)getInitialContext().lookup("StatefulTx");
+      assertNotNull(stateful);
+      
+      try
+      {
+         stateful.testMandatoryTx(new State("test"));
+         fail("should have caught exception");
+      }
+      catch (javax.ejb.EJBTransactionRequiredException e)
+      {
+      }
+   }
+   
    public void testLocalSFSB() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
@@ -290,6 +320,8 @@
       assertEquals("hello world", stateful.getInterceptorState());
       
       assertFalse(stateful.testSessionContext());
+      
+      stateful.testResources();
    }
    
    public void testRemove() throws Exception
@@ -320,6 +352,79 @@
       test.testRollback1();
       test.testRollback2();
    }
+   
+   public void testConcurrentAccess() throws Exception
+   {
+      ConcurrentStateful stateful = (ConcurrentStateful) new InitialContext().lookup("ConcurrentStateful");
+      stateful.getState();
+      
+      StatefulInvoker[] invokers = new StatefulInvoker[2];
+      for (int i = 0; i < 2 ; ++i)
+      {
+         invokers[i] = new StatefulInvoker(stateful);
+      }
+      
+      for (StatefulInvoker invoker: invokers)
+      {
+         invoker.start();
+      }
+      
+      Thread.sleep(10000);
+      
+      for (StatefulInvoker invoker: invokers)
+      {
+         if (invoker.getException() != null)
+            throw invoker.getException();
+      }
+      
+      stateful = (ConcurrentStateful) new InitialContext().lookup("Stateful");
+      
+      invokers = new StatefulInvoker[2];
+      for (int i = 0; i < 2 ; ++i)
+      {
+         invokers[i] = new StatefulInvoker(stateful);
+      }
+      
+      for (StatefulInvoker invoker: invokers)
+      {
+         invoker.start();
+      }
+      
+      Thread.sleep(10000);
+      
+      boolean wasConcurrentException = false;
+      for (StatefulInvoker invoker: invokers)
+      {
+         if (invoker.getException() != null)
+            wasConcurrentException = true;
+      }
+      
+      assertTrue(wasConcurrentException);
+   }
+   
+   public void testOverrideConcurrentAccess() throws Exception
+   {
+      ConcurrentStateful stateful = (ConcurrentStateful) new InitialContext().lookup("OverrideConcurrentStateful");
+      stateful.getState();
+      
+      StatefulInvoker[] invokers = new StatefulInvoker[2];
+      for (int i = 0; i < 2 ; ++i)
+      {
+         invokers[i] = new StatefulInvoker(stateful);
+      }
+      
+      for (StatefulInvoker invoker: invokers)
+      {
+         invoker.start();
+      }
+      
+      Thread.sleep(5000);
+      
+      for (int i = 1; i < 2 ; ++i)
+      {
+         assertNotNull(invokers[i].getException());
+      }
+   }
 
    public static Test suite() throws Exception
    {

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/AnonymousStatelessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/AnonymousStatelessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/AnonymousStatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.stateless;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import javax.ejb.Remote;
 import javax.naming.NamingException;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/CheckedStatelessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/CheckedStatelessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/CheckedStatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -28,6 +28,7 @@
 import javax.ejb.Remote;
 import javax.naming.NamingException;
 import javax.annotation.security.RolesAllowed;
+import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.logging.Logger;
 import org.jboss.annotation.security.SecurityDomain;
@@ -39,6 +40,7 @@
 @Stateless
 @SecurityDomain("other")
 @Remote(CheckedStateless.class)
+ at RemoteBinding(jndiBinding="CheckedStatelessBean/remote")
 public class CheckedStatelessBean implements CheckedStateless
 {
    private static final Logger log = Logger.getLogger(CheckedStatelessBean.class);

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/UnsecuredStatelessBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/UnsecuredStatelessBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/UnsecuredStatelessBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,10 +21,7 @@
   */
 package org.jboss.ejb3.test.stateless;
 
-import javax.annotation.EJB;
-import javax.annotation.Resource;
-import javax.annotation.security.RolesAllowed;
-import javax.ejb.SessionContext;
+import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import javax.ejb.Remote;
 import javax.naming.NamingException;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/unit/StatelessTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/unit/StatelessTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/stateless/unit/StatelessTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -65,6 +65,24 @@
       assertEquals("somebody", principal);
    }
    
+   public void testStatelessLocal() throws Exception
+   {
+      SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
+      SecurityAssociation.setCredential("password".toCharArray());
+       
+      try
+      {
+         RunAsStatelessLocal runAs = (RunAsStatelessLocal) getInitialContext().lookup("RunAsStatelessEjbName/local");
+         assertNotNull(runAs);
+         runAs.method(1);
+         fail("EJBException should be thrown");
+      }
+      catch (javax.ejb.EJBException e)
+      {
+         log.info("Caught EJBException " + e.getMessage());
+      }
+   }
+
    public void testRunAs() throws Exception
    {
       CheckedStateless checked = (CheckedStateless)getInitialContext().lookup("CheckedStatelessBean/remote");

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/BogusPool.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/strictpool/BogusPool.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/Counter.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/strictpool/Counter.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/CounterBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/strictpool/CounterBean.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/MDBInvoker.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/MDBInvoker.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/MDBInvoker.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -72,8 +72,8 @@
          }
          else
          {
-            TextMessage tm = (TextMessage) reply;
-            System.out.println(tm.getText());
+            Message tm = (Message) reply;
+            System.out.println(tm);
          }
          sender.close();
          receiver.close();

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/OverrideStrictlyPooledMDB.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/strictpool/OverrideStrictlyPooledMDB.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/OverrideStrictlyPooledSessionBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/strictpool/OverrideStrictlyPooledSessionBean.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/StrictlyPooledMDB.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/StrictlyPooledMDB.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/StrictlyPooledMDB.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -36,6 +36,7 @@
 import javax.jms.QueueSession;
 import javax.jms.TextMessage;
 import javax.naming.InitialContext;
+
 import org.jboss.annotation.ejb.PoolClass;
 import org.jboss.annotation.ejb.PoolClass;
 
@@ -49,8 +50,8 @@
         @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
         @ActivationConfigProperty(propertyName="destination", propertyValue="queue/queueA"),
         @ActivationConfigProperty(propertyName="maxMessages", propertyValue="10"),
-        @ActivationConfigProperty(propertyName="minPoolSize", propertyValue="10"),
-        @ActivationConfigProperty(propertyName="maxPoolSize", propertyValue="10")
+        @ActivationConfigProperty(propertyName="minSession", propertyValue="10"),
+        @ActivationConfigProperty(propertyName="maxSession", propertyValue="10")
         })
 @PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=StrictlyPooledMDB.maxActiveCount, timeout=10000)
 public class StrictlyPooledMDB implements MessageListener

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/StrictlyPooledMDB2.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/strictpool/StrictlyPooledMDB2.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/unit/StrictPoolUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/unit/StrictPoolUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/strictpool/unit/StrictPoolUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,14 +21,12 @@
   */
 package org.jboss.ejb3.test.strictpool.unit;
 
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSession;
+import javax.jms.*;
 import javax.naming.InitialContext;
 import org.jboss.ejb3.test.strictpool.MDBInvoker;
 import org.jboss.ejb3.test.strictpool.SessionInvoker;
 import org.jboss.ejb3.test.strictpool.StrictlyPooledSession;
+import org.jboss.ejb3.test.strictpool.Counter;
 import org.jboss.test.JBossTestCase;
 import EDU.oswego.cs.dl.util.concurrent.CountDown;
 import junit.framework.Test;
@@ -51,7 +49,6 @@
    {
       super(name);
    }
-
    public void testSession() throws Exception
    {
       System.out.println("*** testSession");
@@ -113,7 +110,28 @@
          }
       }
    }
+   public void testPoolTimeout() throws Exception
+   {
+      InitialContext ctx = new InitialContext();
+      ConnectionFactory factory = (ConnectionFactory)ctx.lookup("ConnectionFactory");
+      Connection conn = factory.createConnection();
+      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+      Queue queueC = (Queue)ctx.lookup("queue/queueC");
+      conn.start();
+      MessageProducer sender = session.createProducer(queueC);
+      TextMessage msg = session.createTextMessage("hello world");
+      msg.setIntProperty("JMS_JBOSS_REDELIVERY_LIMIT", 20);
+      sender.send(msg);
+      TextMessage msg2 = session.createTextMessage("hello world");
+      msg2.setIntProperty("JMS_JBOSS_REDELIVERY_LIMIT", 20);
+      sender.send(msg2);
 
+      Thread.sleep(5000);
+      Counter counter = (Counter)ctx.lookup("CounterBean/remote");
+      assertEquals(2, counter.getCount());
+
+   }
+
    public static Test suite() throws Exception
    {
       return getDeploySetup(StrictPoolUnitTestCase.class, "strictpool_mdbtest-service.xml, strictpool-test.jar");

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/tableperinheritance/EntityTestBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/tableperinheritance/EntityTestBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/tableperinheritance/EntityTestBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -100,14 +100,14 @@
 
    public void test1() throws Exception
    {
-      assertEquals(manager.createQuery("from java.io.Serializable").getResultList().size(), 0);
+      assertEquals(manager.createQuery("select s from java.io.Serializable s").getResultList().size(), 0);
 
-      assertEquals(manager.createQuery("from Person").getResultList().size(), 3);
+      assertEquals(manager.createQuery("select p from Person p").getResultList().size(), 3);
    }
 
    public void test2() throws Exception
    {
-      List customers = manager.createQuery("from Customer c left join fetch c.salesperson").getResultList();
+      List customers = manager.createQuery("select c from Customer c left join fetch c.salesperson").getResultList();
       for (Iterator iter = customers.iterator(); iter.hasNext();)
       {
          Customer c = (Customer) iter.next();
@@ -118,7 +118,7 @@
 
    public void test3() throws Exception
    {
-      List customers = manager.createQuery("from Customer").getResultList();
+      List customers = manager.createQuery("select c from Customer c").getResultList();
       for (Iterator iter = customers.iterator(); iter.hasNext();)
       {
          Customer c = (Customer) iter.next();
@@ -134,10 +134,10 @@
       Person yomomma = manager.find(Person.class, new Long(ids[2]));
 
       mark.setZip("30306");
-      assertEquals(manager.createQuery("from Person p where p.zip = '30306'").getResultList().size(), 1);
+      assertEquals(manager.createQuery("select p from Person p where p.zip = '30306'").getResultList().size(), 1);
       manager.remove(mark);
       manager.remove(joe);
       manager.remove(yomomma);
-      assertTrue(manager.createQuery("from Person").getResultList().isEmpty());
+      assertTrue(manager.createQuery("select p from Person p").getResultList().isEmpty());
    }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/BaseTimerTesterBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/timer/BaseTimerTesterBean.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTester.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTester.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTester.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,8 +21,10 @@
   */
 package org.jboss.ejb3.test.timer;
 
+import java.util.Date;
 
 
+
 /**
  * Comment
  *
@@ -31,11 +33,17 @@
  */
 public interface TimerTester
 {
+   void checkMandatoryTransaction();
+   
    void startTimer(long pPeriod);
 
    boolean isTimerCalled();
 
    void accessTimer();
    
+   void setTimer(Date expiration);
+   
+   void startTimerAndRollback(long pPeriod);
+   
    void startTimerViaEJBContext(long pPeriod);
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,14 +21,10 @@
   */
 package org.jboss.ejb3.test.timer;
 
-import java.util.Date;
-import javax.annotation.Resource;
 import javax.ejb.Remote;
-import javax.ejb.SessionContext;
 import javax.ejb.Stateless;
 import javax.ejb.Timeout;
 import javax.ejb.Timer;
-import javax.ejb.TimerService;
 
 import org.jboss.logging.Logger;
 
@@ -40,51 +36,15 @@
  */
 @Stateless
 @Remote(TimerTester.class)
-public class TimerTesterBean implements TimerTester
+public class TimerTesterBean extends BaseTimerTesterBean implements TimerTester
 {
    private static final Logger log = Logger.getLogger(TimerTesterBean.class);
    
-   public static boolean timerCalled = false;
-
-   private @Resource TimerService timerService;
-
-   private @Resource SessionContext ctx;
-   
-   private Timer timer;
-
-   public void startTimer(long pPeriod)
-   {
-      timerCalled = false;
-      System.out.println("************ startTimer");
-      timer = timerService.createTimer(new Date(new Date().getTime() + pPeriod), "TimerSLSBean");
-      
-   }
-
-   public void startTimerViaEJBContext(long pPeriod)
-   {
-      timerCalled = false;
-      System.out.println("************ startTimerViaEJBContext");
-      timer = ctx.getTimerService().createTimer(new Date(new Date().getTime() + pPeriod), "TimerSLSBean");
-   }
-
-   public void accessTimer()
-   {
-      //Access timer to make sure we have pushed the AllowedOperationsAssociation
-      timer.getTimeRemaining();
-      timer.getHandle();
-      timer.getInfo();
-   }
-   
-   public boolean isTimerCalled()
-   {
-      return timerCalled;
-   }
-
    @Timeout
    public void timeoutHandler(Timer timer)
    {
       log.info("EJB TIMEOUT!!!!");
       timerCalled = true;
-      timer.cancel();
+      //timer.cancel();
    }
 }

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterBean21.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterBean21.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterBean21.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,13 +21,10 @@
   */
 package org.jboss.ejb3.test.timer;
 
-import java.util.Date;
-import javax.annotation.Resource;
 import javax.ejb.Remote;
-import javax.ejb.SessionContext;
 import javax.ejb.Stateless;
+import javax.ejb.TimedObject;
 import javax.ejb.Timer;
-import javax.ejb.TimerService;
 
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.logging.Logger;
@@ -41,50 +38,14 @@
 @Stateless
 @RemoteBinding(jndiBinding="TimerTesterBean21")
 @Remote(TimerTester.class)
-public class TimerTesterBean21 implements TimerTester, javax.ejb.TimedObject
+public class TimerTesterBean21 extends BaseTimerTesterBean implements TimerTester, TimedObject
 {
    private static final Logger log = Logger.getLogger(TimerTesterBean21.class);
    
-   public static boolean timerCalled = false;
-
-   private @Resource TimerService timerService;
-
-   private @Resource SessionContext ctx;
-   
-   private Timer timer;
-
-   public void startTimer(long pPeriod)
-   {
-      timerCalled = false;
-      System.out.println("************ startTimer");
-      timer = timerService.createTimer(new Date(new Date().getTime() + pPeriod), "TimerSLSBean");
-      
-   }
-
-   public void startTimerViaEJBContext(long pPeriod)
-   {
-      timerCalled = false;
-      System.out.println("************ startTimerViaEJBContext");
-      timer = ctx.getTimerService().createTimer(new Date(new Date().getTime() + pPeriod), "TimerSLSBean");
-   }
-
-   public void accessTimer()
-   {
-      //Access timer to make sure we have pushed the AllowedOperationsAssociation
-      timer.getTimeRemaining();
-      timer.getHandle();
-      timer.getInfo();
-   }
-   
-   public boolean isTimerCalled()
-   {
-      return timerCalled;
-   }
-
    public void ejbTimeout(Timer timer)
    {
       log.info("EJB TIMEOUT!!!!");
       timerCalled = true;
-      timer.cancel();
+      //timer.cancel();
    }
 }

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterService.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/timer/TimerTesterService.java)

Copied: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/TransactionalTimerTesterBean.java (from rev 56789, branches/Branch_4_0/ejb3/src/test/org/jboss/ejb3/test/timer/TransactionalTimerTesterBean.java)

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/unit/RemoteUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/unit/RemoteUnitTestCase.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timer/unit/RemoteUnitTestCase.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,6 +21,8 @@
   */
 package org.jboss.ejb3.test.timer.unit;
 
+import java.util.Date;
+
 import org.jboss.ejb3.test.timer.TimerTester;
 import org.jboss.test.JBossTestCase;
 import junit.framework.Test;
@@ -47,6 +49,44 @@
 
    }
 
+   public void testNewTransaction() throws Exception
+   {
+      TimerTester test = (TimerTester) getInitialContext().lookup("TransactionalTimerTesterBean/remote");
+      test.startTimer(5000);
+      test.accessTimer();
+      Thread.sleep(6000);
+      assertTrue(test.isTimerCalled());
+   }
+   
+   // EJBTHREE-630
+   public void testPersistence() throws Exception
+   {
+      TimerTester test = (TimerTester) getInitialContext().lookup("TimerTesterService/remote");
+      long when = System.currentTimeMillis() + 5000;
+      test.setTimer(new Date(when));
+      
+      redeploy("timer-test.jar");
+      
+      test = (TimerTester) getInitialContext().lookup("TimerTesterService/remote");
+      long wait = 1000 + (when - System.currentTimeMillis());
+      if(wait > 0)
+         Thread.sleep(wait);
+      assertTrue(test.isTimerCalled());
+   }
+   
+   public void testService() throws Exception
+   {
+      TimerTester test = (TimerTester) getInitialContext().lookup("TimerTesterService/remote");
+      test.startTimer(5000);
+      test.accessTimer();
+      Thread.sleep(6000);
+      assertTrue(test.isTimerCalled());
+      test.startTimerViaEJBContext(5000);
+      test.accessTimer();
+      Thread.sleep(6000);
+      assertTrue(test.isTimerCalled());
+   }
+   
    public void testSimple() throws Exception
    {
       TimerTester test = (TimerTester) this.getInitialContext().lookup("TimerTesterBean/remote");
@@ -73,6 +113,14 @@
       assertTrue(test.isTimerCalled());
    }
 
+   public void testRollback() throws Exception
+   {
+      TimerTester test = (TimerTester) this.getInitialContext().lookup("TimerTesterBean/remote");
+      test.startTimerAndRollback(5000);
+      Thread.sleep(6000);
+      assertFalse(test.isTimerCalled());
+   }
+   
    public static Test suite() throws Exception
    {
       return getDeploySetup(RemoteUnitTestCase.class, "timer-test.jar");

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timerdependency/InitTimer.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timerdependency/InitTimer.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/timerdependency/InitTimer.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -21,7 +21,7 @@
   */
 package org.jboss.ejb3.test.timerdependency;
 
-import javax.annotation.EJB;
+import javax.ejb.EJB;
 
 import org.jboss.annotation.ejb.Management;
 import org.jboss.annotation.ejb.Service;

Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/wls/embeddedwar/CustomerDAOBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/wls/embeddedwar/CustomerDAOBean.java	2006-09-14 00:05:49 UTC (rev 56822)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/ejb3/src/test/org/jboss/ejb3/test/wls/embeddedwar/CustomerDAOBean.java	2006-09-14 00:06:53 UTC (rev 56823)
@@ -41,8 +41,6 @@
       try 
       {
          java.lang.reflect.Method[] methods = EntityManager.class.getDeclaredMethods();
-         for (int i = 0 ; i < methods.length ; ++i)
-            System.out.println("!! method " + i + " " + methods[i].getName() + " " + methods[i].getParameterTypes().length);
          Customer cust = new Customer();
          cust.setName(name);
          em.persist(cust);




More information about the jboss-cvs-commits mailing list