[seam-commits] Seam SVN: r14388 - in branches/community/Seam_2_3: jboss-seam/src/main/java/org/jboss/seam/captcha and 80 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Mar 14 13:34:52 EDT 2012


Author: manaRH
Date: 2012-03-14 13:34:37 -0400 (Wed, 14 Mar 2012)
New Revision: 14388

Added:
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/ClassValidator.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java
Removed:
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/antlr/org/jboss/seam/text/seam-text.g
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Component.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ComponentType.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ConcurrentRequestTimeoutException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/CyclicDependencyException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Entity.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Instance.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/InstantiationException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Model.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Namespace.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/NoConversationException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/RequiredException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ScopeType.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Seam.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/ApplicationException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/AutoCreate.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Begin.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Conversational.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Create.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/DataBinderClass.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/DataSelectorClass.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Destroy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/End.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Factory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/FlushModeType.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Import.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/In.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Install.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/JndiName.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Logger.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Name.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Namespace.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Observer.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Out.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Outcome.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/PerNestedConversation.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/RaiseEvent.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/ReadOnly.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Role.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Roles.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Scope.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Startup.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Synchronized.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/TransactionPropagationType.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Transactional.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Unwrap.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Asynchronous.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Duration.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Expiration.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/FinalExpiration.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/IntervalCron.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/IntervalDuration.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/BeginTask.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/CreateProcess.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/EndTask.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/ResumeProcess.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/StartTask.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/Transition.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModel.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModelSelection.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModelSelectionIndex.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/HttpError.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/Redirect.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/Converter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/Validator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/AroundInvoke.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/BypassInterceptors.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/Interceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/InterceptorType.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/Interceptors.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PostActivate.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PostConstruct.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PrePassivate.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Admin.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Delete.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Insert.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/PermissionCheck.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Read.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Restrict.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/RoleCheck.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/TokenUsername.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/TokenValue.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Update.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/PasswordSalt.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleConditional.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleGroups.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleName.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserEnabled.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserFirstName.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserLastName.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserPassword.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserPrincipal.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserRoles.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Identifier.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Permission.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionAction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionDiscriminator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionRole.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionTarget.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionUser.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Permissions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/Filter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/RequestParameter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AbstractDispatcher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Asynchronous.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousEvent.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousExceptionHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousInvocation.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/CronSchedule.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Dispatcher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/LocalTimerServiceDispatcher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/QuartzDispatcher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/QuartzTriggerHandle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Schedule.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/ThreadPoolDispatcher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TimerSchedule.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TimerServiceDispatcher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TransactionCompletionEvent.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TransactionSuccessEvent.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Actor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/BusinessProcess.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/BusinessProcessInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Jbpm.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/JbpmELResolver.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ManagedJbpmContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PageflowDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PageflowParser.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PooledTask.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PooledTaskInstanceList.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ProcessInstance.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ProcessInstanceFinder.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/SeamExpressionEvaluator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/SeamUserCodeInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstance.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstanceList.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstanceListForType.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstancePriorityList.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Transition.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/jbpm.pageflow.cfg.xml
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/AbstractJBossCacheProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/CacheProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/EhCacheProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossCache2Provider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossCacheProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossPojoCacheProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/Captcha.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaImage.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaResponse.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaResponseValidator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/AbstractEntityBeanCollection.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ApplicationContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/BasicContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/BusinessProcessContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Context.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Contexts.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBean.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanList.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanMap.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanSet.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EventContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/FacesLifecycle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Lifecycle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/PageContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/PassivatedEntity.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/RemotingLifecycle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ServerConversationContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ServletLifecycle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/SessionContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/TestLifecycle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Wrapper.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/AbstractMutable.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/BijectionInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ClassValidator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Contexts.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Conversation.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationEntries.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationEntry.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationIdGenerator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationList.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationPropagation.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationStack.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationalInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/EventInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Events.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Expressions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Init.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Interpolator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Locale.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/LockTimeoutException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Manager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/MethodContextInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Mutable.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/PropagationType.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ResourceBundle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ResourceLoader.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/SeamResourceBundle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/SynchronizationInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Validators.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataBinder.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelBinder.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelIndexSelector.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelSelector.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataSelector.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractClassDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractScanner.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AnnotationDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDeploymentMetadata.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDescriptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ComponentDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ComponentsXmlDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentMetadata.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DotComponentDotXmlDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DotPageDotXmlDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/FileDescriptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ForwardingAbstractScanner.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ForwardingDeploymentStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/GroovyDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/GroovyHotDeploymentStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/HotDeploymentStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/NamespaceDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/Scanner.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/SeamDeploymentProperties.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/StandardDeploymentStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/TimestampCheckForwardingDeploymentStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/TimestampScanner.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/URLScanner.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/WarRootDeploymentStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/ByteArrayDocumentData.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentData.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStore.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStorePhaseListener.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStoreServlet.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/Decision.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsActionHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsAssignmentHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsDecisionHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/ManagedWorkingMemory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/RuleAgent.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/RuleBase.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/SeamGlobalResolver.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/SpreadsheetCompiler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/RemoveInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/SeamInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/EL.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/JBossELReferenceCache.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/OptionalParameterMethodExpression.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamELResolver.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamExpressionFactory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamFunctionMapper.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/AnnotationErrorHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/AnnotationRedirectHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ConfigErrorHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ConfigRedirectHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/DebugPageHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ErrorHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ExceptionHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/Exceptions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/RedirectHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/DataModels.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/DateConverter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesExpressions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesManager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesMessages.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesPage.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/HttpError.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/IsUserInRole.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Navigator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Parameters.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Redirect.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/RedirectException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Renderer.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/ResourceLoader.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Selector.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Switcher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/UiComponent.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/UserPrincipal.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Validation.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/BusinessProcessController.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Controller.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentDate.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentDatetime.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentTime.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityController.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityHome.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityIdentifier.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityNotFoundException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityQuery.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityController.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityHome.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityIdentifier.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityQuery.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Home.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Identifier.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/MutableController.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/MutableEntityController.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/PersistenceController.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Query.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/ComponentDescriptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/DependencyManager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/DeploymentDescriptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/EjbDescriptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/EjbEntityDescriptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/FactoryDescriptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/Initialization.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/NamespaceDescriptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/NamespacePackageResolver.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/AbstractInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/ClientSideInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EE5SeamInvocationContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EJBInvocationContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EventType.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/Interceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/InvocationContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/OptimizedInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/Proxy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/RootInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/RootInvocationContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/SeamInvocationContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/SessionBeanInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/Locale.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/LocaleConfig.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/LocaleSelector.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/Messages.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/StatusMessage.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/StatusMessages.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZone.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZoneSelector.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZoneWrapper.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZones.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/ManagedQueueSender.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/ManagedTopicPublisher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/QueueConnection.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/QueueSession.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/TopicConnection.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/TopicSession.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/AgentID.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/DefaultExceptionHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/JBossClusterMonitor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/JMXInvocationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/MBeanProxy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/MBeanProxyCreationException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/Mbean.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/ProxyContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/ProxyExceptionHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/RuntimeProxyException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/ArrayDataModel.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/DelegatingFacesContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/ListDataModel.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/MapDataModel.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplication.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplicationFactory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamNavigationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamStateManager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SetDataModel.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/UnifiedELMethodBinding.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/UnifiedELValueBinding.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/JDKProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Log.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Log4JProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/LogImpl.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/LogProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Logging.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/MailSession.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DBUnitSeamTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DelegatingServletInputStream.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DelegatingServletOutputStream.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EmbeddedBootstrap.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EnhancedMockHttpServletRequest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EnhancedMockHttpServletResponse.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/HeaderValueHolder.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplication.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplicationFactory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockExternalContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFacesContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFacesContextFactory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFilterConfig.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpServletRequest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpServletResponse.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpSession.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLifecycle.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLifecycleFactory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLoginModule.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockNavigationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockRenderKit.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockResponseStateManager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockResponseWriter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockSecureEntity.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockServletContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockStateManager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockTransport.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockViewHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ResourceRequestEnvironment.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/SeamTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Action.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ConversationControl.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ConversationIdParameter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Header.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Input.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/NaturalConversationIdParameter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Navigation.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/NavigationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Output.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Page.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Pages.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Param.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ProcessControl.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Put.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/RedirectNavigationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/RenderNavigationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Rule.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/SafeActions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/SyntheticConversationIdParameter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/TaskControl.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/Page.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/Pageflow.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/AbstractPersistenceProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerFactory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerInvocationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerProxy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerProxyInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/Filter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/FullTextEntityManagerProxy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/FullTextHibernateSessionProxy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernatePersistenceProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionFactory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionProxy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedEntityInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedEntityWrapper.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedHibernateSession.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceContextManager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceContexts.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceProvider.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/QueryParser.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/AuthorizationException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Configuration.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Credentials.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntityAction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntityPermissionChecker.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntitySecurityListener.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/FacesSecurityEvents.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/HibernateSecurityInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Identity.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/JpaTokenStore.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/NotLoggedInException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/RememberMe.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Role.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/RunAsOperation.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SecurityFunctions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SecurityInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SimpleGroup.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SimplePrincipal.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/TokenStore.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/BinTools.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/MacBasedPRF.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Engine.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Formatter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2HexFormatter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Parameters.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PRF.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestAuthenticator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestRequest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestUtils.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestValidationException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityManagementException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityManager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityStore.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/LdapIdentityStore.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/NoSuchRoleException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/NoSuchUserException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/PasswordHash.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/RoleAction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/RoleSearch.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/UserAction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/UserSearch.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenId.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenIdPhaseListener.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenIdPrincipal.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/ClassIdentifierStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/EntityIdentifierStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/IdentifierPolicy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/IdentifierStrategy.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/Permission.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionCheck.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionManager.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionMapper.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionMetadata.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionResolver.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionStore.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/ResolverChain.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/RoleCheck.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/action/PermissionSearch.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ContextualHttpServletRequest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ResourceServlet.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamCharacterEncodingFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamExceptionFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamListener.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamRedirectFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamResourceServlet.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamServletFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletApplicationMap.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletRequestMap.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletRequestSessionMap.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletSessionMap.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/Theme.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/ThemeSelector.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/AbstractUserTransaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/CMTTransaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EjbSynchronizations.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EjbTransaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EntityTransaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/FacesTransactionEvents.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/HibernateTransaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/LocalEjbSynchronizations.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/NoTransaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/RollbackInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/SeSynchronizations.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/SynchronizationRegistry.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/Synchronizations.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/Transaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/TransactionInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/UTTransaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/UserTransaction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/AnnotatedBeanProperty.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Base64.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Conversions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/DTDEntityResolver.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/DelegatingInvocationHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EJB.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EnumerationEnumeration.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EnumerationIterator.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Exceptions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Faces.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/FacesResources.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Hex.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Id.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/IteratorEnumeration.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/JSF.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Naming.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/ProxyFactory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/RandomStringUtils.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Reflections.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Resources.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/SortItem.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Sorter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Strings.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/TypedBeanProperty.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Work.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/XML.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AbstractFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AbstractResource.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Ajax4jsfFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AuthenticationFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/CacheControlFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/CharacterEncodingFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ConditionalAbstractResource.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ContextFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ExceptionFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/FileUploadException.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/FilterConfigWrapper.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/HotDeployFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IdentityFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IdentityRequestWrapper.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IncomingPattern.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IsUserInRole.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Locale.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/LoggingFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartRequest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartRequestImpl.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/OutgoingPattern.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Parameters.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Pattern.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RedirectFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Rewrite.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RewriteFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RewritingResponse.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/SeamFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ServletContexts.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ServletMapping.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Session.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/UserPrincipal.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/WicketFilter.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/SOAPRequestHandler.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/WSSecurityInterceptor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/package-info.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/javadoc/jdstyle.css
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/components.xml
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/faces-config.xml
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/javamail.providers
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/seam-deployment.properties
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/async-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/blacklist.properties
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/bpm-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/bpm/jbpm.pageflow.cfg.xml
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/cache-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/components-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/core-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/document-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/drools-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/framework-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/international-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/jms-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/mail-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/navigation-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/pageflow-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/pages-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/persistence-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/remoting-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/security-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/theme-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/transaction-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/ui-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/web-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/wicket-2.3.xsd
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/META-INF/pagesForPageActionsTest.xml
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/META-INF/seam.properties
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/AbstractPageTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Action.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Bar.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/BrokenAction.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ComponentTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ContextTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CoreTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CyclicBar.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CyclicFoo.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/DependencyTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Ejb.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/EjbBean.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ExpressionsTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Factory.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Foo.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/FooBar.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/HomeTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InitializationTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InterceptorTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InterpolatorTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InvocationControl.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MailTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MockContainerTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MockInvocationContext.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageActionsTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageConversationControlTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageDescriptorTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageParamTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageflowConfigurationTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageflowTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PasswordHashTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/People.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Person.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/QueryTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/SeamTextTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/ActorTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/JbpmTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/TaskListTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/ConfigurableComponent.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/MyEntityHome.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/PrimaryColor.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/TestActions.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/entity/SimpleEntity.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/testng.xml
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/ConditionalRequestTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/IdentityRequestWrapperTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/MultipartRequestTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/RewriteTest.java
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/META-INF/pagesForPageActionsTest.xml
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/META-INF/seam.properties
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/SeamTextTest.txt
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/component/ConfigurableComponent.component.xml
   branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/component/MyEntityHome.component.xml
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mail/Meldware.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mail/MeldwareUser.java
Modified:
   branches/community/Seam_2_3/jboss-seam/pom.xml
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/captcha/CaptchaResponse.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/captcha/CaptchaResponseValidator.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/contexts/PageContext.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/SeamResourceBundle.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/Validators.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/framework/Controller.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/framework/Query.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/international/StatusMessages.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/DelegatingFacesContext.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamApplication.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockApplication.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockFacesContext.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation/Param.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernatePersistenceProvider.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionFactory.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionProxy.java
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/transaction/Transaction.java
   branches/community/Seam_2_3/jboss-seam/src/main/resources/META-INF/faces-config.xml
   branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/Foo.java
   branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/MailTest.java
   branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/PageParamTest.java
   branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java
   branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/QueryTest.java
Log:
renamed jboss-seam-jsf2 jboss-seam

Modified: branches/community/Seam_2_3/jboss-seam/pom.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam/pom.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/pom.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -8,11 +8,11 @@
 		<version>2.3.0.Beta1-SNAPSHOT</version>
 		<relativePath>../jboss-seam-parent/pom.xml</relativePath>
 	</parent>
-	<groupId>org.jboss.seam</groupId>
-	<artifactId>jboss-seam</artifactId>
+
+	<artifactId>jboss-seam-jsf2</artifactId>
 	<packaging>ejb</packaging>
-	<name>Seam Core</name>
-	<description>Seam core module for Seam framework</description>
+	<name>Seam Core JSF2</name>
+	<description>Seam core module for Seam framework integrated with JSF2</description>
 
 	<build>
 		<plugins>
@@ -68,7 +68,7 @@
 							<manifest>
 								<attribute name="Built-By" value="${user.name}" />
 								<attribute name="Implementation-Vendor" value="${project.organization.name}" />
-								<attribute name="Implementation-Title" value="JBoss Seam Weblogic compatible" />
+								<attribute name="Implementation-Title" value="JBoss Seam JSF2 Weblogic compatible" />
 								<attribute name="Implementation-Version" value="${project.version}" />
 							</manifest>
 						</jar>
@@ -79,7 +79,7 @@
 							<manifest>
 								<attribute name="Built-By" value="${user.name}" />
 								<attribute name="Implementation-Vendor" value="${project.organization.name}" />
-								<attribute name="Implementation-Title" value="JBoss Seam Weblogic compatible" />
+								<attribute name="Implementation-Title" value="JBoss Seam JSF2 Weblogic compatible" />
 								<attribute name="Implementation-Version" value="${project.version}" />
 							</manifest>
 						</jar>
@@ -103,6 +103,7 @@
 			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-core</artifactId>
 			<optional>true</optional>
+			<version>4.0.1.Final</version>
 		</dependency>
 
 		<!-- Maven's "nearest" dependency resolution doesn't take into account 
@@ -121,25 +122,22 @@
 
 		<dependency>
 			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-annotations</artifactId>
-			<optional>true</optional>
-		</dependency>
-
-		<dependency>
-			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-validator</artifactId>
+			<version>4.2.0.Final</version>
 			<optional>true</optional>
 		</dependency>
 
 		<dependency>
 			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-search</artifactId>
+			<version>4.0.0.Final</version>
 			<optional>true</optional>
 		</dependency>
 
 		<dependency>
 			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-entitymanager</artifactId>
+			<version>4.0.1.Final</version>
 			<optional>true</optional>
 		</dependency>
 
@@ -249,12 +247,6 @@
 			<scope>provided</scope>
 		</dependency>
 
-		<dependency>
-			<groupId>javax.persistence</groupId>
-			<artifactId>persistence-api</artifactId>
-			<optional>true</optional>
-			<scope>provided</scope>
-		</dependency>
 
 		<dependency>
 			<groupId>antlr</groupId>
@@ -312,18 +304,6 @@
 		</dependency>
 
 		<dependency>
-			<groupId>org.buni.meldware</groupId>
-			<artifactId>meldware-mailjmx</artifactId>
-			<optional>true</optional>
-		</dependency>
-
-		<dependency>
-			<groupId>org.buni.meldware</groupId>
-			<artifactId>meldware-mailapi</artifactId>
-			<optional>true</optional>
-		</dependency>
-
-		<dependency>
 			<groupId>org.drools</groupId>
 			<artifactId>drools-core</artifactId>
 			<optional>true</optional>
@@ -377,6 +357,11 @@
 		</dependency>
 
 		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+		</dependency>
+
+		<dependency>
 			<groupId>org.dbunit</groupId>
 			<artifactId>dbunit</artifactId>
 			<optional>true</optional>
@@ -452,10 +437,22 @@
 		<dependency>
 			<groupId>org.slf4j</groupId>
 			<artifactId>slf4j-log4j12</artifactId>
-			<version>1.4.2</version>
-			<type>jar</type>
 			<scope>test</scope>
+			<version>1.6.1</version>
 		</dependency>
+		
+		<dependency>
+			<groupId>com.sun.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+			<optional>true</optional>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>com.sun.faces</groupId>
+			<artifactId>jsf-impl</artifactId>
+			<optional>true</optional>
+		</dependency>
 	</dependencies>
 
 	<profiles>
@@ -509,39 +506,5 @@
 				</plugins>
 			</build>
 		</profile>
-		<profile>
-			<id>jsf12</id>
-			<activation>
-				<activeByDefault>true</activeByDefault>
-			</activation>
-				<dependencies>
-					<dependency>
-						<groupId>javax.faces</groupId>
-						<artifactId>jsf-api</artifactId>
-						<optional>true</optional>
-						<scope>provided</scope>
-					</dependency>
-
-					<dependency>
-						<groupId>javax.faces</groupId>
-						<artifactId>jsf-impl</artifactId>
-						<optional>true</optional>
-						<exclusions>
-							<exclusion>
-								<groupId>commons-collections</groupId>
-								<artifactId>commons-collections</artifactId>
-							</exclusion>
-							<exclusion>
-								<groupId>commons-logging</groupId>
-								<artifactId>commons-logging</artifactId>
-							</exclusion>
-							<exclusion>
-								<groupId>commons-digester</groupId>
-								<artifactId>commons-digester</artifactId>
-							</exclusion>
-						</exclusions>
-					</dependency>
-				</dependencies>
-		</profile>
 	</profiles>
 </project>

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/captcha/CaptchaResponse.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/captcha/CaptchaResponse.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/captcha/CaptchaResponse.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -6,12 +6,12 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import org.hibernate.validator.ValidatorClass;
+import javax.validation.Constraint;
 
 @Retention(RetentionPolicy.RUNTIME)
 @Documented
 @Target(ElementType.METHOD)
- at ValidatorClass(CaptchaResponseValidator.class)
+ at Constraint(validatedBy=CaptchaResponseValidator.class)
 public @interface CaptchaResponse 
 {
    String message() default "incorrect response";

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/captcha/CaptchaResponseValidator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/captcha/CaptchaResponseValidator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/captcha/CaptchaResponseValidator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +1,30 @@
 package org.jboss.seam.captcha;
 
-import java.lang.annotation.Annotation;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
 
-import org.hibernate.validator.Validator;
-
 /**
  * Validates that the input entered by the user matches
  * the captcha image.
  * 
  * @author Gavin King
+ * @author Marek Novotny
  *
  */
-public class CaptchaResponseValidator implements Validator
+public class CaptchaResponseValidator implements ConstraintValidator<CaptchaResponse,String>
 {
 
-   public void initialize(Annotation captchaResponse) {}
+   public void initialize(CaptchaResponse constraintAnnotation)   {   }
 
-   public boolean isValid(Object response)
+   public boolean isValid(String value, ConstraintValidatorContext context)
    {
-      return Captcha.instance().validateResponse( (String) response );
+      boolean result = Captcha.instance().validateResponse(value);
+      if (!result)
+      {
+         context.disableDefaultConstraintViolation();
+         context.buildConstraintViolationWithTemplate("org.jboss.seam.captcha.error").addConstraintViolation();
+      }
+      return result;
    }
 
 }

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/contexts/PageContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/contexts/PageContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/contexts/PageContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -44,7 +44,7 @@
    
    public PageContext()
    {
-      previousPageMap = getOrCreateAttributeMap();
+      previousPageMap = getOrCreateViewMap();
       nextPageMap = new HashMap<String, Object>();
    }
 
@@ -138,12 +138,12 @@
     */
    public void flush()
    {
-      Map attributeMap = getOrCreateAttributeMap();
-      attributeMap.putAll(nextPageMap);
-      nextPageMap = attributeMap;
+      Map viewMap = getOrCreateViewMap();
+      viewMap.putAll(nextPageMap);
+      nextPageMap = viewMap;
    }
 
-   private static Map getOrCreateAttributeMap()
+   private static Map getOrCreateViewMap()
    {
       FacesContext facesContext = FacesContext.getCurrentInstance();
       if (facesContext==null)
@@ -152,7 +152,7 @@
       }
       UIViewRoot viewRoot = facesContext.getViewRoot();
       return viewRoot==null ? 
-            new HashMap() : viewRoot.getAttributes();
+            new HashMap() : viewRoot.getViewMap();
    }
 
    private static PhaseId getPhaseId()
@@ -180,4 +180,4 @@
       return getPhaseId().compareTo(PhaseId.INVOKE_APPLICATION) > 0;
    }
 
-}
+}
\ No newline at end of file

Copied: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/ClassValidator.java (from rev 14387, branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ClassValidator.java)
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/ClassValidator.java	                        (rev 0)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/ClassValidator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -0,0 +1,36 @@
+package org.jboss.seam.core;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+
+/**
+ * 
+ * @author Marek Novotny
+ *
+ * @param <T> type for validation
+ */
+public class ClassValidator<T> implements Serializable
+{
+
+   private static final long serialVersionUID = -726917267535562335L;
+
+   // default validator from context
+   private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
+
+   private final Class<T> classForValidation;
+
+   public ClassValidator(Class<T> clazz)
+   {
+      this.classForValidation = clazz;
+   }
+
+   public Set<ConstraintViolation<T>> getPotentialInvalidValues(String propertyName, Object value)
+   {
+      return validator.validateValue(classForValidation, propertyName, value);
+   }
+
+}
\ No newline at end of file

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/SeamResourceBundle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/SeamResourceBundle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/SeamResourceBundle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -96,7 +96,7 @@
       {
          bundles.add(bundle);
       }
-      bundle = resourceLoader.loadBundle("org/hibernate/validator/resources/DefaultValidatorMessages");
+      bundle = resourceLoader.loadBundle("org/hibernate/validator/ValidationMessages");
       if (bundle != null) bundles.add(bundle);
       bundle = resourceLoader.loadBundle("javax.faces.Messages");
       if (bundle != null) bundles.add(bundle);

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/Validators.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/Validators.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/Validators.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -4,9 +4,7 @@
 
 import java.beans.FeatureDescriptor;
 import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
+import java.util.Set;
 
 import javax.el.ELContext;
 import javax.el.ELException;
@@ -14,9 +12,8 @@
 import javax.el.PropertyNotFoundException;
 import javax.el.PropertyNotWritableException;
 import javax.el.ValueExpression;
+import javax.validation.ConstraintViolation;
 
-import org.hibernate.validator.ClassValidator;
-import org.hibernate.validator.InvalidValue;
 import org.jboss.seam.Component;
 import org.jboss.seam.Instance;
 import org.jboss.seam.ScopeType;
@@ -36,42 +33,11 @@
 @Name("org.jboss.seam.core.validators")
 @BypassInterceptors
 @Scope(ScopeType.APPLICATION)
- at Install(precedence = BUILT_IN, classDependencies = "org.hibernate.validator.ClassValidator")
+ at Install(precedence = BUILT_IN, classDependencies = "org.jboss.seam.core.ClassValidator")
 public class Validators
 {
 
-   // TODO: should use weak references here...
-   private Map<Key, ClassValidator> classValidators = new ConcurrentHashMap<Key, ClassValidator>();
-
-   class Key
-   {
-      private Class validatableClass;
-      private java.util.Locale locale;
-
-      public Key(Class validatableClass, java.util.Locale locale)
-      {
-         this.validatableClass = validatableClass;
-         this.locale = locale;
-      }
-
-      @Override
-      public boolean equals(Object other)
-      {
-         if (other == null || !(other instanceof Key)) {
-             return false;             
-         }
-         
-         Key key = (Key) other;
-         return key.validatableClass.equals(validatableClass) && key.locale.equals(locale);
-      }
-
-      @Override
-      public int hashCode()
-      {
-         return validatableClass.hashCode() + locale.hashCode();
-      }
-   }
-
+  
    /**
     * Get the cached ClassValidator instance. If the argument is an instance of
     * a session bean Seam component instance, the returned validator will be
@@ -80,9 +46,10 @@
     * 
     * @param model the object to be validated
     */
+   @SuppressWarnings("unchecked")
    public <T> ClassValidator<T> getValidator(T model)
    {
-      Class modelClass = model instanceof Instance ? ((Instance) model).getComponent().getBeanClass() : model.getClass();
+      Class<?> modelClass = model instanceof Instance ? ((Instance) model).getComponent().getBeanClass() : model.getClass();
       return getValidator((Class<T>) modelClass);
    }
 
@@ -91,19 +58,9 @@
     * 
     * @param modelClass the class to be validated
     */
-   @SuppressWarnings("unchecked")
    public <T> ClassValidator<T> getValidator(Class<T> modelClass)
    {
-      java.util.ResourceBundle bundle = SeamResourceBundle.getBundle();
-      Locale none = bundle == null ? new Locale("NONE") : bundle.getLocale();
-      Key key = new Key(modelClass, none);
-      ClassValidator result = classValidators.get(key);
-      if (result == null)
-      {
-         result = createValidator(modelClass);
-         classValidators.put(key, result);
-      }
-      return result;
+      return createValidator(modelClass);
    }
 
    /**
@@ -112,12 +69,9 @@
     * 
     * @param modelClass the class to be validated
     */
-   @SuppressWarnings("unchecked")
    protected <T> ClassValidator<T> createValidator(Class<T> modelClass)
    {
-      java.util.ResourceBundle bundle = SeamResourceBundle.getBundle();
-
-      return bundle == null ? new ClassValidator(modelClass) : new ClassValidator(modelClass, bundle);
+      return new ClassValidator<T>(modelClass);
    }
 
    /**
@@ -129,7 +83,7 @@
     * @param value a value to be assigned to the property
     * @return a set of potential InvalidValues, from Hibernate Validator
     */
-   public InvalidValue[] validate(ValueExpression valueExpression, ELContext elContext, Object value)
+   public Set<ConstraintViolation<Object>> validate(ValueExpression valueExpression, ELContext elContext, Object value)
    {
       ValidatingResolver validatingResolver = new ValidatingResolver(elContext.getELResolver());
       ELContext decoratedContext = EL.createELContext(elContext, validatingResolver);
@@ -140,14 +94,14 @@
    class ValidatingResolver extends ELResolver
    {
       private ELResolver delegate;
-      private InvalidValue[] invalidValues;
+      private Set<ConstraintViolation<Object>> invalidValues;
 
       public ValidatingResolver(ELResolver delegate)
       {
          this.delegate = delegate;
       }
 
-      public InvalidValue[] getInvalidValues()
+      public Set<ConstraintViolation<Object>> getInvalidValues()
       {
          return invalidValues;
       }

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/framework/Controller.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/framework/Controller.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/framework/Controller.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -7,11 +7,11 @@
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
-import org.hibernate.validator.ClassValidator;
 import org.jboss.seam.Component;
 import org.jboss.seam.annotations.Logger;
 import org.jboss.seam.contexts.Context;
 import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.core.ClassValidator;
 import org.jboss.seam.core.Conversation;
 import org.jboss.seam.core.Events;
 import org.jboss.seam.core.Expressions;

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/framework/Query.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/framework/Query.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/framework/Query.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -302,10 +302,10 @@
       String subject;
       if (useWildcardAsCountQuerySubject) {
          subject = "*";
-      } 
+      }
       else if (getGroupBy() != null) {
           subject = "distinct " + getGroupBy();
-      }
+       }
       // to be JPA-compliant, we need to make this query like "select count(u) from User u"
       // however, Hibernate produces queries some databases cannot run when the primary key is composite
       else {

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/international/StatusMessages.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/international/StatusMessages.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/international/StatusMessages.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -8,8 +8,10 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
-import org.hibernate.validator.InvalidValue;
+import javax.validation.ConstraintViolation;
+
 import org.jboss.seam.Component;
 import org.jboss.seam.international.StatusMessage.Severity;
 
@@ -305,11 +307,11 @@
     * Add an array of InvalidValues from Hibernate Validator. Each message will
     * be added with a severity of WARN.
     */
-   public void add(InvalidValue[] ivs)
+   public void add(Set<ConstraintViolation<Object>> constraintViolations)
    {
-      for (InvalidValue iv: ivs)
+      for (ConstraintViolation<Object> constraintViolation: constraintViolations)
       {
-         add(iv);
+         add(constraintViolation);
       }
    }
 
@@ -319,11 +321,11 @@
     * 
     * The name of the property that was validated will be used as the widget ID
     */
-   public void addToControls(InvalidValue[] ivs)
+   public void addToControls(Set<ConstraintViolation<Object>> constraintViolations)
    {
-      for (InvalidValue iv: ivs)
+      for (ConstraintViolation<Object> constraintViolation: constraintViolations)
       {
-         addToControl(iv);
+         addToControl(constraintViolation);
       }
    }
 
@@ -331,9 +333,9 @@
     * Add an InvalidValue from Hibernate Validator. The message will
     * be added with a severity of WARN.
     */
-   public void add(InvalidValue iv)
+   public void add(ConstraintViolation<Object> constraintViolation)
    {
-      add( WARN, iv.getMessage() );
+      add( WARN, constraintViolation.getMessage() );
    }
 
    /**
@@ -342,9 +344,9 @@
     * 
     * The name of the property that was validated will be used as the widget ID
     */
-   public void addToControl(InvalidValue iv)
+   public void addToControl(ConstraintViolation<Object> constraintViolation)
    {
-      addToControl( iv.getPropertyName(), iv );
+      addToControl( constraintViolation.getInvalidValue().toString(),  constraintViolation);
    }
 
    /**
@@ -353,9 +355,9 @@
     * 
     * You can also specify the id of the widget to add the message to
     */
-   public void addToControl(String id, InvalidValue iv)
+   public void addToControl(String id, ConstraintViolation<Object> constraintViolation)
    {
-      addToControl( id, WARN, iv.getMessage() );
+      addToControl( id, WARN, constraintViolation.getMessage() );
    }
    
    private List<Runnable> getTasks()

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/DelegatingFacesContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/DelegatingFacesContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/DelegatingFacesContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +1,5 @@
 package org.jboss.seam.jsf;
 
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
@@ -47,11 +46,9 @@
    }
    
    
-   public Map<Object, Object> getAttributes() {
-      // FIXME: due JSF 2 new method for
-      // javax.faces.context.FacesContext.getAttributes() and non existent
-      // JSF 1.2 equivalent method it returns empty Map without delegating call
-      return new HashMap<Object, Object>();
+   public Map<Object, Object> getAttributes() 
+   {
+      return delegate.getAttributes();
    }
 
    @Override

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamApplication.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamApplication.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamApplication.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -14,6 +14,7 @@
 import javax.faces.FacesException;
 import javax.faces.application.Application;
 import javax.faces.application.NavigationHandler;
+import javax.faces.application.Resource;
 import javax.faces.application.StateManager;
 import javax.faces.application.ViewHandler;
 import javax.faces.component.UIComponent;
@@ -25,6 +26,7 @@
 import javax.faces.el.ValueBinding;
 import javax.faces.el.VariableResolver;
 import javax.faces.event.ActionListener;
+import javax.faces.event.SystemEvent;
 import javax.faces.validator.Validator;
 
 import org.jboss.seam.Component;
@@ -44,7 +46,7 @@
 {  
    
    protected Application application;
-   
+      
    public SeamApplication(Application application)
    {
       this.application = application;
@@ -98,6 +100,19 @@
    {
       return application.createComponent(componentBinding, context, componentType);
    }
+   
+   @Override
+   public UIComponent createComponent(FacesContext context, 
+         String componentType, String rendererType)
+   {
+      return application.createComponent(context, componentType, rendererType);
+   }
+   
+   @Override
+   public UIComponent createComponent(FacesContext context, Resource resource)
+   {
+      return application.createComponent(context, resource);
+   }
 
    @Override
    public Converter createConverter(String converterId)
@@ -431,4 +446,16 @@
       return application.toString();
    }
    
+   @Override
+   public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source)
+   {
+      application.publishEvent(context, systemEventClass, source);      
+   }
+
+   @Override
+   public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
+   {
+      application.publishEvent(context, systemEventClass, sourceBaseType, source);
+   }
+   
 }

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -5,6 +5,7 @@
 
 import javax.faces.FacesException;
 import javax.faces.application.ViewHandler;
+import javax.faces.application.ViewHandlerWrapper;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 
@@ -20,7 +21,7 @@
  * @author Gavin King
  *
  */
-public class SeamViewHandler extends ViewHandler 
+public class SeamViewHandler extends ViewHandlerWrapper
 {
    
    private ViewHandler viewHandler;
@@ -90,7 +91,9 @@
    @Override
    public UIViewRoot restoreView(FacesContext ctx, String viewId) 
    {
-      return viewHandler.restoreView(ctx, viewId);
+      UIViewRoot viewRoot =viewHandler.restoreView(ctx, viewId);
+      viewRoot.setViewId(viewHandler.deriveViewId(ctx,viewId));
+      return viewRoot;
    }
 
    @Override
@@ -99,4 +102,10 @@
       viewHandler.writeState(ctx);
    }
 
+   @Override
+   public ViewHandler getWrapped()
+   {
+      return viewHandler;
+   }
+
 }

Deleted: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mail/Meldware.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mail/Meldware.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mail/Meldware.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,79 +0,0 @@
-package org.jboss.seam.mail;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.List;
-
-import org.buni.meldware.mail.management.AdminTool;
-import org.buni.meldware.mail.util.MMJMXUtil;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-
-/**
- * Creates meldware users, mailboxes and aliases
- *
- */
- at Name("org.jboss.seam.mail.meldware")
- at Startup
- at Scope(APPLICATION)
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="org.buni.meldware.mail.mailbox.Mailbox", value=false)
-public class Meldware
-{
-   
-   private List<MeldwareUser> users;
-   
-   private List<String> domains;
-   
-   private Log log = Logging.getLog(Meldware.class);
-   
-   @Create
-   public void create()
-   {
-      // TODO Support domain creation as well.  Currently they are written out to file.
-      
-         log.debug("Creating users and mailboxes");
-         //MailboxService ms = MMJMXUtil.getMBean("meldware.mail:type=MailboxManager,name=MailboxManager", MailboxService.class);
-         AdminTool at = MMJMXUtil.getMBean("meldware.mail:type=MailServices,name=AdminTool", AdminTool.class);
-         
-         for (MeldwareUser meldwareUser : getUsers())
-         {
-            at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());
-            // TODO This won't work on AS 4.2
-            /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());
-            for (String alias : meldwareUser.getAliases())
-            {
-               ms.createAlias(mbox.getId(), alias);
-            }*/
-            log.debug("Created #0 #1 #2", meldwareUser.isAdministrator() ? "administrator" : "user", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? "" : "with aliases " + meldwareUser.getAliases());
-         }
-      }
-   
-   public List<MeldwareUser> getUsers()
-   {
-      return users;
-   }
-   
-   public void setUsers(List<MeldwareUser> users)
-   {
-      this.users = users;
-   }
-   
-   public List<String> getDomains()
-   {
-      return domains;
-   }
-   
-   public void setDomains(List<String> domains)
-   {
-      this.domains = domains;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mail/MeldwareUser.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mail/MeldwareUser.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mail/MeldwareUser.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,84 +0,0 @@
-package org.jboss.seam.mail;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
- at Name("org.jboss.seam.mail.meldwareUser")
- at Scope(APPLICATION)
- at BypassInterceptors
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.mail.meldware", value=false)
-public class MeldwareUser
-{
-   
-   private String username;
-   private String password;
-   
-   private boolean administrator;
-   
-   private List<String> aliases = new ArrayList<String>();
-
-   public boolean isAdministrator()
-   {
-      return administrator;
-   }
-
-   public void setAdministrator(boolean admin)
-   {
-      this.administrator = admin;
-   }
-
-   public List<String> getAliases()
-   {
-      return aliases;
-   }
-
-   public void setAliases(List<String> aliases)
-   {
-      this.aliases = aliases;
-   }
-
-   public String getPassword()
-   {
-      return password;
-   }
-
-   public void setPassword(String password)
-   {
-      this.password = password;
-   }
-
-   public String getUsername()
-   {
-      return username;
-   }
-
-   public void setUsername(String username)
-   {
-      this.username = username;
-   }
-   
-   public List<String> getRoles()
-   {
-      return getRoles(this);
-   }
-   
-   private static List<String> getRoles(MeldwareUser user)
-   {
-      List<String> roles = new ArrayList<String>();
-      roles.add("calendaruser");
-      if (user.isAdministrator())
-      {
-         roles.add("adminuser");
-      }
-      return roles;
-   }
-
-}

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -36,8 +36,8 @@
 import javax.servlet.http.HttpServletResponseWrapper;
 import javax.servlet.http.HttpSession;
 import javax.transaction.UserTransaction;
+import javax.validation.ConstraintViolation;
 
-import org.hibernate.validator.InvalidValue;
 import org.jboss.seam.Component;
 import org.jboss.seam.Seam;
 import org.jboss.seam.contexts.Contexts;
@@ -79,6 +79,8 @@
    private Map<String, Map> conversationViewRootAttributes;
    protected Filter seamFilter;
    
+   private static ServletContext realServletContext = null;
+   
    static 
    {
       phases = new SeamPhaseListener();
@@ -445,11 +447,12 @@
       protected boolean validateValue(String valueExpression, Object value)
       {
          ValueExpression ve = application.getExpressionFactory().createValueExpression(facesContext.getELContext(), valueExpression, Object.class);
-         InvalidValue[] ivs = Validators.instance().validate(ve, facesContext.getELContext(), value);
-         if (ivs.length > 0)
+         Set<ConstraintViolation<Object>> ivs = Validators.instance().validate(ve, facesContext.getELContext(), value);
+         if (ivs.size() > 0)
          {
             validationFailed = true;
-            facesContext.addMessage(null, FacesMessages.createFacesMessage(FacesMessage.SEVERITY_ERROR, ivs[0].getMessage()));
+            String message = ivs.iterator().next().getMessage();
+            facesContext.addMessage(null, FacesMessages.createFacesMessage(FacesMessage.SEVERITY_ERROR, message));
             return false;
          }
          else
@@ -531,7 +534,7 @@
 
       private void saveConversationViewRoot()
       {
-         Map renderedViewRootAttributes = facesContext.getViewRoot().getAttributes();
+         Map renderedViewRootAttributes = facesContext.getViewRoot().getViewMap();
          if (renderedViewRootAttributes != null && conversationId != null)
          {
             Map conversationState = new HashMap();
@@ -733,7 +736,7 @@
          {
             UIViewRoot viewRoot = facesContext.getApplication().getViewHandler().createView(facesContext, getViewId());
             facesContext.setViewRoot(viewRoot);
-            Map restoredViewRootAttributes = facesContext.getViewRoot().getAttributes();
+            Map restoredViewRootAttributes = facesContext.getViewRoot().getViewMap();
             if (conversationId != null)
             {
                if (isGetRequest())
@@ -922,19 +925,34 @@
     */
    protected void startSeam() throws Exception
    {
-      startJbossEmbeddedIfNecessary();
-      this.servletContext = createServletContext();
+      // If the Seam Filter is already initialized, we can grab the real servlet context
+     if (realServletContext == null && ServletLifecycle.getServletContext() != null) {
+        realServletContext = ServletLifecycle.getServletContext();
+     }
+     
+     ServletContext realContext = realServletContext;
+      this.servletContext = createServletContext(realContext);
       ServletLifecycle.beginApplication(servletContext);
       FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY, MockApplicationFactory.class.getName());
       new Initialization(servletContext).create().init();
       ((Init) servletContext.getAttribute(Seam.getComponentName(Init.class))).setDebug(false);
    }
    
-   protected ServletContext createServletContext()
+   protected ServletContext createServletContext(ServletContext realContext)
    {
-      MockServletContext mockServletContext = new MockServletContext();
-      initServletContext(mockServletContext.getInitParameters());
-      return mockServletContext;
+     if (realContext != null)
+     {
+        ServletContextWrapper wrappedServletContext = new ServletContextWrapper(realContext);
+        // TODO: 
+        //initServletContext(wrappedServletContext.getInitParameters());
+        return wrappedServletContext;
+     }
+     else
+     {
+        MockServletContext mockServletContext = new MockServletContext();
+        initServletContext(mockServletContext.getInitParameters());
+        return mockServletContext;
+     }
    }
    
    /**
@@ -976,7 +994,7 @@
    {
       seamFilter.destroy();
       conversationViewRootAttributes = null;
-      applicationFactory.setApplication(null);
+      // applicationFactory.setApplication(null);
    }
 
    protected Filter createSeamFilter() throws ServletException
@@ -1027,29 +1045,6 @@
 
    private static boolean started;
 
-   protected void startJbossEmbeddedIfNecessary() throws Exception
-   {
-      if (!started && embeddedJBossAvailable())
-      {
-         new EmbeddedBootstrap().startAndDeployResources();
-      }
-
-      started = true;
-   }
-
-   private boolean embeddedJBossAvailable()
-   {
-      try
-      {
-         Class.forName("org.jboss.embedded.Bootstrap");
-         return true;
-      }
-      catch (ClassNotFoundException e)
-      {
-         return false;
-      }
-   }
-
    protected ELResolver[] getELResolvers()
    {
       return new ELResolver[0];

Copied: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java (from rev 14387, branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java)
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java	                        (rev 0)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.mock;
+
+import org.junit.After;
+import org.junit.Before;
+
+/**
+ * Provides BaseSeamTest functionality for TestNG integration tests.
+ * 
+ * @author Gavin King
+ * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
+ * @author Mike Youngstrom
+ * @author <a href="http://community.jboss.org/people/jharting">Jozef Hartinger</a>
+ * @author <a href="http://community.jboss.org/people/maschmid">Marek Schmidt</a>
+ */
+public class JUnitSeamTest extends AbstractSeamTest
+{
+   
+   @Before
+   @Override
+   public void begin()
+   {
+      try {
+         startSeam();
+         setupClass();
+      }
+      catch (Exception x) {
+         throw new RuntimeException(x);
+      }
+      super.begin();
+   }
+
+   @After
+   @Override
+   public void end()
+   {
+      super.end();
+      try {
+         cleanupClass();
+         stopSeam();
+      }
+      catch (Exception x) {
+         throw new RuntimeException(x);
+      }
+   }
+   
+   /**
+    * Call this method within a test method to end the previous
+    * mock session and start another one. 
+    */
+   public void reset()
+   {
+      end();
+      begin();
+   }
+}

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockApplication.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockApplication.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockApplication.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -37,6 +37,7 @@
 import javax.faces.el.ValueBinding;
 import javax.faces.el.VariableResolver;
 import javax.faces.event.ActionListener;
+import javax.faces.event.SystemEvent;
 import javax.faces.validator.Validator;
 
 import org.jboss.seam.el.EL;
@@ -52,6 +53,18 @@
 public class MockApplication extends Application
 {
    
+   @Override
+   public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source)
+   {
+      // empty publish method      
+   }
+
+   @Override
+   public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
+   {
+      // empty publish method
+   }
+
    private javax.el.CompositeELResolver elResolver;
    private javax.el.CompositeELResolver additionalResolvers;
    private Collection locales;
@@ -254,11 +267,11 @@
       {
         try
         {
-           return (UIComponent) Class.forName(name).newInstance();
+           return (UIComponent) Thread.currentThread().getContextClassLoader().loadClass(name).newInstance();
         } 
         catch (Exception e)
-        {
-           throw new UnsupportedOperationException("Unable to create component " + name);
+        {           
+           throw new UnsupportedOperationException("Unable to create component " + name, e);
         }
       }
       else
@@ -267,6 +280,12 @@
          return new UIOutput();
       }
    }
+   
+   @Override
+   public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
+   {
+      return createComponent(componentType);
+   }
 
    @Override
    public UIComponent createComponent(ValueBinding vb, FacesContext fc, String x)

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockFacesContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockFacesContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/MockFacesContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -127,8 +127,8 @@
 
    @Override
    public RenderKit getRenderKit()
-   {
-      if (getViewRoot() == null || getViewRoot().getRenderKitId() == null)
+   {  
+      if (getViewRoot() == null || getViewRoot().getRenderKitId() == null || renderKitFactory == null)
       {
          return MockRenderKit.INSTANCE;
       }
@@ -239,6 +239,11 @@
          elContext.putContext(FacesContext.class, this);
       }
       return elContext;
-   }   
+   }
+   
+   @Override
+   public boolean isPostback() {
+      return false;
+   }
 
 }

Copied: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java (from rev 14387, branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java)
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java	                        (rev 0)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -0,0 +1,147 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+
+package org.jboss.seam.mock;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+import org.jboss.seam.util.IteratorEnumeration;
+
+/**
+ * Wraps a ServletContext with own attributes.
+ *
+ * @author Marek Schmidt
+ */
+public class ServletContextWrapper implements ServletContext {
+   
+   private ServletContext delegate; 
+   
+   private Map<String, Object> attributes = new HashMap<String, Object>();
+   
+   public ServletContextWrapper(ServletContext delegate) {
+      this.delegate = delegate;
+   }
+
+   public Object getAttribute(String arg0) {
+      return attributes.get(arg0);
+   }
+
+   public Enumeration getAttributeNames() {
+      return new IteratorEnumeration(attributes.keySet().iterator());
+   }
+
+   public ServletContext getContext(String arg0) {
+      return delegate.getContext(arg0);
+   }
+
+   public String getContextPath() {
+      return delegate.getContextPath();
+   }
+
+   public String getInitParameter(String arg0) {
+      return delegate.getInitParameter(arg0);
+   }
+
+   public Enumeration getInitParameterNames() {
+      return delegate.getInitParameterNames();
+   }
+
+   public int getMajorVersion() {
+      return delegate.getMajorVersion();
+   }
+
+   public String getMimeType(String arg0) {
+      return delegate.getMimeType(arg0);
+   }
+
+   public int getMinorVersion() {
+      return delegate.getMinorVersion();
+   }
+
+   public RequestDispatcher getNamedDispatcher(String arg0) {
+      return delegate.getNamedDispatcher(arg0);
+   }
+
+   public String getRealPath(String arg0) {
+      return delegate.getRealPath(arg0);
+   }
+
+   public RequestDispatcher getRequestDispatcher(String arg0) {
+      return delegate.getRequestDispatcher(arg0);
+   }
+
+   public URL getResource(String arg0) throws MalformedURLException {
+      return delegate.getResource(arg0);
+   }
+
+   public InputStream getResourceAsStream(String arg0) {
+      InputStream ret = delegate.getResourceAsStream(arg0);
+      return ret;
+   }
+
+   public Set getResourcePaths(String arg0) {
+      return delegate.getResourcePaths(arg0);
+   }
+
+   public String getServerInfo() {
+      return delegate.getServerInfo();
+   }
+
+   public Servlet getServlet(String arg0) throws ServletException {
+      return delegate.getServlet(arg0);
+   }
+
+   public String getServletContextName() {
+      return "Wrap";
+   }
+
+   public Enumeration getServletNames() {
+      return delegate.getServletNames();
+   }
+
+   public Enumeration getServlets() {
+      return delegate.getServlets();
+   }
+
+   public void log(String arg0) {
+      delegate.log(arg0);
+   }
+
+   public void log(Exception arg0, String arg1) {
+      delegate.log(arg0, arg1);
+   }
+
+   public void log(String arg0, Throwable arg1) {
+      delegate.log(arg0, arg1);
+   }
+
+   public void removeAttribute(String arg0) {
+      attributes.remove(arg0);
+   }
+
+   public void setAttribute(String key, Object value) {
+      if (value == null)
+      {
+         attributes.remove(key);
+      }
+      else
+      {
+         attributes.put(key, value);
+      }
+   }
+}

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation/Param.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation/Param.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation/Param.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -2,6 +2,7 @@
 
 import java.util.Date;
 import java.util.Map;
+import java.util.Set;
 
 import javax.el.ELContext;
 import javax.el.ELException;
@@ -10,8 +11,8 @@
 import javax.faces.convert.Converter;
 import javax.faces.validator.Validator;
 import javax.faces.validator.ValidatorException;
+import javax.validation.ConstraintViolation;
 
-import org.hibernate.validator.InvalidValue;
 import org.jboss.seam.contexts.Contexts;
 import org.jboss.seam.core.Validators;
 import org.jboss.seam.core.Expressions.ValueExpression;
@@ -254,7 +255,7 @@
       {
          //TODO: note that this code is duplicated from ModelValidator!!
          ELContext elContext = facesContext.getELContext();
-         InvalidValue[] invalidValues;
+         Set<ConstraintViolation<Object>> invalidValues; 
          try
          {
             invalidValues = Validators.instance().validate( valueExpression.toUnifiedValueExpression(), elContext, value );
@@ -266,21 +267,17 @@
             throw new ValidatorException( createMessage(cause), cause );
          }
          
-         if ( invalidValues.length>0 )
+         if ( invalidValues.size()>0 )
          {
             throw new ValidatorException( createMessage(invalidValues) );
          }
       }
    }
 
-   private FacesMessage createMessage(InvalidValue[] invalidValues)
+   private FacesMessage createMessage(Set<ConstraintViolation<Object>> invalidValues)
    {
-      return FacesMessages.createFacesMessage(
-            FacesMessage.SEVERITY_ERROR,
-            INVALID_MESSAGE_ID,
-            "'" + name + "' parameter is invalid: " + invalidValues[0].getMessage(),
-            new Object[] { invalidValues[0], name }
-      );
+      String message = invalidValues.iterator().next().getMessage();
+      return FacesMessages.createFacesMessage(FacesMessage.SEVERITY_ERROR, INVALID_MESSAGE_ID, "'" + name + "' parameter is invalid: " + message, new Object[] { message, name });
    }
 
    private FacesMessage createMessage(Throwable cause)

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernatePersistenceProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernatePersistenceProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernatePersistenceProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -356,7 +356,7 @@
    {
       ClassMetadata classMetadata = getClassMetadata(value, session);
       return classMetadata!=null && classMetadata.isVersioned() ? 
-               classMetadata.getVersion(value, EntityMode.POJO) : null;
+               classMetadata.getVersion(value) : null;
    }
    
    private static ClassMetadata getClassMetadata(Object value, Session session)

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -8,10 +8,10 @@
 import java.util.Properties;
 
 import org.hibernate.SessionFactory;
-import org.hibernate.cfg.AnnotationConfiguration;
+import org.hibernate.cfg.Configuration;
 import org.hibernate.cfg.Environment;
 import org.hibernate.cfg.NamingStrategy;
-import org.hibernate.util.ReflectHelper;
+import org.hibernate.internal.util.ReflectHelper;
 import org.jboss.seam.ScopeType;
 import org.jboss.seam.annotations.Create;
 import org.jboss.seam.annotations.Destroy;
@@ -90,7 +90,7 @@
 
    protected SessionFactory createSessionFactory() throws ClassNotFoundException
    {
-      AnnotationConfiguration configuration = new AnnotationConfiguration();
+      Configuration configuration = new Configuration();
       
       // setup non-default naming strategy
       if (namingStrategy != null)

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -12,12 +12,13 @@
 
 import org.hibernate.CacheMode;
 import org.hibernate.Criteria;
-import org.hibernate.EntityMode;
 import org.hibernate.Filter;
 import org.hibernate.FlushMode;
 import org.hibernate.HibernateException;
 import org.hibernate.Interceptor;
+import org.hibernate.LobHelper;
 import org.hibernate.LockMode;
+import org.hibernate.LockOptions;
 import org.hibernate.Query;
 import org.hibernate.ReplicationMode;
 import org.hibernate.SQLQuery;
@@ -25,21 +26,26 @@
 import org.hibernate.ScrollableResults;
 import org.hibernate.Session;
 import org.hibernate.SessionFactory;
+import org.hibernate.SharedSessionBuilder;
 import org.hibernate.Transaction;
-import org.hibernate.collection.PersistentCollection;
-import org.hibernate.engine.ActionQueue;
-import org.hibernate.engine.EntityEntry;
-import org.hibernate.engine.EntityKey;
-import org.hibernate.engine.PersistenceContext;
-import org.hibernate.engine.QueryParameters;
-import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.engine.query.sql.NativeSQLQuerySpecification;
-import org.hibernate.event.EventListeners;
-import org.hibernate.event.EventSource;
-import org.hibernate.impl.CriteriaImpl;
-import org.hibernate.jdbc.Batcher;
-import org.hibernate.jdbc.JDBCContext;
+import org.hibernate.TypeHelper;
+import org.hibernate.cache.spi.CacheKey;
+import org.hibernate.collection.spi.PersistentCollection;
+import org.hibernate.engine.jdbc.spi.JdbcConnectionAccess;
+import org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification;
+import org.hibernate.engine.spi.ActionQueue;
+import org.hibernate.engine.spi.EntityEntry;
+import org.hibernate.engine.spi.EntityKey;
+import org.hibernate.engine.spi.LoadQueryInfluencers;
+import org.hibernate.engine.spi.NonFlushedChanges;
+import org.hibernate.engine.spi.PersistenceContext;
+import org.hibernate.engine.spi.QueryParameters;
+import org.hibernate.engine.spi.SessionFactoryImplementor;
+import org.hibernate.engine.spi.SessionImplementor;
+import org.hibernate.engine.transaction.spi.TransactionCoordinator;
+import org.hibernate.event.spi.EventSource;
+import org.hibernate.internal.CriteriaImpl;
+import org.hibernate.jdbc.ReturningWork;
 import org.hibernate.jdbc.Work;
 import org.hibernate.loader.custom.CustomQuery;
 import org.hibernate.persister.entity.EntityPersister;
@@ -59,6 +65,8 @@
  */
 public class HibernateSessionInvocationHandler implements InvocationHandler, Serializable, EventSource
 {
+     
+   private static final long serialVersionUID = 4954720887288965536L;
    
    private Session delegate;
    
@@ -159,11 +167,6 @@
       return ((SessionImplementor) delegate).getFactory();
    }
 
-   public Batcher getBatcher()
-   {
-      return ((SessionImplementor) delegate).getBatcher();
-   }
-
    public List list(String paramString, QueryParameters paramQueryParameters) throws HibernateException
    {
       return ((SessionImplementor) delegate).list(paramString, paramQueryParameters);
@@ -209,16 +212,6 @@
       return ((SessionImplementor) delegate).getEntityUsingInterceptor(paramEntityKey);
    }
 
-   public void afterTransactionCompletion(boolean paramBoolean, Transaction paramTransaction)
-   {
-      ((SessionImplementor) delegate).afterTransactionCompletion(paramBoolean, paramTransaction);      
-   }
-
-   public void beforeTransactionCompletion(Transaction paramTransaction)
-   {
-      ((SessionImplementor) delegate).beforeTransactionCompletion(paramTransaction)      ;
-   }
-
    public Serializable getContextEntityIdentifier(Object paramObject)
    {
       return ((SessionImplementor) delegate).getContextEntityIdentifier(paramObject);
@@ -279,11 +272,6 @@
       return ((SessionImplementor) delegate).getDontFlushFromFind();
    }
 
-   public EventListeners getListeners()
-   {
-      return ((SessionImplementor) delegate).getListeners();
-   }
-
    public PersistenceContext getPersistenceContext()
    {
       return ((SessionImplementor) delegate).getPersistenceContext();
@@ -299,12 +287,6 @@
       return ((SessionImplementor) delegate).executeNativeUpdate(paramNativeSQLQuerySpecification, paramQueryParameters);
    }
 
-
-   public EntityMode getEntityMode()
-   {
-      return ((SessionImplementor) delegate).getEntityMode();
-   }
-
    public CacheMode getCacheMode()
    {
       return ((SessionImplementor) delegate).getCacheMode();
@@ -375,21 +357,11 @@
       ((SessionImplementor) delegate).setFetchProfile(paramString);      
    }
 
-   public JDBCContext getJDBCContext()
-   {
-      return ((SessionImplementor) delegate).getJDBCContext();
-   }
-
    public boolean isClosed()
    {
       return ((SessionImplementor) delegate).isClosed();
    }
 
-   public Session getSession(EntityMode paramEntityMode)
-   {
-      return delegate.getSession(paramEntityMode);
-   }
-
    public SessionFactory getSessionFactory()
    {
       return delegate.getSessionFactory();
@@ -670,12 +642,6 @@
       return delegate.disconnect();
    }
 
-   @SuppressWarnings("deprecation")
-   public void reconnect() throws HibernateException
-   {
-      delegate.reconnect();
-   }
-
    public void reconnect(Connection paramConnection) throws HibernateException
    {
       delegate.reconnect(paramConnection);
@@ -731,14 +697,119 @@
       ((EventSource) delegate).refresh(paramObject, paramMap);
    }
 
-   public void saveOrUpdateCopy(String paramString, Object paramObject, Map paramMap) throws HibernateException
+   public void delete(String paramString, Object paramObject, boolean paramBoolean, Set paramSet)
    {
-      ((EventSource) delegate).saveOrUpdateCopy(paramString, paramObject, paramMap);      
+      ((EventSource) delegate).delete(paramString, paramObject, paramBoolean, paramSet);
    }
 
-   public void delete(String paramString, Object paramObject, boolean paramBoolean, Set paramSet)
+   public String getTenantIdentifier()
    {
-      ((EventSource) delegate).delete(paramString, paramObject, paramBoolean, paramSet);
+     return delegate.getTenantIdentifier();
    }
 
+   public JdbcConnectionAccess getJdbcConnectionAccess()
+   {
+      return ((SessionImplementor) delegate).getJdbcConnectionAccess();
+   }
+
+   public EntityKey generateEntityKey(Serializable id, EntityPersister persister)
+   {
+      return ((SessionImplementor) delegate).generateEntityKey(id, persister);
+   }
+
+   public CacheKey generateCacheKey(Serializable id, Type type, String entityOrRoleName)
+   {
+      return ((SessionImplementor) delegate).generateCacheKey(id, type, entityOrRoleName);
+   }
+
+   public void disableTransactionAutoJoin()
+   {
+      ((SessionImplementor) delegate).disableTransactionAutoJoin();
+   }
+
+   public NonFlushedChanges getNonFlushedChanges() throws HibernateException
+   {
+      return ((SessionImplementor) delegate).getNonFlushedChanges();
+   }
+
+   public void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges) throws HibernateException
+   {
+      ((SessionImplementor) delegate).applyNonFlushedChanges(nonFlushedChanges);
+   }
+
+   public TransactionCoordinator getTransactionCoordinator()
+   {
+      return ((SessionImplementor) delegate).getTransactionCoordinator();
+   }
+
+   public LoadQueryInfluencers getLoadQueryInfluencers()
+   {
+      return ((SessionImplementor) delegate).getLoadQueryInfluencers();
+   }
+
+   public <T> T execute(Callback<T> callback)
+   {
+      return ((SessionImplementor) delegate).execute(callback);
+   }
+
+   public SharedSessionBuilder sessionWithOptions()
+   {
+      return ((EventSource) delegate).sessionWithOptions();
+   }
+
+   public Object load(Class theClass, Serializable id, LockOptions lockOptions) throws HibernateException
+   {
+      return ((EventSource) delegate).load(theClass, id, lockOptions);
+   }
+
+   public Object load(String entityName, Serializable id, LockOptions lockOptions) throws HibernateException
+   {
+      return ((EventSource) delegate).load(entityName, id, lockOptions);
+   }
+
+   public LockRequest buildLockRequest(LockOptions lockOptions)
+   {
+      return ((EventSource) delegate).buildLockRequest(lockOptions);
+   }
+
+   public void refresh(String entityName, Object object) throws HibernateException
+   {
+      ((EventSource) delegate).refresh(entityName, object);      
+   }
+
+   public void refresh(Object object, LockOptions lockOptions) throws HibernateException
+   {
+      ((EventSource) delegate).refresh(object, lockOptions);      
+   }
+
+   public void refresh(String entityName, Object object, LockOptions lockOptions) throws HibernateException
+   {
+      ((EventSource) delegate).refresh(entityName, object, lockOptions);      
+   }
+
+   public Object get(Class clazz, Serializable id, LockOptions lockOptions) throws HibernateException
+   {
+      return ((EventSource) delegate).get(clazz, id, lockOptions);
+   }
+
+   public Object get(String entityName, Serializable id, LockOptions lockOptions) throws HibernateException
+   {
+      return ((EventSource) delegate).get(entityName, id, lockOptions);
+   }
+
+   public <T> T doReturningWork(ReturningWork<T> work) throws HibernateException
+   {
+      return ((EventSource) delegate).doReturningWork(work);
+   }
+
+   public TypeHelper getTypeHelper()
+   {
+      return ((EventSource) delegate).getTypeHelper();
+   }
+
+   public LobHelper getLobHelper()
+   {
+      return ((EventSource) delegate).getLobHelper();
+   }
+
 }

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionProxy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionProxy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/persistence/HibernateSessionProxy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,8 +1,8 @@
 package org.jboss.seam.persistence;
 
 import org.hibernate.Session;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.event.EventSource;
+import org.hibernate.engine.spi.SessionImplementor;
+import org.hibernate.event.spi.EventSource;
 
 /**
  * Marker interface that signifies a proxy is using the

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/transaction/Transaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/transaction/Transaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/transaction/Transaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -100,5 +100,7 @@
          }
       }
    }
+   
+   
 
 }

Modified: branches/community/Seam_2_3/jboss-seam/src/main/resources/META-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/resources/META-INF/faces-config.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/main/resources/META-INF/faces-config.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<faces-config version="1.2" 
+<faces-config version="2.0" 
               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/web-facesconfig_1_2.xsd">
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
 
    <factory>
       <application-factory>org.jboss.seam.jsf.SeamApplicationFactory</application-factory>

Modified: branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/Foo.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/Foo.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/Foo.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -9,8 +9,8 @@
 import java.io.Serializable;
 
 import javax.ejb.Remove;
+import javax.validation.constraints.NotNull;
 
-import org.hibernate.validator.NotNull;
 import org.jboss.seam.ScopeType;
 import org.jboss.seam.annotations.Begin;
 import org.jboss.seam.annotations.End;
@@ -23,7 +23,6 @@
  */
 @Name("foo")
 @Scope(ScopeType.SESSION)
- at SuppressWarnings("deprecation")
 public class Foo implements Serializable
 {
    private static final long serialVersionUID = -5448030633067107049L;

Modified: branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/MailTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/MailTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/MailTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,13 +1,10 @@
 package org.jboss.seam.test.unit;
 
-import java.util.ArrayList;
-
 import javax.mail.NoSuchProviderException;
 import javax.mail.Session;
 import javax.naming.NamingException;
 
 import org.jboss.seam.mail.MailSession;
-import org.jboss.seam.mail.MeldwareUser;
 import org.testng.annotations.Test;
 
 import com.sun.mail.smtp.SMTPSSLTransport;
@@ -366,36 +363,5 @@
       
       assert failure;
    }
-   
-   @Test
-   public void testMeldwareUser()
-   {
-      MeldwareUser meldwareUser = new MeldwareUser();
-      meldwareUser.setUsername(USERNAME);
-      meldwareUser.setPassword(PASSWORD);
-      meldwareUser.getAliases().add(EMAIL);
-      
-      assert USERNAME.equals(meldwareUser.getUsername());
-      assert PASSWORD.equals(meldwareUser.getPassword());
-      assert meldwareUser.getAliases() != null;
-      assert meldwareUser.getAliases().contains(EMAIL);
-      assert meldwareUser.getRoles().contains("calendaruser");
-      assert !meldwareUser.getRoles().contains("adminuser");
-      
-      meldwareUser.setAliases(new ArrayList<String>());
-      assert meldwareUser.getAliases().isEmpty();
-   }
-   
-   @Test
-   public void testAdminMeldwareUser()
-   {
-      MeldwareUser meldwareUser = new MeldwareUser();
-      meldwareUser.setAdministrator(true);
-      
-      assert meldwareUser.getRoles().contains("calendaruser");
-      assert meldwareUser.getRoles().contains("adminuser");
-   }
-   
-   // TODO Write tests for Meldware
 
 }

Modified: branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/PageParamTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/PageParamTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/PageParamTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -8,7 +8,7 @@
 import javax.faces.validator.Validator;
 import javax.faces.validator.ValidatorException;
 
-import org.hibernate.validator.Length;
+import javax.validation.constraints.Size;
 import org.jboss.seam.contexts.Contexts;
 import org.jboss.seam.core.Expressions;
 import org.jboss.seam.core.Validators;
@@ -152,7 +152,7 @@
       {
          this.birthDate = birth;
       }
-      @Length(min = 3, max = 10)
+      @Size(min = 3, max = 10)
       public String getValue() {
          return value;
       }

Modified: branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -114,7 +114,7 @@
       
       phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
       
-      assert facesContext.getViewRoot().getAttributes().size()==1;
+      assert facesContext.getViewRoot().getViewMap().size()==1;
       assert ( (FacesPage) getPageMap(facesContext).get( getPrefix() + Seam.getComponentName(FacesPage.class) ) ).getConversationId()==null;
       assert Contexts.isEventContextActive();
       assert Contexts.isSessionContextActive();
@@ -206,7 +206,7 @@
 
    private Map getPageMap(MockFacesContext facesContext)
    {
-      return facesContext.getViewRoot().getAttributes();
+      return facesContext.getViewRoot().getViewMap();
    }
 
    @Test
@@ -257,7 +257,7 @@
       
       facesContext.getApplication().getStateManager().saveView(facesContext);
       
-      assert facesContext.getViewRoot().getAttributes().size()==1;
+      assert facesContext.getViewRoot().getViewMap().size()==1;
 
       phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
 
@@ -334,7 +334,7 @@
       
       phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
       
-      assert facesContext.getViewRoot().getAttributes().size()==1;
+      assert facesContext.getViewRoot().getViewMap().size()==1;
       assert ( (FacesPage) getPageMap(facesContext).get( getPrefix() + Seam.getComponentName(FacesPage.class) ) ).getConversationId()==null;
       assert Contexts.isEventContextActive();
       assert Contexts.isSessionContextActive();

Modified: branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/QueryTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/QueryTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam/src/test/java/org/jboss/seam/test/unit/QueryTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -61,6 +61,17 @@
       query.parseEjbql();
       assertEquals(query.getCountEjbql(), "select count(p) from Person p");
    }
+   
+   @Test
+   public void testCountQueryWithGroupBy()
+   {
+      UnitQuery query = new UnitQuery();
+      query.setEjbql("select min(e.birthYear), count(*) from Person p group by p.birthYear");
+      query.setGroupBy("p.birthYear");
+      query.parseEjbql();
+      assertEquals(query.getCountEjbql() , "select count(*) from Person p");      
+	   
+   }
 
    class UnitQuery extends EntityQuery {
 
@@ -88,17 +99,6 @@
       }
       
    }
-   
-   @Test
-   public void testCountQueryWithGroupBy()
-   {
-      UnitQuery query = new UnitQuery();
-      query.setEjbql("select min(e.birthYear), count(*) from Person p group by p.birthYear");
-      query.setGroupBy("p.birthYear");
-      query.parseEjbql();
-      assertEquals(query.getCountEjbql() , "select count(*) from Person p");      
-	   
-   }
 
 //   class CompliantUnitQuery extends UnitQuery {
 //

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/antlr/org/jboss/seam/text/seam-text.g
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/antlr/org/jboss/seam/text/seam-text.g	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/antlr/org/jboss/seam/text/seam-text.g	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1019 +0,0 @@
-header
-{
-package org.jboss.seam.text;
-}
-
-class SeamTextParser extends Parser;
-options
-{
-    k=4;
-    defaultErrorHandler=false;
-}
-{   
-    public class Macro {
-        public String name;
-        public java.util.SortedMap<String,String> params = new java.util.TreeMap<String,String>();
-
-        public Macro(String name) {
-            this.name = name;
-        }
-    }
-
-     public class HtmlRecognitionException extends RecognitionException {
-         Token openingElement;
-         RecognitionException wrappedException;
-
-         public HtmlRecognitionException(Token openingElement, RecognitionException wrappedException) {
-             this.openingElement = openingElement;
-             this.wrappedException = wrappedException;
-         }
-
-         public Token getOpeningElement() {
-             return openingElement;
-         }
-
-         public String getMessage() {
-             return wrappedException.getMessage();
-         }
-
-         public Throwable getCause() {
-             return wrappedException;
-         }
-     }
-
-    /**
-     * Sanitization of user input, used to clean links and plain HTML.
-     */
-    public interface Sanitizer {
-
-        /**
-         * Called by the SeamTextParser when a link tag is parsed, i.e. [=>some URI].
-         *
-         * @param element the token of the parse tree, here the ">" symbol which comes after the "="
-         * @param uri the user-entered link text
-         * @throws SemanticException thrown if the URI is not syntactically or semantically valid
-         */
-        public void validateLinkTagURI(Token element, String uri) throws SemanticException;
-
-        /**
-         * Called by the SeamTextParser when a plain HTML element is parsed.
-         *
-         * @param element the token of the parse tree, call <tt>getText()</tt> to access the HTML tag name
-         * @throws SemanticException thrown when the HTML tag is not valid
-         */
-        public void validateHtmlElement(Token element) throws SemanticException;
-
-        /**
-         * Called by the SeamTextParser when a plain HTML attribute is parsed.
-         *
-         * @param element the token of the parse tree that represents the HTML tag
-         * @param attribute the token of the parse tree that represents the HTML attribute
-         * @throws SemanticException thrown if the attribute is not valid for the given HTML tag
-         */
-        public void validateHtmlAttribute(Token element, Token attribute) throws SemanticException;
-
-        /**
-         * Called by the SeamTextParser when a plain HTML attribute value is parsed.
-         *
-         * @param element the token of the parse tree that represents the HTML tag
-         * @param attribute the token of the parse tree that represents the HTML attribute
-         * @param attributeValue the plain string value of the HTML attribute
-         * @throws SemanticException thrown if the attribute value is not valid for the given HTML attribute and element
-         */
-        public void validateHtmlAttributeValue(Token element, Token attribute, String attributeValue) throws SemanticException;
-
-        public String getInvalidURIMessage(String uri);
-        public String getInvalidElementMessage(String elementName);
-        public String getInvalidAttributeMessage(String elementName, String attributeName);
-        public String getInvalidAttributeValueMessage(String elementName, String attributeName, String value);
-    }
-
-    /**
-     * Implementation of the rules in http://wiki.whatwg.org/wiki/Sanitization_rules
-     *
-     * <pre>
-     * Changes and additions:
-     *
-     * 1. Expanded all -* wildcard values to their full CSS property name (e.g. border-*).
-     *
-     * 2. Added dash as allowed characater to REGEX_VALID_CSS_STRING1.
-     *
-     * 3. Improved REGEX_VALID_CSS_VALUE with range {n,m} checks for color values and negative units.
-     *
-     * 4. Added more options (mostly of vertical-align property, e.g. "middle", "text-top") as allowed CSS values.
-     *
-     * 5. Added "max-height", "max-width", "min-height", "min-width" to CSS properties.
-     *
-     * 6. Removed 'data' URI scheme.
-     *
-     * 7. Not implemented filtering of CSS url() - it's an invalid value always.
-     *
-     * 8. Removed all &lt;form&gt;, &lt;input&gt; and other form tags. Attackers might use them to compromise
-     *    "outer" forms when entering such markup in a textarea.
-     * </pre>
-     *
-     */
-    public static class DefaultSanitizer implements SeamTextParser.Sanitizer {
-
-        public final java.util.regex.Pattern REGEX_VALID_CSS_STRING1 = java.util.regex.Pattern.compile(
-            "^([-:,;#%.\\sa-zA-Z0-9!]|\\w-\\w|'[\\s\\w]+'|\"[\\s\\w]+\"|\\([\\d,\\s]+\\))*$"
-        );
-
-        public final java.util.regex.Pattern REGEX_VALID_CSS_STRING2 = java.util.regex.Pattern.compile(
-            "^(\\s*[-\\w]+\\s*:\\s*[^:;]*(;|$))*$"
-        );
-
-        public final java.util.regex.Pattern REGEX_VALID_CSS_VALUE = java.util.regex.Pattern.compile(
-            "^(#[0-9a-f]{3,6}|rgb\\(\\d{1,3}%?,\\d{1,3}%?,?\\d{1,3}%?\\)?|-?\\d{0,2}\\.?\\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\\))?)$"
-        );
-
-        public final java.util.regex.Pattern REGEX_INVALID_CSS_URL = java.util.regex.Pattern.compile(
-            "url\\s*\\(\\s*[^\\s)]+?\\s*\\)\\s*"
-        );
-
-        protected java.util.Set<String> acceptableElements = new java.util.HashSet(java.util.Arrays.asList(
-            "a", "abbr", "acronym", "address", "area", "b", "bdo", "big", "blockquote",
-            "br", "caption", "center", "cite", "code", "col", "colgroup", "dd",
-            "del", "dfn", "dir", "div", "dl", "dt", "em", "font",
-            "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd",
-            "label", "legend", "li", "map", "menu", "ol", "p",
-            "pre", "q", "s", "samp", "small", "span", "strike", "strong",
-            "sub", "sup", "table", "tbody", "td", "tfoot", "th", "thead",
-            "tr", "tt", "u", "ul", "var", "wbr"
-        ));
-
-        protected java.util.Set<String> mathmlElements = new java.util.HashSet(java.util.Arrays.asList(
-            "maction", "math", "merror", "mfrac", "mi", "mmultiscripts", "mn", "mo",
-            "mover", "mpadded", "mphantom", "mprescripts", "mroot", "mrow", "mspace",
-            "msqrt", "mstyle", "msub", "msubsup", "msup", "mtable", "mtd", "mtext",
-            "mtr", "munder", "munderover", "none"
-        ));
-
-        protected java.util.Set<String> svgElements = new java.util.HashSet(java.util.Arrays.asList(
-            "a", "animate", "animateColor", "animateMotion", "animateTransform",
-            "circle", "defs", "desc", "ellipse", "font-face", "font-face-name",
-            "font-face-src", "g", "glyph", "hkern", "image", "line", "linearGradient",
-            "marker", "metadata", "missing-glyph", "mpath", "path", "polygon",
-            "polyline", "radialGradient", "rect", "set", "stop", "svg", "switch", "text",
-            "title", "tspan", "use"
-        ));
-
-        protected java.util.Set<String> acceptableAttributes = new java.util.HashSet(java.util.Arrays.asList(
-            "abbr", "accept", "accept-charset", "accesskey", "action", "align", "alt",
-            "axis", "border", "cellpadding", "cellspacing", "char", "charoff", "charset",
-            "checked", "cite", "class", "clear", "color", "cols", "colspan", "compact",
-            "coords", "datetime", "dir", "disabled", "enctype", "for", "frame",
-            "headers", "height", "href", "hreflang", "hspace", "id", "ismap", "label",
-            "lang", "longdesc", "maxlength", "media", "method", "multiple", "name",
-            "nohref", "noshade", "nowrap", "prompt", "readonly", "rel", "rev", "rows",
-            "rowspan", "rules", "scope", "selected", "shape", "size", "span", "src",
-            "start", "style", "summary", "tabindex", "target", "title", "type", "usemap",
-            "valign", "value", "vspace", "width", "xml:lang"
-        ));
-
-        protected java.util.Set<String> mathmlAttributes = new java.util.HashSet(java.util.Arrays.asList(
-            "actiontype", "align", "columnalign", "columnalign", "columnalign",
-            "columnlines", "columnspacing", "columnspan", "depth", "display",
-            "displaystyle", "equalcolumns", "equalrows", "fence", "fontstyle",
-            "fontweight", "frame", "height", "linethickness", "lspace", "mathbackground",
-            "mathcolor", "mathvariant", "mathvariant", "maxsize", "minsize", "other",
-            "rowalign", "rowalign", "rowalign", "rowlines", "rowspacing", "rowspan",
-            "rspace", "scriptlevel", "selection", "separator", "stretchy", "width",
-            "width", "xlink:href", "xlink:show", "xlink:type", "xmlns", "xmlns:xlink"
-        ));
-
-        protected java.util.Set<String> svgAttributes = new java.util.HashSet(java.util.Arrays.asList(
-            "accent-height", "accumulate", "additive", "alphabetic", "arabic-form",
-            "ascent", "attributeName", "attributeType", "baseProfile", "bbox", "begin",
-            "by", "calcMode", "cap-height", "class", "color", "color-rendering",
-            "content", "cx", "cy", "d", "descent", "display", "dur", "dx", "dy", "end",
-            "fill", "fill-rule", "font-family", "font-size", "font-stretch",
-            "font-style", "font-variant", "font-weight", "from", "fx", "fy", "g1", "g2",
-            "glyph-name", "gradientUnits", "hanging", "height", "horiz-adv-x",
-            "horiz-origin-x", "id", "ideographic", "k", "keyPoints", "keySplines",
-            "keyTimes", "lang", "marker-end", "marker-mid", "marker-start",
-            "markerHeight", "markerUnits", "markerWidth", "mathematical", "max", "min",
-            "name", "offset", "opacity", "orient", "origin", "overline-position",
-            "overline-thickness", "panose-1", "path", "pathLength", "points",
-            "preserveAspectRatio", "r", "refX", "refY", "repeatCount", "repeatDur",
-            "requiredExtensions", "requiredFeatures", "restart", "rotate", "rx", "ry",
-            "slope", "stemh", "stemv", "stop-color", "stop-opacity",
-            "strikethrough-position", "strikethrough-thickness", "stroke",
-            "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
-            "stroke-miterlimit", "stroke-opacity", "stroke-width", "systemLanguage",
-            "target", "text-anchor", "to", "transform", "type", "u1", "u2",
-            "underline-position", "underline-thickness", "unicode", "unicode-range",
-            "units-per-em", "values", "version", "viewBox", "visibility", "width",
-            "widths", "x", "x-height", "x1", "x2", "xlink:actuate", "xlink:arcrole",
-            "xlink:href", "xlink:role", "xlink:show", "xlink:title", "xlink:type",
-            "xml:base", "xml:lang", "xml:space", "xmlns", "xmlns:xlink", "y", "y1", "y2",
-            "zoomAndPan"
-        ));
-
-        protected java.util.Set<String> styleProperties = new java.util.HashSet(java.util.Arrays.asList(
-            "azimuth",
-            "background", "background-attachment", "background-color", "background-image",
-            "background-position", "background-repeat",
-            "border", "border-bottom", "border-bottom-color", "border-bottom-style",
-            "border-bottom-width", "border-collapse", "border-color", "border-left",
-            "border-left-color", "border-left-style", "border-left-width", "border-right",
-            "border-right-color", "border-right-style", "border-right-width", "border-spacing",
-            "border-style", "border-top", "border-top-color", "border-top-style",
-            "border-top-width", "border-width",
-            "clear", "color",
-            "cursor", "direction", "display", "elevation", "float", "font",
-            "font-family", "font-size", "font-style", "font-variant", "font-weight",
-            "height", "letter-spacing", "line-height",
-            "margin", "margin-bottom", "margin-left", "margin-right", "margin-top",
-            "max-height", "max-width", "min-height", "min-width",
-            "overflow",
-            "padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
-            "pause", "pause-after", "pause-before", "pitch",
-            "pitch-range", "richness", "speak", "speak-header", "speak-numeral",
-            "speak-punctuation", "speech-rate", "stress", "text-align",
-            "text-decoration", "text-indent", "unicode-bidi", "vertical-align",
-            "voice-family", "volume", "white-space", "width"
-        ));
-
-        protected java.util.Set<String> stylePropertiesValues = new java.util.HashSet(java.util.Arrays.asList(
-            "aqua", "auto", "baseline", "black", "block", "blue", "bold", "both", "bottom", "brown",
-            "center", "collapse", "dashed", "dotted", "fuchsia", "gray", "green",
-            "inherit", "italic", "left", "length", "lime", "maroon", "medium", "middle", "navy", "none", "normal",
-            "nowrap", "olive", "percentage", "pointer", "purple", "red", "right", "silver", "solid", "sub", "super",
-            "teal", "text-bottom", "text-top", "top", "transparent", "underline", "white", "yellow"
-        ));
-
-        protected java.util.Set<String> svgStyleProperties = new java.util.HashSet(java.util.Arrays.asList(
-            "fill", "fill-opacity", "fill-rule", "stroke", "stroke-linecap",
-            "stroke-linejoin", "stroke-opacity", "stroke-width"
-        ));
-
-        protected java.util.Set<String> attributesWhoseValueIsAURI = new java.util.HashSet(java.util.Arrays.asList(
-            "action", "cite", "href", "longdesc", "src", "xlink:href", "xml:base"
-        ));
-
-        protected java.util.Set<String> uriSchemes = new java.util.HashSet(java.util.Arrays.asList(
-            "afs", "aim", "callto", "ed2k", "feed", "ftp", "gopher", "http", "https",
-            "irc", "mailto", "news", "nntp", "rsync", "rtsp", "sftp", "ssh", "tag",
-            "tel", "telnet", "urn", "webcal", "wtai", "xmpp"
-        ));
-
-        public void validateLinkTagURI(Token element, String uri) throws SemanticException {
-            if (!validateURI(uri)) {
-                throw createSemanticException("Invalid URI", element);
-            }
-        }
-
-        public void validateHtmlElement(Token element) throws SemanticException {
-            String elementName = element.getText().toLowerCase();
-
-            if (!acceptableElements.contains(elementName) &&
-                !svgElements.contains(elementName) &&
-                !mathmlElements.contains(elementName)) {
-                throw createSemanticException(getInvalidElementMessage(elementName), element);
-            }
-        }
-
-        public void validateHtmlAttribute(Token element, Token attribute) throws SemanticException {
-            String elementName = element.getText().toLowerCase();
-            String attributeName = attribute.getText().toLowerCase();
-            if (!acceptableAttributes.contains(attributeName) &&
-                !svgAttributes.contains(attributeName) &&
-                !mathmlAttributes.contains(attributeName)) {
-                throw createSemanticException(getInvalidAttributeMessage(elementName, attributeName), element);
-            }
-        }
-
-        public void validateHtmlAttributeValue(Token element,
-                                               Token attribute,
-                                               String attributeValue) throws SemanticException {
-
-            if (attributeValue == null || attributeValue.length() == 0) return;
-
-            String elementName = element.getText().toLowerCase();
-            String attributeName = attribute.getText().toLowerCase();
-
-            // Check element with attribute that has URI value (href, src, etc.)
-            if (attributesWhoseValueIsAURI.contains(attributeName) && !validateURI(attributeValue)) {
-                throw createSemanticException(getInvalidURIMessage(attributeValue), element);
-            }
-
-            // Check attribute value of style (CSS filtering)
-            if (attributeName.equals("style")) {
-                if (!REGEX_VALID_CSS_STRING1.matcher(attributeValue).matches() ||
-                    !REGEX_VALID_CSS_STRING2.matcher(attributeValue).matches()) {
-                    throw createSemanticException(
-                        getInvalidAttributeValueMessage(elementName, attributeName, attributeValue),
-                        element
-                    );
-                }
-
-                String[] cssProperties = attributeValue.split(";");
-                for (String cssProperty : cssProperties) {
-                    if (!cssProperty.contains(":")) {
-                        throw createSemanticException(
-                            getInvalidAttributeValueMessage(elementName, attributeName, attributeValue),
-                            element
-                        );
-                    }
-                    String[] property = cssProperty.split(":");
-                    String propertyName = property[0].trim();
-                    String propertyValue = property.length == 2 ? property[1].trim() : null;
-
-                    // CSS property name
-                    if (!styleProperties.contains(propertyName) &&
-                        !svgStyleProperties.contains(propertyName)) {
-                        throw createSemanticException(
-                            getInvalidAttributeValueMessage(elementName, attributeName, attributeValue),
-                            element
-                        );
-                    }
-
-                    // CSS property value
-                    if (propertyValue != null && !stylePropertiesValues.contains(propertyValue)) {
-                        // Not in list, now check the regex
-                        if (!REGEX_VALID_CSS_VALUE.matcher(propertyValue).matches()) {
-                            throw createSemanticException(
-                                getInvalidAttributeValueMessage(elementName, attributeName, attributeValue),
-                                element
-                            );
-                        }
-                    }
-                }
-            }
-
-            // TODO: Implement SVG style checking?! Who cares...
-        }
-
-        /**
-         * Validate a URI string.
-         * <p>
-         * The default implementation accepts any URI string that starts with a slash,
-         * this is considered a relative URL. Any absolute URI is parsed by the JDK with
-         * the <tt>java.net.URI</tt> constructor. Finally, the scheme of the parsed
-         * absolute URI is checked with a list of valid schemes.
-         * </p>
-         *
-         * @param uri the URI string
-         * @return return true if the String represents a safe and valid URI
-         */
-        protected boolean validateURI(String uri) {
-
-            // Relative URI starts with a slash
-            if (uri.startsWith("/")) return true;
-
-            java.net.URI parsedURI;
-            try {
-                parsedURI = new java.net.URI(uri);
-            } catch (java.net.URISyntaxException ex) {
-                return false;
-            }
-
-            if (!uriSchemes.contains(parsedURI.getScheme())) {
-                return false;
-            }
-            return true;
-        }
-
-        public String getInvalidURIMessage(String uri) {
-            return "invalid URI";
-        }
-
-        public String getInvalidElementMessage(String elementName) {
-            return "invalid element '" + elementName + "'";
-        }
-
-        public String getInvalidAttributeMessage(String elementName, String attributeName) {
-            return "invalid attribute '" + attributeName + "' for element '" + elementName + "'";
-        }
-
-        public String getInvalidAttributeValueMessage(String elementName, String attributeName, String value) {
-            return "invalid value of attribute '" + attributeName + "' for element '" + elementName + "'";
-        };
-
-        public SemanticException createSemanticException(String message, Token element) {
-            return new SemanticException(
-                message,
-                element.getFilename(), element.getLine(), element.getColumn()
-            );
-        }
-
-    }
-
-    private Sanitizer sanitizer = new DefaultSanitizer();
-    public void setSanitizer(Sanitizer sanitizer) {
-       this.sanitizer = sanitizer;
-    }
-
-    private Macro currentMacro;
-    private java.util.Stack<Token> htmlElementStack = new java.util.Stack<Token>();
-
-    private StringBuilder mainBuilder = new StringBuilder();
-    private StringBuilder builder = mainBuilder;
-
-    public String toString() {
-        return builder.toString();
-    }
-    
-    private void append(String... strings) {
-        for (String string: strings) builder.append(string);
-    }
-    
-    private static boolean hasMultiple(String string, char c) {
-        return string.indexOf(c)!=string.lastIndexOf(c);
-    }
-
-    private void beginCapture() {
-        builder = new StringBuilder();
-    }
-    
-    private String endCapture() {
-        String result = builder.toString();
-        builder = mainBuilder;
-        return result;
-    }
-
-    protected String linkTag(String description, String url) {
-        return "<a href=\"" + url + "\" class=\"seamTextLink\">" + description + "</a>";
-    }
-
-    protected String macroInclude(String macroName) {
-        return "";
-    }
-
-    protected String macroInclude(Macro m) {
-        return macroInclude(m.name);
-    }
-
-    protected String paragraphOpenTag() {
-        return "<p class=\"seamTextPara\">\n";
-    }
-
-    protected String preformattedText(String text) {
-        return "<pre class=\"seamTextPreformatted\">\n" + text + "</pre>\n";
-    }
-
-    protected String blockquoteOpenTag() {
-        return "<blockquote class=\"seamTextBlockquote\">\n";
-    }
-
-    protected String headline1(String line) {
-        return "<h1 class=\"seamTextHeadline1\">" + line + "</h1>";
-    }
-
-    protected String headline2(String line) {
-        return "<h2 class=\"seamTextHeadline2\">" + line + "</h2>";
-    }
-
-    protected String headline3(String line) {
-        return "<h3 class=\"seamTextHeadline3\">" + line + "</h3>";
-    }
-
-    protected String headline4(String line) {
-        return "<h4 class=\"seamTextHeadline4\">" + line + "</h4>";
-    }
-
-    protected String orderedListOpenTag() {
-        return "<ol class=\"seamTextOrderedList\">\n";
-    }
-
-    protected String orderedListItemOpenTag() {
-        return "<li class=\"seamTextOrderedListItem\">";
-    }
-
-    protected String unorderedListOpenTag() {
-        return "<ul class=\"seamTextUnorderedList\">\n";
-    }
-
-    protected String unorderedListItemOpenTag() {
-        return "<li class=\"seamTextUnorderedListItem\">";
-    }
-
-    protected String emphasisOpenTag() {
-        return "<i class=\"seamTextEmphasis\">";
-    }
-
-    protected String emphasisCloseTag() {
-        return "</i>";
-    }
-}
-
-startRule: (newline)* ( (heading (newline)* )? text (heading (newline)* text)* )?
-    ;
-
-text: ( (paragraph|preformatted|blockquote|list|html) (newline)* )+
-    ;
-        
-paragraph: { append( paragraphOpenTag() ); } (line newlineOrEof)+ { append("</p>\n"); } newlineOrEof
-    ;
-    
-line: (plain|formatted) (plain|formatted|preformatted|quoted|html)*
-    ;
-    
-blockquote: DOUBLEQUOTE { append( blockquoteOpenTag() ); }
-            (plain|formatted|preformatted|newline|html|list)*
-            DOUBLEQUOTE newlineOrEof { append("</blockquote>\n"); }
-    ;
-    
-preformatted: BACKTICK
-              { beginCapture(); }
-              (word|punctuation|specialChars|moreSpecialChars|htmlSpecialChars|space|newline)*
-              { String text=endCapture(); }
-              { append( preformattedText(text) ); }
-              BACKTICK
-    ;
-    
-plain: word|punctuation|escape|space|link|macro
-    ;
-  
-formatted: underline|emphasis|monospace|superscript|deleted
-    ;
-
-word: an:ALPHANUMERICWORD { append( an.getText() ); } | uc:UNICODEWORD { append( uc.getText() ); }
-    ;
-
-punctuation: p:PUNCTUATION { append( p.getText() ); }
-           | sq:SINGLEQUOTE { append( sq.getText() ); }
-           | s:SLASH { append( s.getText() ); }
-    ;
-    
-escape: ESCAPE ( specialChars | moreSpecialChars | evenMoreSpecialChars | htmlSpecialChars | b:BACKTICK {append( b.getText() );} )
-    ;
-    
-specialChars:
-          st:STAR { append( st.getText() ); } 
-        | b:BAR { append( b.getText() ); }
-        | h:HAT { append( h.getText() ); }
-        | p:PLUS { append( p.getText() ); }
-        | eq:EQ { append( eq.getText() ); }
-        | hh:HASH { append( hh.getText() ); }
-        | e:ESCAPE { append( e.getText() ); }
-        | t:TWIDDLE { append( t.getText() ); }
-        | u:UNDERSCORE { append( u.getText() ); }
-    ;
-    
-moreSpecialChars:
-          o:OPEN { append( o.getText() ); }
-        | c:CLOSE { append( c.getText() ); }
-    ;
-    
-evenMoreSpecialChars: 
-          q:QUOTE { append( q.getText() ); }
-    ;
-
-htmlSpecialChars: 
-      GT { append("&gt;"); } 
-    | LT { append("&lt;"); } 
-    | DOUBLEQUOTE { append("&quot;"); } 
-    | AMPERSAND { append("&amp;"); }
-    ;
-
-link: OPEN
-      { beginCapture(); } 
-      (word|punctuation|escape|space)*
-      { String text=endCapture(); } 
-      EQ gt:GT
-      { beginCapture(); }
-      attributeValue 
-      {
-         String link = endCapture();
-         sanitizer.validateLinkTagURI(gt, link);
-         append(linkTag(text, link));
-      }
-      CLOSE
-    ;
-
-/*
-
-[<=macro[param1=value "1"][param2=value '2']]
-
-*/
-macro: OPEN
-      LT EQ
-      mn:ALPHANUMERICWORD { currentMacro = new Macro(mn.getText()); }
-      (macroParam)*
-      CLOSE
-      { append( macroInclude(currentMacro) ); currentMacro = null; }
-    ;
-
-macroParam:
-      OPEN
-      pn:ALPHANUMERICWORD
-      EQ
-      { beginCapture(); }
-      macroParamValue
-      { String pv = endCapture(); currentMacro.params.put(pn.getText(),pv); }
-      CLOSE
-    ;
-
-macroParamValue:
-      ( amp:AMPERSAND       { append(amp.getText()); } |
-        dq:DOUBLEQUOTE      { append(dq.getText()); } |
-        sq:SINGLEQUOTE      { append(sq.getText()); } |
-        an:ALPHANUMERICWORD { append(an.getText()); } |
-        p:PUNCTUATION       { append(p.getText()); } |
-        s:SLASH             { append(s.getText()); } |
-        lt:LT               { append(lt.getText()); } |
-        gt:GT               { append(gt.getText()); } |
-        space | specialChars )*
-    ;
-
-emphasis: STAR { append( emphasisOpenTag() ); }
-      (plain|underline|monospace|superscript|deleted|newline)+
-      STAR { append( emphasisCloseTag() ); }
-    ;
-    
-underline: UNDERSCORE { append("<u>"); }
-           (plain|emphasis|monospace|superscript|deleted|newline)+
-           UNDERSCORE { append("</u>"); }
-    ;
-    
-
-monospace: BAR { append("<tt>"); }
-           (word | punctuation | space 
-          | st:STAR { append( st.getText() ); }
-          | h:HAT { append( h.getText() ); }
-          | p:PLUS { append( p.getText() ); }
-          | eq:EQ { append( eq.getText() ); }
-          | hh:HASH { append( hh.getText() ); }
-          | e:ESCAPE { append( e.getText() ); }
-          | t:TWIDDLE { append( t.getText() ); }
-          | u:UNDERSCORE { append( u.getText() ); }
-          | moreSpecialChars
-          | htmlSpecialChars
-          | newline)+
-           BAR { append("</tt>"); }
-    ;
-    
-superscript: HAT { append("<sup>"); }
-             (plain|emphasis|underline|monospace|deleted|newline)+
-             HAT { append("</sup>"); }
-    ;
-    
-deleted: TWIDDLE { append("<del>"); }
-         (plain|emphasis|underline|monospace|superscript|newline)+
-         TWIDDLE { append("</del>"); }
-    ;
-    
-quoted: DOUBLEQUOTE { append("<q>"); }
-        (plain|emphasis|underline|monospace|superscript|deleted|newline)+
-        DOUBLEQUOTE { append("</q>"); }
-    ;
-
-heading: ( h1 | h2 | h3 | h4 ) newlineOrEof
-    ;
-  
-h1: PLUS
-      { beginCapture(); }
-      line
-      { String headline=endCapture(); }
-      { append(headline1(headline.trim())); }
-    ;
- 
-h2: PLUS PLUS
-      { beginCapture(); }
-      line
-      { String headline=endCapture(); }
-      { append(headline2(headline.trim())); }
-    ;
-
-h3: PLUS PLUS PLUS
-      { beginCapture(); }
-      line
-      { String headline=endCapture(); }
-      { append(headline3(headline.trim())); }
-    ;
- 
-h4: PLUS PLUS PLUS PLUS
-      { beginCapture(); }
-      line
-      { String headline=endCapture(); }
-      { append(headline4(headline.trim())); }
-    ;
-
-list: ( olist | ulist ) newlineOrEof
-    ;
-    
-olist: { append( orderedListOpenTag() ); } (olistLine newlineOrEof)+ { append("</ol>\n"); }
-    ;
-    
-olistLine: HASH { append( orderedListItemOpenTag() ); } line { append("</li>"); }
-    ;
-    
-ulist: { append( unorderedListOpenTag() ); } (ulistLine newlineOrEof)+ { append("</ul>\n"); }
-    ;
-    
-ulistLine: EQ { append( unorderedListItemOpenTag() ); } line { append("</li>"); }
-    ;
-
-space: s:SPACE { append( s.getText() ); }
-    ;
-    
-newline: n:NEWLINE { append( n.getText() ); }
-    ;
-
-newlineOrEof: newline | EOF
-    ;
-
-html: openTag ( space | space attribute )* ( ( beforeBody body closeTagWithBody ) | closeTagWithNoBody )
-    ;
-
-body: (plain|formatted|preformatted|quoted|html|list|newline)*
-    ;
-
-openTag:
-      LT name:ALPHANUMERICWORD
-      {
-         htmlElementStack.push(name);
-         sanitizer.validateHtmlElement(name);
-         append("<");
-         append(name.getText());
-      }
-    ;
-    exception // for rule
-        catch [RecognitionException ex] {
-            // We'd like to have an error reported that names the opening HTML, this
-            // helps users to find the actual start of their problem in the wiki text.
-            if (htmlElementStack.isEmpty()) throw ex;
-            Token tok = htmlElementStack.peek();
-            if (tok != null) {
-                throw new HtmlRecognitionException(tok, ex);
-            } else {
-                throw ex;
-            }
-        }
-
-beforeBody: GT { append(">"); }
-    ;
-    exception // for rule
-        catch [RecognitionException ex] {
-            // We'd like to have an error reported that names the opening HTML, this
-            // helps users to find the actual start of their problem in the wiki text.
-            if (htmlElementStack.isEmpty()) throw ex;
-            Token tok = htmlElementStack.peek();
-            if (tok != null) {
-                throw new HtmlRecognitionException(tok, ex);
-            } else {
-                throw ex;
-            }
-        }
-
-closeTagWithBody:
-      LT SLASH name:ALPHANUMERICWORD GT
-      {
-         append("</");
-         append(name.getText());
-         append(">");
-         htmlElementStack.pop();
-      }
-    ;
-    
-closeTagWithNoBody:
-      SLASH GT
-      {
-         append("/>");
-         htmlElementStack.pop();
-      }
-    ;
-
-attribute: att:ALPHANUMERICWORD (space)* EQ (space)*
-           DOUBLEQUOTE
-           {
-               sanitizer.validateHtmlAttribute(htmlElementStack.peek(), att);
-               append(att.getText());
-               append("=\"");
-           }
-           {
-               beginCapture();
-           }
-           attributeValue
-           {
-               String attValue = endCapture();
-               sanitizer.validateHtmlAttributeValue(htmlElementStack.peek(), att, attValue);
-               append(attValue);
-           }
-           DOUBLEQUOTE { append("\""); }
-    ;
-    exception // for rule
-        catch [RecognitionException ex] {
-            // We'd like to have an error reported that names the opening HTML, this
-            // helps users to find the actual start of their problem in the wiki text.
-            if (htmlElementStack.isEmpty()) throw ex;
-            Token tok = htmlElementStack.peek();
-            if (tok != null) {
-                throw new HtmlRecognitionException(tok, ex);
-            } else {
-                throw ex;
-            }
-        }
-
-attributeValue: ( AMPERSAND { append("&amp;"); } |
-                an:ALPHANUMERICWORD { append( an.getText() ); } |
-                p:PUNCTUATION { append( p.getText() ); } |
-                s:SLASH { append( s.getText() ); } |
-                space | specialChars )*
-    ;
-    exception // for rule
-        catch [RecognitionException ex] {
-            // We'd like to have an error reported that names the opening HTML, this
-            // helps users to find the actual start of their problem in the wiki text.
-            if (htmlElementStack.isEmpty()) throw ex;
-            Token tok = htmlElementStack.peek();
-            if (tok != null) {
-                throw new HtmlRecognitionException(tok, ex);
-            } else {
-                throw ex;
-            }
-        }
-
-class SeamTextLexer extends Lexer;
-options
-{
-   k=2;
-
-   // Allow any char but \uFFFF (16 bit -1)
-   charVocabulary='\u0000'..'\uFFFE';
-}
-
-// Unicode sets allowed:
-// '\u00a0'..'\u00ff'  Latin 1 supplement (no control characters) http://www.unicode.org/charts/PDF/U0080.pdf
-// '\u0100'..'\u017f'  Latin Extended A http://www.unicode.org/charts/PDF/U0100.pdf
-// '\u0180'..'\u024f'  Latin Extended B http://www.unicode.org/charts/PDF/U0180.pdf
-// '\u0250'..'\ufaff'  Various other languages, punctuation etc. (excluding "presentation forms")
-// '\uff00'..'\uffef'  Halfwidth and Fullwidth forms (including CJK punctuation)
-
-ALPHANUMERICWORD
-    options {
-        paraphrase = "letters or digits";
-    }
-    :   ('a'..'z'|'A'..'Z'|'0'..'9')+
-    ;
-
-UNICODEWORD
-    options {
-        paraphrase = "letters or digits";
-    }
-    : (
-         '\u00a0'..'\u00ff' |
-         '\u0100'..'\u017f' |
-         '\u0180'..'\u024f' |
-         '\u0250'..'\ufaff' |
-         '\uff00'..'\uffef'
-      )+
-    ;
-
-PUNCTUATION
-    options {
-        paraphrase = "a punctuation character";
-    }
-    : '-' | ';' | ':' | '(' | ')' | '{' | '}' | '?' | '!' | '@' | '%' | '.' | ',' | '$'
-    ;
-    
-EQ
-    options {
-        paraphrase = "an equals '='";
-    }
-    : '='
-    ;
-    
-PLUS
-    options {
-        paraphrase = "a plus '+'";
-    }
-    : '+'
-    ;
-    
-UNDERSCORE
-    options {
-        paraphrase = "an underscore '_'";
-    }
-    : '_'
-    ;
-
-STAR
-    options {
-        paraphrase = "a star '*'";
-    }
-    : '*'
-    ;
-
-SLASH
-    options {
-        paraphrase = "a slash '/'";
-    }
-
-    : '/'
-    ;
-
-ESCAPE
-    options {
-        paraphrase = "the escaping blackslash '\'";
-    }
-    : '\\'
-    ;
-    
-BAR
-    options {
-        paraphrase = "a bar or pipe '|'";
-    }
-    : '|'
-    ;
-    
-BACKTICK
-    options {
-        paraphrase = "a backtick '`'";
-    }
-    : '`'
-    ;
-    
-    
-TWIDDLE
-    options {
-        paraphrase = "a tilde '~'";
-    }
-    : '~'
-    ;
-
-DOUBLEQUOTE
-    options {
-        paraphrase = "a doublequote \"";
-    }
-    : '"'
-    ;
-
-SINGLEQUOTE
-    options {
-        paraphrase = "a single quote '";
-    }
-    : '\''
-    ;
-
-OPEN
-    options {
-        paraphrase = "an opening square bracket '['";
-    }
-    : '['
-    ;
-    
-CLOSE
-    options {
-        paraphrase = "a closing square bracket ']'";
-    }
-    : ']'
-    ;
-
-HASH
-    options {
-        paraphrase = "a hash '#'";
-    }
-    : '#'
-    ;
-    
-HAT
-    options {
-        paraphrase = "a caret '^'";
-    }
-    : '^'
-    ;
-    
-GT
-    options {
-        paraphrase = "a closing angle bracket '>'";
-    }
-    : '>'
-    ;
-    
-LT
-    options {
-        paraphrase = "an opening angle bracket '<'";
-    }
-    : '<'
-    ;
-
-AMPERSAND
-    options {
-        paraphrase = "an ampersand '&'";
-    }
-    : '&'
-    ;
-
-SPACE
-    options {
-        paraphrase = "a space or tab";
-    }
-    : (' '|'\t')+
-    ;
-    
-NEWLINE
-    options {
-        paraphrase = "a newline";
-    }
-    : "\r\n" | '\r' | '\n'
-    ;
-
-EOF
-    options {
-        paraphrase = "the end of the text";
-    }
-    : '\uFFFF'
-    ;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Component.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Component.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Component.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,3008 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam;
-
-import static org.jboss.seam.ComponentType.ENTITY_BEAN;
-import static org.jboss.seam.ComponentType.JAVA_BEAN;
-import static org.jboss.seam.ComponentType.MESSAGE_DRIVEN_BEAN;
-import static org.jboss.seam.ComponentType.STATEFUL_SESSION_BEAN;
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.ScopeType.CONVERSATION;
-import static org.jboss.seam.ScopeType.EVENT;
-import static org.jboss.seam.ScopeType.PAGE;
-import static org.jboss.seam.ScopeType.SESSION;
-import static org.jboss.seam.ScopeType.STATELESS;
-import static org.jboss.seam.ScopeType.UNSPECIFIED;
-import static org.jboss.seam.util.EJB.INTERCEPTORS;
-import static org.jboss.seam.util.EJB.LOCAL;
-import static org.jboss.seam.util.EJB.PERSISTENCE_CONTEXT;
-import static org.jboss.seam.util.EJB.POST_ACTIVATE;
-import static org.jboss.seam.util.EJB.POST_CONSTRUCT;
-import static org.jboss.seam.util.EJB.PRE_DESTROY;
-import static org.jboss.seam.util.EJB.PRE_PASSIVATE;
-import static org.jboss.seam.util.EJB.REMOTE;
-import static org.jboss.seam.util.EJB.REMOVE;
-import static org.jboss.seam.util.EJB.value;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.SortedSet;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.concurrent.locks.ReentrantLock;
-
-import javassist.util.proxy.MethodFilter;
-import javassist.util.proxy.MethodHandler;
-import javassist.util.proxy.ProxyObject;
-
-import javax.naming.NamingException;
-import javax.servlet.http.HttpSessionActivationListener;
-
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.DataBinderClass;
-import org.jboss.seam.annotations.DataSelectorClass;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.Import;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.JndiName;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Out;
-import org.jboss.seam.annotations.PerNestedConversation;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.Synchronized;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.bpm.BeginTask;
-import org.jboss.seam.annotations.bpm.EndTask;
-import org.jboss.seam.annotations.bpm.StartTask;
-import org.jboss.seam.annotations.datamodel.DataModel;
-import org.jboss.seam.annotations.faces.Converter;
-import org.jboss.seam.annotations.faces.Validator;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.annotations.intercept.Interceptors;
-import org.jboss.seam.annotations.security.PermissionCheck;
-import org.jboss.seam.annotations.security.Restrict;
-import org.jboss.seam.annotations.security.RoleCheck;
-import org.jboss.seam.annotations.web.RequestParameter;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Mutable;
-import org.jboss.seam.core.Expressions.MethodExpression;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.databinding.DataBinder;
-import org.jboss.seam.databinding.DataSelector;
-import org.jboss.seam.ejb.SeamInterceptor;
-import org.jboss.seam.intercept.ClientSideInterceptor;
-import org.jboss.seam.intercept.Interceptor;
-import org.jboss.seam.intercept.JavaBeanInterceptor;
-import org.jboss.seam.intercept.Proxy;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Conversions;
-import org.jboss.seam.util.Naming;
-import org.jboss.seam.util.ProxyFactory;
-import org.jboss.seam.util.Reflections;
-import org.jboss.seam.util.SortItem;
-import org.jboss.seam.util.Sorter;
-import org.jboss.seam.util.Conversions.PropertyValue;
-import org.jboss.seam.web.Parameters;
-
-/**
- * Metamodel class for component classes.
- * 
- * A Seam component is any class with a @Name annotation.
- *
- * @author Thomas Heute
- * @author Gavin King
- * 
- */
- at Scope(ScopeType.APPLICATION)
-public class Component extends Model
-{
-   public static final String PROPERTIES = "org.jboss.seam.properties";
-
-   private static final LogProvider log = Logging.getLogProvider(Component.class);
-   
-   static ReentrantLock factoryLock = new ReentrantLock();
-   
-   private ComponentType type;
-   private String name;
-   private ScopeType scope;
-   private String jndiName;
-   private boolean interceptionEnabled;
-   private boolean startup;
-   private String[] dependencies;
-   private boolean synchronize;
-   private long timeout;
-   private boolean secure;
-
-   private Set<Class> businessInterfaces;
-
-   private Method destroyMethod;
-   private Method createMethod;
-   private Method unwrapMethod;
-   private Method defaultRemoveMethod;
-   
-   //TODO: check the EJB3 spec, I think you
-   //      are allowed to have multiple
-   //      lifecycle methods on a bean!
-   private Method preDestroyMethod;
-   private Method postConstructMethod;
-   private Method prePassivateMethod;
-   private Method postActivateMethod;
-   
-   private Map<String, Method> removeMethods = new HashMap<String, Method>();
-   private Set<Method> lifecycleMethods = new HashSet<Method>();
-   private Set<Method> conversationManagementMethods = new HashSet<Method>();
-   
-   private List<BijectedAttribute<In>> inAttributes = new ArrayList<BijectedAttribute<In>>();
-   private List<BijectedAttribute<Out>> outAttributes = new ArrayList<BijectedAttribute<Out>>();
-   private List<BijectedAttribute> parameterSetters = new ArrayList<BijectedAttribute>();
-   private List<BijectedAttribute> dataModelGetters = new ArrayList<BijectedAttribute>();
-   private List<BijectedAttribute> pcAttributes = new ArrayList<BijectedAttribute>();
-   private Map<String, BijectedAttribute> dataModelSelectionSetters = new HashMap<String, BijectedAttribute>();
-   
-   private List<Interceptor> interceptors = new ArrayList<Interceptor>();
-   private List<Interceptor> clientSideInterceptors = new ArrayList<Interceptor>();
-
-   private Map<Method, InitialValue> initializerSetters = new HashMap<Method, InitialValue>();
-   private Map<Field, InitialValue> initializerFields = new HashMap<Field, InitialValue>();
-
-   private List<Field> logFields = new ArrayList<Field>();
-   private List<org.jboss.seam.log.Log> logInstances = new ArrayList<org.jboss.seam.log.Log>();
-   
-   private Collection<Namespace> imports = new ArrayList<Namespace>();
-   private Namespace namespace;
-   
-   private boolean perNestedConversation;
-
-   private Class<ProxyObject> factory;
-
-   //only used for tests
-   public Component(Class<?> clazz)
-   {
-      this( clazz, getComponentName(clazz) );
-   }
-
-   // only used for tests
-   public Component(Class<?> clazz, String componentName)
-   {
-      this(clazz, componentName, Seam.getComponentScope(clazz), false, new String[0], null);
-   }
-
-   // only used for tests
-   public Component(Class<?> clazz, Context applicationContext)
-   {
-      this( clazz, getComponentName(clazz), Seam.getComponentScope(clazz), false, new String[0], null, applicationContext );
-   }
-
-   public Component(Class<?> clazz, String componentName, ScopeType componentScope, boolean startup, String[] dependencies, String jndiName)
-   {
-      this(clazz, componentName, componentScope, startup, dependencies, jndiName, Contexts.getApplicationContext());
-   }
-
-   private Component(Class<?> beanClass, String componentName, ScopeType componentScope, boolean startup, String[] dependencies, String componentJndiName, Context applicationContext)
-   {
-      super(beanClass);
-      
-      name = componentName;
-      scope = componentScope;
-      this.startup = startup;
-      this.dependencies = dependencies;
-      type = Seam.getComponentType( getBeanClass() );
-      interceptionEnabled = Seam.isInterceptionEnabled( getBeanClass() );
-      perNestedConversation = hasAnnotation(getBeanClass(), PerNestedConversation.class);
-      
-      checkName();  
-      checkNonabstract();
-      
-      initNamespace(componentName, applicationContext);
-      initImports(applicationContext);
-      initSynchronize();
-      initStartup();
-      initSecurity();
-
-      checkScopeForComponentType();
-      checkSynchronizedForComponentType();
-      checkSerializableForComponentType();
-
-      jndiName = componentJndiName == null ?
-            getJndiName(applicationContext) : componentJndiName;
-
-      log.info(
-            "Component: " + getName() +
-            ", scope: " + getScope() +
-            ", type: " + getType() +
-            ", class: " + getBeanClass().getName() +
-            ( jndiName==null ? "" : ", JNDI: " + jndiName )
-         );
-
-      initMembers( getBeanClass(), applicationContext );
-      checkDefaultRemoveMethod();
-
-      businessInterfaces = getBusinessInterfaces( getBeanClass() );
-
-      if ( interceptionEnabled )
-      {
-         initInterceptors();
-      }
-
-      initInitializers(applicationContext);
-      
-      registerConverterOrValidator(applicationContext);
-
-   }
-
-   private void checkName()
-   {
-      for ( char c: name.toCharArray() )
-      {
-         if ( !Character.isJavaIdentifierPart(c) && c!='.' )
-         {
-            throw new IllegalStateException("not a valid Seam component name: " + name);
-         }
-      }
-   }
-
-   private void checkNonabstract()
-   {
-      if ( getBeanClass().isInterface() )
-      {
-         throw new IllegalArgumentException("component class is an interface: " + name);
-      }
-      if ( Modifier.isAbstract( getBeanClass().getModifiers() ) )
-      {
-         throw new IllegalArgumentException("component class is abstract: " + name);
-      }
-   }
-
-   private void initStartup()
-   {
-      if (startup)
-      {
-         if (scope!=SESSION && scope!=APPLICATION)
-         {
-            throw new IllegalArgumentException("@Startup only supported for SESSION or APPLICATION scoped components: " + name);
-         }
-         Startup annotation = getBeanClass().getAnnotation(Startup.class);
-         if (dependencies.length == 0 && annotation != null)
-         {
-            dependencies = annotation.depends();
-         }
-      }
-   }
-
-   private void initSynchronize()
-   {
-      boolean hasAnnotation = getBeanClass().isAnnotationPresent(Synchronized.class); 
-      
-      // Technically, we don't need to synchronize page-scoped components if StateManager#isSavingStateInClient(FacesContext) is true 
-      synchronize = ( scope==SESSION || scope==PAGE || hasAnnotation );
-            
-      if (synchronize)
-      {
-         timeout = getBeanClass().isAnnotationPresent(Synchronized.class) ?
-               getBeanClass().getAnnotation(Synchronized.class).timeout() :
-               Synchronized.DEFAULT_TIMEOUT;
-      }
-      
-      if (hasAnnotation && !interceptionEnabled)
-      {
-         log.warn("Interceptors are disabled for @Synchronized component - synchronization will be disabled for: " + name);
-      }
-   }
-   
-   private void registerConverterOrValidator(Context applicationContext)
-   {
-      if (applicationContext!=null) //for unit tests!
-      {
-         Init init = (Init) applicationContext.get( Seam.getComponentName(Init.class) );
-         if (init!=null)
-         {
-            if ( getBeanClass().isAnnotationPresent(Converter.class) )
-            {
-               if(!getBeanClass().isAnnotationPresent(BypassInterceptors.class))
-                  throw new IllegalStateException("Converter " + getBeanClass().getName() 
-                        + " must be annotated with @BypassInterceptors");
-               
-               Converter converter = getBeanClass().getAnnotation(Converter.class);
-               if ( converter.forClass()!=void.class )
-               {
-                  init.getConvertersByClass().put( converter.forClass(), getName() );
-               }
-               String id = converter.id().equals("") ? getName() : converter.id();
-               init.getConverters().put( id, getName() );
-            }
-            if ( getBeanClass().isAnnotationPresent(Validator.class) )
-            {
-               if(!getBeanClass().isAnnotationPresent(BypassInterceptors.class))
-                  throw new IllegalStateException("Validator " + getBeanClass().getName() 
-                        + " must be annotated with @BypassInterceptors");
-
-               Validator validator = getBeanClass().getAnnotation(Validator.class);
-               String id = validator.id().equals("") ? getName() : validator.id();
-               init.getValidators().put( id, getName() );
-            }
-         }
-      }
-   }
-
-   private void initNamespace(String componentName, Context applicationContext)
-   {  
-      if (applicationContext!=null) { //for unit tests!
-         Init init = (Init) applicationContext.get(Seam.getComponentName(Init.class));
-         if (init!=null) {
-            this.namespace = init.initNamespaceForName(componentName, true);
-         }
-      }
-   }
-   
-   private void initImports(Context applicationContext)
-   {
-      if (applicationContext!=null) //for unit tests!
-      {
-         Init init = (Init) applicationContext.get( Seam.getComponentName(Init.class) );
-         if (init!=null)
-         {
-            if ( getBeanClass().isAnnotationPresent(Import.class) )
-            {
-               addImport( init, getBeanClass().getAnnotation(Import.class) );
-            }
-            
-            Package pkg = getBeanClass().getPackage();
-            if ( pkg!=null && pkg.isAnnotationPresent(Import.class) )
-            {
-               addImport( init, getBeanClass().getPackage().getAnnotation(Import.class) );
-            }
-         }
-      }
-   }
-
-   private void addImport(Init init, Import imp)
-   {
-       for (String ns: imp.value()) {
-           imports.add(init.initNamespaceForName(ns, false));
-       }
-   }
-
-   private void checkScopeForComponentType()
-   {
-      if ( scope==STATELESS && (type==STATEFUL_SESSION_BEAN || type==ENTITY_BEAN) )
-      {
-         throw new IllegalArgumentException("Only stateless session beans and Java beans may be bound to the STATELESS context: " + name);
-      }
-      if ( scope==PAGE && type==STATEFUL_SESSION_BEAN )
-      {
-         throw new IllegalArgumentException("Stateful session beans may not be bound to the PAGE context: " + name);
-      }
-      if ( scope==APPLICATION && type==STATEFUL_SESSION_BEAN )
-      {
-         log.warn("Stateful session beans was bound to the APPLICATION context - note that it is not safe to make concurrent calls to the bean: " + name);
-      }
-      if ( scope!=STATELESS && type==MESSAGE_DRIVEN_BEAN )
-      {
-         throw new IllegalArgumentException("Message-driven beans must be bound to STATELESS context: " + name);
-      }      
-      if ( scope!=STATELESS && type==ComponentType.STATELESS_SESSION_BEAN )
-      {
-          log.warn("Stateless session beans should only be bound to the STATELESS context:" + name);
-      }      
-   }
-   
-   protected void checkSynchronizedForComponentType()
-   {
-      if (scope==STATELESS && synchronize)
-      {
-         throw new IllegalArgumentException("@Synchronized not meaningful for stateless components: " + name);
-      }
-   }
-   
-   private void checkSerializableForComponentType()
-   {
-      boolean serializableScope = scope==PAGE || scope==SESSION || scope==CONVERSATION;
-      boolean serializableType = type==JAVA_BEAN || type==ENTITY_BEAN;
-      if ( serializableType && serializableScope && !Serializable.class.isAssignableFrom( getBeanClass() ) )
-      {
-         log.warn("Component class should be serializable: " + name);
-      }
-   }
-
-   private String getJndiName(Context applicationContext)
-   {
-      if ( getBeanClass().isAnnotationPresent(JndiName.class) )
-      {
-         return getBeanClass().getAnnotation(JndiName.class).value();
-      }
-      else
-      {
-         switch (type) {
-            case ENTITY_BEAN:
-            case JAVA_BEAN:
-               return null;
-            default:
-               if (applicationContext==null) return null; //TODO: Yew!!!
-               String jndiPattern = Init.instance().getJndiPattern();
-               if (jndiPattern==null)
-               {
-                  throw new IllegalArgumentException("You must specify org.jboss.seam.core.init.jndiPattern or use @JndiName: " + name);
-               }
-               return jndiPattern.replace( "#{ejbName}", Seam.getEjbName(getBeanClass()) );
-         }
-      }
-   }
-
-   private void initInitializers(Context applicationContext)
-   {
-      if (applicationContext==null) return; //TODO: yew!!!!!
-      Map<String, Conversions.PropertyValue> properties = (Map<String, Conversions.PropertyValue>) applicationContext.get(PROPERTIES);
-      if (properties==null) return; //TODO: yew!!!!!
-
-
-      for ( Map.Entry<String, Conversions.PropertyValue> me: properties.entrySet() )
-      {
-         String key = me.getKey();
-         Conversions.PropertyValue propertyValue = me.getValue();
-
-         if ( key.startsWith(name) && key.charAt( name.length() )=='.' )
-         {
-            if ( log.isDebugEnabled() ) log.debug( key + "=" + propertyValue );
-
-            /*if ( type==ENTITY_BEAN )
-            {
-               throw new IllegalArgumentException("can not configure entity beans: " + name);
-            }*/
-
-            String propertyName = key.substring( name.length()+1, key.length() );
-            Method setterMethod = null;
-            try { 
-                setterMethod = Reflections.getSetterMethod(getBeanClass(), propertyName);
-            } catch (IllegalArgumentException e) {}
-            if (setterMethod!=null)
-            {
-               if ( !setterMethod.isAccessible() ) setterMethod.setAccessible(true);
-               Class parameterClass = setterMethod.getParameterTypes()[0];
-               Type parameterType = setterMethod.getGenericParameterTypes()[0];
-               initializerSetters.put( setterMethod, getInitialValueHonoringExceptions(propertyName, propertyValue, parameterClass, parameterType) );
-            }
-            else
-            {
-               Field field = Reflections.getField(getBeanClass(), propertyName);
-               if ( !field.isAccessible() ) field.setAccessible(true);
-               initializerFields.put( field, getInitialValue(propertyValue, field.getType(), field.getGenericType()) );
-            }
-        }
-
-      }
-   }
-
-   private InitialValue getInitialValueHonoringExceptions(String propertyName, Conversions.PropertyValue propertyValue, Class parameterClass, Type parameterType)
-   {
-      // the org.jboss.seam.core.init component cannot accomodate EL expressions because of startup order
-      // note that org.jboss.seam.core.init.jndiPattern looks like an EL expression but is not one!
-      if ("org.jboss.seam.core.init".equals(getName()))
-      {
-         return new ConstantInitialValue(propertyValue, parameterClass, parameterType);
-      }
-      else
-      {
-         return getInitialValue(propertyValue, parameterClass, parameterType);
-      }
-   }
-
-   private static InitialValue getInitialValue(Conversions.PropertyValue propertyValue, Class parameterClass, Type parameterType)
-   {
-      if ( parameterClass.equals(ValueExpression.class) ||
-           parameterClass.equals(MethodExpression.class) ||
-            propertyValue.isExpression() )
-      {
-         return new ELInitialValue(propertyValue, parameterClass, parameterType);
-      }
-      else if ( propertyValue.isMultiValued() )
-      {
-          if (Set.class.isAssignableFrom(parameterClass)) {
-             return new SetInitialValue(propertyValue, parameterClass, parameterType);
-          } else {
-             return new ListInitialValue(propertyValue, parameterClass, parameterType);
-          }
-      }
-      else if ( propertyValue.isAssociativeValued() )
-      {
-         return new MapInitialValue(propertyValue, parameterClass, parameterType);
-      }
-      else
-      {
-         return new ConstantInitialValue(propertyValue, parameterClass, parameterType);
-      }
-   }
-
-   private void initMembers(Class<?> clazz, Context applicationContext)
-   {
-      Map<Method, Annotation> selectionSetters = new HashMap<Method, Annotation>();
-      Map<Field, Annotation> selectionFields = new HashMap<Field, Annotation>();
-      Set<String> dataModelNames = new HashSet<String>();
-
-      for ( ; clazz!=Object.class; clazz = clazz.getSuperclass() )
-      {
-         for ( Method method: clazz.getDeclaredMethods() )
-         {
-            scanMethod(applicationContext, selectionSetters, dataModelNames, method);
-         }
-
-         for ( Field field: clazz.getDeclaredFields() )
-         {
-            scanField(selectionFields, dataModelNames, field);
-         }
-      }
-      
-      final boolean hasMultipleDataModels = dataModelGetters.size() > 1;
-      String defaultDataModelName = null;
-      if ( !hasMultipleDataModels )
-      {
-         if ( !dataModelGetters.isEmpty() )
-         {
-            defaultDataModelName = dataModelGetters.get(0).getName();
-         }
-      }
-
-      for ( Map.Entry<Method, Annotation> annotatedMethod: selectionSetters.entrySet() )
-      {
-         Method method = annotatedMethod.getKey();
-         Annotation ann = annotatedMethod.getValue();
-         String name = getDataModelSelectionName(dataModelNames, hasMultipleDataModels, defaultDataModelName, ann);
-         Object existing = dataModelSelectionSetters.put( name, new BijectedMethod(name, method, ann) );
-         if (existing!=null)
-         {
-            throw new IllegalStateException("Multiple @DataModelSelection setters for: " + name);
-         }
-      }
-
-      for ( Map.Entry<Field, Annotation> annotatedField: selectionFields.entrySet() )
-      {
-         Field field = annotatedField.getKey();
-         Annotation ann = annotatedField.getValue();
-         String name = getDataModelSelectionName(dataModelNames, hasMultipleDataModels, defaultDataModelName, ann);
-         Object existing = dataModelSelectionSetters.put( name, new BijectedField(name, field, ann) );
-         if (existing!=null)
-         {
-            throw new IllegalStateException("Multiple @DataModelSelection fields for: " + name);
-         }
-      }
-
-   }
-
-   private void checkDefaultRemoveMethod()
-   {
-      if (type==STATEFUL_SESSION_BEAN)
-      {
-         if ( destroyMethod!=null && destroyMethod.isAnnotationPresent(REMOVE) ) //TODO: @Remove is not declared @Inherited, but does the EJB container emulate that?
-         {
-            //we don't need to worry about default remove methods
-            defaultRemoveMethod = null;
-         }
-         else
-         {
-            //check that we have a default remove method
-            if ( defaultRemoveMethod==null )
-            {
-               throw new IllegalArgumentException("Stateful session bean component must have a method with no parameters marked @Remove: " + name);
-            }
-            
-            //check that it is unique
-            boolean found = false;
-            for ( Method remove: removeMethods.values() )
-            {
-               if ( remove.getParameterTypes().length==0 )
-               {
-                  if (found)
-                  {
-                     throw new IllegalStateException("Duplicate default @Remove method for component:" + name);
-                  }
-                  found = true;
-               }
-            }
-         }
-      }
-   }
-
-   private void scanMethod(Context applicationContext, Map<Method, Annotation> selectionSetters, Set<String> dataModelNames, Method method)
-   {
-      if ( method.isAnnotationPresent(Destroy.class) )
-      {
-         /*if ( method.getParameterTypes().length>0 ) and it doesn't take a Component parameter
-         {
-            throw new IllegalStateException("@Destroy methods may not have parameters: " + name);
-         }*/
-         if (type!=JAVA_BEAN && type!=STATEFUL_SESSION_BEAN)
-         {
-            throw new IllegalArgumentException("Only JavaBeans and stateful session beans support @Destroy methods: " + name);
-         }
-         if ( destroyMethod!=null && !destroyMethod.getName().equals( method.getName() ) )
-         {
-            throw new IllegalStateException("component has two @Destroy methods: " + name);
-         }
-         
-         if ( destroyMethod==null ) //ie. ignore the one on the superclass
-         {
-            destroyMethod = method;
-            lifecycleMethods.add(method);
-         }
-      }
-      
-      if ( method.isAnnotationPresent(REMOVE) )
-      {
-         removeMethods.put( method.getName(), method );
-         if ( method.getParameterTypes().length==0 )
-         {
-            defaultRemoveMethod = method;
-            lifecycleMethods.add(method);
-         }
-      }
-      
-      if ( method.isAnnotationPresent(Create.class) )
-      {
-         /*if ( method.getParameterTypes().length>0 ) and it doesn't take a Component parameter
-         {
-            throw new IllegalStateException("@Create methods may not have parameters: " + name);
-         }*/
-         if (type!=JAVA_BEAN && type!=STATEFUL_SESSION_BEAN)
-         {
-            throw new IllegalArgumentException("Only JavaBeans and stateful session beans support @Create methods: " + name);
-         }
-         if ( createMethod!=null && !createMethod.getName().equals( method.getName() ) )
-         {
-            throw new IllegalStateException("component has two @Create methods: " + name);
-         }
-         if (createMethod==null)
-         {
-            createMethod = method;
-            lifecycleMethods.add(method);
-         }
-      }
-      
-      if ( method.isAnnotationPresent(In.class) )
-      {
-         In in = method.getAnnotation(In.class);
-         String name = toName( in.value(), method );
-         inAttributes.add( new BijectedMethod(name, method, in) );
-      }
-      
-      if ( method.isAnnotationPresent(Out.class) )
-      {
-         Out out = method.getAnnotation(Out.class);
-         String name = toName( out.value(), method );
-         outAttributes.add( new BijectedMethod(name, method, out) );
-         
-         //can't use Init.instance() here because of unit tests
-         Init init = (Init) applicationContext.get(Seam.getComponentName(Init.class));
-         init.initNamespaceForName(name, true);
-      }
-      
-      if ( method.isAnnotationPresent(Unwrap.class) )
-      {
-         if ( unwrapMethod!=null && !unwrapMethod.getName().equals( method.getName() )  )
-         {
-            throw new IllegalStateException("component has two @Unwrap methods: " + name);
-         }
-         if (unwrapMethod==null )
-         {
-            unwrapMethod = method;
-         }
-      }
-      
-      if ( method.isAnnotationPresent(DataModel.class) ) //TODO: generalize
-      {
-         checkDataModelScope( method.getAnnotation(DataModel.class) );
-      }
-      
-      if ( method.isAnnotationPresent(org.jboss.seam.annotations.Factory.class) )
-      {
-         //can't use Init.instance() here because of unit tests
-         Init init = (Init) applicationContext.get(Seam.getComponentName(Init.class));
-         String contextVariable = toName( method.getAnnotation(org.jboss.seam.annotations.Factory.class).value(), method );
-         
-         if ( contextVariable.equals(name) )
-         {
-            throw new IllegalStateException("@Factory method can not share name with its containing component: " + contextVariable);
-         }
-         
-         init.addFactoryMethod(contextVariable, method, this);
-         if ( method.getAnnotation(org.jboss.seam.annotations.Factory.class).autoCreate() )
-         {
-            init.addAutocreateVariable(contextVariable);
-         }
-      }
-      
-      if ( method.isAnnotationPresent(Observer.class) )
-      {
-         //can't use Init.instance() here because of unit tests
-         Init init = (Init) applicationContext.get(Seam.getComponentName(Init.class));
-          
-         Observer observer = method.getAnnotation(Observer.class);
-         for ( String eventType : observer.value() )
-         {
-            if ( eventType.length()==0 ) eventType = method.getName(); //TODO: new defaulting rule to map @Observer onFooEvent() -> event type "fooEvent"
-            init.addObserverMethod( eventType, method, this, observer.create() );
-         }
-      }
-      
-      if ( method.isAnnotationPresent(RequestParameter.class) )
-      {
-         RequestParameter rp = method.getAnnotation(RequestParameter.class);
-         String name = toName( rp.value(), method );
-         parameterSetters.add( new BijectedMethod(name, method, rp) );
-      }
-      
-      // TODO: verify that these life-cycle methods have no arguments!
-      if ( method.isAnnotationPresent(PRE_PASSIVATE) )
-      {
-         prePassivateMethod = method;
-         lifecycleMethods.add(method);
-      }
-      
-      if ( method.isAnnotationPresent(POST_ACTIVATE) )
-      {
-         postActivateMethod = method;
-         lifecycleMethods.add(method);
-      }
-      
-      if ( method.isAnnotationPresent(POST_CONSTRUCT) )
-      {
-         postConstructMethod = method;
-         lifecycleMethods.add(method);
-      }
-      
-      if ( method.isAnnotationPresent(PRE_DESTROY) )
-      {
-         preDestroyMethod = method;
-         lifecycleMethods.add(method);
-      }
-      
-      if ( method.isAnnotationPresent(PERSISTENCE_CONTEXT) )
-      {
-         checkPersistenceContextForComponentType();
-         pcAttributes.add( new BijectedMethod( toName(null, method), method, null ) );
-      }
-      
-      if ( method.isAnnotationPresent(Begin.class) || 
-           method.isAnnotationPresent(End.class) || 
-           method.isAnnotationPresent(StartTask.class) ||
-           method.isAnnotationPresent(BeginTask.class) ||
-           method.isAnnotationPresent(EndTask.class) ) 
-      {
-         conversationManagementMethods.add(method);
-      }
-      
-      for ( Annotation ann: method.getAnnotations() )
-      {
-         if ( ann.annotationType().isAnnotationPresent(DataBinderClass.class) )
-         {
-            String name = toName( createWrapper(ann).getVariableName(ann), method );
-            dataModelGetters.add( new BijectedProperty(name, method, ann) );
-            dataModelNames.add(name);
-         }
-         if ( ann.annotationType().isAnnotationPresent(DataSelectorClass.class) )
-         {
-            selectionSetters.put(method, ann);
-         }
-      }
-
-      if ( !method.isAccessible() )
-      {
-         method.setAccessible(true);
-      }
-   }
-
-   private void scanField(Map<Field, Annotation> selectionFields, Set<String> dataModelNames, Field field)
-   {
-      if ( !field.isAccessible() )
-      {
-         field.setAccessible(true);
-      }
-
-      if ( field.isAnnotationPresent(In.class) )
-      {
-         In in = field.getAnnotation(In.class);
-         String name = toName( in.value(), field );
-         inAttributes.add( new BijectedField(name, field, in) );
-      }
-      
-      if ( field.isAnnotationPresent(Out.class) )
-      {
-         Out out = field.getAnnotation(Out.class);
-         String name = toName( out.value(), field );
-         outAttributes.add(new BijectedField(name, field, out) );
-      }
-      
-      if ( field.isAnnotationPresent(DataModel.class) ) //TODO: generalize
-      {
-         checkDataModelScope( field.getAnnotation(DataModel.class) );
-      }
-      
-      if ( field.isAnnotationPresent(RequestParameter.class) )
-      {
-         RequestParameter rp = field.getAnnotation(RequestParameter.class);
-         String name = toName( rp.value(), field );
-         parameterSetters.add( new BijectedField(name, field, rp) );
-      }
-      
-      if ( field.isAnnotationPresent(org.jboss.seam.annotations.Logger.class) )
-      {
-         String category = field.getAnnotation(org.jboss.seam.annotations.Logger.class).value();
-         org.jboss.seam.log.Log logInstance;
-         if ( "".equals( category ) )
-         {
-            logInstance = org.jboss.seam.log.Logging.getLog(getBeanClass());
-         }
-         else
-         {
-            logInstance = org.jboss.seam.log.Logging.getLog(category);
-         }
-         if ( Modifier.isStatic( field.getModifiers() ) )
-         {
-            Reflections.setAndWrap(field, null, logInstance);
-         }
-         else
-         {
-            logFields.add(field);
-            logInstances.add(logInstance);
-         }
-      }
-      
-      if ( field.isAnnotationPresent(PERSISTENCE_CONTEXT) )
-      {
-         checkPersistenceContextForComponentType();
-         pcAttributes.add( new BijectedField( toName(null, field), field, null ) );
-      }
-      
-      for ( Annotation ann: field.getAnnotations() )
-      {
-         if ( ann.annotationType().isAnnotationPresent(DataBinderClass.class) )
-         {
-            String name = toName( createWrapper(ann).getVariableName(ann), field );
-            dataModelGetters.add( new BijectedField(name, field, ann) );
-            dataModelNames.add(name);
-         }
-         if ( ann.annotationType().isAnnotationPresent(DataSelectorClass.class) )
-         {
-            selectionFields.put(field, ann);
-         }
-      }
-      
-   }
-
-   protected void checkPersistenceContextForComponentType()
-   {
-      if ( !type.isSessionBean() && type!=MESSAGE_DRIVEN_BEAN )
-      {
-         throw new IllegalArgumentException("@PersistenceContext may only be used on session bean or message driven bean components: " + name);
-      }
-   }
-
-   private String getDataModelSelectionName(Set<String> dataModelNames, boolean hasMultipleDataModels, String defaultDataModelName, Annotation ann)
-   {
-      String name = createUnwrapper(ann).getVariableName(ann);
-      if ( name.length() == 0 )
-      {
-         if ( hasMultipleDataModels )
-         {
-            throw new IllegalStateException( "Missing value() for @DataModelSelection with multiple @DataModels" );
-         }
-         if ( defaultDataModelName==null )
-         {
-            throw new IllegalStateException("No @DataModel for @DataModelSelection: " + name);
-         }
-         return defaultDataModelName;
-      }
-      else
-      {
-         if ( !dataModelNames.contains(name) )
-         {
-            throw new IllegalStateException("No @DataModel for @DataModelSelection: " + name);
-         }
-         return name;
-      }
-   }
-
-   private void checkDataModelScope(DataModel dataModel) {
-      ScopeType dataModelScope = dataModel.scope();
-      if ( dataModelScope!=PAGE && dataModelScope!=UNSPECIFIED )
-      {
-         throw new IllegalArgumentException("@DataModel scope must be ScopeType.UNSPECIFIED or ScopeType.PAGE: " + name);
-      }
-   }
-
-   private void initInterceptors()
-   {
-      initDefaultInterceptors();
-
-      for ( Annotation annotation: getBeanClass().getAnnotations() )
-      { 
-         if ( annotation.annotationType().isAnnotationPresent(INTERCEPTORS) )
-         {
-            Class[] classes = value( annotation.annotationType().getAnnotation(INTERCEPTORS) );
-            addInterceptor( new Interceptor(classes, annotation, this) );
-         }
-         if ( annotation.annotationType().isAnnotationPresent(Interceptors.class) )
-         {
-            Class[] classes = annotation.annotationType().getAnnotation(Interceptors.class).value();
-            addInterceptor( new Interceptor(classes, annotation, this) );
-         }
-      }
-
-      newSort(interceptors);
-      newSort(clientSideInterceptors);
-      
-      if ( log.isDebugEnabled() ) log.debug("interceptor stack: " + interceptors);
-   }
-
-   public void addInterceptor(Object interceptorInstance)
-   {
-      try
-      {
-         addInterceptor(new Interceptor(interceptorInstance, this));
-      }
-      catch (NoClassDefFoundError e)
-      {
-         log.debug("Unable to load interceptor " + interceptorInstance.getClass(), e);
-      }
-      catch (TypeNotPresentException e) 
-      {
-         log.debug("Unable to load interceptor " + interceptorInstance.getClass(), e);
-      }
-      catch (Exception e)
-      {
-         throw new IllegalArgumentException("Unable to load interceptor " + interceptorInstance.getClass(), e);
-      }
-   }
-   
-   public void addInterceptor(Interceptor interceptor)
-   {
-      if (interceptor.isInterceptorEnabled())
-      {
-         if (interceptor.getType()==InterceptorType.SERVER) 
-         {
-            interceptors.add(interceptor);
-         }
-         else 
-         {
-            clientSideInterceptors.add(interceptor);
-         }
-      }
-   }
-
-   private List<Interceptor> newSort(List<Interceptor> list)
-   {
-      List<SortItem<Interceptor>> siList = new ArrayList<SortItem<Interceptor>>();
-      Map<Class<?>,SortItem<Interceptor>> ht = 
-          new HashMap<Class<?>,SortItem<Interceptor>>();
-
-      for (Interceptor i: list) {
-         SortItem<Interceptor> si = new SortItem<Interceptor>(i);
-         siList.add(si);
-         ht.put(i.getUserInterceptorClass(), si);
-      }
-
-      for (SortItem<Interceptor> si : siList) {
-          Class<?> clazz = si.getObj().getUserInterceptorClass();
-          org.jboss.seam.annotations.intercept.Interceptor interceptorAnn = 
-              seamInterceptor(clazz);
-          
-          if (interceptorAnn != null) {
-              for (Class<?> cl : Arrays.asList(interceptorAnn.around())) {
-                  if (!isCompatibleInterceptor(interceptorAnn, seamInterceptor(cl))) {
-                      log.warn("Interceptor " + clazz +  
-                               " has different type than around interceptor " + cl);
-                  }
-
-                  si.addAround(ht.get(cl));
-              }
-            
-            for (Class<?> cl : Arrays.asList( interceptorAnn.within())) {
-                if (!isCompatibleInterceptor(interceptorAnn, seamInterceptor(cl))) {                
-                    log.warn("Interceptor " + clazz +  
-                            " has different type than within interceptor " + cl);
-                }
-                
-                si.addWithin(ht.get(cl));
-            }
-         }
-      }
-
-      Sorter<Interceptor> sList = new Sorter<Interceptor>();
-      siList = sList.sort(siList);
-
-      list.clear();
-      for (SortItem<Interceptor> si : siList) {
-         list.add(si.getObj());
-      }
-      return list ;
-   }
-   
-   private org.jboss.seam.annotations.intercept.Interceptor seamInterceptor(Class<?> clazz) {
-       return clazz.getAnnotation(org.jboss.seam.annotations.intercept.Interceptor.class);
-   }
-
-   private boolean isCompatibleInterceptor(
-            org.jboss.seam.annotations.intercept.Interceptor anno1,
-            org.jboss.seam.annotations.intercept.Interceptor anno2) {
-
-        if (anno1==null || anno2==null) {
-            return true;
-        }
-        
-        if (anno1.type()==InterceptorType.CLIENT && anno2.type()==InterceptorType.SERVER) {
-            return false;
-        } 
-        
-        if (anno2.type()==InterceptorType.CLIENT && anno2.type()==InterceptorType.SERVER) {
-            return false;
-        }
-         
-        return true;
-    }
-
-   private void initDefaultInterceptors()
-   {
-      List<String> interceptors;
-      if (Contexts.isApplicationContextActive())
-      {
-         interceptors = Init.instance().getInterceptors();
-      }
-      else
-      {
-         // For unit tests
-         interceptors = Init.DEFAULT_INTERCEPTORS;
-      }
-      for (String interceptorName : interceptors)
-      {
-         Object interceptorInstance = null;
-         try
-         {
-            Class<?> clazz = Reflections.classForName(interceptorName);
-            interceptorInstance = clazz.newInstance();
-            
-         }
-         catch (NoClassDefFoundError e)
-         {
-            log.debug("Unable to load interceptor " + interceptorName, e);
-         }
-         catch (TypeNotPresentException e) 
-         {
-            log.debug("Unable to load interceptor " + interceptorName, e);
-         }
-         catch (Exception e)
-         {
-            throw new IllegalArgumentException("Unable to load interceptor " + interceptorName, e);
-         }
-         addInterceptor(interceptorInstance);
-         
-      }
-   }
-   
-   private void initSecurity()
-   {
-      if ( beanClassHasAnnotation(Restrict.class) )
-      {
-         secure = true;
-         return;
-      }
-      
-      for (Annotation annotation : getBeanClass().getAnnotations())
-      {
-         if (annotation.annotationType().isAnnotationPresent(RoleCheck.class))
-         {
-            secure = true;
-            return;
-         }
-      }
-      
-      for (Method method : getBeanClass().getMethods())
-      {
-         for (Annotation annotation : method.getAnnotations())
-         {
-            if (annotation.annotationType().isAnnotationPresent(PermissionCheck.class) ||
-                  annotation.annotationType().isAnnotationPresent(RoleCheck.class))
-            {
-               secure = true;
-               return;
-            }
-         }   
-         
-         for (Annotation[] annotations : method.getParameterAnnotations())
-         {
-            for (Annotation annotation : annotations)
-            {
-               if (annotation.annotationType().isAnnotationPresent(PermissionCheck.class))
-               {
-                  secure = true;
-                  return;
-               }
-               
-            }
-         }
-      }
-   }
-
-   private static boolean hasAnnotation(Class clazz, Class annotationType)
-   {
-      if ( clazz.isAnnotationPresent(annotationType) )
-      {
-         return true;
-      }
-      else
-      {
-         for ( Method method: clazz.getMethods() )
-         {
-            if ( method.isAnnotationPresent(annotationType) )
-            {
-               return true;
-            }
-         }
-         return false;
-      }
-   }
-   
-   private static boolean hasAnnotation(Class clazz, String annotationName)
-   {
-      for (Annotation a : clazz.getAnnotations())
-      {
-         if (a.annotationType().getName().equals(annotationName)) return true;          
-      }
-      
-      for ( Method method : clazz.getMethods() )
-      {
-         for ( Annotation a : method.getAnnotations() )
-         {
-            if (a.annotationType().getName().equals(annotationName)) return true;
-         }
-      }
-      
-      return false;
-   }
-
-   public boolean beanClassHasAnnotation(Class annotationType)
-   {
-      return hasAnnotation( getBeanClass(), annotationType );
-   }
-   
-   public boolean beanClassHasAnnotation(String annotationName)
-   {
-      return hasAnnotation( getBeanClass(), annotationName );
-   }
-
-   public boolean businessInterfaceHasAnnotation(Class annotationType)
-   {
-      for (Class businessInterface: getBusinessInterfaces() )
-      {
-         if ( hasAnnotation(businessInterface, annotationType) )
-         {
-            return true;
-         }
-      }
-      return false;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public ComponentType getType()
-   {
-      return type;
-   }
-
-   public ScopeType getScope()
-   {
-      return scope;
-   }
-
-   public List<Interceptor> getInterceptors(InterceptorType type)
-   {
-      switch(type)
-      {
-         case SERVER: return interceptors;
-         case CLIENT: return clientSideInterceptors;
-         case ANY:
-            List<Interceptor> all = new ArrayList<Interceptor>();
-            all.addAll(clientSideInterceptors);
-            all.addAll(interceptors);
-            return all;
-         default: throw new IllegalArgumentException("no interceptor type specified");
-      }
-   }
-
-   public List<Object> createUserInterceptors(InterceptorType type)
-   {
-      List<Interceptor> interceptors = getInterceptors(type);
-      List<Object> result = new ArrayList<Object>( interceptors.size() );
-      for (Interceptor interceptor: interceptors)
-      {
-         result.add( interceptor.createUserInterceptor() );
-      }
-      return result;
-   }
-
-   /**
-    * For use with Seam debug page.
-    *
-    * @return the server-side interceptor stack
-    */
-   public List<Interceptor> getServerSideInterceptors()
-   {
-      return getInterceptors(InterceptorType.SERVER);
-   }
-
-   /**
-    * For use with Seam debug page.
-    *
-    * @return the client-side interceptor stack
-    */
-   public List<Interceptor> getClientSideInterceptors()
-   {
-      return getInterceptors(InterceptorType.CLIENT);
-   }
-
-   public Method getDestroyMethod()
-   {
-      return destroyMethod;
-   }
-
-   public Collection<Method> getRemoveMethods()
-   {
-      return removeMethods.values();
-   }
-
-   public Method getRemoveMethod(String name)
-   {
-      return removeMethods.get(name);
-   }
-
-   public boolean hasPreDestroyMethod()
-   {
-      return preDestroyMethod!=null;
-   }
-
-   public boolean hasPostConstructMethod()
-   {
-      return postConstructMethod!=null;
-   }
-
-   public boolean hasPrePassivateMethod()
-   {
-      return prePassivateMethod!=null;
-   }
-
-   public boolean hasPostActivateMethod()
-   {
-      return postActivateMethod!=null;
-   }
-
-   public boolean hasDestroyMethod()
-   {
-      return destroyMethod!=null;
-   }
-
-   public boolean hasCreateMethod()
-   {
-      return createMethod!=null;
-   }
-
-   public Method getCreateMethod()
-   {
-      return createMethod;
-   }
-
-   public boolean hasUnwrapMethod()
-   {
-      return unwrapMethod!=null;
-   }
-
-   public Method getUnwrapMethod()
-   {
-      return unwrapMethod;
-   }
-
-   public List<BijectedAttribute<Out>> getOutAttributes()
-   {
-      return outAttributes;
-   }
-
-   public List<BijectedAttribute<In>> getInAttributes()
-   {
-      return inAttributes;
-   }
-
-    public boolean needsInjection() 
-    {
-        return 
-            !getInAttributes().isEmpty() ||
-            !dataModelSelectionSetters.isEmpty() ||
-            !parameterSetters.isEmpty();
-    }
-
-    public boolean needsOutjection() 
-    {
-        return 
-            !getOutAttributes().isEmpty() ||
-            !dataModelGetters.isEmpty();
-    }
-
-    protected Object instantiate() throws Exception
-    {
-        switch(type) {
-           case JAVA_BEAN:
-              return instantiateJavaBean();
-           case ENTITY_BEAN:
-              return instantiateEntityBean();
-           case STATELESS_SESSION_BEAN:
-           case STATEFUL_SESSION_BEAN:
-              return instantiateSessionBean();
-           case MESSAGE_DRIVEN_BEAN:
-              throw new UnsupportedOperationException("Message-driven beans may not be called: " + name);
-           default:
-              throw new IllegalStateException();
-        }
-    }
-
-    protected void postConstruct(Object bean) throws Exception
-    {
-        switch(type) {
-           case JAVA_BEAN:
-              postConstructJavaBean(bean);
-              break;
-           case ENTITY_BEAN:
-              postConstructEntityBean(bean);
-              break;
-           case STATELESS_SESSION_BEAN:
-           case STATEFUL_SESSION_BEAN:
-              postConstructSessionBean(bean);
-              break;
-           case MESSAGE_DRIVEN_BEAN:
-              throw new UnsupportedOperationException("Message-driven beans may not be called: " + name);
-           default:
-              throw new IllegalStateException();
-        }
-    }
-    
-
-   protected Object instantiateSessionBean() 
-       throws Exception, 
-              NamingException
-   {
-      Component old = SeamInterceptor.COMPONENT.get();
-      SeamInterceptor.COMPONENT.set(this);
-      try {
-         Object bean = Naming.getInitialContext().lookup(jndiName);
-         return wrap(bean, new ClientSideInterceptor(bean, this));
-      } finally {
-         SeamInterceptor.COMPONENT.set(old);
-      }
-   }
-
-   
-   protected void postConstructSessionBean(Object bean) 
-       throws Exception, 
-              NamingException
-   {
-        // ...
-   }
-   
-   
-   protected Object instantiateEntityBean() throws Exception
-   {
-      Constructor constructor = getBeanClass().getConstructor(new Class[0]);
-      boolean accessible = constructor.isAccessible();
-      if (Modifier.isProtected(constructor.getModifiers()))
-      {
-         constructor.setAccessible(true);
-      }
-      Object bean = getBeanClass().newInstance();
-      constructor.setAccessible(accessible);
-      return bean;
-   }
-   
-   
-   protected void postConstructEntityBean(Object bean) 
-       throws Exception
-   {
-      initialize(bean);
-   }
-
-   protected Object instantiateJavaBean() throws Exception
-   {
-      Object bean = getBeanClass().newInstance();
-     
-      if (interceptionEnabled) {
-         JavaBeanInterceptor interceptor = new JavaBeanInterceptor(bean, this);
-         bean = wrap(bean, interceptor);
-      }
-      
-      return bean;
-   }
-   
-   
-   protected void postConstructJavaBean(Object bean) 
-       throws Exception
-   {
-      if (!interceptionEnabled) {
-         initialize(bean);
-         callPostConstructMethod(bean);
-      } else {
-         if (bean instanceof Proxy) {
-             Proxy proxy = (Proxy) bean;
-             JavaBeanInterceptor interceptor = (JavaBeanInterceptor) proxy.writeReplace();
-
-             interceptor.postConstruct();
-         }
-      }
-   }
-   
-   public void destroy(Object bean)
-   {
-      try
-      {
-         callDestroyMethod(bean);
-      }
-      catch (Exception e)
-      {
-         log.warn("Exception calling component @Destroy method: " + name, e);
-      }
-      if ( getType()==STATEFUL_SESSION_BEAN )
-      {
-         try
-         {
-            callDefaultRemoveMethod(bean);
-         }
-         catch (Exception e)
-         {
-            log.warn("Exception calling stateful session bean default @Remove method: " + name, e);
-         }
-      }
-      else if ( getType()==JAVA_BEAN )
-      {
-         try
-         {
-            callPreDestroyMethod(bean);
-         }
-         catch (Exception e)
-         {
-            log.warn("Exception calling JavaBean @PreDestroy method: " + name, e);
-         }
-      }
-   }
-
-   /**
-    * Wrap a Javassist interceptor around an instance of the component
-    */
-   public Object wrap(Object bean, MethodHandler interceptor) throws Exception
-   {
-      ProxyObject proxy = getProxyFactory().newInstance();
-      proxy.setHandler(interceptor);
-      return proxy;
-   }
-
-   private synchronized Class<ProxyObject> getProxyFactory()
-   {
-      if (factory==null)
-      {
-         factory = createProxyFactory( getType(), getBeanClass(), getBusinessInterfaces() );
-      }
-      return factory;
-   }
-
-   public void initialize(Object bean) throws Exception
-   {
-      if ( log.isTraceEnabled() ) log.trace("initializing new instance of: " + name);
-
-      injectLog(bean);
-
-      for ( Map.Entry<Method, InitialValue> me: initializerSetters.entrySet() )
-      {
-         Method method = me.getKey();
-         Object initialValue = me.getValue().getValue( method.getParameterTypes()[0] );
-         setPropertyValue(bean, method, method.getName(), initialValue );
-      }
-      for ( Map.Entry<Field, InitialValue> me: initializerFields.entrySet() )
-      {
-         Field field = me.getKey();
-         Object initialValue = me.getValue().getValue( field.getType() );
-         setFieldValue(bean, field, field.getName(), initialValue );
-      }
-
-      if ( log.isTraceEnabled() ) log.trace("done initializing: " + name);
-   }
-
-   /**
-    * Inject context variable values into @In attributes
-    * of a component instance.
-    *
-    * @param bean a Seam component instance
-    * @param enforceRequired should we enforce required=true?
-    */
-   public void inject(Object bean, boolean enforceRequired)
-   {
-      if ( log.isTraceEnabled() )
-      {
-         log.trace("injecting dependencies of: " + getName());
-      }
-      //injectLog(bean);
-      injectAttributes(bean, enforceRequired);
-      injectDataModelSelections(bean);
-      injectParameters(bean);
-   }
-
-   /**
-    * Null out any @In attributes of a component instance.
-    *
-    * @param bean a Seam component instance
-    */
-   public void disinject(Object bean)
-   {
-      if ( log.isTraceEnabled() )
-      {
-         log.trace("disinjecting dependencies of: " + getName());
-      }
-      disinjectAttributes(bean);
-   }
-
-   private void injectLog(Object bean)
-   {
-      for (int i=0; i<logFields.size(); i++)
-      {
-         setFieldValue( bean, logFields.get(i), "log", logInstances.get(i) );
-      }
-   }
-
-   private void injectParameters(Object bean)
-   {
-      Parameters params = Parameters.instance();
-      if (params!=null) //check for unit tests
-      {
-         Map<String, String[]> requestParameters = params.getRequestParameters();
-         for (BijectedAttribute setter: parameterSetters)
-         {
-            Object convertedValue = params.convertMultiValueRequestParameter(requestParameters, setter.getName(), setter.getType());
-            setter.set(bean, convertedValue);
-         }
-      }
-   }
-
-   /**
-    * Outject context variable values from @Out attributes
-    * of a component instance.
-    *
-    * @param bean a Seam component instance
-    * @param enforceRequired should we enforce required=true?
-    */
-   public void outject(Object bean, boolean enforceRequired)
-   {
-      if ( log.isTraceEnabled() )
-      {
-         log.trace("outjecting dependencies of: " + getName());
-      }
-      outjectAttributes(bean, enforceRequired);
-      outjectDataModels(bean);
-   }
-
-   private void injectDataModelSelections(Object bean)
-   {
-      for ( BijectedAttribute dataModelGetter: dataModelGetters )
-      {
-         injectDataModelSelection(bean, dataModelGetter);
-      }
-   }
-
-   private void injectDataModelSelection(Object bean, BijectedAttribute dataModelGetter)
-   {
-      DataBinder wrapper = createWrapper( dataModelGetter.getAnnotation() );
-      String name = dataModelGetter.getName();
-      Annotation dataModelAnn = dataModelGetter.getAnnotation();
-      ScopeType scope = wrapper.getVariableScope(dataModelAnn);
-      
-      Object dataModel = getOutScope(scope, this).getContext().get(name);
-      if ( dataModel!=null )
-      {
-         if ( PAGE.equals(scope) )
-         {
-            dataModelGetter.set(bean, wrapper.getWrappedData(dataModelAnn, dataModel));
-         }
-      
-         Object selectedIndex = wrapper.getSelection(dataModelAnn, dataModel);
-      
-         if ( log.isDebugEnabled() ) log.debug( "selected row: " + selectedIndex );
-      
-         if ( selectedIndex!=null )
-         {
-            BijectedAttribute setter = dataModelSelectionSetters.get(name);
-            if (setter != null)
-            {
-               Annotation dataModelSelectionAnn = setter.getAnnotation();
-               Object selection = createUnwrapper(dataModelSelectionAnn).getSelection(dataModelSelectionAnn, dataModel);
-               setter.set(bean, selection);
-            }
-         }
-      
-      }
-   }
-
-   private void outjectDataModels(Object bean)
-   {
-      for ( BijectedAttribute dataModelGetter: dataModelGetters )
-      {
-         outjectDataModel(bean, dataModelGetter);
-      }
-   }
-
-   private void outjectDataModel(Object bean, BijectedAttribute dataModelGetter)
-   {
-      
-      DataBinder wrapper = createWrapper( dataModelGetter.getAnnotation() );
-      Object list = dataModelGetter.get(bean);
-      String name = dataModelGetter.getName();
-      Annotation dataModelAnn = dataModelGetter.getAnnotation();
-      ScopeType scope = wrapper.getVariableScope(dataModelAnn);      
-      Context context = getOutScope(scope, this).getContext();
-      Object existingDataModel = context.get(name);
-      
-      boolean dirty = existingDataModel == null ||
-            wrapper.isDirty(dataModelAnn, existingDataModel, list);
-      boolean reoutject = existingDataModel!=null && scope==PAGE;
-      
-      if (dirty)
-      {
-         if ( list!=null )
-         {
-            context.set( name, wrapper.wrap(dataModelAnn, list) );
-         }
-         else
-         {
-            context.remove(name);
-         }
-      }
-      else if (reoutject)
-      {
-         context.set(name, existingDataModel);
-      }
-         
-   }
-
-   private static DataBinder createWrapper(Annotation dataModelAnn)
-   {
-      try
-      {
-         return dataModelAnn.annotationType().getAnnotation(DataBinderClass.class).value().newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   private static DataSelector createUnwrapper(Annotation dataModelAnn)
-   {
-      try
-      {
-         return dataModelAnn.annotationType().getAnnotation(DataSelectorClass.class).value().newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   private static ScopeType getOutScope(ScopeType specifiedScope, Component component)
-   {
-      ScopeType scope = component==null ? EVENT : component.getScope();
-      if (scope==STATELESS)
-      {
-         scope = EVENT;
-      }
-      if (specifiedScope!=UNSPECIFIED)
-      {
-         scope = specifiedScope;
-      }
-      return scope;
-   }
-
-   private void injectAttributes(Object bean, boolean enforceRequired)
-   {
-      for ( BijectedAttribute<In> att : getInAttributes() )
-      {
-         att.set( bean, getValueToInject( att.getAnnotation(), att.getName(), bean, enforceRequired ) );
-      }
-   }
-
-   private void disinjectAttributes(Object bean)
-   {
-      for ( BijectedAttribute att: getInAttributes() )
-      {
-         if ( !att.getType().isPrimitive() )
-         {
-            att.set(bean, null);
-         }
-      }
-   }
-
-   private void outjectAttributes(Object bean, boolean enforceRequired)
-   {
-      for ( BijectedAttribute<Out> att: getOutAttributes() )
-      {
-         outjectAttribute( att.getAnnotation(), att.getName(), bean, att.get(bean), enforceRequired );
-      }
-   }
-
-   private void outjectAttribute(Out out, String name, Object bean, Object value, boolean enforceRequired)
-   {
-      
-      if (value==null && enforceRequired && out.required())
-      {
-         throw new RequiredException(
-               "@Out attribute requires non-null value: " +
-               getAttributeMessage(name)
-            );
-      }
-      else
-      {
-         Component component = null;
-         if ( out.scope()==UNSPECIFIED )
-         {
-            component = Component.forName(name);
-            if (value!=null && component!=null)
-            {
-               if ( !component.isInstance(value) )
-               {
-                  throw new IllegalArgumentException(
-                        "attempted to bind an @Out attribute of the wrong type to: " +
-                        getAttributeMessage(name)
-                     );
-               }
-            }
-         }
-         else if ( out.scope()==STATELESS )
-         {
-            throw new IllegalArgumentException(
-                  "cannot specify explicit scope=STATELESS on @Out: " +
-                  getAttributeMessage(name)
-               );
-         }
-      
-         ScopeType outScope = component==null ?
-               getOutScope( out.scope(), this ) :
-               component.getScope();
-      
-         if ( enforceRequired || outScope.isContextActive() )
-         {
-            if (value==null)
-            {
-               outScope.getContext().remove(name);
-            }
-            else
-            {
-               outScope.getContext().set(name, value);
-            }
-         }
-      }
-   }
-
-   public boolean isInstance(Object bean)
-   {
-      switch(type)
-      {
-         case JAVA_BEAN:
-         case ENTITY_BEAN:
-            return getBeanClass().isInstance(bean);
-         default:
-            Class clazz = bean.getClass();
-            for ( Class businessInterface: businessInterfaces )
-            {
-               if ( businessInterface.isAssignableFrom(clazz) )
-               {
-                  return true;
-               }
-            }
-            return false;
-      }
-   }
-
-   public static Set<Class> getBusinessInterfaces(Class clazz)
-   {
-      Set<Class> result = new LinkedHashSet<Class>();
-
-      if ( clazz.isAnnotationPresent(LOCAL) )
-      {
-         for ( Class iface: value( clazz.getAnnotation(LOCAL) ) ) {
-            result.add(iface);
-         }
-      }
-
-      if ( clazz.isAnnotationPresent(REMOTE) )
-      {
-         for ( Class iface: value( clazz.getAnnotation(REMOTE) ) )
-         {
-            result.add(iface);
-         }
-      }
-
-      for ( Class iface: clazz.getInterfaces() )
-      {
-         if ( iface.isAnnotationPresent(LOCAL) || iface.isAnnotationPresent(REMOTE) )
-         {
-            result.add(iface);
-         }
-      }
-
-      if ( result.isEmpty() ) 
-      {
-         for ( Class iface: clazz.getInterfaces() )
-         {
-            if ( !isExcludedLocalInterfaceName( iface.getName() ) )
-            {
-               result.add(iface);
-            }
-         }
-      }
-
-      return result;
-   }
-
-   public Set<Class> getBusinessInterfaces()
-   {
-      return businessInterfaces;
-   }
-
-   private static boolean isExcludedLocalInterfaceName(String name) 
-   {
-      return name.equals("java.io.Serializable") ||
-            name.equals("java.io.Externalizable") ||
-            name.startsWith("javax.ejb.");
-   }
-
-   private Object getFieldValue(Object bean, Field field, String name)
-   {
-      try {
-         return Reflections.get(field, bean);
-      }
-      catch (Exception e)
-      {
-         throw new IllegalArgumentException("could not get field value: " + getAttributeMessage(name), e);
-      }
-   }
-
-   private Object getPropertyValue(Object bean, Method method, String name)
-   {
-      try {
-         return Reflections.invoke(method, bean);
-      }
-      catch (Exception e)
-      {
-         throw new IllegalArgumentException("could not get property value: " + getAttributeMessage(name), e);
-      }
-   }
-
-   private void setPropertyValue(Object bean, Method method, String name, Object value)
-   {
-      try
-      {
-         Reflections.invoke(method, bean, value );
-      }
-      catch (Exception e)
-      {
-         throw new IllegalArgumentException("could not set property value: " + getAttributeMessage(name), e);
-      }
-   }
-
-   private void setFieldValue(Object bean, Field field, String name, Object value)
-   {
-      try
-      {
-         Reflections.set(field, bean, value);
-      }
-      catch (Exception e)
-      {
-         throw new IllegalArgumentException("could not set field value: " + getAttributeMessage(name), e);
-      }
-   }
-
-   public static String getComponentName(Class<?> clazz)
-   {
-      String componentName = Seam.getComponentName(clazz);
-      if (componentName==null)
-      {
-         throw new IllegalArgumentException("No @Name annotation for class: " + clazz.getName());
-      }
-      return componentName;
-   }
-
-   public static Component forName(String name)
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No application context active");
-      }
-      return (Component) Contexts.getApplicationContext().get( name + ".component" );
-   }
-
-   public static Object getInstance(Class<?> clazz)
-   {
-      return getInstance(clazz, true);
-   }
-
-   public static Object getInstance(Class<?> clazz, boolean create)
-   {
-      return getInstance( getComponentName(clazz), create );
-   }
-
-   public static Object getInstance(Class<?> clazz, ScopeType scope)
-   {
-      return getInstance(clazz, scope, true);
-   }
-
-   public static Object getInstance(Class<?> clazz, ScopeType scope, boolean create)
-   {
-      return getInstance( getComponentName(clazz), scope, create );
-   }
-
-   public static Object getInstance(String name)
-   {
-      return getInstance(name, true);
-   }
-
-   public static Object getInstance(String name, boolean create)
-   {
-      return getInstance(name, create, true);
-   }
-   
-   public static Object getInstance(String name, boolean create, boolean allowAutocreation)
-   {
-      Object result = Contexts.lookupInStatefulContexts(name);
-      result = getInstance(name, create, allowAutocreation, result, null);
-      return result;
-   }
-
-   public static Object getInstance(String name, ScopeType scope)
-   {
-      return getInstance(name, scope, true);
-   }
-
-   public static Object getInstance(String name, ScopeType scope, boolean create)
-   {
-      return getInstance(name, scope, create, true);
-   }
-   
-   public static Object getInstance(String name, ScopeType scope, boolean create, boolean allowAutocreation)
-   {
-      Object result = scope==STATELESS ? null : scope.getContext().get(name);
-      result = getInstance(name, create, allowAutocreation, result, scope);
-      return result;
-   }
-
-   private static Object getInstance(String name, boolean create, boolean allowAutoCreation, Object result, ScopeType scope) {
-      Component component = Component.forName(name);
-
-      create = create || (Init.instance().isAutocreateVariable(name) && allowAutoCreation);
-
-      if (result==null && create)
-      {
-        result = getInstanceFromFactory(name, scope);
-        if (result==null)
-        {
-           if (component==null)
-           {
-              //needed when this method is called by JSF
-              if ( log.isTraceEnabled() ) log.trace("Seam component not found: " + name);
-           }
-           else if ( component.getScope().isContextActive() )
-           {
-              result = component.newInstance();
-           }
-           else
-           {
-              log.warn("Cannot create Seam component, scope is not active: " + name + "(" + component.getScope().name() + ")");
-           }
-        }
-      }
-
-      if (result!=null)
-      {
-         if (component!=null)
-         {
-            if ( !component.isInstance(result) )
-            {
-               if ( component.hasUnwrapMethod() ) return result; ///best way???
-               throw new IllegalArgumentException( "value of context variable is not an instance of the component bound to the context variable: " + name  +
-                        ". If you are using hot deploy, you may have attempted to hot deploy a session or " +
-                        "application-scoped component definition while using an old instance in the session.");
-            }
-            result = component.unwrap(result);
-         }
-      }
-
-      return result;
-
-   }
-
-   public static Object getInstanceFromFactory(String name)
-   {
-      return getInstanceFromFactory(name, null);
-   }
-
-   private static Object getInstanceFromFactory(String name, ScopeType scope)
-   {
-      Init init = Init.instance();
-      if (init==null) //for unit tests, yew!
-      {
-         return null;
-      }
-      else
-      {
-         Init.FactoryMethod factoryMethod = init.getFactory(name);
-         Init.FactoryExpression methodBinding = init.getFactoryMethodExpression(name);
-         Init.FactoryExpression valueBinding = init.getFactoryValueExpression(name);
-         if ( methodBinding!=null && getOutScope( methodBinding.getScope(), null ).isContextActive() ) //let the XML take precedence
-         {
-            Object result = methodBinding.getMethodBinding().invoke();
-            return handleFactoryMethodResult( name, null, result, methodBinding.getScope() );
-         }
-         else if ( valueBinding!=null && getOutScope( valueBinding.getScope(), null ).isContextActive() ) //let the XML take precedence
-         {
-            Object result = valueBinding.getValueBinding().getValue();
-            return handleFactoryMethodResult( name, null, result, valueBinding.getScope() );
-         }
-         else if ( factoryMethod!=null && getOutScope( factoryMethod.getScope(), factoryMethod.getComponent() ).isContextActive() )
-         {
-            Object factory = Component.getInstance( factoryMethod.getComponent().getName(), true );
-            factoryLock.lock();
-            try
-            {
-               // check whether there has been created an instance by another thread while waiting for this function's lock
-               if (scope != STATELESS)
-               {
-                  Object value = (scope == null) ? Contexts.lookupInStatefulContexts(name) : scope.getContext().get(name);
-                  if (value != null)
-                  {
-                     return value;
-                  }
-               }
-               
-               if (factory==null)
-               {
-                  return null;
-               }
-               else
-               {
-                  Object result = factoryMethod.getComponent().callComponentMethod( factory, factoryMethod.getMethod() );
-                  return handleFactoryMethodResult( name, factoryMethod.getComponent(), result, factoryMethod.getScope() );
-               }
-            }
-            finally 
-            {
-               factoryLock.unlock();
-            }
-         }
-         else
-         {
-            return null;
-         }
-      }
-   }
-
-   private static Object handleFactoryMethodResult(String name, Component component, Object result, ScopeType scope) {
-        // see if a value was outjected by the factory method
-        Object value = Contexts.lookupInStatefulContexts(name);
-        if (value == null) {
-            // usually a factory method returning a value
-            ScopeType outScope = getOutScope(scope, component);
-            if (outScope != STATELESS) {
-                // the null check is for page scope, which doesn't handle setting a null value
-                if (result != null) {
-                    outScope.getContext().set(name, result);
-                }
-                // shouldn't need to call remove since there wasn't previously a value
-            }
-            return result;
-        } else { 
-            // usually a factory method with a void return type
-            if (scope != UNSPECIFIED) {
-                throw new IllegalArgumentException("factory method with defined scope outjected a value: " + name);
-            }
-            return value;
-        }
-    }
-
-   public Object newInstance()
-   {
-      if (log.isTraceEnabled()) {
-         log.trace("instantiating Seam component: " + name);
-      }
-
-      Object instance;
-      try{
-         instance = instantiate();
-          
-         if (getScope()!=STATELESS) {
-            //put it in the context _before_ calling postconstuct or create
-            getScope().getContext().set(name, instance); 
-         }
-         
-         postConstruct(instance);
-            
-         if (getScope()!=STATELESS) {
-            callCreateMethod(instance);
-            
-            if (Events.exists()) {
-                Events.instance().raiseEvent("org.jboss.seam.postCreate." + name, instance);
-            }
-         }
-         
-      } catch (Exception e) {
-    	  if (getScope()!=STATELESS) {
-    		  getScope().getContext().remove(name); 
-    	  }
-
-    	  throw new InstantiationException("Could not instantiate Seam component: " + name, e);
-      }
-
-      return instance;
-   }
-
-   private void callDefaultRemoveMethod(Object instance)
-   {
-      if ( hasDefaultRemoveMethod() )
-      {
-         callComponentMethod( instance, getDefaultRemoveMethod() );
-      }
-   }
-   
-   public boolean hasDefaultRemoveMethod()
-   {
-      return defaultRemoveMethod!=null;
-   }
-
-   public Method getDefaultRemoveMethod()
-   {
-      return defaultRemoveMethod;
-   }
-
-   public void callCreateMethod(Object instance)
-   {
-      if ( hasCreateMethod() )
-      {
-         callComponentMethod( instance, getCreateMethod() );
-      }
-   }
-
-   public void callDestroyMethod(Object instance)
-   {
-      if ( hasDestroyMethod() )
-      {
-         callComponentMethod( instance, getDestroyMethod() );
-      }
-   }
-
-   public void callPreDestroyMethod(Object instance)
-   {
-      if ( hasPreDestroyMethod() )
-      {
-         callComponentMethod( instance, getPreDestroyMethod() );
-      }
-   }
-
-   public void callPostConstructMethod(Object instance)
-   {
-      if ( hasPostConstructMethod() )
-      {
-         callComponentMethod( instance, getPostConstructMethod() );
-      }
-   }
-
-   public void callPrePassivateMethod(Object instance)
-   {
-      if ( hasPrePassivateMethod() )
-      {
-         callComponentMethod( instance, getPrePassivateMethod() );
-      }
-   }
-
-   public void callPostActivateMethod(Object instance)
-   {
-      if ( hasPostActivateMethod() )
-      {
-         callComponentMethod( instance, getPostActivateMethod() );
-      }
-   }
-
-   public Method getPostActivateMethod()
-   {
-      return postActivateMethod;
-   }
-
-   public Method getPrePassivateMethod()
-   {
-      return prePassivateMethod;
-   }
-
-   public Method getPostConstructMethod()
-   {
-      return postConstructMethod;
-   }
-
-   public Method getPreDestroyMethod()
-   {
-      return preDestroyMethod;
-   }
-
-   public long getTimeout()
-   {
-      return timeout;
-   }
-
-   public Object callComponentMethod(Object instance, Method method, Object... parameters) {
-      Class[] paramTypes = method.getParameterTypes();
-      String methodName = method.getName();
-      try
-      {
-         Method interfaceMethod = instance.getClass().getMethod(methodName, paramTypes);
-         if ( paramTypes.length==0 || interfaceMethod.getParameterTypes().length==0 )
-         {
-            return Reflections.invokeAndWrap(interfaceMethod, instance);
-         }
-         else if ( parameters.length>0 )
-         {
-            return Reflections.invokeAndWrap(interfaceMethod, instance, parameters);
-         }
-         else
-         {
-            return Reflections.invokeAndWrap(interfaceMethod, instance, this);
-         }
-      }
-      catch (NoSuchMethodException e)
-      {
-         String message = "method not found: " + method.getName() + " for component: " + name;
-         if ( getType().isSessionBean() )
-         {
-             message += " (check that it is declared on the session bean business interface)";
-         }
-         throw new IllegalArgumentException(message, e);
-      }
-   }
-
-   private Object unwrap(Object instance)
-   {
-      if ( hasUnwrapMethod() )
-      {
-         return callComponentMethod( instance, getUnwrapMethod() );
-      }
-      else
-      {
-         return instance;
-      }
-   }
-
-   private Object getValueToInject(In in, String name, Object bean, boolean enforceRequired)
-   {
-      Object result;
-      if ( name.startsWith("#") )
-      {
-         if ( log.isDebugEnabled() )
-         {
-            log.debug("trying to inject with EL expression: " + name);
-         }
-         result = Expressions.instance().createValueExpression(name).getValue();
-      }
-      else if ( in.scope()==UNSPECIFIED )
-      {
-         if ( log.isDebugEnabled() )
-         {
-            log.debug("trying to inject with hierarchical context search: " + name);
-         }
-         boolean create = in.create() && !org.jboss.seam.contexts.Lifecycle.isDestroying();
-         result = getInstanceInAllNamespaces(name, create);
-      }
-      else
-      {
-         if ( in.create() )
-         {
-            throw new IllegalArgumentException(
-                  "cannot combine create=true with explicit scope on @In: " +
-                  getAttributeMessage(name)
-               );
-         }
-         if ( in.scope()==STATELESS )
-         {
-            throw new IllegalArgumentException(
-                  "cannot specify explicit scope=STATELESS on @In: " +
-                  getAttributeMessage(name)
-               );
-         }
-         if ( log.isDebugEnabled() )
-         {
-            log.debug("trying to inject from specified context: " + name + ", scope: " + scope);
-         }
-         if ( enforceRequired || in.scope().isContextActive() )
-         {
-            result = in.scope().getContext().get(name);
-         }
-         else
-         {
-            return null;
-         }
-      }
-
-      if ( result==null && enforceRequired && in.required() )
-      {
-         throw new RequiredException(
-               "@In attribute requires non-null value: " +
-               getAttributeMessage(name)
-            );
-      }
-      else
-      {
-         return result;
-      }
-   }
-
-   private Object getInstanceInAllNamespaces(String name, boolean create)
-   {
-      Object result;
-      result = getInstance(name, create);
-      if (result==null)
-      {
-         for ( Namespace namespace: getImports() )
-         {
-            result = namespace.getComponentInstance(name, create);
-            if (result!=null) break; 
-         }
-      }
-      if (result==null)
-      {
-         for ( Namespace namespace: Init.instance().getGlobalImports() )
-         {
-            result = namespace.getComponentInstance(name, create);
-            if (result!=null) break; 
-         }
-      }
-      if (result==null)
-      {
-         Namespace namespace = getNamespace();
-         if (namespace!=null)
-         {
-            result = namespace.getComponentInstance(name, create);
-         }
-      }
-      return result;
-   }
-
-   private String getAttributeMessage(String attributeName)
-   {
-      return getName() + '.' + attributeName;
-   }
-
-   private static String toName(String name, Method method)
-   {
-      //TODO: does not handle "isFoo"
-      if (name==null || name.length() == 0)
-      {
-         name = method.getName().substring(3, 4).toLowerCase()
-               + method.getName().substring(4);
-      }
-      return name;
-   }
-
-   private static String toName(String name, Field field)
-   {
-      if (name==null || name.length() == 0)
-      {
-         name = field.getName();
-      }
-      return name;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "Component(" + name + ")";
-   }
-
-   public static Class<ProxyObject> createProxyFactory(ComponentType type, final Class beanClass, Collection<Class> businessInterfaces)
-   {
-      Set<Class> interfaces = new LinkedHashSet<Class>();
-      interfaces.add(Instance.class);
-      interfaces.add(Proxy.class);
-      if ( type.isSessionBean() )
-      {
-          interfaces.addAll(businessInterfaces);
-      }
-      else
-      {
-         interfaces.add(HttpSessionActivationListener.class);
-         interfaces.add(Mutable.class);
-      }
-      ProxyFactory factory = new ProxyFactory();
-      factory.setSuperclass( type==JAVA_BEAN ? beanClass : Object.class );
-      factory.setInterfaces( interfaces.toArray( new Class[0] ) );
-      factory.setFilter(FINALIZE_FILTER);
-      return factory.createClass();
-   }
-
-   private static final MethodFilter FINALIZE_FILTER = new MethodFilter() 
-   {
-      public boolean isHandled(Method method) 
-      {
-         // skip finalize methods
-         return method.getParameterTypes().length!=0 || !method.getName().equals( "finalize" );
-      }
-   };
-      
-   public boolean isInterceptionEnabled()
-   {
-      return interceptionEnabled;
-   }
-
-   public boolean isStartup() 
-   {
-      return startup;
-   }
-   
-   public boolean isSynchronize()
-   {
-      return synchronize;
-   }
-
-   public String[] getDependencies()
-   {
-      return dependencies;
-   }
-
-   public boolean isLifecycleMethod(Method method)
-   {
-      return method==null || //EJB 3 JavaDoc says InvocationContext.getMethod() returns null for lifecycle callbacks!
-            lifecycleMethods.contains(method);
-   }
-   
-   public boolean isConversationManagementMethod(Method method)
-   {
-      return method!=null && 
-            conversationManagementMethods.contains(method);
-   }
-
-   static interface InitialValue
-   {
-      Object getValue(Class type);
-   }
-
-   static class ConstantInitialValue implements InitialValue
-   {
-      private Object value;
-
-      public ConstantInitialValue(PropertyValue propertyValue, Class parameterClass, Type parameterType)
-      {
-         this.value = Conversions.getConverter(parameterClass).toObject(propertyValue, parameterType);
-      }
-
-      public Object getValue(Class type)
-      {
-         return value;
-      }
-
-      @Override
-      public String toString()
-      {
-         return "ConstantInitialValue(" + value + ")";
-      }
-
-   }
-
-   static class ELInitialValue implements InitialValue
-   {
-      private String expression;
-      //private ValueBinding vb;
-      private Conversions.Converter converter;
-      private Type parameterType;
-
-      public ELInitialValue(PropertyValue propertyValue, Class parameterClass, Type parameterType)
-      {
-         this.expression = propertyValue.getSingleValue();
-         this.parameterType = parameterType;
-         try
-         {
-            this.converter = Conversions.getConverter(parameterClass);
-         }
-         catch (IllegalArgumentException iae) {
-            //no converter for the type
-         }
-         //vb = FacesContext.getCurrentInstance().getApplication().createValueBinding(expression);
-      }
-
-      public Object getValue(Class type)
-      {
-         Object value;
-         if ( type.equals(ValueExpression.class) )
-         {
-            value = createValueExpression();
-         }
-         else if ( type.equals(MethodExpression.class) )
-         {
-            value = createMethodExpression();
-         }
-         else
-         {
-            value = createValueExpression().getValue();
-         }
-
-         if (converter!=null && value instanceof String)
-         {
-            return converter.toObject( new Conversions.FlatPropertyValue( (String) value ), parameterType );
-         }
-         else if (converter!=null && value instanceof String[])
-         {
-            return converter.toObject( new Conversions.MultiPropertyValue( (String[]) value, null), parameterType );
-         }
-         else
-         {
-            return value;
-         }
-      }
-
-      private ValueExpression createValueExpression()
-      {
-         return Expressions.instance().createValueExpression(expression);
-      }
-
-      private MethodExpression createMethodExpression()
-      {
-         return Expressions.instance().createMethodExpression(expression);
-      }
-
-      @Override
-      public String toString()
-      {
-         return "ELInitialValue(" + expression + ")";
-      }
-
-   }
-
-   static class SetInitialValue implements InitialValue
-   {
-      private InitialValue[] initialValues;
-      private Class elementType;
-      private Class collectionClass;
-      
-      public SetInitialValue(PropertyValue propertyValue, Class collectionClass, Type collectionType)
-      {
-         String[] expressions = propertyValue.getMultiValues();
-         initialValues = new InitialValue[expressions.length];
-         elementType = Reflections.getCollectionElementType(collectionType);
-         if (propertyValue.getType() != null)
-         {
-            this.collectionClass = propertyValue.getType();
-         }
-         else
-         {
-            this.collectionClass = collectionClass;
-         }
-         for ( int i=0; i<expressions.length; i++ )
-         {
-            PropertyValue elementValue = new Conversions.FlatPropertyValue( expressions[i] );
-            initialValues[i] = getInitialValue(elementValue, elementType, elementType);
-         }
-      }
-
-      public Object getValue(Class type)
-      {
-          Set set;
-          //if no configuration has been specified then we first see if
-          //the property is an abstract type, if so we create it using newInstance
-          if (Modifier.isAbstract(collectionClass.getModifiers()) || Modifier.isInterface(collectionClass.getModifiers()))
-          {
-             if(collectionClass == SortedSet.class)
-             {
-                set = new TreeSet();
-             }
-             else
-             {
-                set = new LinkedHashSet(initialValues.length);
-             }
-          }
-          else
-          {
-             try
-             {
-                set = (Set) collectionClass.newInstance();
-             }
-             catch (IllegalAccessException e)
-             {
-                throw new IllegalArgumentException("Cannot instantiate a set of type " + collectionClass + "; try specifying type type in components.xml");
-             }
-             catch (ClassCastException e)
-             {
-                throw new IllegalArgumentException("Cannot cast " + collectionClass + " to java.util.Set");
-             }
-             catch (java.lang.InstantiationException e)
-             {
-                throw new IllegalArgumentException("Cannot instantiate a set of type " + collectionClass + "; try specifying type type in components.xml");
-             }
-          }
-          for (InitialValue iv: initialValues) 
-          {
-             set.add( iv.getValue(elementType) );
-          }
-          return set;
-      }
-      
-      @Override
-      public String toString()
-      {
-         return "SetInitialValue(" + elementType.getSimpleName() + ")";
-      }
-   }
-   
-   static class ListInitialValue implements InitialValue
-   {
-      private InitialValue[] initialValues;
-      private Class elementType;
-      private boolean isArray;
-      private Class collectionClass;
-
-      public ListInitialValue(PropertyValue propertyValue, Class collectionClass, Type collectionType)
-      {
-         String[] expressions = propertyValue.getMultiValues();
-         initialValues = new InitialValue[expressions.length];
-         isArray = collectionClass.isArray();
-         elementType = isArray ? 
-                  collectionClass.getComponentType() : 
-                  Reflections.getCollectionElementType(collectionType);
-         if (propertyValue.getType() != null)
-         {
-            this.collectionClass = propertyValue.getType();
-         }
-         else
-         {
-            this.collectionClass = collectionClass;
-         }
-         for ( int i=0; i<expressions.length; i++ )
-         {
-            PropertyValue elementValue = new Conversions.FlatPropertyValue( expressions[i] );
-            initialValues[i] = getInitialValue(elementValue, elementType, elementType);
-         }
-      }
-
-      public Object getValue(Class type)
-      {
-         if (isArray)
-         {
-            Object array = Array.newInstance(elementType, initialValues.length);
-            for (int i=0; i<initialValues.length; i++)
-            {
-               Array.set( array, i, initialValues[i].getValue(elementType) );
-            }
-            return array;
-         }
-         else
-         {
-            List list;
-            //if no configuration has been specified then we first see if
-            //the property is an abstract type, if so we create it using newInstance
-            if (Modifier.isAbstract(collectionClass.getModifiers()) || Modifier.isInterface(collectionClass.getModifiers()))
-            {
-               list = new ArrayList(initialValues.length);
-            }
-            else
-            {
-               try
-               {
-                  list = (List) collectionClass.newInstance();
-               }
-               catch (IllegalAccessException e)
-               {
-                  throw new IllegalArgumentException("Cannot instantiate a list of type " + collectionClass + "; try specifying type type in components.xml");
-               }
-               catch (ClassCastException e)
-               {
-                  throw new IllegalArgumentException("Cannot cast " + collectionClass + " to java.util.List");
-               }
-               catch (java.lang.InstantiationException e)
-               {
-                  throw new IllegalArgumentException("Cannot instantiate a list of type " + collectionClass + "; try specifying type type in components.xml");
-               }
-            }
-            for (InitialValue iv: initialValues)
-            {
-               list.add( iv.getValue(elementType) );
-            }
-            return list;
-         }
-      }
-      
-      @Override
-      public String toString()
-      {
-         return "ListInitialValue(" + elementType.getSimpleName() + ")";
-      }
-
-   }
-   
-   static class MapInitialValue implements InitialValue
-   {
-      private Map<InitialValue, InitialValue> initialValues;
-      private Class elementType;
-      private Class keyType;
-      private Class collectionClass;
-      
-      public MapInitialValue(PropertyValue propertyValue, Class collectionClass, Type collectionType)
-      {
-         Map<String, String> expressions = propertyValue.getKeyedValues();
-         initialValues = new LinkedHashMap<InitialValue, InitialValue>(expressions.size());      
-         elementType = Reflections.getCollectionElementType(collectionType);
-         keyType = Reflections.getMapKeyType(collectionType);
-         if (propertyValue.getType() != null )
-         {
-            this.collectionClass = propertyValue.getType();
-         }
-         else
-         {
-            this.collectionClass = collectionClass;
-         }
-         for ( Map.Entry<String, String> me: expressions.entrySet() )
-         {
-            PropertyValue keyValue = new Conversions.FlatPropertyValue( me.getKey() );
-            PropertyValue elementValue = new Conversions.FlatPropertyValue( me.getValue() );
-            initialValues.put( getInitialValue(keyValue, keyType, keyType), getInitialValue(elementValue, elementType, elementType) ); 
-         }
-      }
-
-      public Object getValue(Class type)
-      {
-         Map result;
-         if (Modifier.isAbstract(collectionClass.getModifiers()) || Modifier.isInterface(collectionClass.getModifiers()))
-         {
-            if (collectionClass == SortedMap.class)
-            {
-               result = new TreeMap();
-            }
-            else
-            {
-               result = new LinkedHashMap(initialValues.size());
-            }
-         }
-         else
-         {
-            try
-            {
-               result = (Map) collectionClass.newInstance();
-            }
-            catch (IllegalAccessException e)
-            {
-               throw new IllegalArgumentException("Cannot instantiate a map of type " + collectionClass + "; try specifying type type in components.xml");
-            }
-            catch (ClassCastException e)
-            {
-               throw new IllegalArgumentException("Cannot cast " + collectionClass + " to java.util.Map");
-            }
-            catch (java.lang.InstantiationException e)
-            {
-               throw new IllegalArgumentException("Cannot instantiate a map of type " + collectionClass + "; try specifying type type in components.xml");
-            }
-         }
-        
-         for ( Map.Entry<InitialValue, InitialValue> me : initialValues.entrySet() )
-         {
-            result.put( me.getKey().getValue(keyType), me.getValue().getValue(elementType) );
-         }
-         return result;
-      }
-      
-      @Override
-      public String toString()
-      {
-         return "MapInitialValue(" + keyType.getSimpleName() + "," + elementType.getSimpleName() + ")";
-      }
-
-   }
-   
-   public interface BijectedAttribute<T extends Annotation>
-   {
-      public String getName();
-      public T getAnnotation();
-      public Class getType();
-      public void set(Object bean, Object value);
-      public Object get(Object bean);
-   }
-
-   final class BijectedMethod<T extends Annotation> implements BijectedAttribute<T>
-   {
-      private final String name;
-      private final Method method;
-      private final T annotation;
-      
-      private BijectedMethod(String name, Method method, T annotation)
-      {
-         this.name = name;
-         this.method = method;
-         this.annotation = annotation;
-      }
-      public String getName()
-      {
-         return name;
-      }
-      public Method getMethod()
-      {
-         return method;
-      }
-      public T getAnnotation()
-      {
-         return annotation;
-      }
-      public void set(Object bean, Object value)
-      {
-         setPropertyValue(bean, method, name, value);
-      }
-      public Object get(Object bean)
-      {
-         return getPropertyValue(bean, method, name);
-      }
-      public Class getType()
-      {
-         return method.getParameterTypes()[0];
-      }
-      @Override
-      public String toString()
-      {
-         return "BijectedMethod(" + name + ')';
-      }
-   }
-   
-   final class BijectedProperty<T extends Annotation> implements BijectedAttribute<T>
-   {
-      
-      private BijectedMethod<T> getter;
-      private BijectedMethod<T> setter;
-      
-      public BijectedProperty(String name, Method getter, Method setter, T annotation)
-      {
-         this.getter = new BijectedMethod(name, getter, annotation);
-         this.setter = new BijectedMethod(name, setter, annotation);
-      }
-      
-      public BijectedProperty(String name, Method getter, T annotation)
-      {
-         this.getter = new BijectedMethod(name, getter, annotation);
-         try
-         {
-            Method setterMethod = Reflections.getSetterMethod(getter.getDeclaringClass(), name);
-            this.setter = new BijectedMethod(name, setterMethod, annotation);
-         }
-         catch (IllegalArgumentException e) {}        
-      }
-
-      public Object get(Object bean)
-      {
-         return getter.get(bean);
-      }
-
-      public T getAnnotation()
-      {
-         return getter.getAnnotation();
-      }
-
-      public String getName()
-      {
-         return getter.getName();
-      }
-
-      public Class getType()
-      {
-         return getter.getType();
-      }
-
-      public void set(Object bean, Object value)
-      {
-         if (setter == null)
-         {
-            throw new IllegalArgumentException("Component must have a setter for " + name);
-         }
-         setter.set(bean, value); 
-      }
-      
-   }
-   
-   final class BijectedField<T extends Annotation> implements BijectedAttribute<T>
-   {
-      private final String name;
-      private final Field field;
-      private final T annotation;
-      
-      private BijectedField(String name, Field field, T annotation)
-      {
-         this.name = name;
-         this.field = field;
-         this.annotation = annotation;
-      }
-      public String getName()
-      {
-         return name;
-      }
-      public Field getField()
-      {
-         return field;
-      }
-      public T getAnnotation()
-      {
-         return annotation;
-      }
-      public Class getType()
-      {
-         return field.getType();
-      }
-      public void set(Object bean, Object value)
-      {
-         setFieldValue(bean, field, name, value);
-      }
-      public Object get(Object bean)
-      {
-         return getFieldValue(bean, field, name);
-      }
-      @Override
-      public String toString()
-      {
-         return "BijectedField(" + name + ')';
-      }
-   }
-
-   public List<BijectedAttribute> getPersistenceContextAttributes()
-   {
-      return pcAttributes;
-   }
-
-   public Collection<Namespace> getImports()
-   {
-      return imports;
-   }
-
-   public Namespace getNamespace()
-   {
-      return namespace;
-   }
-   
-   public boolean isPerNestedConversation()
-   {
-      return perNestedConversation;
-   }
-   
-   public boolean hasConversationManagementMethods()
-   {
-      return !conversationManagementMethods.isEmpty();
-   }
-   
-   public boolean isSecure()
-   {
-      return secure;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ComponentType.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ComponentType.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ComponentType.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,53 +0,0 @@
-//$Id: ComponentType.java 5355 2007-06-20 20:42:22Z gavin $
-package org.jboss.seam;
-
-import static org.jboss.seam.ScopeType.CONVERSATION;
-import static org.jboss.seam.ScopeType.EVENT;
-import static org.jboss.seam.ScopeType.STATELESS;
-
-/**
- * The types of components understood by Seam.
- * 
- * @author Gavin King
- */
-public enum ComponentType
-{
-   ENTITY_BEAN, 
-   STATELESS_SESSION_BEAN,
-   STATEFUL_SESSION_BEAN,
-   MESSAGE_DRIVEN_BEAN,
-   JAVA_BEAN;
-   
-   public boolean isEjb()
-   {
-      return this!=JAVA_BEAN;
-   }
-   
-   public boolean isSessionBean()
-   {
-      return this==STATELESS_SESSION_BEAN || this==STATEFUL_SESSION_BEAN;
-   }
-   
-   public boolean isStateless()
-   {
-      return this==STATELESS_SESSION_BEAN || this==MESSAGE_DRIVEN_BEAN;
-   }
-   
-   public ScopeType getDefaultScope()
-   {
-      switch (this)
-      {
-         case STATEFUL_SESSION_BEAN:
-         case ENTITY_BEAN:
-            return CONVERSATION;
-         case STATELESS_SESSION_BEAN:
-         case MESSAGE_DRIVEN_BEAN:
-            return STATELESS;
-         case JAVA_BEAN:
-            return EVENT;
-         default:
-            throw new IllegalStateException();
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ConcurrentRequestTimeoutException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ConcurrentRequestTimeoutException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ConcurrentRequestTimeoutException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,29 +0,0 @@
-/**
- * 
- */
-package org.jboss.seam;
-
-public class ConcurrentRequestTimeoutException extends RuntimeException
-{
-
-   public ConcurrentRequestTimeoutException()
-   {
-      super();
-   }
-
-   public ConcurrentRequestTimeoutException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-
-   public ConcurrentRequestTimeoutException(String message)
-   {
-      super(message);
-   }
-
-   public ConcurrentRequestTimeoutException(Throwable cause)
-   {
-      super(cause);
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/CyclicDependencyException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/CyclicDependencyException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/CyclicDependencyException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,98 +0,0 @@
-package org.jboss.seam;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.core.BijectionInterceptor;
-
-/**
- * An exception that is thrown when {@link BijectionInterceptor} detects that a
- * component's dependencies cannot be injected due to a cyclic dependency. As
- * the exception is passed up the stack, the call sequence is recorded so that a
- * useful exception message can be constructed.
- * 
- * @author Matt Drees
- * 
- */
-public class CyclicDependencyException extends IllegalStateException
-{
-
-   /**
-    * stores the invocations in reverse call order
-    */
-   private final List<String> invocations = new ArrayList<String>();
-   private String tailComponentName;
-   private boolean cycleComplete;
-
-   /**
-    * Records this invocation's component name and method to be displayed in
-    * {@link #getMessage()}, unless this invocation is not part of the detected
-    * cycle. This method will be successively called as the exception is
-    * propagated up the stack.
-    * 
-    * @param componentName
-    * @param method
-    */
-   public void addInvocation(String componentName, Method method)
-   {
-      if (cycleComplete)
-      {
-         return;
-      }
-
-      if (invocations.isEmpty())
-      {
-         tailComponentName = componentName;
-      }
-      else
-      {
-         if (tailComponentName.equals(componentName))
-         {
-            cycleComplete = true;
-         }
-      }
-      invocations.add(createInvocationLabel(componentName, method));
-   }
-
-   /**
-    * returns e.g. "foo.doSomething()"
-    */
-   private String createInvocationLabel(String componentName, Method method)
-   {
-      String invocationLabel = componentName + "." + method.getName() + "(";
-      int i = 1;
-      for (Class<?> parameterType : method.getParameterTypes())
-      {
-         invocationLabel += parameterType.getSimpleName();
-         if (i < method.getParameterTypes().length)
-         {
-            invocationLabel += ", ";
-         }
-         i++;
-      }
-      invocationLabel += ")";
-      return invocationLabel;
-   }
-
-   @Override
-   public String getMessage()
-   {
-      if (!cycleComplete)
-      {
-         return "Cyclic dependency found";
-      }
-      else
-      {
-         String message = "Injection into " + tailComponentName + " resulted in a dependency cycle, requiring the invocation of " + invocations.get(0) + ".  The complete cycle: ";
-         for (int i = invocations.size() - 1; i >= 0; i--)
-         {
-            message += invocations.get(i);
-            if (i != 0)
-               message += " -> ";
-         }
-         return message;
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Entity.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Entity.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Entity.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,324 +0,0 @@
-package org.jboss.seam;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import javax.persistence.EmbeddedId;
-import javax.persistence.Id;
-import javax.persistence.PostLoad;
-import javax.persistence.PrePersist;
-import javax.persistence.PreRemove;
-import javax.persistence.PreUpdate;
-import javax.persistence.Version;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.init.EjbDescriptor;
-import org.jboss.seam.init.EjbEntityDescriptor;
-import org.jboss.seam.util.Reflections;
-
-/**
- * Metamodel class for entity classes.
- * 
- * A class will be identified as an entity class if it has an @Entity annotation.
- * 
- * @author Gavin King
- * 
- */
-public class Entity extends Model
-{
-
-   private Method preRemoveMethod;
-   private Method prePersistMethod;
-   private Method preUpdateMethod;
-   private Method postLoadMethod;
-   private Method identifierGetter;
-   private Field identifierField;
-   private Method versionGetter;
-   private Field versionField;
-   private String name;
-
-   /**
-    * 
-    * @param beanClass
-    *
-    * Use Entity.forBean() or Entity.forClass
-    */
-   @Deprecated
-   public Entity(Class<?> beanClass)
-   {
-      super(beanClass);
-      EjbDescriptor descriptor = Seam.getEjbDescriptor(beanClass);
-      if (descriptor instanceof EjbEntityDescriptor)
-      {
-         mergeAnnotationAndOrmXml((EjbEntityDescriptor) descriptor);
-      }
-      else
-      {
-         mergeAnnotationAndOrmXml(null);
-      }
-   }
-
-   public Method getPostLoadMethod()
-   {
-      return postLoadMethod;
-   }
-
-   public Method getPrePersistMethod()
-   {
-      return prePersistMethod;
-   }
-
-   public Method getPreRemoveMethod()
-   {
-      return preRemoveMethod;
-   }
-
-   public Method getPreUpdateMethod()
-   {
-      return preUpdateMethod;
-   }
-
-   @Deprecated
-   public Field getIdentifierField()
-   {
-      return identifierField;
-   }
-
-   @Deprecated
-   public Method getIdentifierGetter()
-   {
-      return identifierGetter;
-   }
-
-   @Deprecated
-   public Field getVersionField()
-   {
-      return versionField;
-   }
-
-   @Deprecated
-   public Method getVersionGetter()
-   {
-      return versionGetter;
-   }
-
-   public Object getIdentifier(Object entity)
-   {
-      if (identifierGetter != null)
-      {
-         return Reflections.invokeAndWrap(identifierGetter, entity);
-      }
-      else if (identifierField != null)
-      {
-         return Reflections.getAndWrap(identifierField, entity);
-      }
-      else
-      {
-         throw new IllegalStateException("@Id attribute not found for entity class: " + getBeanClass().getName());
-      }
-   }
-
-   public Object getVersion(Object entity)
-   {
-      if (versionGetter != null)
-      {
-         return Reflections.invokeAndWrap(versionGetter, entity);
-      }
-      else if (versionField != null)
-      {
-         return Reflections.getAndWrap(versionField, entity);
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-   
-   public static Entity forBean(Object bean)
-   {
-      return forClass(bean.getClass());
-   }
-   
-   public static Entity forClass(Class clazz)
-   {
-      if (!Contexts.isApplicationContextActive())
-      {
-         throw new IllegalStateException("No application context active");
-      }
-
-      Class entityClass = Seam.getEntityClass(clazz);
-      
-      if (entityClass == null)
-      {
-         throw new NotEntityException("Not an entity class: " + clazz.getName());
-      }
-      String name = getModelName(entityClass);
-      Model model = (Model) Contexts.getApplicationContext().get(name);
-      if (model == null || !(model instanceof Entity))
-      {
-         Entity entity = new Entity(entityClass);
-         Contexts.getApplicationContext().set(name, entity);
-         return entity;
-      }
-      else
-      {
-         return (Entity) model;
-      }
-   }
-
-   private void mergeAnnotationAndOrmXml(EjbEntityDescriptor descriptor)
-   {
-      // Lookup the name of the Entity from XML, annotation or default
-      this.name = lookupName(getBeanClass(), descriptor);
-      if (this.name == null)
-      {
-         throw new NotEntityException("Unable to establish name of entity " + getBeanClass());
-      }
-      
-      if (descriptor != null)
-      {
-         // Set any methods and fields we need metadata for from the XML
-         // descriptor. These take priority over annotations
-         
-         this.preRemoveMethod = getEntityCallbackMethod(getBeanClass(), descriptor.getPreRemoveMethodName());
-         this.prePersistMethod = getEntityCallbackMethod(getBeanClass(), descriptor.getPrePersistMethodName());
-         this.preUpdateMethod = getEntityCallbackMethod(getBeanClass(), descriptor.getPreUpdateMethodName());
-         this.postLoadMethod = getEntityCallbackMethod(getBeanClass(), descriptor.getPostLoadMethodName());
-         
-         this.identifierField = descriptor.getIdentifierFieldName() != null ? Reflections.getField(getBeanClass(), descriptor.getIdentifierFieldName()) : null;
-         this.identifierGetter = descriptor.getIdentifierPropertyName() != null ? Reflections.getGetterMethod(getBeanClass(), descriptor.getIdentifierPropertyName()) : null;
-         
-         this.versionField = descriptor.getVersionFieldName() != null ? Reflections.getField(getBeanClass(), descriptor.getVersionFieldName()) : null;
-         this.versionGetter = descriptor.getVersionPropertyName() != null ? Reflections.getGetterMethod(getBeanClass(), descriptor.getVersionPropertyName()) : null;
-      }
-      
-      if (descriptor == null || !descriptor.isMetaDataComplete())
-      {
-         for ( Class<?> clazz=getBeanClass(); clazz!=Object.class; clazz = clazz.getSuperclass() )
-         {
-
-            for ( Method method: clazz.getDeclaredMethods() )
-            {
-               //TODO: does the spec allow multiple lifecycle method
-               //      in the entity class heirarchy?
-               if (this.preRemoveMethod == null && method.isAnnotationPresent(PreRemove.class))
-               {
-                  this.preRemoveMethod = method;
-               }
-               if (this.prePersistMethod == null && method.isAnnotationPresent(PrePersist.class) )
-               {
-                  this.prePersistMethod = method;
-               }
-               if (preUpdateMethod == null && method.isAnnotationPresent(PreUpdate.class) )
-               {
-                  preUpdateMethod = method;
-               }
-               if (postLoadMethod == null && method.isAnnotationPresent(PostLoad.class) )
-               {
-                  postLoadMethod = method;
-               }
-               if (identifierField == null && identifierGetter == null && method.isAnnotationPresent(Id.class) || method.isAnnotationPresent(EmbeddedId.class))
-               {
-                  identifierGetter = method;
-               }
-               if (versionField == null && versionGetter == null && method.isAnnotationPresent(Version.class) )
-               {
-                  versionGetter = method;
-               }
-            }
-            
-            if ( ( identifierGetter == null && identifierField == null ) || ( versionField == null && versionGetter == null ) )
-            {
-               for ( Field field: clazz.getDeclaredFields() )
-               {
-                  if ( identifierGetter == null && identifierField == null && (field.isAnnotationPresent(Id.class) || field.isAnnotationPresent(EmbeddedId.class)))
-                  {
-                     identifierField = field;
-                  }
-                  if ( versionGetter == null && versionField == null && field.isAnnotationPresent(Version.class) )
-                  {
-                     versionField = field;
-                  }
-               }
-            }
-         }
-      }
-      
-      setAccessible(this.preRemoveMethod);
-      setAccessible(this.prePersistMethod);
-      setAccessible(this.preUpdateMethod);
-      setAccessible(this.postLoadMethod);
-      setAccessible(this.identifierField);
-      setAccessible(this.identifierGetter);
-      setAccessible(this.versionField);
-      setAccessible(this.versionGetter);
-   }
-   
-   private void setAccessible(AccessibleObject accessibleObject)
-   {
-      if (accessibleObject != null)
-      {
-         accessibleObject.setAccessible(true);
-      }
-   }
-
-   private static String lookupName(Class<?> beanClass, EjbEntityDescriptor descriptor)
-   {
-      if (descriptor != null && descriptor.getEjbName() != null)
-      {
-         // XML overrides annotations
-         return descriptor.getEjbName();
-      }
-      else if ( (descriptor == null || !descriptor.isMetaDataComplete()) && beanClass.isAnnotationPresent(javax.persistence.Entity.class) && !"".equals(beanClass.getAnnotation(javax.persistence.Entity.class).name()))
-      {
-         // Is a name specified?
-         return beanClass.getAnnotation(javax.persistence.Entity.class).name();
-      }
-      else if (descriptor != null || beanClass.isAnnotationPresent(javax.persistence.Entity.class))
-      {
-         // Use the default name if either a descriptor is specified or the
-         // annotation is present
-         return beanClass.getName();
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   private static Method getEntityCallbackMethod(Class beanClass, String callbackMethodName)
-   {
-      try
-      {
-         if (callbackMethodName != null)
-         {
-            return Reflections.getMethod(beanClass, callbackMethodName);
-         }
-         else
-         {
-            return null;
-         }
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new IllegalArgumentException("Unable to find Entity callback method specified in orm.xml", e);
-      }
-   }
-   
-   public static class NotEntityException extends IllegalArgumentException 
-   {
-      
-      public NotEntityException(String string)
-      {
-         super(string);
-      }
-      
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Instance.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Instance.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Instance.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-package org.jboss.seam;
-
-public interface Instance
-{
-   public Component getComponent();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/InstantiationException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/InstantiationException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/InstantiationException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,26 +0,0 @@
-//$Id: InstantiationException.java 3833 2007-02-13 06:02:53Z gavin $
-package org.jboss.seam;
-
-/**
- * Thrown when Seam cannot instantiate a component.
- * 
- * @author Gavin King
- *
- */
-public class InstantiationException extends RuntimeException
-{
-
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -5437284703511833879L;
-
-   public InstantiationException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-
-   public InstantiationException(Throwable cause)
-   {
-      super(cause);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Model.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Model.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Model.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,53 +0,0 @@
-package org.jboss.seam;
-
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Base class of metamodels. For a class which
- * is neither an entity nor a Seam component,
- * the concrete type of the metamodel object
- * will be Model. For components or entities
- * it is a subclass of Model.
- * 
- * @author Gavin King
- *
- */
-public class Model
-{
-   private Class<?> beanClass;
-
-   public Model(Class<?> beanClass)
-   {
-      this.beanClass = beanClass;
-   }
-   
-   public final Class<?> getBeanClass()
-   {
-      return beanClass;
-   }
-
-   @SuppressWarnings("deprecation")
-   public static Model forClass(Class clazz)
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No application context active");
-      }
-      
-      String name = getModelName(clazz);
-      Model model = (Model) Contexts.getApplicationContext().get(name);
-      if ( model==null )
-      {
-         model = clazz.isAnnotationPresent(javax.persistence.Entity.class) ? 
-                  new Entity(clazz) : new Model(clazz);
-         Contexts.getApplicationContext().set(name, model);
-      }
-      return model;
-   }
-
-   static String getModelName(Class clazz)
-   {
-      return clazz.getName() + ".model";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Namespace.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Namespace.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Namespace.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,100 +0,0 @@
-package org.jboss.seam;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A namespace for Seam component names. 
- * 
- * @author Gavin King
- *
- */
-public class Namespace
-{
-   
-   private String name;
-   private Map<String, Namespace> children = new HashMap<String, Namespace>();
-   
-   public Namespace(String name) 
-   {
-      this.name = name;
-   }
-   
-   /**
-    * Get a component or child namespace
-    */
-   public Object get(String key)
-   {
-      Object component = getComponentInstance(key);
-      return component==null ? children.get(key) : component;
-   }
-   
-   public Namespace getChild(String key)
-   {
-      return children.get(key);
-   }
-   
-   public Namespace getOrCreateChild(String key)
-   {
-      Namespace result = getChild(key);
-      if (result==null)
-      {
-         result = new Namespace( qualifyName(key) + '.' );
-         addChild(key, result);
-      }
-      return result;
-   }
-   
-   public Object getComponentInstance(String key)
-   {
-      return getComponentInstance(key, true);
-   }
-
-   public Object getComponentInstance(String key, boolean create)
-   {
-      return Component.getInstance( qualifyName(key), create );
-   }
-
-   private String qualifyName(String key)
-   {
-      return name==null ? key : name + key;
-   }
-   
-   public boolean hasChild(String key)
-   {
-      return children.containsKey(key);
-   }
-   
-   public void addChild(String name, Namespace value)
-   {
-      children.put(name, value);
-   }
-   
-   @Override
-   public int hashCode()
-   {
-      return name==null ? 0 : name.hashCode();
-   }
-   
-   @Override
-   public boolean equals(Object other)
-   {
-      if ( !(other instanceof Namespace) )
-      {
-         return false;
-      }
-      else
-      {
-         Namespace ns = (Namespace) other;
-         return this.name==ns.name || 
-               ( this.name!=null && this.name.equals(ns.name) );
-      }
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "Namespace(" + ( name==null ? "Root" : name ) + ')';
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/NoConversationException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/NoConversationException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/NoConversationException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam;
-
-/**
- * Throw when a component marked @Conversational is called
- * outside the scope of a long-running conversation.
- * 
- * @author Gavin King
- *
- */
-public class NoConversationException extends RuntimeException
-{
-
-   private static final long serialVersionUID = -5437384703541823179L;
-
-   public NoConversationException(String message)
-   {
-      super(message);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/RequiredException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/RequiredException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/RequiredException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-//$Id: RequiredException.java 3833 2007-02-13 06:02:53Z gavin $
-package org.jboss.seam;
-
-/**
- * Thrown when a null value is encountered during bijection
- * of an attribute with required=true.
- * 
- * @author Gavin King
- *
- */
-public class RequiredException extends RuntimeException
-{
-
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -5437284703541833879L;
-
-   public RequiredException(String message)
-   {
-      super(message);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ScopeType.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ScopeType.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ScopeType.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,166 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam;
-
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * The scopes defined by Seam.
- * 
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public enum ScopeType
-{
-   /**
-    * The stateless pseudo-context.
-    */
-   STATELESS,
-   /**
-    * The method context. Each call to a session bean or 
-    * JavaBean component puts a new method context onto
-    * the stack of method contexts associated with the
-    * current thread. The context is destroyed (and the
-    * stack popped) when the method returns.
-    */
-   METHOD,
-   /**
-    * The event (request) context. Spans a server request,
-    * from restore view to render response.
-    */
-   EVENT,
-   /**
-    * The page context. Begins during the invoke application
-    * phase prior to rendering a page, and lasts until the end 
-    * of any invoke application phase of a faces request 
-    * originating from that page. Non-faces requests do not
-    * propagate the page scope.
-    */
-   PAGE,
-   /**
-    * The conversation context. Spans multiple requests from
-    * the same browser window, demarcated by @Begin and @End
-    * methods. A conversation context is propagated by
-    * any faces request, or by any request that specifies
-    * a conversation id as a request parameter. The conversation
-    * context is not available during the restore view phase.
-    */
-   CONVERSATION,
-   /**
-    * The session context. (A servlet login session.)
-    */
-   SESSION,
-   /**
-    * The application context (Servlet context.)
-    */
-   APPLICATION,
-   /**
-    * The business process context. Spans multiple conversations
-    * with multiple users, demarcated by the start and end states
-    * of the business process definition.
-    */
-   BUSINESS_PROCESS,
-   /**
-    * Indicates that the scope is implied.
-    */
-   UNSPECIFIED;
-   
-   private final String prefix;
-
-   private ScopeType()
-   {
-      prefix = "org.jboss.seam." + toString();
-   }
-   
-   public boolean isContextActive()
-   {
-      switch (this)
-      {
-         case STATELESS:
-            return true;
-         case METHOD:
-            return Contexts.isMethodContextActive();
-         case EVENT:
-            return Contexts.isEventContextActive();
-         case PAGE:
-            return Contexts.isPageContextActive();
-         case CONVERSATION:
-            return Contexts.isConversationContextActive();
-         case SESSION:
-            return Contexts.isSessionContextActive();
-         case APPLICATION:
-            return Contexts.isApplicationContextActive();
-         case BUSINESS_PROCESS:
-            return Contexts.isBusinessProcessContextActive();
-         default: 
-            throw new IllegalArgumentException();
-      }
-   }
-   
-   /**
-    * @return the Context object for this scope
-    */
-   public Context getContext() {
-      switch (this)
-      {
-         case STATELESS: 
-            throw new UnsupportedOperationException("Stateless pseudo-scope does not have a Context object");
-         case METHOD: 
-            if ( !Contexts.isMethodContextActive() )
-            {
-               throw new IllegalStateException("No method context active");
-            }
-            return Contexts.getMethodContext();
-         case EVENT: 
-            if ( !Contexts.isEventContextActive() )
-            {
-               throw new IllegalStateException("No event context active");
-            }
-            return Contexts.getEventContext();
-         case PAGE:
-            if ( !Contexts.isPageContextActive() )
-            {
-               throw new IllegalStateException("No page context active");
-            }
-            return Contexts.getPageContext();
-         case CONVERSATION: 
-            if ( !Contexts.isConversationContextActive() )
-            {
-               throw new IllegalStateException("No conversation context active");
-            }
-            return Contexts.getConversationContext();
-         case SESSION: 
-            if ( !Contexts.isSessionContextActive() )
-            {
-               throw new IllegalStateException("No session context active");
-            }
-             return Contexts.getSessionContext();
-         case APPLICATION: 
-            if ( !Contexts.isApplicationContextActive() )
-            {
-               throw new IllegalStateException("No application context active");
-            }
-             return Contexts.getApplicationContext();
-         case BUSINESS_PROCESS: 
-            if ( !Contexts.isBusinessProcessContextActive() )
-            {
-               throw new IllegalStateException("No process context active");
-            }
-             return Contexts.getBusinessProcessContext();
-         default: 
-            throw new IllegalArgumentException();
-      }
-   }
-   
-   public String getPrefix()
-   {
-      return prefix;
-   }
-
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Seam.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Seam.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/Seam.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,378 +0,0 @@
-//$Id: Seam.java 10262 2009-04-01 07:03:21Z dan.j.allen $
-package org.jboss.seam;
-
-import static org.jboss.seam.ComponentType.ENTITY_BEAN;
-import static org.jboss.seam.ComponentType.JAVA_BEAN;
-import static org.jboss.seam.ComponentType.MESSAGE_DRIVEN_BEAN;
-import static org.jboss.seam.ComponentType.STATEFUL_SESSION_BEAN;
-import static org.jboss.seam.ComponentType.STATELESS_SESSION_BEAN;
-import static org.jboss.seam.util.EJB.MESSAGE_DRIVEN;
-import static org.jboss.seam.util.EJB.STATEFUL;
-import static org.jboss.seam.util.EJB.STATELESS;
-import static org.jboss.seam.util.EJB.name;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import javax.persistence.Entity;
-
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Role;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.init.DeploymentDescriptor;
-import org.jboss.seam.init.EjbDescriptor;
-import org.jboss.seam.util.Strings;
-import org.jboss.seam.web.Session;
-
-/**
- * Convenience methods for accessing annotated information
- * about Seam component classes.
- * 
- * @author Gavin King
- */
-public class Seam
-{
-   private static final Map<Class, String> COMPONENT_NAME_CACHE = new ConcurrentHashMap<Class, String>();
-   private static final Map<Class, EjbDescriptor> EJB_DESCRIPTOR_CACHE = new ConcurrentHashMap<Class, EjbDescriptor>();
-   private static final Set<ClassLoader> CLASSLOADERS_LOADED = new HashSet<ClassLoader>(); 
-
-   // application-scoped property in which the Seam version is stored
-   public static final String VERSION = "org.jboss.seam.version";
-   
-   private static String jarName;
-   private static String versionString;
-
-   public static EjbDescriptor getEjbDescriptor(Class clazz)
-   {
-      EjbDescriptor info = EJB_DESCRIPTOR_CACHE.get(clazz);
-      if (info != null) 
-      {
-          return info;
-      }
-      else if (!CLASSLOADERS_LOADED.contains(clazz.getClassLoader()))
-      {
-         cacheEjbDescriptors(clazz);
-         return EJB_DESCRIPTOR_CACHE.get(clazz);
-      }
-      
-      return null;
-   }
-   
-   private synchronized static void cacheEjbDescriptors(Class clazz)
-   {
-      if (!CLASSLOADERS_LOADED.contains(clazz.getClassLoader()))
-      {         
-         Map<Class, EjbDescriptor> ejbDescriptors = new DeploymentDescriptor(clazz).getEjbDescriptors();
-         EJB_DESCRIPTOR_CACHE.putAll(ejbDescriptors);
-         CLASSLOADERS_LOADED.add(clazz.getClassLoader());         
-      }
-   } 
-  
-   /**
-    * Get the default scope
-    * @see Scope
-    */
-   public static ScopeType getComponentScope(Class<?> clazz)
-   {
-       return clazz.isAnnotationPresent(Scope.class) ?
-               clazz.getAnnotation(Scope.class).value() :
-               getComponentType(clazz).getDefaultScope();
-   }
-   
-   /**
-    * Get the scope for a role
-    * @see Scope
-    */
-   public static ScopeType getComponentRoleScope(Class clazz, Role role)
-   {
-      return role.scope()==ScopeType.UNSPECIFIED ?
-            getComponentType(clazz).getDefaultScope() :
-            role.scope();
-   }
-   
-   /**
-    * Get the component type
-    */
-   public static ComponentType getComponentType(Class<?> clazz)
-   {
-      if ( clazz.isAnnotationPresent(STATEFUL) ) 
-      {
-          return STATEFUL_SESSION_BEAN;
-      } 
-      else if ( clazz.isAnnotationPresent(STATELESS) ) 
-      {
-          return STATELESS_SESSION_BEAN;
-      } 
-      else if ( clazz.isAnnotationPresent(MESSAGE_DRIVEN) ) 
-      {
-          return MESSAGE_DRIVEN_BEAN;
-      } 
-      else if ( clazz.isAnnotationPresent(Entity.class) ) 
-      {
-          return ENTITY_BEAN;
-      } 
-      else 
-      {          
-         EjbDescriptor ejbDescriptor = getEjbDescriptor(clazz);
-         if (ejbDescriptor == null) 
-         {
-            return JAVA_BEAN;
-         }
-         else
-         {
-            return ejbDescriptor.getBeanType();
-         }
-      }      
-   }
-      
-   /**
-    * Get the component name
-    * @see Name
-    */
-   public static String getComponentName(Class<?> clazz)
-   {
-      String result = COMPONENT_NAME_CACHE.get(clazz);
-      if (result==null)
-      {
-         result = searchComponentName(clazz);
-         if (result!=null)
-         {
-            COMPONENT_NAME_CACHE.put(clazz, result);
-         }
-      }
-      return result;
-   }
-   
-   public static String searchComponentName(Class<?> clazz)
-   {
-      while ( clazz!=null && !Object.class.equals(clazz) )
-      {
-         Name name = clazz.getAnnotation(Name.class);
-         if ( name!=null ) return name.value();
-         clazz = clazz.getSuperclass();
-      }
-      return null;
-   }
-   
-   /**
-    * Get the bean class from a container-generated proxy
-    * class
-    * 
-    */
-   public static Class getEntityClass(Class clazz)
-   {
-      while (clazz != null && !Object.class.equals(clazz))
-      {
-         if (clazz.isAnnotationPresent(Entity.class))
-         {
-            return clazz;
-         }
-         else
-         {
-            EjbDescriptor ejbDescriptor = Seam.getEjbDescriptor(clazz);
-            if (ejbDescriptor != null)
-            {
-               return ejbDescriptor.getBeanType() == ComponentType.ENTITY_BEAN ? clazz : null;
-            }
-            else
-            {
-               clazz = clazz.getSuperclass();
-            }
-         }
-      }
-      return null;
-   }
-   
-   /**
-    * Is the class a container-generated proxy class for an 
-    * entity bean?
-    */
-   public static boolean isEntityClass(Class<?> clazz)
-   {
-      return getEntityClass(clazz)!=null;
-   }
-   
-   public static String getEjbName(Class<?> clazz)
-   {
-       switch ( getComponentType(clazz) ) 
-       {
-           case ENTITY_BEAN:
-           case JAVA_BEAN:
-               return null;
-           case STATEFUL_SESSION_BEAN:
-               return clazz.isAnnotationPresent(STATEFUL) ? 
-                     getStatefulEjbName(clazz) : getEjbNameFromDescriptor(clazz);
-           case STATELESS_SESSION_BEAN:
-               return clazz.isAnnotationPresent(STATELESS) ?
-                     getStatelessEjbName(clazz) : getEjbNameFromDescriptor(clazz);
-           case MESSAGE_DRIVEN_BEAN:
-               return clazz.isAnnotationPresent(MESSAGE_DRIVEN) ?
-                     getMessageDrivenEjbName(clazz) : getEjbNameFromDescriptor(clazz);
-           default:
-               throw new IllegalArgumentException();
-       }
-   }
-
-   private static String getMessageDrivenEjbName(Class<?> clazz)
-   {
-      String mdName = name( clazz.getAnnotation(MESSAGE_DRIVEN) );
-      return mdName.equals("") ? unqualifyClassName(clazz) : mdName;
-   }
-
-   private static String getStatelessEjbName(Class<?> clazz)
-   {
-      String statelessName = name( clazz.getAnnotation(STATELESS) );
-      return statelessName.equals("") ? unqualifyClassName(clazz) : statelessName;
-   }
-
-   private static String getStatefulEjbName(Class<?> clazz)
-   {
-      String statefulName = name( clazz.getAnnotation(STATEFUL) );
-      return statefulName.equals("") ? unqualifyClassName(clazz) : statefulName;
-   }
-
-   private static String getEjbNameFromDescriptor(Class<?> clazz)
-   {
-      EjbDescriptor ejbDescriptor = getEjbDescriptor(clazz);
-      return ejbDescriptor==null ? null : ejbDescriptor.getEjbName();
-   }
-   
-   private static String unqualifyClassName(Class<?> clazz) 
-   {
-      return Strings.unqualify( Strings.unqualify( clazz.getName() ), '$' );
-   }
-   
-   public static boolean isInterceptionEnabled(Class<?> clazz)
-   {
-      ComponentType componentType = getComponentType(clazz);
-      if ( componentType==ENTITY_BEAN )
-      {
-         return false;
-      }
-      else if ( getComponentType(clazz)==MESSAGE_DRIVEN_BEAN )
-      {
-         return true;
-      }
-      else if ( clazz.isAnnotationPresent(BypassInterceptors.class) )
-      {
-         return false;
-      }
-      else 
-      {
-         return true;
-      }
-   }
-   
-   /**
-    * Mark the session for invalidation at the end of the 
-    * request cycle
-    * 
-    * @deprecated use Session.instance().invalidate()
-    */
-   public static void invalidateSession()
-   {
-      Session.instance().invalidate();
-   }
-   
-   /**
-    * Is the session marked for invalidation?
-    * 
-    * @deprecated use Session.instance().isInvalidated()
-    */
-   public static boolean isSessionInvalid()
-   {
-      return Session.instance().isInvalid();
-   }
-   
-   /**
-    * Get the Seam component, even if no application context
-    * is associated with the current thread.
-    */
-   public static Component componentForName(String name)
-   {
-      if ( Contexts.isApplicationContextActive() )
-      {
-         return Component.forName(name);
-      }
-      else
-      {
-         Lifecycle.setupApplication();
-         try
-         {
-            return Component.forName(name);
-         }
-         finally
-         {
-            Lifecycle.cleanupApplication();
-         }
-      }
-   }
-   
-   public static String getVersion()
-   {
-      Package pkg = Seam.class.getPackage();
-      if (pkg.getImplementationVersion() != null)
-      {
-         return pkg.getImplementationVersion();
-      }
-
-      // new way of getting Manifest version string
-      // in case of module classloading for instance in JBoss AS7
-      if (versionString == null)
-      {
-         final Enumeration<URL> resources;
-         try
-         {
-            resources = Seam.class.getClassLoader().getResources("META-INF/MANIFEST.MF");
-            while (resources.hasMoreElements() && versionString == null)
-            {
-               final URL url = resources.nextElement();
-               final InputStream stream = url.openStream();
-               if (stream != null)
-                  try
-                  {
-                     final Manifest manifest = new Manifest(stream);
-                     final Attributes mainAttributes = manifest.getMainAttributes();
-                     if (mainAttributes != null && "Seam Core".equals(mainAttributes.getValue("Specification-Title")))
-                     {
-                        jarName = mainAttributes.getValue("Specification-Title");
-                        versionString = mainAttributes.getValue("Specification-Version");
-                     }
-                  }
-                  finally
-                  {
-                     try
-                     {
-                        stream.close();
-                     }
-                     catch (Throwable ignored)
-                     {
-                     }
-                  }
-            }
-         }
-         catch (IOException ignored)
-         {
-         }
-      }
-      return versionString;
-   }
-   
-   public static void clearComponentNameCache()
-   {
-      COMPONENT_NAME_CACHE.clear();
-      EJB_DESCRIPTOR_CACHE.clear();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/ApplicationException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/ApplicationException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/ApplicationException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,33 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Synonym for javax.ejb.ApplicationException, 
- * for use in a pre Java EE 5 environment.
- * 
- * @author Gavin King
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface ApplicationException
-{
-   /**
-    * @return true if this exception should set 
-    * the transaction to rollback only
-    */
-   public boolean rollback() default false;
-   /**
-    * @return true if this exception should end
-    * the current long-running conversation
-    */
-   public boolean end() default false;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/AutoCreate.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/AutoCreate.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/AutoCreate.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,23 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that the annotated component should be automatically
- * instantiated whenever it is asked for, even if @In does
- * not specify create=true. If this annotation appears at the
- * package level, it applies to all components in the package.
- * 
- * @author Gavin King
- *
- */
- at Target({TYPE, PACKAGE})
- at Retention(RUNTIME)
- at Documented
-public @interface AutoCreate {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Begin.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Begin.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Begin.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,63 +0,0 @@
-//$Id: Begin.java 9621 2008-11-24 17:31:44Z dan.j.allen $
-package org.jboss.seam.annotations;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-/**
- * Marks a method as beginning a long-running conversation, 
- * if none exists, and if the method returns a non-null value 
- * without throwing an exception.
- *  
- * A null outcome never begins a conversation.
- * If the method is of type void, a conversation always
- * begins.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface Begin 
-{
-	/**
-	 * An empty outcome list is interpreted to mean any 
-	 * outcome except for the null (redisplay) outcome.
-    * 
-    * @deprecated use Conversation.instance().begin();
-	 */
-	String[] ifOutcome() default {};
-   /**
-    * If enabled, and if a conversation is already active,
-    * begin a nested conversation, instead of continuing
-    * in the context of the existing conversation.
-    */
-   boolean nested() default false;
-   /**
-    * If false (the default), invocation of the begin
-    * method in the scope of an existing conversation
-    * will cause an exception to be thrown.
-    */
-   boolean join() default false;
-   /**
-    * The name of the jBPM process definition defining 
-    * the page flow for this conversation.
-    */
-   String pageflow() default "";
-   /**
-    * An EL expression for the conversation id. If a 
-    * conversation with the same id aready exists, Seam 
-    * will redirect to that conversation.
-    * 
-    * @deprecated use <conversation/> in pages.xml
-    */
-   String id() default "";
-   /**
-    * Set the FlushMode for any EntityManager used in
-    * this conversation.
-    */
-   FlushModeType flushMode() default FlushModeType.AUTO;
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Conversational.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Conversational.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Conversational.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-//$Id: Conversational.java 5278 2007-06-19 19:02:37Z gavin $
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that a component or method is conversational, 
- * and may only be called inside the scope of a long-running 
- * conversation.
- * 
- * @author Gavin King
- */
- at Target({TYPE, METHOD})
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface Conversational {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Create.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Create.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Create.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-//$Id: Create.java 5262 2007-06-18 21:32:04Z gavin $
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Alternative to javax.annotations.PostConstruct
- * for use in a pre Java EE 5 environment.
- * 
- * Designates a create method that is called after
- * instantiation of a component.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface Create {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/DataBinderClass.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/DataBinderClass.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/DataBinderClass.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.databinding.DataBinder;
-
-/**
- * Meta-annotation that specifies that an annotation
- * is a databinding annotation, ie. that it results
- * in outjection of a wrapped representation of the
- * annotated component attribute value.
- * 
- * @see org.jboss.seam.databinding.DataBinder
- * @author Gavin King
- */
- at Target(ANNOTATION_TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface DataBinderClass
-{
-   Class<? extends DataBinder> value();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/DataSelectorClass.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/DataSelectorClass.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/DataSelectorClass.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.databinding.DataSelector;
-
-/**
- * Meta-annotation that specifies that an annotation
- * is a dataselection annotation, ie. that it results
- * in injection of the selected item of some databound
- * data.
- * 
- * @see org.jboss.seam.databinding.DataSelector
- * @author Gavin King
- */
- at Target(ANNOTATION_TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface DataSelectorClass
-{
-   Class<? extends DataSelector> value();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Destroy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Destroy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Destroy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-//$Id: Destroy.java 5262 2007-06-18 21:32:04Z gavin $
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Alternative to javax.annotations.PreDestroy
- * for use in a pre Java EE 5 environment.
- * 
- * Designates a destroy method that is called when a
- * context ends and the component is being disposed.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface Destroy {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/End.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/End.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/End.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,54 +0,0 @@
-//$Id: End.java 8990 2008-09-14 16:40:40Z jacob.orshalick $
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a method as ending a conversation, if the
- * method returns a non-null outcome without throwing 
- * an exception. If a list of outcomes is specified, 
- * the conversation ends only if the outcome is in 
- * the list. A null outcome never ends the conversation.
- * If the method is of type void, the conversation always
- * ends.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface End 
-{
-	/**
-	 * An empty outcome list is interpreted to mean any 
-	 * outcome except for the null (redisplay) outcome.
-    * 
-    * @deprecated use Conversation.instance().end()
-	 */
-	String[] ifOutcome() default {};
-   /**
-    * Should the conversation be destroyed before any
-    * redirect? (The default behavior is to propagate
-    * the conversation across the redirect and then
-    * destroy it at the end of the redirected request.)
-    * 
-    * @return false by default
-    */
-   boolean beforeRedirect() default false;
-   
-   /**
-    * If the conversation is nested, should the root
-    * of the conversation be destroyed?  (The default
-    * behavior is to simply pop the conversation
-    * stack.)
-    * 
-    * @return false by default
-    */
-   boolean root() default false;
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Factory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Factory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Factory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,60 +0,0 @@
-//$Id: Factory.java 4152 2007-02-26 20:31:10Z gavin $
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Marks a method as a factory method for a context variable.
- * A factory method is called whenever no value is bound to
- * the named context variable, and is expected to initialize
- * the value of the context variable. There are two kinds of 
- * factory methods. Factory methods with void return type are 
- * responsible for outjecting a value to the context variable. 
- * Factory methods which return a value do not need to 
- * explicitly ouject the value, since Seam will bind the
- * returned value to the specified scope.
- * 
- * This annotation supports use of the Seam "factory component"
- * pattern.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface Factory {
-   /**
-    * @return the name of the context variable
-    */
-   String value() default "";
-   /**
-    * The scope() element is meaningful only for factory 
-    * methods that return the value to be outjected. 
-    * Factory methods that return void are expected to
-    * take responsibility for outjecting the value,
-    * and then scope() is ignored.
-    * 
-    * If the factory method returns a value, but no 
-    * scope is explicitly specified, the scope of 
-    * the component with the @Factory attribute is used. 
-    * But if the component scope is STATELESS, the EVENT 
-    * scope is used.
-    * 
-    * @return the scope to outject any returned value
-    */
-   ScopeType scope() default ScopeType.UNSPECIFIED;
-   /**
-     * Specifies that this factory method should be automatically
-     * called whenever the variable is asked for, even if @In does
-     * not specify create=true.
-     * 
-    */
-   boolean autoCreate() default false;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/FlushModeType.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/FlushModeType.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/FlushModeType.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,42 +0,0 @@
-package org.jboss.seam.annotations;
-
-/**
- * A full set of flush modes, including MANUAL,
- * which is a glaring missing feature of the JPA
- * spec.
- * 
- * @author Gavin King
- *
- */
-public enum FlushModeType
-{
-   
-   /**
-    * Flushing never occurs automatically, all changes are queued 
-    * until the application calls flush() explicitly.
-    */
-   MANUAL,
-
-   /**
-    * Flushing occurs automatically at commit time and when necessary
-    * before query executions.
-    */
-   AUTO,
-   
-   /**
-    * Flushing occurs automatically at transaction commit time.
-    */
-   COMMIT;
-   
-   /**
-    * Does this flush mode keep unflushed changes past a 
-    * transaction commit?
-    * 
-    * @return false for all flush modes except for MANUAL
-    */
-   public boolean dirtyBetweenTransactions() 
-   { 
-      return this==MANUAL;
-   }
-    
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Import.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Import.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Import.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Allows use of unqualified names in @In by a component
- * or by all components in a package. The semantics are
- * similar to a .* import in Java.
- * 
- * @author Gavin King
- *
- */
- at Target({TYPE, PACKAGE})
- at Retention(RUNTIME)
- at Documented
-public @interface Import 
-{
-   /**
-    * Specifies the name qualifiers for which unqualified names
-    * may be used.
-    * 
-    * @return an array of name qualifiers
-    */
-   String[] value();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/In.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/In.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/In.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Specifies that a seam component should be injected to
- * the annotated field or setter method of a seam component.
- * 
- * @author Gavin King
- */
- at Target({FIELD, METHOD/*, PARAMETER*/})
- at Retention(RUNTIME)
- at Documented
-public @interface In 
-{
-   /**
-    * The context variable name. Defaults to the name of 
-    * the annotated field or getter method.
-    */
-	String value() default "";
-   /**
-    * Specifies that a component should be instantiated
-    * if the context variable is null.
-    */
-   boolean create() default false;
-   /**
-    * Specifies that the injected value must not be
-    * null, by default.
-    */
-   boolean required() default true;
-   /**
-    * Explicitly specify the scope to search, instead of
-    * searching all scopes.
-    * 
-    * More efficient as it avoids scanning all contexts
-    */
-   ScopeType scope() default ScopeType.UNSPECIFIED;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Install.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Install.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Install.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Specifies whether or not a component should be installed if it is scanned
- * 
- */
- at Target(ElementType.TYPE)
- at Retention(RetentionPolicy.RUNTIME)
- at Documented
-public @interface Install 
-{
-   /**
-    * Precedence of all built-in Seam components
-    */
-   public static final int BUILT_IN = 0;
-   /**
-    * Precedence to use for components of frameworks 
-    * which extend Seam
-    */
-   public static final int FRAMEWORK = 10;
-   /**
-    * Predence of application components (the
-    * default precedence)
-    */
-   public static final int APPLICATION = 20;
-   /**
-    * Precedence to use for components which override
-    * application components in a particular deployment
-    */
-   public static final int DEPLOYMENT = 30;
-
-   /**
-    * Precedence to use for mock objects in tests
-    */
-   public static final int MOCK = 40;
-
-   /**
-    * Is this component installed by default?
-    * 
-    * @return indicates if the component should be installed
-    */
-   boolean value() default true;
-   
-   /**
-    * Is this a debug component?
-    * 
-    * @return indicates that the component should only be installed in debug mode
-    */
-   boolean debug() default false;
-   
-   /**
-    * Indicates that the component should not be installed unless the
-    * dependent components are installed
-    *  
-    * @return the dependent component names
-    */
-   String[] dependencies() default {};
-   /**
-    * Indicates that the component should not be installed unless the
-    * dependent components are installed
-    *  
-    * @return the dependent component types
-    */
-   Class[] genericDependencies() default {};
-   /**
-    * Indicates that the component should not be installed unless the
-    * the given class definitions are available on the classpath
-    *  
-    * @return the dependent classes
-    */
-   String[] classDependencies() default {};
-   /**
-    * The precedence of the component. If multiple components with
-    * the same name exist, the one with the higher precedence will
-    * be installed.
-    */
-   public int precedence() default APPLICATION;
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/JndiName.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/JndiName.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/JndiName.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies the JNDI name of a seam component.
- * 
- * @author Gavin King
- */
- at Target(TYPE)
- at Retention(RUNTIME)
-public @interface JndiName 
-{
-   String value();
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Logger.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Logger.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Logger.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-//$Id: Logger.java 9621 2008-11-24 17:31:44Z dan.j.allen $
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Injects a log
- * 
- * @author Gavin King
- */
- at Target(FIELD)
- at Retention(RUNTIME)
- at Documented
-public @interface Logger 
-{
-   /**
-    * @return the log category
-    */
-   String value() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Name.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Name.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Name.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies the component name of a Seam component.
- * 
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * 
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Name 
-{
-   /**
-    * @return the component name
-    */
-   String value();
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Namespace.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Namespace.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Namespace.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Specifies the configuration namespace of a Java package 
- * containing Seam components.
- * 
- * @author Norman Richards
- */
- at Target(ElementType.PACKAGE)
- at Retention(RetentionPolicy.RUNTIME)
- at Documented
-public @interface Namespace 
-{
-    /**
-     * @return the configuration namespace for the package
-     */
-    String value();
-    /**
-     *  The qualifier used to get the component name of
-     *  components in this package from the XML element 
-     *  names
-     */
-    String prefix() default "";
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Observer.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Observer.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Observer.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,34 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a method as an observer of an event type or
- * multiple event types.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface Observer
-{
-   /**
-    * @return the event type or types to observe
-    */
-   String[] value() default {};
-   /**
-    * In case no component instance exists,
-    * should a component instance be created to
-    * handle the event, or should the event be
-    * ignored.
-    * 
-    * @return true by default
-    */
-   boolean create() default true;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Out.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Out.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Out.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Specifies that a seam component should be outjected from
- * the annotated field or getter method of a session bean.
- * 
- * @author Gavin King
- */
- at Target({FIELD, METHOD})
- at Retention(RUNTIME)
- at Documented
-public @interface Out 
-{
-   /**
-    * The context variable name. Defaults to the name of 
-    * the annotated field or getter method.
-    */
-	String value() default "";
-   /**
-    * Specifies that the outjected value must not be
-    * null, by default.
-    */
-   boolean required() default true;
-   /**
-    * Specifies the scope to outject to. If no scope is
-    * explicitly specified, the default scope depends
-    * upon whether the value is an instance of a Seam 
-    * component. If it is, the component scope is 
-    * used. Otherwise, the scope of the component with
-    * the @Out attribute is used. But if the component
-    * scope is STATELESS, the EVENT scope is used.
-    */
-   ScopeType scope() default ScopeType.UNSPECIFIED;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Outcome.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Outcome.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Outcome.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,15 +0,0 @@
-//$Id: Outcome.java 5516 2007-06-25 17:51:16Z gavin $
-package org.jboss.seam.annotations;
-
- at Deprecated
-public class Outcome
-{
-   /**
-    * Annotations may not specify a null String. This
-    * value lets us specify a null outcome in an
-    * annotation such as @Begin(ifOutcome=...).
-    * 
-    * @deprecated
-    */
-   public static final String REDISPLAY = "org.jboss.seam.outcome.null";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/PerNestedConversation.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/PerNestedConversation.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/PerNestedConversation.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,30 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Limit the scope of a CONVERSATION-scoped component
- * to just the parent conversation in which it was 
- * instantiated. The component instance will not be
- * visible to nested child conversations, which will
- * get their own instance.
- * 
- * Warning: this is ill-defined, since it implies that
- * a component will be visible for some part of a
- * request cycle, and invisible after that. It is not
- * recommended that applications use this feature!
- * 
- * @author Gavin King
- *
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface PerNestedConversation {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/RaiseEvent.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/RaiseEvent.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/RaiseEvent.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Causes an event to be raised after the method returns
- * a non-null result without exception.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface RaiseEvent 
-{
-   
-   /**
-    * The event name, defaults to the name
-    * of the method.
-    * 
-    * @return the event name
-    */
-   String[] value() default {};
-   
-   //TODO: String[] ifOutcome() default {};
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/ReadOnly.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/ReadOnly.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/ReadOnly.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a component as immutable, not needing replication
- * once created, or a method of the component as read-only,
- * not mutating the state. This allows optimization of 
- * performance of JavaBean components in a clustered
- * environment, without the need to implement Mutable.
- * 
- * @see org.jboss.seam.core.Mutable
- * @author Gavin King
- */
- at Target({TYPE, METHOD})
- at Retention(RUNTIME)
- at Documented
-public @interface ReadOnly {}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Role.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Role.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Role.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Specifies the name and scope role for a seam component role.
- * If a component has no <tt>@Role</tt> annotation, it has exactly 
- * one role, defined by <tt>@Name</tt> and <tt>@Scope</tt>. If it has
- * one or more <tt>@Role</tt> annotations, the component has one or more
- * roles in addition to the default role defined by <tt>@Name</tt> and 
- * <tt>@Scope</tt>.
- *
- * @author César Izurieta
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Role 
-{
-   String name();
-   ScopeType scope() default ScopeType.UNSPECIFIED;
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Roles.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Roles.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Roles.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies the roles of a component.
- * 
- * @author César Izurieta
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Roles 
-{
-   Role[] value();
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Scope.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Scope.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Scope.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Specifies the scope (context) of a seam component.
- *
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 5518 $
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface Scope {
-   ScopeType value();
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Startup.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Startup.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Startup.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-//$Id: Startup.java 5075 2007-06-09 02:20:44Z gavin $
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that an instance of this component is
- * created at system initialization time for an
- * application scoped component, or when a session
- * is started for a session scoped component. May only
- * be applied to APPLICATION or SESSION scoped 
- * components.
- * 
- * @author Gavin King
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Startup 
-{
-   /**
-    * A list of other Seam Components that should be started
-    * before this one, if they are installed.
-    * 
-    * If applied to an APPLICATION scope component, the
-    * dependant components should be APPLICATION scope. If
-    * applied to a SESSION scope component, the components
-    * should be in SESSION scope.
-    */
-   String[] depends() default {};
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Synchronized.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Synchronized.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Synchronized.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that a stateful component has
- * multiple concurrent clients, and so access
- * to the component must be synchronized. This
- * annotation is not required for session scoped
- * components, which are synchronized by default.
- *
- * @author Gavin King
- *
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface Synchronized
-{
-   public static final int DEFAULT_TIMEOUT = 1000;
-   /**
-    * How long should we wait for the lock
-    * before throwing an exception?
-    *
-    * @return the timeout in milliseconds
-    */
-   long timeout() default DEFAULT_TIMEOUT;
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/TransactionPropagationType.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/TransactionPropagationType.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/TransactionPropagationType.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,49 +0,0 @@
-package org.jboss.seam.annotations;
-
-/**
- * Transaction propagation strategies for Seam JavaBean 
- * components. Note that unlike EJB3 components, there 
- * are no strategies for suspending transactions.
- * 
- * @author Gavin King
- *
- */
-public enum TransactionPropagationType
-{
-   REQUIRED,
-   MANDATORY, 
-   SUPPORTS,
-   NEVER;
-   
-   public boolean isNewTransactionRequired(boolean transactionActive)
-   {
-      switch (this)
-      {
-         case REQUIRED:
-            return !transactionActive;
-         case SUPPORTS:
-            return false;
-         case MANDATORY:
-            if ( !transactionActive )
-            {
-               throw new IllegalStateException("No transaction active on call to MANDATORY method");
-            }
-            else
-            {
-               return false;
-            }
-         case NEVER:
-            if ( transactionActive )
-            {
-               throw new IllegalStateException("Transaction active on call to NEVER method");
-            }
-            else
-            {
-               return false;
-            }
-         default:
-            throw new IllegalArgumentException();
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Transactional.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Transactional.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Transactional.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,32 +0,0 @@
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that the transaction propagation for a JavaBean
- * component or method of a JavaBean component. JavaBean 
- * components have @Transactional(SUPPORTS) behavior 
- * if no @Transactional annotation is specified.
- * 
- * @author Gavin King
- */
- at Target({TYPE, METHOD})
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface Transactional
-{
-   /**
-    * The transaction propagation type.
-    * 
-    * @return REQUIRED by default
-    */
-   TransactionPropagationType value() default TransactionPropagationType.REQUIRED;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Unwrap.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Unwrap.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/Unwrap.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-//$Id: Unwrap.java 5539 2007-06-26 00:09:04Z gavin $
-package org.jboss.seam.annotations;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that the object returned by the annotated
- * getter method is to be injected instead of the
- * component itself. Supports use of the Seam "manager 
- * component" pattern.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface Unwrap {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Asynchronous.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Asynchronous.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Asynchronous.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,35 +0,0 @@
-package org.jboss.seam.annotations.async;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a method as an asynchronous method, to be
- * dispatched by the EJB3 TimerService.
- * 
- * If the method returns Timer, the return value
- * will be the Timer used for dispatching the
- * method call. Otherwise, the method should return
- * void.
- * 
- * Note that asynchronous calls are processed in
- * a different EVENT, SESSION and CONVERSATION
- * context to the caller, so the actual recieving
- * object may be a different instance of the 
- * component to the object that was called.
- * 
- * @author Gavin King
- * 
- * @see org.jboss.seam.annotations.async.Expiration
- * @see org.jboss.seam.annotations.async.Duration
- * @see org.jboss.seam.annotations.async.IntervalDuration
- * 
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface Asynchronous {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Duration.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Duration.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Duration.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-package org.jboss.seam.annotations.async;
-
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * The duration of the wait before an asynchronous 
- * call is processed (or before the first occurrence
- * of a repeating asynchronous call).
- * 
- * This annotation occurs on a parameter of type long
- * or Long of a method marked @Asynchronous.
- * 
- * @author Gavin King
- *
- */
- at Target(PARAMETER)
- at Retention(RUNTIME)
- at Documented
-public @interface Duration
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Expiration.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Expiration.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/Expiration.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-package org.jboss.seam.annotations.async;
-
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * The expiration time at which an asynchronous call may
- * first be processed (or the first occurrence of a repeating 
- * asynchronous call).
- * 
- * This annotation occurs on a parameter of type Date
- * of a method marked @Asynchronous.
- * 
- * @author Gavin King
- *
- */
- at Target(PARAMETER)
- at Retention(RUNTIME)
- at Documented
-public @interface Expiration
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/FinalExpiration.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/FinalExpiration.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/FinalExpiration.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.async;
-
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * The stop date of the repeating asynchronous call.
- * 
- * This a parameter level annotation and it is only
- * available for the Quartz timer.
- * 
- * @author Michael Yuan
- *
- */
- at Target(PARAMETER)
- at Retention(RUNTIME)
- at Documented
-public @interface FinalExpiration
-{
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/IntervalCron.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/IntervalCron.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/IntervalCron.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,26 +0,0 @@
-package org.jboss.seam.annotations.async;
-
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * The unix cron expression to specify the frequency 
- * and other conditions for the repeating asynchronous call
- * to be invoked (after the initial delay specified in Expiration
- * or Duration parameters). If this parameter is set, the 
- * IntervalDuration parameter will have no effect.
- * 
- * This annotation occurs on a parameter of type String
- * of a method marked @Asynchronous.
- * 
- * @author Michael Yuan
- *
- */
- at Target(PARAMETER)
- at Retention(RUNTIME)
- at Documented
-public @interface IntervalCron {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/IntervalDuration.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/IntervalDuration.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/IntervalDuration.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,26 +0,0 @@
-package org.jboss.seam.annotations.async;
-
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * The interval between occurrences of a repeating
- * asynchronous call.
- * 
- * This annotation occurs on a parameter of type long
- * or Long of a method marked @Asynchronous.
- * 
- * @author Gavin King
- *
- */
- at Target(PARAMETER)
- at Retention(RUNTIME)
- at Documented
-public @interface IntervalDuration
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/async/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-/**
- * Annotations for use with Seam asynchronicity.
- */
-package org.jboss.seam.annotations.async;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/BeginTask.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/BeginTask.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/BeginTask.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations.bpm;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.annotations.FlushModeType;
-
-/**
- * Marks a method as causing a jBPM {@link org.jbpm.taskmgmt.exe.TaskInstance task}
- * to be resumed. The jBPM {@link org.jbpm.context.exe.ContextInstance} 
- * is associated with the BUSINESS_PROCESS scope and the 
- * {@link org.jbpm.taskmgmt.exe.TaskInstance} is associated with a new
- * conversation, unless the annotated method returns a null outcome.
- * <p/>
- * Note that both {@link BeginTask} and {@link StartTask} have effect
- * before invocation of the intercepted method in that they are both
- * about setting up appropriate {@link org.jbpm.context.exe.ContextInstance}
- * for the current {@link org.jboss.seam.contexts.BusinessProcessContext}.
- * <p/>
- *
- * @author Steve Ebersole
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface BeginTask
-{
-   /**
-    * The name of the request parameter under which we should locate the
-    * the id of task to be resumed.
-    */
-   String taskIdParameter() default "";
-   /**
-    * An EL expression that evaluates to the task id.
-    * @return an EL expression
-    */
-   String taskId() default "#{param.taskId}";
-   /**
-    * The name of the jBPM process definition defining the page flow for 
-    * this conversation.
-    */
-   String pageflow() default "";
-   /**
-    * An EL expression for the conversation id. If a conversation with 
-    * the same id aready exists, Seam will redirect to that conversation.
-    * 
-    * @deprecated use <conversation/> in pages.xml
-    */
-   String id() default "";
-   /**
-    * Set the FlushMode for any EntityManager used in
-    * this conversation.
-    */
-   FlushModeType flushMode() default FlushModeType.AUTO;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/CreateProcess.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/CreateProcess.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/CreateProcess.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations.bpm;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a method creating a jBPM 
- * {@link org.jbpm.graph.exe.ProcessInstance process instance}
- * unless the method throws an exception or returns a null outcome.
- * 
- * @author Steve Ebersole
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface CreateProcess
-{
-   /**
-    * The name of the {@link org.jbpm.graph.def.ProcessDefinition} from which
-    * to create the {@link org.jbpm.graph.exe.ProcessInstance}
-    */
-   String definition();
-   /**
-    * An EL expression that evaluates to the process 
-    * business key.
-    * 
-    * @return an EL expression or an empty string to indicate a null key
-    */
-   String processKey() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/EndTask.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/EndTask.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/EndTask.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations.bpm;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a method as causing a jBPM 
- * {@link org.jbpm.taskmgmt.exe.TaskInstance task instance}
- * to be ended. The current conversation also ends. If a list of outcomes 
- * is specified, the task ends only if the outcome is in the list. A null
- * outcome never ends the task.
- *
- * @see org.jbpm.taskmgmt.exe.TaskInstance#end(String)
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface EndTask 
-{
-   
-   /**
-    * An empty outcome list is interpreted to mean any 
-    * outcome except for the null (redisplay) outcome.
-    * 
-    * @deprecated use BusinessProcess.instance().end("...") and
-    *             Conversation.instance().end()
-    */
-   String[] ifOutcome() default {};
-   
-   /**
-    * Specifies the transition that should be triggered by
-    * completing the task. If the transition needs to be
-    * specified dynamically, use the Seam <tt>transition</tt>
-    * component, calling <tt>Transition.setName()<tt>.
-    * 
-    * @return a transition name
-    */
-   String transition() default "";
-   
-   /**
-    * Should the conversation be destroyed before any
-    * redirect? (The default behavior is to propagate
-    * the conversation across the redirect and then
-    * destroy it at the end of the redirected request.)
-    * 
-    * @return false by default
-    */
-   boolean beforeRedirect() default false;
-  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/ResumeProcess.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/ResumeProcess.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/ResumeProcess.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations.bpm;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a method as causing an existing jBPM 
- * {@link org.jbpm.graph.exe.ProcessInstance process instance}
- * to be associated with the current conversation, unless the 
- * annotated method returns a null outcome.
- * 
- * @author Steve Ebersole
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface ResumeProcess
-{
-   /**
-    * The name of the request parameter under which we should locate the
-    * the id of process to be resumed.
-    * (not required for lookup by business key)
-    * 
-    * @return a request parameter name
-    */
-   String processIdParameter() default "";
-   /**
-    * An EL expression that evaluates to the process id.
-    * (not required for lookup by business key)
-    * 
-    * @return an EL expression
-    */
-   String processId() default "#{param.processId}";
-   /**
-    * An EL expression that evaluates to the process 
-    * business key.
-    * (optional, only required for lookup by business key)
-    * 
-    * @return an EL expression
-    */
-   String processKey() default "";
-   /**
-    * The name of the {@link org.jbpm.graph.def.ProcessDefinition}
-    * (optional, only required for lookup by business key)
-    */
-   String definition() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/StartTask.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/StartTask.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/StartTask.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations.bpm;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.annotations.FlushModeType;
-
-/**
- * Marks a method as causing jBPM {@link org.jbpm.taskmgmt.exe.TaskInstance task}
- * to be started. The jBPM {@link org.jbpm.context.exe.ContextInstance} 
- * is associated with the BUSINESS_PROCESS scope and the 
- * {@link org.jbpm.taskmgmt.exe.TaskInstance} is associated with a new
- * conversation, unless the annotated method returns a null outcome.
- * <p/>
- * Note that both {@link BeginTask} and {@link StartTask} have effect
- * before invocation of the intercepted method in that they are both
- * about setting up appropriate {@link org.jbpm.context.exe.ContextInstance}
- * for the current {@link org.jboss.seam.contexts.BusinessProcessContext};
- * {@link StartTask} however, also has effect after method invocation
- * as that is the time it actually marks the task as started.
- *
- * @see org.jbpm.taskmgmt.exe.TaskInstance#start()
- * @author Steve Ebersole
- */
- at Target( METHOD )
- at Retention( RUNTIME )
- at Documented
-public @interface StartTask
-{
-   /**
-    * The name of the request parameter under which we should locate the
-    * the id of task to be started.
-    */
-   String taskIdParameter() default "";
-   /**
-    * An EL expression that evaluates to the task id.
-    * @return an EL expression
-    */
-   String taskId() default "#{param.taskId}";
-   /**
-    * The name of the jBPM process definition defining 
-    * the page flow for this conversation.
-    */
-   String pageflow() default "";
-   /**
-    * An EL expression for the conversation id. If a conversation with 
-    * the same id aready exists, Seam will redirect to that conversation.
-    * 
-    * @deprecated use <conversation/> in pages.xml
-    */
-   String id() default "";
-   /**
-    * Set the FlushMode for any EntityManager used in
-    * this conversation.
-    */
-   FlushModeType flushMode() default FlushModeType.AUTO;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/Transition.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/Transition.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/Transition.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.annotations.bpm;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a method as causing a jBPM transition after 
- * the method returns a non-null result without exception.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface Transition 
-{
-   
-   /**
-    * The transition name, defaults to the name
-    * of the method.
-    * 
-    * @return the transition name
-    */
-   String value() default "";
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/bpm/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,9 +0,0 @@
-/**
- * Annotations for controlling the business process
- * and business process context.
- *
- * @see org.jboss.seam.bpm
- * @see org.jboss.seam.bpm.BusinessProcess
- */
-package org.jboss.seam.annotations.bpm;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModel.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModel.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModel.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,56 +0,0 @@
-//$Id: DataModel.java 2169 2006-10-10 03:48:19Z gavin $
-package org.jboss.seam.annotations.datamodel;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.DataBinderClass;
-import org.jboss.seam.databinding.DataModelBinder;
-
-/**
- * Outjects a collection to the same scope as the owning component
- * (or to the EVENT scope in the case of a stateless component),
- * after wrapping as a JSF DataModel (a List as a ListDataModel, a
- * Map as a MapDataModel, a Set as a SetDataModel, an array as an 
- * ArrayDataModel). Note that the List, Map, Set or array
- * will be re-wrapped and re-outjected each time the current
- * component value is different to the value held by the
- * context variable as determined by calling equals() on the 
- * underlying collection.
- * 
- * @author Gavin King
- * 
- * @see org.jboss.seam.jsf.ListDataModel
- * @see org.jboss.seam.jsf.MapDataModel
- * @see org.jboss.seam.jsf.SetDataModel
- * @see org.jboss.seam.jsf.ArrayDataModel
- */
- at Target({FIELD, METHOD})
- at Retention(RUNTIME)
- at Documented
- at DataBinderClass(DataModelBinder.class)
-public @interface DataModel
-{
-   /**
-    * The context variable name. Defaults to the name of 
-    * the annotated field or getter method.
-    */
-   String value() default "";
-   
-   /**
-    * Specifies the scope to outject the DataModel to. 
-    * If no scope is explicitly specified, the scope of 
-    * the component with the @DataModel attribute is used. 
-    * But if the component scope is STATELESS, the EVENT 
-    * scope is used.
-    * 
-    * @return ScopeType.UNSPECIFIED or ScopeType.PAGE
-    */
-   ScopeType scope() default ScopeType.UNSPECIFIED;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModelSelection.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModelSelection.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModelSelection.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,34 +0,0 @@
-//$Id: DataModelSelection.java 2025 2006-09-18 16:43:02Z gavin $
-package org.jboss.seam.annotations.datamodel;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.annotations.DataSelectorClass;
-import org.jboss.seam.databinding.DataModelSelector;
-
-/**
- * Injects the selected row data of a DataModel. 
- * Intended for use with @DataModel.
- * 
- * @author Gavin King
- * @see DataModel
- */
- at Target({FIELD, METHOD})
- at Retention(RUNTIME)
- at Documented
- at DataSelectorClass(DataModelSelector.class)
-public @interface DataModelSelection
-{
-   /**
-    * The context variable name of the DataModel. Defaults 
-    * to the name for the outjected @DataModel if there
-    * is exactly one @DataModel for the component.
-    */
-   String value() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModelSelectionIndex.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModelSelectionIndex.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/DataModelSelectionIndex.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,35 +0,0 @@
-//$Id: DataModelSelectionIndex.java 2025 2006-09-18 16:43:02Z gavin $
-package org.jboss.seam.annotations.datamodel;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.annotations.DataSelectorClass;
-import org.jboss.seam.databinding.DataModelIndexSelector;
-
-/**
- * Injects the selected row index of a ListDataModel,
- * MapDataModel or ArrayDataModel. Intended for use 
- * with @DataModel.
- * 
- * @author Gavin King
- * @see DataModel
- */
- at Target({FIELD, METHOD})
- at Retention(RUNTIME)
- at Documented
- at DataSelectorClass(DataModelIndexSelector.class)
-public @interface DataModelSelectionIndex
-{
-   /**
-    * The context variable name of the DataModel. Defaults 
-    * to the name for the outjected @DataModel if there
-    * is exactly one @DataModel for the component.
-    */
-   String value() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/datamodel/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-/**
- * A set of annotations that simplifies the job of 
- * working with JSF DataModels.
- */
-package org.jboss.seam.annotations.datamodel;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/HttpError.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/HttpError.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/HttpError.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,47 +0,0 @@
-package org.jboss.seam.annotations.exception;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Specifies that an exception results in a HTTP error.
- * 
- * @author Gavin King
- *
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface HttpError
-{
-   /**
-    * The message to be sent in the HTTP error, default
-    * to using the exception message.
-    * 
-    * @return a templated message
-    */
-   String message() default "";
-   
-   /**
-    * The HTTP error code, default to 500.
-    * 
-    * @return an error code
-    */
-   int errorCode() default HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
-   /**
-    * Should the current long-running conversation end
-    * when this exception occurs.
-    * 
-    * @return true if we should end the conversation
-    * @deprecated use @ApplicationException(end=true)
-    */
-   boolean end() default false;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/Redirect.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/Redirect.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/Redirect.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,45 +0,0 @@
-package org.jboss.seam.annotations.exception;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that an exception should result in a 
- * browser redirect.
- * 
- * @author Gavin King
- *
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
- at Inherited
-public @interface Redirect
-{
-   /**
-    * The message to be displayed as a FacesMessage, default
-    * to using the exception message.
-    * 
-    * @return a templated message
-    */
-   String message() default "";
-   /**
-    * The view to redirect to, default to the current view.
-    * 
-    * @return a JSF view id
-    */
-   String viewId();
-   /**
-    * Should the current long-running conversation end
-    * when this exception occurs.
-    * 
-    * @return true if we should end the conversation
-    * @deprecated use @ApplicationException(end=true)
-    */
-   boolean end() default false;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/exception/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-/**
- * Annotations for JSF exception handling.
- */
-package org.jboss.seam.annotations.exception;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/Converter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/Converter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/Converter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,32 +0,0 @@
-package org.jboss.seam.annotations.faces;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Allows a Seam component to act as a JSF converter. The
- * annotated class must be a Seam component, and must
- * implement javax.faces.convert.Converter.
- * 
- * @author Gavin King
- *
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Converter
-{
-   /**
-    * The JSF converter id. Default to the component name.
-    */
-   String id() default "";
-   /**
-    * If specified, register this component as the default
-    * converter for a type.
-    */
-   Class forClass() default void.class;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/Validator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/Validator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/Validator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-package org.jboss.seam.annotations.faces;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Allows a Seam component to act as a JSF validator. The
- * annotated class must be a Seam component, and must
- * implement javax.faces.validator.Validator.
- * 
- * @author Gavin King
- *
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Validator
-{
-   /**
-    * The JSF validator id. Default to the component name.
-    */
-   String id() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/faces/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-/**
- * Annotations for defining JSF converters and validators.
- */
-package org.jboss.seam.annotations.faces;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/AroundInvoke.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/AroundInvoke.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/AroundInvoke.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-//$Id: AroundInvoke.java 5522 2007-06-25 22:28:50Z gavin $
-package org.jboss.seam.annotations.intercept;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Synonym for javax.interceptors.AroundInvoke, for
- * use in a pre Java EE 5 environment.
- * 
- * @author Gavin King
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface AroundInvoke {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/BypassInterceptors.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/BypassInterceptors.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/BypassInterceptors.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,21 +0,0 @@
-//$Id: BypassInterceptors.java 5355 2007-06-20 20:42:22Z gavin $
-package org.jboss.seam.annotations.intercept;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Disables interception of calls to a Seam component
- * or Seam component method.
- * 
- * @author Gavin King
- */
- at Target({TYPE, METHOD})
- at Retention(RUNTIME)
- at Documented
-public @interface BypassInterceptors {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/Interceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/Interceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/Interceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,45 +0,0 @@
-package org.jboss.seam.annotations.intercept;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-
-/**
- * Annotates an interceptor class and specifies what 
- * kind of interceptor it is (client side or server 
- * side), and its ordering with respect to other
- * interceptors in the stack.
- * 
- * @author Gavin King
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Interceptor
-{
-   /**
-    * Specifies that the interceptor is a SERVER or CLIENT
-    * side interceptor.
-    * 
-    * @return SERVER by default
-    */
-   InterceptorType type() default InterceptorType.SERVER;
-   /**
-    * Specifies that an interceptor is called "around" 
-    * another interceptor or interceptors.
-    */
-   Class[] around() default {};
-   /**
-    * Specifies that an interceptor is called "within" 
-    * another interceptor or interceptors.
-    */
-   Class[] within() default {};
-   /**
-    * Performance optimization for stateless interceptors.
-    */
-   boolean stateless() default false;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/InterceptorType.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/InterceptorType.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/InterceptorType.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-package org.jboss.seam.annotations.intercept;
-
-/**
- * The type of an Interceptor, "client-side" (around the EJB proxy object)
- * or "server-side" (inside the EJB interceptor stack).
- * 
- * @author Gavin King
- *
- */
-public enum InterceptorType
-{
-   /**
-    * An interceptor that wraps the EJB proxy object, and intercepts
-    * invocations before EJB itself does any work.
-    */
-   CLIENT,
-   /**
-    * An interceptor that runs as part of the EJB interceptor stack.
-    */
-   SERVER,
-   ANY
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/Interceptors.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/Interceptors.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/Interceptors.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-//$Id: Interceptors.java 5350 2007-06-20 17:53:19Z gavin $
-package org.jboss.seam.annotations.intercept;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Synonym for javax.interceptors.Interceptors, for
- * use in a pre Java EE 5 environment. Note that this
- * may only be used as a meta-annotation.
- * 
- * @author Gavin King
- */
- at Target(ANNOTATION_TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Interceptors 
-{
-   Class[] value();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PostActivate.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PostActivate.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PostActivate.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-//$Id: AroundInvoke.java 5522 2007-06-25 22:28:50Z gavin $
-package org.jboss.seam.annotations.intercept;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Synonym for {@link javax.ejb.PostActivate}, for
- * use in a pre Java EE 5 environment.
- * 
- * @author Pete Muir
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface PostActivate {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PostConstruct.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PostConstruct.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PostConstruct.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam.annotations.intercept;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Synonym for {@link javax.ejb.PostConstruct}, for
- * use in a pre Java EE 5 environment.
- * 
- * @author Denis Forveille
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface PostConstruct {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PrePassivate.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PrePassivate.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/PrePassivate.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-//$Id: AroundInvoke.java 5522 2007-06-25 22:28:50Z gavin $
-package org.jboss.seam.annotations.intercept;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Synonym for {@link javax.ejb.PrePassivate}, for
- * use in a pre Java EE 5 environment.
- * 
- * @author Pete Muir
- */
- at Target(METHOD)
- at Retention(RUNTIME)
- at Documented
-public @interface PrePassivate {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/intercept/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-/**
- * Annotations for defining Seam interceptors.
- */
-package org.jboss.seam.annotations.intercept;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-/**
- * Annotations for defining Seam components.
- * (You need to get to know these guys.)
- */
-package org.jboss.seam.annotations;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Admin.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Admin.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Admin.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Indicates that the action method requires the user to be a member of the 'admin' role to invoke.
- * 
- * @author Shane Bryzak
- */
- at Target({TYPE, METHOD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
- at RoleCheck
-public @interface Admin
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Delete.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Delete.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Delete.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * 
- *
- * @author Shane Bryzak
- */
- at Target({METHOD, PARAMETER})
- at Documented
- at Retention(RUNTIME)
- at Inherited
- at PermissionCheck
-public @interface Delete {
-   Class value() default void.class;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Insert.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Insert.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Insert.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * 
- *
- * @author Shane Bryzak
- */
- at Target({METHOD, PARAMETER})
- at Documented
- at Retention(RUNTIME)
- at Inherited
- at PermissionCheck
-public @interface Insert {
-   Class value() default void.class;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/PermissionCheck.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/PermissionCheck.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/PermissionCheck.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Meta-annotation that designates an annotation as being a permission action, 
- * requiring a security check prior to invoking the annotated method or class
- *
- * @author Shane Bryzak
- */
- at Target({ANNOTATION_TYPE})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface PermissionCheck 
-{
-   String value() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Read.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Read.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Read.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * 
- *
- * @author Shane Bryzak
- */
- at Target({METHOD, PARAMETER})
- at Documented
- at Retention(RUNTIME)
- at Inherited
- at PermissionCheck
-public @interface Read {
-   Class value() default void.class;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Restrict.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Restrict.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Restrict.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,34 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Used to restrict access to a Seam component, component method or entity.
- * 
- * @see org.jboss.seam.security.Identity
- *
- * @author Shane Bryzak
- */
- at Target({TYPE,METHOD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface Restrict 
-{
-   /**
-    * Restrictions may be expressed using any EL expression, and usually
-    * include the use of s:hasRole(...) or s:hasPermission(..., /..).
-    * If no EL expression is explicitly specified, Seam security defaults
-    * the permission to be checked.
-    * 
-    * @return An EL expression that defines the restriction to be checked
-    */
-   String value() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/RoleCheck.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/RoleCheck.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/RoleCheck.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Meta-annotation that designates an annotation as being a role, 
- * requiring a security check prior to invoking the annotated method or class
- *
- * @author Shane Bryzak
- */
- at Target({ANNOTATION_TYPE})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface RoleCheck
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/TokenUsername.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/TokenUsername.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/TokenUsername.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the username for an authentication token
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface TokenUsername
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/TokenValue.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/TokenValue.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/TokenValue.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the value for an authentication token
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface TokenValue
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Update.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Update.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/Update.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * 
- *
- * @author Shane Bryzak
- */
- at Target({METHOD, PARAMETER})
- at Documented
- at Retention(RUNTIME)
- at Inherited
- at PermissionCheck
-public @interface Update {
-   Class value() default void.class;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/PasswordSalt.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/PasswordSalt.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/PasswordSalt.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * The salt value used to produce the password hash 
- * 
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface PasswordSalt
-{
-      
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleConditional.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleConditional.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleConditional.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing whether a role is conditional or not
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface RoleConditional
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleGroups.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleGroups.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleGroups.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the group memberships for a role
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface RoleGroups
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleName.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleName.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/RoleName.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the name of a role
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface RoleName
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserEnabled.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserEnabled.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserEnabled.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the enabled status of a user
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface UserEnabled
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserFirstName.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserFirstName.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserFirstName.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the first name of a user
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface UserFirstName
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserLastName.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserLastName.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserLastName.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the last name of a user
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface UserLastName
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserPassword.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserPassword.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserPassword.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,32 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the password for a user
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface UserPassword
-{   
-   /**
-    * The hash algorithm, only used if there is no @PasswordSalt property specified
-    */
-   String hash() default "";
-   
-   /**
-    * Number of iterations for generating the password hash
-    */
-   int iterations() default 1000;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserPrincipal.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserPrincipal.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserPrincipal.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the principal (username) for a user
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface UserPrincipal
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserRoles.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserRoles.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/management/UserRoles.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.management;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the list of role memberships for a user
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface UserRoles
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * Annotations (well, one annotation) for use with Seam security.
- * 
- * @see org.jboss.seam.security.Identity
- */
-package org.jboss.seam.annotations.security;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Identifier.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Identifier.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Identifier.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-package org.jboss.seam.annotations.security.permission;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.jboss.seam.security.permission.IdentifierStrategy;
-
-/**
- * Configures the Identifier strategy to use for instance-based permissions.  The specified class
- * should implement the IdentifierStrategy interface.
- *  
- * @author Shane Bryzak
- */
- at Target({TYPE})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface Identifier
-{  
-   Class<? extends IdentifierStrategy> value() default IdentifierStrategy.class;
-   String name() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Permission.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Permission.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Permission.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-package org.jboss.seam.annotations.security.permission;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies an allowable permission action for the target class, and allows for an optional bit mask
- * value for mapping the permission action to a persistent store
- *
- * @author Shane Bryzak
- */
- at Target({TYPE})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface Permission
-{
-   String action();
-   long mask() default 0L;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionAction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionAction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionAction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-package org.jboss.seam.annotations.security.permission;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the action component of a permission, e.g. "update",
- * "delete".
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface PermissionAction
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionDiscriminator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionDiscriminator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionDiscriminator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,26 +0,0 @@
-package org.jboss.seam.annotations.security.permission;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the discriminator column in a permission table
- * that contains permissions for both roles and users.
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface PermissionDiscriminator
-{
-   String userValue() default "user";
-   String roleValue() default "role";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionRole.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionRole.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionRole.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.permission;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the role that a permission is assigned to.
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface PermissionRole
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionTarget.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionTarget.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionTarget.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security.permission;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the target of a permission.
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface PermissionTarget
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionUser.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionUser.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/PermissionUser.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-package org.jboss.seam.annotations.security.permission;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Flags an entity field or method as representing the principal (username) that a permission is
- * assigned to.
- *  
- * @author Shane Bryzak
- */
- at Target({METHOD,FIELD})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface PermissionUser
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Permissions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Permissions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/security/permission/Permissions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,23 +0,0 @@
-package org.jboss.seam.annotations.security.permission;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies a list of permission actions for a class
- *
- * @author Shane Bryzak
- */
- at Target({TYPE})
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface Permissions
-{
-   Permission[] value() default {};
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/Filter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/Filter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/Filter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,35 +0,0 @@
-package org.jboss.seam.annotations.web;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Annotates a servlet filter that should be installed
- * by Seam's master filter and specifies its ordering 
- * with respect to other filters in the stack.
- * 
- * @see org.jboss.seam.web.AbstractFilter
- * 
- */
- at Target(TYPE)
- at Retention(RUNTIME)
- at Documented
-public @interface Filter
-{
-   
-   /**
-    * Specifies that a filter is called "around" 
-    * another filter or filters.
-    */
-   String[] around() default {};
-   /**
-    * Specifies that an filter is called "within" 
-    * another filter or filterss.
-    */
-   String[] within() default {};
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/RequestParameter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/RequestParameter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/RequestParameter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-//$Id: RequestParameter.java 5535 2007-06-25 23:32:56Z gavin $
-package org.jboss.seam.annotations.web;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Injects a request parameter value
- * 
- * @see org.jboss.seam.web.Parameters
- * @author Gavin King
- */
- at Target({METHOD, FIELD/*, PARAMETER*/})
- at Retention(RUNTIME)
- at Documented
-public @interface RequestParameter 
-{
-   /**
-    * The name of the request parameter
-    */
-   String value() default "";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/annotations/web/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-/**
- * Annotations for use in a servlet environment
- * 
- */
-package org.jboss.seam.annotations.web;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AbstractDispatcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AbstractDispatcher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AbstractDispatcher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,204 +0,0 @@
-package org.jboss.seam.async;
-
-import java.lang.annotation.Annotation;
-import java.util.Date;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.async.Duration;
-import org.jboss.seam.annotations.async.Expiration;
-import org.jboss.seam.annotations.async.FinalExpiration;
-import org.jboss.seam.annotations.async.IntervalCron;
-import org.jboss.seam.annotations.async.IntervalDuration;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.transaction.Transaction;
-
-/**
- * Abstract Dispatcher implementation
- * 
- * @author Gavin King
- *
- */
-public abstract class AbstractDispatcher<T, S extends Schedule> implements Dispatcher<T, S>
-{
-   
-   public class DispatcherParameters
-   {
-      private Date expiration;
-      private Date finalExpiration;
-      private Long duration;
-      private Long intervalDuration;
-      private String intervalCron;
-      
-      public String getIntervalCron()
-      {
-         return intervalCron;
-      }
-      public Long getDuration()
-      {
-         return duration;
-      }
-      public Date getExpiration()
-      {
-         return expiration;
-      }
-      public Date getFinalExpiration()
-      {
-         return finalExpiration;
-      }
-      public Long getIntervalDuration()
-      {
-         return intervalDuration;
-      }
-      public void setIntervalCron(String cron)
-      {
-         this.intervalCron = cron;
-      }
-      public void setDuration(Long duration)
-      {
-         this.duration = duration;
-      }
-      public void setExpiration(Date expiration)
-      {
-         this.expiration = expiration;
-      }
-      public void setFinalExpiration(Date finalExpiration)
-      {
-         this.finalExpiration = finalExpiration;
-      }
-      public void setIntervalDuration(Long intervalDuration)
-      {
-         this.intervalDuration = intervalDuration;
-      }
-      
-      
-   }
-   
-   public static final String EXECUTING_ASYNCHRONOUS_CALL = "org.jboss.seam.core.executingAsynchronousCall";
-      
-   public static Dispatcher instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("no application context active");
-      }
-      return (Dispatcher) Component.getInstance("org.jboss.seam.async.dispatcher");         
-   }
-   
-   public void scheduleTransactionSuccessEvent(String type, Object... parameters)
-   {
-      Transaction.instance().registerSynchronization( new TransactionSuccessEvent(type, parameters) );
-   }
-
-   public void scheduleTransactionCompletionEvent(String type, Object... parameters)
-   {
-      Transaction.instance().registerSynchronization( new TransactionCompletionEvent(type, parameters) );
-   }
-   
-   protected Schedule createSchedule(InvocationContext invocation)
-   {
-      DispatcherParameters dispatcherParameters = extractAndValidateParameters(invocation);
-      if (dispatcherParameters.getIntervalCron() == null)
-      {
-         return new TimerSchedule(dispatcherParameters.getDuration(), dispatcherParameters.getExpiration(), dispatcherParameters.getIntervalDuration(), dispatcherParameters.getFinalExpiration());
-      }
-      else
-      {
-         return new CronSchedule(dispatcherParameters.getDuration(), dispatcherParameters.getExpiration(), dispatcherParameters.getIntervalCron(), dispatcherParameters.getFinalExpiration());
-      }
-   }
-   
-   protected TimerSchedule createTimerSchedule(InvocationContext invocation)
-   {
-      DispatcherParameters dispatcherParameters = extractAndValidateParameters(invocation);
-      return createTimerSchedule(dispatcherParameters);
-   }
-   
-   private TimerSchedule createTimerSchedule(DispatcherParameters dispatcherParameters)
-   {
-      return new TimerSchedule(dispatcherParameters.getDuration(), dispatcherParameters.getExpiration(), dispatcherParameters.getIntervalDuration(), dispatcherParameters.getFinalExpiration());
-   }
-   
-   protected DispatcherParameters extractAndValidateParameters(InvocationContext invocation)
-   {
-      DispatcherParameters dispatcherParameters = new DispatcherParameters();
-      for ( int i=0; i < invocation.getMethod().getParameterAnnotations().length; i++ )
-      {
-         Annotation[] annotations = invocation.getMethod().getParameterAnnotations()[i];
-         for (Annotation annotation: annotations)
-         {
-            if ( annotation.annotationType().equals(Duration.class) )
-            {
-               if (invocation.getParameters()[i] instanceof Long)
-               {
-                  dispatcherParameters.setDuration((Long) invocation.getParameters()[i]);
-               }
-               else if (invocation.getParameters()[i] != null)
-               {
-                  throw new IllegalArgumentException("@Duration on " + invocation.getTarget().getClass() + ":" + invocation.getMethod().getName() + " must be a Long");
-               }
-            }
-            else if ( annotation.annotationType().equals(Expiration.class) )
-            {
-               if (invocation.getParameters()[i] instanceof Date)
-               {
-                  dispatcherParameters.setExpiration((Date) invocation.getParameters()[i]);
-               }
-               else if (invocation.getParameters()[i] != null)
-               {
-                  throw new IllegalArgumentException("@Expiration on " + invocation.getTarget().getClass() + ":" + invocation.getMethod().getName() + " must be a java.util.Date");
-               }
-            }
-            else if ( annotation.annotationType().equals(FinalExpiration.class) )
-            {
-               if (!( this instanceof QuartzDispatcher ))
-               {
-                  throw new IllegalArgumentException("Can only use @FinalExpiration with the QuartzDispatcher");
-               }
-               else if (invocation.getParameters()[i] instanceof Date)
-               {
-                  dispatcherParameters.setFinalExpiration((Date) invocation.getParameters()[i]);
-               }
-               else if (invocation.getParameters()[i] != null)
-               {
-                  throw new IllegalArgumentException("@FinalExpiration on " + invocation.getTarget().getClass() + ":" + invocation.getMethod().getName() + " must be a java.util.Date");
-               }
-            }
-            else if ( annotation.annotationType().equals(IntervalCron.class) )
-            {
-               if (!( this instanceof QuartzDispatcher ))
-               {
-                  throw new IllegalArgumentException("Can only use @IntervalCron with the QuartzDispatcher");
-               }
-               else if (invocation.getParameters()[i] instanceof String)
-               {
-                  dispatcherParameters.setIntervalCron((String) invocation.getParameters()[i]);
-               }
-               else if (invocation.getParameters()[i] != null)
-               {
-                  throw new IllegalArgumentException("@IntervalCron on " + invocation.getTarget().getClass() + ":" + invocation.getMethod().getName() + " must be a String");
-               }
-            }
-            else if ( annotation.annotationType().equals(IntervalDuration.class) )
-            {
-               if (invocation.getParameters()[i] instanceof Long)
-               {
-                  dispatcherParameters.setIntervalDuration((Long) invocation.getParameters()[i]);
-               }
-               else if (invocation.getParameters()[i] != null)
-               {
-                  throw new IllegalArgumentException("@IntervalDuration on " + invocation.getTarget().getClass() + ":" + invocation.getMethod().getName() + " must be a Long");
-               }
-            }
-         }
-      }
-
-      if ( dispatcherParameters.getIntervalCron() != null && dispatcherParameters.getIntervalDuration() != null )
-      {
-         throw new IllegalArgumentException("Can only use one of @IntervalCron and @IntervalDuration");
-      }
-      
-      return dispatcherParameters;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Asynchronous.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Asynchronous.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Asynchronous.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,98 +0,0 @@
-package org.jboss.seam.async;
-
-import java.io.Serializable;
-
-import org.jboss.seam.bpm.BusinessProcess;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Something that happens asynchronously, and with a full
- * set of Seam contexts, including propagation of the 
- * business process and task instances.
- * 
- * @author Gavin King
- *
- */
-public abstract class Asynchronous implements Serializable
-{
-   
-   static final long serialVersionUID = -551286304424595765L;
-   
-   private static transient final LogProvider log = Logging.getLogProvider(Asynchronous.class);
-   
-   private Long processId;
-   private Long taskId;
-   
-   public Asynchronous()
-   {
-      if ( Init.instance().isJbpmInstalled() )
-      {
-         BusinessProcess businessProcess = BusinessProcess.instance();
-         processId = businessProcess.getProcessId();
-         taskId = BusinessProcess.instance().getTaskId();
-      }
-   }
-   
-   protected abstract class ContextualAsynchronousRequest
-   {
-      
-      private Object timer;
-      private boolean createContexts;
-      
-      public ContextualAsynchronousRequest(Object timer)
-      {
-         this.timer = timer;
-         this.createContexts = !Contexts.isEventContextActive() && !Contexts.isApplicationContextActive();
-      }
-      
-      private void setup()
-      {
-         if (createContexts) Lifecycle.beginCall();
-         Contexts.getEventContext().set(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL, true);
-         if (taskId!=null)
-         {
-            BusinessProcess.instance().resumeTask(taskId);
-         }
-         else if (processId!=null)
-         {
-            BusinessProcess.instance().resumeProcess(processId);
-         }
-         
-         if (timer!=null)
-         {
-            Contexts.getEventContext().set("timer", timer);
-         }
-         
-            log.debug("executing: " + this);
-      }
-      
-      protected abstract void process();
-      
-      public void run()
-      {
-         setup();
-         try
-         {
-            process();
-         }
-         finally
-         {
-            cleanup();
-         }
-      }
-      
-      private void cleanup()
-      {
-         Contexts.getEventContext().remove(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL);
-         if (createContexts) Lifecycle.endCall();
-      }
-   }   
-   
-   public abstract void execute(Object timer);
-
-   protected abstract void handleException(Exception exception, Object timer);
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousEvent.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousEvent.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousEvent.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,64 +0,0 @@
-package org.jboss.seam.async;
-
-import org.jboss.seam.core.Events;
-
-/**
- * An asynchronous event
- * 
- * @author Gavin King
- *
- */
-public class AsynchronousEvent extends Asynchronous
-{
-   static final long serialVersionUID = 2074586442931427819L;
-   
-   private String type;
-   private Object[] parameters;
-
-   public AsynchronousEvent(String type, Object[] parameters)
-   {
-      this.type = type;
-      this.parameters = parameters;
-   }
-
-   @Override
-   public void execute(Object timer)
-   {
-      new ContextualAsynchronousRequest(timer)
-      {
-         
-         @Override
-         protected void process()
-         {
-            Events.instance().raiseEvent(type, parameters);
-         }
-         
-      }.run();
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "AsynchronousEvent(" + type + ')';
-   }
-   
-   protected String getType()
-   {
-      return type;
-   }
-
-   @Override
-   protected void handleException(final Exception exception, Object timer)
-   {
-      new ContextualAsynchronousRequest(timer)
-      {
-         @Override
-         protected void process()
-         {
-            AsynchronousExceptionHandler.instance().handleException(exception);
-         }
-      }.run();
-      
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousExceptionHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousExceptionHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousExceptionHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,33 +0,0 @@
-package org.jboss.seam.async;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
- at Scope(ScopeType.STATELESS)
- at Name("org.jboss.seam.async.asynchronousExceptionHandler")
- at Install(precedence=BUILT_IN)
- at BypassInterceptors
-public class AsynchronousExceptionHandler
-{
-
-   private LogProvider log = Logging.getLogProvider(AsynchronousExceptionHandler.class);
-   
-   public void handleException(Exception throwable)
-   {
-      log.error("Exception thrown whilst executing asynchronous call", throwable);
-   }
-   
-   public static AsynchronousExceptionHandler instance()
-   {
-      return (AsynchronousExceptionHandler) Component.getInstance(AsynchronousExceptionHandler.class);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,71 +0,0 @@
-package org.jboss.seam.async;
-
-import static org.jboss.seam.ComponentType.JAVA_BEAN;
-
-import org.jboss.seam.annotations.async.Asynchronous;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Dispatches method calls to @Asynchronous methods
- * asynchronously, and returns the "timer" object
- * if necessary.
- * 
- * @author Gavin King
- *
- */
- at Interceptor(stateless=true, type=InterceptorType.CLIENT)
-public class AsynchronousInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = 9194177339867853303L;
-   
-   private static final String REENTRANT = "org.jboss.seam.async.AsynchronousIntercepter.REENTRANT";
-   
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      boolean scheduleAsync = invocation.getMethod().isAnnotationPresent(Asynchronous.class) && 
-            (!isExecutingAsynchronousCall() || Contexts.getEventContext().isSet(REENTRANT));
-      if (scheduleAsync)
-      {
-         Dispatcher dispatcher = AbstractDispatcher.instance();
-         if (dispatcher==null)
-         {
-            throw new IllegalStateException("org.jboss.seam.async.dispatcher is not installed in components.xml");
-         }
-         Object timer = dispatcher.scheduleInvocation( invocation, getComponent() );
-         //if the method returns a Timer, return it to the client
-         return timer!=null && invocation.getMethod().getReturnType().isAssignableFrom( timer.getClass() ) ? timer : null;
-      } else {
-          
-            boolean setFlag = false;
-            if (isExecutingAsynchronousCall()) {
-                Contexts.getEventContext().set(REENTRANT, true);
-                setFlag = true;
-            }
-            
-            try {
-                return invocation.proceed();
-            } finally {
-                if (setFlag) {
-                    Contexts.getEventContext().remove(REENTRANT);
-                }
-            }
-        }
-   }
-   
-   private boolean isExecutingAsynchronousCall()
-   {
-       return Contexts.getEventContext().isSet(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL);
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return ( getComponent().getType().isEjb() && getComponent().businessInterfaceHasAnnotation(Asynchronous.class) ) ||
-      ( getComponent().getType() == JAVA_BEAN && getComponent().beanClassHasAnnotation(Asynchronous.class) );
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousInvocation.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousInvocation.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/AsynchronousInvocation.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,98 +0,0 @@
-package org.jboss.seam.async;
-
-import java.lang.reflect.Method;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Reflections;
-
-/**
- * An asynchronous method invocation.
- * 
- * @author Gavin King
- *
- */
-public class AsynchronousInvocation extends Asynchronous
-{
-   static final long serialVersionUID = 7426196491669891310L;
-   
-   private static transient LogProvider log = Logging.getLogProvider(AsynchronousInvocation.class);
-   
-   private String methodName;
-   private Class[] argTypes;
-   private Object[] args;
-   private String componentName;
-   
-   public AsynchronousInvocation(Method method, String componentName, Object[] args)
-   {
-      this.methodName = method.getName();
-      this.argTypes = method.getParameterTypes();
-      this.args = args==null ? new Object[0] : args;
-      this.componentName = componentName;
-   }
-   
-   public AsynchronousInvocation(InvocationContext invocation, Component component)
-   {
-      this( invocation.getMethod(), component.getName(), invocation.getParameters() );
-   }
-   
-   @Override
-   public void execute(Object timer)
-   {
-      new ContextualAsynchronousRequest(timer)
-      {
-         
-         @Override
-         protected void process()
-         {
-            Object target = Component.getInstance(componentName);
-            
-            Method method;
-            try
-            {
-               method = target.getClass().getMethod(methodName, argTypes);
-            }
-            catch (NoSuchMethodException nsme)
-            {
-               throw new IllegalStateException(nsme);
-            }
-            
-            Reflections.invokeAndWrap(method, target, args);
-         }
-         
-      }.run();
-      
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "AsynchronousInvocation(" + componentName + '.' + methodName + "())";
-   }
-
-   @Override
-   protected void handleException(final Exception exception, Object timer)
-   {
-      new ContextualAsynchronousRequest(timer)
-      {
-         @Override
-         protected void process()
-         {
-            Object target = Component.getInstance(componentName);
-            try
-            {
-               Method method = target.getClass().getMethod("handleAsynchronousException", Exception.class);
-               log.trace("Using asynchronous exception handler " + componentName + ".handleAsynchronsException;");
-               method.invoke(target, exception);
-            }
-            catch (Exception e)
-            {
-               log.trace("Using default asynchronous exception handler");
-               AsynchronousExceptionHandler.instance().handleException(exception);
-            }
-         }
-      }.run();
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/CronSchedule.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/CronSchedule.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/CronSchedule.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,47 +0,0 @@
-package org.jboss.seam.async;
-
-import java.util.Date;
-
-/**
- * A "cron schedule" for a timed event executed by
- * the Quartz CronTrigger.
- * 
- * @author Michael Yuan
- *
- */
-public class CronSchedule extends Schedule
-{
-   private String cron;
-   
-   String getCron()
-   {
-      return cron;
-   }
-   
-   /**
-    * @param duration the delay before the first event occurs
-    * @param cron the unix cron string to control how the events are repeated
-    */
-   public CronSchedule(Long duration, String cron)
-   {
-      super(duration);
-      this.cron = cron;
-   }
-
-   /**
-    * @param expiration the datetime at which the first event occurs
-    * @param cron the unix cron string to control how the events are repeated
-    */
-   public CronSchedule(Date expiration, String cron)
-   {
-      super(expiration);
-      this.cron = cron;
-   }
-
-   CronSchedule(Long duration, Date expiration, String cron, Date finalExpiration)
-   {
-      super(duration, expiration, finalExpiration);
-      this.cron = cron;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Dispatcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Dispatcher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Dispatcher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,59 +0,0 @@
-package org.jboss.seam.async;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Interface to be implemented by any strategy for dispatching
- * asynchronous method calls and asynchronous events.
- * 
- * @author Gavin King
- *
- * @param <T> the type of the timer object
- */
-public interface Dispatcher<T, S extends Schedule>
-{
-   /**
-    * Schedule an asynchronous method call, examining annotations
-    * upon the method to determine the schedule
-    * 
-    * @return some kind of timer object, or null
-    */
-   public T scheduleInvocation(InvocationContext invocation, Component component);
-   /**
-    * Schedule a timed (delayed and/or periodic) event
-    * 
-    * @param type the event type
-    * @param schedule the schedule
-    * @param parameters parameters to pass to the event listener method
-    * @return some kind of timer object, or null
-    */
-   public T scheduleTimedEvent(String type, S schedule, Object... parameters);
-   
-   /**
-    * Schedule an immediate asynchronous event
-    * 
-    * @param type the event type
-    * @param parameters parameters to pass to the event listener method
-    * @return some kind of timer object, or null
-    */
-   public T scheduleAsynchronousEvent(String type, Object... parameters);
-   
-   /**
-    * Schedule an event to be processed if and when the current transaction 
-    * completes successfully
-    * 
-    * @param type the event type
-    * @param parameters parameters to pass to the event listener method
-    */
-   public void scheduleTransactionSuccessEvent(String type, Object... parameters);
-   
-   /**
-    * Schedule an event to be processed when the current transaction ends
-    * 
-    * @param type the event type
-    * @param parameters parameters to pass to the event listener method
-    */
-   public void scheduleTransactionCompletionEvent(String type, Object... parameters);
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/LocalTimerServiceDispatcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/LocalTimerServiceDispatcher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/LocalTimerServiceDispatcher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,18 +0,0 @@
-package org.jboss.seam.async;
-
-import java.util.concurrent.Callable;
-
-import javax.ejb.Local;
-import javax.ejb.Timer;
-
-/**
- * Local interface for TimerServiceDispatcher.
- * 
- * @author Gavin King
- *
- */
- at Local
-public interface LocalTimerServiceDispatcher extends Dispatcher<Timer, TimerSchedule>
-{   
-   public Object call(Callable task);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/QuartzDispatcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/QuartzDispatcher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/QuartzDispatcher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,264 +0,0 @@
-package org.jboss.seam.async;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.InputStream;
-import java.rmi.server.UID;
-import java.text.ParseException;
-import java.util.Date;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.quartz.CronTrigger;
-import org.quartz.Job;
-import org.quartz.JobDataMap;
-import org.quartz.JobDetail;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.SimpleTrigger;
-import org.quartz.impl.StdSchedulerFactory;
-
-/**
- * Dispatcher implementation that uses the Quartz library.
- * 
- * @author Michael Yuan
- *
- */
- at Startup
- at Scope(ScopeType.APPLICATION)
- at Name("org.jboss.seam.async.dispatcher")
- at Install(value=false, precedence=BUILT_IN)
- at BypassInterceptors
-public class QuartzDispatcher extends AbstractDispatcher<QuartzTriggerHandle, Schedule>
-{
-   
-   private static final LogProvider log = Logging.getLogProvider(QuartzDispatcher.class);
-   
-   private Scheduler scheduler;
-
-   @Create
-   public void initScheduler() throws SchedulerException
-   {
-       StdSchedulerFactory schedulerFactory = new StdSchedulerFactory();
-
-       //TODO: magical properties files are *not* the way to config Seam apps!
-       InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("seam.quartz.properties");
-       if (is != null)
-       {
-         schedulerFactory.initialize(is);
-         log.debug("Found seam.quartz.properties file. Using it for Quartz config.");
-       } 
-       else 
-       {
-         schedulerFactory.initialize();
-         log.warn("No seam.quartz.properties file. Using in-memory job store.");
-       }
-    
-       scheduler = schedulerFactory.getScheduler();
-       scheduler.start();
-   }
-
-   public QuartzTriggerHandle scheduleAsynchronousEvent(String type, Object... parameters)
-   {  
-      String jobName = nextUniqueName();
-      String triggerName = nextUniqueName();
-      
-      JobDetail jobDetail = new JobDetail(jobName, null, QuartzJob.class);
-      jobDetail.getJobDataMap().put("async", new AsynchronousEvent(type, parameters));
-       
-      SimpleTrigger trigger = new SimpleTrigger(triggerName, null);      
-      try 
-      {
-        scheduler.scheduleJob(jobDetail, trigger);
-        return new QuartzTriggerHandle(triggerName);
-      } 
-      catch (Exception se) 
-      {
-        log.debug("Cannot Schedule a Quartz Job");
-        throw new RuntimeException(se);
-      }
-   }
-    
-   public QuartzTriggerHandle scheduleTimedEvent(String type, Schedule schedule, Object... parameters)
-   {
-      return scheduleWithQuartzServiceAndWrapExceptions( schedule, new AsynchronousEvent(type, parameters) );
-   }
-   
-   public QuartzTriggerHandle scheduleInvocation(InvocationContext invocation, Component component)
-   {
-      return scheduleWithQuartzServiceAndWrapExceptions( createSchedule(invocation), new AsynchronousInvocation(invocation, component) );
-   }
-
-   private static Date calculateDelayedDate (long delay)
-   {
-      Date now = new Date ();
-      now.setTime(now.getTime() + delay);
-      return now;
-   }
-   
-   private QuartzTriggerHandle scheduleWithQuartzServiceAndWrapExceptions(Schedule schedule, Asynchronous async)
-   {
-       try
-       {
-           return scheduleWithQuartzService(schedule, async);
-       }
-       catch (ParseException pe)
-       {
-           throw new RuntimeException(pe);
-       }
-       catch (SchedulerException se)
-       {
-           throw new RuntimeException(se);
-       }
-   }
-
-   private QuartzTriggerHandle scheduleWithQuartzService(Schedule schedule, Asynchronous async) throws SchedulerException, ParseException
-   {
-      String jobName = nextUniqueName();
-      String triggerName = nextUniqueName();
-      
-      JobDetail jobDetail = new JobDetail(jobName, null, QuartzJob.class);
-      jobDetail.getJobDataMap().put("async", async);
-
-      if (schedule instanceof CronSchedule) 
-      {
-          CronSchedule cronSchedule = (CronSchedule) schedule; 
-          CronTrigger trigger = new CronTrigger (triggerName, null);
-          trigger.setCronExpression(cronSchedule.getCron());
-          trigger.setEndTime(cronSchedule.getFinalExpiration());
-        
-          if ( cronSchedule.getExpiration()!=null )
-          {
-            trigger.setStartTime (cronSchedule.getExpiration());
-          }
-          else if ( cronSchedule.getDuration()!=null )
-          {
-            trigger.setStartTime (calculateDelayedDate(cronSchedule.getDuration()));
-          }
-        
-          scheduler.scheduleJob( jobDetail, trigger );
-      }
-      else if (schedule instanceof TimerSchedule)
-      {
-          TimerSchedule timerSchedule = (TimerSchedule) schedule;
-          if (timerSchedule.getIntervalDuration() != null) 
-          {
-             if ( timerSchedule.getExpiration()!=null )
-             {
-                SimpleTrigger trigger = new SimpleTrigger(triggerName, null, 
-                        timerSchedule.getExpiration(), 
-                        timerSchedule.getFinalExpiration(), 
-                        SimpleTrigger.REPEAT_INDEFINITELY, 
-                        timerSchedule.getIntervalDuration());
-                scheduler.scheduleJob( jobDetail, trigger );
-    
-             }
-             else if ( timerSchedule.getDuration()!=null )
-             {
-                 SimpleTrigger trigger = new SimpleTrigger(triggerName, null, 
-                         calculateDelayedDate(timerSchedule.getDuration()), 
-                         timerSchedule.getFinalExpiration(), SimpleTrigger.REPEAT_INDEFINITELY, 
-                         timerSchedule.getIntervalDuration());
-                 scheduler.scheduleJob( jobDetail, trigger );
-    
-             }
-             else
-             {
-                SimpleTrigger trigger = new SimpleTrigger(triggerName, null, new Date(), 
-                        timerSchedule.getFinalExpiration(), 
-                        SimpleTrigger.REPEAT_INDEFINITELY, 
-                        timerSchedule.getIntervalDuration());
-                scheduler.scheduleJob( jobDetail, trigger );
-    
-             }
-          } 
-          else 
-          {
-            if ( schedule.getExpiration()!=null )
-            {
-                SimpleTrigger trigger = new SimpleTrigger (triggerName, null, schedule.getExpiration());
-                scheduler.scheduleJob(jobDetail, trigger);
-    
-            }
-            else if ( schedule.getDuration()!=null )
-            {
-                SimpleTrigger trigger = new SimpleTrigger (triggerName, null, 
-                        calculateDelayedDate(schedule.getDuration()));
-                scheduler.scheduleJob(jobDetail, trigger);
-    
-            }
-            else
-            {
-               SimpleTrigger trigger = new SimpleTrigger(triggerName, null);
-               scheduler.scheduleJob(jobDetail, trigger);
-    
-            }
-          }
-      }
-      else
-      {
-          throw new IllegalArgumentException("unrecognized schedule type");
-      }
-
-      return new QuartzTriggerHandle(triggerName);
-   }
-   
-   private String nextUniqueName ()
-   {
-      return (new UID()).toString();
-   }
-   
-   @Destroy
-   public void destroy() throws SchedulerException
-   {
-      scheduler.shutdown();
-   }
-   
-   public static class QuartzJob implements Job
-   {
-      private Asynchronous async;
-      
-      public QuartzJob() { }
-
-      public void execute(JobExecutionContext context)
-          throws JobExecutionException
-      {
-         JobDataMap dataMap = context.getJobDetail().getJobDataMap();
-         async = (Asynchronous)dataMap.get("async");
-         QuartzTriggerHandle handle = new QuartzTriggerHandle(context.getTrigger().getName());
-         try
-         {
-            async.execute(handle);
-         }
-         catch (Exception e) 
-         {
-            async.handleException(e, handle);
-         }
-      }
-   }
-
-   public Scheduler getScheduler()
-   {
-      return scheduler;
-   }
-   
-
-
-   public static QuartzDispatcher instance()
-   {
-      return (QuartzDispatcher) AbstractDispatcher.instance();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/QuartzTriggerHandle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/QuartzTriggerHandle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/QuartzTriggerHandle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-package org.jboss.seam.async;
-
-import java.io.Serializable;
-
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.Trigger;
-
-/**
- * Provides control over the Quartz Job.
- * 
- * @author Michael Yuan
- *
- */
-public class QuartzTriggerHandle implements Serializable
-{
-   private final String triggerName;
-   
-   // Hold a transient reference to the scheduler to allow control of the
-   // scheduler outside of Seam contexts (useful in a testing context)
-   private transient Scheduler scheduler;
-     
-   public QuartzTriggerHandle(String triggerName) 
-   {
-      this.triggerName = triggerName; 
-   }
-
-   public void cancel() throws SchedulerException
-   {
-      getScheduler().unscheduleJob(triggerName, null);
-   }
-   
-   public void pause() throws SchedulerException
-   {
-      getScheduler().pauseTrigger(triggerName, null);  
-   }
-   
-   public Trigger getTrigger() throws SchedulerException
-   {
-      return getScheduler().getTrigger(triggerName, null);
-   }
-   
-   public void resume() throws SchedulerException
-   {
-      getScheduler().resumeTrigger(triggerName, null);
-   }
-   
-   private Scheduler getScheduler()
-   {
-       if (scheduler == null)
-       {
-           scheduler = QuartzDispatcher.instance().getScheduler();
-       }
-       return scheduler;
-   }
-   
-}
-  
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Schedule.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Schedule.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/Schedule.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,107 +0,0 @@
-package org.jboss.seam.async;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * A "schedule" for a timed event executed by
- * a timer service which supports delayed
- * timed events. It is the base class for the more
- * useful TimerSchedule, NthBusinessDay and CronSchedule classes.
- * 
- * @author Michael Yuan
- *
- */
-public class Schedule implements Serializable
-{
-   private Long duration;
-   private Date expiration;
-   private Date finalExpiration;
-   
-   public Long getDuration()
-   {
-      return duration;
-   }
-   
-   public Date getExpiration()
-   {
-      return expiration;
-   }
-   
-   public Date getFinalExpiration()
-   {
-      return finalExpiration;
-   }
-
-   /**
-    * @param duration the delay before the event occurs
-    * @param expiration the datetime at which the event occurs
-    */
-   public Schedule(Long duration, Date expiration)
-   {
-      this.duration = duration;
-      this.expiration = expiration;
-   }
-
-   /**
-    * @param duration the delay before the event occurs
-    * @param expiration the datetime at which the event occurs
-    * @param finalExpiration the datetime at which the event ends
-    */
-   public Schedule(Long duration, Date expiration, Date finalExpiration)
-   {
-      this.duration = duration;
-      this.expiration = expiration;
-      this.finalExpiration = finalExpiration;
-   }
-
-   /**
-    * @param duration the delay before the event occurs
-    */
-   public Schedule(Long duration)
-   {
-      this.duration = duration;
-   }
-
-   /**
-    * @param expiration the datetime at which the event occurs
-    */
-   public Schedule(Date expiration)
-   {
-      this.expiration = expiration;
-   }
-
-   public Schedule () { }
-
-   @Override
-   public int hashCode()
-   {
-      final int prime = 31;
-      int result = 1;
-      result = prime * result + ((duration == null) ? 0 : duration.hashCode());
-      result = prime * result + ((expiration == null) ? 0 : expiration.hashCode());
-      return result;
-   }
-
-   @Override
-   public boolean equals(Object obj)
-   {
-      if (this == obj) return true;
-      if (obj == null) return false;
-      if (getClass() != obj.getClass()) return false;
-      final Schedule other = (Schedule) obj;
-      if (duration == null)
-      {
-         if (other.duration != null) return false;
-      }
-      else if (!duration.equals(other.duration)) return false;
-      if (expiration == null)
-      {
-         if (other.expiration != null) return false;
-      }
-      else if (!expiration.equals(other.expiration)) return false;
-      return true;
-   }
-   
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/ThreadPoolDispatcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/ThreadPoolDispatcher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/ThreadPoolDispatcher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,167 +0,0 @@
-package org.jboss.seam.async;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.Date;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Dispatcher implementation that uses a java.util.concurrent
- * ScheduledThreadPoolExecutor.
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.APPLICATION)
- at Name("org.jboss.seam.async.dispatcher")
- at Install(precedence=BUILT_IN)
-public class ThreadPoolDispatcher extends AbstractDispatcher<Future, TimerSchedule>
-{
-   private int threadPoolSize = 10; 
-   
-   private ScheduledExecutorService executor;
-   
-   @Create
-   public void startup() {
-       executor = Executors.newScheduledThreadPool(threadPoolSize);
-   }
-    
-   public Future scheduleAsynchronousEvent(String type, Object... parameters)
-   {  
-      RunnableAsynchronous runnableAsynchronous = new RunnableAsynchronous( new AsynchronousEvent(type, parameters) ); 
-      Future future = executor.submit(runnableAsynchronous);
-      runnableAsynchronous.setFuture(future);
-      return future;
-   }
-    
-   public Future scheduleTimedEvent(String type, TimerSchedule schedule, Object... parameters)
-   {
-      return scheduleWithExecutorService( schedule, new RunnableAsynchronous( new AsynchronousEvent(type, parameters) ) );
-   }
-   
-   public Future scheduleInvocation(InvocationContext invocation, Component component)
-   {
-      return scheduleWithExecutorService( 
-               createTimerSchedule(invocation), 
-               new RunnableAsynchronous( new AsynchronousInvocation(invocation, component) ) 
-            );
-   }
-   
-   private static long toDuration(Date expiration)
-   {
-      return expiration.getTime() - new Date().getTime();
-   }
-   
-   private Future scheduleWithExecutorService(TimerSchedule schedule, RunnableAsynchronous runnable)
-   {
-      Future future = null;
-      if ( schedule.getIntervalDuration()!=null )
-      {
-         if ( schedule.getExpiration()!=null )
-         {
-            future = executor.scheduleAtFixedRate( runnable, 
-                    toDuration( schedule.getExpiration() ), 
-                    schedule.getIntervalDuration(), 
-                    TimeUnit.MILLISECONDS );
-         }
-         else if ( schedule.getDuration()!=null )
-         {
-            future = executor.scheduleAtFixedRate( runnable, 
-                     schedule.getDuration(), 
-                     schedule.getIntervalDuration(), 
-                     TimeUnit.MILLISECONDS );
-         }
-         else
-         {
-            future = executor.scheduleAtFixedRate( runnable, 0l, 
-                    schedule.getIntervalDuration(), 
-                    TimeUnit.MILLISECONDS );
-         }
-      }
-      else if ( schedule.getExpiration()!=null )
-      {
-         future = executor.schedule( runnable, 
-                  toDuration( schedule.getExpiration() ), 
-                  TimeUnit.MILLISECONDS );
-      }
-      else if ( schedule.getDuration()!=null )
-      {
-         future = executor.schedule( runnable, 
-                  schedule.getDuration(), 
-                  TimeUnit.MILLISECONDS );
-      }
-      else
-      {
-         future = executor.schedule(runnable, 0l, TimeUnit.MILLISECONDS);
-      }
-      runnable.setFuture(future);
-      return future;
-   }
-   
-   @Destroy
-   public void destroy()
-   {
-      executor.shutdown();
-      try
-      {
-         executor.awaitTermination(5, TimeUnit.SECONDS);
-      }
-      catch (InterruptedException ie)
-      {
-         
-      }
-   }
-   
-   static class RunnableAsynchronous implements Runnable
-   {
-      private Asynchronous async;
-      
-      private Future future;
-      
-      RunnableAsynchronous(Asynchronous async)
-      {
-         this.async = async;
-      }
-      
-      public void run()
-      {
-         try
-         {
-            async.execute(future);
-         }
-         catch (Exception exception) 
-         {
-            async.handleException(exception, future); 
-         }
-      }
-      
-      public void setFuture(Future future)
-      {
-         this.future = future;
-      }
-      
-   }
-
-   public int getThreadPoolSize()
-   {
-      return threadPoolSize;
-   }
-
-   public void setThreadPoolSize(int threadPoolSize)
-   {
-      this.threadPoolSize = threadPoolSize;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TimerSchedule.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TimerSchedule.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TimerSchedule.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,98 +0,0 @@
-package org.jboss.seam.async;
-
-import java.util.Date;
-
-/**
- * A "schedule" for a timed event executed by
- * the EJB timer service or some other timer
- * service which supports delayed and/or periodic
- * timed events.
- * 
- * @author Gavin King
- *
- */
-public class TimerSchedule extends Schedule
-{
-   private Long intervalDuration;
-   
-   public Long getIntervalDuration()
-   {
-      return intervalDuration;
-   }
-   
-   /**
-    * @param duration the delay before the event occurs
-    */
-   public TimerSchedule(Long duration)
-   {
-      super(duration);
-   }
-
-   /**
-    * @param expiration the datetime at which the event occurs
-    */
-   public TimerSchedule(Date expiration)
-   {
-      super(expiration);
-   }
-
-   /**
-    * @param duration the delay before the first event occurs
-    * @param intervalDuration the period between the events
-    */
-   public TimerSchedule(Long duration, Long intervalDuration)
-   {
-      super(duration);
-      this.intervalDuration = intervalDuration;
-   }
-
-   /**
-    * @param expiration the datetime at which the first event occurs
-    * @param intervalDuration the period between the events
-    */
-   public TimerSchedule(Date expiration, Long intervalDuration)
-   {
-      super(expiration);
-      this.intervalDuration = intervalDuration;
-   }
-
-   public TimerSchedule(Long duration, Date expiration, Long intervalDuration)
-   {
-      super(duration, expiration);
-      this.intervalDuration = intervalDuration;
-   }
-
-   public TimerSchedule(Long duration, Date expiration, Long intervalDuration, Date finalExpiration)
-   {
-      super(duration, expiration, finalExpiration);
-      this.intervalDuration = intervalDuration;
-   }
-
-   private TimerSchedule() {}
-   
-   
-   
-   public static final TimerSchedule ONCE_IMMEDIATELY = new TimerSchedule();
-
-   @Override
-   public int hashCode()
-   {
-      final int prime = 31;
-      int result = super.hashCode();
-      result = prime * result + ((intervalDuration == null) ? 0 : intervalDuration.hashCode());
-      return result;
-   }
-
-   @Override
-   public boolean equals(Object obj)
-   {
-      if (!super.equals(obj)) return false;
-      final TimerSchedule other = (TimerSchedule) obj;
-      if (intervalDuration == null)
-      {
-         if (other.intervalDuration != null) return false;
-      }
-      else if (!intervalDuration.equals(other.intervalDuration)) return false;
-      return true;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TimerServiceDispatcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TimerServiceDispatcher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TimerServiceDispatcher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,255 +0,0 @@
-package org.jboss.seam.async;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.concurrent.Callable;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
-import javax.ejb.EJBException;
-import javax.ejb.NoSuchObjectLocalException;
-import javax.ejb.Stateless;
-import javax.ejb.Timeout;
-import javax.ejb.Timer;
-import javax.ejb.TimerHandle;
-import javax.ejb.TimerService;
-import javax.interceptor.Interceptors;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.ejb.SeamInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Dispatcher implementation that uses the EJB
- * TimerService.
- * 
- * @author Gavin King
- *
- */
- at Stateless
- at Name("org.jboss.seam.async.dispatcher")
- at Interceptors(SeamInterceptor.class)
- at Install(value=false, precedence=BUILT_IN)
-public class TimerServiceDispatcher 
-   extends AbstractDispatcher<Timer, TimerSchedule>
-   implements LocalTimerServiceDispatcher
-{
-   
-   @Resource TimerService timerService;
-
-   @PostConstruct 
-   public void postConstruct() {} //workaround for a bug in EJB3
-   
-   @Timeout
-   public void dispatch(Timer timer)
-   {
-      ( (Asynchronous) timer.getInfo() ).execute(timer);
-   }
-   
-   public Timer scheduleTimedEvent(String type, TimerSchedule schedule, Object... parameters)
-   {
-      return new TimerProxy( scheduleWithTimerService( schedule, new AsynchronousEvent(type, parameters) ) );
-   }
-   
-   public Timer scheduleAsynchronousEvent(String type, Object... parameters)
-   {
-      return new TimerProxy( timerService.createTimer( 0l, new AsynchronousEvent(type, parameters) ) );
-   }
-   
-   public Timer scheduleInvocation(InvocationContext invocation, Component component)
-   {
-      return new TimerProxy( 
-              scheduleWithTimerService( createTimerSchedule(invocation), 
-              new AsynchronousInvocation(invocation, component) ) );
-      
-   }
-
-   private Timer scheduleWithTimerService(TimerSchedule schedule, Asynchronous asynchronous)
-   {
-      if ( schedule.getIntervalDuration()!=null )
-      {
-         if ( schedule.getExpiration()!=null )
-         {
-             return timerService.createTimer( schedule.getExpiration(), schedule.getIntervalDuration(), asynchronous );
-         }
-         else if ( schedule.getDuration()!=null )
-         {
-             return timerService.createTimer( schedule.getDuration(), schedule.getIntervalDuration(), asynchronous );
-         }
-         else
-         {
-            return timerService.createTimer( 0l, schedule.getIntervalDuration(), asynchronous );
-         }
-      }
-      else if ( schedule.getExpiration()!=null )
-      {
-          return timerService.createTimer( schedule.getExpiration(), asynchronous );
-      }
-      else if ( schedule.getDuration()!=null )
-      {
-          return timerService.createTimer( schedule.getDuration(), asynchronous );
-      }
-      else
-      {
-         return timerService.createTimer(0l, asynchronous);
-      }
-   }
-   
-    static class TimerProxy 
-        implements Timer
-    {
-        Timer timer;
-
-        public TimerProxy(Timer timer)    
-            throws  IllegalStateException,
-                    NoSuchObjectLocalException,
-                    EJBException
-        {
-            this.timer = timer;
-        }
-        
-        public void cancel() 
-            throws
-                IllegalStateException,
-                NoSuchObjectLocalException,
-                EJBException
-        {
-            instance().call(new Callable() {
-                 public Object call() 
-                 {
-                     timer.cancel();
-                     return null;
-                 }
-             });
-        }
-
-        public TimerHandle getHandle()
-            throws
-                IllegalStateException,
-                NoSuchObjectLocalException,
-                EJBException
-        {
-            TimerHandle handle = (TimerHandle) 
-                instance().call(new Callable() {
-                     public Object call() 
-                     {
-                         return timer.getHandle();
-                     }
-                 });
-            return new TimerHandleProxy(handle);
-        }
-
-        public Serializable getInfo() 
-            throws
-                IllegalStateException,
-                NoSuchObjectLocalException,
-                EJBException
-        {
-            return (Serializable) 
-                instance().call(new Callable() {
-                     public Object call() 
-                     {
-                         return timer.getInfo();
-                     }
-                 });            
-        }
-        public Date getNextTimeout() 
-            throws
-                IllegalStateException,
-                NoSuchObjectLocalException,
-                EJBException
-        {
-            return (Date) 
-                instance().call(new Callable() {
-                     public Object call() 
-                     {
-                         return timer.getNextTimeout();
-                     }
-                 });            
-        }
-        
-        public long getTimeRemaining()    
-            throws IllegalStateException,
-                   NoSuchObjectLocalException,
-                   EJBException
-        {
-            return (Long) 
-                instance().call(new Callable() {
-                     public Object call() 
-                     {
-                         return timer.getTimeRemaining();
-                     }
-                 });  
-        }
-    }
-
-    static class TimerHandleProxy
-        implements TimerHandle, 
-                   Serializable
-    {
-        private static final long serialVersionUID = 6913362944260154627L;
-      
-        TimerHandle handle;
-
-        public TimerHandleProxy(TimerHandle handle) 
-        {
-            this.handle = handle;
-        }
-        
-        public Timer getTimer() 
-            throws IllegalStateException,
-                   NoSuchObjectLocalException,
-                   EJBException 
-        {
-            Timer timer = (Timer) instance().call(new Callable() {
-                public Object call() 
-                {
-                    try
-                    {
-                        return handle.getTimer();
-                    }
-                    catch (NoSuchObjectLocalException nsoe)
-                    {
-                        return null;
-                    }           
-                }
-            });
-            if (timer==null)
-            {
-               throw new NoSuchObjectLocalException();
-            }
-            else
-            {
-               return new TimerProxy(timer);
-            }
-        }
-    }
-
-    public Object call(Callable task) 
-    {
-        try 
-        {
-            return task.call();
-        } 
-        catch (RuntimeException e) 
-        {
-            // just pass along runtime exceptions
-            throw e;
-        } 
-        catch (Exception e) 
-        {
-            throw new RuntimeException(e);
-        }
-    }
-    public static LocalTimerServiceDispatcher instance()
-    {
-       return ( (LocalTimerServiceDispatcher) AbstractDispatcher.instance() );
-    }
-
-
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TransactionCompletionEvent.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TransactionCompletionEvent.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TransactionCompletionEvent.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.async;
-
-import javax.transaction.Synchronization;
-
-/**
- * An event that is processed when a transaction ends
- * 
- * @author Gavin King
- *
- */
-public class TransactionCompletionEvent extends AsynchronousEvent implements Synchronization
-{
-   public TransactionCompletionEvent(String type, Object... params)
-   {
-      super(type, params);
-   }
-   
-   public void afterCompletion(int status)
-   {
-      execute(null); 
-   }
-   
-   public void beforeCompletion() {}
-   
-   @Override
-   public String toString()
-   {
-      return "TransactionCompletionEvent(" + getType() + ')';
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TransactionSuccessEvent.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TransactionSuccessEvent.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/TransactionSuccessEvent.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-package org.jboss.seam.async;
-
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-
-/**
- * An event that is processed when a transaction completes
- * succesfully
- * 
- * @author Gavin King
- *
- */
-public class TransactionSuccessEvent extends AsynchronousEvent implements Synchronization
-{
-   public TransactionSuccessEvent(String type, Object... params)
-   {
-      super(type, params);
-   }
-   
-   public void afterCompletion(int status)
-   {
-      if (status==Status.STATUS_COMMITTED)
-      {
-         execute(null); 
-      }
-   }
-   
-   public void beforeCompletion() {}
-   
-   @Override
-   public String toString()
-   {
-      return "TransactionSuccessEvent(" + getType() + ')';
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/async/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,11 +0,0 @@
-/**
- * Seam asynchronicity: dispatcher implementations and schedule classes.
- * Support for the EJB timer service, java.util.concurrent, and Quartz.
- * Applications usually don't need to call these APIs directly.
- * 
- * @see org.jboss.seam.annotations.async
- */
- at Namespace(value="http://jboss.com/products/seam/async", prefix="org.jboss.seam.async")
-package org.jboss.seam.async;
-
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Actor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Actor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Actor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,115 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.AbstractMutable;
-
-/**
- * Allows the application to specify the jBPM actorId
- * during the login cycle.
- * 
- * @author Gavin King
- */
- at Name("org.jboss.seam.bpm.actor")
- at Scope(ScopeType.SESSION)
- at BypassInterceptors
- at Install(dependencies="org.jboss.seam.bpm.jbpm", precedence=BUILT_IN)
-public class Actor extends AbstractMutable implements Serializable
-{
-   private static final long serialVersionUID = -6515302276074415520L;
-   private String id;
-   private Set<String> groupActorIds = new HashSet<String>()
-   {
-      @Override
-      public boolean add(String o)
-      {
-         boolean dirty = super.add(o);
-         if (dirty) setDirty();
-         return dirty;
-      }
-      
-      @Override
-      public void clear()
-      {
-         if (size() > 0) setDirty();
-         super.clear();
-      }
-      
-      @Override
-      public boolean remove(Object o)
-      {
-         boolean dirty = super.remove(o);
-         if (dirty) setDirty();
-         return dirty;
-      }
-      
-      @Override
-      public Iterator<String> iterator()
-      {
-         final Iterator<String> it = super.iterator();
-         return new Iterator<String>()
-         {
-
-            public boolean hasNext()
-            {
-               return it.hasNext();
-            }
-
-            public String next()
-            {
-               return it.next();
-            }
-
-            public void remove()
-            {
-               setDirty();
-               it.remove();
-            }
-            
-         };
-      }
-   };
-   
-   public String getId() 
-   {
-      return id;
-   }
-   public void setId(String id) 
-   {
-      setDirty(this.id, id);
-      this.id = id;
-   }
- 
-   public Set<String> getGroupActorIds()
-   {
-      return groupActorIds;
-   }
-   public static Actor instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-      return (Actor) Component.getInstance(Actor.class);
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "Actor(" + id + ")";
-   }
-}
-
-               
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/BusinessProcess.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/BusinessProcess.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/BusinessProcess.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,431 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.AbstractMutable;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.international.StatusMessage;
-import org.jboss.seam.international.StatusMessages;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.taskmgmt.exe.TaskInstance;
-
-/**
- * Holds the task and process ids for the current conversation,
- * and provides programmatic control over the business process.
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.CONVERSATION)
- at Name("org.jboss.seam.bpm.businessProcess")
- at BypassInterceptors
- at Install(dependencies="org.jboss.seam.bpm.jbpm", precedence=BUILT_IN)
-public class BusinessProcess extends AbstractMutable implements Serializable 
-{
-
-   private static final long serialVersionUID = 4722350870845851070L;
-   private Long processId;
-   private Long taskId;
-   
-   public static BusinessProcess instance()
-   {
-      if ( !Contexts.isConversationContextActive() )
-      {
-         throw new IllegalStateException("No active conversation context");
-      }
-      return (BusinessProcess) Component.getInstance(BusinessProcess.class, ScopeType.CONVERSATION);
-   }
-   
-   /**
-    * Is there a process instance associated with 
-    * the current conversation?
-    */
-   public boolean hasCurrentProcess()
-   {
-      return processId!=null;
-   }
-   
-   /**
-    * Is there a process instance that has not ended 
-    * associated with the current conversation?
-    */
-   public boolean hasActiveProcess()
-   {
-      return hasCurrentProcess() && 
-            !org.jboss.seam.bpm.ProcessInstance.instance().hasEnded();
-   }
-   
-   /**
-    * Is there a task instance associated with 
-    * the current conversation?
-    */
-   public boolean hasCurrentTask()
-   {
-      return taskId!=null;
-   }
-   
-   /**
-    * The jBPM process instance id associated with
-    * the current conversation.
-    */
-   public Long getProcessId() 
-   {
-      return processId;
-   }
-   
-   /**
-    * Set the process instance id, without validating
-    * that the process instance actually exists.
-    */
-   public void setProcessId(Long processId) 
-   {
-      setDirty(this.processId, processId);
-      this.processId = processId;
-   }
-   
-   /**
-    * The jBPM task instance id associated with
-    * the current conversation.
-    */
-   public Long getTaskId() 
-   {
-      return taskId;
-   }
-   
-   /**
-    * Set the task instance id, without validating
-    * that the task instance actually exists.
-    */
-   public void setTaskId(Long taskId) 
-   {
-      setDirty(this.taskId, taskId);
-      this.taskId = taskId;
-   }
-   
-   /**
-    * Create a process instance and associate it with the
-    * current conversation.
-    * 
-    * @param processDefinitionName the jBPM process definition name
-    */
-   public void createProcess(String processDefinitionName)
-   {
-       createProcess(processDefinitionName, true);
-   }
-
-   /**
-    * Create a process instance and associate it with the
-    * current conversation.
-    * 
-    * @param processDefinitionName the jBPM process definition name
-    */
-   public void createProcess(String processDefinitionName, boolean shouldSignalProcess)
-   {
-       ProcessInstance process = ManagedJbpmContext.instance().newProcessInstanceForUpdate(processDefinitionName);
-       afterCreateProcess(processDefinitionName, process, shouldSignalProcess);
-   }
-   
-   /**
-    * Create a process instance and associate it with the
-    * current conversation.
-    * 
-    * @param processDefinitionName the jBPM process definition name
-    * @param businessKey the business key of the new process definition
-    */
-   public void createProcess(String processDefinitionName, String businessKey)
-   {
-      /*ProcessInstance process = ManagedJbpmContext.instance().getGraphSession()
-               .findLatestProcessDefinition(processDefinitionName)
-               .createProcessInstance(Collections.EMPTY_MAP, businessKey);*/
-      ProcessInstance process = ManagedJbpmContext.instance().newProcessInstanceForUpdate(processDefinitionName);
-      process.setKey(businessKey);
-      afterCreateProcess(processDefinitionName, process, true);
-   }
-   
-   private void afterCreateProcess(String processDefinitionName, ProcessInstance process, boolean shouldSignalProcess)
-   {
-      setProcessId( process.getId() );
-      // need to set process variables before the signal
-      Contexts.getBusinessProcessContext().flush();
-      if (shouldSignalProcess) {
-          process.signal();
-      }
-      
-      Events.instance().raiseEvent("org.jboss.seam.createProcess." + processDefinitionName);
-   }
-   
-   /**
-    * Start the current task, using the current actor id
-    * 
-    * @see Actor
-    */
-   public void startTask()
-   {
-      String actorId = Actor.instance().getId();
-      TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance();
-      if ( actorId != null )
-      {
-         task.start(actorId);
-      }
-      else
-      {
-         task.start();
-      }
-      
-      Events.instance().raiseEvent("org.jboss.seam.startTask." + task.getTask().getName());
-   }
-   
-   /**
-    * End the current task, via the given transition. If no transition name 
-    * is given, check the Transition component for a transition, or use the 
-    * default transition.
-    * 
-    * @param transitionName the jBPM transition name, or null
-    */
-   public void endTask(String transitionName)
-   {
-      TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance();
-      if (task==null)
-      {
-         throw new IllegalStateException( "no task instance associated with context" );
-      }
-      
-      if ( transitionName==null || "".equals(transitionName) )
-      {
-         transitionName = Transition.instance().getName();
-      }
-      
-      if (transitionName==null)
-      {
-         task.end();
-      }
-      else
-      {
-         task.end(transitionName);
-      }
-      
-      setTaskId(null); //TODO: do I really need this???!
-      
-      Events.instance().raiseEvent("org.jboss.seam.endTask." + task.getTask().getName());
-      ProcessInstance process = org.jboss.seam.bpm.ProcessInstance.instance();
-      if ( process.hasEnded() )
-      {
-         Events.instance().raiseEvent("org.jboss.seam.endProcess." + process.getProcessDefinition().getName());
-      }
-   }
-   
-   /**
-    * Signal the given transition for the current process instance.
-    * 
-    * @param transitionName the jBPM transition name 
-    */
-   public void transition(String transitionName)
-   {
-      ProcessInstance process = org.jboss.seam.bpm.ProcessInstance.instance();
-      process.signal(transitionName);
-      if ( process.hasEnded() )
-      {
-         Events.instance().raiseEvent("org.jboss.seam.endProcess." + process.getProcessDefinition().getName());
-      }
-   }
-   
-   /**
-    * Associate the task instance with the given id with the current
-    * conversation.
-    * 
-    * @param taskId the jBPM task instance id
-    * @return true if the task was found and was not ended
-    */
-   public boolean resumeTask(Long taskId)
-   {
-      setTaskId(taskId);
-      TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance();
-      if (task==null)
-      {
-         taskNotFound(taskId);
-         return false;
-      }
-      else if ( task.hasEnded() )
-      {
-         taskEnded(taskId);
-         return false;
-      }
-      else
-      {
-         setProcessId( task.getTaskMgmtInstance().getProcessInstance().getId() );
-         Events.instance().raiseEvent("org.jboss.seam.initTask." + task.getTask().getName());
-         return true;
-      }
-   }
-   
-   /**
-    * Associate the process instance with the given id with the 
-    * current conversation.
-    * 
-    * @param processId the jBPM process instance id
-    * @return true if the process was found and was not ended
-    */
-   public boolean resumeProcess(Long processId)
-   {
-      setProcessId(processId);
-      ProcessInstance process = org.jboss.seam.bpm.ProcessInstance.instance();
-      return afterResumeProcess(processId, process);
-   }
-   
-   /**
-    * Associate the process instance with the given business key 
-    * with the current conversation.
-    * 
-    * @param processDefinition the jBPM process definition name
-    * @param key the jBPM process instance key
-    * @return true if the process was found and was not ended
-    */
-   public boolean resumeProcess(String processDefinition, String key)
-   {
-      ProcessDefinition definition = ManagedJbpmContext.instance().getGraphSession().findLatestProcessDefinition(processDefinition);
-      ProcessInstance process = definition==null ? 
-               null : ManagedJbpmContext.instance().getProcessInstanceForUpdate(definition, key);
-      if (process!=null) setProcessId( process.getId() );
-      return afterResumeProcess(key, process);
-   }
-
-   private boolean afterResumeProcess(long processId, ProcessInstance process)
-   {
-      if ( process==null )
-      {
-         processNotFound(processId);
-         return false;
-      }
-      else if ( process.hasEnded() )
-      {
-         processEnded(processId);
-         return false;
-      }
-      else
-      {
-         Events.instance().raiseEvent("org.jboss.seam.initProcess." + process.getProcessDefinition().getName());
-         return true;
-      }
-   }
-   
-   private boolean afterResumeProcess(String processKey, ProcessInstance process)
-   {
-      if ( process==null )
-      {
-         processNotFound(processKey);
-         return false;
-      }
-      else if ( process.hasEnded() )
-      {
-         processEnded(processKey);
-         return false;
-      }
-      else
-      {
-         Events.instance().raiseEvent("org.jboss.seam.initProcess." + process.getProcessDefinition().getName());
-         return true;
-      }
-   }
-   
-   /**
-    * Check that the task currently associated with the conversation
-    * exists and has not ended.
-    * 
-    * @return true if the task exists and was not ended
-    */
-   public boolean validateTask()
-   {
-      if ( !hasCurrentTask() )
-      {
-         taskNotFound(taskId);
-         return false;
-      }
-      else if ( org.jboss.seam.bpm.TaskInstance.instance().hasEnded() )
-      {
-         taskEnded(taskId);
-         return false;
-      }
-      else
-      {
-         return true;
-      }
-   }
-   
-   protected void taskNotFound(Long taskId)
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault(
-            StatusMessage.Severity.WARN, 
-            "org.jboss.seam.TaskNotFound", 
-            "Task #0 not found", 
-            taskId
-         );
-   }
-   
-   protected void taskEnded(Long taskId)
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault(
-            StatusMessage.Severity.WARN, 
-            "org.jboss.seam.TaskEnded", 
-            "Task #0 already ended", 
-            taskId
-         );
-   }
-   
-   protected void processEnded(Long processId)
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault(
-            StatusMessage.Severity.WARN, 
-            "org.jboss.seam.ProcessEnded", 
-            "Process #0 already ended", 
-            processId
-         );
-   }
-   
-   protected void processNotFound(Long processId)
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault(
-            StatusMessage.Severity.WARN, 
-            "org.jboss.seam.ProcessNotFound", 
-            "Process #0 not found", 
-            processId
-         );
-   }
-   
-   protected void processEnded(String key)
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault(
-            StatusMessage.Severity.WARN, 
-            "org.jboss.seam.ProcessEnded", 
-            "Process #0 already ended", 
-            key
-         );
-   }
-   
-   protected void processNotFound(String key)
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault(
-            StatusMessage.Severity.WARN, 
-            "org.jboss.seam.ProcessNotFound", 
-            "Process #0 not found", 
-            key
-         );
-   }
-
-   
-   @Override
-   public String toString()
-   {
-      return "BusinessProcess(processId=" + processId + ",taskId=" + taskId + ")";
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/BusinessProcessInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/BusinessProcessInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/BusinessProcessInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,182 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.bpm;
-
-import java.lang.reflect.Method;
-
-import org.jboss.seam.annotations.bpm.BeginTask;
-import org.jboss.seam.annotations.bpm.CreateProcess;
-import org.jboss.seam.annotations.bpm.EndTask;
-import org.jboss.seam.annotations.bpm.ResumeProcess;
-import org.jboss.seam.annotations.bpm.StartTask;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.BijectionInterceptor;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Strings;
-import org.jboss.seam.web.Parameters;
-
-/**
- * Implements annotation-based business-process demarcation.
- *
- * @author <a href="mailto:steve at hibernate.org">Steve Ebersole</a>
- * @author Gavin King
- */
- at Interceptor(stateless=true, around=BijectionInterceptor.class)
-public class BusinessProcessInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = 758197867958840918L;
-   
-   private static final LogProvider log = Logging.getLogProvider( BusinessProcessInterceptor.class );
-
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      if ( !beforeInvocation(invocation) )
-      {
-         return null;
-      }
-      else
-      {
-         return afterInvocation( invocation, invocation.proceed() );
-      }
-   }
-
-   private boolean beforeInvocation(InvocationContext invocationContext) 
-   {
-      Method method = invocationContext.getMethod();
-      if ( method.isAnnotationPresent(StartTask.class) ) 
-      {
-         log.trace( "encountered @StartTask" );
-         StartTask tag = method.getAnnotation(StartTask.class);
-         Long taskId = getProcessOrTaskId( tag.taskIdParameter(), tag.taskId() );
-         return BusinessProcess.instance().resumeTask(taskId);
-      }
-      else if ( method.isAnnotationPresent(BeginTask.class) ) 
-      {
-         log.trace( "encountered @BeginTask" );
-         BeginTask tag = method.getAnnotation(BeginTask.class);
-         Long taskId = getProcessOrTaskId( tag.taskIdParameter(), tag.taskId() );
-         return BusinessProcess.instance().resumeTask(taskId);
-      }
-      else if ( method.isAnnotationPresent(ResumeProcess.class) ) 
-      {
-         log.trace( "encountered @ResumeProcess" );
-         ResumeProcess tag = method.getAnnotation(ResumeProcess.class);
-         if ( tag.processKey().equals("") )
-         {
-            Long processId = getProcessOrTaskId( tag.processIdParameter(), tag.processId() );
-            return BusinessProcess.instance().resumeProcess(processId);
-         }
-         else
-         {
-            return BusinessProcess.instance().resumeProcess( tag.definition(), getProcessKey( tag.processKey() ) );
-         }
-      }
-      if ( method.isAnnotationPresent(EndTask.class) )
-      {
-         log.trace( "encountered @EndTask" );
-         return BusinessProcess.instance().validateTask();
-      }
-      else
-      {
-         return true;
-      }
-   }
-
-   private Object afterInvocation(InvocationContext invocation, Object result)
-   {
-      Method method = invocation.getMethod();
-      if ( result!=null || method.getReturnType().equals(void.class) ) //interpreted as "redisplay"
-      {
-         if ( method.isAnnotationPresent(CreateProcess.class) )
-         {
-            log.trace( "encountered @CreateProcess" );
-            CreateProcess tag = method.getAnnotation(CreateProcess.class);
-            if ( tag.processKey().equals("") )
-            {
-               BusinessProcess.instance().createProcess( tag.definition() );
-            }
-            else
-            {
-               BusinessProcess.instance().createProcess( tag.definition(), getProcessKey( tag.processKey() ) );
-            }
-         }
-         if ( method.isAnnotationPresent(StartTask.class) )
-         {
-            log.trace( "encountered @StartTask" );
-            BusinessProcess.instance().startTask();
-         }
-         if ( method.isAnnotationPresent(EndTask.class) )
-         {
-            log.trace( "encountered @EndTask" );
-            BusinessProcess.instance().endTask( method.getAnnotation(EndTask.class).transition() );
-         }
-         if ( method.isAnnotationPresent(org.jboss.seam.annotations.bpm.Transition.class) )
-         {
-            log.trace( "encountered @Transition" );
-            String transitionName = method.getAnnotation(org.jboss.seam.annotations.bpm.Transition.class).value();
-            if ( "".equals(transitionName) ) transitionName = method.getName();
-            BusinessProcess.instance().transition(transitionName);
-         }
-      }
-      return result;
-   }
-
-   private String getProcessKey(String el)
-   {
-      Object key = Expressions.instance().createValueExpression(el).getValue();
-      if (key==null)
-      {
-         throw new IllegalStateException("process business key may not be null");
-      }
-      return key.toString();
-   }
-
-   private Long getProcessOrTaskId(String paramName, String el)
-   {
-      Object id;
-      if ( Strings.isEmpty(paramName) )
-      {
-         id = Expressions.instance().createValueExpression(el).getValue();
-      }
-      else
-      {
-         String[] values = Parameters.instance().getRequestParameters().get(paramName);
-         id = values!=null && values.length==1 ? values[0] : null;
-      }
-      
-      if (id==null)
-      {
-         throw new IllegalStateException("task/process id may not be null");
-      }
-      else if (id instanceof Long)
-      {
-         return (Long) id;
-      }
-      else if (id instanceof String)
-      {
-         return new Long( (String) id );
-      }
-      else
-      {
-         throw new IllegalArgumentException("task/process id must be a string or long");
-      }
-    }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return Contexts.isApplicationContextActive() && Init.instance().isJbpmInstalled();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Jbpm.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Jbpm.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Jbpm.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,394 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.naming.NamingException;
-
-import org.dom4j.Element;
-import org.hibernate.HibernateException;
-import org.hibernate.cfg.Environment;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.ResourceLoader;
-import org.jboss.seam.deployment.DeploymentStrategy;
-import org.jboss.seam.deployment.FileDescriptor;
-import org.jboss.seam.deployment.StandardDeploymentStrategy;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Naming;
-import org.jboss.seam.util.Resources;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.node.DbSubProcessResolver;
-import org.jbpm.graph.node.ProcessState;
-import org.jbpm.graph.node.SubProcessResolver;
-import org.jbpm.instantiation.UserCodeInterceptorConfig;
-import org.jbpm.jpdl.JpdlException;
-import org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator;
-import org.jbpm.persistence.db.DbPersistenceServiceFactory;
-import org.xml.sax.InputSource;
-
-/**
- * A seam component that boostraps a JBPM SessionFactory
- * 
- * @author Gavin King
- * @author <a href="mailto:steve at hibernate.org">Steve Ebersole</a>
- * @author Norman Richards
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Startup
- at Name("org.jboss.seam.bpm.jbpm")
- at Install(value=false, precedence=BUILT_IN)
-public class Jbpm 
-{
-   private static final LogProvider log = Logging.getLogProvider(Jbpm.class);
-   
-   private JbpmConfiguration jbpmConfiguration;
-   private String jbpmConfigurationJndiName;
-   private String[] processDefinitions;
-   private String[] pageflowDefinitions;
-   private Map<String, ProcessDefinition> pageflowProcessDefinitions = new HashMap<String, ProcessDefinition>();
-
-   @Create
-   public void startup() throws Exception
-   {
-      log.debug( "Starting jBPM" );
-      ProcessState.setDefaultSubProcessResolver( new SeamSubProcessResolver() );
-      installProcessDefinitions();
-      installPageflowDefinitions();
-      //JbpmExpressionEvaluator.setVariableResolver( new SeamVariableResolver() );
-      //JbpmExpressionEvaluator.setFunctionMapper( new SeamFunctionMapper() );
-      JbpmExpressionEvaluator.setExpressionEvaluator( new SeamExpressionEvaluator() );
-      UserCodeInterceptorConfig.setUserCodeInterceptor( new SeamUserCodeInterceptor() );
-   }
-
-   @Destroy
-   public void shutdown()
-   {
-      if (jbpmConfiguration!=null) 
-      {
-         jbpmConfiguration.close();
-      }
-   }
-   
-   public JbpmConfiguration getJbpmConfiguration()
-   {
-      if (jbpmConfiguration==null)
-      {
-         initJbpmConfiguration();
-      }
-      return jbpmConfiguration;
-   }
-
-   private void initJbpmConfiguration()
-   {
-      if (jbpmConfigurationJndiName==null)
-      {
-         jbpmConfiguration = JbpmConfiguration.getInstance();
-      }
-      else
-      {
-         try
-         {
-            jbpmConfiguration = (JbpmConfiguration) Naming.getInitialContext().lookup(jbpmConfigurationJndiName);
-         }
-         catch (NamingException ne)
-         {
-            throw new IllegalArgumentException("JbpmConfiguration not found in JNDI", ne);
-         }
-      }
-
-      DbPersistenceServiceFactory dbpsf = (DbPersistenceServiceFactory) jbpmConfiguration.getServiceFactory("persistence");
-      if (Naming.getInitialContextProperties()!=null)
-      {
-         // Prefix regular JNDI properties for Hibernate
-         Hashtable<String, String> hash = Naming.getInitialContextProperties();
-         Properties prefixed = new Properties();
-         for (Map.Entry<String, String> entry: hash.entrySet() )
-         {
-            prefixed.setProperty( Environment.JNDI_PREFIX + "." + entry.getKey(), entry.getValue() );
-         }
-         
-         try
-         {
-            dbpsf.getConfiguration().getProperties().putAll(prefixed);
-         }
-         catch (HibernateException he)
-         {
-            log.warn("could not set JNDI properties for jBPM persistence: " + he.getMessage());
-         }
-      }
-   }
-
-   public ProcessDefinition getPageflowProcessDefinition(String pageflowName)
-   {
-      return pageflowProcessDefinitions.get(pageflowName);
-   }
-   
-   public boolean isPageflowProcessDefinition(String pageflowName)
-   {
-      return pageflowProcessDefinitions.containsKey(pageflowName);
-   }
-   
-   public static ProcessDefinition getPageflowDefinitionFromResource(String resourceName)
-   {
-      InputStream resource = ResourceLoader.instance().getResourceAsStream(resourceName);
-      if (resource==null)
-      {
-         throw new IllegalArgumentException("pageflow resource not found: " + resourceName);
-      }
-      try
-      {
-         return Jbpm.parseInputSource( new InputSource(resource) );
-      }
-      catch (JpdlException e)
-      {
-         throw new JpdlException("Unable to parse process definition " + resourceName, e);
-      } finally {
-          Resources.closeStream(resource);
-      }
-   }
-   
-   public ProcessDefinition getProcessDefinitionFromResource(String resourceName) 
-   {
-      InputStream resource = ResourceLoader.instance().getResourceAsStream(resourceName);
-      if (resource==null)
-      {
-         throw new IllegalArgumentException("process definition resource not found: " + resourceName);
-      }
-      
-      try {
-          return ProcessDefinition.parseXmlInputStream(resource);
-      } finally {
-          Resources.closeStream(resource);
-      }
-   }
-
-   public String[] getPageflowDefinitions() 
-   {
-      return pageflowDefinitions;
-   }
-
-   public void setPageflowDefinitions(String[] pageflowDefinitions) 
-   {
-      this.pageflowDefinitions = pageflowDefinitions;
-   }
-   
-   public String[] getProcessDefinitions() 
-   {
-      return processDefinitions;
-   }
-
-   public void setProcessDefinitions(String[] processDefinitions) 
-   {
-      this.processDefinitions = processDefinitions;
-   }
-   
-   /**
-    * Dynamically deploy a page flow definition, if a pageflow with an 
-    * identical name already exists, the pageflow is updated.
-    * 
-    * @return true if the pageflow definition has been updated
-    */
-   public boolean deployPageflowDefinition(ProcessDefinition pageflowDefinition) 
-   {
-      return pageflowProcessDefinitions.put( pageflowDefinition.getName(), pageflowDefinition )!=null;
-   }
-   
-   /**
-    * Read a pageflow definition
-    * 
-    * @param pageflowDefinition the pageflow as an XML string
-    */
-   public ProcessDefinition getPageflowDefinitionFromXml(String pageflowDefinition)
-   {
-      Reader reader = null;
-      try {
-          reader = new StringReader(pageflowDefinition);
-          //stream = new ReaderInputStream(new StringReader(pageflowDefinition));
-          return Jbpm.parseReaderSource(reader);
-      } finally {
-          Resources.closeReader(reader);
-      }       
-   }
-   
-   /**
-    * Read a process definition
-    * 
-    * @param processDefinition the process as an XML string
-    */
-   public ProcessDefinition getProcessDefinitionFromXml(String processDefinition)
-   {
-       //InputStream stream = null;
-      Reader reader = null;
-       try {
-           //stream = new ReaderInputStream(new StringReader(processDefinition));
-           reader =  new StringReader(processDefinition);
-           return ProcessDefinition.parseXmlReader(reader);
-       } finally {
-           Resources.closeReader(reader);
-       }
-   }
-   
-   /**
-    * Remove a pageflow definition
-    * 
-    * @param pageflowName Name of the pageflow to remove
-    * @return true if the pageflow definition has been removed
-    */
-   public boolean undeployPageflowDefinition(String pageflowName) 
-   {     
-      return pageflowProcessDefinitions.remove(pageflowName)!=null;
-   }
-   
-   private void installPageflowDefinitions() {
-      Set<String> mergedPageflowDefinitions = new LinkedHashSet<String>();
-      if ( pageflowDefinitions!=null )
-      {
-         mergedPageflowDefinitions.addAll(Arrays.asList(pageflowDefinitions));
-      }
-      
-      for (FileDescriptor fileDescriptor : ((PageflowDeploymentHandler) ((DeploymentStrategy) Contexts.getEventContext().get(StandardDeploymentStrategy.NAME)).getDeploymentHandlers().get(PageflowDeploymentHandler.NAME)).getResources())
-      {
-         mergedPageflowDefinitions.add(fileDescriptor.getName());
-      }
-      
-      for (String pageflow: mergedPageflowDefinitions)
-      {
-         ProcessDefinition pd = getPageflowDefinitionFromResource(pageflow);
-         pageflowProcessDefinitions.put( pd.getName(), pd );
-      }
-   }
-
-   private void installProcessDefinitions()
-   {
-      if ( isProcessDeploymentEnabled() )
-      {
-         JbpmContext jbpmContext = getJbpmConfiguration().createJbpmContext();
-         try
-         {
-            if (processDefinitions!=null)
-            {
-               for ( String definitionResource : processDefinitions )
-               {
-                  deployProcess(jbpmContext, definitionResource);
-               }
-            }
-         }
-         catch (RuntimeException e)
-         {
-            throw new RuntimeException("could not deploy a process definition", e);
-         }
-         finally
-         {
-            jbpmContext.close();
-         }
-      }
-   }
-
-   private void deployProcess(JbpmContext jbpmContext, String definitionResource)
-   {
-      ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource(definitionResource);
-      if (log.isDebugEnabled())
-      {
-         log.debug( "deploying process definition : " + processDefinition.getName() );
-      }
-      jbpmContext.deployProcessDefinition(processDefinition);
-   }
-
-   protected boolean isProcessDeploymentEnabled()
-   {
-      return processDefinitions!=null && processDefinitions.length>0;
-   }
-   
-   public static Jbpm instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No application context active");
-      }
-      if ( !Init.instance().isJbpmInstalled() )
-      {
-         throw new IllegalStateException("jBPM support is not installed (use components.xml to install it)");
-      }
-      return (Jbpm) Component.getInstance(Jbpm.class, ScopeType.APPLICATION);
-   }
-
-   protected String getJbpmConfigurationJndiName()
-   {
-      return jbpmConfigurationJndiName;
-   }
-
-   protected void setJbpmConfigurationJndiName(String jbpmConfigurationJndiName)
-   {
-      this.jbpmConfigurationJndiName = jbpmConfigurationJndiName;
-   }
-   
-   public static JbpmConfiguration pageflowConfiguration = JbpmConfiguration.parseResource("org/jboss/seam/bpm/jbpm.pageflow.cfg.xml");
-
-   public static JbpmContext createPageflowContext() 
-   {
-      return pageflowConfiguration.createJbpmContext();
-   }
-
-   public static ProcessDefinition parseInputSource(InputSource inputSource) 
-   {
-      JbpmContext jbpmContext = createPageflowContext();
-      try 
-      {
-         return new PageflowParser(inputSource).readProcessDefinition();
-      }
-      finally 
-      {
-         jbpmContext.close();
-      }
-   }
-   
-   public static ProcessDefinition parseReaderSource(Reader reader) 
-   {
-      JbpmContext jbpmContext = createPageflowContext();
-      try 
-      {
-         return new PageflowParser(reader).readProcessDefinition();
-      }
-      finally 
-      {
-         jbpmContext.close();
-      }
-   }
-
-   private static final DbSubProcessResolver DB_SUB_PROCESS_RESOLVER = new DbSubProcessResolver();
-   class SeamSubProcessResolver implements SubProcessResolver
-   {
-      public ProcessDefinition findSubProcess(Element element)
-      {
-         String subProcessName = element.attributeValue("name");
-         ProcessDefinition pageflow = pageflowProcessDefinitions.get(subProcessName);
-         return pageflow==null ? DB_SUB_PROCESS_RESOLVER.findSubProcess(element) : pageflow;
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/JbpmELResolver.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/JbpmELResolver.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/JbpmELResolver.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,70 +0,0 @@
-package org.jboss.seam.bpm;
-
-import java.beans.FeatureDescriptor;
-import java.util.Iterator;
-
-import javax.el.ELContext;
-import javax.el.ELResolver;
-
-import org.jbpm.jpdl.el.VariableResolver;
-
-/**
- * Resolves jBPM variables for Unified EL
- * 
- * @author Gavin King
- *
- */
-final class JbpmELResolver extends ELResolver
-{
-   private final VariableResolver resolver;
-
-   JbpmELResolver(VariableResolver resolver)
-   {
-      this.resolver = resolver;
-   }
-
-   @Override
-   public Object getValue(ELContext context, Object base, Object property) 
-   {
-      if ( base==null && property!=null )
-      {         
-         context.setPropertyResolved(true); 
-         return resolver.resolveVariable( (String) property );
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   @Override
-   public boolean isReadOnly(ELContext context, Object base, Object property) 
-   {
-      return true;
-   }
-
-   @Override
-   public Class<?> getCommonPropertyType(ELContext context, Object base)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Class<?> getType(ELContext context, Object base, Object property) 
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void setValue(ELContext context, Object base, Object property, Object value)
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ManagedJbpmContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ManagedJbpmContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ManagedJbpmContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,168 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.naming.NamingException;
-import javax.transaction.RollbackException;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.transaction.UserTransaction;
-import org.jbpm.JbpmContext;
-import org.jbpm.persistence.db.DbPersistenceServiceFactory;
-import org.jbpm.svc.Services;
-
-/**
- * Manages a reference to a JbpmContext.
- *
- * @author <a href="mailto:steve at hibernate.org">Steve Ebersole</a>
- * @author Gavin King
- */
- at Scope(ScopeType.EVENT)
- at Name("org.jboss.seam.bpm.jbpmContext")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class ManagedJbpmContext implements Synchronization
-{
-   private static final LogProvider log = Logging.getLogProvider(ManagedJbpmContext.class);
-
-   private JbpmContext jbpmContext;
-   private boolean synchronizationRegistered;
-
-   @Create
-   public void create() throws NamingException, RollbackException, SystemException
-   {
-      jbpmContext = Jbpm.instance().getJbpmConfiguration().createJbpmContext();
-      assertNoTransactionManagement();
-      log.debug( "created seam managed jBPM context");
-   }
-
-   private void assertNoTransactionManagement()
-   {
-      DbPersistenceServiceFactory dpsf = (DbPersistenceServiceFactory) jbpmContext.getJbpmConfiguration()
-            .getServiceFactory(Services.SERVICENAME_PERSISTENCE);
-      if ( dpsf.isTransactionEnabled() )
-      {
-         throw new IllegalStateException("jBPM transaction management is enabled, disable in jbpm.cfg.xml");
-      }
-   }
-
-   @Unwrap
-   public JbpmContext getJbpmContext() throws NamingException, RollbackException, SystemException
-   {
-      joinTransaction();
-      return jbpmContext;
-   }
-
-   private void joinTransaction() throws SystemException
-   {
-      UserTransaction transaction = Transaction.instance();
-      
-      if ( !transaction.isActiveOrMarkedRollback() )
-      {
-         throw new IllegalStateException("JbpmContext may only be used inside a transaction");
-      }
-      
-      if ( !synchronizationRegistered && !Lifecycle.isDestroying() && transaction.isActive() )
-      {
-         jbpmContext.getSession().isOpen();
-         try //TODO: what we really want here is if (!cmt)
-         {
-            transaction.registerSynchronization(this);
-         }
-         catch (UnsupportedOperationException uoe)
-         {
-            jbpmContext.getSession().getTransaction().registerSynchronization(this);
-         }
-         synchronizationRegistered = true;
-      }
-   }
-   
-   public void beforeCompletion()
-   {
-      log.debug( "flushing seam managed jBPM context" );
-      /*org.jbpm.graph.exe.ProcessInstance processInstance = ProcessInstance.instance();
-      if (processInstance!=null)
-      {
-         jbpmContext.save(processInstance);
-      }*/
-      if ( Contexts.isBusinessProcessContextActive() )
-      {
-         //in requests that come through SeamPhaseListener,
-         //transactions are committed before the contexts are
-         //destroyed, flush here:
-         Contexts.getBusinessProcessContext().flush();
-      }
-      jbpmContext.getSession().flush();
-      log.debug( "done flushing seam managed jBPM context" );
-   }
-   
-   public void afterCompletion(int status) 
-   {
-      synchronizationRegistered = false;
-      if ( !Contexts.isEventContextActive() )
-      {
-         //in calls to MDBs and remote calls to SBs, the 
-         //transaction doesn't commit until after contexts
-         //are destroyed, so wait until the transaction
-         //completes before closing the session
-         //on the other hand, if we still have an active
-         //event context, leave it open
-         closeContext();
-      }
-   }
-   
-   @Destroy
-   public void destroy()
-   {
-      if ( !synchronizationRegistered )
-      {
-         //in requests that come through SeamPhaseListener,
-         //there can be multiple transactions per request,
-         //but they are all completed by the time contexts
-         //are dstroyed
-         //so wait until the end of the request to close
-         //the session
-         //on the other hand, if we are still waiting for
-         //the transaction to commit, leave it open
-         closeContext();
-      }
-   }
-
-   private void closeContext()
-   {
-      log.debug( "destroying seam managed jBPM context" );
-      jbpmContext.close();
-      log.debug( "done destroying seam managed jBPM context" );
-   }
-      
-   public static JbpmContext instance()
-   {
-      if ( !Contexts.isEventContextActive() )
-      {
-         throw new IllegalStateException("no active event context");
-      }
-      return (JbpmContext) Component.getInstance(ManagedJbpmContext.class, ScopeType.EVENT);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PageflowDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PageflowDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PageflowDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,81 +0,0 @@
-package org.jboss.seam.bpm;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.jboss.seam.deployment.AbstractDeploymentHandler;
-import org.jboss.seam.deployment.DeploymentMetadata;
-import org.jboss.seam.deployment.FileDescriptor;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Resources;
-import org.jboss.seam.util.XML;
-
-
-public class PageflowDeploymentHandler extends AbstractDeploymentHandler
-{
-   
-   private static DeploymentMetadata NAMESPACE_METADATA = new DeploymentMetadata()
-   {
-
-      public String getFileNameSuffix()
-      {
-         return ".jpdl.xml";
-      }
-      
-   };
-
-   private static LogProvider log = Logging.getLogProvider(PageflowDeploymentHandler.class);
-   
-   public static final String NAME = "org.jboss.seam.bpm.PageflowDeploymentHandler";
-   
-   public String getName()
-   {
-      return NAME;
-   }
-
-   @Override
-   public void postProcess(ClassLoader classLoader)
-   {
-      Set<FileDescriptor> files = new HashSet<FileDescriptor>();
-      for (FileDescriptor fileDescriptor : getResources())
-      {
-         try
-         {
-            InputStream inputStream = fileDescriptor.getUrl().openStream();
-            try 
-            {
-               
-               Element root = XML.getRootElementSafely(inputStream);
-               if ("pageflow-definition".equals(root.getName()))
-               {
-                  files.add(fileDescriptor);
-               }
-            }
-            catch (DocumentException e) 
-            {
-               log.debug("Unable to parse " + fileDescriptor.getName(), e);
-            }
-            finally 
-            {
-               Resources.closeStream(inputStream);
-            }
-         } catch (IOException e)
-         {
-            log.trace("Error loading " + fileDescriptor.getName());
-         }
-         
-      }
-      setResources(files);
-   }
-   
-   public DeploymentMetadata getMetadata()
-   {
-      return NAMESPACE_METADATA;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PageflowParser.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PageflowParser.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PageflowParser.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,65 +0,0 @@
-package org.jboss.seam.bpm;
-
-import java.io.Reader;
-
-import org.dom4j.Element;
-import org.jbpm.graph.def.Node;
-import org.jbpm.graph.def.NodeCollection;
-import org.jbpm.jpdl.xml.JpdlXmlReader;
-import org.jbpm.jpdl.xml.ProblemListener;
-import org.xml.sax.InputSource;
-
-/**
- * A jPDL parser for Seam pageflow definitions
- * 
- * @author Tom Baeyens
- *
- */
-public class PageflowParser extends JpdlXmlReader 
-{
-
-  private static final long serialVersionUID = 1L;
-
-  public PageflowParser(InputSource inputSource, ProblemListener problemListener) 
-  {
-     super(inputSource, problemListener);
-  }
-
-  public PageflowParser(InputSource inputSource) 
-  {
-     super(inputSource);
-  }
-
-  public PageflowParser(Reader reader) 
-  {
-     super(reader);
-  }
-  
-  @Override
-  public void readNodes(Element nodeCollectionElement, NodeCollection nodeCollection) 
-  {
-     super.readNodes(nodeCollectionElement, nodeCollection);
-    
-     if ( "pageflow-definition".equals( nodeCollectionElement.getName() ) ) 
-     {
-        String startPageName = nodeCollectionElement.attributeValue("start-page");
-        if (startPageName==null) 
-        {
-           Element startPageElement = nodeCollectionElement.element("start-page");
-           if (startPageElement!=null) 
-           {
-              startPageName = startPageElement.attributeValue("name");
-           }
-        }
-        if (startPageName!=null) 
-        {
-           Node startPage = getProcessDefinition().getNode(startPageName);
-           if (startPage!=null) 
-           {
-              getProcessDefinition().setStartState(startPage);
-           }
-        }
-     }
-  }
-  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PooledTask.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PooledTask.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PooledTask.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,120 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.web.Parameters;
-import org.jbpm.taskmgmt.exe.TaskInstance;
-
-/**
- * Support for assigning tasks in the pooled task list.
- * 
- * @see TaskInstanceList
- * @author Gavin King
- */
- at Name("org.jboss.seam.bpm.pooledTask")
- at Scope(ScopeType.APPLICATION)
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class PooledTask
-{
-   
-   /**
-    * Assign the TaskInstance with the id passed
-    * in the request parameter named "taskId" to
-    * the current actor.
-    * 
-    * @see Actor
-    * @return a null outcome only if the task was not found
-    */
-   @Transactional
-   public String assignToCurrentActor()
-   {
-      Actor actor = Actor.instance();
-      if ( actor.getId()==null )
-      {
-         throw new IllegalStateException("no current actor id defined");
-      }
-      TaskInstance taskInstance = getTaskInstance();
-      if (taskInstance!=null)
-      {
-         taskInstance.setActorId( actor.getId() );
-         return "taskAssignedToActor";
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   /**
-    * Assign the TaskInstance with the id passed
-    * in the request parameter named "taskId" to
-    * the given actor id.
-    * 
-    * @param actorId the jBPM actor id
-    * @return a null outcome only if the task was not found
-    */
-   @Transactional
-   public String assign(String actorId)
-   {
-      TaskInstance taskInstance = getTaskInstance();
-      if (taskInstance!=null)
-      {
-         taskInstance.setActorId(actorId);
-         return "taskAssigned";
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   /**
-    * Unassign the TaskInstance with the id passed
-    * in the request parameter named "taskId" from
-    * the actor to which it is assigned, and return
-    * it to the pool it came from.
-    * 
-    * @return a null outcome only if the task was not found
-    */
-   @Transactional
-   public String unassign()
-   {
-      TaskInstance taskInstance = getTaskInstance();
-      if (taskInstance!=null)
-      {
-         taskInstance.setActorId(null);
-         return "taskUnassigned";
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   /**
-    * @return the TaskInstance with the id passed
-    * in the request parameter named "taskId".
-    */
-   @Transactional
-   public TaskInstance getTaskInstance()
-   {
-      String[] values = Parameters.instance().getRequestParameters().get("taskId");
-      if ( values==null || values.length!=1 ) 
-      {
-         return null;
-      }
-      else
-      {
-         String taskId = values[0];
-         return taskId==null ? 
-               null : 
-               ManagedJbpmContext.instance().getTaskInstanceForUpdate( Long.parseLong(taskId) );
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PooledTaskInstanceList.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PooledTaskInstanceList.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/PooledTaskInstanceList.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.annotations.Unwrap;
-import org.jbpm.taskmgmt.exe.TaskInstance;
-
-/**
- * Support for the pooled task list.
- * 
- * @see TaskInstanceList
- * @author Gavin King
- */
- at Name("org.jboss.seam.bpm.pooledTaskInstanceList")
- at Scope(ScopeType.APPLICATION)
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class PooledTaskInstanceList
-{
-   
-   @Unwrap
-   @Transactional
-   public List<TaskInstance> getPooledTaskInstanceList()
-   {
-      Actor actor = Actor.instance();
-      String actorId = actor.getId();
-      if ( actorId == null ) return null;
-      ArrayList groupIds = new ArrayList( actor.getGroupActorIds() );
-      groupIds.add(actorId);
-      return ManagedJbpmContext.instance().getGroupTaskList(groupIds);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ProcessInstance.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ProcessInstance.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ProcessInstance.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.util.Work;
-
-/**
- * A Seam component that allows injection of the current
- * jBPM ProcessInstance.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at Name("org.jboss.seam.bpm.processInstance")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class ProcessInstance 
-{
-   
-   @Unwrap
-   public org.jbpm.graph.exe.ProcessInstance getProcessInstance() throws Exception
-   {
-      if ( !Contexts.isConversationContextActive() ) return null;
-      
-      return new Work<org.jbpm.graph.exe.ProcessInstance>()
-      {
-         
-         @Override
-         protected org.jbpm.graph.exe.ProcessInstance work() throws Exception
-         {         
-            Long processId = BusinessProcess.instance().getProcessId();
-            if (processId!=null)
-            {
-               //TODO: do we need to cache this??
-               //return ManagedJbpmContext.instance().getProcessInstanceForUpdate(processId);
-               //JBSEAM-4629:
-               return ManagedJbpmContext.instance().getProcessInstance(processId); 
-            }
-            else
-            {
-               return null;
-            }
-         }
-         
-      }.workInTransaction();
-      
-   }
-   
-   public static org.jbpm.graph.exe.ProcessInstance instance()
-   {
-      if ( !Contexts.isConversationContextActive() || !BusinessProcess.instance().hasCurrentProcess() ) return null; //so we don't start a txn
-      
-      return (org.jbpm.graph.exe.ProcessInstance) Component.getInstance(ProcessInstance.class, ScopeType.STATELESS);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ProcessInstanceFinder.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ProcessInstanceFinder.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/ProcessInstanceFinder.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,105 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.hibernate.criterion.Order.asc;
-import static org.hibernate.criterion.Order.desc;
-import static org.hibernate.criterion.Restrictions.isNotNull;
-import static org.hibernate.criterion.Restrictions.isNull;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.List;
-
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Restrictions;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Transactional;
-import org.jbpm.graph.exe.ProcessInstance;
-
-/**
- * Support for the process list.
- * 
- * @author Gavin King
- */
- at Name("org.jboss.seam.bpm.processInstanceFinder")
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class ProcessInstanceFinder
-{
-   
-   private String processDefinitionName;
-   private String nodeName;
-   private Boolean processInstanceEnded = false;
-   private Boolean sortDescending = false;
-   
-   @Factory(value="org.jboss.seam.bpm.processInstanceList", autoCreate=true)
-   @Transactional
-   public List<ProcessInstance> getProcessInstanceList()
-   {
-      Criteria query = ManagedJbpmContext.instance().getSession()
-                  .createCriteria(ProcessInstance.class);
-      if ( processInstanceEnded!=null )
-      {
-         query.add( processInstanceEnded ? isNotNull("end") : isNull("end") );
-      }
-      
-      if (processDefinitionName!=null)
-      {
-         query.createCriteria("processDefinition")
-               .add( Restrictions.eq("name", processDefinitionName) );
-      }
-      
-      query = query.createCriteria("rootToken");
-      if (sortDescending!=null)
-      {
-         query.addOrder( sortDescending ? desc("nodeEnter") : asc("nodeEnter") );
-      }
-      if (nodeName!=null)
-      {
-         query.createCriteria("node")
-               .add( Restrictions.eq("name", nodeName) );
-      }
-      
-      return query.list();
-   }
-
-   protected String getNodeName()
-   {
-      return nodeName;
-   }
-
-   protected void setNodeName(String nodeName)
-   {
-      this.nodeName = nodeName;
-   }
-
-   protected String getProcessDefinitionName()
-   {
-      return processDefinitionName;
-   }
-
-   protected void setProcessDefinitionName(String processDefinitionName)
-   {
-      this.processDefinitionName = processDefinitionName;
-   }
-
-   protected Boolean isSortDescending()
-   {
-      return sortDescending;
-   }
-
-   protected void setSortDescending(Boolean sortDescending)
-   {
-      this.sortDescending = sortDescending;
-   }
-
-   protected Boolean getProcessInstanceEnded()
-   {
-      return processInstanceEnded;
-   }
-
-   protected void setProcessInstanceEnded(Boolean ended)
-   {
-      this.processInstanceEnded = ended;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/SeamExpressionEvaluator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/SeamExpressionEvaluator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/SeamExpressionEvaluator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,167 +0,0 @@
-package org.jboss.seam.bpm;
-
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.el.CompositeELResolver;
-import javax.el.ELContext;
-import javax.el.MethodExpression;
-import javax.el.MethodNotFoundException;
-import javax.el.PropertyNotFoundException;
-import javax.el.ValueExpression;
-
-import org.jboss.seam.el.EL;
-import org.jboss.seam.el.SeamFunctionMapper;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jbpm.jpdl.el.ELException;
-import org.jbpm.jpdl.el.Expression;
-import org.jbpm.jpdl.el.ExpressionEvaluator;
-import org.jbpm.jpdl.el.FunctionMapper;
-import org.jbpm.jpdl.el.VariableResolver;
-
-/**
- * Plugs the JBoss EL expression language and Seam
- * EL resolvers into jBPM. Note that this current 
- * implementation does not allow jBPM to see stuff
- * defined only by the JSF ELResolvers.
- * 
- * @author Gavin King
- * @author Pete Muir
- *
- */
-public class SeamExpressionEvaluator 
-    extends ExpressionEvaluator
-{
-   
-    private static LogProvider log = Logging.getLogProvider(SeamExpressionEvaluator.class);
-
-    @Override
-    public Object evaluate(String expression, Class returnType, final VariableResolver resolver, FunctionMapper mapper)
-        throws ELException
-    {
-        return createExpression(expression, returnType, mapper).evaluate(resolver);
-    }
-    
-    @Override
-    public Expression parseExpression(final String expression, final Class returnType, FunctionMapper mapper)
-        throws ELException
-    {
-        return createExpression(expression, returnType, mapper);
-    }
-    
-    private static Expression createExpression(final String expression, final Class returnType, final FunctionMapper mapper)
-    {
-        
-        return new Expression() 
-        {
-            private ELContext elContext = EL.createELContext();
-
-            private MethodExpression me;
-            private ValueExpression ve;
-                
-            private void initMethodExpression() 
-            {
-                if (me == null || ve == null)
-                {
-                    me = EL.EXPRESSION_FACTORY.createMethodExpression(elContext, expression, returnType, new Class[0]);
-                }
-            }
-                
-            private void initValueExpression() 
-            {
-                if (me == null || ve == null)
-                {
-                    ve = EL.EXPRESSION_FACTORY.createValueExpression(elContext, expression, returnType);
-                }
-            }
-                
-            @Override
-            public Object evaluate(VariableResolver resolver) throws ELException
-            {
-                List<javax.el.ELException> exceptions = new ArrayList<javax.el.ELException>();
-                try
-                {
-                    initMethodExpression(); 
-                    if (me != null)
-                    {
-                        try
-                        {
-                            return me.invoke(createELContext(resolver, mapper), new Object[0]);
-                        }
-                        catch (MethodNotFoundException e)
-                        {
-                            exceptions.add(e);
-                        }
-                    }
-                }
-                catch (javax.el.ELException e) 
-                {
-                    exceptions.add(e);
-                }
-                 
-                try
-                {
-                    initValueExpression();
-                    if (ve != null)
-                    {
-                        try
-                        {
-                            return ve.getValue(createELContext(resolver, mapper));
-                        }
-                        catch (PropertyNotFoundException e)
-                        {
-                            exceptions.add(e);
-                        }
-                    }
-                }
-                catch (javax.el.ELException e)
-                {
-                    exceptions.add(e);
-                }
-                
-                if (exceptions.size() == 1)
-                {
-                   throw new ELException("Error evaluating " + expression, exceptions.get(0));
-                }
-                else if (exceptions.size() > 1)
-                {
-                   log.debug("Exceptions occurred when parsing " + expression);
-                   for (javax.el.ELException e : exceptions)
-                   {
-                      log.debug("Possible cause", e);
-                   }
-                }
-                if (me == null && ve ==  null)
-                {
-                   log.debug("Error parsing " + expression);
-                   throw new ELException("Error parsing " + expression + "; not a valid EL expression");
-                }
-                throw new ELException("Error evaluating " + expression + "; possible causes are logged at debug level");
-            }
-        };
-    }
-   
-    private static javax.el.FunctionMapper decorateFunctionMapper(final FunctionMapper functionMapper)
-    {
-        return new SeamFunctionMapper( new javax.el.FunctionMapper() 
-        {
-            @Override
-            public Method resolveFunction(String prefix, String localName)
-            {
-                return functionMapper.resolveFunction(prefix, localName);
-            }
-        });
-    }
-    
-    private static ELContext createELContext(VariableResolver resolver, FunctionMapper functionMapper)
-    {
-        CompositeELResolver composite = new CompositeELResolver();
-        composite.add(EL.EL_RESOLVER);
-        composite.add( new JbpmELResolver(resolver) );
-        return EL.createELContext(composite, decorateFunctionMapper(functionMapper));
-    }
-    
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/SeamUserCodeInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/SeamUserCodeInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/SeamUserCodeInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,153 +0,0 @@
-package org.jboss.seam.bpm;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jbpm.context.exe.ContextInstance;
-import org.jbpm.graph.def.Action;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.graph.exe.Token;
-import org.jbpm.instantiation.UserCodeInterceptor;
-import org.jbpm.taskmgmt.def.AssignmentHandler;
-import org.jbpm.taskmgmt.def.TaskControllerHandler;
-import org.jbpm.taskmgmt.exe.Assignable;
-import org.jbpm.taskmgmt.exe.TaskInstance;
-
-/**
- * Intercepts calls to user code coming from jBPM, sets up
- * Seam contexts and associates the process and task instances
- * with the contexts.
- * 
- * @author Gavin King
- *
- */
-class SeamUserCodeInterceptor implements UserCodeInterceptor
-{
-   abstract static class ContextualCall
-   {
-      abstract void process() throws Exception;
-      
-      void run() throws Exception
-      {
-         if ( Contexts.isEventContextActive() || Contexts.isApplicationContextActive() ) //not sure about the second bit (only needed at init time!)
-         {
-            process();
-         }
-         else
-         {
-            Lifecycle.beginCall();
-            try
-            {
-               process();
-            }
-            finally
-            {
-               Lifecycle.endCall();
-            }
-         }
-      }
-      
-      void runAndWrap()
-      {
-         try
-         {
-            run();
-         }
-         catch (RuntimeException re)
-         {
-            throw re;
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException(e);
-         }
-      }
-   }
-
-   public void executeAction(final Action action, final ExecutionContext context) throws Exception
-   {
-      if ( isPageflow(context) )
-      {
-         action.execute(context);
-      }
-      else
-      {
-         new ContextualCall()
-         {
-            @Override
-            void process() throws Exception
-            {
-               initProcessAndTask(context);
-               action.execute(context);
-            }
-         }.run();
-      }
-   }
-
-   private boolean isPageflow(final ExecutionContext context)
-   {
-      return Contexts.isConversationContextActive() && 
-            Jbpm.instance().isPageflowProcessDefinition( context.getProcessDefinition().getName() );
-   }
-
-   public void executeAssignment(final AssignmentHandler handler, final Assignable assignable, 
-            final ExecutionContext context)
-            throws Exception
-   {
-      new ContextualCall()
-      {
-         @Override
-         void process() throws Exception
-         {
-            initProcessAndTask(context);
-            handler.assign(assignable, context);
-         }
-      }.run();
-   }
-
-   public void executeTaskControllerInitialization(final TaskControllerHandler handler, final TaskInstance task,
-            final ContextInstance context, final Token token)
-   {
-      new ContextualCall()
-      {
-         @Override
-         void process() throws Exception
-         {
-            initProcessAndTask(task);
-            handler.initializeTaskVariables(task, context, token);
-         }
-      }.runAndWrap();
-   }
-
-   public void executeTaskControllerSubmission(final TaskControllerHandler handler, final TaskInstance task,
-            final ContextInstance context, final Token token)
-   {
-      new ContextualCall()
-      {
-         @Override
-         void process() throws Exception
-         {
-            initProcessAndTask(task);
-            handler.submitTaskVariables(task, context, token);
-         }
-      }.runAndWrap();
-   }
-
-   private static void initProcessAndTask(ExecutionContext context)
-   {
-      BusinessProcess businessProcess = BusinessProcess.instance();
-      businessProcess.setProcessId( context.getProcessInstance().getId() );
-      TaskInstance taskInstance = context.getTaskInstance();
-      if (taskInstance!=null)
-      {
-         businessProcess.setTaskId( taskInstance.getId() );
-      }
-   }
-
-   private static void initProcessAndTask(TaskInstance task)
-   {
-      BusinessProcess businessProcess = BusinessProcess.instance();
-      businessProcess.setProcessId( task.getProcessInstance().getId() );
-      businessProcess.setTaskId( task.getId() );
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstance.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstance.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstance.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.util.Work;
-
-/**
- * A Seam component that allows injection of the current
- * jBPM TaskInstance.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at Name("org.jboss.seam.bpm.taskInstance")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class TaskInstance 
-{
-   
-   @Unwrap
-   public org.jbpm.taskmgmt.exe.TaskInstance getTaskInstance() throws Exception
-   {
-      if ( !Contexts.isConversationContextActive() ) return null;
-      
-      return new Work<org.jbpm.taskmgmt.exe.TaskInstance>()
-      {
-         
-         @Override
-         protected org.jbpm.taskmgmt.exe.TaskInstance work() throws Exception
-         {         
-            Long taskId = BusinessProcess.instance().getTaskId();
-            if (taskId!=null)
-            {
-               //TODO: do we need to cache this??
-               return ManagedJbpmContext.instance().getTaskInstanceForUpdate(taskId);
-            }
-            else
-            {
-               return null;
-            }
-         }
-         
-      }.workInTransaction();
-   }
-   
-   public static org.jbpm.taskmgmt.exe.TaskInstance instance()
-   {
-      if ( !Contexts.isConversationContextActive() || !BusinessProcess.instance().hasCurrentTask() ) return null; //so we don't start a txn
-      
-      return (org.jbpm.taskmgmt.exe.TaskInstance) Component.getInstance(TaskInstance.class, ScopeType.STATELESS);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstanceList.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstanceList.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstanceList.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,43 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.List;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.annotations.Unwrap;
-import org.jbpm.taskmgmt.exe.TaskInstance;
-
-/**
- * Support for the task list.
- * 
- * @see TaskInstanceListForType
- * @see PooledTask
- * @author <a href="mailto:steve at hibernate.org">Steve Ebersole</a>
- * @author Gavin King
- */
- at Name("org.jboss.seam.bpm.taskInstanceList")
- at Scope(APPLICATION)
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class TaskInstanceList
-{
-   
-   @Unwrap
-   @Transactional
-   public List<TaskInstance> getTaskInstanceList()
-   {
-      return getTaskInstanceList( Actor.instance().getId() );
-   }
-
-   private List<TaskInstance> getTaskInstanceList(String actorId)
-   {
-      if ( actorId == null ) return null;
-
-      return ManagedJbpmContext.instance().getTaskList(actorId);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstanceListForType.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstanceListForType.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstanceListForType.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.annotations.Unwrap;
-import org.jbpm.taskmgmt.exe.TaskInstance;
-
-/**
- * Support for a list of tasks of a particular type.
- * 
- * @see TaskInstanceList
- * @author Gavin King
- * @author <a href="mailto:steve at hibernate.org">Steve Ebersole </a>
- */
- at Name("org.jboss.seam.bpm.taskInstanceListForType")
- at Scope(APPLICATION)
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class TaskInstanceListForType
-{
-   
-   @Unwrap
-   @Transactional
-   public Map<String,List<TaskInstance>> getTaskInstanceList()
-   {
-      return getTaskInstanceList( Actor.instance().getId() );
-   }
-
-   private Map<String,List<TaskInstance>> getTaskInstanceList(String actorId)
-   {
-      if ( actorId == null ) return null;
-
-      Map<String, List<TaskInstance>> map = new HashMap<String, List<TaskInstance>>();
-      List<TaskInstance> taskInstances = ManagedJbpmContext.instance().getTaskList(actorId);
-      for ( TaskInstance task: taskInstances )
-      {
-         String name = task.getName();
-         List<TaskInstance> list = map.get(name);
-         if (list==null)
-         {
-            list = new ArrayList<TaskInstance>();
-            map.put(name, list);
-         }
-         list.add(task);
-      }
-      return map;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstancePriorityList.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstancePriorityList.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/TaskInstancePriorityList.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,55 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.List;
-
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.annotations.Unwrap;
-import org.jbpm.taskmgmt.exe.TaskInstance;
-
-/**
- * Support for a task list ordered by priority.
- * 
- * @see TaskInstanceList
- * @see PooledTask
- * @author Gavin King
- */
- at Name("org.jboss.seam.bpm.taskInstancePriorityList")
- at Scope(APPLICATION)
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class TaskInstancePriorityList
-{
-   
-   //TODO: we really need to cache the list in the event context,
-   //      but then we would need some events to refresh it
-   //      when tasks end, which is non-trivial to do....
-   
-   @Unwrap
-   @Transactional
-   public List<TaskInstance> getTaskInstanceList()
-   {
-      return getTaskInstanceList( Actor.instance().getId() );
-   }
-
-   private List<TaskInstance> getTaskInstanceList(String actorId)
-   {
-      if ( actorId == null ) return null;
-
-      return ManagedJbpmContext.instance().getSession()
-         .createCriteria(TaskInstance.class)
-         .add( Restrictions.eq("actorId", actorId) )
-         .add( Restrictions.eq("isOpen", true) )
-         .add( Restrictions.ne("isSuspended", true) )
-         .addOrder( Order.asc("priority") )
-         .setCacheable(true)
-         .list();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Transition.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Transition.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/Transition.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,63 +0,0 @@
-package org.jboss.seam.bpm;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.AbstractMutable;
-
-/**
- * Allows the application to set the jBPM transition to be used when
- * an <tt>@EndTask</tt> method is encountered.
- * 
- * @see org.jboss.seam.annotations.bpm.EndTask
- * 
- * @author Gavin King
- */
- at Name("org.jboss.seam.bpm.transition")
- at Scope(ScopeType.CONVERSATION)
- at BypassInterceptors
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
-public class Transition extends AbstractMutable implements Serializable 
-{
-   private static final long serialVersionUID = -3054558654376670239L;
-   
-   private String name;
-   
-   public String getName() 
-   {
-      return name;
-   }
-   
-   /**
-    * Set the jBPM transition name
-    */
-   public void setName(String name) 
-   {
-      setDirty(this.name, name);
-      this.name = name;
-   }
-   
-   public static Transition instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application context");
-      }
-      return (Transition) Component.getInstance(Transition.class, ScopeType.CONVERSATION);
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "Transition(" + name + ")";
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/jbpm.pageflow.cfg.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/jbpm.pageflow.cfg.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/jbpm.pageflow.cfg.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,3 +0,0 @@
-<pageflow-configuration>
-  <jbpm-context />
-</pageflow-configuration>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/bpm/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,17 +0,0 @@
-/**
- * A set of Seam components for business process management
- * via jBPM, including control of process and task instances,
- * rendering of task lists, and integration with jBPM.
- * 
- * The application may call components in this package
- * directly, or via EL, or may use them indirectly via
- * the annotations in org.jboss.seam.annotations.
- * 
- * @see org.jboss.seam.annotations.bpm
- */
- at Namespace(value="http://jboss.com/products/seam/bpm", prefix="org.jboss.seam.bpm")
- at AutoCreate
-package org.jboss.seam.bpm;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/AbstractJBossCacheProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/AbstractJBossCacheProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/AbstractJBossCacheProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,38 +0,0 @@
-package org.jboss.seam.cache;
-
-import org.jboss.cache.Fqn;
-
-public abstract class AbstractJBossCacheProvider<T> extends CacheProvider<T>
-{
-   
-   public AbstractJBossCacheProvider()
-   {
-      super.setConfiguration("treecache.xml");
-   }
-   
-   private Fqn defaultFqn;
-   
-   protected Fqn getFqn(String region)
-   {
-      if (region != null)
-      {
-         return Fqn.fromString(region);
-      }
-      else
-      {
-         if (defaultFqn == null)
-         {
-            defaultFqn = Fqn.fromString(getDefaultRegion());
-         }
-         return defaultFqn;
-      }
-   }
-   
-   @Override
-   public void setDefaultRegion(String defaultRegion)
-   {
-      super.setDefaultRegion(defaultRegion);
-      this.defaultFqn = Fqn.fromString(defaultRegion);
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/CacheProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/CacheProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/CacheProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,175 +0,0 @@
-package org.jboss.seam.cache;
-
-import java.io.InputStream;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.ResourceLoader;
-
-/**
- * CacheProvider provides methods to control and manipulate the configured cache
- * 
- * @author Sebastian Hennebrueder
- * @author Pete Muir
- */
-
-public abstract class CacheProvider<T>
-{
-
-   /**
-    * the region name to be used if no region is specified
-    */
-   public static final String DEFAULT_REGION = "org.jboss.seam.cache.DefaultRegion";
-   private String configuration;
-   private String defaultRegion = DEFAULT_REGION;
-
-   /**
-    * @return - the cache the cache provider delegates to
-    */
-   public abstract T getDelegate();
-
-   /**
-    * Get the configuration file used by the cache
-    * 
-    */
-   public String getConfiguration()
-   {
-      return this.configuration;
-   }
-
-   protected InputStream getConfigurationAsStream()
-   {
-      return ResourceLoader.instance().getResourceAsStream(getConfiguration());
-   }
-
-   /**
-    * Set the configuration file to be used by the cache
-    */
-   public void setConfiguration(String cfgResourceName)
-   {
-      this.configuration = cfgResourceName;
-   }
-
-   /**
-    * Fetches an object for the given key from the cache and returns it if
-    * found. Only the default cache region will be searched.
-    * 
-    * @param key - a key to identify the object.
-    * @return - the object if found or null if not
-    */
-   public Object get(String key)
-   {
-      return get(null, key);
-   }
-   
-   /**
-    * Fetches an object for the given key from the cache and returns it if
-    * found. Only the default cache region will be searched.
-    * 
-    * @param key - a key to identify the object.
-    * @param type - the type of the object to return
-    * @return - the object if found or null if not
-    */
-   public <E> E get(String key, E type)
-   {
-      return (E) get(null, key);
-   }
-
-   /**
-    * Fetches an object for the given key from the cache and returns it if
-    * found. Only the specified cache region will be searched.
-    * 
-    * @param region - the name of a cache region
-    * @param key - a key to identify the object.
-    * @return - the object if found or null if not
-    */
-   public abstract Object get(String region, String key);
-   
-   /**
-    * Fetches an object for the given key from the cache and returns it if
-    * found. Only the specified cache region will be searched.
-    * 
-    * @param region - the name of a cache region
-    * @param key - a key to identify the object.
-    * @param type - the type of object to return
-    * 
-    * @return - the object if found or null if not
-    */
-   public <E> E get(String region, String key, E type)
-   {
-      return (E) get(region, key);
-   }
-
-   /**
-    * Put an object into the cache. The object is placed in the default cache
-    * region under the given key.
-    * 
-    * @param key - a key to identify the object
-    * @param object - the object to be stored in the cache
-    */
-   public void put(String key, Object object)
-   {
-      put(null, key, object);
-   }
-
-   /**
-    * Puts an object into the cache. The object is placed in the specified cache
-    * region under the given key.
-    * 
-    * @param region - the name of a cache region
-    * @param key - a key to identify the object
-    * @param object - the object to be stored in the cache
-    */
-   public abstract void put(String region, String key, Object object);
-
-   /**
-    * Removes an object from the cache. The object is removed from the default
-    * cache region under the given key.
-    * 
-    * @param key - a key to identify the object
-    */
-   public void remove(String key)
-   {
-      remove(null, key);
-   }
-
-   /**
-    * Removes an object from the cache. The object is removed from the specified
-    * cache region under the given key.
-    * 
-    * @param region - the name of a cache region
-    * @param key - a key to identify the object
-    */
-   public abstract void remove(String region, String key);
-
-   /**
-    * Removes all objects from all cache regions
-    */
-   public abstract void clear();
-
-   public String getDefaultRegion()
-   {
-      return defaultRegion;
-   }
-
-   public void setDefaultRegion(String defaultRegion)
-   {
-      this.defaultRegion = defaultRegion;
-   }
-
-   public static CacheProvider instance()
-   {
-      if (!Contexts.isApplicationContextActive())
-      {
-         throw new IllegalStateException("No active application scope");
-      }
-      return (CacheProvider) Component.getInstance("org.jboss.seam.cache.cacheProvider", ScopeType.APPLICATION);
-   }
-
-   public static <T> CacheProvider<T> instance(Class<? extends T> type)
-   {
-      return instance();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/EhCacheProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/EhCacheProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/EhCacheProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,139 +0,0 @@
-package org.jboss.seam.cache;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-import static org.jboss.seam.ScopeType.APPLICATION;
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.CacheManager;
-import net.sf.ehcache.Element;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Implementation of CacheProvider backed by EhCache. The default cache region
- * issues <i>org.jboss.seam.cache.DefaultCache</> as the default cache region.
- * 
- * @author Sebastian Hennebrueder
- * @author Pete Muir
- */
- at Name("org.jboss.seam.cache.cacheProvider")
- at Scope(APPLICATION)
- at BypassInterceptors
- at Install(value = false, precedence = BUILT_IN, classDependencies="net.sf.ehcache.Cache")
- at AutoCreate
-public class EhCacheProvider extends CacheProvider<CacheManager>
-{
-
-   private CacheManager cacheManager;
-
-   private static final LogProvider log = Logging.getLogProvider(EhCacheProvider.class);
-
-   @Override
-   public CacheManager getDelegate()
-   {
-      return cacheManager;
-   }
-
-   @Override
-   public void put(String region, String key, Object object)
-   {
-      Cache cache = getCacheRegion(region);
-      Element element = new Element(key, object);
-      cache.put(element);
-   }
-
-   @Override
-   public void clear()
-   {
-      String[] strings = cacheManager.getCacheNames();
-      for (String cacheName : strings)
-      {
-         Cache cache = getCacheRegion(cacheName);
-         cache.removeAll();
-      }
-   }
-
-   @Override
-   public Object get(String region, String key)
-   {
-      Cache cache = getCacheRegion(region);
-      Element element = cache.get(key);
-      if (element != null)
-      {
-         return element.getObjectValue();
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   private net.sf.ehcache.Cache getCacheRegion(String regionName)
-   {
-      if (regionName == null)
-      {
-         regionName = getDefaultRegion();
-      }
-      Cache result = cacheManager.getCache(regionName);
-      if (result == null)
-      {
-          log.debug("Could not find configuration for region [" + regionName + "]; using defaults.");
-          cacheManager.addCache(regionName);
-          result = cacheManager.getCache(regionName);
-          log.debug("EHCache region created: " + regionName); 
-      }
-      return result;
-   }
-
-   @Override
-   public void remove(String region, String key)
-   {
-      Cache cache = getCacheRegion(region);
-      cache.remove(key);
-   }
-
-   @Create
-   public void create()
-   {
-      log.debug("Starting EhCacheProvider cache");
-      try
-      {
-         if (getConfiguration() != null)
-         {
-            cacheManager = new CacheManager(getConfigurationAsStream());
-         }
-         else
-         {
-            cacheManager = new CacheManager();
-         }
-      }
-      catch (net.sf.ehcache.CacheException e)
-      {
-         throw new IllegalStateException("Error starting EHCache Cache", e);
-      }
-   }
-
-   @Destroy
-   public void destroy()
-   {
-      log.debug("Stopping EhCacheProvider cache");
-
-      try
-      {
-         cacheManager.shutdown();
-         cacheManager = null;
-      }
-      catch (RuntimeException e)
-      {
-         throw new IllegalStateException("Error stopping EHCache Cache", e);
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossCache2Provider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossCache2Provider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossCache2Provider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,113 +0,0 @@
-package org.jboss.seam.cache;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.lang.reflect.Method;
-
-import org.jboss.cache.Cache;
-import org.jboss.cache.CacheFactory;
-import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.Fqn;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Reflections;
-
-/**
- * Implementation of CacheProvider backed by JBoss Cache 2.x. for simple
- * objects.
- * 
- * @author Sebastian Hennebrueder
- * @author Pete Muir
- */
-
- at Name("org.jboss.seam.cache.cacheProvider")
- at Scope(APPLICATION)
- at BypassInterceptors
- at Install(value = false, precedence = BUILT_IN, classDependencies = {"org.jboss.cache.Cache", "org.jgroups.MembershipListener"})
- at AutoCreate
-public class JbossCache2Provider 
-    extends AbstractJBossCacheProvider<Cache> 
-{
-
-    private org.jboss.cache.Cache cache;
-
-    private static final LogProvider log = Logging.getLogProvider(JbossCache2Provider.class);
-
-    private static Method GET;
-    private static Method PUT;
-    private static Method REMOVE;
-    private static Method REMOVE_NODE;
-
-    static {
-        try {
-            GET = Cache.class.getDeclaredMethod("get", Fqn.class, Object.class);
-            PUT = Cache.class.getDeclaredMethod("put", Fqn.class, Object.class, Object.class);
-            REMOVE = Cache.class.getDeclaredMethod("remove", Fqn.class, Object.class);
-            REMOVE_NODE = Cache.class.getDeclaredMethod("removeNode", Fqn.class);
-        } catch (Exception e) {
-            throw new IllegalStateException("Unable to use JBoss Cache 2", e);
-        }
-    }
-
-    @Create
-    public void create() {
-        log.debug("Starting JBoss Cache");
-
-        try {
-            CacheFactory factory = new DefaultCacheFactory();
-            cache = factory.createCache(getConfigurationAsStream());
-
-            cache.create();
-            cache.start();
-        } catch (Exception e) {
-            //log.error(e, e);
-            throw new IllegalStateException("Error starting JBoss Cache", e);
-        }
-    }
-
-    @Destroy
-    public void destroy() {
-        log.debug("Stopping JBoss Cache");
-        try {
-            cache.stop();
-            cache.destroy();
-            cache = null;
-        } catch (Exception e) {
-            throw new IllegalStateException("Error stopping JBoss Cache", e);
-        }
-    }
-
-    @Override
-    public Object get(String region, String key) {
-        return Reflections.invokeAndWrap(GET, cache, getFqn(region), key);
-    }
-
-    @Override
-    public void put(String region, String key, Object object) {
-        Reflections.invokeAndWrap(PUT, cache, getFqn(region), key, object);
-    }
-
-    @Override
-    public void remove(String region, String key) {
-        Reflections.invokeAndWrap(REMOVE, cache, getFqn(region), key);
-    }
-
-    @Override
-    public void clear() {
-        Reflections.invokeAndWrap(REMOVE_NODE, cache, getFqn(null));
-    }
-
-    @Override
-    public Cache getDelegate() {
-        return cache;
-    }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossCacheProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossCacheProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossCacheProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,142 +0,0 @@
-package org.jboss.seam.cache;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.cache.CacheException;
-import org.jboss.cache.Node;
-import org.jboss.cache.PropertyConfigurator;
-import org.jboss.cache.TreeCache;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Implementation of CacheProvider backed by JBoss Cache 1.x
- * 
- * @author Sebastian Hennebrueder
- * @author Pete Muir
- */
-
- at Name("org.jboss.seam.cache.cacheProvider")
- at Scope(APPLICATION)
- at BypassInterceptors
- at Install(precedence = BUILT_IN, classDependencies={"org.jboss.cache.TreeCache", "org.jgroups.MembershipListener"})
- at AutoCreate
-public class JbossCacheProvider extends AbstractJBossCacheProvider<TreeCache>
-{
-
-   private TreeCache cache;
-
-   private static final LogProvider log = Logging.getLogProvider(JbossCacheProvider.class);
-
-   @Create
-   public void create()
-   {
-      log.debug("Starting JBoss Treecache 1.x");
-
-      try
-      {
-         cache = new TreeCache();
-         new PropertyConfigurator().configure(cache, getConfigurationAsStream());
-         cache.createService();
-         cache.startService();
-
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Error starting JBoss Treecache 1.x", e);
-      }
-   }
-
-   @Destroy
-   public void destroy()
-   {
-      log.debug("Stopping JBoss Treecache 1.x");
-
-      try
-      {
-         cache.stopService();
-         cache.destroyService();
-      }
-      catch (RuntimeException e)
-      {
-         throw new IllegalStateException("Error stopping JBoss Treecache 1.x", e);
-      }
-      cache = null;
-   }
-
-   @Override
-   public Object get(String region, String key)
-   {
-      try
-      {
-         Node node = cache.get(getFqn(region));
-         if (node != null)
-         {
-            return node.get(key);
-         }
-         else
-         {
-            return null;
-         }
-      }
-      catch (CacheException e)
-      {
-         throw new IllegalStateException(String.format("Cache throw exception when trying to get %s from region %s.", key, region), e);
-      }
-   }
-
-   @Override
-   public void put(String region, String key, Object object)
-   {
-      try
-      {
-         cache.put(getFqn(region), key, object);
-      }
-      catch (CacheException e)
-      {
-         throw new IllegalStateException(String.format("JBoss Cache throw exception when adding object for key %s to region %s", key, region), e);
-      }
-   }
-
-   @Override
-   public void remove(String region, String key)
-   {
-      try
-      {
-         cache.remove(getFqn(region), key);
-      }
-      catch (CacheException e)
-      {
-         throw new IllegalStateException(String.format("JBoss Cache throw exception when removing object for key %s in region %s", key, region), e);
-      }
-
-   }
-
-   @Override
-   public TreeCache getDelegate()
-   {
-      return cache;
-   }
-
-   @Override
-   public void clear()
-   {
-      try
-      {
-         cache.remove(getFqn(null));
-      }
-      catch (CacheException e)
-      {
-         throw new IllegalStateException(String.format("JBoss Cache throw exception when clearing default cache."), e);
-      }
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossPojoCacheProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossPojoCacheProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/JbossPojoCacheProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,135 +0,0 @@
-package org.jboss.seam.cache;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.cache.CacheException;
-import org.jboss.cache.Node;
-import org.jboss.cache.aop.PojoCache;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Implementation of CacheProvider backed by JBoss POJO Cache 1.x
- * 
- * @author Sebastian Hennebrueder
- * @author Pete Muir
- */
-
- at Name("org.jboss.seam.cache.cacheProvider")
- at Scope(APPLICATION)
- at BypassInterceptors
- at Install(value = false, precedence = BUILT_IN, classDependencies={"org.jboss.cache.aop.PojoCache", "org.jgroups.MembershipListener", "org.jboss.aop.Dispatcher"})
- at AutoCreate
-public class JbossPojoCacheProvider extends AbstractJBossCacheProvider<PojoCache>
-{
-
-   private PojoCache cache;
-
-   private static final LogProvider log = Logging.getLogProvider(JbossPojoCacheProvider.class);
-
-   @Create
-   public void create()
-   {
-      log.debug("Starting JBoss POJO Cache 1.x");
-
-      try
-      {
-         cache = new PojoCache();
-         new org.jboss.cache.PropertyConfigurator().configure(cache, getConfigurationAsStream());
-         cache.createService();
-         cache.startService();
-
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Error starting JBoss POJO Cache 1.x", e);
-      }
-   }
-
-   @Destroy
-   public void destroy()
-   {
-      log.debug("Stopping JBoss Treecache 1.x");
-
-      try
-      {
-         cache.stopService();
-         cache.destroyService();
-      }
-      catch (RuntimeException e)
-      {
-         throw new IllegalStateException("Error stopping JBoss Treecache 1.x", e);
-      }
-      cache = null;
-   }
-
-    @Override
-    public Object get(String region, String key) {
-        try {
-            Node node = cache.get(getFqn(region));
-            if (node != null) {
-                return node.get(key);
-            } else {
-                return null;
-            }
-        } catch (CacheException e) {
-            throw new IllegalStateException(String.format("Cache throw exception when trying to get %s from region %s.",                                    key, region), e);
-        }
-    }
-
-
-   @Override
-   public void put(String region, String key, Object object)
-   {
-      try
-      {
-         cache.put(getFqn(region), key, object);
-      }
-      catch (CacheException e)
-      {
-         throw new IllegalStateException(String.format("JBoss Cache throw exception when adding object for key %s to region %s", key, region), e);
-      }
-   }
-
-   @Override
-   public void remove(String region, String key)
-   {
-      try
-      {
-         cache.remove(getFqn(region), key);
-      }
-      catch (CacheException e)
-      {
-         throw new IllegalStateException(String.format("JBoss Cache throw exception when removing object for key %s in region %s", key, region), e);
-      }
-
-   }
-
-   @Override
-   public PojoCache getDelegate()
-   {
-      return cache;
-   }
-
-   @Override
-   public void clear()
-   {
-      try
-      {
-         cache.remove(getFqn(null));
-      }
-      catch (CacheException e)
-      {
-         throw new IllegalStateException(String.format("JBoss Cache throw exception when clearing default cache."), e);
-      }
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/cache/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,9 +0,0 @@
-/**
- * A set of Seam components that provide caching
- */
- at Namespace(value="http://jboss.com/products/seam/cache", prefix="org.jboss.seam.cache")
- at AutoCreate
-package org.jboss.seam.cache;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/Captcha.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/Captcha.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/Captcha.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,152 +0,0 @@
-package org.jboss.seam.captcha;
-
-import java.awt.Color;
-import java.awt.Graphics;
-import java.awt.image.BufferedImage;
-import java.io.Serializable;
-import java.util.Random;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Default CAPTCHA algorithm, a simple addition problem. May be
- * extended and customized.
- * 
- * @author Gavin King
- *
- */
- at Name("org.jboss.seam.captcha.captcha")
- at Scope(ScopeType.SESSION)
- at Install(precedence=Install.BUILT_IN)
- at BypassInterceptors
-public class Captcha implements Serializable
-{
-   private static Random random = new Random( System.currentTimeMillis() );
-   
-   private String correctResponse;
-   private String challenge;
-   private String response;
-   
-   /**
-    * Initialize the challenge and correct response.
-    * May be overridden and customized by a subclass.
-    */
-   @Create
-   public void init()
-   {
-       int x = random.nextInt(50);
-       int y = random.nextInt(50);
-       setCorrectResponse( Integer.toString( x + y ) );
-       setChallenge( Integer.toString(x) + " + " + Integer.toString(y) + " =" );
-   }
-   
-   /**
-    * Set the challenge question
-    */
-   protected void setChallenge(String challenge) 
-   {
-       this.challenge = challenge;
-   }
-   
-   /**
-    * Get the challenge question
-    */
-   protected String getChallenge()
-   {
-       return challenge;
-   }
-   
-   /**
-    * Set the correct response
-    */
-   protected void setCorrectResponse(String correctResponse) 
-   {
-       this.correctResponse = correctResponse;
-   }
-   
-   /**
-    * Validate that the entered response is the correct
-    * response
-    */
-   public boolean validateResponse(String response)
-   {
-      boolean valid = response!=null && 
-                      correctResponse!=null && 
-                      response.trim().equals(correctResponse);
-      if (!valid) 
-      {
-         init();
-      }
-      return valid;
-   }
-   
-   @CaptchaResponse
-   public String getResponse()
-   {
-      return response;
-   }
-
-   public void setResponse(String input)
-   {
-      this.response = input;
-   }
-   
-   /**
-    * Render the challenge question as an image.
-    * May be overridden by subclasses to achieve
-    * a stronger CAPTCHA.
-    */
-   public BufferedImage renderChallenge() 
-   {
-      BufferedImage challenge = new BufferedImage(70, 20, BufferedImage.TYPE_BYTE_GRAY);
-      Graphics graphics = challenge.getGraphics();
-      graphics.setColor( getChallengeBackgroundColor() );
-      graphics.fillRect(0, 0, getChallengeImageWidth(), 20);
-      graphics.setColor( getChallengeTextColor() );
-      graphics.drawString( getChallenge(), 5, 15 );
-      return challenge;
-   }
-
-   /**
-    * May be overridden by subclasses
-    * @return the width, in pixels, of the challenge question
-    */
-   protected int getChallengeImageWidth() {
-      return 70;
-   }
-   
-   /**
-    * May be overridden by subclasses
-    * @return the background color of the challenge image
-    */
-   protected Color getChallengeBackgroundColor()
-   {
-      return Color.WHITE;
-   }
-
-   /**
-    * May be overridden by subclasses
-    * @return @return the foreground color of the challenge image
-    */
-   protected Color getChallengeTextColor() 
-   {
-      return Color.BLACK;
-   }
-   
-   public static Captcha instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No session context active");
-      }
-      return (Captcha) Component.getInstance(Captcha.class, ScopeType.SESSION);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaImage.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaImage.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaImage.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,72 +0,0 @@
-package org.jboss.seam.captcha;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.web.AbstractResource;
-
-/**
- * Serves CAPTCHA images
- * 
- * @author Shane Bryzak
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.captcha.captchaImage")
- at BypassInterceptors
- at Install(precedence = BUILT_IN)
-public class CaptchaImage extends AbstractResource
-{   
-   public static CaptchaImage instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No application context active");
-      }
-      return (CaptchaImage) Contexts.getApplicationContext().get(CaptchaImage.class);
-   }
-
-   @Override
-   public String getResourcePath()
-   {
-      return "/captcha";
-   }
-   
-   @Override
-   public void getResource(HttpServletRequest request, HttpServletResponse response)
-       throws IOException
-   {
-      ByteArrayOutputStream out = new ByteArrayOutputStream();
-
-      ServletLifecycle.beginRequest(request,getServletContext());         
-      try
-      {
-         ImageIO.write( Captcha.instance().renderChallenge(), "jpeg", out );
-      }
-      finally
-      {
-         ServletLifecycle.endRequest(request);
-      }
-
-      response.setHeader("Cache-Control", "no-cache");
-      response.setHeader("Pragma", "no-cache");
-      response.setHeader("Expires", "0");
-      response.setContentType("image/jpeg");
-      response.getOutputStream().write( out.toByteArray() );
-      response.getOutputStream().flush();
-      response.getOutputStream().close();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaResponse.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaResponse.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaResponse.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,18 +0,0 @@
-package org.jboss.seam.captcha;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.validation.Constraint;
-
- at Retention(RetentionPolicy.RUNTIME)
- at Documented
- at Target(ElementType.METHOD)
- at Constraint(validatedBy=CaptchaResponseValidator.class)
-public @interface CaptchaResponse 
-{
-   String message() default "incorrect response";
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaResponseValidator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaResponseValidator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/CaptchaResponseValidator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,30 +0,0 @@
-package org.jboss.seam.captcha;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * Validates that the input entered by the user matches
- * the captcha image.
- * 
- * @author Gavin King
- * @author Marek Novotny
- *
- */
-public class CaptchaResponseValidator implements ConstraintValidator<CaptchaResponse,String>
-{
-
-   public void initialize(CaptchaResponse constraintAnnotation)   {   }
-
-   public boolean isValid(String value, ConstraintValidatorContext context)
-   {
-      boolean result = Captcha.instance().validateResponse(value);
-      if (!result)
-      {
-         context.disableDefaultConstraintViolation();
-         context.buildConstraintViolationWithTemplate("org.jboss.seam.captcha.error").addConstraintViolation();
-      }
-      return result;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/captcha/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * A simple CAPTCHA algorithm that supports customization
- */
- at Namespace(value="http://jboss.com/products/seam/captcha", prefix="org.jboss.seam.captcha")
-package org.jboss.seam.captcha;
-
-import org.jboss.seam.annotations.Namespace;
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/AbstractEntityBeanCollection.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/AbstractEntityBeanCollection.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/AbstractEntityBeanCollection.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,64 +0,0 @@
-package org.jboss.seam.contexts;
-
-abstract class AbstractEntityBeanCollection implements Wrapper
-{
-   private transient boolean initialized;
-   
-   protected AbstractEntityBeanCollection()
-   {
-      initialized = true;
-   }
-   
-   public final void activate()
-   {
-      if ( isPassivatedEntitiesInitialized() && isAnyVersioned() )
-      {
-         activateAll();
-         initialized = true;
-      }
-      else
-      {
-         initialized = false;
-      }
-   }
-
-   public final Object getInstance()
-   {
-      if ( !initialized && isPassivatedEntitiesInitialized() )
-      {
-         activateAll();
-      }
-      initialized = true;
-      return getEntityCollection();
-   }
-   
-   public final boolean passivate()
-   {
-      if ( PassivatedEntity.isTransactionRolledBackOrMarkedRollback() )
-      {
-         clearPassivatedEntities();
-      }
-      else
-      {
-         passivateAll();
-      }
-      return true;
-   }
-
-   private boolean isAnyVersioned()
-   {
-      for ( PassivatedEntity passivatedEntity: getPassivatedEntities() )
-      {
-         if ( passivatedEntity!=null && passivatedEntity.isVersioned() ) return true;
-      }
-      return false;
-   }
-   
-   protected abstract void activateAll();
-   protected abstract void passivateAll();
-   protected abstract Iterable<PassivatedEntity> getPassivatedEntities();
-   protected abstract void clearPassivatedEntities();
-   protected abstract boolean isPassivatedEntitiesInitialized();
-   protected abstract Object getEntityCollection();
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ApplicationContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ApplicationContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ApplicationContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.Map;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Application context - state associated with a 
- * deployment to a particular node. State is typically
- * neither persistent across deployments, not 
- * replicated to other nodes.
- * 
- * @author Gavin King
- */
-public class ApplicationContext extends BasicContext 
-{
-   
-   public ApplicationContext(Map<String, Object> map)
-   {
-      super(ScopeType.APPLICATION, map);
-   }
-  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/BasicContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/BasicContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/BasicContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,96 +0,0 @@
-//$Id: BasicContext.java 10438 2009-04-17 21:33:42Z norman.richards at jboss.com $
-package org.jboss.seam.contexts;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.core.Events;
-
-/**
- * A basic implementation of Context that keeps the state 
- * in a Map.
- * 
- * @author Gavin King
- */
-public class BasicContext implements Context
-{
-   
-   private final Map<String, Object> map;
-   private final ScopeType scope;
-   
-   public BasicContext(ScopeType scope)
-   {
-      this.scope = scope;
-      this.map = new HashMap<String, Object>();
-   }
-
-   protected BasicContext(ScopeType scope, Map<String, Object> map)
-   {
-      this.scope = scope;
-      this.map = map;
-   }
-
-   public ScopeType getType()
-   {
-      return scope;
-   }
-
-   public Object get(Class clazz)
-   {
-      return get( Component.getComponentName(clazz) );
-   }
-
-   public Object get(String name)
-   {
-      return map.get(name);
-   }
-
-   public String[] getNames()
-   {
-      // yes, I know about the toArray() method,
-      // but there is a bug in the RI!
-      // XXX - what bug?
-      ArrayList<String> keys = new ArrayList<String>();
-      for (String key : map.keySet())
-      {
-         keys.add(key);
-      }
-      return keys.toArray(new String[keys.size()]);
-   }
-
-   public boolean isSet(String name)
-   {
-      return map.containsKey(name);
-   }
-
-   public void remove(String name)
-   {
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
-      map.remove(name);
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
-   }
-
-   public void set(String name, Object value)
-   {
-      // We can't raise a preSetVariable event for Events itself because it doesn't exist yet...
-      if ( !Seam.getComponentName(Events.class).equals(name) && Events.exists() ) 
-      {
-         Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
-      }
-      map.put(name, value);
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
-   }
-
-   public void flush() {}
-
-   @Override
-   public String toString()
-   {
-      return "BasicContext(" + scope + ")";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/BusinessProcessContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/BusinessProcessContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/BusinessProcessContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,245 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.bpm.ProcessInstance;
-import org.jboss.seam.bpm.TaskInstance;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jbpm.context.exe.ContextInstance;
-
-/**
- * Exposes a jbpm variable context instance for reading/writing.
- *
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @author <a href="mailto:steve at hibernate.org">Steve Ebersole</a>
- * @author Gavin King
- */
-public class BusinessProcessContext implements Context 
-{
-
-   private static final LogProvider log = Logging.getLogProvider(BusinessProcessContext.class);
-
-   private final Map<String, Object> additions = new HashMap<String, Object>();
-   private final Set<String> removals = new HashSet<String>();
-   private final boolean enabled;
-
-   public ScopeType getType()
-   {
-      return ScopeType.BUSINESS_PROCESS;
-   }
-
-   public BusinessProcessContext()
-   {
-      Init init = Init.instance();
-      if (init == null)
-      {
-         enabled = false;
-      }
-      else
-      {
-         enabled = init.isJbpmInstalled();
-      }
-   }
-   
-   public Object get(String name) 
-   {
-      
-      Object result = additions.get(name);
-      if (result!=null) return result;
-      if ( removals.contains(name) ) return null;
-      
-      org.jbpm.taskmgmt.exe.TaskInstance taskInstance = getTaskInstance();
-      if (taskInstance==null)
-      {
-         ContextInstance context = getContextInstance();
-         return context==null ? null : context.getVariable(name);
-      }
-      else
-      {
-         return taskInstance.getVariable(name);
-      }
-      
-   }
-
-   public void set(String name, Object value) 
-   {
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
-      if (value==null)
-      {
-         //yes, we need this
-         remove(name);
-      }
-      else
-      {
-         removals.remove(name);
-         additions.put(name, value);
-      }
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
-   }
-
-   public boolean isSet(String name) 
-   {
-      return get(name)!=null;
-   }
-   
-   public void remove(String name) 
-   {
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
-      additions.remove(name);
-      removals.add(name);
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
-   }
-
-   public String[] getNames() 
-   {
-      Set<String> results = getNamesFromContext();
-      results.removeAll(removals);
-      results.addAll( additions.keySet() ); //after, to override
-      return results.toArray(new String[]{});
-   }
-
-   private Set<String> getNamesFromContext() 
-   {
-       //TODO: note that this is called from Contexts.destroy(), 
-       //      after the Seam-managed txn was committed, but 
-       //      this implementation requires a hit to the database!
-       HashSet<String> results = new HashSet<String>();
-       org.jbpm.taskmgmt.exe.TaskInstance taskInstance = getTaskInstance();
-       if (taskInstance==null) {
-           ContextInstance context = getContextInstance();
-           if (context!=null) {
-               Map variables = context.getVariables();
-               if (variables != null) {
-                   results.addAll(variables.keySet());
-               }
-           }
-       } else {
-           results.addAll( taskInstance.getVariables().keySet() );
-       }
-       return results;
-   }
-
-   public Object get(Class clazz)
-   {
-      return get( Component.getComponentName(clazz) );
-   }
-   
-   public void clear()
-   {
-      additions.clear();
-      removals.addAll( getNamesFromContext() );
-   }
-
-   /**
-    * Propagate all additions and removals to the jBPM database if
-    * there is a current process instance, or do nothing if there
-    * is no current process instance.
-    */
-   public void flush()
-   {
-      if ( !additions.isEmpty() || !removals.isEmpty() )
-      {
-         
-         org.jbpm.taskmgmt.exe.TaskInstance taskInstance = getTaskInstance();
-         if (taskInstance==null)
-         {
-            org.jbpm.graph.exe.ProcessInstance processInstance = getProcessInstance();
-            if ( processInstance==null )
-            {
-               log.debug( "no process instance to persist business process state" );
-               return; //don't clear the additions and removals
-            }
-            else 
-            {
-               flushToProcessInstance(processInstance);
-            }
-         }
-         else
-         {
-            flushToTaskInstance(taskInstance);
-         }
-         
-         additions.clear();
-         removals.clear();
-         
-      }
-      
-   }
-
-   private void flushToTaskInstance(org.jbpm.taskmgmt.exe.TaskInstance taskInstance)
-   {
-      log.debug( "flushing to task instance: " + taskInstance.getId() );
-      
-      for ( Map.Entry<String, Object> entry: additions.entrySet() )
-      {
-         taskInstance.setVariableLocally( entry.getKey(), entry.getValue() );
-      }
-
-      for ( String name: removals )
-      {
-         taskInstance.deleteVariableLocally(name);
-      }
-   }
-
-   private void flushToProcessInstance(org.jbpm.graph.exe.ProcessInstance processInstance)
-   {
-      log.debug( "flushing to process instance: " + processInstance.getId() );
-  
-      ContextInstance contextInstance = processInstance.getContextInstance();
-  
-      for ( Map.Entry<String, Object> entry: additions.entrySet() )
-      {
-         contextInstance.setVariable( entry.getKey(), entry.getValue() );
-      }
-  
-      for ( String name: removals )
-      {
-         contextInstance.deleteVariable(name);
-      }
-   }
-
-   private ContextInstance getContextInstance()
-   {
-      org.jbpm.graph.exe.ProcessInstance processInstance = getProcessInstance();
-      return processInstance==null ? null : processInstance.getContextInstance(); 
-   }
-
-   private org.jbpm.graph.exe.ProcessInstance getProcessInstance()
-   {
-      if (!enabled)
-      {
-         return null;
-      }
-      else
-      {
-         return ProcessInstance.instance();
-      }
-   }
-   
-   private org.jbpm.taskmgmt.exe.TaskInstance getTaskInstance()
-   {
-      if (!enabled)
-      {
-         return null;
-      }
-      else
-      {
-         return TaskInstance.instance();
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Context.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Context.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Context.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * API for accessing named components and named values that
- * are currently associated with a particular seam scope.
- * 
- * @author Gavin King
- */
-public interface Context 
-{
-   /**
-    * Get a value by name.
-    */
-   public Object get(String name);
-   /**
-    * Get a component instance, by its component name,
-    * as determined by the @Name annotation value.
-    */
-   public Object get(Class clazz);
-   /**
-    * Set a value.
-    */
-   public void set(String name, Object value);
-   /**
-    * Unset a value.
-    */
-   public void remove(String name);
-   /**
-    * Is the value set?
-    */
-   public boolean isSet(String name);
-   /**
-    * Get all names defined in the context. 
-    */
-   public String[] getNames();
-   /**
-    * Force synchronization to the underlying state store.
-    *
-    * Some implementations of Context "persist" state back to
-    * the underlying store synchronously, others asynchronously.
-    * This method is usually called by Seam, when necessary.
-    */
-   public void flush();
-   /**
-    * Get the scope that this context object is associated with,
-    */
-   public ScopeType getType();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Contexts.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Contexts.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Contexts.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,426 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.Map;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.bpm.BusinessProcess;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.core.Mutable;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.web.Session;
-
-/**
- * Provides access to the current contexts associated with the thread.
- * 
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class Contexts 
-{
-
-   private static final LogProvider log = Logging.getLogProvider(Contexts.class);
-
-   static final ThreadLocal<Context> applicationContext = new ThreadLocal<Context>();
-   static final ThreadLocal<Context> methodContext = new ThreadLocal<Context>();
-   static final ThreadLocal<Context> eventContext = new ThreadLocal<Context>();
-   static final ThreadLocal<Context> pageContext = new ThreadLocal<Context>();
-   static final ThreadLocal<Context> sessionContext = new ThreadLocal<Context>();
-   static final ThreadLocal<Context> conversationContext = new ThreadLocal<Context>();
-   static final ThreadLocal<Context> businessProcessContext = new ThreadLocal<Context>();
-
-   public static Context getEventContext() 
-   {
-      return eventContext.get();
-   }
-
-   public static Context getMethodContext() 
-   {
-      return methodContext.get();
-   }
-
-   public static Context getPageContext() 
-   {
-      return pageContext.get();
-   }
-
-   public static Context getSessionContext() 
-   {
-      return sessionContext.get();
-   }
-
-   public static Context getApplicationContext() 
-   {
-      return applicationContext.get();
-   }
-
-   public static Context getConversationContext() 
-   {
-      return conversationContext.get();
-   }
-
-   public static Context getBusinessProcessContext() 
-   {
-      return businessProcessContext.get();
-   }
-
-   public static boolean isConversationContextActive() 
-   {
-      return getConversationContext() != null;
-   }
-
-   public static boolean isEventContextActive() 
-   {
-      return eventContext.get() != null;
-   }
-
-   public static boolean isMethodContextActive() 
-   {
-      return methodContext.get() != null;
-   }
-
-   public static boolean isPageContextActive() 
-   {
-      return pageContext.get() != null;
-   }
-
-   public static boolean isSessionContextActive() 
-   {
-      return sessionContext.get() != null;
-   }
-
-   public static boolean isApplicationContextActive() 
-   {
-      return applicationContext.get() != null;
-   }
-
-    public static boolean isBusinessProcessContextActive() 
-    {
-        return businessProcessContext.get() != null;
-    }
-   
-    /**
-     * Remove the named component from all contexts.
-     */
-   public static void removeFromAllContexts(String name)
-   {
-      log.debug("removing from all contexts: " + name);
-      if (isMethodContextActive())
-      {
-         getMethodContext().remove(name);
-      }
-      if (isEventContextActive())
-      {
-         getEventContext().remove(name);
-      }
-      if (isPageContextActive())
-      {
-         getPageContext().remove(name);
-      }
-      if (isConversationContextActive())
-      {
-         getConversationContext().remove(name);
-      }
-      if (isSessionContextActive())
-      {
-         getSessionContext().remove(name);
-      }
-      if (isBusinessProcessContextActive())
-      {
-         getBusinessProcessContext().remove(name);
-      }
-      if (isApplicationContextActive())
-      {
-         getApplicationContext().remove(name);
-      }
-   }
-
-   /**
-    * Search for a named attribute in all contexts, in the
-    * following order: method, event, page, conversation,
-    * session, business process, application.
-    * 
-    * @return the first component found, or null
-    */
-   public static Object lookupInStatefulContexts(String name)
-   {
-      if (isMethodContextActive())
-      {
-         Object result = getMethodContext().get(name);
-         if (result!=null)
-         {
-             if ( log.isTraceEnabled() ) log.trace("found in method context: " + name);
-            return result;
-         }
-      }
-      
-      if (isEventContextActive())
-      {
-         Object result = getEventContext().get(name);
-         if (result!=null)
-         {
-             if ( log.isTraceEnabled() ) log.trace("found in event context: " + name);
-            return result;
-         }
-      }
-      
-      if ( isPageContextActive() )
-      {
-         Object result = getPageContext().get(name);
-         if (result!=null)
-         {
-             if ( log.isTraceEnabled() ) log.trace("found in page context: " + name);
-            return result;
-         }
-      }
-      
-      if (isConversationContextActive())
-      {
-         Object result = getConversationContext().get(name);
-         if (result!=null)
-         {
-             if ( log.isTraceEnabled() ) log.trace("found in conversation context: " + name);
-            return result;
-         }
-      }
-      
-      if (isSessionContextActive())
-      {
-         Object result = getSessionContext().get(name);
-         if (result!=null)
-         {
-             if ( log.isTraceEnabled() ) log.trace("found in session context: " + name);
-            return result;
-         }
-      }
-      
-      if (isBusinessProcessContextActive())
-      {
-         Object result = getBusinessProcessContext().get(name);
-         if (result!=null)
-         {
-             if ( log.isTraceEnabled() ) log.trace("found in business process context: " + name);
-            return result;
-         }
-      }
-      
-      if (isApplicationContextActive())
-      {
-         Object result = getApplicationContext().get(name);
-         if (result!=null)
-         {
-             if ( log.isTraceEnabled() ) log.trace("found in application context: " + name);
-            return result;
-         }
-      }
-      
-      return null;
-      
-   }
-   
-   /**
-    * Destroy all components in the given context
-    */
-   static void destroy(Context context)
-   {
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preDestroyContext." + context.getType().toString());
-      
-      Lifecycle.startDestroying();
-      try
-      {
-         for ( String name: context.getNames() ) 
-         {
-            Component component = Component.forName(name);
-            log.debug("destroying: " + name);
-            if ( component!=null )
-            {
-               Object object = context.get(name);
-               if (object!=null) //in a portal environment, this is possible
-               {
-                  if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preDestroy." + name);
-                  component.destroy(object);
-               }
-            }
-         }
-      }
-      finally
-      {
-         Lifecycle.stopDestroying();
-      }
-      
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postDestroyContext." + context.getType().toString());
-   }
-   
-   /**
-    * Startup all @Startup components in the given scope
-    */
-   static void startup(ScopeType scopeType)
-   {
-      Context context = Contexts.getApplicationContext();
-      for ( String name: context.getNames() )
-      {
-         Object object = context.get(name);
-         if ( object!=null && (object instanceof Component) )
-         {
-            Component component = (Component) object;
-            if ( component.isStartup() && component.getScope()==scopeType )
-            {
-               startup(component);
-            }
-         }
-      }
-   }
-
-   /**
-    * Startup a component and all its dependencies
-    */
-   static void startup(Component component)
-   {
-      if ( component.isStartup() )
-      {
-         for ( String dependency: component.getDependencies() )
-         {
-            Component dependentComponent = Component.forName(dependency);
-            if (dependentComponent!=null)
-            {
-               startup(dependentComponent);
-            }
-         }
-      }
-
-      if ( !component.getScope().getContext().isSet( component.getName() ) ) 
-      {
-         log.debug( "starting up: " + component.getName() );
-         component.newInstance();
-      }
-   }
-
-   /**
-    * Does this context attribute need to be force-replicated?
-    */
-   static boolean isAttributeDirty(Object attribute)
-   {
-      return attribute instanceof Mutable && ( (Mutable) attribute ).clearDirty();
-   }
-
-   /**
-    * At the end of a request, flush all contexts to their underlying
-    * persistent stores, or destroy their attributes (one or the other!).
-    */
-   static void flushAndDestroyContexts()
-   {
-   
-      if ( isConversationContextActive() )
-      {
-   
-         if ( isBusinessProcessContextActive() )
-         {
-            boolean transactionActive = false;
-            try
-            {
-               transactionActive = Transaction.instance().isActive();
-            }
-            catch (Exception e)
-            {
-               log.error("could not discover transaction status");
-            }
-            if (transactionActive)
-            {
-               //in calls to MDBs and remote calls to SBs, the 
-               //transaction doesn't commit until after contexts
-               //are destroyed, so pre-emptively flush here:
-               getBusinessProcessContext().flush();
-            }
-            
-            //TODO: it would be nice if BP context spanned redirects along with the conversation
-            //      this would also require changes to BusinessProcessContext
-            boolean destroyBusinessProcessContext = !Init.instance().isJbpmInstalled() ||
-                  !BusinessProcess.instance().hasActiveProcess();
-            if (destroyBusinessProcessContext)
-            {
-               //TODO: note that this occurs from Lifecycle.endRequest(), after
-               //      the Seam-managed txn was committed, but Contexts.destroy()
-               //      calls BusinessProcessContext.getNames(), which hits the
-               //      database!
-               log.debug("destroying business process context");
-               destroy( getBusinessProcessContext() );
-            }
-         }
-   
-         if ( !Manager.instance().isLongRunningConversation() )
-         {
-            log.debug("destroying conversation context");
-            destroy( getConversationContext() );
-         }
-         /*if ( !Init.instance().isClientSideConversations() )
-         {*/
-            //note that we need to flush even if the session is
-            //about to be invalidated, since we still need
-            //to destroy the conversation context in endSession()
-            log.debug("flushing server-side conversation context");
-            getConversationContext().flush();
-        //}
-   
-         //uses the event and session contexts
-         if ( Session.getInstance()!=null )
-         {
-            Manager.instance().unlockConversation();
-         }
-   
-      }
-      
-      if ( isSessionContextActive() )
-      {
-         log.debug("flushing session context");
-         getSessionContext().flush();
-      }
-      
-      //destroy the event context after the
-      //conversation context, since we need
-      //the manager to flush() conversation
-      if ( isEventContextActive() )
-      {
-         log.debug("destroying event context");
-         destroy( getEventContext() );
-      }
-   
-   }
-
-   /**
-    * Destroy a conversation context that is not currently bound to the request, called 
-    * due to a timeout.
-    * 
-    * @param session the current session, to which both current and destroyed conversation belong
-    * @param conversationId the conversation id of the conversation to be destroyed
-    */
-   static void destroyConversationContext(Map<String, Object> session, String conversationId)
-   {
-      Context current = getConversationContext();
-      ServerConversationContext temp = new ServerConversationContext(session, conversationId);
-      conversationContext.set(temp);
-      try
-      {
-         destroy(temp);
-         if ( !Session.instance().isInvalid() ) //its also unnecessary during a session timeout
-         {
-            temp.clear();
-            temp.flush();
-         }
-      }
-      finally
-      {
-         conversationContext.set(current);
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBean.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBean.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBean.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,76 +0,0 @@
-package org.jboss.seam.contexts;
-
-import static org.jboss.seam.contexts.PassivatedEntity.passivateEntity;
-
-/**
- * Swizzles entities held in the conversation context at
- * the end of each request.
- * 
- * @see PassivatedEntity
- * 
- * @author Gavin King
- *
- */
-class EntityBean implements Wrapper
-{
-   private static final long serialVersionUID = -2884601453783925804L;
-   
-   private Object instance;
-   private PassivatedEntity passivatedEntity;
-   private transient boolean initialized;
-   
-   public EntityBean(Object instance)
-   {
-      this.instance = instance;
-      initialized = true;
-   }
-   
-   //TODO: use @Unwrap
-   public Object getInstance()
-   {
-      if ( !initialized && passivatedEntity!=null ) 
-      {
-         //non-versioned entities can be lazily unpassivated 
-         instance = passivatedEntity.toEntityReference(true);
-      }
-      initialized = true;
-      return instance;
-   }
-   
-   public boolean passivate()
-   {
-      if ( passivatedEntity==null || passivatedEntity.isVersioned() ) //and the version number changed!
-      {
-         if ( PassivatedEntity.isTransactionRolledBackOrMarkedRollback() )
-         {
-            passivatedEntity = null;
-         }
-         else
-         {
-            passivatedEntity = passivateEntity(instance);
-            //if (passivatedEntity!=null) instance = null; //for performance of serialization
-         }
-         return true;
-      }
-      else
-      {
-         return false;
-      }
-   }
-   
-   public void activate()
-   {
-      //versioned entities must be unpassivated at the beginning 
-      //of the request 
-      if ( passivatedEntity!=null && passivatedEntity.isVersioned() )
-      {
-         instance = passivatedEntity.toEntityReference(true);
-         initialized = true;
-      }
-      else
-      {
-         initialized = false;
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanList.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanList.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanList.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,100 +0,0 @@
-package org.jboss.seam.contexts;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Swizzles entities held in the conversation context at
- * the end of each request.
- * 
- * @see PassivatedEntity
- * 
- * @author Gavin King
- *
- */
-class EntityBeanList extends AbstractEntityBeanCollection
-{
-   private static final long serialVersionUID = -2884601453783925804L;
- 
-   private List list;
-   private List<PassivatedEntity> passivatedEntityList;
-   
-   public EntityBeanList(List instance)
-   {
-      this.list = instance;
-   }
-   
-   @Override
-   protected Iterable<PassivatedEntity> getPassivatedEntities() 
-   {
-      return passivatedEntityList;
-   }
-   
-   @Override
-   protected Object getEntityCollection()
-   {
-      return list;
-   }
-   
-   @Override
-   protected void clearPassivatedEntities()
-   {
-      passivatedEntityList = null;
-   }
-
-   @Override
-   protected boolean isPassivatedEntitiesInitialized()
-   {
-      return passivatedEntityList!=null;
-   }
-   
-   @Override
-   protected void activateAll()
-   {
-      for (int i=0; i<passivatedEntityList.size(); i++)
-      {
-         PassivatedEntity passivatedEntity = passivatedEntityList.get(i);
-         if (passivatedEntity!=null)
-         {
-            list.set( i, passivatedEntity.toEntityReference(true) );
-         }
-      }
-      passivatedEntityList=null;
-   }
-
-   @Override
-   protected void passivateAll()
-   {       
-       List<PassivatedEntity> newPassivatedList = new ArrayList<PassivatedEntity>(list.size());               
-
-       boolean found = false;
-       Iterator<Object> it = list.iterator();
-       for (int i=0; it.hasNext(); i++) {
-           PassivatedEntity passivatedEntity = null;
-           Object value = it.next();
-           if (value != null) {
-               passivatedEntity = PassivatedEntity.passivateEntity(value);
-               
-               if (passivatedEntity!=null) {
-                   if (!found) {
-                       list = new ArrayList(list);
-                       found=true;
-                   }
-
-                   //this would be dangerous, except that we 
-                   //are doing it to a copy of the original 
-                   //list:
-                   list.set(i, null); 
-               }                               
-           }          
-           newPassivatedList.add(passivatedEntity);
-       }
-       
-       // if the original list was nulled out, we don't want to overwrite the passivatedEntity list
-       if (found) {
-           passivatedEntityList = newPassivatedList;
-       }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanMap.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanMap.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanMap.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,91 +0,0 @@
-package org.jboss.seam.contexts;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Swizzles entities held in the conversation context at
- * the end of each request.
- * 
- * @see PassivatedEntity
- * 
- * @author Gavin King
- *
- */
-class EntityBeanMap extends AbstractEntityBeanCollection
-{
-   private static final long serialVersionUID = -2884601453783925804L;
-   
-   private Map map;
-   private Map<Object, PassivatedEntity> passivatedEntityMap;
-   
-   public EntityBeanMap(Map instance)
-   {
-      this.map = instance;
-   }
-   
-   @Override
-   protected Iterable<PassivatedEntity> getPassivatedEntities() 
-   {
-      return passivatedEntityMap.values();
-   }
-   
-   @Override
-   protected Object getEntityCollection()
-   {
-      return map;
-   }
-   
-   @Override
-   protected void clearPassivatedEntities()
-   {
-      passivatedEntityMap = null;
-   }
-
-   @Override
-   protected boolean isPassivatedEntitiesInitialized()
-   {
-      return passivatedEntityMap!=null;
-   }
-
-   @Override
-   protected void activateAll()
-   {
-      for ( Map.Entry<Object, PassivatedEntity> me: passivatedEntityMap.entrySet() )
-      {
-         map.put( me.getKey(), me.getValue().toEntityReference(true) );
-      }
-      clearPassivatedEntities();
-   }
-   
-   @Override
-   protected void passivateAll()
-   {
-      HashMap<Object, PassivatedEntity> newPassivatedMap = 
-          new HashMap<Object, PassivatedEntity>(map.size());
-      boolean found = false;
-      for (Map.Entry me: (Set<Map.Entry>) map.entrySet()) {
-         Object value = me.getValue();
-         if (value!=null) {
-            PassivatedEntity passivatedEntity = PassivatedEntity.passivateEntity(value);
-            if (passivatedEntity!=null) {
-               if (!found) {
-                   map = new HashMap(map);
-                   found=true;
-               }
-
-               //this would be dangerous, except that we 
-               //are doing it to a copy of the original 
-               //list:
-               map.remove(me.getKey()); 
-               newPassivatedMap.put(me.getKey(), passivatedEntity);
-            }
-         }
-      }
-      if (found) {
-          passivatedEntityMap = newPassivatedMap;
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanSet.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanSet.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EntityBeanSet.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,90 +0,0 @@
-package org.jboss.seam.contexts;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Swizzles entities held in the conversation context at
- * the end of each request.
- * 
- * @see PassivatedEntity
- * 
- * @author Gavin King
- *
- */
-class EntityBeanSet extends AbstractEntityBeanCollection
-{
-   private static final long serialVersionUID = -2884601453783925804L;
-   
-   private Set set;
-   private List<PassivatedEntity> passivatedEntityList;
-   
-   public EntityBeanSet(Set instance)
-   {
-      this.set = instance;
-   }
-   
-   @Override
-   protected Iterable<PassivatedEntity> getPassivatedEntities() 
-   {
-      return passivatedEntityList;
-   }
-   
-   @Override
-   protected Object getEntityCollection()
-   {
-      return set;
-   }
-   
-   @Override
-   protected void clearPassivatedEntities()
-   {
-      passivatedEntityList = null;
-   }
-
-   @Override
-   protected boolean isPassivatedEntitiesInitialized()
-   {
-      return passivatedEntityList!=null;
-   }
-
-   @Override
-   protected void activateAll()
-   {
-      for ( PassivatedEntity pe: passivatedEntityList )
-      {
-         set.add( pe.toEntityReference(true) );
-      }
-      passivatedEntityList = null;
-   }
-   
-   @Override
-   protected void passivateAll()
-   {
-       ArrayList<PassivatedEntity> newPassivatedList = new ArrayList<PassivatedEntity>( set.size() );
-       boolean found = false;
-       for (Object value: set){
-           if (value!=null) {
-               PassivatedEntity passivatedEntity = PassivatedEntity.passivateEntity(value);
-               if (passivatedEntity!=null) {
-                   if (!found) {
-                       set = new HashSet(set);
-                       found=true;
-                   }
-                   //this would be dangerous, except that we 
-                   //are doing it to a copy of the original 
-                   //list:
-                   set.remove(value);                   
-                   newPassivatedList.add(passivatedEntity);
-               }
-           }
-       }     
-       // if the original list was nulled out, we don't want to overwrite the passivatedEntity list
-       if (found) {
-           passivatedEntityList = newPassivatedList;
-       }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EventContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EventContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/EventContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.Map;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Event context - spans a single request to
- * the server.
- * 
- * @author Gavin King
- */
-public class EventContext extends BasicContext 
-{
-   
-   public EventContext(Map<String, Object> map)
-   {
-      super(ScopeType.EVENT, map);
-   }
-  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/FacesLifecycle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/FacesLifecycle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/FacesLifecycle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,188 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.Map;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseId;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.web.Session;
-
-/**
- * Methods for setup and teardown of Seam contexts at the
- * beginning and end of JSF requests.
- * 
- * @see org.jboss.seam.jsf.SeamPhaseListener
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class FacesLifecycle
-{
-   private static ThreadLocal<PhaseId> phaseId = new ThreadLocal<PhaseId>();
-
-   private static final LogProvider log = Logging.getLogProvider(FacesLifecycle.class);
-   
-   public static void setPhaseId(PhaseId phase)
-   {
-      phaseId.set(phase);
-   }
-   
-   public static PhaseId getPhaseId()
-   {
-      return phaseId.get();
-   }
-
-   public static void clearPhaseId()
-   {
-      setPhaseId(null);
-   }
-
-   public static void beginRequest(ExternalContext externalContext) 
-   {
-      log.debug( ">>> Begin JSF request for " + getRequestPath(externalContext) );
-      Contexts.eventContext.set( new EventContext( externalContext.getRequestMap() ) );
-      Contexts.applicationContext.set( new ApplicationContext( externalContext.getApplicationMap() ) );
-      Contexts.sessionContext.set( new SessionContext( externalContext.getSessionMap() ) );
-      Session session = Session.getInstance();
-      if ( session!=null && session.isInvalidDueToNewScheme( Pages.instance().getRequestScheme( FacesContext.getCurrentInstance() ) ) )
-      {
-         invalidateSession(externalContext);
-      }
-      Contexts.conversationContext.set(null); //in case endRequest() was never called
-      //Events.instance(); //TODO: only for now, until we have a way to do EL outside of JSF!
-      
-      saveRequestPath(externalContext);
-   }
-   
-   
-   /**
-    * with rewriting, the filter chain might not have access to the post-rewrite request information.
-    * we'll save some of the information that we may need.
-    */
-   private static void saveRequestPath(ExternalContext externalContext) {
-       Map<String, Object> map = externalContext.getRequestMap();
-           
-       map.put("org.jboss.seam.web.requestServletPath", externalContext.getRequestServletPath());
-       map.put("org.jboss.seam.web.requestContextPath", externalContext.getRequestContextPath());
-       map.put("org.jboss.seam.web.requestPathInfo",    externalContext.getRequestPathInfo());
-   }
-
-   public static void beginExceptionRecovery(ExternalContext externalContext)
-   {
-      log.debug(">>> Begin exception recovery");
-      
-      //application and session contexts are easy :-)
-      Contexts.applicationContext.set( new ApplicationContext( externalContext.getApplicationMap() ) );      
-      Contexts.sessionContext.set( new SessionContext( externalContext.getSessionMap() ) );
-      
-      //don't really have anything good to do with these ones:
-      Contexts.pageContext.set(null);
-      Contexts.businessProcessContext.set(null); //TODO: is this really correct?
-
-      //depending upon when the exception occurs, endRequest() may or may not get called
-      //by SeamPhaseListener - this is because the stupid JSF spec gives me know way to
-      //determine if an exception occurred during the phase :-/
-      if ( Contexts.isEventContextActive() )
-      {
-         //this means that endRequest() never ran, so the components in the EVENT context
-         //have not yet been destroyed, and we can re-use them
-         Contexts.eventContext.set( new EventContext( externalContext.getRequestMap() ) );
-      }
-      else
-      {
-         //the endRequest() method already ran, so the EVENT context is in principle empty, 
-         //but we can't use the actual ServletRequest, since it contains garbage components
-         //that have already been destroyed (we could change that in EventContext!) 
-         Contexts.eventContext.set( new BasicContext(ScopeType.EVENT) );
-      }
-      
-      //for the conversation context, we need to account for flushing
-      //note that since we can't guarantee that it's components get flushed 
-      //to the session, there is always a possibility of components that were
-      //newly created in the current request "leaking" (we could fix that by
-      //copying unflushed changes in the context object into the new context
-      //object, or we could fix it by flushing at the end of every phase)
-      boolean conversationContextFlushed = !Contexts.isConversationContextActive();
-      ServerConversationContext conversationContext = new ServerConversationContext( externalContext.getSessionMap() );
-      Contexts.conversationContext.set(conversationContext);
-      if (conversationContextFlushed) conversationContext.unflush();
-   }
-
-   public static void endRequest(ExternalContext externalContext) 
-   {
-      log.debug("After render response, destroying contexts");
-      try
-      {
-         Session session = Session.getInstance();
-         boolean sessionInvalid = session!=null && session.isInvalid();
-         
-         Contexts.flushAndDestroyContexts();
-
-         if (sessionInvalid)
-         {
-            Lifecycle.clearThreadlocals();
-            clearPhaseId();
-            invalidateSession(externalContext);
-            //actual session context will be destroyed from the listener
-         }
-      }
-      finally
-      {
-         Lifecycle.clearThreadlocals();
-         log.debug( "<<< End JSF request for " + getRequestPath(externalContext) );
-      }
-   }
-   
-   /**
-    * Invalidate the session, no matter what kind of session it is
-    * (portlet or servlet). Why is this method not on ExternalContext?!
-    * Oh boy, those crazy rascals in the JSF EG...
-    */
-   private static void invalidateSession(ExternalContext externalContext)
-   {
-      Object session = externalContext.getSession(false);
-      if (session!=null)
-      {
-         try
-         {
-            session.getClass().getMethod("invalidate").invoke(session);
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException(e);
-         }
-      }
-   }
-
-   public static void resumeConversation(ExternalContext externalContext)
-   {
-      ServerConversationContext conversationContext = new ServerConversationContext( externalContext.getSessionMap() );
-      /*Context conversationContext = Init.instance().isClientSideConversations() ?
-            (Context) new ClientConversationContext() :
-            (Context) new ServerConversationContext( externalContext.getSessionMap() );*/
-      Contexts.conversationContext.set(conversationContext);
-      Contexts.businessProcessContext.set( new BusinessProcessContext() );
-      conversationContext.unflush();
-   }
-
-   public static void resumePage()
-   {
-      Contexts.pageContext.set( new PageContext() );
-   }
-  
-   private static String getRequestPath(ExternalContext externalContext)
-   {
-      return externalContext.getRequestContextPath() + externalContext.getRequestServletPath();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Lifecycle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Lifecycle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Lifecycle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,307 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.core.ConversationEntries;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Methods for setup and teardown of Seam contexts.
- * 
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class Lifecycle
-{
-
-   private static final LogProvider log = Logging.getLogProvider(Lifecycle.class);
-
-   private static ThreadLocal<Boolean> destroying = new ThreadLocal<Boolean>();
-   private static Map<String, Object> application;
-
-   public static Map<String, Object> getApplication() 
-   {
-      if (!isApplicationInitialized())
-      {
-         throw new IllegalStateException("Attempted to invoke a Seam component outside an initialized application");
-      }
-      return application;
-   }   
-   
-   public static boolean isApplicationInitialized() {
-       return application!=null; 
-   }
-
-   public static void beginApplication(Map<String, Object> app) 
-   {
-      application = app;
-   }
-   
-   public static void endApplication()
-   {
-      endApplication(application);
-   }
-   
-   public static void endApplication(Map<String,Object> app)
-   {
-      log.debug("Shutting down application and destroying contexts");
-      
-      Context tempApplicationContext = new ApplicationContext( app );
-      Contexts.applicationContext.set(tempApplicationContext);
-      Contexts.destroy(tempApplicationContext);
-      Contexts.applicationContext.set(null);
-      Contexts.eventContext.set(null);
-      Contexts.sessionContext.set(null);
-      Contexts.conversationContext.set(null);
-      
-      application = null;
-   }
-
-   public static void startDestroying()
-   {
-      destroying.set(true);
-   }
-
-   public static void stopDestroying()
-   {
-      destroying.set(false);
-   }
-
-   public static boolean isDestroying()
-   {
-      Boolean value = destroying.get();
-      return value!=null && value.booleanValue();
-   }
-
-   public static void beginCall()
-   {
-      log.debug( ">>> Begin call" );
-      Contexts.applicationContext.set( new ApplicationContext(getApplication()) );
-      Contexts.eventContext.set( new BasicContext(ScopeType.EVENT) );
-      Contexts.sessionContext.set( new BasicContext(ScopeType.SESSION) );
-      Contexts.conversationContext.set( new BasicContext(ScopeType.CONVERSATION) );
-      Contexts.businessProcessContext.set( new BusinessProcessContext() );
-   }
-
-   public static void endCall()
-   {
-      try
-      {
-         Contexts.destroy( Contexts.getSessionContext() );
-         Contexts.flushAndDestroyContexts();
-         if ( Manager.instance().isLongRunningConversation() )
-         {
-            throw new IllegalStateException("Do not start long-running conversations in direct calls to EJBs");
-         }
-      }
-      finally
-      {
-         clearThreadlocals();
-         log.debug( "<<< End call" );
-      }
-   }
-
-   /**
-    * @deprecated Use {@link Lifecycle#setupApplication()}
-    */
-   @Deprecated
-   public static void mockApplication()
-   {
-      setupApplication(null);
-   }
-   
-   /**
-    * @deprecated Use {@link Lifecycle#cleanupApplication()}
-    */
-   @Deprecated
-   public static void unmockApplication()
-   {
-      cleanupApplication();
-   }
-   
-   public static void setupApplication()
-   {
-      Contexts.applicationContext.set( new ApplicationContext(getApplication()) );
-   }
-   
-   public static void setupApplication(Map<String, Object> appCtx)
-   {
-         Contexts.applicationContext.set(new ApplicationContext(appCtx));
-   }
-
-   public static void cleanupApplication()
-   {
-      Contexts.applicationContext.set(null);
-   }
-
-   public static Context beginMethod()
-   {
-      Context result = Contexts.methodContext.get();
-      Contexts.methodContext.set( new BasicContext(ScopeType.METHOD) );
-      return result;
-   }
-
-   public static void endMethod(Context context)
-   {
-      Contexts.methodContext.set(context);
-   }
-   
-   public static void endRequest() 
-   {
-      log.debug("After request, destroying contexts");  
-      try
-      {
-         Contexts.flushAndDestroyContexts();
-      }
-      finally
-      {
-         clearThreadlocals();
-         log.debug( "<<< End web request" );
-      }
-   }
-
-   static void clearThreadlocals() 
-   {
-      Contexts.eventContext.set(null);
-      Contexts.pageContext.set(null);
-      Contexts.sessionContext.set(null);
-      Contexts.conversationContext.set(null);
-      Contexts.businessProcessContext.set(null);
-      Contexts.applicationContext.set(null);
-   }
-   
-   public static void destroyConversationContext(Map<String, Object> session, String conversationId)
-   {
-      Contexts.destroyConversationContext(session, conversationId);
-   }
-
-   @Deprecated
-   public static void beginSession(Map<String, Object> session)
-   {
-      beginSession(session,null);
-   }
-   
-   public static void beginSession(Map<String, Object> session, Map<String,Object> appCtx)
-   {
-      log.debug("Session started");
-      
-      //Normally called synchronously with a JSF request, but there are some
-      //special cases!
-
-      boolean applicationContextActive = Contexts.isApplicationContextActive();
-      boolean eventContextActive = Contexts.isEventContextActive();
-      boolean conversationContextActive = Contexts.isConversationContextActive();
-
-      if ( !applicationContextActive )
-      {
-         Context tempApplicationContext = null;
-         if(appCtx == null)
-         {
-            tempApplicationContext= new ApplicationContext( getApplication() );
-         }
-         else
-         {
-            tempApplicationContext = new ApplicationContext(appCtx);
-         }
-         Contexts.applicationContext.set(tempApplicationContext);
-      }
-      Context oldSessionContext = Contexts.sessionContext.get();
-      Contexts.sessionContext.set( new SessionContext(session) ); //we have to use the session object that came in the sessionCreated() event
-      Context tempEventContext = null;
-      if ( !eventContextActive )
-      {
-         tempEventContext = new BasicContext(ScopeType.EVENT);
-         Contexts.eventContext.set(tempEventContext);
-      }
-      Context tempConversationContext = null;
-      if ( !conversationContextActive )
-      {
-         tempConversationContext = new BasicContext(ScopeType.CONVERSATION);
-         Contexts.conversationContext.set(tempConversationContext);
-      }
-
-      Contexts.startup(ScopeType.SESSION);
-      
-      if ( !conversationContextActive )
-      {
-         Contexts.destroy(tempConversationContext);
-         Contexts.conversationContext.set(null);
-      }
-      if ( !eventContextActive ) 
-      {
-         Contexts.destroy(tempEventContext);
-         Contexts.eventContext.set(null);
-      }
-      Contexts.sessionContext.set(oldSessionContext); //replace the one from sessionCreated() with the one from JSF, or null
-      if ( !applicationContextActive ) 
-      {
-         Contexts.applicationContext.set(null);
-      }
-      
-   }
-   public static void endSession(Map<String, Object> session)
-   {
-      endSession(session, application);
-   }
-         
-   public static void endSession(Map<String, Object> session, Map<String,Object> app)
-   {
-      log.debug("End of session, destroying contexts");
-      
-      //This code assumes that sessions are only destroyed at the very end of a  
-      //web request, after the request-bound context objects have been destroyed,
-      //or during session timeout, when there are no request-bound contexts.
-      
-      if ( Contexts.isEventContextActive() || Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("Please end the HttpSession via org.jboss.seam.web.Session.instance().invalidate()");
-      }
-      
-      Context tempApplicationContext = new ApplicationContext( app );
-      Contexts.applicationContext.set(tempApplicationContext);
-   
-      //this is used just as a place to stick the ConversationManager
-      Context tempEventContext = new BasicContext(ScopeType.EVENT);
-      Contexts.eventContext.set(tempEventContext);
-   
-      //this is used (a) for destroying session-scoped components
-      //and is also used (b) by the ConversationManager
-      Context tempSessionContext = new SessionContext(session);
-      Contexts.sessionContext.set(tempSessionContext);
-   
-      Set<String> conversationIds = ConversationEntries.instance().getConversationIds();
-      log.debug("destroying conversation contexts: " + conversationIds);
-      for (String conversationId: conversationIds)
-      {
-         Contexts.destroyConversationContext(session, conversationId);
-      }
-      
-      //we need some conversation-scope components for destroying
-      //the session context...
-      Context tempConversationContext = new BasicContext(ScopeType.CONVERSATION);
-      Contexts.conversationContext.set(tempConversationContext);
-   
-      log.debug("destroying session context");
-      Contexts.destroy(tempSessionContext);
-      Contexts.sessionContext.set(null);
-      
-      Contexts.destroy(tempConversationContext);
-      Contexts.conversationContext.set(null);
-   
-      Contexts.destroy(tempEventContext);
-      Contexts.eventContext.set(null);
-   
-      Contexts.applicationContext.set(null);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/PageContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/PageContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/PageContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,183 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseId;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.core.Events;
-
-/**
- * The page context allows you to store state during a request that
- * renders a page, and access that state from any postback request
- * that originates from that page. The state is destroyed at the 
- * end of the second request. During the RENDER_RESPONSE phase,
- * the page context instance refers to the page that is about to
- * be rendered. Prior to the INVOKE_APPLICATION phase, it refers
- * to the page that was the source of the request. During the
- * INVOKE_APPLICATION phase, set() and remove() manipulate the
- * context of the page that is about to be rendered, while get()
- * returns values from the page that was the source of the request.
- * 
- * @author Gavin King
- */
-public class PageContext implements Context 
-{
-
-   private static final String PAGE_CONTEXT_PREFIX = ScopeType.PAGE.getPrefix() + '$';
-   private Map<String, Object> previousPageMap;
-   private Map<String, Object> nextPageMap;
-   
-   public PageContext()
-   {
-      previousPageMap = getOrCreateViewMap();
-      nextPageMap = new HashMap<String, Object>();
-   }
-
-   public ScopeType getType()
-   {
-      return ScopeType.PAGE;
-   }
-   
-   private String getKey(String name)
-   {
-      return getPrefix() + name;
-   }
-
-   private String getPrefix()
-   {
-      return PAGE_CONTEXT_PREFIX;
-   }
-
-	public Object get(String name) 
-   {
-      return getCurrentReadableMap().get( getKey(name) );
-	}
-   
-   public boolean isSet(String name) 
-   {
-      return getCurrentReadableMap().containsKey( getKey(name) );
-   }
-   
-   private Map<String, Object> getCurrentReadableMap()
-   {
-      if ( !isInPhase() )
-      {
-         return Collections.EMPTY_MAP;
-      }
-      else
-      {
-         return isRenderResponsePhase() ?
-               nextPageMap : previousPageMap;
-      }
-   }
-
-   private Map<String, Object> getCurrentWritableMap()
-   {
-      return isBeforeInvokeApplicationPhase() ?
-            previousPageMap : nextPageMap;
-   }
-
-	public void set(String name, Object value) 
-   {
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
-      getCurrentWritableMap().put( getKey(name), value );
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
-	}
-
-	public void remove(String name) 
-   {
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
-      getCurrentWritableMap().remove( getKey(name) );
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
-	}
-
-   public String[] getNames() 
-   {
-      Set<String> keys = getCurrentReadableMap().keySet();
-      List<String> names = new ArrayList<String>( keys.size() );
-      String prefix = getPrefix();
-      for (String key: keys)
-      {
-         if ( key.startsWith(prefix) )
-         {
-            names.add( key.substring( prefix.length() ) );
-         }
-      }
-      return names.toArray( new String[ names.size() ] );
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "PageContext";
-   }
-
-   public Object get(Class clazz)
-   {
-      return get( Component.getComponentName(clazz) );
-   }
-
-   /**
-    * Put the buffered context variables in the faces view root, 
-    * at the beginning of the render phase.
-    */
-   public void flush()
-   {
-      Map viewMap = getOrCreateViewMap();
-      viewMap.putAll(nextPageMap);
-      nextPageMap = viewMap;
-   }
-
-   private static Map getOrCreateViewMap()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if (facesContext==null)
-      {
-         throw new IllegalStateException("no FacesContext bound to current thread");
-      }
-      UIViewRoot viewRoot = facesContext.getViewRoot();
-      return viewRoot==null ? 
-            new HashMap() : viewRoot.getViewMap();
-   }
-
-   private static PhaseId getPhaseId()
-   {
-      PhaseId phaseId = FacesLifecycle.getPhaseId();
-      if (phaseId==null)
-      {
-         throw new IllegalStateException("No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)");
-      }
-      return phaseId;
-   }
-   
-   private static boolean isInPhase()
-   {
-      return FacesLifecycle.getPhaseId()!=null;
-   }
-
-   private static boolean isBeforeInvokeApplicationPhase()
-   {
-      return getPhaseId().compareTo(PhaseId.INVOKE_APPLICATION) < 0;
-   }
-
-   private static boolean isRenderResponsePhase()
-   {
-      return getPhaseId().compareTo(PhaseId.INVOKE_APPLICATION) > 0;
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/PassivatedEntity.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/PassivatedEntity.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/PassivatedEntity.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,290 +0,0 @@
-package org.jboss.seam.contexts;
-
-import java.io.Serializable;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.Session;
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.persistence.HibernatePersistenceProvider;
-import org.jboss.seam.persistence.PersistenceContexts;
-import org.jboss.seam.persistence.PersistenceProvider;
-import org.jboss.seam.transaction.Transaction;
-
-/**
- * A swizzled entity reference, consisting of the class,
- * id and persistence context name.
- * 
- * @see EntityBean
- * @see org.jboss.seam.persistence.ManagedEntityInterceptor
- * 
- * @author Gavin King
- *
- */
-class PassivatedEntity implements Serializable
-{
-   private static final long serialVersionUID = 6565440294007267788L;
-   
-   private Object id;
-   private Object version;
-   private String persistenceContext;
-   private Class<?> entityClass; //TODO: make this transient, and serialize only the class name..
-   
-   private PassivatedEntity(Object id, Object version, Class<?> entityClass, String persistenceContext)
-   {
-      this.id = id;
-      this.persistenceContext = persistenceContext;
-      this.entityClass = entityClass;
-      this.version = version;
-   }
-   
-   private String getPersistenceContext()
-   {
-      return persistenceContext;
-   }
-   
-   private Object getId()
-   {
-      return id;
-   }
-   
-   private Class<?> getEntityClass()
-   {
-      return entityClass;
-   }
-   
-   public boolean isVersioned()
-   {
-      return version!=null;
-   }
-
-   public Object toEntityReference(boolean checkVersion)
-   {
-      Object persistenceContext = Component.getInstance( getPersistenceContext() );
-      if ( persistenceContext==null )
-      {
-         return null;
-      }
-      else
-      {
-         if (persistenceContext instanceof EntityManager)
-         {
-            return getEntityFromEntityManager(persistenceContext, checkVersion);
-         }
-         else
-         {
-            return getEntityFromHibernate(persistenceContext, checkVersion);
-         }
-      }
-   }
-
-   private Object getEntityFromHibernate(Object persistenceContext, boolean checkVersion)
-   {
-      //TODO: split this out to somewhere to isolate the Hibernate dependency!!
-      Session session = (Session) persistenceContext;
-      if ( session.isOpen() )
-      {
-         Object result = session.load( getEntityClass(), (Serializable) getId() );
-         if (result!=null && checkVersion)
-         {
-            checkVersion(session, result);
-         }
-         return result;
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   private void checkVersion(Session session, Object result)
-   {
-      Object version = HibernatePersistenceProvider.getVersion(result, session);
-      if (version!=null) 
-      {
-         HibernatePersistenceProvider.checkVersion(result, session, this.version, version);
-      }
-   }
-
-   private Object getEntityFromEntityManager(Object persistenceContext, boolean checkVersion)
-   {
-      EntityManager em = (EntityManager) persistenceContext;
-      if ( em.isOpen() )
-      {
-         Object result = em.getReference( getEntityClass(), getId() );
-         if (result!=null && checkVersion) 
-         {
-            checkVersion(em, result);
-         }
-         return result;
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   private void checkVersion(EntityManager em, Object result)
-   {
-      Object version = PersistenceProvider.instance().getVersion(result, em);
-      if (version!=null) 
-      {
-         PersistenceProvider.instance().checkVersion(result, em, this.version, version);
-      }
-   }
-   
-   /*public static Object unpassivateEntityAndCheckVersion(String key)
-   {
-      return unpassivateEntity(key, true);
-   }
-
-   public static Object unpassivateEntity(String key)
-   {
-      return unpassivateEntity(key, false);
-   }
-
-   private static Object unpassivateEntity(String key, boolean checkVersion)
-   {
-      PassivatedEntity passivatedEntity = (PassivatedEntity) Contexts.getConversationContext().get(key);
-      return passivatedEntity==null ? null : passivatedEntity.toEntityReference(checkVersion);
-   }*/
-
-   public static PassivatedEntity passivateEntity(Object value)
-   {
-      Class entityClass = Seam.getEntityClass( value.getClass() );
-      if (entityClass!=null)
-      {
-         for ( String persistenceContextName: PersistenceContexts.instance().getTouchedContexts() )
-         {
-            Object persistenceContext = Component.getInstance(persistenceContextName);
-            return createPassivatedEntity(value, entityClass, persistenceContextName, persistenceContext);
-         }
-      }
-      return null;
-   }
-
-   private static PassivatedEntity createPassivatedEntity(Object value, Class entityClass, String persistenceContextName, Object persistenceContext)
-   {
-      if (persistenceContext instanceof EntityManager)
-      {
-         return createUsingEntityManager(value, entityClass, persistenceContextName, persistenceContext);
-      }
-      else
-      {
-         return createUsingHibernate(value, entityClass, persistenceContextName, persistenceContext);
-      }
-   }
-
-   /*private static String storeConversationContext(PassivatedEntity result)
-   {
-      if (result==null)
-      {
-         return null;
-      }
-      else
-      {
-         String key = result.getKey();
-         Contexts.getConversationContext().set( key, result );
-         return key;
-      }
-   }
-   
-   private String getKey()
-   {
-      return "org.jboss.seam.passivatedEntity." + entityClass.getName() + '#' + getId();
-   }*/
-
-   private static PassivatedEntity createUsingHibernate(Object value, Class entityClass, String persistenceContextName, Object persistenceContext)
-   {
-      //TODO: split this out to somewhere to isolate the Hibernate dependency!!
-      Session session = (Session) persistenceContext;
-      if ( isManaged(value, session) )
-      {
-         Object id = session.getIdentifier(value);
-         Object version = HibernatePersistenceProvider.getVersion(value, session);
-         return create(entityClass, persistenceContextName, id, version);
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   private static boolean isManaged(Object value, Session session)
-   {
-      boolean managed;
-      try
-      {
-         managed = session.isOpen() && session.contains(value);
-      }
-      catch (RuntimeException re) 
-      {
-         //just in case! //TODO; deleteme
-         managed = false;
-      }
-      return managed;
-   }
-
-   private static PassivatedEntity createUsingEntityManager(Object value, Class entityClass, String persistenceContextName, Object persistenceContext)
-   {
-      EntityManager em = (EntityManager) persistenceContext;
-      if ( isManaged(value, em) )
-      {
-         Object id = PersistenceProvider.instance().getId(value, em);
-         Object version = PersistenceProvider.instance().getVersion(value, em);
-         return create(entityClass, persistenceContextName, id, version);
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   private static boolean isManaged(Object value, EntityManager em)
-   {
-      boolean managed;
-      try
-      {
-         managed = em.isOpen() && em.contains(value);
-      }
-      catch (RuntimeException re) 
-      {
-         //workaround for bug in HEM! //TODO; deleteme
-         managed = false;
-      }
-      return managed;
-   }
-
-   private static PassivatedEntity create(Class entityClass, String persistenceContextName, Object id, Object version)
-   {
-      if (id==null)
-      {
-         //this can happen if persist() fails in Hibernate
-         return null;
-      }
-      else
-      {
-         return new PassivatedEntity(id, version, entityClass, persistenceContextName);
-      }
-   }
-
-   static boolean isTransactionRolledBackOrMarkedRollback()
-   {
-      try
-      {
-         return Transaction.instance().isRolledBackOrMarkedRollback();
-      }
-      catch (Exception e)
-      {
-         return false;
-      }
-   }
-   
-   @Override
-   public String toString()
-   {
-      return entityClass + "#" + id;
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/RemotingLifecycle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/RemotingLifecycle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/RemotingLifecycle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,16 +0,0 @@
-package org.jboss.seam.contexts;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Lifecycle management for Seam Remoting requests
- * 
- * @author Shane Bryzak
- */
-public class RemotingLifecycle
-{
-   public static void restorePageContext()
-   {
-      Contexts.pageContext.set( new BasicContext(ScopeType.PAGE) );
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ServerConversationContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ServerConversationContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ServerConversationContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,349 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.persistence.PersistenceContexts;
-
-/**
- * A conversation context is a logical context that lasts longer than 
- * a request but shorter than a login session. Conversation state
- * may be passivated or replicated.
- * 
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class ServerConversationContext implements Context 
-{
-
-   private final Map<String, Object> session;
-   private final Map<String, Object> additions = new HashMap<String, Object>();
-   private final Set<String> removals = new HashSet<String>();
-   private final String id;
-   private final List<String> idStack;
-   
-   private List<String> getIdStack()
-   {
-      return idStack==null ? Manager.instance().getCurrentConversationIdStack() : idStack;
-   }
-   
-   private String getId()
-   {
-      return id==null ? Manager.instance().getCurrentConversationId() : id;
-   }
-   
-   public ScopeType getType()
-   {
-      return ScopeType.CONVERSATION;
-   }
-
-   private String getKey(String name)
-   {
-      return getPrefix( getId() ) + name;
-   }
-
-   private String getKey(String name, String id)
-   {
-      return getPrefix(id) + name;
-   }
-
-   private String getPrefix(String id)
-   {
-      return ScopeType.CONVERSATION.getPrefix() + '#' + id + '$';
-   }
-
-   public ServerConversationContext(Map<String, Object> session)
-   {
-      this.session = session;
-      id = null;
-      idStack = null;
-   }
-      
-   public ServerConversationContext(Map<String, Object> session, String id)
-   {
-      this.session = session;
-      this.id = id;
-      this.idStack = new LinkedList<String>();
-      idStack.add(id);
-   }
-      
-    public Object get(String name) 
-    {
-      Object result = additions.get(name);
-      if (result!=null)
-      {
-         return unwrapEntityBean(result);
-      }
-      else
-      {
-         if ( removals.contains(name) ) 
-         {
-            return null;
-         }
-         else
-         {
-            List<String> stack = getIdStack();
-            if (stack==null)
-            {
-               return unwrapEntityBean( session.get( getKey(name) ) );
-            }
-            else
-            {
-               for ( int i=0; i<stack.size(); i++ )
-               {
-                  String id = stack.get(i);
-                  result = session.get( getKey(name, id) );
-
-                  if (result != null) 
-                  {
-                      return unwrapEntityBean(result);
-                  }
-
-                  // only continue checking if it is not pernestedconversation
-                  if ( i==0 && isPerNestedConversation(name) ) 
-                  {
-                      return null;
-                  }
-               }
-               return null;
-            }
-         }
-      }
-    }
-
-    private boolean isPerNestedConversation(String name) 
-    {
-        Component component = Component.forName(name);
-        return (component != null) && component.isPerNestedConversation();
-    }
-
-   private Object unwrapEntityBean(Object result)
-   {
-      if (result==null) return null;
-      if ( result instanceof Wrapper )
-      {
-         return ( (Wrapper) result ).getInstance();
-      }
-      else
-      {
-         return result;
-      }
-   }
-
-   public void set(String name, Object value) 
-   {
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
-      if (value==null)
-      {
-         //yes, we need this
-         remove(name);
-      }
-      else
-      {
-         removals.remove(name);
-         if ( Seam.isEntityClass( value.getClass() ) )
-         {
-            value = new EntityBean(value);
-         }
-         else if ( value instanceof List )
-         {
-            value = new EntityBeanList( (List) value );
-         }
-         else if ( value instanceof Map )
-         {
-            value = new EntityBeanMap( (Map) value );
-         }
-         else if ( value instanceof Set )
-         {
-            value = new EntityBeanSet( (Set) value );
-         }
-         additions.put(name, value);
-      }
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
-	}
-
-	public boolean isSet(String name) 
-   {
-		return get(name)!=null;
-	}
-   
-	public void remove(String name) 
-   {
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
-      additions.remove(name);
-      removals.add(name);
-      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
-	}
-
-   public String[] getNames() 
-   {
-      Set<String> results = getNamesFromSession();
-      results.addAll( additions.keySet() ); //after, to override
-      return results.toArray(new String[]{});
-   }
-
-   private Set<String> getNamesFromSession() 
-   {       
-       HashSet<String> results = new HashSet<String>();
-       
-       String prefix = getPrefix(getId());
-       for (String name: session.keySet()) {
-           if (name.startsWith(prefix)) {
-               name = name.substring(prefix.length());
-               if (!removals.contains(name)) {
-                   results.add(name);
-               }
-           }
-       }
-
-       return results;
-   }
-   
-   private Set<String> getNamesForAllConversationsFromSession() 
-   {       
-       Set<String> results = new HashSet<String>();
-       
-       List<String> ids = Manager.instance().getCurrentConversationIdStack();
-       
-       if (ids != null) {
-           for (String conversationId: ids) {
-               String prefix = getPrefix(conversationId);
-               for (String name: session.keySet()) {
-                   if (name.startsWith(prefix)) {
-                       String shortName = name.substring(prefix.length());
-                       if (!removals.contains(shortName)) {
-                           results.add(name);
-                       }
-                   }
-               }
-           }
-       }
-
-       return results;
-   }
-   
-
-   public Object get(Class clazz)
-   {
-      return get( Component.getComponentName(clazz) );
-   }
-   
-   public void clear()
-   {
-      additions.clear();
-      removals.addAll( getNamesFromSession() );
-   }
-   
-   public void unflush()
-   {
-      for ( String key: getNamesForAllConversationsFromSession() )
-      {
-         Object attribute = session.get(key);
-         if ( attribute!=null && attribute instanceof Wrapper ) 
-         {
-            ( (Wrapper) attribute ).activate();
-         }
-      }
-   }
-   
-   /**
-    * Propagate additions and removals to the HttpSession if 
-    * the current conversation is long-running, or remove all 
-    * attributes if it is a temporary conversation. This work
-    * may only be done at the end of the request, since we
-    * don't know for sure the conversation id until then.
-    */
-   public void flush()
-   {      
-      boolean longRunning = !isCurrent() || Manager.instance().isLongRunningConversation();  
-          
-      if ( longRunning )
-      {
-          //force update for dirty mutable objects
-          for (String key: getNamesForAllConversationsFromSession())  {
-              Object attribute = session.get(key);
-              
-              if (attribute!=null) {
-                  if (passivate(attribute) || isAttributeDirty(attribute)) {
-                      session.put(key, attribute);
-                  }
-              }
-          }
-    
-          //remove removed objects
-          for (String name: removals) {
-              session.remove(getKey(name));
-          }
-          removals.clear();
-
-          // Nothing to do if there is no addition
-          if (!additions.isEmpty())
-          {
-             // TODO this is a hack! We should find a more elegant way of handling
-             // new objects being added to additions during the following for-loop
-             PersistenceContexts.instance();
-             
-             //add new objects
-             for (Map.Entry<String, Object> entry: additions.entrySet())  {
-                 Object attribute = entry.getValue();
-                 
-                 passivate(attribute); 
-                 session.put(getKey(entry.getKey()), attribute);
-             }
-             additions.clear();
-          }
-      }
-      else
-      {
-         //TODO: for a pure temporary conversation, this is unnecessary, optimize it
-         for (String name: getNamesFromSession()) {
-            session.remove( getKey(name) );
-         }
-         
-         // remove removed objects
-         for (String name: removals) {
-             session.remove(getKey(name));
-         }
-         removals.clear();
-      }
-   }
-
-    private boolean passivate(Object attribute) {
-        if (attribute instanceof Wrapper) {
-            return ((Wrapper) attribute).passivate();
-        } else {
-            return false;
-        }
-    }
-    
-    private boolean isAttributeDirty(Object attribute) {
-        return Contexts.isAttributeDirty(attribute);
-    }
-    
-   private boolean isCurrent()
-   {
-      return id==null || id.equals( Manager.instance().getCurrentConversationId() );
-   }
-
-   @Override
-   public String toString()
-   {
-      return "ConversationContext(" + getId() + ")";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ServletLifecycle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ServletLifecycle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/ServletLifecycle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,212 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.lang.ref.WeakReference;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.servlet.ServletApplicationMap;
-import org.jboss.seam.servlet.ServletRequestMap;
-import org.jboss.seam.servlet.ServletRequestSessionMap;
-import org.jboss.seam.servlet.ServletSessionMap;
-import org.jboss.seam.web.Session;
-
-/**
- * Methods for setup and teardown of Seam contexts at the
- * beginning and end of servlet requests.
- *
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class ServletLifecycle
-{
-   
-   private static final LogProvider log = Logging.getLogProvider(ServletLifecycle.class);
-   
-   private static ServletContext servletContext;
-   
-   public static final String SERVLET_CONTEXT_KEY = "seam.contexts.servletContext";
-   
-   public static ServletContext getServletContext() 
-   {
-      //don't throw an exception if null, because of unit tests
-      return servletContext;
-   }
-   
-   public static void beginRequest(HttpServletRequest request)
-   {
-      beginRequest(request,null);
-   }
-   
-   public static void beginRequest(HttpServletRequest request,ServletContext context)
-   {
-      
-      ServletContext ctx = context;
-      if(ctx == null)
-      {
-         //try and figure out which servlet context to use
-         //from the request. 
-         HttpSession session = request.getSession(false);
-         if(session == null)
-         {
-            ctx = servletContext;
-         }
-         else
-         {
-            ctx = session.getServletContext();
-         }
-      }
-      
-      log.debug( ">>> Begin web request" );
-      Contexts.eventContext.set( new EventContext( new ServletRequestMap(request) ) );
-      Contexts.sessionContext.set( new SessionContext( new ServletRequestSessionMap(request) ) );
-      Contexts.applicationContext.set(new ApplicationContext( new ServletApplicationMap(ctx) ) );
-      Contexts.conversationContext.set(null); //in case endRequest() was never called
-   }
-   
-   public static void endRequest(HttpServletRequest request) 
-   {
-      log.debug("After request, destroying contexts");
-      try
-      {
-         Session session = Session.getInstance();
-         boolean sessionInvalid = session!=null && session.isInvalid();
-         
-         Contexts.flushAndDestroyContexts();
-         
-         if (sessionInvalid)
-         {
-            Lifecycle.clearThreadlocals();
-            request.getSession().invalidate();
-            //actual session context will be destroyed from the listener
-         }
-      }
-      finally
-      {
-         Lifecycle.clearThreadlocals();
-         log.debug( "<<< End web request" );
-      }
-   }
-   @Deprecated
-   public static void beginReinitialization(HttpServletRequest request)
-   {
-      beginReinitialization(request, servletContext);
-   }
-   
-   public static void beginReinitialization(HttpServletRequest request,ServletContext servletContext)
-   {
-      log.debug(">>> Begin re-initialization");
-      Contexts.applicationContext.set( new ApplicationContext( new ServletApplicationMap(servletContext) ) );
-      Contexts.eventContext.set( new BasicContext(ScopeType.EVENT) );
-      Contexts.sessionContext.set( new SessionContext( new ServletRequestSessionMap(request) ) );
-      Contexts.conversationContext.set( new BasicContext(ScopeType.CONVERSATION) );
-   }
-   
-   public static void endReinitialization()
-   {
-      Contexts.startup(ScopeType.APPLICATION);
-      
-      Events.instance().raiseEvent("org.jboss.seam.postReInitialization");
-      
-      // Clean up contexts used during reinitialization
-      Contexts.destroy( Contexts.getConversationContext() );
-      Contexts.conversationContext.set(null);
-      Contexts.destroy( Contexts.getEventContext() );
-      Contexts.eventContext.set(null);
-      Contexts.sessionContext.set(null);
-      Contexts.applicationContext.set(null);
-      
-      log.debug("<<< End re-initialization");
-   }
-   
-   public static void beginInitialization()
-   {
-      log.debug(">>> Begin initialization");
-      Contexts.applicationContext.set( new ApplicationContext( Lifecycle.getApplication() ) );
-      Contexts.eventContext.set( new BasicContext(ScopeType.EVENT) );
-      Contexts.conversationContext.set( new BasicContext(ScopeType.CONVERSATION) );
-   }
-   
-   public static void endInitialization()
-   {
-      Contexts.startup(ScopeType.APPLICATION);
-      
-      Events.instance().raiseEvent("org.jboss.seam.postInitialization");
-      
-      // Clean up contexts used during initialization
-      Contexts.destroy( Contexts.getConversationContext() );
-      Contexts.conversationContext.set(null);
-      Contexts.destroy( Contexts.getEventContext() );
-      Contexts.eventContext.set(null);
-      Contexts.sessionContext.set(null);
-      Contexts.applicationContext.set(null);
-      
-      log.debug("<<< End initialization");
-   }
-   
-   public static void beginApplication(ServletContext context)
-   {
-      // caching the classloader to servletContext
-      WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(Thread.currentThread().getContextClassLoader());
-      context.setAttribute("seam.context.classLoader",ref);
-      log.debug("Cached the context classloader in servletContext as 'seam.context.classLoader'");
-      context.setAttribute(SERVLET_CONTEXT_KEY, context); 
-      servletContext = context;
-      Lifecycle.beginApplication( new ServletApplicationMap(context) );
-   }
-   
-   public static void endApplication()
-   {
-      endApplication(servletContext);
-   }
-   
-   public static void endApplication(ServletContext context)
-   {
-      Lifecycle.endApplication(new ServletApplicationMap( context));
-      servletContext=null;
-   }
-   
-   public static void beginSession(HttpSession session)
-   {
-      Lifecycle.beginSession( new ServletSessionMap(session), new ServletApplicationMap(session.getServletContext()) );
-   }
-   
-   public static void endSession(HttpSession session)
-   {
-      Lifecycle.endSession( new ServletSessionMap(session) , new ServletApplicationMap(session.getServletContext()));
-   }
-   
-   public static void resumeConversation(HttpServletRequest request)
-   {
-      ServerConversationContext conversationContext = new ServerConversationContext( new ServletRequestSessionMap(request) );
-      Contexts.conversationContext.set(conversationContext);
-      Contexts.businessProcessContext.set( new BusinessProcessContext() );
-      conversationContext.unflush();
-   }
-   /**
-    * Convenience method that retrieves the servlet context from application
-    * scope.
-    * 
-    * @return the current servlet context
-    */
-   public static ServletContext getCurrentServletContext()
-   {
-      if (!Contexts.isApplicationContextActive())
-      {
-         return servletContext;
-      }
-      return (ServletContext) Contexts.getApplicationContext().get(SERVLET_CONTEXT_KEY);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/SessionContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/SessionContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/SessionContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.ArrayList;
-import java.util.Map;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-
-/**
- * Session context - state associated with a user session.
- * Session state may be passivated or replicated.
- * 
- * @author Gavin King
- */
-public class SessionContext extends BasicContext 
-{
-   
-   public SessionContext(Map<String, Object> map)
-   {
-      super(ScopeType.SESSION, map);
-   }
-
-   @Override
-	public String[] getNames() 
-   {
-		ArrayList<String> results = new ArrayList<String>();
-      String prefix = ScopeType.CONVERSATION.getPrefix();
-      for ( String name: super.getNames() ) 
-      {
-         if ( !name.contains(prefix) )
-         {
-            results.add(name);
-         }
-      }
-		return results.toArray(new String[]{});
-	}
-   
-   @Override
-   public void flush() 
-   {
-      for ( String name: getNames() )
-      {
-         Object attribute = get(name);
-         boolean dirty = attribute!=null && 
-               ( Contexts.isAttributeDirty(attribute) || Seam.isEntityClass( attribute.getClass() ) );
-         if ( dirty )
-         {
-            set(name, attribute);
-         }
-      }      
-   }
-  
-   @Override
-   public String toString()
-   {
-      return "SessionContext";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/TestLifecycle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/TestLifecycle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/TestLifecycle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.contexts;
-
-import java.util.Map;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.servlet.ServletApplicationMap;
-
-/**
- * Methods for setup and teardown of Seam contexts at the
- * beginning and end of a test.
- * 
- * @author Gavin King
- */
-public class TestLifecycle
-{
-
-   private static final LogProvider log = Logging.getLogProvider(TestLifecycle.class);
-
-   public static void beginTest(ServletContext context, Map<String, Object> session)
-   {
-      log.debug( ">>> Begin test" );
-      Contexts.applicationContext.set( new ApplicationContext( new ServletApplicationMap(context) ) );
-      Contexts.eventContext.set( new BasicContext(ScopeType.EVENT) );
-      Contexts.conversationContext.set( new BasicContext(ScopeType.CONVERSATION) );
-      Contexts.businessProcessContext.set( new BusinessProcessContext() );
-      Contexts.sessionContext.set( new SessionContext(session) );
-   }
-
-   public static void endTest()
-   {
-      Lifecycle.clearThreadlocals();
-      log.debug( "<<< End test" );
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Wrapper.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Wrapper.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Wrapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,11 +0,0 @@
-package org.jboss.seam.contexts;
-
-import java.io.Serializable;
-
-
-interface Wrapper extends Serializable
-{
-   public Object getInstance();
-   public void activate();
-   public boolean passivate();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-/**
- * The Seam Context API and implementations.
- */
-package org.jboss.seam.contexts;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/AbstractMutable.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/AbstractMutable.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/AbstractMutable.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,43 +0,0 @@
-package org.jboss.seam.core;
-
-/**
- * Base helper implementation of Mutable
- * 
- * @author Gavin King
- *
- */
-public abstract class AbstractMutable implements Mutable
-{
-   private transient boolean dirty;
-
-   public boolean clearDirty()
-   {
-      boolean result = dirty;
-      dirty = false;
-      return result;
-   }
-   
-   /**
-    * Set the dirty flag if the value has changed.
-    * Call whenever a subclass attribute is updated.
-    * 
-    * @param oldValue the old value of an attribute
-    * @param newValue the new value of an attribute
-    */
-   protected <T> void setDirty(T oldValue, T newValue)
-   {
-      dirty = dirty || (oldValue!=newValue && (
-            oldValue==null || 
-            !oldValue.equals(newValue) 
-         ));
-   }
-   
-   /**
-    * Set the dirty flag.
-    */
-   protected void setDirty()
-   {
-      dirty = true;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/BijectionInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/BijectionInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/BijectionInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,149 +0,0 @@
-//$Id: BijectionInterceptor.java 9561 2008-11-14 03:26:13Z dan.j.allen $
-package org.jboss.seam.core;
-
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.CyclicDependencyException;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.util.Exceptions;
-
-/**
- * Before invoking the component, inject all dependencies. After
- * invoking, outject dependencies back into their context.
- * 
- * @author Gavin King
- * @author Shane Bryzak
- */
- at Interceptor
-public class BijectionInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = 4686458105931528659L;
-   
-   private boolean injected;
-   
-   private boolean injecting;
-   
-   private int clients = 0;
-   
-   private ReentrantLock lock = new ReentrantLock();
-   
-   @Override
-   public void setComponent(Component component)
-   {
-      super.setComponent(component);
-   }
-      
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      Component component = getComponent();
-      boolean enforceRequired = !component.isLifecycleMethod( invocation.getMethod() );      
-      
-      try
-      {    
-         lock.lock();
-         try
-         {
-            if (!injected)
-            {              
-               if (injecting)
-               {
-                  throw new CyclicDependencyException();
-               }
-
-               injecting = true;
-               try
-               {
-                  component.inject(invocation.getTarget(), enforceRequired);
-               }
-               finally
-               {
-                  injecting = false;
-               }
-               injected = true;
-            }
-            
-            clients++;
-         }
-         finally
-         {
-            lock.unlock();
-         }
-                           
-         Object result = invocation.proceed();
-            
-         lock.lock();
-         try
-         {
-            if (clients == 1)
-            {
-               try
-               {                     
-                  component.outject( invocation.getTarget(), enforceRequired );
-               }
-               finally
-               {
-                  // Avoid an extra lock by disinjecting here instead of the finally block
-                  if (injected)
-                  {
-                     injected = false;
-                     clients--;
-                     component.disinject( invocation.getTarget() );
-                  }
-               }   
-            }
-         }
-         finally
-         {
-            lock.unlock();
-         }
-         
-         return result;
-      }
-      catch (Exception e)
-      {
-         Exception root = e;
-         while (Exceptions.getCause(root) != null)
-         {
-            root = Exceptions.getCause(root);
-         }
-         if (root instanceof CyclicDependencyException)
-         {
-            CyclicDependencyException cyclicDependencyException = (CyclicDependencyException) root;
-            cyclicDependencyException.addInvocation(getComponent().getName(), invocation.getMethod());
-         }
-         throw e;
-      }
-      finally
-      {            
-         if (injected)
-         {
-            lock.lock();
-            try
-            {
-               clients--;
-               
-               if (clients == 0)
-               {
-                  injected = false;
-                  component.disinject( invocation.getTarget() );     
-               }
-            }
-            finally
-            {
-               lock.unlock();
-            }
-         }
-      }
-   }
-
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().needsInjection() || getComponent().needsOutjection();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ClassValidator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ClassValidator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ClassValidator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-package org.jboss.seam.core;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-
-/**
- * 
- * @author Marek Novotny
- *
- * @param <T> type for validation
- */
-public class ClassValidator<T> implements Serializable
-{
-
-   private static final long serialVersionUID = -726917267535562335L;
-
-   // default validator from context
-   private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
-
-   private final Class<T> classForValidation;
-
-   public ClassValidator(Class<T> clazz)
-   {
-      this.classForValidation = clazz;
-   }
-
-   public Set<ConstraintViolation<T>> getPotentialInvalidValues(String propertyName, Object value)
-   {
-      return validator.validateValue(classForValidation, propertyName, value);
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Contexts.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Contexts.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Contexts.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Context;
-
-/**
- * Provides access to the current contexts associated with the thread.
- * 
- * @author Gavin King
- */
- at Name("org.jboss.seam.core.contexts")
- at BypassInterceptors
- at Install(precedence=BUILT_IN)
- at Scope(ScopeType.STATELESS)
-public class Contexts 
-{
-
-   @Factory(value="org.jboss.seam.core.eventContext", autoCreate=true)
-   public Context getEventContext() 
-   {
-      return org.jboss.seam.contexts.Contexts.getEventContext();
-   }
-
-   @Factory(value="org.jboss.seam.core.methodContext", autoCreate=true)
-   public Context getMethodContext() 
-   {
-      return org.jboss.seam.contexts.Contexts.getMethodContext();
-   }
-
-   @Factory(value="org.jboss.seam.core.pageContext", autoCreate=true)
-   public Context getPageContext() 
-   {
-      return org.jboss.seam.contexts.Contexts.getPageContext();
-   }
-
-   @Factory(value="org.jboss.seam.core.sessionContext", autoCreate=true)
-   public Context getSessionContext() 
-   {
-      return org.jboss.seam.contexts.Contexts.getSessionContext();
-   }
-
-   @Factory(value="org.jboss.seam.core.applicationContext", autoCreate=true)
-   public Context getApplicationContext() 
-   {
-      return org.jboss.seam.contexts.Contexts.getApplicationContext();
-   }
-
-   @Factory(value="org.jboss.seam.core.conversationContext", autoCreate=true)
-   public Context getConversationContext() 
-   {
-      return org.jboss.seam.contexts.Contexts.getConversationContext();
-   }
-
-   @Factory(value="org.jboss.seam.core.businessProcessContext", autoCreate=true)
-   public Context getBusinessProcessContext() 
-   {
-      return org.jboss.seam.contexts.Contexts.getBusinessProcessContext();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Conversation.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Conversation.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Conversation.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,415 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.persistence.PersistenceContexts;
-
-/**
- * Allows the conversation timeout to be set per-conversation,
- * and the conversation description and switchable outcome to
- * be set when the application requires workspace management
- * functionality.
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.CONVERSATION)
- at Name("org.jboss.seam.core.conversation")
- at Install(precedence=BUILT_IN)
- at BypassInterceptors
-public class Conversation implements Serializable 
-{
-   private static final long serialVersionUID = -6131304128727444876L;
-   private Integer timeout;
-   private Integer concurrentRequestTimeout;
-   String description;
-   String viewId;
-   
-   /**
-    * Kills all conversations except the current one
-    */
-   public void killAllOthers()
-   {
-      Manager.instance().killAllOtherConversations();
-   }
-
-   /**
-    * Get the timeout for this conversation instance.
-    * @return the timeout in millis
-    */
-   public Integer getTimeout() 
-   {
-      return timeout==null ?
-            Manager.instance().getCurrentConversationTimeout() :
-            timeout;
-   }
-   
-   /**
-    * Set the timeout for this converstaion instance.
-    * @param timeout the timeout in millis
-    */
-   public void setTimeout(Integer timeout) 
-   {
-      this.timeout = timeout;
-   }
-   
-   public Integer getConcurrentRequestTimeout()
-   {
-      return concurrentRequestTimeout == null ? Manager.instance().getCurrentConversationConcurrentRequestTimeout() : concurrentRequestTimeout;
-   }
-   
-   public void setConcurrentRequestTimeout(Integer concurrentRequestTimeout)
-   {
-      this.concurrentRequestTimeout = concurrentRequestTimeout;
-   }
-   
-   /**
-    * Get the conversation id.
-    */
-   public String getId()
-   {
-      return Manager.instance().getCurrentConversationId();
-   }
-   
-   public String getDescription()
-   {
-      return description==null ? 
-            Manager.instance().getCurrentConversationDescription() : 
-            description;
-   }
-   
-   public String getViewId()
-   {
-      return viewId==null ? 
-            Manager.instance().getCurrentConversationViewId() :
-            viewId;
-   }
-   
-   /**
-    * Sets the description of this conversation, for use
-    * in the conversation list, breadcrumbs, or conversation
-    * switcher.
-    */
-   public void setDescription(String description)
-   {
-      this.description = description;
-   }
-   
-   /**
-    * Sets the JSF outcome to be used when we switch back to this
-    * conversation from the conversation list, breadcrumbs, or 
-    * conversation switcher.
-    */
-   public void setViewId(String outcome)
-   {
-      this.viewId = outcome;
-   }
-   
-   public static Conversation instance()
-   {
-      if ( !Contexts.isConversationContextActive() )
-      {
-         throw new IllegalStateException("No active conversation context");
-      }
-      return (Conversation) Component.getInstance(Conversation.class, ScopeType.CONVERSATION);
-   }
-   
-   void flush()
-   {
-      //we need to flush this stuff asynchronously to handle 
-      //nested and temporary conversations which have no
-      //ConversationEntry
-
-      Manager manager = Manager.instance();
-      
-      if ( !manager.isLongRunningConversation() )
-      {
-         throw new IllegalStateException("only long-running conversation outcomes are switchable");
-      }
-      
-      ConversationEntry entry = manager.getCurrentConversationEntry();
-      if (entry==null)
-      {
-         throw new IllegalStateException("missing conversation entry"); //should never happen
-      }
-      if (viewId!=null)
-      {
-         entry.setViewId(viewId);
-      }
-      if (description!=null)
-      {
-         entry.setDescription(description);
-      }
-      if (timeout!=null)
-      {
-         entry.setTimeout(timeout);
-      }
-      if (concurrentRequestTimeout != null)
-      {
-         entry.setConcurrentRequestTimeout(concurrentRequestTimeout);
-      }
-      
-      description = null;
-      viewId = null;
-      timeout = null;
-   }
-   
-   /**
-    * Switch back to the last defined view-id for the
-    * current conversation.
-    * 
-    * @return true if a redirect occurred
-    */
-   public boolean redirect()
-   {
-      Manager manager = Manager.instance();
-      return redirect( manager, manager.getCurrentConversationViewId() );
-   }
-
-   private boolean redirect(Manager manager, String viewId)
-   {
-      if (viewId==null)
-      {
-         return false;
-      }
-      else
-      {
-         manager.redirect(viewId);
-         return true;
-      }         
-   }
-   
-   /**
-    * End a child conversation and redirect to the last defined
-    * view-id for the parent conversation.
-    * 
-    * @return true if a redirect occurred
-    */
-   public boolean endAndRedirect()
-   {
-      return endAndRedirect(false);
-   }
-   
-   /**
-    * End a child conversation and redirect to the last defined
-    * view-id for the parent conversation.
-    * 
-    * @param endBeforeRedirect should the conversation be destroyed before the redirect?
-    * @return true if a redirect occurred
-    */
-   public boolean endAndRedirect(boolean endBeforeRedirect)
-   {
-      end(endBeforeRedirect);
-      Manager manager = Manager.instance();
-      return redirect( manager, manager.getParentConversationViewId() );
-   }
-   
-   /**
-    * Leave the scope of the current conversation
-    */
-   public void leave()
-   {
-      Manager.instance().leaveConversation();
-   }
-   
-   /**
-    * Start a long-running conversation, if no long-running
-    * conversation is active.
-    * 
-    * @return true if a new long-running conversation was begun
-    */
-   public boolean begin()
-   {
-      if ( Manager.instance().isLongRunningOrNestedConversation() )
-      {
-         return false;
-      }
-      else
-      {
-         reallyBegin();
-         return true;
-      }
-   }
-
-   private void reallyBegin()
-   {
-      Manager.instance().beginConversation( );
-   }
-   
-   /**
-    * Start a nested conversation.
-    * 
-    * @throws IllegalStateException if no long-running conversation was active
-    */
-   public void beginNested()
-   {
-      if ( Manager.instance().isLongRunningConversation() )
-      {
-         Manager.instance().beginNestedConversation( );
-      }
-      else
-      {
-         throw new IllegalStateException("beginNested() called with no long-running conversation");
-      }
-   }
-   
-   /**
-    * Begin or join a conversation, or begin a new nested conversation.
-    * 
-    * @param join if a conversation is active, should we join it?
-    * @param nested if a conversation is active, should we start a new nested conversation?
-    * @return true if a new long-running conversation was begun
-    */
-   public boolean begin(boolean join, boolean nested)
-   {
-      boolean longRunningConversation = Manager.instance().isLongRunningOrNestedConversation();
-      if ( !join && !nested && longRunningConversation  )
-      {
-         throw new IllegalStateException("begin() called from long-running conversation, try join=true");
-      }
-      else if ( !longRunningConversation )
-      {
-         reallyBegin();
-         return true;
-      }
-      else if (nested)
-      {
-         beginNested();
-         return true;
-      }
-      else
-      {
-         return false;
-      }
-   }
-   
-   /**
-    * End a long-runnning conversation.
-    */
-   public void end()
-   {
-      end(false);   
-   }
-   
-   /**
-    * End a long-runnning conversation and destroy
-    * it before a redirect.
-    */
-   public void endBeforeRedirect()
-   {
-      end(true);   
-   }   
-   
-   /**
-    * End a long-runnning conversation.
-    * 
-    * @param beforeRedirect should the conversation be destroyed before any redirect?
-    */
-   public void end(boolean beforeRedirect)
-   {
-      Manager.instance().endConversation(beforeRedirect);   
-   }
-   
-   /**
-    * Is this conversation long-running? Note that this method returns
-    * false even when the conversation has been temporarily promoted
-    * to long-running for the course of a redirect, so it does what
-    * the user really expects.
-    */
-   public boolean isLongRunning()
-   {
-      return Manager.instance().isReallyLongRunningConversation();
-   }
-   
-   /**
-    * Is this conversation a nested conversation?
-    */
-   public boolean isNested()
-   {
-      return Manager.instance().isNestedConversation();
-   }
-   
-   /**
-    * Get the id of the immediate parent of a nested conversation
-    */
-   public String getParentId()
-   {
-      return Manager.instance().getParentConversationId();
-   }
-   
-   /**
-    * Get the id of root conversation of a nested conversation
-    */
-   public String getRootId()
-   {
-      return Manager.instance().getRootConversationId();
-   }
-   
-   /**
-    * "Pop" the conversation stack, switching to the parent conversation
-    */
-   public void pop()
-   {
-      String parentId = getParentId();
-      if (parentId!=null)
-      {
-         Manager.instance().switchConversation(parentId);
-      }
-   }
-   
-   /**
-    * Pop the conversation stack and redirect to the last defined
-    * view-id for the parent conversation.
-    * 
-    * @return true if a redirect occurred
-    */
-   public boolean redirectToParent()
-   {
-      pop();
-      return redirect();
-   }
-   
-   /**
-    * Switch to the root conversation
-    */
-   public void root()
-   {
-      String rootId = getRootId();
-      if (rootId!=null)
-      {
-         Manager.instance().switchConversation(rootId);
-      }
-   }
-
-   /**
-    * Switch to the root conversation and redirect to the 
-    * last defined view-id for the root conversation.
-    * 
-    * @return true if a redirect occurred
-    */
-   public boolean redirectToRoot()
-   {
-      root();
-      return redirect();
-   }
-   
-   /**
-    * Change the flush mode of all Seam-managed persistence 
-    * contexts in this conversation.
-    */
-   public void changeFlushMode(FlushModeType flushMode)
-   {
-      PersistenceContexts.instance().changeFlushMode(flushMode);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationEntries.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationEntries.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationEntries.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,111 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Manages a map of conversation id to ConversationEntry 
- * in the session context.
- * 
- * @author Gavin King
- */
- at Name("org.jboss.seam.core.conversationEntries")
- at Install(precedence=BUILT_IN)
- at Scope(ScopeType.SESSION)
- at BypassInterceptors
-public class ConversationEntries extends AbstractMutable implements Serializable 
-{
-   private static final long serialVersionUID = 7996835952419813634L;
-   private Map<String, ConversationEntry> conversationIdEntryMap = new HashMap<String, ConversationEntry>();
-   
-   public synchronized Collection<ConversationEntry> getConversationEntries()
-   {
-      return Collections.unmodifiableCollection( conversationIdEntryMap.values() );
-   }
-   
-   public synchronized int size()
-   {
-      return conversationIdEntryMap.size();
-   }
-   
-   public synchronized Set<String> getConversationIds()
-   {
-      return Collections.unmodifiableSet( conversationIdEntryMap.keySet() );
-   }
-   
-   public synchronized ConversationEntry createConversationEntry(String id, List<String> stack)
-   {
-      ConversationEntry entry = new ConversationEntry(id, stack, this);
-      conversationIdEntryMap.put(id, entry);
-      setDirty();
-      return entry;
-   }
-   
-   public synchronized ConversationEntry getConversationEntry(String id)
-   {
-      return conversationIdEntryMap.get(id);
-   }
-   
-   public synchronized ConversationEntry removeConversationEntry(String id)
-   {
-      ConversationEntry entry = conversationIdEntryMap.remove(id);
-      if ( entry!=null ) setDirty();
-      return entry;
-   }
-   
-   public synchronized ConversationEntry updateConversationId(String oldId, String newId)
-   {
-      ConversationEntry entry = conversationIdEntryMap.remove(oldId);
-      if (entry==null)
-      {
-         return null;
-      }
-      else
-      {
-         entry.setId(newId);
-         entry.getConversationIdStack().set(0, newId);
-         conversationIdEntryMap.put(newId, entry);
-         setDirty();
-         return entry;
-      }
-   }
-   
-   public static ConversationEntries instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No session context active");
-      }
-      return (ConversationEntries) Component.getInstance(ConversationEntries.class, ScopeType.SESSION);
-   }
-   
-   public static ConversationEntries getInstance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No session context active");
-      }
-      return (ConversationEntries) Component.getInstance(ConversationEntries.class, ScopeType.SESSION, false);
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "ConversationEntries(" + conversationIdEntryMap.values() + ")";
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationEntry.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationEntry.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationEntry.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,295 +0,0 @@
-package org.jboss.seam.core;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Metadata about an active conversation. Also used
- * by the conversation list and breadcrumbs.
- *
- * @author Gavin King
- *
- */
-public final class ConversationEntry implements Serializable, Comparable<ConversationEntry>
-{
-   private static final long serialVersionUID = 3624635335271963568L;
-   
-   private long lastRequestTime;
-   private String description;
-   private String id;
-   private Date startDatetime;
-   private Date lastDatetime;
-   private String viewId;
-   private List<String> conversationIdStack;
-   private Integer timeout;
-   private Integer concurrentRequestTimeout;
-   private boolean removeAfterRedirect;
-   private boolean ended;
-  
-   private ConversationEntries entries;
-   
-   private ReentrantLock lock;
-   
-   public ConversationEntry(String id, List<String> stack, ConversationEntries entries)
-   {
-      this.id = id;
-
-      if (stack==null) throw new IllegalArgumentException("Stack must not be null");
-      if (id==null) throw new IllegalArgumentException("id must not be null");
-      
-      this.conversationIdStack = stack;
-
-      this.startDatetime = new Date();
-      this.entries = entries;
-      
-      if ( conversationIdStack.size()>1 )
-      {
-         // get the root conversation entry lock (we want to share the same lock  
-         // among all nested conversations in the same conversation stack)
-         lock = entries.getConversationEntry( conversationIdStack.get( conversationIdStack.size()-1 ) ).lock;
-      }
-      else
-      {
-         lock = new ReentrantLock(true);
-      }
-      touch();
-   }
-   
-   public String getDescription() 
-   {
-      return description;
-   }
-   
-   void setDescription(String description) 
-   {
-      entries.setDirty(this.description, description);
-      this.description = description;
-   }
-   
-   public synchronized long getLastRequestTime() 
-   {
-      return lastRequestTime;
-   }
-   
-   synchronized void touch() 
-   {
-      entries.setDirty();
-      lastRequestTime = System.currentTimeMillis();
-      lastDatetime = new Date();
-   }
-   
-   public String getId() 
-   {
-      return id;
-   }
-   
-   public Date getStartDatetime() 
-   {
-      return startDatetime;
-   }
-   
-   public void destroy() 
-   {
-      boolean success = Manager.instance().switchConversation( getId() );
-      if (success) Manager.instance().endConversation(false);
-   }
-   
-   public void select() 
-   {
-      redirect();
-   }
-
-   public boolean redirect()
-   {
-      String viewId = getViewId();
-      if (viewId==null)
-      {
-         return false;
-      }
-      else
-      {
-         Manager.instance().redirect( viewId, getId() );
-         return true;
-      }
-   }
-      
-   void setViewId(String viewId) 
-   {
-      entries.setDirty(this.viewId, viewId);
-      this.viewId = viewId;
-   }
-   
-   public String getViewId()
-   {
-      return viewId;
-   }
-   
-   public synchronized Date getLastDatetime() 
-   {
-      return lastDatetime;
-   }
-   
-   public List<String> getConversationIdStack() 
-   {
-      return conversationIdStack;
-   }
-   
-   public boolean isDisplayable() 
-   {
-      return !isEnded() && !isRemoveAfterRedirect() && getDescription()!=null;
-   }
-
-   public boolean isCurrent()
-   {
-      Manager manager = Manager.instance();
-      if ( manager.isLongRunningConversation() )
-      {
-         return id.equals( manager.getCurrentConversationId() );
-      }
-      else if ( manager.isNestedConversation() )
-      {
-         return id.equals( manager.getParentConversationId() );
-      }
-      else
-      {
-         return false;
-      }
-   }
-   
-   public int compareTo(ConversationEntry entry) 
-   {
-      int result = new Long ( getLastRequestTime() ).compareTo( entry.getLastRequestTime() );
-      return - ( result==0 ? getId().compareTo( entry.getId() ) : result );
-   }
-   
-   public int getTimeout() 
-   {
-      return timeout==null ?
-            Manager.instance().getConversationTimeout() : timeout;
-   }
-   
-   void setTimeout(int conversationTimeout) 
-   {
-      entries.setDirty(this.timeout, timeout);
-      this.timeout = conversationTimeout;
-   }
-   
-   public Integer getConcurrentRequestTimeout()
-   {
-      return concurrentRequestTimeout == null ? Manager.instance().getConcurrentRequestTimeout() : concurrentRequestTimeout;
-   }
-   
-   void setConcurrentRequestTimeout(Integer concurrentRequestTimeout)
-   {
-      entries.setDirty(this.concurrentRequestTimeout, concurrentRequestTimeout);
-      this.concurrentRequestTimeout = concurrentRequestTimeout;
-   }
-   
-   public boolean isRemoveAfterRedirect() 
-   {
-      return removeAfterRedirect;
-   }
-   
-   public void setRemoveAfterRedirect(boolean removeAfterRedirect) 
-   {
-      entries.setDirty();
-      this.removeAfterRedirect = removeAfterRedirect;
-   }
-   
-   void setId(String id)
-   {
-      this.id = id;
-   }
-   
-   public boolean lockNoWait() //not synchronized!
-   {
-      return lock.tryLock();
-   }
-   
-   public boolean lock() //not synchronized!
-   {
-      try
-      {
-         return lock.tryLock( getConcurrentRequestTimeout(), TimeUnit.MILLISECONDS );
-      }
-      catch (InterruptedException ie)
-      {
-         throw new RuntimeException(ie);
-      }
-   }
-   
-   public void unlock() //not synchronized!
-   {
-      lock.unlock();
-   }
-   
-   public boolean isLockedByCurrentThread()
-   {
-      return lock.isHeldByCurrentThread();
-   }
-   
-   public void end()
-   {
-      ended = true;
-   }
-   
-   public boolean isEnded()
-   {
-      return ended;
-   }
-   
-   public boolean isNested()
-   {
-      return conversationIdStack.size()>1;
-   }
-   
-   /**
-    * Determines which conversation in the stack is holding the instance of this
-    * component. A nested conversation can see context variables in all ancestor
-    * conversations. In this case, we are interesting in knowing where that
-    * instance was found. We are assuming that if the reference is not in an
-    * ancestor conversation, then it must be in the current conversation. The
-    * goal here is not to locate the instance, but rather to determine which
-    * conversation is contributing the instance that we already know exists.
-    * 
-    * The low-level interaction with the session context should be refactored
-    * out. The problem is that it is defined in private areas of
-    * ServerConversationContext and cannot be reused. Actually, what we really
-    * need is a general purpose utility for analyzing the contents of each
-    * conversation in the stack (at least the keys).
-    */
-   public String findPositionInConversationStack(Component component)
-   {
-      if (component.isPerNestedConversation()) {
-         return id;
-      }
-      
-      String name = component.getName();
-      Context session = Contexts.getSessionContext();
-      String location = id;
-      for (int i = 1, len = conversationIdStack.size(); i < len; i++) {
-         String cid = conversationIdStack.get(i);
-         String key = ScopeType.CONVERSATION.getPrefix() + '#' + cid + '$' + name;
-         if (session.get(key) != null) {
-            location = cid;
-            break;
-         }
-      }
-      
-      return location;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "ConversationEntry(" + id + ")";
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationIdGenerator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationIdGenerator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationIdGenerator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,28 +0,0 @@
-package org.jboss.seam.core;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
- at Name("org.jboss.seam.core.ConversationIdGenerator")
- at Scope(ScopeType.APPLICATION)
- at Install(precedence=Install.BUILT_IN)
-public class ConversationIdGenerator
-{
-    private static AtomicInteger uniqueId = new AtomicInteger(0);
-
-    public String getNextId() {
-        //TODO: this is not cluster safe!!!!!
-        return Integer.toString(uniqueId.incrementAndGet());
-    }   
-
-    public static ConversationIdGenerator instance() {
-        ConversationIdGenerator instance = 
-            (ConversationIdGenerator) Component.getInstance("org.jboss.seam.core.ConversationIdGenerator");
-        return (instance!=null) ? instance : new ConversationIdGenerator();
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,307 +0,0 @@
-//$Id: ConversationInterceptor.java 10234 2009-03-30 17:21:15Z dan.j.allen $
-package org.jboss.seam.core;
-
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-import org.jboss.seam.annotations.ApplicationException;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.annotations.bpm.BeginTask;
-import org.jboss.seam.annotations.bpm.EndTask;
-import org.jboss.seam.annotations.bpm.StartTask;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.bpm.BusinessProcessInterceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.navigation.ConversationIdParameter;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.pageflow.Pageflow;
-import org.jboss.seam.persistence.PersistenceContexts;
-
-/**
- * Implements annotation-based conversation demarcation.
- * 
- * @author Gavin King
- */
- at Interceptor(stateless=true,
-             around=BijectionInterceptor.class,
-             within=BusinessProcessInterceptor.class)
-public class ConversationInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = -5405533438107796414L;
-
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      try
-      {
-         Method method = invocation.getMethod();
-         if ( getComponent().isConversationManagementMethod(method) ) //performance optimization 
-         {
-      
-            if ( isMissingJoin(method) )
-            {
-               throw new IllegalStateException("begin method invoked from a long-running conversation, try using @Begin(join=true) on method: " + method.getName());
-            }
-            
-            if ( redirectToExistingConversation(method) ) 
-            {
-               return null;
-            }
-            else
-            {
-               Object result = invocation.proceed();   
-               beginConversationIfNecessary(method, result);
-               endConversationIfNecessary(method, result);
-               return result;
-            }
-            
-         }
-         else
-         {
-            return invocation.proceed();
-         }
-      }
-      catch (Exception e)
-      {
-         if ( isEndConversationRequired(e) )
-         {
-            endConversation(false, false);
-         }
-         throw e;
-      }
-   }
-
-   private boolean isEndConversationRequired(Exception e)
-   {
-      Class<? extends Exception> clazz = e.getClass();
-      return clazz.isAnnotationPresent(ApplicationException.class)
-            && clazz.getAnnotation(ApplicationException.class).end();
-   }
-   
-   @SuppressWarnings("deprecation")
-   public boolean redirectToExistingConversation(Method method)
-   {
-      if ( !Manager.instance().isLongRunningConversation() )
-      {
-         String id = null;
-         ConversationPropagation propagation = ConversationPropagation.instance(); 
-         String conversation = propagation != null ? propagation.getConversationName() : null;
-         
-         if ( method.isAnnotationPresent(Begin.class) )
-         {
-            id = method.getAnnotation(Begin.class).id();
-         }
-         else if ( method.isAnnotationPresent(BeginTask.class) )
-         {
-            id = method.getAnnotation(BeginTask.class).id();
-         }
-         else if ( method.isAnnotationPresent(StartTask.class) )
-         {
-            id = method.getAnnotation(StartTask.class).id();
-         }
-         
-         if ( id!=null && !"".equals(id) )
-         {
-            id = Interpolator.instance().interpolate(id);
-            ConversationEntry ce = ConversationEntries.instance().getConversationEntry(id);
-            if (ce==null) 
-            {
-               Manager.instance().updateCurrentConversationId(id);
-            }
-            else
-            {
-               return ce.redirect();
-            }
-         }
-         else if (conversation != null && !"".equals(conversation))
-         {
-            ConversationIdParameter param = Pages.instance().getConversationIdParameter(conversation);
-            if (param != null)
-            {
-               ConversationEntry ce = ConversationEntries.instance().getConversationEntry(param.getConversationId());
-               if (ce != null)
-               {
-                  return ce.redirect();
-               }
-            }            
-         }
-      }
-      
-      return false;
-   }
-
-   private boolean isMissingJoin(Method method) {
-      return Manager.instance().isLongRunningOrNestedConversation() && ( 
-            ( 
-                  method.isAnnotationPresent(Begin.class) && 
-                  !method.getAnnotation(Begin.class).join() && 
-                  !method.getAnnotation(Begin.class).nested() 
-            ) ||
-            method.isAnnotationPresent(BeginTask.class) ||
-            method.isAnnotationPresent(StartTask.class) 
-         );
-   }
-
-   @SuppressWarnings("deprecation")
-   private void beginConversationIfNecessary(Method method, Object result)
-   {
-      
-      boolean simpleBegin = 
-            method.isAnnotationPresent(StartTask.class) || 
-            method.isAnnotationPresent(BeginTask.class) ||
-            ( method.isAnnotationPresent(Begin.class) && method.getAnnotation(Begin.class).ifOutcome().length==0 );
-      if ( simpleBegin )
-      {
-         if ( result!=null || method.getReturnType().equals(void.class) )
-         {
-            boolean nested = false;
-            if ( method.isAnnotationPresent(Begin.class) )
-            {
-               nested = method.getAnnotation(Begin.class).nested();
-            }
-            beginConversation( nested, getProcessDefinitionName(method) );
-            setFlushMode(method); //TODO: what if conversation already exists? Or a nested conversation?
-         }
-      }
-      else if ( method.isAnnotationPresent(Begin.class) )
-      {
-         String[] outcomes = method.getAnnotation(Begin.class).ifOutcome();
-         if ( outcomes.length==0 || Arrays.asList(outcomes).contains(result) )
-         {
-            beginConversation( 
-                  method.getAnnotation(Begin.class).nested(), 
-                  getProcessDefinitionName(method) 
-               );
-            setFlushMode(method); //TODO: what if conversation already exists? Or a nested conversation?
-         }
-      }
-      
-   }
-   
-   private void setFlushMode(Method method)
-   {
-      FlushModeType flushMode;
-      if (method.isAnnotationPresent(Begin.class))
-      {
-         flushMode = method.getAnnotation(Begin.class).flushMode();
-      }
-      else if (method.isAnnotationPresent(BeginTask.class))
-      {
-         flushMode = method.getAnnotation(BeginTask.class).flushMode();
-      }
-      else if (method.isAnnotationPresent(StartTask.class))
-      {
-         flushMode = method.getAnnotation(StartTask.class).flushMode();
-      }
-      else
-      {
-         return;
-      }
-      
-      PersistenceContexts.instance().changeFlushMode(flushMode);
-   }
-
-   private String getProcessDefinitionName(Method method) {
-      if ( method.isAnnotationPresent(Begin.class) )
-      {
-         return method.getAnnotation(Begin.class).pageflow();
-      }
-      if ( method.isAnnotationPresent(BeginTask.class) )
-      {
-         return method.getAnnotation(BeginTask.class).pageflow();
-      }
-      if ( method.isAnnotationPresent(StartTask.class) )
-      {
-         return method.getAnnotation(StartTask.class).pageflow();
-      }
-      //TODO: let them pass a pageflow name as a request parameter
-      return "";
-   }
-
-   private void beginConversation(boolean nested, String pageflowName)
-   {
-      if ( !Manager.instance().isLongRunningOrNestedConversation() )
-      {
-         Manager.instance().beginConversation( );
-         beginNavigation(pageflowName);
-      }
-      else if (nested)
-      {
-         Manager.instance().beginNestedConversation();
-         beginNavigation(pageflowName);
-      }
-   }
-   
-   private void beginNavigation(String pageflowName)
-   {
-      if ( !pageflowName.equals("") )
-      {
-         if ( !Init.instance().isJbpmInstalled() ) {
-            throw new IllegalArgumentException("attempting to begin pageflow but required org.jboss.seam.bpm.jbpm component is not installed");
-         }
-         Pageflow.instance().begin(pageflowName);
-      }
-   }
-
-   @SuppressWarnings("deprecation")
-   private void endConversationIfNecessary(Method method, Object result)
-   {
-      boolean isEndAnnotation = method.isAnnotationPresent(End.class);
-      boolean isEndTaskAnnotation = method.isAnnotationPresent(EndTask.class);
-      
-      boolean beforeRedirect = ( isEndAnnotation && method.getAnnotation(End.class).beforeRedirect() ) ||
-            ( isEndTaskAnnotation && method.getAnnotation(EndTask.class).beforeRedirect() );
-      
-      boolean endRoot = ( isEndAnnotation && method.getAnnotation(End.class).root() );
-
-      boolean simpleEnd = 
-            ( isEndAnnotation && method.getAnnotation(End.class).ifOutcome().length==0 ) || 
-            ( isEndTaskAnnotation && method.getAnnotation(EndTask.class).ifOutcome().length==0 );
-      if ( simpleEnd )
-      {
-         if ( result!=null || method.getReturnType().equals(void.class) ) //null outcome interpreted as redisplay
-         {
-            endConversation(beforeRedirect, endRoot);
-         }
-      }
-      else if ( isEndAnnotation )
-      {
-         String[] outcomes = method.getAnnotation(End.class).ifOutcome();
-         if ( Arrays.asList(outcomes).contains(result) )
-         {
-            endConversation(beforeRedirect, endRoot);
-         }
-      }
-      else if ( isEndTaskAnnotation )
-      {
-         //TODO: fix minor code duplication
-         String[] outcomes = method.getAnnotation(EndTask.class).ifOutcome();
-         if ( Arrays.asList(outcomes).contains(result) )
-         {
-            endConversation(beforeRedirect, endRoot);
-         }
-      }
-   }
-
-   private void endConversation(boolean beforeRedirect, boolean endRoot)
-   {
-      if(endRoot)
-      {
-         Manager.instance().endRootConversation(beforeRedirect);
-      }
-      else
-      {
-         Manager.instance().endConversation(beforeRedirect);
-      }
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().hasConversationManagementMethods();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationList.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationList.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationList.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,60 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.ScopeType.PAGE;
-import static org.jboss.seam.ScopeType.STATELESS;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.web.Session;
-
-/**
- * Factory for the conversation list
- * 
- * @author Gavin King
- */
- at Scope(STATELESS)
- at Name("org.jboss.seam.core.conversationListFactory")
- at Install(precedence=BUILT_IN)
- at BypassInterceptors
-public class ConversationList
-{
-   
-   protected List<ConversationEntry> createConversationEntryList()
-   {
-      ConversationEntries conversationEntries = ConversationEntries.getInstance();
-      if (conversationEntries==null)
-      {
-         return Collections.EMPTY_LIST;
-      }
-      else
-      {
-         Set<ConversationEntry> orderedEntries = new TreeSet<ConversationEntry>();
-         orderedEntries.addAll( conversationEntries.getConversationEntries() );
-         List<ConversationEntry> conversationEntryList = new ArrayList<ConversationEntry>( conversationEntries.size() );
-         for ( ConversationEntry entry: orderedEntries )
-         {
-            if ( entry.isDisplayable() && !Session.instance().isInvalid() )
-            {
-               conversationEntryList.add(entry);
-            }
-         }
-         return conversationEntryList;
-      }
-   }
-   
-   @Factory(value="org.jboss.seam.core.conversationList", autoCreate=true, scope=PAGE)
-   public List<ConversationEntry> getConversationEntryList()
-   {
-      return createConversationEntryList();
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationPropagation.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationPropagation.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationPropagation.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,300 +0,0 @@
-package org.jboss.seam.core;
-
-import java.util.Map;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.ConversationIdParameter;
-import org.jboss.seam.navigation.Page;
-import org.jboss.seam.navigation.Pages;
-
-/**
- * Overrideable component for extracting the conversation id
- * from a request.
- * 
- * @author Gavin King
- * @author Pete Muir
- * @author Shane Bryzak
- *
- */
- at Name("org.jboss.seam.core.conversationPropagation")
- at Scope(ScopeType.EVENT)
- at BypassInterceptors
- at Install(precedence=Install.BUILT_IN)
-public class ConversationPropagation
-{
-   private static final LogProvider log = Logging.getLogProvider(ConversationPropagation.class);
-
-   public static final String CONVERSATION_NAME_PARAMETER = "conversationName";
-   public static final String CONVERSATION_PROPAGATION_PARAMETER = "conversationPropagation";
-   
-   private String conversationName;
-   private String conversationId;
-   private String parentConversationId;
-   private boolean validateLongRunningConversation;
-   private PropagationType propagationType;   
-   private String pageflow;
-
-   /**
-    * Initialize the request conversation id, taking
-    * into account conversation propagation style, and
-    * any conversation id passed as a request parameter
-    * or in the PAGE context.
-    * 
-    * @param parameters the request parameters
-    */
-   public void restoreConversationId(Map parameters)
-   {
-      restoreNaturalConversationId(parameters);
-      restoreSyntheticConversationId(parameters);
-      restorePageContextConversationId();
-      getPropagationFromRequestParameter(parameters);
-      handlePropagationType(parameters);
-   }
-
-   private void handlePropagationType(Map parameters)
-   {
-      if ( propagationType == PropagationType.NONE )
-      {
-         conversationId = null;
-         parentConversationId = null;
-         validateLongRunningConversation = false;
-      }
-      else if (( propagationType == PropagationType.END ) || ( propagationType == PropagationType.ENDROOT ))
-      {
-         validateLongRunningConversation = false;
-      }
-   }
-
-   private void restorePageContextConversationId()
-   {
-      if ( Contexts.isPageContextActive() && isMissing(conversationId) ) 
-      {
-         //checkPageContext is a workaround for a bug in MySQL server-side state saving
-         
-         //if it is not passed as a request parameter,
-         //try to get it from the page context
-         org.jboss.seam.faces.FacesPage page = org.jboss.seam.faces.FacesPage.instance();
-         conversationId = page.getConversationId();
-         parentConversationId = null;
-         validateLongRunningConversation = page.isConversationLongRunning();
-      }
-   
-      else
-      {
-         log.trace("Found conversation id in request parameter: " + conversationId);
-      }
-   }
-
-   private void restoreNaturalConversationId(Map parameters)
-   {
-      conversationName = getRequestParameterValue(parameters, CONVERSATION_NAME_PARAMETER);
-      
-      if (conversationName != null && conversationName.contains(":"))
-      {
-         int idx = conversationName.indexOf(':');
-         conversationId = conversationName;
-         conversationName = conversationName.substring(0, idx);         
-         return;
-      }
-      
-      //First, try to get the conversation id from the request parameter defined for the page
-      String viewId = Pages.getCurrentViewId();
-      if ( viewId!=null )
-      {
-         Page page = Pages.instance().getPage(viewId);
-         
-         if(conversationName != null)
-         {
-             ConversationIdParameter currentConversationIdParameter = Pages.instance().getConversationIdParameter(conversationName);
-             
-             if(currentConversationIdParameter == null)
-             {
-                 throw new IllegalStateException("The conversationName specified: " + conversationName + ", does not exist.");
-             }
-             // Try to restore the conversation from parameters (the user has specified the exact conversation to restore using f:param)
-             conversationId = currentConversationIdParameter.getRequestConversationId(parameters);
-             
-             // NOTE: If conversationId is still null, don't try to resolve the EL here because we don't yet
-             // have a conversation and therefore things may blow up; resolve EL in getInitialConversationId()
-         }
-         else
-         {
-             conversationId = page.getConversationIdParameter().getRequestConversationId(parameters);
-         }         
-         //TODO: how about the parent conversation id?
-      }
-
-   }
-
-   private void restoreSyntheticConversationId(Map parameters)
-   {
-      //Next, try to get the conversation id from the globally defined request parameters
-      Manager manager = Manager.instance(); //TODO: move the conversationIdParameter to this class!
-      if ( isMissing(conversationId) )
-      {
-         conversationId = getRequestParameterValue( parameters, manager.getConversationIdParameter() );
-      }
-      if ( isMissing(parentConversationId) )
-      {
-         parentConversationId = getRequestParameterValue( parameters, manager.getParentConversationIdParameter() );
-      }
-   }
-
-   private void getPropagationFromRequestParameter(Map parameters)
-   {
-      String value = getRequestParameterValue(parameters, CONVERSATION_PROPAGATION_PARAMETER);
-      
-      if (value == null)
-      {
-         return;
-      }
-      
-      if (value.startsWith("begin"))
-      {
-         propagationType = PropagationType.BEGIN;
-         if ( value.length() > 6 )
-         {
-            pageflow = value.substring(6);
-         }         
-      }
-      else if (value.startsWith("join"))
-      {
-         propagationType = PropagationType.JOIN;
-         if ( value.length() > 5 )
-         {
-            pageflow = value.substring(5);
-         }         
-      }
-      else if (value.startsWith("nested"))
-      {
-         propagationType = PropagationType.NESTED;
-         if ( value.length() > 7 )
-         {
-            pageflow = value.substring(7);
-         }         
-      }
-      else
-      {
-         propagationType = PropagationType.valueOf(value.toUpperCase());
-      }
-   }
-
-   private static boolean isMissing(String storedConversationId) 
-   {
-      return storedConversationId==null || "".equals(storedConversationId);
-   }
-
-   /**
-    * Retrieve a parameter value from the request
-    * 
-    * @param parameters the request parameters
-    * @param parameterName the name of the parameter to retrieve
-    * @return the parameter value or null if not in the map
-    */
-   public static String getRequestParameterValue(Map parameters, String parameterName) 
-   {
-      Object object = parameters.get(parameterName);
-      if (object==null)
-      {
-         return null;
-      }
-      else
-      {
-         if ( object instanceof String )
-         {
-            //when it comes from JSF it is (usually?) a plain string
-            return (String) object;
-         }
-         else
-         {
-            //in a servlet it is a string array
-            String[] values = (String[]) object;
-            if (values.length!=1)
-            {
-               throw new IllegalArgumentException("expected exactly one value for " + parameterName + " request parameter");
-            }
-            return values[0];
-         }
-      }
-   }
-
-   /**
-    * @return the id of the current conversation
-    */
-   public String getConversationId()
-   {
-      return conversationId;
-   }
-
-   public void setConversationId(String conversationId)
-   {
-      this.conversationId = conversationId;
-   }
-
-   /**
-    * @return the id of the parent of the current conversation
-    */
-   public String getParentConversationId()
-   {
-      return parentConversationId;
-   }
-
-   public void setParentConversationId(String parentConversationId)
-   {
-      this.parentConversationId = parentConversationId;
-   }
-
-   /**
-    * Specifies that a redirect will occur if there is no
-    * conversation found on the server.
-    */
-   public boolean isValidateLongRunningConversation()
-   {
-      return validateLongRunningConversation;
-   }
-
-   public void setValidateLongRunningConversation(boolean validateLongRunningConversation)
-   {
-      this.validateLongRunningConversation = validateLongRunningConversation;
-   }
-
-   public static ConversationPropagation instance()
-   {
-      if ( !Contexts.isEventContextActive() )
-      {
-         throw new IllegalStateException("No active event context");
-      }
-      return (ConversationPropagation) Component.getInstance(ConversationPropagation.class, ScopeType.EVENT);
-   }
-
-   /**
-    * @return the conversation propagation type specified in the request
-    */
-   public PropagationType getPropagationType()
-   {
-      return propagationType;
-   }
-
-   public void setPropagationType(PropagationType propagationType)
-   {
-      this.propagationType = propagationType;
-   }
-
-   public String getPageflow()
-   {
-      return pageflow;
-   }
-   
-   public String getConversationName()
-   {
-      return this.conversationName;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationStack.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationStack.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationStack.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,70 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.ScopeType.PAGE;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.web.Session;
-
-/**
- * Factory for the "breadcrumbs", a stack with all
- * parent conversations of the current conversation.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at Name("org.jboss.seam.core.conversationStackFactory")
- at Install(precedence=BUILT_IN)
- at BypassInterceptors
-public class ConversationStack
-{
-   
-   protected List<ConversationEntry> createConversationEntryStack()
-   {
-      ConversationEntries conversationEntries = ConversationEntries.getInstance();
-      if (conversationEntries==null)
-      {
-         return Collections.EMPTY_LIST;
-      }
-      else
-      {
-         ConversationEntry currentConversationEntry = Manager.instance().getCurrentConversationEntry();
-         if (currentConversationEntry==null)
-         {
-            return Collections.EMPTY_LIST;
-         }
-         else
-         {
-            List<String> idStack = currentConversationEntry.getConversationIdStack();
-            List<ConversationEntry> conversationEntryStack = new ArrayList<ConversationEntry>( conversationEntries.size() );
-            ListIterator<String> ids = idStack.listIterator( idStack.size() );
-            while ( ids.hasPrevious() )
-            {
-               ConversationEntry entry = conversationEntries.getConversationEntry( ids.previous() );
-               if ( entry.isDisplayable() && !Session.instance().isInvalid() ) 
-               {
-                  conversationEntryStack.add(entry);
-               }
-            }
-            return conversationEntryStack;
-         }
-      }
-   }
-   
-   @Factory(value="org.jboss.seam.core.conversationStack", autoCreate=true, scope=PAGE)
-   public List<ConversationEntry> getConversationEntryStack()
-   {
-      return createConversationEntryStack();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationalInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationalInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ConversationalInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,81 +0,0 @@
-//$Id: ConversationalInterceptor.java 8626 2008-08-07 19:50:09Z pete.muir at jboss.org $
-package org.jboss.seam.core;
-
-import java.lang.reflect.Method;
-
-import org.jboss.seam.NoConversationException;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Conversational;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.bpm.BeginTask;
-import org.jboss.seam.annotations.bpm.StartTask;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.bpm.BusinessProcessInterceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Check that a conversational bean is not being invoked
- * outside the scope of a long-running conversation. If
- * it is, throw an exception.
- * 
- * @author Gavin King
- */
- at Interceptor(stateless=true,
-             around={BijectionInterceptor.class, BusinessProcessInterceptor.class})
-public class ConversationalInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = 1127583515811479385L;
-
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      Method method = invocation.getMethod();
-
-      if ( isNoConversationForConversationalBean(method) )
-      {
-         Events.instance().raiseEvent("org.jboss.seam.noConversation");
-         throw new NoConversationException( "no long-running conversation for @Conversational bean: " + getComponent().getName() );         
-      }
-
-      return invocation.proceed();
-   
-   }
-   
-   private boolean isNoConversationForConversationalBean(Method method)
-   {
-      boolean classlevelViolation = componentIsConversational() && 
-            !Manager.instance().isLongRunningOrNestedConversation()  &&
-            !method.isAnnotationPresent(Begin.class) &&
-            !method.isAnnotationPresent(StartTask.class) &&
-            !method.isAnnotationPresent(BeginTask.class) &&
-            !method.isAnnotationPresent(Destroy.class) && 
-            !method.isAnnotationPresent(Create.class); //probably superfluous
-      
-      if (classlevelViolation) return true;
-      
-      boolean methodlevelViolation = methodIsConversational(method) &&
-            !Manager.instance().isLongRunningOrNestedConversation();
-      
-      return methodlevelViolation;
-      
-   }
-
-   private boolean methodIsConversational(Method method) 
-   {
-      return method.isAnnotationPresent(Conversational.class);
-   }
-
-   private boolean componentIsConversational() 
-   {
-      return getComponent().getBeanClass().isAnnotationPresent(Conversational.class);
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().beanClassHasAnnotation(Conversational.class);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/EventInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/EventInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/EventInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,80 +0,0 @@
-package org.jboss.seam.core;
-
-import java.lang.reflect.Method;
-
-import org.jboss.seam.annotations.RaiseEvent;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.bpm.BusinessProcessInterceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.transaction.RollbackInterceptor;
-import org.jboss.seam.transaction.TransactionInterceptor;
-
-/**
- * Raises Seam events connected with a bean lifecycle.
- * 
- * @author Gavin King
- *
- */
- at Interceptor(stateless=true,
-             around={BijectionInterceptor.class, ConversationInterceptor.class, 
-                     TransactionInterceptor.class, BusinessProcessInterceptor.class, 
-                     RollbackInterceptor.class})
-public class EventInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = -136300200838134612L;
-   
-   /*@PostConstruct
-   public void postConstruct(InvocationContext ctx)
-   {
-      Events.instance().raiseEvent("org.jboss.seam.postConstruct." + component.getName());
-   }
-   @PreDestroy
-   public void preDestroy(InvocationContext ctx)
-   {
-      Events.instance().raiseEvent("org.jboss.seam.preDestroy." + component.getName());
-   }
-   @PrePassivate
-   public void prePassivate(InvocationContext ctx)
-   {
-      Events.instance().raiseEvent("org.jboss.seam.prePassivate." + component.getName());
-   }
-   
-   @PostActivate
-   public void postActivate(InvocationContext ctx)
-   {
-      Events.instance().raiseEvent("org.jboss.seam.postActivate." + component.getName());
-   }*/
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext ctx) throws Exception
-   {
-      Object result = ctx.proceed();
-      Method method = ctx.getMethod();
-      if ( result!=null || method.getReturnType().equals(void.class) )
-      {
-         if ( method.isAnnotationPresent(RaiseEvent.class) )
-         {
-            String[] types = method.getAnnotation(RaiseEvent.class).value();
-            if ( types.length==0 )
-            {
-               Events.instance().raiseEvent( method.getName() );
-            }
-            else
-            {
-               for (String type: types )
-               {
-                  Events.instance().raiseEvent(type);
-               }
-            }
-         }
-      }
-      return result;
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().beanClassHasAnnotation(RaiseEvent.class); 
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Events.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Events.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Events.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,160 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.List;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.async.AbstractDispatcher;
-import org.jboss.seam.async.CronSchedule;
-import org.jboss.seam.async.Dispatcher;
-import org.jboss.seam.async.Schedule;
-import org.jboss.seam.async.TimerSchedule;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Expressions.MethodExpression;
-import org.jboss.seam.core.Init.ObserverMethod;
-import org.jboss.seam.core.Init.ObserverMethodExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Support for Seam component-driven events
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.EVENT)
- at BypassInterceptors
- at Name("org.jboss.seam.core.events")
- at Install(precedence=BUILT_IN)
-public class Events 
-{
-   
-   private static final LogProvider log = Logging.getLogProvider(Events.class);
-   
-   /**
-    * Add a new listener for a given event type
-    * 
-    * @param type the event type
-    * @param methodBindingExpression a method binding, expressed in EL
-    * @param argTypes the argument types of the method binding
-    */
-   public void addListener(String type, String methodBindingExpression, Class... argTypes)
-   {
-      MethodExpression methodBinding = Expressions.instance().createMethodExpression(methodBindingExpression, Object.class, argTypes);
-      Init.instance().addObserverMethodExpression(type, methodBinding);
-   }
-   
-   /**
-    * Raise an event that is to be processed synchronously
-    * 
-    * @param type the event type
-    * @param parameters parameters to be passes to the listener method
-    */
-   public void raiseEvent(String type, Object... parameters)
-   {
-      //TODO: find a way to map event parameters to params in an EL-defined listener
-      log.trace("Processing event:" + type);
-      List<Init.ObserverMethodExpression> list = Init.instance().getObserverMethodExpressions(type);
-      if (list!=null)
-      {
-         for (ObserverMethodExpression listener: list )
-         {
-            listener.getMethodBinding().invoke(parameters);
-         }
-      }
-      List<Init.ObserverMethod> observers = Init.instance().getObserverMethods(type);
-      if (observers!=null)
-      {
-         for (ObserverMethod observer: observers)
-         {
-            String name = observer.getComponent().getName();
-            Object listener = Component.getInstance( name, observer.isCreate(), false );
-            if ( observer.getComponent().hasUnwrapMethod() )
-            {
-               listener = observer.getComponent().getScope().getContext().get(name);
-            }
-            
-            if (listener!=null)
-            {
-               observer.getComponent().callComponentMethod(listener, observer.getMethod(), parameters);
-            }
-         }
-      }
-   }
-   
-   /**
-    * Raise an event that is to be processed asynchronously
-    * 
-    * @param type the event type
-    * @param parameters parameters to be passes to the listener method
-    */
-   public void raiseAsynchronousEvent(String type, Object... parameters)
-   {
-      getDispatcher().scheduleAsynchronousEvent(type, parameters);
-   }
-
-   /**
-    * Raise an event that is to be processed according to a "schedule"
-    * 
-    * @see TimerSchedule (EJB, quartz or JDK timer service)
-    * @see CronSchedule (quartz timer service only)
-    * 
-    * @param type the event type
-    * @param schedule the schedule object, specific to the dispatcher strategy
-    * @param parameters parameters to be passes to the listener method
-    */
-   public void raiseTimedEvent(String type, Schedule schedule, Object... parameters)
-   {
-      getDispatcher().scheduleTimedEvent(type, schedule, parameters);
-   }
-   
-   /**
-    * Raise an event that is to be processed after successful completion of 
-    * the current transaction
-    * 
-    * @param type the event type
-    * @param parameters parameters to be passes to the listener method
-    */
-   public void raiseTransactionSuccessEvent(String type, Object... parameters)
-   {
-      getDispatcher().scheduleTransactionSuccessEvent(type, parameters);
-   }
-   
-   /**
-    * Raise an event that is to be processed after the current transaction
-    * ends
-    * 
-    * @param type the event type
-    * @param parameters parameters to be passes to the listener method
-    */
-   public void raiseTransactionCompletionEvent(String type, Object... parameters)
-   {
-      getDispatcher().scheduleTransactionCompletionEvent(type, parameters);
-   }
-   
-   /**
-    * @return the Dispatcher object to use for dispatching asynchronous
-    * and timed events
-    */
-   protected Dispatcher getDispatcher()
-   {
-      return AbstractDispatcher.instance();
-   }
-   
-   public static boolean exists()
-   {
-      return Contexts.isEventContextActive() && instance()!=null;
-   }
-
-   public static Events instance()
-   {
-      return (Events) Component.getInstance(Events.class, ScopeType.EVENT);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Expressions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Expressions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Expressions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,335 +0,0 @@
-//$Id: Expressions.java 14085 2011-04-22 09:36:42Z manaRH $
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
-
-import javax.el.ELContext;
-import javax.el.ExpressionFactory;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.el.EL;
-import org.jboss.seam.el.SeamExpressionFactory;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Factory for EL method and value expressions.
- * 
- * This default implementation uses JBoss EL.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Install(precedence=BUILT_IN)
- at Name("org.jboss.seam.core.expressions")
-public class Expressions implements Serializable
-{
-   private static final LogProvider log = Logging.getLogProvider(Expressions.class);
-   private static List<String> blacklist = new ArrayList<String>();
-   
-   // loading blacklisted patterns of non-valid EL expressions
-   static 
-   {
-      BufferedReader reader = null;
-      try
-      {
-         InputStream blacklistIS = ResourceLoader.instance().getResourceAsStream("blacklist.properties");
-         reader = new BufferedReader(new InputStreamReader(blacklistIS));
-         String line; 
-         while ((line = reader.readLine()) != null)
-         {
-            blacklist.add(line);
-         }
-      }
-      catch (IOException e)
-      {
-         log.warn("Black list of non-valid EL expressions was not found!");
-      }
-      finally
-      {
-         if (reader != null)
-         {
-            try
-            {
-               reader.close();
-            }
-            catch (IOException e) { }
-         }
-      }
-      
-   }
-   
-   /**
-    * Get the JBoss EL ExpressionFactory
-    */
-   public ExpressionFactory getExpressionFactory()
-   {
-      return SeamExpressionFactory.INSTANCE;
-   }
-   
-   /**
-    * Get an appropriate ELContext. If there is an active JSF request,
-    * use JSF's ELContext. Otherwise, use one that we create.
-    */
-   public ELContext getELContext() {
-       return EL.createELContext();
-   }
-
-   /**
-    * Create a value expression.
-    * 
-    * @param expression a JBoss EL value expression
-    */
-   public ValueExpression<Object> createValueExpression(String expression)
-   {
-      return createValueExpression(expression, Object.class);
-   }
-   
-   /**
-    * Create a method expression.
-    * 
-    * @param expression a JBoss EL method expression
-    */
-   public MethodExpression<Object> createMethodExpression(String expression)
-   {
-      return createMethodExpression(expression, Object.class);
-   }
-   
-   /**
-    * Create a value expression.
-    * 
-    * @param expression a JBoss EL value expression
-    * @param type the type of the value 
-    */
-   public <T> ValueExpression<T> createValueExpression(final String expression, final Class<T> type)
-   {
-
-      checkELExpression(expression);
-      
-      return new ValueExpression<T>()
-      {
-         private javax.el.ValueExpression facesValueExpression;
-         private javax.el.ValueExpression seamValueExpression;
-         
-         public javax.el.ValueExpression toUnifiedValueExpression()
-         {
-            if ( isFacesContextActive() )
-            {
-               if (facesValueExpression==null)
-               {
-                  facesValueExpression = createExpression();
-               }
-               return facesValueExpression;
-            }
-            else
-            {
-               if (seamValueExpression==null)
-               {
-                  seamValueExpression = createExpression();
-               }
-               return seamValueExpression;
-            }
-         }
-         
-         private javax.el.ValueExpression createExpression()
-         {
-            return getExpressionFactory().createValueExpression( getELContext(), expression, type );
-         }
-         
-         public T getValue()
-         {
-            return (T) toUnifiedValueExpression().getValue( getELContext() );
-         }        
-
-        public void setValue(T value)
-         {
-            toUnifiedValueExpression().setValue( getELContext(), value );
-         }
-         
-         public String getExpressionString()
-         {
-            return expression;
-         }
-         
-         public Class<T> getType()
-         {
-            // QUESTION shouldn't we use the type provided in the constructor?
-            return (Class<T>) toUnifiedValueExpression().getType( getELContext() );
-         }
-         
-      };
-   }
-   
-   /**
-    * Create a method expression.
-    * 
-    * @param expression a JBoss EL method expression
-    * @param type the method return type
-    * @param argTypes the method parameter types
-    */
-   public <T> MethodExpression<T> createMethodExpression(final String expression, final Class<T> type, final Class... argTypes)
-   {
-      checkELExpression(expression);
-      
-      return new MethodExpression<T>()
-      {
-         private javax.el.MethodExpression facesMethodExpression;
-         private javax.el.MethodExpression seamMethodExpression;
-         
-         public javax.el.MethodExpression toUnifiedMethodExpression()
-         {
-            if ( isFacesContextActive() )
-            {
-               if (facesMethodExpression==null)
-               {
-                  facesMethodExpression = createExpression();
-               }
-               return facesMethodExpression;
-            }
-            else
-            {
-               if (seamMethodExpression==null)
-               {
-                  seamMethodExpression = createExpression();
-               }
-               return seamMethodExpression;
-            }
-         }
-         
-         private javax.el.MethodExpression createExpression()
-         {
-            return getExpressionFactory().createMethodExpression( getELContext(), expression, type, argTypes );
-         }
-         
-         public T invoke(Object... args)
-         {
-            return (T) toUnifiedMethodExpression().invoke( getELContext(), args );
-         }
-         
-         public String getExpressionString()
-         {
-            return expression;
-         }
-         
-      };
-   }
-   
-   /**
-    * A value expression - an EL expression that evaluates to
-    * an attribute getter or get/set pair. This interface
-    * is just a genericized version of the Unified EL ValueExpression
-    * interface.
-    * 
-    * @author Gavin King
-    *
-    * @param <T> the type of the value
-    */
-   public static interface ValueExpression<T> extends Serializable
-   {
-      public T getValue();
-      public void setValue(T value);
-      public String getExpressionString();
-      public Class<T> getType();
-      /**
-       * @return the underlying Unified EL ValueExpression
-       */
-      public javax.el.ValueExpression toUnifiedValueExpression();
-   }
-   
-   /**
-    * A method expression - an EL expression that evaluates to
-    * a method. This interface is just a genericized version of 
-    * the Unified EL ValueExpression interface.
-    * 
-    * @author Gavin King
-    *
-    * @param <T> the method return type
-    */
-   public static interface MethodExpression<T> extends Serializable
-   {
-      public T invoke(Object... args);
-      public String getExpressionString();
-      /**
-       * @return the underlying Unified EL MethodExpression
-       */
-      public javax.el.MethodExpression toUnifiedMethodExpression();
-   }
-   
-   protected boolean isFacesContextActive()
-   {
-      return false;
-   }
-
-   /*
-    * Gets the validator from the Component object (if this is a Seam
-    * component, we need to use the validator for the bean class, not
-    * the proxy class) or from a Model object (if it is not a Seam
-    * component, there isn't any proxy).
-    * 
-    * @param instance the object to be validated
-    * @param componentName the name of the context variable, which might be a component name
-    * @return a ClassValidator object
-    */
-   /*private static ClassValidator getValidator(Object instance, String componentName)
-   {
-      if (instance==null || componentName==null )
-      {
-         throw new IllegalArgumentException();
-      }
-      Component component = Component.forName(componentName);
-      return ( component==null ? Model.forClass( instance.getClass() ) : component ).getValidator();
-   }*/
-   
-   public static Expressions instance()
-   { 
-       if (!Contexts.isApplicationContextActive()) {
-           return new Expressions();
-       } else {
-           return (Expressions) Component.getInstance(Expressions.class, ScopeType.APPLICATION);
-       }
-   }
-   
-   // optimalization of REGEX
-   final static String WHITESPACE_REGEX_STRING = "\\s";
-   final static Pattern WHITESPACE_REGEX_PATTERN = Pattern.compile(WHITESPACE_REGEX_STRING);
-   
-   private static void checkELExpression(final String expression)
-   {
-      if (expression == null)
-      {
-         return;
-      }
-      
-      final String expressionTrimmed = WHITESPACE_REGEX_PATTERN.matcher(expression).replaceAll("");
-      
-      for (int index = 0; blacklist.size() > index; index++)
-      {
-         if ( expressionTrimmed.contains(blacklist.get(index)) ) {
-            throw new IllegalArgumentException("This EL expression is not allowed!");
-         }
-      }
-      
-      // for any case blacklist is not provided this is definitely not permitted
-      if ( expressionTrimmed.contains(".getClass(") ||  expressionTrimmed.contains(".class.") )
-      {
-         throw new IllegalArgumentException("This EL expression is not allowed!");
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Init.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Init.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Init.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,643 +0,0 @@
-//$Id: Init.java 9717 2008-12-04 08:09:30Z dan.j.allen $
-package org.jboss.seam.core;
-
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Namespace;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.async.AsynchronousInterceptor;
-import org.jboss.seam.bpm.BusinessProcessInterceptor;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Expressions.MethodExpression;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.ejb.RemoveInterceptor;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.persistence.EntityManagerProxyInterceptor;
-import org.jboss.seam.persistence.HibernateSessionProxyInterceptor;
-import org.jboss.seam.persistence.ManagedEntityInterceptor;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.SecurityInterceptor;
-import org.jboss.seam.transaction.RollbackInterceptor;
-import org.jboss.seam.transaction.TransactionInterceptor;
-import org.jboss.seam.util.Resources;
-import org.jboss.seam.webservice.WSSecurityInterceptor;
-
-/**
- * A Seam component that holds Seam configuration settings
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.core.init")
- at Install(value=false, precedence=BUILT_IN)
-public class Init
-{
-   
-   public static List<String> DEFAULT_INTERCEPTORS = new ArrayList<String>(Arrays.asList(
-         SynchronizationInterceptor.class.getName(),
-         AsynchronousInterceptor.class.getName(),
-         RemoveInterceptor.class.getName(),
-         HibernateSessionProxyInterceptor.class.getName(),
-         EntityManagerProxyInterceptor.class.getName(),
-         MethodContextInterceptor.class.getName(),
-         EventInterceptor.class.getName(),
-         ConversationalInterceptor.class.getName(),
-         BusinessProcessInterceptor.class.getName(),
-         ConversationInterceptor.class.getName(),
-         BijectionInterceptor.class.getName(),
-         RollbackInterceptor.class.getName(),
-         TransactionInterceptor.class.getName(),
-         WSSecurityInterceptor.class.getName(),
-         SecurityInterceptor.class.getName()
-         )); 
-   
-   private LogProvider log = Logging.getLogProvider(Init.class);
-   
-   private Namespace rootNamespace = new Namespace(null);
-   
-   private Collection<Namespace> globalImports = new ArrayList<Namespace>();
-   
-   //private boolean isClientSideConversations = false;
-   private boolean jbpmInstalled;
-   private String jndiPattern;
-   private boolean debug;
-   private boolean myFacesLifecycleBug;
-   private boolean transactionManagementEnabled = true;
-   private boolean distributable = false;
-   
-   private List<String> interceptors = new ArrayList<String>(DEFAULT_INTERCEPTORS);
-   
-   private Map<String, List<ObserverMethod>> observerMethods = new HashMap<String, List<ObserverMethod>>();
-   private Map<String, List<ObserverMethodExpression>> observerMethodBindings = new HashMap<String, List<ObserverMethodExpression>>();
-   private Map<String, FactoryMethod> factories = new HashMap<String, FactoryMethod>();
-   private Map<String, FactoryExpression> factoryMethodExpressions = new HashMap<String, FactoryExpression>();
-   private Map<String, FactoryExpression> factoryValueExpressions = new HashMap<String, FactoryExpression>();
-   
-   private Set<String> autocreateVariables = new HashSet<String>();
-   private Set<String> installedFilters = new HashSet<String>();
-   private Set<String> resourceProviders = new HashSet<String>();
-   private Set<String> permissionResolvers = new HashSet<String>();
-   
-   private Set<String> hotDeployableComponents = new HashSet<String>();
-   
-   private Map<String, String> converters = new HashMap<String, String>();
-   private Map<String, String> validators = new HashMap<String, String>();
-   private Map<Class, String> convertersByClass = new HashMap<Class, String>();
-   
-   private long timestamp;
-   private long warTimestamp;
-   private File[] hotDeployPaths;
-   
-   public static Init instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application scope");
-      }
-      Init init = (Init) Contexts.getApplicationContext().get(Init.class);
-      //commented out because of some test cases:
-      /*if (init==null)
-      {
-         throw new IllegalStateException("No Init exists");
-      }*/
-      return init;
-   }
-   
-   /*public boolean isClientSideConversations()
-   {
-      return isClientSideConversations;
-   }
-
-   public void setClientSideConversations(boolean isClientSideConversations)
-   {
-      this.isClientSideConversations = isClientSideConversations;
-   }*/
-   
-   public static class FactoryMethod {
-       private Method method;
-       private Component component;
-       private ScopeType scope;
-      
-	   FactoryMethod(Method method, Component component)
-	   {
-	       this.method = method;
-           this.component = component;
-           scope = method.getAnnotation(org.jboss.seam.annotations.Factory.class).scope();
-	   }
-      
-      public ScopeType getScope()
-      {
-         return scope;
-      }
-      public Component getComponent()
-      {
-         return component;
-      }
-      public Method getMethod()
-      {
-         return method;
-      }
-      @Override
-      public String toString()
-      {
-         return "FactoryMethod(" + method + ')';
-      }
-   }
-   
-   public static class FactoryExpression 
-   {
-      private String expression;
-      private ScopeType scope;
-      
-      FactoryExpression(String expression, ScopeType scope)
-      {
-         this.expression = expression;
-         this.scope = scope;
-      }
-      
-      public MethodExpression getMethodBinding()
-      {
-         //TODO: figure out some way to cache this!!
-         return Expressions.instance().createMethodExpression(expression);
-      }
-      public ValueExpression getValueBinding()
-      {
-         //TODO: figure out some way to cache this!!
-         return Expressions.instance().createValueExpression(expression);
-      }
-      public ScopeType getScope()
-      {
-         return scope;
-      }
-      @Override
-      public String toString()
-      {
-         return "FactoryBinding(" + expression + ')';
-      }
-   }
-   
-   public FactoryMethod getFactory(String variable)
-   {
-      return factories.get(variable);
-   }
-   
-   public FactoryExpression getFactoryMethodExpression(String variable)
-   {
-      return factoryMethodExpressions.get(variable);
-   }
-   
-   public FactoryExpression getFactoryValueExpression(String variable)
-   {
-      return factoryValueExpressions.get(variable);
-   }
-   
-   private void checkDuplicateFactory(String variable)
-   {
-      if ( factories.containsKey(variable) )
-      {
-          throw new IllegalStateException("duplicate factory for: " + variable + " (duplicate is specified in a component)");
-      }
-      checkDuplicateFactoryExpressions(variable);
-   }
-   
-   private void checkDuplicateFactoryExpressions(String variable)
-   {
-       if ( factoryMethodExpressions.containsKey(variable) || factoryValueExpressions.containsKey(variable) )
-       {
-           throw new IllegalStateException("duplicate factory for: " + variable + " (duplicate is specified in components.xml)");
-       }
-   }
-   
-   private void checkDuplicateFactory(String variable, Component component)
-   {
-       if (factories.containsKey(variable))
-       {
-           String otherComponentName = factories.get(variable).getComponent().getName();
-           String componentName = component.getName();
-           if (componentName != null && !componentName.equals(otherComponentName))
-           {
-               throw new IllegalStateException("duplicate factory for: " + variable + " (duplicates are specified in " + componentName + " and " + otherComponentName + ")");
-           }
-       }
-       checkDuplicateFactoryExpressions(variable);
-   }
-   
-   
-   /** 
-    * makes sure appropriate namespaces exist for a name.  isComponent indicates the
-    * name is for a component type, in which case we don't create a namespace for the 
-    * last part
-    */
-   public Namespace initNamespaceForName(String name, boolean isComponent) {
-       Namespace namespace = getRootNamespace();
-       
-       StringTokenizer tokens = new StringTokenizer(name, ".");
-       while (tokens.hasMoreTokens()) {
-           String token = tokens.nextToken();
-
-           if (tokens.hasMoreTokens() || !isComponent) {
-               //we don't want to create a namespace for a componentName
-               namespace = namespace.getOrCreateChild(token);               
-           }
-       }
-
-       return namespace;
-   }
-   
-   public void addFactoryMethod(String variable, Method method, Component component)
-   {
-       checkDuplicateFactory(variable, component);
-	   factories.put(variable, new FactoryMethod(method, component));
-	   initNamespaceForName(variable, true);
-   }
-
-   public void addFactoryMethodExpression(String variable, String methodBindingExpression, ScopeType scope)
-   {
-      checkDuplicateFactory(variable);
-      factoryMethodExpressions.put(variable, new FactoryExpression(methodBindingExpression, scope));
-      initNamespaceForName(variable, true);
-   }
-   
-   public void addFactoryValueExpression(String variable, String valueBindingExpression, ScopeType scope)
-   {
-      checkDuplicateFactory(variable);
-      factoryValueExpressions.put(variable, new FactoryExpression(valueBindingExpression, scope));
-      initNamespaceForName(variable, true);
-
-   }
-   
-   public static class ObserverMethod 
-   {
-      private Method method;
-      private Component component;
-      private boolean create;
-      
-      ObserverMethod(Method method, Component component, boolean create)
-      {
-         this.method = method;
-         this.component = component;
-         this.create = create;
-      }
-
-      public Component getComponent()
-      {
-         return component;
-      }
-
-      public Method getMethod()
-      {
-         return method;
-      }
-
-      public boolean isCreate()
-      {
-         return create;
-      }
-
-      @Override
-      public String toString()
-      {
-         return "ObserverMethod(" + method + ')';
-      }
-      
-      @Override
-      public boolean equals(Object obj)
-      {
-         if (!(obj instanceof ObserverMethod)) return false;
-           
-         ObserverMethod other = (ObserverMethod) obj;
-         return this.component.equals(other.component) &&
-           Arrays.equals(this.method.getParameterTypes(), other.method.getParameterTypes()) &&
-           this.method.getName().equals(other.getMethod().getName());         
-      }
-   }
-   
-   public static class ObserverMethodExpression
-   {
-      private MethodExpression methodBinding;
-      
-      ObserverMethodExpression(MethodExpression method)
-      {
-         this.methodBinding = method;
-      }
-
-      public MethodExpression getMethodBinding()
-      {
-         return methodBinding;
-      }
-
-      @Override
-      public String toString()
-      {
-         return "ObserverMethodBinding(" + methodBinding + ')';
-      }
-   }
-   
-   public List<ObserverMethod> getObserverMethods(String eventType)
-   {
-      return observerMethods.get(eventType);
-   }
-   
-   public List<ObserverMethodExpression> getObserverMethodExpressions(String eventType)
-   {
-      return observerMethodBindings.get(eventType);
-   }
-   
-   public void addObserverMethod(String eventType, Method method, Component component, boolean create)
-   {
-      List<ObserverMethod> observerList = observerMethods.get(eventType);
-      if (observerList==null)
-      {
-         observerList = new ArrayList<ObserverMethod>();
-         observerMethods.put(eventType, observerList);
-      }
-      
-      ObserverMethod observerMethod = new ObserverMethod(method, component, create); 
-      if (!observerList.contains(observerMethod))
-      {
-         observerList.add( observerMethod );
-      }
-   }
-   
-   public void addObserverMethodExpression(String eventType, MethodExpression methodBinding)
-   {
-      List<ObserverMethodExpression> observerList = observerMethodBindings.get(eventType);
-      if (observerList==null)
-      {
-         observerList = new ArrayList<ObserverMethodExpression>();
-         observerMethodBindings.put(eventType, observerList);
-      }
-      observerList.add( new ObserverMethodExpression(methodBinding) );
-   }
-   
-   /**
-    * Remove any observer methods registered on the component. Needed to clean
-    * out old observer methods on hot deploy
-    * @param component
-    */
-   public void removeObserverMethods(Component component)
-   {
-      // TODO Better implementation ;-)
-      for (String eventType : observerMethods.keySet())
-      {
-         List<ObserverMethod> observerMethodsToRemove = new ArrayList<ObserverMethod>();
-         for (ObserverMethod observerMethod : observerMethods.get(eventType))
-         {
-            if (observerMethod.getComponent().equals(component))
-            {
-               observerMethodsToRemove.add(observerMethod);
-            }
-         }
-         observerMethods.get(eventType).removeAll(observerMethodsToRemove);
-      }
-   }
-   
-   public boolean isJbpmInstalled()
-   {
-      return jbpmInstalled;
-   }
-   
-   public String getJndiPattern() 
-   {
-      return jndiPattern;
-   }
-    
-   public void setJndiPattern(String jndiPattern) 
-   {
-	   this.jndiPattern = jndiPattern;
-   }
-   public boolean isDebug()
-   {
-      return debug;
-   }
-   public void setDebug(boolean debug)
-   {
-      this.debug = debug;
-   }
-   
-   /**
-    * The debug page is considered available if debug JAR is on the classpath
-    * and Seam is running in debug mode (to prevent it from being enabling in
-    * the event the JAR is inadvertently packaged).
-    */
-   public boolean isDebugPageAvailable()
-   {
-      return debug && Resources.getResource("META-INF/debug.xhtml", null) != null;   
-   }
-   
-   public boolean isMyFacesLifecycleBug()
-   {
-      return myFacesLifecycleBug;
-   }
-   
-   public void setMyFacesLifecycleBug(boolean myFacesLifecycleBugExists)
-   {
-      this.myFacesLifecycleBug = myFacesLifecycleBugExists;
-   }
-
-   public void setJbpmInstalled(boolean jbpmInstalled)
-   {
-      this.jbpmInstalled = jbpmInstalled;
-   }
-
-   public boolean isAutocreateVariable(String name)
-   {
-      return autocreateVariables.contains(name);
-   }
-   
-   public void addAutocreateVariable(String name)
-   {
-      autocreateVariables.add(name);
-   }
-
-   public Namespace getRootNamespace()
-   {
-      return rootNamespace;
-   }
-   
-   public void importNamespace(String namespaceName)
-   {
-      Namespace namespace = getRootNamespace();
-      StringTokenizer tokens = new StringTokenizer(namespaceName, ".");
-      while ( tokens.hasMoreTokens() )
-      {
-         namespace = namespace.getOrCreateChild( tokens.nextToken() );
-      }
-      globalImports.add(namespace);
-   }
-
-   public void addInstalledFilter(String name)
-   {
-      installedFilters.add(name);
-   }
-   
-   public Set<String> getInstalledFilters()
-   {
-      return installedFilters;
-   }
-   
-   public void addResourceProvider(String name)
-   {
-      resourceProviders.add(name);
-   }
-   
-   public Set<String> getResourceProviders()
-   {
-      return resourceProviders;
-   }
-   
-   public void addPermissionResolver(String name)
-   {
-      permissionResolvers.add(name);
-   }
-   
-   public Set<String> getPermissionResolvers()
-   {
-      return permissionResolvers;
-   }
-
-   public Set<String> getHotDeployableComponents()
-   {
-      return hotDeployableComponents;
-   }
-
-   public void addHotDeployableComponent(String name)
-   {
-      this.hotDeployableComponents.add(name);
-   }
-
-   public Map<String, String> getConverters()
-   {
-      return converters;
-   }
-
-   public Map<Class, String> getConvertersByClass()
-   {
-      return convertersByClass;
-   }
-
-   public Map<String, String> getValidators()
-   {
-      return validators;
-   }
-   
-   public boolean hasHotDeployableComponents()
-   {
-      return hotDeployPaths!=null;
-   }
-
-   public File[] getHotDeployPaths()
-   {
-      return hotDeployPaths;
-   }
-
-   public void setHotDeployPaths(File[] hotDeployJars)
-   {
-      this.hotDeployPaths = hotDeployJars;
-   }
-
-   public long getTimestamp()
-   {
-      return timestamp;
-   }
-
-   public void setTimestamp(long timestamp)
-   {
-      this.timestamp = timestamp;
-   }
-   
-   public long getWarTimestamp()
-   {
-      return warTimestamp;
-   }
-   
-   public void setWarTimestamp(long warTimestamp)
-   {
-      this.warTimestamp = warTimestamp;
-   }
-
-   public boolean isTransactionManagementEnabled()
-   {
-      return transactionManagementEnabled;
-   }
-
-   public void setTransactionManagementEnabled(boolean transactionManagementEnabled)
-   {
-      this.transactionManagementEnabled = transactionManagementEnabled;
-   }
-
-   public boolean isSecurityEnabled()
-   {
-      return Identity.isSecurityEnabled();
-   }
-
-   public void setSecurityEnabled(boolean securityEnabled)
-   {
-      Identity.setSecurityEnabled(securityEnabled);
-   }
-
-   public Collection<Namespace> getGlobalImports()
-   {
-      return globalImports;
-   }
-    
-   public List<String> getInterceptors()
-   {
-      return interceptors;
-   }
-    
-   public void setInterceptors(List<String> interceptors)
-   {
-      this.interceptors = interceptors;
-   }
-      
-   public boolean isDistributable()
-   {
-      return distributable;
-   }
-
-   public void setDistributable(boolean distributable)
-   {
-      this.distributable = distributable;
-   }
-
-   /**
-    * Sanity check to warn users if they have disabled core interceptors
-    */
-   public void checkDefaultInterceptors()
-   {
-      for (String defaultInterceptor : DEFAULT_INTERCEPTORS)
-      {
-         if (!interceptors.contains(defaultInterceptor))
-         {
-            log.warn("The built-in interceptor " + defaultInterceptor + " is missing. This application may not function as expected");
-         }
-      }
-      
-      if (distributable && !interceptors.contains(ManagedEntityInterceptor.class.getName()))
-      {
-         interceptors.add(ManagedEntityInterceptor.class.getName());
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Interpolator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Interpolator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Interpolator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,193 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.ScopeType.STATELESS;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.text.MessageFormat;
-import java.util.StringTokenizer;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Interpolates EL expressions in Strings
- * 
- * @author Gavin King
- */
- at BypassInterceptors
- at Scope(STATELESS)
- at Name("org.jboss.seam.core.interpolator")
- at Install(precedence = BUILT_IN)
-public class Interpolator
-{
-   
-   private static final LogProvider log = Logging.getLogProvider(Interpolator.class);
-   
-   public static Interpolator instance()
-   {
-      if (Contexts.isApplicationContextActive())
-      {
-         return (Interpolator) Component.getInstance(Interpolator.class, ScopeType.APPLICATION);
-      }
-      else
-      {
-         return new Interpolator(); // for unit testing
-      }
-   }
-   
-   /**
-    * Replace all EL expressions in the form #{...} with their evaluated values.
-    * 
-    * @param string
-    *           a template
-    * @return the interpolated string
-    */
-   public String interpolate(String string, Object... params)
-   {
-      if (params == null)
-      {
-         params = new Object[0];
-      }
-      
-      if (params.length > 10)
-      {
-         throw new IllegalArgumentException("more than 10 parameters");
-      }
-      
-      if (string.indexOf('#') >= 0 || string.indexOf('{') >= 0)
-      {
-         string = interpolateExpressions(string, params);
-      }
-      
-      return string;
-   }
-   
-   private String interpolateExpressions(String string, Object... params)
-   {
-      StringTokenizer tokens = new StringTokenizer(string, "#{}", true);
-      StringBuilder builder = new StringBuilder(string.length());
-      
-      while (tokens.hasMoreTokens())
-      {
-         String tok = tokens.nextToken();
-         
-         if ("#".equals(tok) && tokens.hasMoreTokens())
-         {
-            String nextTok = tokens.nextToken();
-            
-            while (nextTok.equals("#") && tokens.hasMoreTokens())
-            {
-               builder.append(tok);
-               nextTok = tokens.nextToken();
-            }
-            
-            if ("{".equals(nextTok))
-            {
-               String expression = "#{" + tokens.nextToken() + "}";
-               try
-               {
-                  Object value = Expressions.instance().createValueExpression(expression).getValue();
-                  if (value != null)
-                     builder.append(value);
-               }
-               catch (Exception e)
-               {
-                  log.debug("exception interpolating string: " + string, e);
-               }
-               tokens.nextToken(); // the trailing "}"
-               
-            }
-            else if (nextTok.equals("#"))
-            {
-               // could be trailing #
-               builder.append("#");
-               
-            }
-            else
-            {
-               int index;
-               try
-               {
-                  index = Integer.parseInt(nextTok.substring(0, 1));
-                  if (index >= params.length)
-                  {
-                     // log.warn("parameter index out of bounds: " + index +
-                     // " in: " + string);
-                     builder.append("#").append(nextTok);
-                  }
-                  else
-                  {
-                     builder.append(params[index]).append(nextTok.substring(1));
-                  }
-               }
-               catch (NumberFormatException nfe)
-               {
-                  builder.append("#").append(nextTok);
-               }
-            }
-         }
-         else if ("{".equals(tok))
-         {
-            StringBuilder expr = new StringBuilder();
-            
-            expr.append(tok);
-            int level = 1;
-            
-            while (tokens.hasMoreTokens())
-            {
-               String nextTok = tokens.nextToken();
-               expr.append(nextTok);
-               
-               if (nextTok.equals("{"))
-               {
-                  ++level;
-               }
-               else if (nextTok.equals("}"))
-               {
-                  if (--level == 0)
-                  {
-                     try
-                     {
-                        if (params.length == 0)
-                        {
-                           builder.append(expr.toString());
-                        }
-                        else
-                        {
-                           String value = new MessageFormat(expr.toString(), Locale.instance()).format(params);
-                           builder.append(value);
-                        }
-                     }
-                     catch (Exception e)
-                     {
-                        // if it is a bad message, use the expression itself
-                        builder.append(expr);
-                     }
-                     expr = null;
-                     break;
-                  }
-               }
-            }
-            
-            if (expr != null)
-            {
-               builder.append(expr);
-            }
-         }
-         else
-         {
-            builder.append(tok);
-         }
-      }
-      
-      return builder.toString();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Locale.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Locale.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Locale.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,45 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Manager component for the current locale. This base
- * implementation simply returns the server default 
- * locale.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at Name("org.jboss.seam.core.locale")
- at Install(precedence=BUILT_IN)
- at BypassInterceptors
-public class Locale 
-{
-
-   @Unwrap
-   public java.util.Locale getLocale()
-   {
-      return java.util.Locale.getDefault();
-   }
-     
-   public static java.util.Locale instance()
-   {
-       if ( Contexts.isApplicationContextActive() ) 
-       {
-          return (java.util.Locale) Component.getInstance(Locale.class, ScopeType.STATELESS);
-       } 
-       else 
-       {
-          return java.util.Locale.getDefault(); //for unit tests
-       }
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/LockTimeoutException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/LockTimeoutException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/LockTimeoutException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.core;
-
-/**
- * Thrown by the SynchronizationInterceptor when it fails to get a lock within the allocated time.
- *  
- * @author Shane Bryzak
- */
-public class LockTimeoutException extends Exception
-{
-   public LockTimeoutException()
-   {
-      super();   
-   }
-   
-   public LockTimeoutException(String message)
-   {
-      super(message);
-   }
-   
-   public LockTimeoutException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Manager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Manager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Manager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1066 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ConcurrentRequestTimeoutException;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.ConversationIdParameter;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.pageflow.Pageflow;
-import org.jboss.seam.util.Id;
-import org.jboss.seam.web.Session;
-
-/**
- * The Seam conversation manager.
- *
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
- at Scope(ScopeType.EVENT)
- at Name("org.jboss.seam.core.manager")
- at Install(precedence=BUILT_IN)
- at BypassInterceptors
-public class Manager
-{
-   public static final String EVENT_CONVERSATION_TIMEOUT = "org.jboss.seam.conversationTimeout";
-   public static final String EVENT_CONVERSATION_DESTROYED = "org.jboss.seam.conversationDestroyed";
-   public static final String EVENT_CONVERSATION_BEGIN = "org.jboss.seam.beginConversation";
-   public static final String EVENT_CONVERSATION_END = "org.jboss.seam.endConversation";
-   
-   private static final LogProvider log = Logging.getLogProvider(Manager.class);
-   
-   public static final String REDIRECT_FROM_MANAGER = "org.jboss.seam.core.Manager";
-
-   private static final String DEFAULT_ENCODING = "UTF-8";
-
-   //The id of the current conversation
-   private String currentConversationId;
-   private List<String> currentConversationIdStack;
-
-   //Is the current conversation "long-running"?
-   private boolean isLongRunningConversation;
-   
-   //private boolean updateModelValuesCalled;
-
-   private boolean destroyBeforeRedirect;
-   
-   private int conversationTimeout = 600000; //10 mins
-   private int concurrentRequestTimeout = 1000; //one second
-   
-   private String conversationIdParameter = "conversationId";
-   private String parentConversationIdParameter = "parentConversationId";
-
-   private String URIEncoding = DEFAULT_ENCODING;
-   
-   private FlushModeType defaultFlushMode;
-
-   /**
-    * Kills all conversations except the current one 
-    */
-   public void killAllOtherConversations()
-   {
-      ConversationEntries conversationEntries = ConversationEntries.instance();
-      Events events = Events.exists() ? Events.instance() : null;
-
-      if (conversationEntries != null)
-      {
-         List<ConversationEntry> entries = new ArrayList<ConversationEntry>(
-               conversationEntries.getConversationEntries());
-
-         for (ConversationEntry conversationEntry : entries)
-         {
-            // kill all entries expect the current one
-            // current conversation entry will be null if , kill-all is called
-            // inside a new @Begin
-            if (getCurrentConversationEntry() == null
-                  || !getCurrentConversationIdStack().contains(
-                        conversationEntry.getId()))
-            {
-               log.debug("Kill all other conversations, executed: kill conversation id = "
-                           + conversationEntry.getId());
-
-               boolean locked = conversationEntry.lockNoWait(); // we had better
-               // not wait for it, or we would be waiting for ALL other requests
-               try
-               {
-                  if (locked)
-                  {
-                     if (log.isDebugEnabled())
-                     {
-                        log.debug("conversation killed manually: " + conversationEntry.getId());
-                     }
-                  } 
-                  else
-                  {
-                     // if we could not acquire the lock, someone has left a
-                     // garbage lock lying around
-                     // the reason garbage locks can exist is that we don't
-                     // require a servlet filter to
-                     // exist - but if we do use SeamExceptionFilter, it will
-                     // clean up garbage and this
-                     // case should never occur
-
-                     // NOTE: this is slightly broken - in theory there is a
-                     // window where a new request
-                     // could have come in and got the lock just before us but
-                     // called touch() just
-                     // after we check the timeout - but in practice this would
-                     // be extremely rare,
-                     // and that request will get an
-                     // IllegalMonitorStateException when it tries to
-                     // unlock() the CE
-                     log.debug("kill conversation with garbage lock: "
-                           + conversationEntry.getId());
-                  }
-                  if (events != null)
-                  {
-                     events.raiseEvent(EVENT_CONVERSATION_DESTROYED, conversationEntry);
-                  }
-                  destroyConversation(conversationEntry.getId(), getSessionMap());
-               } 
-               finally
-               {
-                  if (locked)
-                  {
-                     conversationEntry.unlock();
-                  }
-               }
-            }
-         }
-      }      
-   }
-   
-   /**
-    * @return Map session
-    */
-   private Map<String, Object> getSessionMap()
-   {
-      // this method could be moved to a utility class
-      Map<String, Object> session = new HashMap<String, Object>();
-      String[] sessionAttributeNames = Contexts.getSessionContext().getNames();
-   
-      for (String attributeName : sessionAttributeNames)
-      {
-         session.put(attributeName, Contexts.getSessionContext().get(attributeName));
-      }
-      return session;
-   }   
-   
-   // DONT BREAK, icefaces uses this
-   public String getCurrentConversationId()
-   {
-      return currentConversationId;
-   }
-
-   /**
-    * Only public for the unit tests!
-    * @param id
-    */
-   public void setCurrentConversationId(String id)
-   {
-      currentConversationId = id;
-      currentConversationEntry = null;
-   }
-   
-   /**
-    * Change the id of the current conversation.
-    * 
-    * @param id the new conversation id
-    */
-   public void updateCurrentConversationId(String id)
-   {
-      if (id != null && id.equals(currentConversationId))
-      {
-         // the conversation id hasn't changed, do nothing       
-         return;
-      }
-      
-      if ( ConversationEntries.instance().getConversationIds().contains(id) )
-      {
-         throw new IllegalStateException("Conversation id is already in use: " + id);
-      }
-      
-      String[] names = Contexts.getConversationContext().getNames();
-      Object[] values = new Object[names.length];
-      for (int i=0; i<names.length; i++)
-      {
-         values[i] = Contexts.getConversationContext().get(names[i]);
-         Contexts.getConversationContext().remove(names[i]);
-      }
-      Contexts.getConversationContext().flush();
-      
-      ConversationEntry ce = ConversationEntries.instance().updateConversationId(currentConversationId, id);
-      String priorId = currentConversationId;
-      setCurrentConversationId(id);
-      
-      if (ce!=null)
-      {
-         setCurrentConversationIdStack( ce.getConversationIdStack() );
-         //TODO: what about child conversations?!
-      } 
-      else 
-      {
-          // when ce is null, the id stack will be left with a reference to
-          // the old conversation id, so we need patch that up
-          int pos = currentConversationIdStack.indexOf(priorId);
-          if (pos != -1) 
-          {
-              currentConversationIdStack.set(pos, id);
-          }          
-      }
-      
-      for (int i=0; i<names.length; i++)
-      {
-         Contexts.getConversationContext().set(names[i], values[i]);
-      }
-   }
-
-   private void touchConversationStack(List<String> stack)
-   {
-      if ( stack!=null )
-      {
-         //iterate in reverse order, so that current conversation 
-         //sits at top of conversation lists
-         ListIterator<String> iter = stack.listIterator( stack.size() );
-         while ( iter.hasPrevious() )
-         {
-            String conversationId = iter.previous();
-            ConversationEntry conversationEntry = ConversationEntries.instance().getConversationEntry(conversationId);
-            if (conversationEntry!=null)
-            {
-               conversationEntry.touch();
-            }
-         }
-      }
-   }
-   
-   private void endNestedConversations(String id)
-   {
-      for ( ConversationEntry ce: ConversationEntries.instance().getConversationEntries() )
-      {
-         if ( ce.getConversationIdStack().contains(id) )
-         {
-            ce.end();
-         }
-      }
-   }
-
-   public List<String> getCurrentConversationIdStack()
-   {
-      return currentConversationIdStack;
-   }
-
-   public void setCurrentConversationIdStack(List<String> stack)
-   {
-      currentConversationIdStack = stack;
-   }
-
-   private List<String> createCurrentConversationIdStack(String id)
-   {
-      currentConversationIdStack = new ArrayList<String>();
-      currentConversationIdStack.add(id);
-      return currentConversationIdStack;
-   }
-
-   public String getCurrentConversationDescription()
-   {
-      ConversationEntry ce = getCurrentConversationEntry();
-      if ( ce==null ) return null;
-      return ce.getDescription();
-   }
-
-   public Integer getCurrentConversationTimeout()
-   {
-      ConversationEntry ce = getCurrentConversationEntry();
-      if ( ce==null ) return null;
-      return ce.getTimeout();
-   }
-   
-   public Integer getCurrentConversationConcurrentRequestTimeout()
-   {
-      ConversationEntry ce = getCurrentConversationEntry();
-      if (ce == null) return null;
-      return ce.getConcurrentRequestTimeout();
-   }
-
-   public String getCurrentConversationViewId()
-   {
-      ConversationEntry ce = getCurrentConversationEntry();
-      if ( ce==null ) return null;
-      return ce.getViewId();
-   }
-   
-   public String getParentConversationViewId()
-   {
-      ConversationEntry conversationEntry = ConversationEntries.instance().getConversationEntry(getParentConversationId());
-      return conversationEntry==null ? null : conversationEntry.getViewId();
-   }
-   
-   public String getParentConversationId()
-   {
-      return currentConversationIdStack==null || currentConversationIdStack.size()<2 ?
-            null : currentConversationIdStack.get(1);
-   }
-
-   public String getRootConversationId()
-   {
-      return currentConversationIdStack==null || currentConversationIdStack.size()<1 ?
-            null : currentConversationIdStack.get( currentConversationIdStack.size()-1 );
-   }
-
-   // DONT BREAK, icefaces uses this
-   public boolean isLongRunningConversation()
-   {
-      return isLongRunningConversation;
-   }
-
-   public boolean isLongRunningOrNestedConversation()
-   {
-      return isLongRunningConversation() || isNestedConversation();
-   }
-
-   public boolean isReallyLongRunningConversation()
-   {
-      return isLongRunningConversation() && 
-            !getCurrentConversationEntry().isRemoveAfterRedirect() &&
-            !Session.instance().isInvalid();
-   }
-   
-   public boolean isNestedConversation()
-   {
-      return currentConversationIdStack!=null && 
-            currentConversationIdStack.size()>1;
-   }
-
-   public void setLongRunningConversation(boolean isLongRunningConversation)
-   {
-      this.isLongRunningConversation = isLongRunningConversation;
-   }
-
-   public static Manager instance()
-   {
-      if ( !Contexts.isEventContextActive() )
-      {
-         throw new IllegalStateException("No active event context");
-      }
-      Manager instance = (Manager) Component.getInstance(Manager.class, ScopeType.EVENT);
-      if (instance==null)
-      {
-         throw new IllegalStateException("No Manager could be created, make sure the Component exists in application scope");
-      }
-      return instance;
-   }
-
-   /**
-    * Clean up timed-out conversations
-    */
-   public void conversationTimeout(Map<String, Object> session)
-   {
-      long currentTime = System.currentTimeMillis();
-      ConversationEntries conversationEntries = ConversationEntries.getInstance();
-      if (conversationEntries!=null)
-      {
-         List<ConversationEntry> entries = new ArrayList<ConversationEntry>( conversationEntries.getConversationEntries() );
-         for (ConversationEntry conversationEntry: entries)
-         {
-            boolean locked = conversationEntry.lockNoWait(); //we had better not wait for it, or we would be waiting for ALL other requests
-            try
-            {
-               long delta = currentTime - conversationEntry.getLastRequestTime();
-               if ( delta > conversationEntry.getTimeout() )
-               {
-                  if ( locked )
-                  { 
-                     if ( log.isDebugEnabled() )
-                     {
-                        log.debug("conversation timeout for conversation: " + conversationEntry.getId());
-                     }
-                  }
-                  else
-                  {
-                     //if we could not acquire the lock, someone has left a garbage lock lying around
-                     //the reason garbage locks can exist is that we don't require a servlet filter to
-                     //exist - but if we do use SeamExceptionFilter, it will clean up garbage and this
-                     //case should never occur
-                     
-                     //NOTE: this is slightly broken - in theory there is a window where a new request 
-                     //      could have come in and got the lock just before us but called touch() just 
-                     //      after we check the timeout - but in practice this would be extremely rare, 
-                     //      and that request will get an IllegalMonitorStateException when it tries to 
-                     //      unlock() the CE
-                     log.debug("destroying conversation with garbage lock: " + conversationEntry.getId());
-                  }
-                  if ( Events.exists() ) 
-                  {
-                     Events.instance().raiseEvent(EVENT_CONVERSATION_TIMEOUT, conversationEntry.getId());
-                  }
-                  destroyConversation( conversationEntry.getId(), session );
-               }
-            }
-            finally
-            {
-               if (locked) conversationEntry.unlock();
-            }
-         }
-      }
-   }
-
-   /**
-    * Clean up all state associated with a conversation
-    */
-   private void destroyConversation(String conversationId, Map<String, Object> session)
-   {
-      Lifecycle.destroyConversationContext(session, conversationId);
-      ConversationEntries.instance().removeConversationEntry(conversationId);
-   }
-
-   /**
-    * Touch the conversation stack, destroy ended conversations, 
-    * and timeout inactive conversations.
-    */
-   public void endRequest(Map<String, Object> session)
-   {
-      if ( isLongRunningConversation() )
-      {
-         if ( log.isDebugEnabled() )
-         {
-            log.debug("Storing conversation state: " + getCurrentConversationId());
-         }
-         touchConversationStack( getCurrentConversationIdStack() );
-      }
-      else
-      {
-         if ( log.isDebugEnabled() )
-         {
-            log.debug("Discarding conversation state: " + getCurrentConversationId());
-         }
-         //now safe to remove the entry
-         removeCurrentConversationAndDestroyNestedContexts(session);
-      }
-
-      /*if ( !Init.instance().isClientSideConversations() ) 
-      {*/
-         // difficult question: is it really safe to do this here?
-         // right now we do have to do it after committing the Seam
-         // transaction because we can't close EMs inside a txn
-         // (this might be a bug in HEM)
-         Manager.instance().conversationTimeout(session);
-      //}
-   }
-   
-   public void unlockConversation()
-   {
-      ConversationEntry ce = getCurrentConversationEntry();
-      if (ce!=null) 
-      {
-         if ( ce.isLockedByCurrentThread() )
-         {
-            ce.unlock();
-         }
-      }
-      else if ( isNestedConversation() )
-      {
-         ConversationEntries.instance().getConversationEntry( getParentConversationId() ).unlock();
-      }
-   }
-
-   private void removeCurrentConversationAndDestroyNestedContexts(Map<String, Object> session) 
-   {
-      ConversationEntries conversationEntries = ConversationEntries.getInstance();
-      if (conversationEntries!=null)
-      {
-         conversationEntries.removeConversationEntry( getCurrentConversationId() );
-         destroyNestedConversationContexts( session, getCurrentConversationId() );
-      }
-   }
-
-   private void destroyNestedConversationContexts(Map<String, Object> session, String conversationId) 
-   {
-      List<ConversationEntry> entries = new ArrayList<ConversationEntry>( ConversationEntries.instance().getConversationEntries() );
-      for  ( ConversationEntry ce: entries )
-      {
-         if ( ce.getConversationIdStack().contains(conversationId) )
-         {
-            String entryConversationId = ce.getId();
-            log.debug("destroying nested conversation: " + entryConversationId);
-            destroyConversation(entryConversationId, session);
-         }
-      }
-   }
-
-   /**
-    * Look for a conversation propagation style in the request
-    * parameters and begin, nested or join the conversation,
-    * as necessary.
-    * 
-    * @param parameters the request parameters
-    */
-   public void handleConversationPropagation(Map parameters)
-   {      
-      ConversationPropagation propagation = ConversationPropagation.instance();
-      
-      if (propagation.getPropagationType() == null)
-      {
-         return;
-      }
-
-      switch (propagation.getPropagationType())
-      {
-         case BEGIN:
-            if ( isLongRunningConversation )
-            {
-               throw new IllegalStateException("long-running conversation already active");
-            }
-            beginConversation();
-            
-            if (propagation.getPageflow() != null)
-            {
-               Pageflow.instance().begin( propagation.getPageflow() );
-            }
-            break;
-         case JOIN:
-            if ( !isLongRunningConversation )
-            {
-               beginConversation();
-               
-               if (propagation.getPageflow() != null)
-               {
-                  Pageflow.instance().begin( propagation.getPageflow() );
-               }
-            }
-            break;
-         case NESTED:
-            if ( isLongRunningOrNestedConversation() ) 
-            {
-                beginNestedConversation();
-            }
-            else 
-            {
-                beginConversation();
-            }
-            
-            if (propagation.getPageflow() != null)
-            {
-               Pageflow.instance().begin( propagation.getPageflow() );
-            }
-            break;
-         case END:
-            endConversation(false);
-            break;
-         case ENDROOT:
-            endRootConversation(false);
-            break;
-      }
-   }
-   
-   /**
-    * Initialize the request conversation context, given the 
-    * conversation id and optionally a parent conversation id.
-    * If no conversation entry is found for the first id, try
-    * the parent, and if that also fails, initialize a new 
-    * temporary conversation context.
-    * 
-    * @return false if the conversation entry was not found
-    *         and it was required
-    */
-   public boolean restoreConversation() 
-   {
-      ConversationPropagation cp = ConversationPropagation.instance();
-      String conversationId = cp.getConversationId();
-      String parentConversationId = cp.getParentConversationId();
-      ConversationEntry ce = null;
-      if (conversationId!=null)
-      {
-         ConversationEntries entries = ConversationEntries.instance();
-         ce = entries.getConversationEntry(conversationId);
-         if (ce==null)
-         {
-            ce = entries.getConversationEntry(parentConversationId);
-         }
-      }
-      
-      return restoreAndLockConversation(ce) || !cp.isValidateLongRunningConversation();
-   }
-
-   private boolean restoreAndLockConversation(ConversationEntry ce)
-   {
-      if (ce == null)
-      {
-         //there was no id in either place, so there is no
-         //long-running conversation to restore
-         log.debug("No stored conversation");
-         initializeTemporaryConversation();
-         return false;
-      }
-      else if ( ce.lock() )
-      {
-         // do this ASAP, since there is a window where conversationTimeout() might  
-         // try to destroy the conversation, even if he cannot obtain the lock!
-         touchConversationStack( ce.getConversationIdStack() );
-
-         //we found an id and obtained the lock, so restore the long-running conversation
-         log.debug("Restoring conversation with id: " + ce.getId());
-         setLongRunningConversation(true);
-         setCurrentConversationId( ce.getId() );
-         setCurrentConversationIdStack( ce.getConversationIdStack() );
-
-         boolean removeAfterRedirect = ce.isRemoveAfterRedirect() && !Pages.isDebugPage(); //TODO: hard dependency to JSF!!
-         if (removeAfterRedirect)
-         {
-            setLongRunningConversation(false);
-            ce.setRemoveAfterRedirect(false);
-         }
-         
-         return true;
-
-      } 
-      else
-      {
-         log.debug("Concurrent call to conversation");
-         throw new ConcurrentRequestTimeoutException("Concurrent call to conversation");
-      }
-   }
-
-   /**
-    * Initialize a new temporary conversation context,
-    * and assign it a conversation id.
-    */
-   public void initializeTemporaryConversation()
-   {
-      String id = generateInitialConversationId();
-      setCurrentConversationId(id);
-      createCurrentConversationIdStack(id);
-      setLongRunningConversation(false);
-   }
-
-   protected String generateInitialConversationId()
-   {
-      return Id.nextId();
-   }
-
-   private ConversationEntry createConversationEntry()
-   {
-      ConversationEntry entry = ConversationEntries.instance()
-            .createConversationEntry( getCurrentConversationId(), getCurrentConversationIdStack() );
-      if ( !entry.isNested() ) 
-      {
-         //if it is a newly created nested 
-         //conversation, we already own the
-         //lock
-         entry.lock();
-      }
-      return entry;
-   }
-
-   /**
-    * Promote a temporary conversation and make it long-running
-    */
-   public void beginConversation()
-   {
-      if ( !isLongRunningConversation() )
-      {
-         log.debug("Beginning long-running conversation");
-         setLongRunningConversation(true);
-         createConversationEntry();
-         Conversation.instance(); //force instantiation of the Conversation in the outer (non-nested) conversation
-         storeConversationToViewRootIfNecessary();
-         if ( Events.exists() ) Events.instance().raiseEvent(EVENT_CONVERSATION_BEGIN);
-      }
-   }
-
-   /**
-    * Begin a new nested conversation.
-    */
-   public void beginNestedConversation()   
-   {
-      log.debug("Beginning nested conversation");
-      List<String> oldStack = getCurrentConversationIdStack();
-      if (oldStack==null)
-      {
-         throw new IllegalStateException("No long-running conversation active");
-      }
-
-      String id = Id.nextId();
-      setCurrentConversationId(id);      
-      createCurrentConversationIdStack(id).addAll(oldStack);
-      createConversationEntry();
-      storeConversationToViewRootIfNecessary();
-      if ( Events.exists() ) Events.instance().raiseEvent(EVENT_CONVERSATION_BEGIN);
-   }
-   
-   /**
-    * Make a long-running conversation temporary.
-    */
-   public void endConversation(boolean beforeRedirect)
-   {
-      if ( isLongRunningConversation() )
-      {
-         log.debug("Ending long-running conversation");
-         if ( Events.exists() ) Events.instance().raiseEvent(EVENT_CONVERSATION_END);
-         setLongRunningConversation(false);
-         destroyBeforeRedirect = beforeRedirect;
-         endNestedConversations( getCurrentConversationId() );
-         storeConversationToViewRootIfNecessary();
-      }
-   }
-   
-   /**
-    * Make the root conversation in the current conversation stack temporary.
-    */
-   public void endRootConversation(boolean beforeRedirect)
-   {
-      if(isNestedConversation())
-      {
-         switchConversation(getRootConversationId());
-      }
-      
-      endConversation(beforeRedirect);
-   }
-   
-   protected void storeConversationToViewRootIfNecessary() {}
-
-   // two reasons for this: 
-   // (1) a cache
-   // (2) so we can unlock() it after destruction of the session context 
-   private ConversationEntry currentConversationEntry; 
-   
-   public ConversationEntry getCurrentConversationEntry() 
-   {
-      if (currentConversationEntry==null)
-      {
-         currentConversationEntry = ConversationEntries.instance().getConversationEntry( getCurrentConversationId() );
-      }
-      return currentConversationEntry;
-   }
-   
-   /**
-    * Leave the scope of the current conversation, leaving
-    * it completely intact.
-    */
-   public void leaveConversation()
-   {
-      unlockConversation();
-      initializeTemporaryConversation();
-   }
-
-   /**
-    * Switch to another long-running conversation and mark the conversation as long-running,
-    * overriding a previous call in the same thread to demote a long-running conversation.
-    * 
-    * @param id the id of the conversation to switch to
-    * @return true if the conversation exists
-    */
-   public boolean switchConversation(String id)
-   {
-      return switchConversation(id, true);
-   }
-
-   /**
-    * Switch to another long-running conversation.
-    * 
-    * @param id the id of the conversation to switch to
-    * @param promote promote the current conversation to long-running, overriding any previous demotion
-    * @return true if the conversation exists
-    */
-   public boolean switchConversation(String id, boolean promote)
-   {
-      ConversationEntry ce = ConversationEntries.instance().getConversationEntry(id);
-      if (ce!=null)
-      {
-         if ( ce.lock() )
-         {
-            unlockConversation();
-            setCurrentConversationId(id);
-            setCurrentConversationIdStack( ce.getConversationIdStack() );
-            if (promote)
-            {
-               setLongRunningConversation(true);
-            }
-            return true;
-         }
-         else
-         {
-            return false;
-         }
-      }
-      else
-      {
-         return false;
-      }
-   }
-
-   public int getConversationTimeout() {
-      return conversationTimeout;
-   }
-
-   public void setConversationTimeout(int conversationTimeout) {
-      this.conversationTimeout = conversationTimeout;
-   }
-   
-   /**
-    * Temporarily promote a temporary conversation to
-    * a long running conversation for the duration of
-    * a browser redirect. After the redirect, the 
-    * conversation will be demoted back to a temporary
-    * conversation.
-    */
-   public void beforeRedirect()
-   {
-      //DONT BREAK, icefaces uses this
-      if (!destroyBeforeRedirect)
-      {
-         ConversationEntry ce = getCurrentConversationEntry();
-         if (ce==null)
-         {
-            ce = createConversationEntry();
-         }
-         //ups, we don't really want to destroy it on this request after all!
-         ce.setRemoveAfterRedirect( !isLongRunningConversation() );
-         setLongRunningConversation(true);
-      }
-   }
-
-   protected static boolean isDifferentConversationId(ConversationIdParameter sp, ConversationIdParameter tp)
-   {
-      return sp.getName()!=tp.getName() && ( sp.getName()==null || !sp.getName().equals( tp.getName() ) );
-   }
-   
-   /**
-    * Add the conversation id to a URL, if necessary
-    * 
-    * @deprecated use encodeConversationId(String url, String viewId)
-    */
-   public String encodeConversationId(String url)
-   {
-      //DONT BREAK, icefaces uses this
-      return encodeConversationIdParameter( url, getConversationIdParameter(), getCurrentConversationId() );
-   }
-         
-   /**
-    * Add the conversation id to a URL, if necessary
-    */
-   public String encodeConversationId(String url, String viewId) 
-   {
-      //DONT BREAK, icefaces uses this
-      ConversationIdParameter cip = Pages.instance().getPage(viewId).getConversationIdParameter();
-      return encodeConversationIdParameter( url, cip.getParameterName(), cip.getParameterValue() );
-   }
- 
-   /**
-    * Add the conversation id to a URL, if necessary
-    */
-   public String encodeConversationId(String url, String viewId, String conversationId) 
-   {
-      //DONT BREAK, icefaces uses this
-      ConversationIdParameter cip = Pages.instance().getPage(viewId).getConversationIdParameter();
-      return encodeConversationIdParameter( url, cip.getParameterName(), cip.getParameterValue(conversationId) );
-   }
- 
-   protected String encodeConversationIdParameter(String url, String paramName, String paramValue)
-   {         
-      if ( Session.instance().isInvalid() || containsParameter(url, paramName) )
-      {
-         return url;
-      }
-      else if (destroyBeforeRedirect)
-      {
-         if ( isNestedConversation() )
-         {
-            return new StringBuilder( url.length() + paramName.length() + 5 )
-                  .append(url)
-                  .append( url.contains("?") ? '&' : '?' )
-                  .append(paramName)
-                  .append('=')
-                  .append( encode( getParentConversationId() ) )
-                  .toString();
-         }
-         else
-         {
-            return url;
-         }
-      }
-      else
-      {
-         StringBuilder builder = new StringBuilder( url.length() + paramName.length() + 5 )
-               .append(url)
-               .append( url.contains("?") ? '&' : '?' )
-               .append(paramName)
-               .append('=')
-               .append( encode(paramValue) );
-         if ( isNestedConversation() && !isReallyLongRunningConversation() )
-         {
-            builder.append('&')
-                  .append(parentConversationIdParameter)
-                  .append('=')
-                  .append( encode( getParentConversationId() ) );
-         }
-         return builder.toString();
-      }
-   }
-
-   /**
-    * Add the parameters to a URL
-    */
-   public String encodeParameters(String url, Map<String, Object> parameters)
-   {
-      if ( parameters.isEmpty() ) return url;
-      
-      StringBuilder builder = new StringBuilder(url);
-      for ( Map.Entry<String, Object> param: parameters.entrySet() )
-      {
-         String parameterName = param.getKey();
-         if ( !containsParameter(url, parameterName) )
-         {
-            Object parameterValue = param.getValue();
-            if (parameterValue instanceof Iterable)
-            {
-               for ( Object value: (Iterable) parameterValue )
-               {
-                  builder.append('&')
-                        .append(parameterName)
-                        .append('=');
-                  if (value!=null)
-                  {
-                     builder.append(encode(value));
-                  }
-               }
-            }
-            else
-            {
-               builder.append('&')
-                     .append(parameterName)
-                     .append('=');
-               if (parameterValue!=null)
-               {
-                  builder.append(encode(parameterValue));
-               }
-            }
-         }
-      }
-      if ( url.indexOf('?')<0 ) 
-      {
-         builder.setCharAt( url.length() ,'?' );
-      }
-      return builder.toString();
-   }
-
-   private boolean containsParameter(String url, String parameterName)
-   {
-      return url.indexOf('?' + parameterName + '=')>0 || 
-            url.indexOf( '&' + parameterName + '=')>0;
-   }
-
-   private String encode(Object value)
-   {
-      try
-      {
-         return URLEncoder.encode(String.valueOf(value),getUriEncoding());
-      }
-      catch (UnsupportedEncodingException iee)
-      {
-         throw new RuntimeException(iee);
-      }
-   }
-   
-   public String getConversationIdParameter()
-   {
-      return conversationIdParameter;
-   }
-
-   public void setConversationIdParameter(String conversationIdParameter)
-   {
-      this.conversationIdParameter = conversationIdParameter;
-   }
-
-   public String getParentConversationIdParameter()
-   {
-      return parentConversationIdParameter;
-   }
-
-   public void setParentConversationIdParameter(String nestedConversationIdParameter)
-   {
-      this.parentConversationIdParameter = nestedConversationIdParameter;
-   }
-
-   public int getConcurrentRequestTimeout()
-   {
-      return concurrentRequestTimeout;
-   }
-
-   public void setConcurrentRequestTimeout(int requestWait)
-   {
-      this.concurrentRequestTimeout = requestWait;
-   }
-   
-   public FlushModeType getDefaultFlushMode()
-   {
-      return defaultFlushMode;
-   }
-   
-   public void setDefaultFlushMode(FlushModeType defaultFlushMode)
-   {
-      this.defaultFlushMode = defaultFlushMode;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "Manager(" + currentConversationIdStack + ")";
-   }
-
-   public void redirect(String viewId, String id)
-   {
-      //declare it here since ConversationEntry calls it!
-      throw new UnsupportedOperationException();
-   }
-
-   public void redirect(String viewId)
-   {
-      //declare it here since Conversation calls it!
-      throw new UnsupportedOperationException();
-   }
-
-   protected void flushConversationMetadata()
-   {
-      if ( isLongRunningConversation() )
-      {
-         //important: only do this stuff when a long-running
-         //           conversation exists, otherwise we would
-         //           force creation of a conversation entry
-         Conversation.instance().flush();
-      }
-   }
-
-   public String getUriEncoding() {
-       return URIEncoding;
-   }
-
-   public void setUriEncoding(String encoding) {
-       URIEncoding = encoding;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/MethodContextInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/MethodContextInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/MethodContextInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,57 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.ComponentType.ENTITY_BEAN;
-
-import java.lang.reflect.Method;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.security.SecurityInterceptor;
-
-/**
- * Sets up the METHOD context and unproxies the SFSB 
- * for the duration of the call.
- * 
- * @author Gavin King
- *
- */
- at Interceptor(stateless=true, around={BijectionInterceptor.class, EventInterceptor.class, SecurityInterceptor.class})
-public class MethodContextInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = 6833040683938889232L;
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext ctx) throws Exception
-   {
-      Component comp = getComponent();
-      String name = comp.getName();
-      Object target = ctx.getTarget();
-      Method method = ctx.getMethod();
-      Object[] parameters = ctx.getParameters();
-      Context outerMethodContext = Lifecycle.beginMethod();
-      try
-      {
-         Contexts.getMethodContext().set(name, target);
-         Contexts.getMethodContext().set("org.jboss.seam.this", target);
-         Contexts.getMethodContext().set("org.jboss.seam.method", method);
-         Contexts.getMethodContext().set("org.jboss.seam.parameters", parameters);
-         Contexts.getMethodContext().set("org.jboss.seam.component", comp);
-         return ctx.proceed();
-      }
-      finally
-      {
-         Lifecycle.endMethod(outerMethodContext);
-      }
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().getType()!=ENTITY_BEAN;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Mutable.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Mutable.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Mutable.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,23 +0,0 @@
-package org.jboss.seam.core;
-
-import java.io.Serializable;
-
-/**
- * Must be implemented by any SESSION or CONVERSATION scoped
- * mutable JavaBean component that will be used in a clustered
- * environment. If this interface is not implemented correctly,
- * changes may not be replicated across the cluster (depending
- * upon the servlet engine implementation).
- * 
- * @author Gavin King
- *
- */
-public interface Mutable extends Serializable
-{
-   /**
-    * Get and clear the dirty flag.
-    * 
-    * @return true if the instance is dirty and requires replication
-    */
-   public boolean clearDirty();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/PropagationType.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/PropagationType.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/PropagationType.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,17 +0,0 @@
-package org.jboss.seam.core;
-
-/**
- * Various options controlling how a conversation is propagated.
- *  
- * @author Shane Bryzak
- */
-public enum PropagationType
-{
-   DEFAULT,
-   BEGIN,
-   JOIN,
-   NESTED,
-   NONE,
-   END,
-   ENDROOT
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ResourceBundle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ResourceBundle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ResourceBundle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Manager component for the Seam resource bundle
- * 
- * @see SeamResourceBundle
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at BypassInterceptors
- at Name("org.jboss.seam.core.resourceBundle")
- at Install(precedence=BUILT_IN)
-public class ResourceBundle 
-{
-   @Unwrap
-   public java.util.ResourceBundle getResourceBundle()
-   {
-      return SeamResourceBundle.getBundle();
-   }
-   
-   /**
-    * @return the ResourceBundle instance
-    */
-   public static java.util.ResourceBundle instance()
-   {
-      return (java.util.ResourceBundle) Component.getInstance(ResourceBundle.class);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ResourceLoader.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ResourceLoader.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/ResourceLoader.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,114 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.MissingResourceException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Resources;
-import org.jboss.seam.util.Strings;
-
-/**
- * Access to application resources and resource bundles.
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.STATELESS)
- at BypassInterceptors
- at Install(precedence=BUILT_IN)
- at Name("org.jboss.seam.core.resourceLoader")
-public class ResourceLoader
-{
-   private static final LogProvider log = Logging.getLogProvider(ResourceLoader.class);
-   
-   private String[] bundleNames = {"messages"};
-   
-   /**
-    * The configurable list of delegate resource bundle names
-    * 
-    * @return an array of resource bundle names
-    */
-   public String[] getBundleNames() 
-   {
-      return bundleNames;
-   }
-   
-   public void setBundleNames(String[] bundleNames) 
-   {
-      this.bundleNames = bundleNames;
-   }
-   
-   public InputStream getResourceAsStream(String resource)
-   {
-      return Resources.getResourceAsStream( resource, ServletLifecycle.getCurrentServletContext() );
-   }
-   
-   public URL getResource(String resource) 
-   {
-      return Resources.getResource( resource, ServletLifecycle.getCurrentServletContext() );
-   }
-   
-   /**
-    * Load a resource bundle by name (may be overridden by subclasses
-    * who want to use non-standard resource bundle types).
-    * 
-    * @param bundleName the name of the resource bundle
-    * @return an instance of java.util.ResourceBundle
-    */
-   public java.util.ResourceBundle loadBundle(String bundleName) 
-   {
-      try
-      {
-         java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle( 
-               bundleName, 
-               Locale.instance(), 
-               Thread.currentThread().getContextClassLoader() 
-         );
-         
-         // for getting bundle from page level message properties
-         if (bundle == null){
-            bundle = java.util.ResourceBundle.getBundle( 
-                  bundleName, 
-                  Locale.instance(), 
-                  ServletLifecycle.getCurrentServletContext().getClass().getClassLoader() 
-            );
-         }
-         log.debug("loaded resource bundle: " + bundleName);
-         return bundle;
-      }
-      catch (MissingResourceException mre)
-      {
-         log.debug("resource bundle missing: " + bundleName);
-         return null;
-      }
-   }
-   
-   @Override
-   public String toString()
-   {
-      String concat = bundleNames==null ? "" : Strings.toString( ", ", (Object[]) bundleNames );
-      return "ResourceBundle(" + concat + ")";
-   }
-   
-   public static ResourceLoader instance()
-   {
-      if (!Contexts.isApplicationContextActive()) {
-         return new ResourceLoader();
-      } else {
-         return (ResourceLoader) Component.getInstance(ResourceLoader.class, ScopeType.STATELESS);
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/SeamResourceBundle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/SeamResourceBundle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/SeamResourceBundle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,183 +0,0 @@
-package org.jboss.seam.core;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.util.EnumerationEnumeration;
-
-/**
- * The Seam resource bundle which searches for resources in delegate resource
- * bundles specified in pages.xml, and a configurable list of delegate resource
- * bundles specified in components.xml.
- * 
- * @see ResourceLoader
- * @author Gavin King
- * 
- */
-public class SeamResourceBundle extends java.util.ResourceBundle
-{
-   private Map<Init,Map<Locale, List<ResourceBundle>>> bundleCache = new ConcurrentHashMap<Init,Map<Locale, List<ResourceBundle>>>();
-
-   private Map<Locale, List<ResourceBundle>> getCachedBundle()
-   {
-      Init init; 
-      if(Contexts.isApplicationContextActive())
-      {
-         init = (Init)Contexts.getApplicationContext().get(Seam.getComponentName(Init.class));
-      }
-      else
-      {
-         //not sure if this is nessesary
-         init = (Init)Lifecycle.getApplication().get(Seam.getComponentName(Init.class));
-      }
-      if(!bundleCache.containsKey(init))
-      {
-         bundleCache.put(init, new ConcurrentHashMap<Locale, List<ResourceBundle>>());
-      }
-      return bundleCache.get(init);
-   }
-   
-   /**
-    * Get an instance for the current Seam Locale
-    * 
-    * @see Locale
-    * 
-    * @return a SeamResourceBundle
-    */
-   public static java.util.ResourceBundle getBundle()
-   {
-      return java.util.ResourceBundle.getBundle(SeamResourceBundle.class.getName(),
-               org.jboss.seam.core.Locale.instance()); //note: it does not really matter what we pass here
-   }
-
-   
-   public static java.util.ResourceBundle getBundleNamed(String bundleName)
-   {
-      return java.util.ResourceBundle.getBundle(bundleName, 
-              org.jboss.seam.core.Locale.instance()); 
-   }
-
-   
-   private List<java.util.ResourceBundle> getBundlesForCurrentLocale()
-   {
-      Locale instance = org.jboss.seam.core.Locale.instance();
-      List<ResourceBundle> bundles = getCachedBundle().get(instance);
-      if ( bundles==null )
-      {
-         bundles = loadBundlesForCurrentLocale();
-         getCachedBundle().put(instance, bundles);
-      }
-      return bundles;
-
-   }
-
-   private List<ResourceBundle> loadBundlesForCurrentLocale()
-   {
-      List<ResourceBundle> bundles = new ArrayList<ResourceBundle>();
-      ResourceLoader resourceLoader = ResourceLoader.instance();
-      for (String bundleName : resourceLoader.getBundleNames())
-      {
-         ResourceBundle bundle = resourceLoader.loadBundle(bundleName);
-         if (bundle != null) bundles.add(bundle);
-      }
-      ResourceBundle bundle = resourceLoader.loadBundle("ValidatorMessages");
-      if (bundle != null)
-      {
-         bundles.add(bundle);
-      }
-      bundle = resourceLoader.loadBundle("org/hibernate/validator/ValidationMessages");
-      if (bundle != null) bundles.add(bundle);
-      bundle = resourceLoader.loadBundle("javax.faces.Messages");
-      if (bundle != null) bundles.add(bundle);
-      return Collections.unmodifiableList(bundles);
-   }
-
-   @Override
-   public Enumeration<String> getKeys()
-   {
-      List<java.util.ResourceBundle> pageBundles = getPageResourceBundles();
-      List<ResourceBundle> bundles = getBundlesForCurrentLocale();
-      Enumeration<String>[] enumerations = new Enumeration[bundles.size() + pageBundles.size()];
-
-      int i = 0;
-      for (java.util.ResourceBundle bundle: pageBundles) {
-          enumerations[i++] = bundle.getKeys();
-      }
-       
-      for (ResourceBundle bundle: bundles) {
-          enumerations[i++] = bundle.getKeys();
-      }
-
-      return new EnumerationEnumeration<String>(enumerations);
-   }
-
-   @Override
-   protected Object handleGetObject(String key)
-   {
-      if (!Contexts.isApplicationContextActive())
-      {
-         return null;
-      }
-      List<java.util.ResourceBundle> pageBundles = getPageResourceBundles();
-      for (java.util.ResourceBundle pageBundle : pageBundles)
-      {
-         try
-         {
-            return interpolate(pageBundle.getObject(key));
-         }
-         catch (MissingResourceException mre) {}
-      }
-
-      for (java.util.ResourceBundle littleBundle : getBundlesForCurrentLocale())
-      {
-         try
-         {
-            return interpolate( littleBundle.getObject(key) );
-         }
-         catch (MissingResourceException mre) {}
-      }
-
-      return null; // superclass is responsible for throwing MRE
-   }
-
-   private Object interpolate(Object message)
-   {
-      return message!=null && message instanceof String ?
-               Interpolator.instance().interpolate( (String) message ) :
-               message;
-   }
-
-   private List<java.util.ResourceBundle> getPageResourceBundles()
-   {
-      // TODO: oops! A hard dependency to JSF!
-      String viewId = Pages.getCurrentViewId();
-      if (viewId != null)
-      {
-         // we can't cache these bundles, since the viewId
-         // may change in the middle of a request
-         return Pages.instance().getResourceBundles(viewId);
-      }
-      else
-      {
-         return Collections.EMPTY_LIST;
-      }
-   }
-   
-   @Override
-   public Locale getLocale()
-   {
-      return org.jboss.seam.core.Locale.instance();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/SynchronizationInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/SynchronizationInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/SynchronizationInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,51 +0,0 @@
-//$Id: SynchronizationInterceptor.java 9241 2008-10-09 01:16:54Z shane.bryzak at jboss.com $
-package org.jboss.seam.core;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Serializes calls to a component.
- * 
- * @author Gavin King
- */
- at Interceptor(type=InterceptorType.CLIENT)
-public class SynchronizationInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = -4173880108889358566L;
-   
-   private ReentrantLock lock = new ReentrantLock(true);
-   
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      if ( lock.tryLock( getComponent().getTimeout(), TimeUnit.MILLISECONDS ) )
-      {
-         try
-         {
-            return invocation.proceed();
-         }
-         finally
-         {
-            lock.unlock();
-         }
-      }
-      else
-      {
-         throw new LockTimeoutException("could not acquire lock on @Synchronized component: " + 
-               getComponent().getName());
-      }
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().isSynchronize();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Validators.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Validators.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/Validators.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,161 +0,0 @@
-package org.jboss.seam.core;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.beans.FeatureDescriptor;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.el.ELContext;
-import javax.el.ELException;
-import javax.el.ELResolver;
-import javax.el.PropertyNotFoundException;
-import javax.el.PropertyNotWritableException;
-import javax.el.ValueExpression;
-import javax.validation.ConstraintViolation;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Instance;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.el.EL;
-
-/**
- * Caches instances of Hibernate Validator ClassValidator
- * 
- * @author Gavin King
- * 
- */
- at Name("org.jboss.seam.core.validators")
- at BypassInterceptors
- at Scope(ScopeType.APPLICATION)
- at Install(precedence = BUILT_IN, classDependencies = "org.jboss.seam.core.ClassValidator")
-public class Validators
-{
-
-  
-   /**
-    * Get the cached ClassValidator instance. If the argument is an instance of
-    * a session bean Seam component instance, the returned validator will be
-    * aware of constraints defined on the bean class. Therefore this method is
-    * preferred to getValidator(Class) if the argument might be a session bean.
-    * 
-    * @param model the object to be validated
-    */
-   @SuppressWarnings("unchecked")
-   public <T> ClassValidator<T> getValidator(T model)
-   {
-      Class<?> modelClass = model instanceof Instance ? ((Instance) model).getComponent().getBeanClass() : model.getClass();
-      return getValidator((Class<T>) modelClass);
-   }
-
-   /**
-    * Get the cached ClassValidator instance.
-    * 
-    * @param modelClass the class to be validated
-    */
-   public <T> ClassValidator<T> getValidator(Class<T> modelClass)
-   {
-      return createValidator(modelClass);
-   }
-
-   /**
-    * Create a new ClassValidator for the given class, using the current Seam
-    * ResourceBundle.
-    * 
-    * @param modelClass the class to be validated
-    */
-   protected <T> ClassValidator<T> createValidator(Class<T> modelClass)
-   {
-      return new ClassValidator<T>(modelClass);
-   }
-
-   /**
-    * Validate that the given value can be assigned to the property given by the
-    * value expression.
-    * 
-    * @param valueExpression a value expression, referring to a property
-    * @param elContext the ELContext in which to evaluate the expression
-    * @param value a value to be assigned to the property
-    * @return a set of potential InvalidValues, from Hibernate Validator
-    */
-   public Set<ConstraintViolation<Object>> validate(ValueExpression valueExpression, ELContext elContext, Object value)
-   {
-      ValidatingResolver validatingResolver = new ValidatingResolver(elContext.getELResolver());
-      ELContext decoratedContext = EL.createELContext(elContext, validatingResolver);
-      valueExpression.setValue(decoratedContext, value);
-      return validatingResolver.getInvalidValues();
-   }
-
-   class ValidatingResolver extends ELResolver
-   {
-      private ELResolver delegate;
-      private Set<ConstraintViolation<Object>> invalidValues;
-
-      public ValidatingResolver(ELResolver delegate)
-      {
-         this.delegate = delegate;
-      }
-
-      public Set<ConstraintViolation<Object>> getInvalidValues()
-      {
-         return invalidValues;
-      }
-
-      @Override
-      public Class<?> getCommonPropertyType(ELContext context, Object value)
-      {
-         return delegate.getCommonPropertyType(context, value);
-      }
-
-      @Override
-      public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object value)
-      {
-         return delegate.getFeatureDescriptors(context, value);
-      }
-
-      @Override
-      public Class<?> getType(ELContext context, Object x, Object y) throws NullPointerException, PropertyNotFoundException, ELException
-      {
-         return delegate.getType(context, x, y);
-      }
-
-      @Override
-      public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException
-      {
-         return delegate.getValue(context, base, property);
-      }
-
-      @Override
-      public boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException
-      {
-         return delegate.isReadOnly(context, base, property);
-      }
-
-      @Override
-      public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
-      {
-         if (base != null && property != null)
-         {
-            context.setPropertyResolved(true);
-            invalidValues = getValidator(base).getPotentialInvalidValues(property.toString(), value);
-         }
-
-      }
-
-   }
-
-   public static Validators instance()
-   {
-      if (!Contexts.isApplicationContextActive())
-      {
-         throw new IllegalStateException("No active application scope");
-      }
-      return (Validators) Component.getInstance(Validators.class, ScopeType.APPLICATION);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/core/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,10 +0,0 @@
-/**
- * A set of Seam components that implement Seam.
- * This is where the magic happens.
- */
- at Namespace(value="http://jboss.com/products/seam/core", prefix="org.jboss.seam.core")
- at AutoCreate
-package org.jboss.seam.core;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataBinder.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataBinder.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataBinder.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-package org.jboss.seam.databinding;
-
-import java.lang.annotation.Annotation;
-
-import org.jboss.seam.ScopeType;
-
-/**
- * Allows some "bound type" to be exposed to 
- * the user interface via a "wrapper type".
- * 
- * @author Gavin King
- *
- * @param <Out> the annotation type
- * @param <Type> the bound type
- * @param <WrapperType> the wrapper type
- */
-public interface DataBinder<Out extends Annotation, Type, WrapperType>
-{
-   String getVariableName(Out out);
-   ScopeType getVariableScope(Out out);
-   WrapperType wrap(Out out, Type value);
-   Type getWrappedData(Out out, WrapperType wrapper);
-   Object getSelection(Out out, WrapperType wrapper);
-   boolean isDirty(Out out, WrapperType wrapper, Type value);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelBinder.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelBinder.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelBinder.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,63 +0,0 @@
-package org.jboss.seam.databinding;
-
-import java.util.Map;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.datamodel.DataModel;
-import org.jboss.seam.faces.DataModels;
-
-/**
- * Exposes a List, array, Map or Set to the UI as a JSF DataModel
- * 
- * @author Gavin King
- */
-public class DataModelBinder implements DataBinder<DataModel, Object, javax.faces.model.DataModel>
-{
-
-   public String getVariableName(DataModel out)
-   {
-      return out.value();
-   }
-
-   public ScopeType getVariableScope(DataModel out)
-   {
-      return out.scope();
-   }
-
-   public javax.faces.model.DataModel wrap(DataModel out, Object value)
-   {
-      return DataModels.instance().getDataModel(value);
-   }
-
-   public Object getWrappedData(DataModel out, javax.faces.model.DataModel wrapper)
-   {
-      return wrapper.getWrappedData();
-   }
-
-   public Object getSelection(DataModel out, javax.faces.model.DataModel wrapper)
-   {
-      if ( wrapper.getRowCount()==0 || wrapper.getRowIndex()<0 || 
-           wrapper.getRowIndex()>=wrapper.getRowCount())
-      {
-         return null;
-      } 
-      else
-      {
-         Object rowData = wrapper.getRowData();
-         if (rowData instanceof Map.Entry)
-         {
-            return ( (Map.Entry) rowData ).getValue();
-         }
-         else
-         {
-            return rowData;
-         }
-      }
-   }
-
-   public boolean isDirty(DataModel out, javax.faces.model.DataModel wrapper, Object value)
-   {
-      return !getWrappedData(out, wrapper).equals(value);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelIndexSelector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelIndexSelector.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelIndexSelector.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,42 +0,0 @@
-package org.jboss.seam.databinding;
-
-import java.util.Map;
-
-import javax.faces.model.DataModel;
-
-import org.jboss.seam.annotations.datamodel.DataModelSelectionIndex;
-
-/**
- * Extracts the selected "index" (the row index, or the key of a map) from a JSF DataModel.
- * 
- * @author Gavin King
- */
-public class DataModelIndexSelector implements DataSelector<DataModelSelectionIndex, DataModel>
-{
-
-   public String getVariableName(DataModelSelectionIndex in)
-   {
-      return in.value();
-   }
-
-   public Object getSelection(DataModelSelectionIndex in, DataModel wrapper)
-   {
-      if ( wrapper.getRowCount()==0 || wrapper.getRowIndex()<0 )
-      {
-         return null;
-      }
-      else
-      {
-         Object rowData = wrapper.getRowData();
-         if (rowData instanceof Map.Entry)
-         {
-            return ( (Map.Entry) rowData ).getKey();
-         }
-         else
-         {
-            return wrapper.getRowIndex();
-         }
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelSelector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelSelector.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataModelSelector.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,42 +0,0 @@
-package org.jboss.seam.databinding;
-
-import java.util.Map;
-
-import javax.faces.model.DataModel;
-
-import org.jboss.seam.annotations.datamodel.DataModelSelection;
-
-/**
- * Extracts the selected object (the element, or the value of a map) from a JSF DataModel.
- * 
- * @author Gavin King
- */
-public class DataModelSelector implements DataSelector<DataModelSelection, DataModel>
-{
-   
-   public String getVariableName(DataModelSelection in)
-   {
-      return in.value();
-   }
-
-   public Object getSelection(DataModelSelection in, DataModel wrapper)
-   {
-      if ( wrapper.getRowCount()==0 || wrapper.getRowIndex()<0 )
-      {
-         return null;
-      }
-      else
-      {
-         Object rowData = wrapper.getRowData();
-         if (rowData instanceof Map.Entry)
-         {
-            return ( (Map.Entry) rowData ).getValue();
-         }
-         else
-         {
-            return rowData;
-         }
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataSelector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataSelector.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/DataSelector.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,18 +0,0 @@
-package org.jboss.seam.databinding;
-
-import java.lang.annotation.Annotation;
-
-/**
- * Allows extraction of the selected item
- * from some "wrapper type".
- * 
- * @author Gavin King
- *
- * @param <In> the annotation type
- * @param <WrapperType> the wrapper type
- */
-public interface DataSelector<In extends Annotation, WrapperType>
-{
-   String getVariableName(In in);
-   Object getSelection(In in, WrapperType wrapper);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/databinding/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,4 +0,0 @@
-/**
- * Implementation of @DataModel and friends.
- */
-package org.jboss.seam.databinding;
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractClassDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractClassDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractClassDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.util.HashSet;
-import java.util.Set;
-
-public abstract class AbstractClassDeploymentHandler extends AbstractDeploymentHandler
-      implements ClassDeploymentHandler
-{
-   
-   private Set<ClassDescriptor> classes;
-   
-   public AbstractClassDeploymentHandler()
-   {
-      classes = new HashSet<ClassDescriptor>();
-   }
-   
-   public Set<ClassDescriptor> getClasses()
-   {
-      return classes;
-   }
-   
-   public void setClasses(Set<ClassDescriptor> classes)
-   {
-      this.classes = classes;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Abstract base class for {@link DeploymentHandler} providing common functionality
- * 
- * @author Pete Muir
- *
- */
-public abstract class AbstractDeploymentHandler implements DeploymentHandler
-{
-   
-   private Set<FileDescriptor> resources;
-   
-   public AbstractDeploymentHandler()
-   {
-      resources = new HashSet<FileDescriptor>();
-   }
-
-   @Override
-   public String toString()
-   {
-      return getName();
-   }
-   
-   public void setResources(Set<FileDescriptor> resources)
-   {
-      this.resources = resources;
-   }
-   
-   public Set<FileDescriptor> getResources()
-   {
-      return resources;
-   }
-   
-   public void postProcess(ClassLoader classLoader) {}
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractScanner.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractScanner.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AbstractScanner.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,233 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.util.Set;
-import java.util.Map.Entry;
-
-import javassist.bytecode.AnnotationsAttribute;
-import javassist.bytecode.ClassFile;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Abstract base class for {@link Scanner} providing common functionality
- * 
- * This class provides file-system orientated scanning
- * 
- * @author Pete Muir
- *
- */
-public abstract class AbstractScanner implements Scanner
-{
-   
-   protected ServletContext servletContext;
-   
-   private static class Handler
-   {
-      
-      // Cache descriptors for performance
-      private ClassFile classFile;
-      private ClassDescriptor classDescriptor;
-      private FileDescriptor fileDescriptor;
-      
-      private Set<Entry<String, DeploymentHandler>> deploymentHandlers;
-      private ClassLoader classLoader;
-      private String name;
-      private ServletContext servletContext;
-      
-      public Handler(String name, Set<Entry<String, DeploymentHandler>> deploymentHandlers, ClassLoader classLoader,ServletContext servletContext)
-      {
-         this.deploymentHandlers = deploymentHandlers;
-         this.name = name;
-         this.classLoader = classLoader;
-         this.servletContext=servletContext;
-      }
-      
-      /**
-       * Return true if the file was handled (false if it was ignored)
-       */
-      protected boolean handle(DeploymentHandler deploymentHandler)
-      {
-         boolean handled = false;
-         if (deploymentHandler instanceof ClassDeploymentHandler) 
-         {
-            if (name.endsWith(".class"))
-            {
-               ClassDeploymentHandler classDeploymentHandler = (ClassDeploymentHandler) deploymentHandler;
-               if (hasAnnotations(getClassFile(), classDeploymentHandler.getMetadata().getClassAnnotatedWith()))
-               {
-                  if (getClassDescriptor().getClazz() != null)
-                  {
-                     log.trace("adding class to deployable list " + name + " for deployment handler " + deploymentHandler.getName());
-                     classDeploymentHandler.getClasses().add(getClassDescriptor());
-                     handled = true;
-                  }
-                  else
-                  {
-                     log.debug("skipping class " + name + " because it cannot be loaded (may reference a type which is not available on the classpath)");
-                  }
-               }
-            }
-         }
-         else
-         {
-            if (name.endsWith(deploymentHandler.getMetadata().getFileNameSuffix()))
-            {
-               deploymentHandler.getResources().add(getFileDescriptor());
-               handled = true;
-            }
-         }
-         return handled;
-      }
-      
-      protected boolean handle()
-      {
-         log.trace("found " + name);
-         boolean handled = false;
-         for (Entry<String, DeploymentHandler> entry: deploymentHandlers)
-         {
-            if (handle(entry.getValue()))
-            {
-               handled = true;
-            }
-         }
-         return handled;
-      }
-      
-      private ClassFile getClassFile()
-      {
-         if (classFile == null)
-         {
-            try
-            {
-               classFile = loadClassFile(name, classLoader);
-            } 
-            catch (IOException e)
-            {
-               throw new RuntimeException("Error loading class file " + name, e);
-            }
-         }
-         return classFile;
-      }
-      
-      private ClassDescriptor getClassDescriptor()
-      {
-         if (classDescriptor == null)
-         {
-            classDescriptor = new ClassDescriptor(name, classLoader,servletContext);
-         }
-         return classDescriptor;
-      }
-      
-      private FileDescriptor getFileDescriptor()
-      {
-         if (fileDescriptor == null)
-         {
-            fileDescriptor = new FileDescriptor(name, classLoader,servletContext);
-         }
-         return fileDescriptor;
-      }
-   }
-   
-   private static final LogProvider log = Logging.getLogProvider(Scanner.class);
-   
-   private DeploymentStrategy deploymentStrategy;
-   
-   public AbstractScanner(DeploymentStrategy deploymentStrategy)
-   {
-      this.deploymentStrategy = deploymentStrategy;
-      this.servletContext=deploymentStrategy.getServletContext();
-      ClassFile.class.getPackage(); //to force loading of javassist, throwing an exception if it is missing
-   }
-   @Deprecated
-   protected AbstractScanner()
-   {
-      this.servletContext=ServletLifecycle.getCurrentServletContext();
-   }
-   
-   protected AbstractScanner(ServletContext servletContext)
-   {
-      this.servletContext=servletContext;
-   }
-   
-   protected static boolean hasAnnotations(ClassFile classFile, Set<Class<? extends Annotation>> annotationTypes)
-   {
-      if (annotationTypes.size() > 0)
-      {
-         AnnotationsAttribute visible = (AnnotationsAttribute) classFile.getAttribute( AnnotationsAttribute.visibleTag );
-         if ( visible != null ) 
-         {
-            for (Class<? extends Annotation> annotationType : annotationTypes)
-            {
-               if (visible.getAnnotation(annotationType.getName()) != null)
-               {
-                  return true;
-               }
-            }
-         }
-      }
-      return false;
-   }
-   
-   /**
-    * Get a Javassist {@link ClassFile} for a given class name from the classLoader
-    */
-   protected static ClassFile loadClassFile(String name, ClassLoader classLoader) throws IOException 
-   {
-      if (name == null)
-      {
-         throw new NullPointerException("name cannot be null");
-      }
-      InputStream stream = classLoader.getResourceAsStream(name);
-      if (stream == null)
-      {
-         throw new IllegalStateException("Cannot load " + name + " from " + classLoader + " (using getResourceAsStream() returned null)");
-      }
-      DataInputStream dstream = new DataInputStream(stream);
-
-      try 
-      { 
-         return new ClassFile(dstream); 
-      } 
-      finally 
-      { 
-         dstream.close(); 
-         stream.close(); 
-      }
-   }
-   
-   public DeploymentStrategy getDeploymentStrategy()
-   {
-      return deploymentStrategy;
-   }
-   
-   public long getTimestamp()
-   {
-      return Long.MAX_VALUE;
-   }
-   
-   protected void handleItem(String name)
-   {
-      handle(name);
-   }
-   
-   
-   protected boolean handle(String name)
-   {
-      return new Handler(name, deploymentStrategy.getDeploymentHandlers().entrySet(), deploymentStrategy.getClassLoader(),servletContext).handle();
-   }
-   
-   public void scanDirectories(File[] directories, File[] excludedDirectories)
-   {
-      scanDirectories(directories);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AnnotationDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AnnotationDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/AnnotationDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,117 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.lang.annotation.Annotation;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-public class AnnotationDeploymentHandler extends AbstractClassDeploymentHandler
-{
-
-   private class AnnotationDeploymentHandlerMetadata implements ClassDeploymentMetadata
-   {
-
-      private Set<Class<? extends Annotation>> annotations;
-
-      public AnnotationDeploymentHandlerMetadata(Set<Class<? extends Annotation>> annotations)
-      {
-         this.annotations = annotations;
-      }
-
-      public Set<Class<? extends Annotation>> getClassAnnotatedWith()
-      {
-         return annotations;
-      }
-
-      public String getFileNameSuffix()
-      {
-         return null;
-      }
-      
-   }
-   
-   /**
-    * Name under which this {@link DeploymentHandler} is registered
-    */
-   public static final String NAME = "org.jboss.seam.deployment.AnnotationDeploymentHandler";
-   
-   public static final String ANNOTATIONS_KEY = "org.jboss.seam.deployment.annotationTypes";
-   
-   private static final LogProvider log = Logging.getLogProvider(AnnotationDeploymentHandler.class);
-   
-   private ClassDeploymentMetadata metadata;
-   
-   private Map<String, Set<Class<?>>> classes;
-   private Set<Class<? extends Annotation>> annotations;
-   
-   public AnnotationDeploymentHandler(List<String> annotationTypes, ClassLoader classLoader)
-   {
-      this.annotations = new HashSet<Class<? extends Annotation>>();
-      for (String classname: annotationTypes)
-      {
-         try
-         {
-            annotations.add((Class<? extends Annotation>) classLoader.loadClass(classname));
-         }
-         catch (ClassNotFoundException cnfe) 
-         {
-            log.warn("could not load annotation class: " + classname, cnfe);
-         }
-         catch (NoClassDefFoundError ncdfe) 
-         {
-            log.warn("could not load annotation class (missing dependency): " + classname, ncdfe);
-         }
-         catch (ClassCastException cce)
-         {
-            log.warn("could not load annotation class (not an annotation): " + classname, cce);
-         }
-      }
-      metadata = new AnnotationDeploymentHandlerMetadata(annotations);
-   }
-
-   /**
-    * Get annotated classes
-    */
-   public Map<String, Set<Class<?>>> getClassMap()
-   {
-      return Collections.unmodifiableMap(classes);
-   }
-   
-   
-   public String getName()
-   {
-      return NAME;
-   }
-
-   public ClassDeploymentMetadata getMetadata()
-   {
-      return metadata;
-   }
-   
-   @Override
-   public void postProcess(ClassLoader classLoader)
-   {
-      classes = new HashMap<String, Set<Class<?>>>();
-      for (Class<? extends Annotation> annotationType: annotations)
-      {
-         classes.put(annotationType.getName(), new HashSet<Class<?>>());
-      }
-      for (ClassDescriptor classDescriptor : getClasses())
-      {
-         for (Annotation annotation: classDescriptor.getClazz().getAnnotations())
-         {
-            if (classes.containsKey(annotation.annotationType().getName()))
-            {
-               classes.get(annotation.annotationType().getName()).add(classDescriptor.getClazz());
-            }
-         }
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,13 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.util.Set;
-
-public interface ClassDeploymentHandler extends DeploymentHandler {
-    
-    public ClassDeploymentMetadata getMetadata();
-    
-    public Set<ClassDescriptor> getClasses();
-    
-    public void setClasses(Set<ClassDescriptor> classes);
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDeploymentMetadata.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDeploymentMetadata.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDeploymentMetadata.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,17 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-
-public interface ClassDeploymentMetadata extends DeploymentMetadata
-{
-   
-   /**
-    * An array of class annotations this deployment handler is interested in
-    * 
-    * All classes with any of these annotations should be considered part of the
-    * match
-    */
-   public Set<Class<? extends Annotation>> getClassAnnotatedWith();
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDescriptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDescriptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ClassDescriptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,90 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.net.URL;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-public class ClassDescriptor extends FileDescriptor
-{
-   
-   private static LogProvider log = Logging.getLogProvider(ClassDescriptor.class);
-   
-   private Class<?> clazz;
-   
-   public ClassDescriptor(String name, URL url, Class<?> clazz)
-   {
-      super(name, url);
-      this.clazz = clazz;
-   }
-   
-   public ClassDescriptor(String name, ClassLoader classLoader,ServletContext servletContext)
-   {
-      super(name, classLoader,servletContext);
-      String classname = filenameToClassname(name);
-      log.trace("Trying to load class " + classname);
-      try 
-      {
-         clazz = classLoader.loadClass(classname);
-         // IBM JVM will throw a TypeNotPresentException if any annotation on the class is not on
-         // the classpath, rendering the class virtually unusable (given Seam's heavy use of annotations)
-         clazz.getAnnotations();
-      }
-      catch (ClassNotFoundException cnfe) 
-      {
-         log.debug("could not load class: " + classname, cnfe);
-      }
-      catch (NoClassDefFoundError ncdfe) 
-      {
-         log.debug("could not load class (missing dependency): " + classname, ncdfe);
-      }
-      catch (TypeNotPresentException tnpe)
-      {
-         clazz = null;
-         log.debug("could not load class (annotation missing dependency): " + classname, tnpe);
-      }
-   }
-
-   public Class<?> getClazz()
-   {
-      return clazz;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return clazz.getName();
-   }
-   
-   /**
-    * Convert a path to a class file to a class name
-    */
-   public static String filenameToClassname(String filename)
-   {
-      return filename.substring( 0, filename.lastIndexOf(".class") )
-            .replace('/', '.').replace('\\', '.');
-   }
-   
-   @Override
-   public boolean equals(Object other)
-   {
-      if (other instanceof ClassDescriptor)
-      {
-         ClassDescriptor that = (ClassDescriptor) other;
-         return this.getClazz().equals(that.getClazz());
-      }
-      else
-      {
-         return false;
-      }
-   }
-   
-   @Override
-   public int hashCode()
-   {
-      return getClazz().hashCode();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ComponentDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ComponentDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ComponentDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,74 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.lang.annotation.Annotation;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-
-/**
- * The {@link ComponentDeploymentHandler} process Seam's component annotated 
- * with {@link org.jboss.seam.annotations.Name} 
- *  
- * @author Pete Muir
- *
- */
-public class ComponentDeploymentHandler extends AbstractClassDeploymentHandler
-{
-   
-   private static Set<Class<? extends Annotation>> ANNOTATION_TYPES = new HashSet<Class<? extends Annotation>>(Arrays.asList(Name.class));
-   
-   public static ClassDeploymentMetadata NAME_ANNOTATED_CLASS_METADATA = new ClassDeploymentMetadata()
-   {
-
-      public Set<Class<? extends Annotation>> getClassAnnotatedWith()
-      {
-         return ANNOTATION_TYPES;
-      }
-
-      public String getFileNameSuffix()
-      {
-         return null;
-      }
-      
-   };
-   
-   /**
-    * Name under which this {@link DeploymentHandler} is registered
-    */
-   public static final String NAME = "org.jboss.seam.deployment.ComponentDeploymentHandler";
-   
-   public String getName()
-   {
-      return NAME;
-   }
-
-   public ClassDeploymentMetadata getMetadata()
-   {
-      return NAME_ANNOTATED_CLASS_METADATA;
-   }
-   
-   @Override
-   public void postProcess(ClassLoader classLoader)
-   {
-      Set<ClassDescriptor> classes = new HashSet<ClassDescriptor>();
-      for (ClassDescriptor classDescriptor : getClasses())
-      {
-         if (classDescriptor.getClazz().isAnnotationPresent(Install.class))
-         {
-            if (classDescriptor.getClazz().getAnnotation(Install.class).value())
-            {
-               classes.add(classDescriptor);
-            }
-         }
-         else
-         {
-            classes.add(classDescriptor);
-         }
-      }
-      setClasses(classes);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ComponentsXmlDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ComponentsXmlDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ComponentsXmlDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,59 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-/**
- * The {@link ComponentsXmlDeploymentHandler} components.xml and .component.xml files 
- * 
- * @author Pete Muir
- *
- */
-public class ComponentsXmlDeploymentHandler extends AbstractDeploymentHandler
-{
-   
-   private Pattern INF_PATTERN = Pattern.compile("(WEB-INF/components.xml$)|(META-INF/components.xml$)");
-   
-   private static DeploymentMetadata COMPONENTSXML_SUFFIX_FILE_METADATA = new DeploymentMetadata()
-   {
-
-      public String getFileNameSuffix()
-      {
-         return "components.xml";
-      }
-      
-   };
-   
-   /**
-    * Name under which this {@link DeploymentHandler} is registered
-    */
-   public static final String NAME = "org.jboss.seam.deployment.ComponentsXmlDeploymentHandler";
-   
-   public String getName()
-   {
-      return NAME;
-   }
-   
-   public DeploymentMetadata getMetadata()
-   {
-      return COMPONENTSXML_SUFFIX_FILE_METADATA;
-   }
-   
-   @Override
-   public void postProcess(ClassLoader classLoader)
-   {
-      Set<FileDescriptor> resources = new HashSet<FileDescriptor>();
-      for (FileDescriptor fileDescriptor : getResources())
-      {
-         // we want to skip over known meta-directories since Seam will auto-load these without a scan
-         String path = fileDescriptor.getName();
-         if (!INF_PATTERN.matcher(path).matches()) 
-         {
-            resources.add(fileDescriptor);
-         }
-      }
-      setResources(resources);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.util.Set;
-
-/**
- * A deployment handler is responsible for processing found resources
- * 
- * All deployment handlers should specify a unique name under which they
- * will be registered with the {@link DeploymentStrategy}
- * 
- * @author Pete Muir
- *
- */
-public interface DeploymentHandler
-{
-   
-   /**
-    * A key used to identify the deployment handler
-    */
-   public String getName();
-   
-   /**
-    * Get DeploymentHandlerMetadata for resources this deployment handler is
-    * interested in processing.
-    * 
-    * If a deployment handler is interested in a number of files it should
-    * define multiple pieces of metadata
-    */
-   public DeploymentMetadata getMetadata();
-   
-   public void postProcess(ClassLoader classLoader);
-  
-   public Set<FileDescriptor> getResources();
-   
-   public void setResources(Set<FileDescriptor> resources);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentMetadata.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentMetadata.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentMetadata.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,18 +0,0 @@
-package org.jboss.seam.deployment;
-
-/**
- * Metadata about resources the deployment handler is interested in
- * 
- * @author pmuir
- *
- */
-public interface DeploymentMetadata
-{
-   
-   /**
-    * A file name suffixes that this deployment handler is interested in
-    */
-   public String getFileNameSuffix();
-
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DeploymentStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,231 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.File;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * A {@link DeploymentStrategy} coordinates the deployment of resources for a Seam
- * application.
- * 
- * @author Pete Muir
- *
- */
-public abstract class DeploymentStrategy
-{
-   
-   private static final LogProvider log = Logging.getLogProvider(DeploymentStrategy.class);
-
-   private Scanner scanner;
-   
-   private List<File> files = new ArrayList<File>();
-   
-   private Map<String, DeploymentHandler> deploymentHandlers;
-   
-   /**
-    * The key under which to list possible scanners. System properties take
-    * precedence over /META-INF/seam-scanner.properties. Entries will be tried
-    * in sequential order until a Scanner can be loaded. 
-    * 
-    * This can be specified as a System property or in 
-    * /META-INF/seam-deployment.properties
-    */
-   public static final String SCANNERS_KEY = "org.jboss.seam.deployment.scanners";
-   
-   /**
-    * Do the scan for resources
-    * 
-    * Should only be called by Seam
-    * 
-    */
-   public abstract void scan();
-   
-   /**
-    * Get the scanner being used
-    * 
-    */
-   protected Scanner getScanner()
-   {
-      if (scanner == null)
-      {
-         initScanner();
-      }
-      return scanner;
-   }
-   
-   /**
-    * Get the classloader to use
-    */
-   public abstract ClassLoader getClassLoader();
-   
-   /**
-    * Get the ServletContext to use
-    */
-   public abstract ServletContext getServletContext();
-
-   /**
-    * Get (or modify) any registered {@link DeploymentHandler}s
-    * 
-    * Implementations of {@link DeploymentStrategy} may add default 
-    * {@link DeploymentHandler}s 
-    */
-   public Map<String, DeploymentHandler> getDeploymentHandlers()
-   {
-      if (deploymentHandlers == null)
-      {
-         initDeploymentHandlers();
-      }
-      return this.deploymentHandlers;
-   }
-   
-   private void initDeploymentHandlers()
-   {
-      this.deploymentHandlers = new HashMap<String, DeploymentHandler>();
-      List<String> deploymentHandlersClassNames = new SeamDeploymentProperties(getClassLoader()).getPropertyValues(getDeploymentHandlersKey());
-      addHandlers(deploymentHandlersClassNames);
-   }
-
-   protected abstract String getDeploymentHandlersKey();
-      
-   protected void initScanner()
-   {
-      List<String> scanners = new SeamDeploymentProperties(getClassLoader()).getPropertyValues(SCANNERS_KEY);
-      for ( String className : scanners )
-      {
-         Scanner scanner = instantiateScanner(className);
-         if (scanner != null)
-         {
-            log.trace("Using " + scanner.toString());
-            this.scanner = scanner;
-            return;
-         }        
-      }
-      log.trace("Using default URLScanner");
-      this.scanner = new URLScanner(this);
-   }
-   
-   private Scanner instantiateScanner(String className)
-   {
-      try
-      {
-         Class<Scanner> scannerClass =  (Class<Scanner>) getClassLoader().loadClass(className);
-         Constructor<Scanner> constructor = scannerClass.getConstructor(new Class[] {DeploymentStrategy.class});
-         return constructor.newInstance( new Object[] {this} );
-      }
-      catch (ClassNotFoundException e)
-      {
-         log.trace("Unable to use " + className + " as scanner (class not found)", e);
-      }
-      catch (NoClassDefFoundError e) 
-      {
-         log.trace("Unable to use " + className + " as scanner (dependency not found)", e);
-      }
-      catch (ClassCastException e) 
-      {
-         log.trace("Unable to use " + className + " as scanner (class does not implement org.jboss.seam.deployment.Scanner)");
-      }
-      catch (InstantiationException e)
-      {
-         log.trace("Unable to instantiate scanner " + className, e);
-      }
-      catch (IllegalAccessException e)
-      {
-         log.trace("Unable to instantiate scanner " + className, e);
-      }
-      catch (SecurityException e)
-      {
-         log.trace(className + " must declare public " + className + "( ClassLoader classLoader, String ... resourceNames )", e);
-      }
-      catch (NoSuchMethodException e)
-      {
-         log.trace(className + " must declare public " + className + "( ClassLoader classLoader, String ... resourceNames )", e);
-      }
-      catch (IllegalArgumentException e)
-      {
-         log.trace(className + " must declare public " + className + "( ClassLoader classLoader, String ... resourceNames )", e);
-      }
-      catch (InvocationTargetException e)
-      {
-         log.trace(className + " must declare public " + className + "( ClassLoader classLoader, String ... resourceNames )", e);
-      }
-      return null;
-   }
-   
-   private void addHandlers(List<String> handlers)
-   {
-      for (String handler : handlers)
-      {
-         addHandler(handler);
-      }
-   }
-   
-   private void addHandler(String className)
-   {
-      DeploymentHandler deploymentHandler = instantiateDeploymentHandler(className);
-      if (deploymentHandler != null)
-      {
-         log.trace("Adding " + deploymentHandler + " as a deployment handler");
-         deploymentHandlers.put(deploymentHandler.getName(), deploymentHandler);
-      }
-   }
-   
-   private DeploymentHandler instantiateDeploymentHandler(String className)
-   {
-      try
-      {
-         Class<DeploymentHandler> clazz = (Class<DeploymentHandler>) getClassLoader().loadClass(className);
-         return clazz.newInstance();
-      }
-      catch (ClassNotFoundException e)
-      {
-         log.trace("Unable to use " + className + " as a deployment handler (class not found)", e);
-      }
-      catch (NoClassDefFoundError e) 
-      {
-         log.trace("Unable to use " + className + " as a deployment handler (dependency not found)", e);
-      }
-      catch (InstantiationException e)
-      {
-         log.trace("Unable to instantiate deployment handler " + className, e);
-      }
-      catch (IllegalAccessException e)
-      {
-         log.trace("Unable to instantiate deployment handler " + className, e);
-      }
-      return null;
-   }
-
-   public List<File> getFiles()
-   {
-      return files;
-   }
-   
-   public void setFiles(List<File> files)
-   {
-      this.files = files;
-   }
-   
-   public long getTimestamp()
-   {
-      return getScanner().getTimestamp();
-   }
-   
-   protected void postScan()
-   {
-      for (Entry<String, DeploymentHandler> entry : getDeploymentHandlers().entrySet())
-      {
-         entry.getValue().postProcess(getClassLoader());
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DotComponentDotXmlDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DotComponentDotXmlDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DotComponentDotXmlDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,37 +0,0 @@
-package org.jboss.seam.deployment;
-
-/**
- * The {@link DotComponentDotXmlDeploymentHandler} .component.xml files 
- * 
- * @author Pete Muir
- *
- */
-public class DotComponentDotXmlDeploymentHandler extends AbstractDeploymentHandler
-{
-   
-   private static DeploymentMetadata DOTCOMPONENTDOTXML_SUFFIX_FILE_METADATA = new DeploymentMetadata()
-   {
-      
-      public String getFileNameSuffix()
-      {
-         return ".component.xml";
-      }
-      
-   };
-   
-   /**
-    * Name under which this {@link DeploymentHandler} is registered
-    */
-   public static final String NAME = "org.jboss.seam.deployment.DotComponentDotXmlDeploymentHandler";
-   
-   public String getName()
-   {
-      return NAME;
-   }
-   
-   public DeploymentMetadata getMetadata()
-   {
-      return DOTCOMPONENTDOTXML_SUFFIX_FILE_METADATA;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DotPageDotXmlDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DotPageDotXmlDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/DotPageDotXmlDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,60 +0,0 @@
-package org.jboss.seam.deployment;
-
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * The {@link DotPageDotXmlDeploymentHandler} process .page.xml files
- *  
- * @author Pete Muir
- *
- */
-public class DotPageDotXmlDeploymentHandler extends AbstractDeploymentHandler
-{
-   
-   private static DeploymentMetadata DOTPAGEDOTXML_SUFFIX_FILE_METADATA = new DeploymentMetadata()
-   {
-
-      public String getFileNameSuffix()
-      {
-         return ".page.xml";
-      }
-      
-   };
-   
-   /**
-    * Name under which this {@link DeploymentHandler} is registered
-    */
-   public static final String NAME = "org.jboss.seam.deployment.DotPageDotXmlDeploymentHandler";
-   
-   public String getName()
-   {
-      return NAME;
-   }
-   
-   public static DotPageDotXmlDeploymentHandler instance()
-   {
-      if (Contexts.isEventContextActive())
-      {
-         if (Contexts.getEventContext().isSet(WarRootDeploymentStrategy.NAME))
-         {
-            DeploymentStrategy deploymentStrategy = (DeploymentStrategy) Contexts.getEventContext().get(WarRootDeploymentStrategy.NAME); 
-            Object deploymentHandler = deploymentStrategy.getDeploymentHandlers().get(NAME);
-            if (deploymentHandler != null)
-            {
-               return (DotPageDotXmlDeploymentHandler) deploymentHandler;
-            }
-         }
-         return null;
-      }
-      else
-      {
-         throw new IllegalStateException("Event context not active");
-      }
-   }
-
-   public DeploymentMetadata getMetadata()
-   {
-      return DOTPAGEDOTXML_SUFFIX_FILE_METADATA;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/FileDescriptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/FileDescriptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/FileDescriptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,84 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.net.URL;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.util.Resources;
-
-public class FileDescriptor
-{
-   
-   private String name;
-   private URL url;
-   
-   public FileDescriptor(String name, URL url)
-   {
-      this.name = name;
-      this.url = url;
-   }
-   
-   public FileDescriptor(String name, ClassLoader classLoader,ServletContext servletContext)
-   {
-      ServletContext ctx = servletContext;
-      if(ctx == null)
-      {
-         //this should not happen but it could if people have created custom scanners 
-         ctx = ServletLifecycle.getCurrentServletContext();
-      }
-      this.name = name;
-      if (name == null)
-      {
-         throw new NullPointerException("Name cannot be null, loading from " + classLoader);
-      }
-      this.url = Resources.getResource(name, ctx);
-      
-      if (url == null)
-      {
-         this.url = classLoader.getResource(name);
-      }
-      
-      if (this.url == null)
-      {
-         throw new NullPointerException("Cannot find URL from classLoader for " + name + ", loading from " + classLoader);
-      }
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-   
-   public URL getUrl()
-   {
-      return url;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return url.getPath();
-   }
-   
-   @Override
-   public boolean equals(Object other)
-   {
-      if (other instanceof FileDescriptor)
-      {
-         FileDescriptor that = (FileDescriptor) other;
-         return this.getUrl().equals(that.getUrl());
-      }
-      else
-      {
-         return false;
-      }
-   }
-   
-   @Override
-   public int hashCode()
-   {
-      return getUrl().hashCode();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ForwardingAbstractScanner.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ForwardingAbstractScanner.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ForwardingAbstractScanner.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,71 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.File;
-
-import javax.servlet.ServletContext;
-
-
-public abstract class ForwardingAbstractScanner extends AbstractScanner
-{
-
-   @Override
-   public DeploymentStrategy getDeploymentStrategy()
-   {
-      return delegate().getDeploymentStrategy();
-   }
-
-   @Override
-   public long getTimestamp()
-   {
-      return delegate().getTimestamp();
-   }
-
-   public void scanDirectories(File[] directories)
-   {
-      delegate().scanDirectories(directories);
-   }
-
-   public void scanResources(String[] resources)
-   {
-      delegate().scanResources(resources);
-   }
-   
-   @Override
-   public boolean equals(Object obj)
-   {
-      return delegate().equals(obj);
-   }
-   
-   @Override
-   protected boolean handle(String name)
-   {
-      return delegate().handle(name);
-   }
-   
-   @Override
-   public int hashCode()
-   {
-      return delegate().hashCode();
-   }
-   
-   @Override
-   public String toString()
-   {
-      return delegate().toString();
-   }
-   
-   protected abstract AbstractScanner delegate();
-   
-   @Deprecated
-   public ForwardingAbstractScanner()
-   {
-      
-   }
-   
-   
-   public ForwardingAbstractScanner(ServletContext servletContext)
-   {
-      super(servletContext);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ForwardingDeploymentStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ForwardingDeploymentStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/ForwardingDeploymentStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,98 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletContext;
-
-/**
- * A decorator for DeploymentStrategy
- * 
- * @author Dan Allen
- * @author Pete Muir
- */
-public abstract class ForwardingDeploymentStrategy extends DeploymentStrategy
-{
-
-   @Override
-   public ClassLoader getClassLoader()
-   {
-      return delegate().getClassLoader();
-   }
-   
-   @Override
-   public ServletContext getServletContext()
-   {
-      return delegate().getServletContext();
-   }
-
-   @Override
-   protected String getDeploymentHandlersKey()
-   {
-      return delegate().getDeploymentHandlersKey();
-   }
-   
-   @Override
-   public void scan()
-   {
-      delegate().scan();
-   }
-   
-   @Override
-   public boolean equals(Object obj)
-   {
-      return delegate().equals(obj);
-   }
-   
-   @Override
-   public Map<String, DeploymentHandler> getDeploymentHandlers()
-   {
-      return delegate().getDeploymentHandlers();
-   }
-   
-   @Override
-   public List<File> getFiles()
-   {
-      return delegate().getFiles();
-   }
-   
-   @Override
-   protected Scanner getScanner()
-   {
-      return delegate().getScanner();
-   }
-   
-   @Override
-   public long getTimestamp()
-   {
-      return delegate().getTimestamp();
-   }
-   
-   @Override
-   public int hashCode()
-   {
-      return delegate().hashCode();
-   }
-   
-   @Override
-   protected void postScan()
-   {
-      delegate().postScan();
-   }
-   
-   @Override
-   public void setFiles(List<File> files)
-   {
-      delegate().setFiles(files);
-   }
-   
-   @Override
-   public String toString()
-   {
-      return delegate().toString();
-   }
-   
-   protected abstract DeploymentStrategy delegate();
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/GroovyDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/GroovyDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/GroovyDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,168 +0,0 @@
-package org.jboss.seam.deployment;
-
-import groovy.lang.GroovyRuntimeException;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.codehaus.groovy.control.CompilationFailedException;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * A deployment handler for (uncompiled) Groovy Seam components
- * 
- * @author Pete Muir
- *
- */
-public class GroovyDeploymentHandler extends AbstractDeploymentHandler
-{
-   
-   private class GroovyDeploymentHandlerMetadata implements DeploymentMetadata
-   {
-      
-      private String groovyExtension;
-
-      public GroovyDeploymentHandlerMetadata(String groovyExtension)
-      {
-         this.groovyExtension = groovyExtension;
-      }
-
-      public String getFileNameSuffix()
-      {
-         return groovyExtension;
-      }
-      
-   }
-   
-   private DeploymentMetadata metadata;
-   
-   private static final LogProvider log = Logging.getLogProvider(GroovyDeploymentHandler.class);
-   
-   public static final String NAME = "org.jboss.seam.deployment.GroovyDeploymentHandler";
-   
-   private final String groovyFileExtension;
-   
-   private Set<ClassDescriptor> classes;
-   
-   /**
-    * 
-    * @param groovyFileExtension The extension to use for the groovy file
-    */
-   public GroovyDeploymentHandler(String groovyFileExtension)
-   {
-      this.groovyFileExtension = groovyFileExtension;
-      this.classes = new HashSet<ClassDescriptor>();
-      this.metadata = new GroovyDeploymentHandlerMetadata(groovyFileExtension);
-   }
-   
-   /**
-    * Get all the Groovy Seam Components this handler has handled 
-    */
-   public Set<ClassDescriptor> getClasses()
-   {
-      return classes;
-   }
-   
-   @Override
-   public void postProcess(ClassLoader classLoader)
-   {
-      for (FileDescriptor fileDescriptor : getResources())
-      {
-         log.debug("Found a groovy file: " + fileDescriptor.getName());
-         String classname = filenameToGroovyname(fileDescriptor.getName());
-         String filename = groovyComponentFilename(fileDescriptor.getName());
-         BufferedReader buffReader = null;
-         try
-         {
-            InputStream stream = classLoader.getResourceAsStream(fileDescriptor.getName());
-            //TODO is BufferedInputStream necessary?
-            buffReader = new BufferedReader(new InputStreamReader(stream));
-            String line = buffReader.readLine();
-            while (line != null)
-            {
-               if (line.indexOf("@Name") != -1 || line.indexOf("@" + Name.class.getName()) != -1)
-               {
-                  //possibly a Seam component
-                  log.debug("Groovy file possibly a Seam component: " + fileDescriptor.getName());
-                  Class<Object> groovyClass = (Class<Object>) classLoader.loadClass(classname);
-                  Install install = groovyClass.getAnnotation(Install.class);
-                  boolean installable = ( install == null || install.value() )
-                        && ( groovyClass.isAnnotationPresent(Name.class)
-                           || classLoader.getResources(filename).hasMoreElements() );
-                  if (installable)
-                  {
-                     log.debug("found groovy component class: " + fileDescriptor.getName());
-                     classes.add(new ClassDescriptor(fileDescriptor.getName(), fileDescriptor.getUrl(), groovyClass));
-                  }
-                  break;
-               }
-               line = buffReader.readLine();
-            }
-         }
-         catch (ClassNotFoundException cnfe)
-         {
-            log.debug("could not load groovy class: " + classname, cnfe);
-
-         }
-         catch (NoClassDefFoundError ncdfe)
-         {
-            log.debug("could not load groovy class (missing dependency): " + classname, ncdfe);
-
-         }
-         catch (IOException ioe)
-         {
-            log.debug("could not load groovy file: " + classname, ioe);
-         }
-         catch( CompilationFailedException e) {
-            log.debug("Compilation error in Groovy file:" + classname, e);
-         }
-         catch(GroovyRuntimeException e) {
-            log.debug("Unknown error reading Groovy file:" + classname, e);
-         }
-         finally
-         {
-            if (buffReader != null) {
-               try
-               {
-                  buffReader.close();
-               }
-               catch (IOException e)
-               {
-                  log.trace("Could not close stream");
-               }
-            }
-         }
-      }
-   }
-   
-
-   
-   private String filenameToGroovyname(String filename)
-   {
-      return filename.substring(0, filename.lastIndexOf(groovyFileExtension))
-            .replace('/', '.').replace('\\', '.');
-   }
-
-   private String groovyComponentFilename(String name)
-   {
-      return name.substring(0, name.lastIndexOf(groovyFileExtension)) + ".component.xml";
-   }
-   
-   public String getName()
-   {
-      return NAME;
-   }
-
-   public DeploymentMetadata getMetadata()
-   {
-      return metadata;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/GroovyHotDeploymentStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/GroovyHotDeploymentStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/GroovyHotDeploymentStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,81 +0,0 @@
-package org.jboss.seam.deployment;
-
-import groovy.lang.GroovyClassLoader;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.servlet.ServletContext;
-
-import org.codehaus.groovy.control.CompilerConfiguration;
-
-
-/**
- * A deployment strategy for hot deploying Seam groovy components
- * 
- * @author Pete Muir
- *
- */
-public class GroovyHotDeploymentStrategy extends HotDeploymentStrategy
-{
-   
-   private static final String DEFAULT_SCRIPT_EXTENSION = new CompilerConfiguration().getDefaultScriptExtension();
-   
-   private ClassLoader classLoader;
-   
-   private GroovyDeploymentHandler groovyDeploymentHandler;
-   
-   /**
-    * @param classLoader The parent classloader of the hot deployment classloader
-    * @param hotDeployDirectory The directory in which hot deployable java and 
-    * groovy Seam components are placed
-    * 
-    */
-   public GroovyHotDeploymentStrategy(ClassLoader classLoader, File hotDeployDirectory, ServletContext servletContext, boolean enabled)
-   {
-      super(classLoader, hotDeployDirectory,servletContext, enabled);
-      if (enabled)
-      {
-         groovyDeploymentHandler = new GroovyDeploymentHandler(DEFAULT_SCRIPT_EXTENSION);
-         getDeploymentHandlers().put(GroovyDeploymentHandler.NAME, groovyDeploymentHandler);
-      }
-   }
-   
-   @Override
-   public ClassLoader getClassLoader()
-   {
-      if (classLoader == null && super.getClassLoader() != null)
-      {
-         this.classLoader = new GroovyClassLoader(super.getClassLoader());
-      }
-      return classLoader;
-   }
-
-   @Override
-   public boolean isFromHotDeployClassLoader(Class componentClass)
-   {
-      //loaded by groovy or java
-      if (getClassLoader() == null)
-      {
-         return false;
-      }
-      else
-      {
-         if (super.isFromHotDeployClassLoader(componentClass)) return true; //Java
-         ClassLoader classClassLoader = componentClass.getClassLoader().getParent(); //Groovy use an Inner Delegate CL
-         return classClassLoader == getClassLoader() || classClassLoader == getClassLoader().getParent();
-      }
-   }
-   
-   @Override
-   public Set<ClassDescriptor> getScannedComponentClasses()
-   {
-      Set<ClassDescriptor> set = new HashSet<ClassDescriptor>();
-      set.addAll(super.getScannedComponentClasses());
-      set.addAll(groovyDeploymentHandler.getClasses());
-      return Collections.unmodifiableSet(set);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/HotDeploymentStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/HotDeploymentStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/HotDeploymentStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,203 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.File;
-import java.lang.reflect.Constructor;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.util.Reflections;
-
-/**
- * A deployment strategy for hot deployable Java Seam components
- * 
- * @author Pete Muir
- *
- */
-public class HotDeploymentStrategy extends DeploymentStrategy
-{
-   /**
-    * The default path at which hot deployable Seam components are placed
-    */
-   public static final String DEFAULT_HOT_DEPLOYMENT_DIRECTORY_PATH = "/WEB-INF/dev";
-   
-   /**
-    * The contextual variable name this deployment strategy is made available at
-    * during Seam startup.
-    */
-   public static final String NAME = "hotDeploymentStrategy";
-   
-   /**
-    * The key under which to list extra hot deployment directories
-    * 
-    * This can be specified as a System property or in 
-    * /META-INF/seam-deployment.properties
-    */
-   //public static final String HOT_DEPLOY_DIRECTORIES_KEY = "org.jboss.seam.deployment.hotDeploymentDirectories";
-   
-   /**
-    * The key under which to list extra deployment handlers.
-    * 
-    * This can be specified as a System property or in 
-    * /META-INF/seam-deployment.properties
-    */
-   public static final String HANDLERS_KEY = "org.jboss.seam.deployment.hotDeploymentHandlers";
-   
-   private ClassLoader hotDeployClassLoader;
-   
-   private ComponentDeploymentHandler componentDeploymentHandler;
-   private AnnotationDeploymentHandler annotationDeploymentHandler;
-
-   private ClassLoader classLoader;
-   
-   private ServletContext servletContext;
-   
-   /**
-    * @param classLoader The parent classloader of the hot deployment classloader
-    * @param hotDeployDirectory The directory in which hot deployable Seam 
-    * components are placed
-    */
-   public HotDeploymentStrategy(ClassLoader classLoader, File hotDeployDirectory, ServletContext servletContext, boolean enabled)
-   {
-      if (enabled)
-      {
-         this.servletContext=servletContext;
-         this.classLoader = Thread.currentThread().getContextClassLoader();
-         if (hotDeployDirectory != null && hotDeployDirectory.exists())
-         {
-            initHotDeployClassLoader(classLoader, hotDeployDirectory);
-            componentDeploymentHandler = new ComponentDeploymentHandler();
-            getDeploymentHandlers().put(ComponentDeploymentHandler.NAME, componentDeploymentHandler);
-            annotationDeploymentHandler = new AnnotationDeploymentHandler(new SeamDeploymentProperties(classLoader).getPropertyValues(AnnotationDeploymentHandler.ANNOTATIONS_KEY), classLoader);
-            getDeploymentHandlers().put(AnnotationDeploymentHandler.NAME, annotationDeploymentHandler);
-         }
-      }
-   }
-   
-   private void initHotDeployClassLoader(ClassLoader classLoader, File hotDeployDirectory)
-   {
-      try
-      {
-         URL url = hotDeployDirectory.toURL();
-         URL[] urls = { url };
-         hotDeployClassLoader = new URLClassLoader(urls, classLoader);
-         getFiles().add(hotDeployDirectory);
-      }
-      catch (MalformedURLException mue)
-      {
-         throw new RuntimeException(mue);
-      }
-   }
-   
-   /**
-    * It is both enabled and the classpath was detected. Admittedly,
-    * this seems like a redundant confirmation.
-    */
-   public boolean available()
-   {
-      return isEnabled() && isHotDeployClassLoaderEnabled();
-   }
-   
-   public boolean isEnabled()
-   {
-      return classLoader != null;
-   }
-   
-   public boolean isHotDeployClassLoaderEnabled()
-   {
-      return hotDeployClassLoader != null;
-   }
-   
-   @Override
-   protected String getDeploymentHandlersKey()
-   {
-      return HANDLERS_KEY;
-   }
-
-   /**
-    * Get all hot deployable paths
-    */
-   public File[] getHotDeploymentPaths()
-   {
-      return getFiles().toArray(new File[0]);
-   }
-
-   /**
-    * Return true if the component is from a hot deployment classloader
-    */
-   public boolean isFromHotDeployClassLoader(Class componentClass)
-   {
-      return componentClass.getClassLoader() == hotDeployClassLoader;
-   }
-
-   /**
-    * Dynamically instantiate a {@link HotDeploymentStrategy}
-    * 
-    * Needed to prevent dependency on optional librarires
-    * @param className The strategy to use 
-    * @param classLoader The classloader to use with this strategy
-    * @param hotDeployDirectory The directory which contains hot deployable
-    * Seam components
-    */
-   public static HotDeploymentStrategy createInstance(String className, ClassLoader classLoader, File hotDeployDirectory, ServletContext servletContext, boolean enabled)
-   {
-      try
-      {
-         Class initializer = Reflections.classForName(className);
-         Constructor ctr = initializer.getConstructor(ClassLoader.class, File.class, ServletContext.class, boolean.class);
-         return (HotDeploymentStrategy) ctr.newInstance(classLoader, hotDeployDirectory, servletContext, enabled);
-      }
-      catch (Exception e)
-      {
-         throw new IllegalArgumentException("No such deployment strategy " + className, e);
-      }
-   }
-
-   @Override
-   public ClassLoader getClassLoader()
-   {
-      return hotDeployClassLoader != null ? hotDeployClassLoader : classLoader;
-   }
-   
-   /**
-    * Get all Components which the strategy has scanned and handled
-    */
-   public Set<ClassDescriptor> getScannedComponentClasses()
-   {
-      return Collections.unmodifiableSet(componentDeploymentHandler.getClasses());
-   }
-
-   public Map<String, Set<Class<?>>> getAnnotatedClasses()
-   {
-      return Collections.unmodifiableMap(annotationDeploymentHandler.getClassMap());
-   }
-   
-   @Override
-   public void scan()
-   {
-      getScanner().scanDirectories(getFiles().toArray(new File[0]));
-      postScan();
-   }
-   
-   public static HotDeploymentStrategy instance()
-   {
-      if (Contexts.getEventContext().isSet(NAME))
-      {
-         return (HotDeploymentStrategy) Contexts.getEventContext().get(NAME);
-      }
-      return null;
-   }
-
-   @Override
-   public ServletContext getServletContext()
-   {
-      return servletContext;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/NamespaceDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/NamespaceDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/NamespaceDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,101 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.seam.annotations.Namespace;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * A deployment handler for namespaces
- * 
- * @author Pete Muir
- *
- */
-public class NamespaceDeploymentHandler extends AbstractDeploymentHandler
-{
-   
-   private static DeploymentMetadata NAMESPACE_METADATA = new DeploymentMetadata()
-   {
-
-      public String getFileNameSuffix()
-      {
-         return "/package-info.class";
-      }
-      
-   };
-   
-   public static final String NAME = "org.jboss.seam.deployment.NamespaceDeploymentHandler";
-   
-   private static final LogProvider log = Logging.getLogProvider(NamespaceDeploymentHandler.class);
-   
-   private Set<Package> packages;
-
-   public NamespaceDeploymentHandler()
-   {
-      packages = new HashSet<Package>();
-   }
-   
-   /**
-    * Returns packages with @Namespace declarations
-    */
-   public Set<Package> getPackages()
-   {
-       return Collections.unmodifiableSet(packages);
-   }
-   
-   @Override
-   public void postProcess(ClassLoader classLoader)
-   {
-      for (FileDescriptor fileDescriptor : getResources())
-      {
-         String packageName = filenameToPackageName(fileDescriptor.getName());
-         Package pkg = getPackage(packageName, classLoader);
-         if (pkg == null) 
-         {
-             log.warn("Cannot load package info for " + packageName);
-         } 
-         else 
-         {
-             if (pkg.getAnnotation(Namespace.class) != null) 
-             {
-                 packages.add(pkg);
-             }
-         }
-      }
-      
-      
-   }
-   
-   private static String filenameToPackageName(String filename)
-   {
-      return filename.substring(0, filename.lastIndexOf("/package-info.class"))
-         .replace('/', '.').replace('\\', '.');
-   }
-   
-   private static Package getPackage(String name, ClassLoader classLoader) 
-   {
-       try 
-       {
-           Class c = classLoader.loadClass(name + ".package-info");
-           return c != null ? c.getPackage() : null;
-       } 
-       catch (Exception e) 
-       {
-           return null;
-       }
-   }
-   
-   public String getName()
-   {
-      return NAME;
-   }
-   
-   public DeploymentMetadata getMetadata()
-   {
-      return NAMESPACE_METADATA;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,61 +0,0 @@
-package org.jboss.seam.deployment;
-
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * The {@link PagesDotXmlDeploymentHandler} process pages.xml files
- * Its only purpose is to make sure pages.xml gets updated by hot deploy
- * 
- * @author Stuart Douglas
- * 
- */
-public class PagesDotXmlDeploymentHandler extends AbstractDeploymentHandler
-{
-   
-   private static DeploymentMetadata PAGESDOTXML_SUFFIX_FILE_METADATA = new DeploymentMetadata()
-   {
-      
-      public String getFileNameSuffix()
-      {
-         return "WEB-INF/pages.xml";
-      }
-      
-   };
-   
-   /**
-    * Name under which this {@link DeploymentHandler} is registered
-    */
-   public static final String NAME = "org.jboss.seam.deployment.PagesDotXmlDeploymentHandler";
-   
-   public String getName()
-   {
-      return NAME;
-   }
-   
-   public static PagesDotXmlDeploymentHandler instance()
-   {
-      if (Contexts.isEventContextActive())
-      {
-         if (Contexts.getEventContext().isSet(WarRootDeploymentStrategy.NAME))
-         {
-            DeploymentStrategy deploymentStrategy = (DeploymentStrategy) Contexts.getEventContext().get(WarRootDeploymentStrategy.NAME);
-            Object deploymentHandler = deploymentStrategy.getDeploymentHandlers().get(NAME);
-            if (deploymentHandler != null)
-            {
-               return (PagesDotXmlDeploymentHandler) deploymentHandler;
-            }
-         }
-         return null;
-      }
-      else
-      {
-         throw new IllegalStateException("Event context not active");
-      }
-   }
-   
-   public DeploymentMetadata getMetadata()
-   {
-      return PAGESDOTXML_SUFFIX_FILE_METADATA;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/Scanner.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/Scanner.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/Scanner.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,45 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.File;
-
-/**
- * The Scanner is used to find resources to be processed by Seam
- * 
- * The processing is done by {@link DeploymentHandler}s
- * 
- * @author Pete Muir
- *
- */
-public interface Scanner
-{
-   
-   /**
-    * Recursively scan directories, skipping directories in the exclusion list.
-    * 
-    * @param directories An array of the roots of the directory trees to scan
-    */
-   public void scanDirectories(File[] directories);
-   
-   /**
-    * Recursively scan directories, skipping directories in the exclusion list.
-    * 
-    * @param directories An array of the roots of the directory trees to scan
-    * @param excludedDirectories Directories to skip over during the recursive scan
-    */
-   public void scanDirectories(File[] directories, File[] excludedDirectories);
-   
-   /**
-    * Scan for structures which contain any of the given resources in their root
-    * 
-    * @param resources The resources to scan for
-    */
-   public void scanResources(String[] resources);
-   
-   /**
-    * Get the deployment strategy this scanner is used by
-    */
-   public DeploymentStrategy getDeploymentStrategy();
-   
-   public long getTimestamp();
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/SeamDeploymentProperties.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/SeamDeploymentProperties.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/SeamDeploymentProperties.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,116 +0,0 @@
-package org.jboss.seam.deployment;
-
-import static org.jboss.seam.util.Strings.split;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Properties;
-
-import org.jboss.seam.util.EnumerationEnumeration;
-
-public class SeamDeploymentProperties
-{
-   
-   private ClassLoader classLoader;
-   private Enumeration<URL> urlEnum;
-   
-   public SeamDeploymentProperties(ClassLoader classLoader)
-   {
-      this.classLoader = classLoader;
-   }
-
-   /**
-    * The resource bundle used to control Seam deployment
-    */
-   public static final String RESOURCE_BUNDLE = "META-INF/seam-deployment.properties";
-   
-   // All resource bundles to use, including legacy names
-   private static final String[] RESOURCE_BUNDLES = { RESOURCE_BUNDLE, "META-INF/seam-scanner.properties" };
-   
-   /**
-    * Get a list of possible values for a given key.
-    * 
-    * First, System properties are tried, followed by the specified resource
-    * bundle (first in classpath only).
-    * 
-    * Colon (:) deliminated lists are split out.
-    * 
-    */
-   public List<String> getPropertyValues(String key)
-   {
-      List<String>values = new ArrayList<String>();
-      addPropertiesFromSystem(key, values);
-      addPropertiesFromResourceBundle(key, values);
-      return values;
-   }
-   
-   private void addPropertiesFromSystem(String key, List<String> values)
-   {
-      addProperty(key, System.getProperty(key), values);
-   }
-   
-   private void addPropertiesFromResourceBundle(String key, List<String> values)
-   {
-      try
-      {  
-         while ( getResources().hasMoreElements() )
-         {
-            URL url = getResources().nextElement();
-            Properties properties = new Properties();
-            InputStream propertyStream = url.openStream();
-            try
-            {
-               properties.load(propertyStream);
-               addProperty(key, properties.getProperty(key), values);
-            }
-            finally
-            {
-               if (propertyStream != null)
-               {
-                  propertyStream.close();
-               }
-            }
-         }
-      }
-      catch (IOException e) 
-      {
-         // No - op, file is optional
-      }
-   }
-   
-   /*
-    * Add the property to the set of properties only if it hasn't already been added
-    */
-   private void addProperty(String key, String value, List<String> values)
-   {
-      if (value != null)
-      {
-         String[] properties = split(value, ":");
-         for (String property : properties)
-         {
-            values.add(property);
-         }
-         
-      }
-   }
-   
-   private Enumeration<URL> getResources() throws IOException
-   {
-      
-      if (urlEnum == null)
-      {
-         Enumeration<URL>[] enumerations = new Enumeration[RESOURCE_BUNDLES.length]; 
-         for (int i = 0; i < RESOURCE_BUNDLES.length; i ++)
-         {   
-            enumerations[i] = classLoader.getResources(RESOURCE_BUNDLES[i]);
-         }
-         urlEnum = new EnumerationEnumeration<URL>(enumerations);
-      }
-      return urlEnum;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/StandardDeploymentStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/StandardDeploymentStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/StandardDeploymentStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,138 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * The standard deployment strategy used with Seam, deploys non-hot-deployable
- * Seam components and namespaces
- * 
- * @author Pete Muir
- *
- */
-public class StandardDeploymentStrategy extends DeploymentStrategy
-{
-
-   private ClassLoader classLoader;
-   
-   private ServletContext servletContext;
-   
-   /**
-    * The files used to identify a Seam archive
-    */
-   public static final String[] RESOURCE_NAMES = {"seam.properties", "META-INF/seam.properties", "META-INF/components.xml"};
-   
-   /**
-    * The contextual variable name this deployment strategy is made available at
-    * during Seam startup.
-    */
-   public static final String NAME = "deploymentStrategy";
-   
-   /**
-    * The key under which to list extra deployment handlers.
-    * 
-    * This can be specified as a System property or in 
-    * /META-INF/seam-deployment.properties
-    */
-   public static final String HANDLERS_KEY = "org.jboss.seam.deployment.deploymentHandlers";
-
-   private ComponentDeploymentHandler componentDeploymentHandler;
-   private ComponentsXmlDeploymentHandler componentsXmlDeploymentHandler;
-   private NamespaceDeploymentHandler namespaceDeploymentHandler;
-   private AnnotationDeploymentHandler annotationDeploymentHandler;
-   private DotComponentDotXmlDeploymentHandler dotComponentDotXmlDeploymentHandler;
-   
-   
-   /**
-    * @param classLoader The classloader used to load and handle resources
-    */
-   public StandardDeploymentStrategy(ClassLoader classLoader,ServletContext servletContext)
-   {
-      this.classLoader = Thread.currentThread().getContextClassLoader();
-      this.servletContext=servletContext;
-      componentDeploymentHandler = new ComponentDeploymentHandler();
-      getDeploymentHandlers().put(ComponentDeploymentHandler.NAME, componentDeploymentHandler);
-      componentsXmlDeploymentHandler = new ComponentsXmlDeploymentHandler();
-      getDeploymentHandlers().put(ComponentsXmlDeploymentHandler.NAME, componentsXmlDeploymentHandler);
-      dotComponentDotXmlDeploymentHandler = new DotComponentDotXmlDeploymentHandler();
-      getDeploymentHandlers().put(DotComponentDotXmlDeploymentHandler.NAME, dotComponentDotXmlDeploymentHandler);
-      namespaceDeploymentHandler = new NamespaceDeploymentHandler();
-      getDeploymentHandlers().put(NamespaceDeploymentHandler.NAME, namespaceDeploymentHandler);
-      annotationDeploymentHandler = new AnnotationDeploymentHandler(new SeamDeploymentProperties(classLoader).getPropertyValues(AnnotationDeploymentHandler.ANNOTATIONS_KEY), classLoader);
-      getDeploymentHandlers().put(AnnotationDeploymentHandler.NAME, annotationDeploymentHandler);
-   }
-
-   @Override
-   public ClassLoader getClassLoader()
-   {
-      return classLoader;
-   }
-   
-   @Override
-   protected String getDeploymentHandlersKey()
-   {
-      return HANDLERS_KEY;
-   }
-
-   /**
-    * Get all annotated components known to this strategy
-    */
-   public Set<ClassDescriptor> getAnnotatedComponents()
-   {
-      return Collections.unmodifiableSet(componentDeploymentHandler.getClasses());
-   }
-   
-   /**
-    * Get all XML defined (throught components.xml and component.xml) components
-    */
-   public Set<FileDescriptor> getXmlComponents()
-   {
-      Set<FileDescriptor> fileDescriptors = new HashSet<FileDescriptor>();
-      fileDescriptors.addAll(componentsXmlDeploymentHandler.getResources());
-      fileDescriptors.addAll(dotComponentDotXmlDeploymentHandler.getResources());
-      return Collections.unmodifiableSet(fileDescriptors);
-   }
-   
-   /**
-    * Get all scanned and handled Seam namespaces
-    */
-   public Set<Package> getScannedNamespaces()
-   {
-      return Collections.unmodifiableSet(namespaceDeploymentHandler.getPackages());
-   }
-   
-   public Map<String, Set<Class<?>>> getAnnotatedClasses()
-   {
-      return Collections.unmodifiableMap(annotationDeploymentHandler.getClassMap());
-   }
-   
-   @Override
-   public void scan()
-   {
-      getScanner().scanResources(RESOURCE_NAMES);
-      getScanner().scanDirectories(getFiles().toArray(new File[0]));
-      postScan();
-   }
-   
-   public static StandardDeploymentStrategy instance()
-   {
-      if (Contexts.getEventContext().isSet(NAME))
-      {
-         return (StandardDeploymentStrategy) Contexts.getEventContext().get(NAME);
-      }
-      return null;
-   }
-
-   @Override
-   public ServletContext getServletContext()
-   {
-      return servletContext;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/TimestampCheckForwardingDeploymentStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/TimestampCheckForwardingDeploymentStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/TimestampCheckForwardingDeploymentStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,45 +0,0 @@
-package org.jboss.seam.deployment;
-
-/**
- * An accelerated version of the underlying strategy that uses the SimpleURLScanner
- * to determine the timestamp of the latest file.
- * 
- * @author Dan Allen
- */
-public abstract class TimestampCheckForwardingDeploymentStrategy extends ForwardingDeploymentStrategy
-{
-   private Scanner scanner;
-
-   public boolean changedSince(long mark)
-   {
-      scan();
-      return getTimestamp() > mark;
-   }
-
-   @Override
-   protected void initScanner()
-   {
-      if (getScanner() instanceof AbstractScanner)
-      {
-         final AbstractScanner delegate = (AbstractScanner) getScanner();
-         this.scanner = new TimestampScanner(getServletContext())
-         {
-
-            @Override
-            protected AbstractScanner delegate()
-            {
-               return delegate;
-            }
-            
-         };
-      }
-      
-   }
-   
-   @Override
-   protected void postScan()
-   {
-      // No-op
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/TimestampScanner.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/TimestampScanner.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/TimestampScanner.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,50 +0,0 @@
-package org.jboss.seam.deployment;
-
-import javax.servlet.ServletContext;
-
-/**
- * A no-op version of the URLScanner that merely returns whether the deployment
- * handler would in fact handle this file. It does not process the file
- * in any way. This allows us to use this scanner for timestamp checking.
- * 
- * @author Dan Allen
- */
-public abstract class TimestampScanner extends ForwardingAbstractScanner
-{
-
-   @Override
-   protected boolean handle(String name)
-   {
-      for (DeploymentHandler handler : getDeploymentStrategy().getDeploymentHandlers().values())
-      {
-         if (handler instanceof ClassDeploymentHandler)
-         {
-            if (name.endsWith(".class"))
-            {
-               return true;
-            }
-         }
-         else
-         {
-            if (name.endsWith(handler.getMetadata().getFileNameSuffix()))
-            {
-               return true;
-            }
-         }
-      }
-      return false;
-   }
-   
-   @Deprecated
-   public TimestampScanner()
-   {
-      
-   }
-   
-   
-   public TimestampScanner(ServletContext servletContext)
-   {
-      super(servletContext);
-   }
-  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/URLScanner.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/URLScanner.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/URLScanner.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,187 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.URLDecoder;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Implementation of {@link Scanner} which can scan a {@link URLClassLoader}
- * 
- * @author Thomas Heute
- * @author Gavin King
- * @author Norman Richards
- * @author Pete Muir
- *
- */
-public class URLScanner extends AbstractScanner
-{
-   private static final LogProvider log = Logging.getLogProvider(URLScanner.class);
-   
-   private long timestamp;
-   
-   public URLScanner(DeploymentStrategy deploymentStrategy)
-   {
-      super(deploymentStrategy);
-   }
-   
-   public void scanDirectories(File[] directories)
-   {
-      scanDirectories(directories, new File[0]);
-   }
-   
-   @Override
-   public void scanDirectories(File[] directories, File[] excludedDirectories)
-   {
-      for (File directory : directories)
-      {
-         handleDirectory(directory, null, excludedDirectories);
-      }
-   }
-   
-   public void scanResources(String[] resources)
-   {
-      Set<String> paths = new HashSet<String>();
-      for (String resourceName : resources)
-      {
-         try
-         {
-            Enumeration<URL> urlEnum = getDeploymentStrategy().getClassLoader().getResources(resourceName);
-            while ( urlEnum.hasMoreElements() )
-            {
-               String urlPath = urlEnum.nextElement().getFile();
-               urlPath = URLDecoder.decode(urlPath, "UTF-8");
-               if ( urlPath.startsWith("file:") )
-               {
-                     urlPath = urlPath.substring(5);
-               }
-               if ( urlPath.indexOf('!')>0 )
-               {
-                  urlPath = urlPath.substring(0, urlPath.indexOf('!'));
-               }
-               else
-               {
-                  File dirOrArchive = new File(urlPath);
-                  if ( resourceName!=null && resourceName.lastIndexOf('/')>0 )
-                  {
-                     //for META-INF/components.xml
-                     dirOrArchive = dirOrArchive.getParentFile();
-                  }
-                  urlPath = dirOrArchive.getParent();
-               }
-               paths.add(urlPath);
-            }
-         }
-         catch (IOException ioe) 
-         {
-            log.warn("could not read: " + resourceName, ioe);
-         }
-      }
-      handle(paths);
-   }
-   
-   protected void handle(Set<String> paths)
-   {
-      for ( String urlPath: paths )
-      {
-         try
-         {
-            log.trace("scanning: " + urlPath);
-            File file = new File(urlPath);
-            if ( file.isDirectory() )
-            {
-               handleDirectory(file, null);
-            }
-            else
-            {
-               handleArchiveByFile(file);
-            }
-         }
-         catch (IOException ioe) 
-         {
-            log.warn("could not read entries", ioe);
-         }
-      }
-   }
-
-   private void handleArchiveByFile(File file) throws IOException
-   {
-      try
-      {
-         log.trace("archive: " + file);
-         touchTimestamp(file);
-         ZipFile zip = new ZipFile(file);
-         Enumeration<? extends ZipEntry> entries = zip.entries();
-         while ( entries.hasMoreElements() )
-         {
-            ZipEntry entry = entries.nextElement();
-            String name = entry.getName();
-            handle(name);
-         }
-      }
-      catch (ZipException e)
-      {
-         throw new RuntimeException("Error handling file " + file, e);
-      }
-   }
-
-   private void handleDirectory(File file, String path)
-   {
-      handleDirectory(file, path, new File[0]);
-   }
-   
-   private void handleDirectory(File file, String path, File[] excludedDirectories)
-   {
-      for (File excludedDirectory : excludedDirectories)
-      {
-         if (file.equals(excludedDirectory))
-         {
-            log.trace("skipping excluded directory: " + file);
-            return;
-         }
-      } 
-      
-      log.trace("handling directory: " + file);
-      for ( File child: file.listFiles() )
-      {
-         String newPath = path==null ? child.getName() : path + '/' + child.getName();
-         if ( child.isDirectory() )
-         {
-            handleDirectory(child, newPath, excludedDirectories);
-         }
-         else
-         {
-            if (handle(newPath))
-            {
-               // only try to update the timestamp on this scanner if the file was actually handled
-               touchTimestamp(child);
-            }
-         }
-      }
-   }
-
-   private void touchTimestamp(File file)
-   {
-      if (file.lastModified() > timestamp)
-      {
-         timestamp = file.lastModified();
-      }
-   }
-   
-   @Override
-   public long getTimestamp()
-   {
-      return timestamp;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/WarRootDeploymentStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/WarRootDeploymentStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/WarRootDeploymentStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,102 +0,0 @@
-package org.jboss.seam.deployment;
-
-import java.io.File;
-import java.util.Set;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * A special deployment strategy that can be used to scan the war root. This
- * is treated as a special case. 
- *
- * @author pmuir
- *
- */
-public class WarRootDeploymentStrategy extends DeploymentStrategy
-{
-   
-   private static LogProvider log = Logging.getLogProvider(WarRootDeploymentStrategy.class);
-
-   private ClassLoader classLoader;
-   
-   private ServletContext servletContext;
-   
-   private File[] warRoot;
-   
-   private File[] excludedDirectories;
-   
-   public static final String HANDLERS_KEY = "org.jboss.seam.deployment.deploymentHandlers";
-   
-   public static final String NAME = "warRootDeploymentStrategy";
-   
-   private DotPageDotXmlDeploymentHandler dotPageDotXmlDeploymentHandler;
-
-   private PagesDotXmlDeploymentHandler pagesDotXmlDeploymentHandler;
-   
-   public WarRootDeploymentStrategy(ClassLoader classLoader, File warRoot,ServletContext servletContext)
-   {
-      this(classLoader, warRoot,servletContext, new File[0]);
-   }
-   
-   public WarRootDeploymentStrategy(ClassLoader classLoader, File warRoot,ServletContext servletContext, File[] excludedDirectories)
-   {
-      this.classLoader = classLoader;
-      this.servletContext = servletContext;
-      this.warRoot = new File[1];
-      this.excludedDirectories = excludedDirectories;
-      if (warRoot != null)
-      {
-         this.warRoot[0] = warRoot;
-         getFiles().add(warRoot);
-      }
-      else
-      {
-         log.warn("Unable to discover war root, .page.xml files won't be found");
-         this.warRoot = new File[0];
-      }
-      dotPageDotXmlDeploymentHandler = new DotPageDotXmlDeploymentHandler();
-      pagesDotXmlDeploymentHandler = new PagesDotXmlDeploymentHandler();
-      getDeploymentHandlers().put(DotPageDotXmlDeploymentHandler.NAME, dotPageDotXmlDeploymentHandler);
-      getDeploymentHandlers().put(PagesDotXmlDeploymentHandler.NAME, pagesDotXmlDeploymentHandler);
-      
-   }
-   
-   @Override
-   public ClassLoader getClassLoader()
-   {
-      return classLoader;
-   }
-
-   @Override
-   protected String getDeploymentHandlersKey()
-   {
-      return HANDLERS_KEY;
-   }
-   
-   @Override
-   public void scan()
-   {
-      getScanner().scanDirectories(warRoot, excludedDirectories);
-      postScan();
-   }
-   
-   public File[] getExcludedDirectories()
-   {
-      return excludedDirectories;
-   }
-   
-   public Set<FileDescriptor> getDotPageDotXmlFileNames()
-   {
-      return dotPageDotXmlDeploymentHandler.getResources();
-   }
-
-   @Override
-   public ServletContext getServletContext()
-   {
-      return servletContext;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/deployment/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-/**
- * Scanners and handlers for automatically loading components
- * from deployed archives. 
- */
-package org.jboss.seam.deployment;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/ByteArrayDocumentData.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/ByteArrayDocumentData.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/ByteArrayDocumentData.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,28 +0,0 @@
-package org.jboss.seam.document;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class ByteArrayDocumentData extends DocumentData
-{
-
-   private byte[] data;
-
-   public ByteArrayDocumentData(String baseName, DocumentType documentType, byte[] data)
-   {
-      super(baseName, documentType);
-      this.data = data;
-   }
-
-   @Override
-   public void writeDataToStream(OutputStream stream) throws IOException
-   {
-      stream.write(data);
-   }
-
-   public byte[] getData()
-   {
-      return data;
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentData.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentData.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentData.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,83 +0,0 @@
-package org.jboss.seam.document;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Serializable;
-
-public abstract class DocumentData implements Serializable
-{
-   DocumentType documentType;
-   String baseName;
-
-   String disposition = "inline";
-   String fileName;
-
-   public DocumentData(String baseName, DocumentType documentType)
-   {
-      super();
-      this.documentType = documentType;
-      this.baseName = baseName;
-   }
-
-   public abstract void writeDataToStream(OutputStream stream) throws IOException;
-
-   public DocumentType getDocumentType()
-   {
-      return documentType;
-   }
-
-   public String getBaseName()
-   {
-      return baseName;
-   }
-
-   public void setFilename(String fileName)
-   {
-      this.fileName = fileName;
-   }
-
-   public String getFileName()
-   {
-      if (fileName == null)
-      {
-         return getBaseName() + "." + getDocumentType().getExtension();
-      }
-      else
-      {
-         return fileName;
-      }
-   }
-
-   public void setDisposition(String disposition)
-   {
-      this.disposition = disposition;
-   }
-
-   public String getDisposition()
-   {
-      return disposition;
-   }
-
-   static public class DocumentType implements Serializable
-   {
-      private String mimeType;
-      private String extension;
-
-      public DocumentType(String extension, String mimeType)
-      {
-         this.extension = extension;
-         this.mimeType = mimeType;
-      }
-
-      public String getMimeType()
-      {
-         return mimeType;
-      }
-
-      public String getExtension()
-      {
-         return extension;
-      }
-
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStore.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStore.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStore.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,93 +0,0 @@
-package org.jboss.seam.document;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.faces.application.ViewHandler;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.util.Faces;
-
- at Name("org.jboss.seam.document.documentStore")
- at Scope(ScopeType.CONVERSATION)
- at Install(precedence=Install.BUILT_IN)
-public class DocumentStore 
-    implements Serializable
-{    
-    public static final String DOCSTORE_BASE_URL = "/seam/docstore/document";
-
-    private static final long serialVersionUID = -357154201942127711L;
-
-    Map<String,DocumentData> dataStore = new HashMap<String,DocumentData>();   
-
-    long nextId = 1;
-    
- 
-    boolean useExtensions = false;
-    String errorPage = null;
-    
-    public void setUseExtensions(boolean useExtensions) 
-    {
-        this.useExtensions = useExtensions;
-    }
-    
-    public void setErrorPage(String errorPage) 
-    {
-        this.errorPage = errorPage;
-    }
-    
-    public String getErrorPage() 
-    {
-        return errorPage;
-    }
-    
-    public String newId() 
-    {
-        return String.valueOf(nextId++);
-    }
-
-    public void saveData(String id, DocumentData documentData) 
-    {
-        dataStore.put(id, documentData);
-    }
-
-    public boolean idIsValid(String id) 
-    {
-        return dataStore.get(id) != null;
-    }
-    
-    public DocumentData getDocumentData(String id) 
-    {
-        return dataStore.get(id);
-    }
-    
-    public static DocumentStore instance()
-    {
-       return (DocumentStore) Component.getInstance("org.jboss.seam.document.documentStore");
-    }
-  
-
-    public String preferredUrlForContent(String baseName, String extension, String contentId) 
-    {                
-        return baseUrlForContent(baseName, extension) + "?docId=" + contentId;
-    }
-
-    protected String baseUrlForContent(String baseName, String extension) {
-        if (useExtensions) {
-            return baseName + "." + extension;
-        } else { 
-            FacesContext context = FacesContext.getCurrentInstance();
-            ViewHandler handler = context.getApplication().getViewHandler();
-            String url = handler.getActionURL(context, 
-                    DOCSTORE_BASE_URL + Faces.getDefaultSuffix(context));
-            return context.getExternalContext().encodeActionURL(url);
-        }
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStorePhaseListener.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStorePhaseListener.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStorePhaseListener.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,68 +0,0 @@
-package org.jboss.seam.document;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.web.Parameters;
-
-public class DocumentStorePhaseListener implements PhaseListener
-{
-   private static final long serialVersionUID = 7308251684939658978L;
-
-   private static final LogProvider log = Logging.getLogProvider(DocumentStorePhaseListener.class);
-
-   public PhaseId getPhaseId()
-   {
-      return PhaseId.RENDER_RESPONSE;
-   }
-
-   public void afterPhase(PhaseEvent phaseEvent)
-   {
-      // ...
-   }
-
-   public void beforePhase(PhaseEvent phaseEvent)
-   {
-      String rootId = Pages.getViewId(phaseEvent.getFacesContext());
-
-      Parameters params = Parameters.instance();
-      String id = (String) params.convertMultiValueRequestParameter(params.getRequestParameters(), "docId", String.class);
-      if (rootId.contains(DocumentStore.DOCSTORE_BASE_URL))
-      {
-         sendContent(phaseEvent.getFacesContext(), id);
-      }
-   }
-
-   public void sendContent(FacesContext context, String contentId)
-   {
-      try
-      {
-         DocumentData documentData = DocumentStore.instance().getDocumentData(contentId);
-
-         if (documentData != null)
-         {
-
-            HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
-            response.setContentType(documentData.getDocumentType().getMimeType());
-
-            response.setHeader("Content-Disposition", documentData.getDisposition() + "; filename=\"" + documentData.getFileName() + "\"");
-
-            documentData.writeDataToStream(response.getOutputStream());
-            context.responseComplete();
-         }
-      }
-      catch (IOException e)
-      {
-         log.warn(e);
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStoreServlet.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStoreServlet.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/DocumentStoreServlet.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,63 +0,0 @@
-package org.jboss.seam.document;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.servlet.ContextualHttpServletRequest;
-import org.jboss.seam.web.Parameters;
-
-public class DocumentStoreServlet extends HttpServlet
-{
-   private static final long serialVersionUID = 5196002741557182072L;
-
-   @Override
-   protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException
-   {
-      new ContextualHttpServletRequest(request)
-      {
-         @Override
-         public void process() throws ServletException, IOException
-         {
-            doWork(request, response);
-         }
-      }.run();
-   }
-
-   private static void doWork(HttpServletRequest request, HttpServletResponse response) throws IOException
-   {
-      Parameters params = Parameters.instance();
-      String contentId = (String) params.convertMultiValueRequestParameter(params.getRequestParameters(), "docId", String.class);
-
-      DocumentStore store = DocumentStore.instance();
-
-      if (store.idIsValid(contentId))
-      {
-         DocumentData documentData = store.getDocumentData(contentId);
-
-         response.setContentType(documentData.getDocumentType().getMimeType());
-         response.setHeader("Content-Disposition", documentData.getDisposition() + "; filename=\"" + documentData.getFileName() + "\"");
-
-         documentData.writeDataToStream(response.getOutputStream());
-      }
-      else
-      {
-         String error = store.getErrorPage();
-         if (error != null)
-         {
-            if (error.startsWith("/"))
-            {
-               error = request.getContextPath() + error;
-            }
-            response.sendRedirect(error);
-         }
-         else
-         {
-            response.sendError(404);
-         }
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/document/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
- at Namespace(value="http://jboss.com/products/seam/document",prefix="org.jboss.seam.document")
-package org.jboss.seam.document;
-
-import org.jboss.seam.annotations.Namespace;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/Decision.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/Decision.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/Decision.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,21 +0,0 @@
-package org.jboss.seam.drools;
-
-/**
- * API for setting the result of a decision from rules in
- * a Drools decision handler.
- *
- */
-public class Decision
-{
-   private String outcome;
-
-   public String getOutcome()
-   {
-      return outcome;
-   }
-
-   public void setOutcome(String outcome)
-   {
-      this.outcome = outcome;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsActionHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsActionHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsActionHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,37 +0,0 @@
-package org.jboss.seam.drools;
-
-import java.util.List;
-
-import org.drools.WorkingMemory;
-import org.jbpm.graph.def.ActionHandler;
-import org.jbpm.graph.exe.ExecutionContext;
-
-/**
- * A jBPM ActionHandler that delegates to a Drools WorkingMemory
- * held in a Seam context variable.
- * 
- * @author Jeff Delong
- * @author Gavin King
- * @author Tihomir Surdilovic
- *
- */
-public class DroolsActionHandler extends DroolsHandler implements ActionHandler
-{
-   private static final long serialVersionUID = 7752070876220597913L;
-   
-   public List<String> assertObjects;
-   public List<String> retractObjects;
-   public String workingMemoryName;
-   public String startProcessId;
-   
-   public void execute(ExecutionContext executionContext) throws Exception
-   {
-      WorkingMemory workingMemory = getWorkingMemory(workingMemoryName, assertObjects, retractObjects, executionContext);
-      if(startProcessId != null && startProcessId.trim().length() > 0 ) 
-      {
-         workingMemory.startProcess(startProcessId);
-      }
-      workingMemory.fireAllRules();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsAssignmentHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsAssignmentHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsAssignmentHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,38 +0,0 @@
-package org.jboss.seam.drools;
-
-import java.util.List;
-
-import org.drools.WorkingMemory;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.taskmgmt.def.AssignmentHandler;
-import org.jbpm.taskmgmt.exe.Assignable;
-
-/**
- * A jBPM AssignmentHandler that delegates to a Drools WorkingMemory
- * held in a Seam context variable.
- * 
- * @author Jeff Delong
- * @author Gavin King
- *
- */
-public class DroolsAssignmentHandler extends DroolsHandler implements AssignmentHandler
-{
-   private static final long serialVersionUID = -7114640047036854546L;
-   
-   public String workingMemoryName;
-   public List<String> assertObjects;
-   public List<String> retractObjects;
-   public String startProcessId;
-   
-   public void assign(Assignable assignable, ExecutionContext executionContext) throws Exception
-   {
-      WorkingMemory workingMemory = getWorkingMemory(workingMemoryName, assertObjects, retractObjects, executionContext);
-      workingMemory.setGlobal( "assignable", assignable );
-      if(startProcessId != null && startProcessId.trim().length() > 0 ) 
-      {
-         workingMemory.startProcess(startProcessId);
-      }
-      workingMemory.fireAllRules();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsDecisionHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsDecisionHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsDecisionHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,38 +0,0 @@
-package org.jboss.seam.drools;
-
-import java.util.List;
-
-import org.drools.WorkingMemory;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.graph.node.DecisionHandler;
-
-/**
- * A jBPM DecisionHandler that delegates to a Drools WorkingMemory
- * held in a Seam context variable. The decision outcome is returned
- * by setting the outcome attribute of the global named "decision".
- * 
- * @author Gavin King
- *
- */
-public class DroolsDecisionHandler extends DroolsHandler implements DecisionHandler
-{
-   private static final long serialVersionUID = -8900810376838166513L;
-   
-   public List<String> assertObjects;
-   public List<String> retractObjects;
-   public String workingMemoryName;
-   public String startProcessId;
-   
-   public String decide(ExecutionContext executionContext) throws Exception
-   {
-      WorkingMemory workingMemory = getWorkingMemory(workingMemoryName, assertObjects, retractObjects, executionContext);
-      workingMemory.setGlobal( "decision", new Decision() );
-      if(startProcessId != null && startProcessId.trim().length() > 0 ) 
-      {
-         workingMemory.startProcess(startProcessId);
-      }
-      workingMemory.fireAllRules();
-      return ( (Decision) workingMemory.getGlobal("decision") ).getOutcome();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/DroolsHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,96 +0,0 @@
-package org.jboss.seam.drools;
-
-import java.util.List;
-
-import org.drools.FactHandle;
-import org.drools.WorkingMemory;
-import org.jboss.seam.Component;
-import org.jboss.seam.bpm.Actor;
-import org.jboss.seam.core.Expressions;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.jpdl.el.ELException;
-
-/**
- * Common functionality for jBPM handlers for Drools.
- * 
- * @author Jeff Delong
- * @author Gavin King
- *
- */
-public class DroolsHandler
-{
-   protected WorkingMemory getWorkingMemory(String workingMemoryName, List<String> expressions, List<String> retractions, ExecutionContext executionContext) 
-         throws ELException
-   {
-      WorkingMemory workingMemory = (WorkingMemory) Component.getInstance(workingMemoryName, true);
-      
-      if(expressions != null && expressions.size() > 0) 
-      {
-         for (String objectName: expressions)
-         {
-            Object object = Expressions.instance().createValueExpression(objectName).getValue();
-            //Object object = new SeamVariableResolver().resolveVariable(objectName);
-            // assert the object into the rules engine
-            if (object instanceof Iterable)
-            {
-               for (Object element: (Iterable) object)
-               {
-                  assertObject(workingMemory, element);
-               }
-            }
-            else
-            {
-               assertObject(workingMemory, object);
-            }
-         }
-      }
-      
-      if(retractions != null && retractions.size() > 0) 
-      {
-         for (String objectName: retractions)
-         {
-            Object object = Expressions.instance().createValueExpression(objectName).getValue();
-            //Object object = new SeamVariableResolver().resolveVariable(objectName);
-            // retract the object from the rules engine
-            if (object instanceof Iterable)
-            {
-               for (Object element: (Iterable) object)
-               {
-                  retractObject(workingMemory, element);
-               }
-            }
-            else
-            {
-               retractObject(workingMemory, object);
-            }
-         }
-      }
-      
-      //workingMemory.setGlobal( "contextInstance", executionContext.getContextInstance() );
-      workingMemory.insert(Actor.instance());
-
-      return workingMemory;
-   }
-
-   private void assertObject(WorkingMemory workingMemory, Object element)
-   {
-      FactHandle fact = workingMemory.getFactHandle(element);
-      if (fact==null)
-      {
-         workingMemory.insert(element);
-      }
-      else
-      {
-         workingMemory.update(fact, element);
-      }
-   }
-   
-   private void retractObject(WorkingMemory workingMemory, Object element)
-   {
-      FactHandle fact = workingMemory.getFactHandle(element);
-      if (fact != null)
-      {
-         workingMemory.retract(fact);
-      }
-   } 
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/ManagedWorkingMemory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/ManagedWorkingMemory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/ManagedWorkingMemory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,174 +0,0 @@
-package org.jboss.seam.drools;
-
-import java.io.Serializable;
-
-import org.drools.RuleBase;
-import org.drools.StatefulSession;
-import org.drools.spi.GlobalResolver;
-import org.drools.event.AgendaEventListener;
-import org.drools.event.RuleFlowEventListener;
-import org.drools.event.WorkingMemoryEventListener;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.Mutable;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * A conversation-scoped Drools WorkingMemory for a named RuleBase
- * 
- * @author Gavin King
- * @author Tihomir Surdilovic
- *
- */
- at Scope(ScopeType.CONVERSATION)
- at BypassInterceptors
-public class ManagedWorkingMemory implements Mutable, Serializable
-{
-   private static final long serialVersionUID = -1746942080571374743L;
-   
-   private static final LogProvider log = Logging.getLogProvider(ManagedWorkingMemory.class);
-   
-   private String ruleBaseName;
-   private String[] eventListeners;
-   private StatefulSession statefulSession;
-   private ValueExpression<RuleBase> ruleBase;
-   
-   public boolean clearDirty()
-   {
-      return true;
-   }
-   
-   /**
-    * The name of a Seam context variable holding an
-    * instance of org.drools.RuleBase
-    * 
-    * @return a context variable name
-    * @deprecated
-    */
-   public String getRuleBaseName()
-   {
-      return ruleBaseName;
-   }
-   
-   /**
-    * The name of a Seam context variable holding an
-    * instance of org.drools.RuleBase
-    * 
-    * @param ruleBaseName a context variable name
-    * @deprecated
-    */
-   public void setRuleBaseName(String ruleBaseName)
-   {
-      this.ruleBaseName = ruleBaseName;
-   }
-   
-   @Unwrap
-   public StatefulSession getStatefulSession()
-   {
-      if (statefulSession==null)
-      {
-         statefulSession = getRuleBaseFromValueBinding().newStatefulSession();
-         statefulSession.setGlobalResolver( createGlobalResolver( statefulSession.getGlobalResolver() ) );
-         if(eventListeners != null) {
-            setEventListeners(statefulSession);
-         }
-      }
-      return statefulSession;
-   }
-   
-   private void setEventListeners(StatefulSession statefulSession) 
-   {
-      if(eventListeners != null) {
-         for(String eventListener : eventListeners) 
-         {
-            log.debug("adding eventListener: " + eventListener);
-            try
-            {
-               Class eventListenerClass = Class.forName(eventListener);
-               Object eventListenerObject = eventListenerClass.newInstance();
-               if(eventListenerObject instanceof WorkingMemoryEventListener) 
-               {
-                  statefulSession.addEventListener((WorkingMemoryEventListener) eventListenerObject);
-               } 
-               else if(eventListenerObject instanceof AgendaEventListener) 
-               {
-                  statefulSession.addEventListener((AgendaEventListener) eventListenerObject);
-               } 
-               else if(eventListenerObject instanceof RuleFlowEventListener) 
-               {
-                  statefulSession.addEventListener((RuleFlowEventListener) eventListenerObject);
-               } 
-               else 
-               {
-                  log.debug("event Listener " + eventListener + " is not of valid type - bypassing.");
-               }
-            }
-            catch (Exception e)
-            {
-               log.error("error adding event listener " + eventListener + " - bypassing.");
-            }
-         }
-      }
-   }
-
-   protected RuleBase getRuleBaseFromValueBinding()
-   {
-      RuleBase ruleBase;
-      if (this.ruleBase!=null)
-      {
-         ruleBase = this.ruleBase.getValue();
-      }
-      else if (ruleBaseName!=null)
-      {
-         //deprecated stuff
-         ruleBase = (RuleBase) Component.getInstance(ruleBaseName, true);
-      }
-      else
-      {
-         throw new IllegalStateException("No RuleBase");
-      }
-             
-      if (ruleBase==null)
-      {
-         throw new IllegalStateException("RuleBase not found: " + ruleBaseName);
-      }
-      return ruleBase;
-   }
-
-   protected GlobalResolver createGlobalResolver(GlobalResolver delegate)
-   {
-      return new SeamGlobalResolver(delegate);
-   }
-   
-   @Destroy
-   public void destroy()
-   {
-      statefulSession.dispose();
-   }
-   
-   public ValueExpression<RuleBase> getRuleBase()
-   {
-      return ruleBase;
-   }
-   
-   public void setRuleBase(ValueExpression<RuleBase> ruleBase)
-   {
-      this.ruleBase = ruleBase;
-   }
-   
-   public String[] getEventListeners()
-   {
-      return eventListeners;
-   }
-
-   public void setEventListeners(String[] eventListeners)
-   {
-      this.eventListeners = eventListeners;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/RuleAgent.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/RuleAgent.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/RuleAgent.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,161 +0,0 @@
-package org.jboss.seam.drools;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Resources;
-
-/**
- * Manager component for a rule base loaded from a drools RulesAgent
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
-public class RuleAgent
-{
-   private static final LogProvider log = Logging.getLogProvider(RuleAgent.class);
-   
-   private org.drools.agent.RuleAgent agent;
-   private String configurationFile;  
-
-   private String newInstance;
-   private String files;
-   private String url;
-   private String localCacheDir;
-   private String poll;
-   private String configName;
-   
-   @Create
-   public void createAgent() throws Exception
-   {  
-      Properties properties = new Properties();
-      
-      loadFromPath(properties, configurationFile);
-      setLocalProperties(properties);
-      
-      agent = org.drools.agent.RuleAgent.newRuleAgent(properties);    
-      log.debug("Creating new rules agent");
-   }
-   
-   protected void setLocalProperties(Properties properties)
-   {
-      if (newInstance != null) {
-         properties.setProperty(org.drools.agent.RuleAgent.NEW_INSTANCE, newInstance);
-      }
-      if (files != null) {
-         properties.setProperty(org.drools.agent.RuleAgent.FILES, files);
-      }
-      if (url != null) {
-         properties.setProperty(org.drools.agent.RuleAgent.URLS, url);
-      }
-      if (localCacheDir != null) {
-         properties.setProperty(org.drools.agent.RuleAgent.LOCAL_URL_CACHE, localCacheDir);
-      }
-      if (poll != null) {
-         properties.setProperty(org.drools.agent.RuleAgent.POLL_INTERVAL, poll);
-      }
-      if (configName != null) {
-         properties.setProperty(org.drools.agent.RuleAgent.CONFIG_NAME, configName);
-      }
-
-   }
-
-   protected void loadFromPath(Properties properties, String configurationFile)
-      throws IOException
-   {
-      if (configurationFile != null) {
-         InputStream inputStream = Resources.getResourceAsStream(configurationFile, null);
-         if (inputStream != null) {
-            try {
-               properties.load(inputStream);
-            } finally {
-               inputStream.close();
-            }         
-         }
-      }
-   }
-
-   @Unwrap
-   public org.drools.RuleBase getRuleBase()
-   {
-      return agent.getRuleBase();   
-   }
-   
-   public String getNewInstance()
-   {
-      return newInstance;
-   }
-
-   public void setNewInstance(String newInstance)
-   {
-      this.newInstance = newInstance;
-   }
-
-   public String getFiles()
-   {
-      return files;
-   }
-
-   public void setFiles(String files)
-   {
-      this.files = files;
-   }
-
-   public String getUrl()
-   {
-      return url;
-   }
-
-   public void setUrl(String url)
-   {
-      this.url = url;
-   }
-
-   public String getLocalCacheDir()
-   {
-      return localCacheDir;
-   }
-
-   public void setLocalCacheDir(String localCacheDir)
-   {
-      this.localCacheDir = localCacheDir;
-   }
-
-   public String getPoll()
-   {
-      return poll;
-   }
-
-   public void setPoll(String poll)
-   {
-      this.poll = poll;
-   }
-
-   public String getConfigName()
-   {
-      return configName;
-   }
-
-   public void setConfigName(String name)
-   {
-      this.configName = name;
-   }
-  
-   public String getConfigurationFile()
-   {
-      return configurationFile;
-   }
-
-   public void setConfigurationFile(String brmsConfig)
-   {
-      this.configurationFile = brmsConfig;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/RuleBase.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/RuleBase.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/RuleBase.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,169 +0,0 @@
-package org.jboss.seam.drools;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import org.drools.RuleBaseConfiguration;
-import org.drools.RuleBaseFactory;
-import org.drools.compiler.DroolsError;
-import org.drools.compiler.PackageBuilder;
-import org.drools.compiler.PackageBuilderConfiguration;
-import org.drools.compiler.RuleBuildError;
-import org.drools.spi.ConsequenceExceptionHandler;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.core.ResourceLoader;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Manager component for a Drools RuleBase
- * 
- * @author Gavin King
- * @author Tihomir Surdilovic
- *
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
-public class RuleBase
-{
-   private static final LogProvider log = Logging.getLogProvider(RuleBase.class);
-   
-   private String[] ruleFiles;
-   private String dslFile;
-   private ValueExpression<ConsequenceExceptionHandler> consequenceExceptionHandler;
-   private org.drools.RuleBase ruleBase;
-   
-   @Create
-   public void compileRuleBase() throws Exception
-   {
-      PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
-      PackageBuilder builder = new PackageBuilder(conf);
-      
-      if (ruleFiles!=null)
-      {
-         for (String ruleFile: ruleFiles)
-         {
-            log.debug("parsing rules: " + ruleFile);
-            InputStream stream = ResourceLoader.instance().getResourceAsStream(ruleFile);
-            if (stream==null)
-            {
-               throw new IllegalStateException("could not locate rule file: " + ruleFile);
-            }
-            
-            if(isDecisionTable(ruleFile)) 
-            {
-		if (SpreadsheetCompiler.instance() != null) {
-		    builder.addPackageFromDrl(SpreadsheetCompiler.instance().compile(stream));
-		} else {
-		    throw new UnsupportedOperationException("Unable to compile decision table. You need drools-decisiontables.jar in your classpath");
-			
-		} 
-            }
-            else if(isRuleFlow(ruleFile)) 
-            {
-               log.debug("adding ruleflow: " + ruleFile);
-               builder.addRuleFlow( new InputStreamReader(stream) );
-            } 
-            else 
-            {                
-               // read in the source
-               Reader drlReader = new InputStreamReader(stream);
-               
-               if (dslFile==null)
-               {
-                  builder.addPackageFromDrl(drlReader);               
-               }
-               else
-               {
-                  Reader dslReader = new InputStreamReader( ResourceLoader.instance().getResourceAsStream(dslFile) );
-                  builder.addPackageFromDrl(drlReader, dslReader);
-               }
-            }
-            
-            if ( builder.hasErrors() )
-            {
-               log.error("errors parsing rules in: " + ruleFile);               
-               for ( DroolsError error: builder.getErrors().getErrors() )
-               {
-                  if (error instanceof RuleBuildError)
-                  {
-                     RuleBuildError ruleError = (RuleBuildError) error;
-                     log.error( ruleError.getMessage() + " (" + ruleFile + ':' + ruleError.getLine() + ')' );                     
-                  }
-                  else
-                  {
-                     log.error( error.getMessage() + " (" + ruleFile + ')' );                     
-                  }
-               }
-            }
-         }
-      }
-      
-      if(consequenceExceptionHandler != null) 
-      {
-         log.debug("adding consequence exception handler: " + consequenceExceptionHandler.getExpressionString());
-         RuleBaseConfiguration rbconf = new RuleBaseConfiguration();
-         rbconf.setConsequenceExceptionHandler(consequenceExceptionHandler.getValue().toString());
-         ruleBase = RuleBaseFactory.newRuleBase( rbconf );
-      }
-      else 
-      {
-         ruleBase = RuleBaseFactory.newRuleBase();
-      }
-      
-      ruleBase.addPackage( builder.getPackage() );
-   }
-   
-   @Unwrap
-   public org.drools.RuleBase getRuleBase()
-   {
-      return ruleBase;
-   }
-   
-   public String[] getRuleFiles()
-   {
-      return ruleFiles;
-   }
-   
-   public void setRuleFiles(String[] ruleFiles)
-   {
-      this.ruleFiles = ruleFiles;
-   }
-   
-   public String getDslFile()
-   {
-      return dslFile;
-   }
-   
-   public void setDslFile(String dslFile)
-   {
-      this.dslFile = dslFile;
-   }
-   
-   public ValueExpression<ConsequenceExceptionHandler> getConsequenceExceptionHandler()
-   {
-      return consequenceExceptionHandler;
-   }
-
-   public void setConsequenceExceptionHandler(ValueExpression<ConsequenceExceptionHandler> consequenceExceptionHandler)
-   {
-      this.consequenceExceptionHandler = consequenceExceptionHandler;
-   }
-
-   private boolean isDecisionTable(String fileName) 
-   {
-      return fileName != null && fileName.length() > 0 && fileName.endsWith(".xls");
-   }
-   
-   private boolean isRuleFlow(String fileName) 
-   {
-      //support both new drools5 and older drools4 formats
-      return fileName != null && fileName.length() > 0 && (fileName.endsWith(".rf") || fileName.endsWith(".rfm"));
-   } 
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/SeamGlobalResolver.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/SeamGlobalResolver.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/SeamGlobalResolver.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,52 +0,0 @@
-package org.jboss.seam.drools;
-
-import org.drools.spi.GlobalResolver;
-import org.jboss.seam.Component;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Init;
-
-/**
- * Resolves Seam context variables as Drools globals
- * 
- * @author Gavin King
- *
- */
-public class SeamGlobalResolver implements GlobalResolver
-{
-   private GlobalResolver delegate;
-   
-   public SeamGlobalResolver(GlobalResolver delegate)
-   {
-      this.delegate = delegate;
-   }
-
-   public void setGlobal(String name, Object value)
-   {
-      //TODO: is this the right thing to do??
-      //or: Contexts.getConversationContext().set(name, value);
-      delegate.setGlobal(name, value);
-   }
-   
-   public Object resolveGlobal(String name)
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         return delegate.resolveGlobal(name);
-      }
-      else
-      {
-         Object instance = Component.getInstance(name);
-         if (instance==null)
-         {
-            instance = delegate.resolveGlobal(name);
-            return instance==null ?
-                  Init.instance().getRootNamespace().getChild(name) :
-                  instance;
-         }
-         else
-         {
-            return instance;
-         }
-      }
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/SpreadsheetCompiler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/SpreadsheetCompiler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/SpreadsheetCompiler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,53 +0,0 @@
-package org.jboss.seam.drools;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.drools.decisiontable.InputType;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Compiles Drools DecisionTable.
- * 
- * @author Tihomir Surdilovic
- *
- */
-
- at Name("org.jboss.seam.drools.spreadsheetComponent")
- at BypassInterceptors
- at Scope(APPLICATION)
- at Install(precedence = BUILT_IN, classDependencies = "org.drools.decisiontable.SpreadsheetCompiler")
-public class SpreadsheetCompiler
-{
-    private static final LogProvider log = Logging.getLogProvider(SpreadsheetCompiler.class);  
-   
-    public InputStreamReader compile(InputStream stream) {
-	org.drools.decisiontable.SpreadsheetCompiler compiler = new org.drools.decisiontable.SpreadsheetCompiler();
-	String drl = compiler.compile(stream, InputType.XLS);
-
-	byte currentXMLBytes[] = drl.getBytes();
-	InputStreamReader source = new InputStreamReader(new ByteArrayInputStream(currentXMLBytes));
-	return source;
-    }
-   
-    public static SpreadsheetCompiler instance()
-    {
-	if (!Contexts.isApplicationContextActive()) {
-	    return new SpreadsheetCompiler();
-	} else {
-	    return (SpreadsheetCompiler) Component.getInstance(SpreadsheetCompiler.class, ScopeType.APPLICATION);
-	}
-    }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/drools/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * Seam components for integrating Drools.
- */
- at Namespace(value="http://jboss.com/products/seam/drools", prefix="org.jboss.seam.drools")
-package org.jboss.seam.drools;
-
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/RemoveInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/RemoveInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/RemoveInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,94 +0,0 @@
-//$Id: RemoveInterceptor.java 8626 2008-08-07 19:50:09Z pete.muir at jboss.org $
-package org.jboss.seam.ejb;
-
-import static org.jboss.seam.ComponentType.STATEFUL_SESSION_BEAN;
-
-import java.lang.reflect.Method;
-import java.rmi.RemoteException;
-
-import javax.ejb.ApplicationException;
-import javax.ejb.Remove;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Removes SFSB components from the Seam context after invocation
- * of an EJB @Remove method, or when a system exception is thrown
- * from the bean.
- * 
- * @author Gavin King
- */
- at Interceptor(stateless=true, type=InterceptorType.CLIENT)
-public class RemoveInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = -6693606158918954699L;
-   
-   private static final LogProvider log = Logging.getLogProvider(RemoveInterceptor.class);
-
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      //we have the method from the local interface, get the corresponding one
-      //for the actual bean class (it has the @Remove annotation)
-      Method removeMethod = getComponent().getRemoveMethod( invocation.getMethod().getName() );
-      Object result;
-      try
-      {
-         result = invocation.proceed();
-      }
-      catch (Exception exception)
-      {
-         removeIfNecessary(removeMethod, exception);
-         throw exception;
-      }
-      removeIfNecessary(removeMethod);
-      return result;
-   }
-
-   private void removeIfNecessary(Method removeMethod, Exception exception) {
-      if ( exception instanceof RuntimeException || exception instanceof RemoteException )
-      {
-         if ( !exception.getClass().isAnnotationPresent(ApplicationException.class) ) 
-         {
-            //it is a "system exception"
-            remove();
-         }
-      }
-      else if ( removeMethod!=null )
-      {
-         if ( !removeMethod.getAnnotation(Remove.class).retainIfException() ) 
-         {
-            remove();
-         }
-      }
-   }
-
-   private void removeIfNecessary(Method removeMethod)
-   {
-      if ( removeMethod!=null ) 
-      {
-         remove();
-      }
-   }
-
-   private void remove() 
-   {
-      getComponent().getScope().getContext().remove( getComponent().getName() );
-      if ( log.isDebugEnabled() )
-      {
-         log.debug( "Stateful component was removed: " + getComponent().getName() );
-      }
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().getType() == STATEFUL_SESSION_BEAN;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/SeamInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/SeamInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/SeamInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.ejb;
-
-import org.jboss.seam.intercept.SessionBeanInterceptor;
-
-/**
- * Controller interceptor for server-side interceptors of
- * EJB3 session bean components.
- * 
- * @author Gavin King
- */
-public class SeamInterceptor extends SessionBeanInterceptor
-{
-   private static final long serialVersionUID = 4250146024419999221L;   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/ejb/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-/**
- * Integration with EJB 3.0. Nothing
- * interesting here.
- */
-package org.jboss.seam.ejb;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/EL.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/EL.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/EL.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,143 +0,0 @@
-package org.jboss.seam.el;
-
-import java.util.Locale;
-
-import javax.el.ArrayELResolver;
-import javax.el.BeanELResolver;
-import javax.el.CompositeELResolver;
-import javax.el.ELContext;
-import javax.el.ELResolver;
-import javax.el.ExpressionFactory;
-import javax.el.FunctionMapper;
-import javax.el.ListELResolver;
-import javax.el.MapELResolver;
-import javax.el.ResourceBundleELResolver;
-import javax.el.VariableMapper;
-
-import org.jboss.el.ExpressionFactoryImpl;
-import org.jboss.el.lang.FunctionMapperImpl;
-import org.jboss.el.lang.VariableMapperImpl;
-
-/**
- * An instance of JBoss EL.
- * 
- * @author Gavin King
- *
- */
-public class EL
-{
-   public static final ELResolver EL_RESOLVER = createELResolver();
-   //ELContext instances should not be shared between threads
-   //public static final ELContext EL_CONTEXT = createELContext( EL_RESOLVER, new FunctionMapperImpl() );
-   
-   public static final ExpressionFactory EXPRESSION_FACTORY = new ExpressionFactoryImpl();
-   
-   private static ELResolver createELResolver()
-   {
-      CompositeELResolver resolver = new CompositeELResolver();
-      resolver.add( new SeamELResolver() );
-      resolver.add( new MapELResolver() );
-      resolver.add( new ListELResolver() );
-      resolver.add( new ArrayELResolver() );
-      resolver.add( new ResourceBundleELResolver() );
-      resolver.add( new BeanELResolver() );
-      return resolver;
-   }
-
-   public static ELContext createELContext() {
-       return createELContext( EL_RESOLVER, new FunctionMapperImpl() );
-   }
-   
-   public static ELContext createELContext(final ELResolver resolver, final FunctionMapper functionMapper)
-   {
-      return new ELContext()
-      {
-         final VariableMapperImpl variableMapper = new VariableMapperImpl();
-
-         @Override
-         public ELResolver getELResolver()
-         {
-            return resolver;
-         }
-
-         @Override
-         public FunctionMapper getFunctionMapper()
-         {
-            return functionMapper;
-         }
-
-         @Override
-         public VariableMapper getVariableMapper()
-         {
-            return variableMapper;
-         }
-         
-      };
-   }
-   
-   public static ELContext createELContext(final ELContext context, final ELResolver resolver)
-   {
-      return new ELContext()
-      {
-
-         @Override
-         public Locale getLocale()
-         {
-            return context.getLocale();
-         }
-         
-         @Override
-         public void setPropertyResolved(boolean value)
-         {
-            super.setPropertyResolved(value);
-            context.setPropertyResolved(value);
-         }
-         
-         /*@Override
-         public boolean isPropertyResolved()
-         {
-            return super.isPropertyResolved();
-         }*/
-         
-         @Override
-         public void putContext(Class clazz, Object object)
-         {
-            super.putContext(clazz, object);
-            context.putContext(clazz, object);
-         }
-         
-         @Override
-         public Object getContext(Class clazz)
-         {
-            return context.getContext(clazz);
-         }
-         
-         @Override
-         public void setLocale(Locale locale)
-         {
-            super.setLocale(locale);
-            context.setLocale(locale);
-         }
-         
-         @Override
-         public ELResolver getELResolver()
-         {
-            return resolver;
-         }
-
-         @Override
-         public FunctionMapper getFunctionMapper()
-         {
-            return context.getFunctionMapper();
-         }
-
-         @Override
-         public VariableMapper getVariableMapper()
-         {
-            return context.getVariableMapper();
-         }
-         
-      };
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/JBossELReferenceCache.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/JBossELReferenceCache.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/JBossELReferenceCache.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-package org.jboss.seam.el;
-
-import org.jboss.el.util.ReflectionUtil;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-
-
- at Name("org.jboss.seam.el.referenceCache")
- at Scope(ScopeType.APPLICATION)
- at Startup
-public class JBossELReferenceCache {
-    @Create
-    public void start() {
-        ReflectionUtil.startup();
-    }
-    
-    @Destroy 
-    public void stop() {
-        ReflectionUtil.shutdown();
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/OptionalParameterMethodExpression.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/OptionalParameterMethodExpression.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/OptionalParameterMethodExpression.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,80 +0,0 @@
-/**
- * 
- */
-package org.jboss.seam.el;
-
-import javax.el.ELContext;
-import javax.el.MethodExpression;
-import javax.el.MethodInfo;
-import javax.el.MethodNotFoundException;
-
-/**
- * 
- * @author Gavin King
- *
- */
-class OptionalParameterMethodExpression extends MethodExpression
-{
-    
-    private MethodExpression withParam;
-    private MethodExpression withNoParam;
-    
-   public OptionalParameterMethodExpression(MethodExpression withParam, MethodExpression withNoParam)
-   {
-      this.withParam = withParam;
-      this.withNoParam = withNoParam;
-   }
-
-   @Override
-   public MethodInfo getMethodInfo(ELContext ctx)
-   {
-      return withParam.getMethodInfo(ctx);
-   }
-
-   @Override
-   public Object invoke(ELContext ctx, Object[] args)
-   {
-      try
-      {
-         return withParam.invoke(ctx, args);
-      }
-      catch (MethodNotFoundException mnfe)
-      {
-         try
-         {
-            return withNoParam.invoke(ctx, new Object[0]);
-         }
-         catch (MethodNotFoundException mnfe2)
-         {
-            throw mnfe;
-         }
-      }
-   }
-
-   @Override
-   public String getExpressionString()
-   {
-      return withParam.getExpressionString();
-   }
-
-   @Override
-   public boolean isLiteralText()
-   {
-      return withParam.isLiteralText();
-   }
-
-   @Override
-   public boolean equals(Object object)
-   {
-      if ( !(object instanceof OptionalParameterMethodExpression) ) return false;
-      OptionalParameterMethodExpression other = (OptionalParameterMethodExpression) object;
-      return withParam.equals(other.withParam);
-   }
-
-   @Override
-   public int hashCode()
-   {
-      return withParam.hashCode();
-   }
-    
- }
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamELResolver.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamELResolver.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamELResolver.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,190 +0,0 @@
-package org.jboss.seam.el;
-
-import org.jboss.seam.util.JSF;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.el.ELContext;
-import javax.el.ELResolver;
-
-import org.jboss.seam.Namespace;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Init;
-
-/**
- * Resolves Seam components and namespaces. Also
- * allows the use of #{dataModel.size}, #{dataModel.empty},
- * #{collection.size}, #{map.size}, #{map.values}, #{map.keySet},
- * and #{map.entrySet}. Also allows #{sessionContext['name']}.
- * 
- * @author Gavin King
- *
- */
-public class SeamELResolver extends ELResolver
-{
-
-   @Override
-   public Class getCommonPropertyType(ELContext context, Object base)
-   {
-      return null;
-   }
-
-   @Override
-   public Iterator getFeatureDescriptors(ELContext context, Object base)
-   {
-      return null;
-   }
-
-   @Override
-   public Class getType(ELContext context, Object base, Object property)
-   {
-      return null;
-   }
-
-   @Override
-   public Object getValue(ELContext context, Object base, Object property) 
-   {
-        if (base == null) {
-            return resolveBase(context, property);
-            
-        } else if (base instanceof Namespace) {
-            return resolveInNamespace(context, (Namespace) base, property);
-            
-        } else if (JSF.DATA_MODEL.isInstance(base)) {
-            return resolveInDataModel(context,  base, property);
-            
-        } else if (base instanceof Collection) {
-            return resolveInCollection(context, (Collection) base, property);
-            
-        } else if (base instanceof Map) {
-            return resolveInMap(context, (Map) base, property);
-            
-        } else if (base instanceof Context) {
-            return resolveInContextObject(context, (Context) base, property);
-            
-        } else {
-            return null;
-        }
-    }
-
-   private Object resolveInContextObject(ELContext context, Context seamContext, Object property)
-   {
-        if (seamContext.isSet((String) property)) {
-            context.setPropertyResolved(true);
-            return seamContext.get((String) property);
-        } else {
-            return null;
-        }
-    }
-
-   private boolean containsKey(Map map, String key) {
-      try {
-         return map.containsKey(key);   
-      } catch (UnsupportedOperationException e) {
-         // eat it
-         return false;
-      }
-   }
-   
-   private Object resolveInMap(ELContext context, Map map, Object property) {         
-        if ("size".equals(property) && !containsKey(map,"size")) {
-            context.setPropertyResolved(true);
-            return map.size();
-            
-        } else if ("values".equals(property) && !containsKey(map,"values")) {
-            context.setPropertyResolved(true);
-            return map.values();
-        
-        } else if ("keySet".equals(property) && !containsKey(map,"keySet")) {
-            context.setPropertyResolved(true);
-            return map.keySet();
-        
-        } else if ("entrySet".equals(property) && !containsKey(map,"entrySet")) {
-            context.setPropertyResolved(true);
-            return map.entrySet();
-        
-        } else {
-            return null;
-        }
-    }
-
-   private Object resolveInCollection(ELContext context, Collection collection, Object property)
-   {
-        if ("size".equals(property)) {
-            context.setPropertyResolved(true);
-            return collection.size();
-        } else {
-            return null;
-        }
-    }
-
-   private Object resolveInDataModel(ELContext context, Object base, Object property)
-   {
-        if ("size".equals(property)) {
-            context.setPropertyResolved(true);
-            return JSF.getRowCount(base);
-        } else if ("empty".equals(property)) {
-            context.setPropertyResolved(true);
-            return JSF.getRowCount(base) == 0;
-        } else {
-            return null;
-        }
-    }
-
-   private Object resolveBase(ELContext context, Object property)
-   {
-      if (!Contexts.isApplicationContextActive()) {
-            // if no Seam contexts, bypass straight through to JSF
-            return null;
-        }
-
-        String key = (String) property;
-        Init init = Init.instance();
-
-        // look for a component in the root namespace
-        Object result = init.getRootNamespace().getComponentInstance(key);
-        if (result != null) {
-            context.setPropertyResolved(true);
-            return result;
-        } else {
-            // look for a component in the imported namespaces
-            for (Namespace ns : init.getGlobalImports()) {
-                result = ns.getComponentInstance(key);
-                if (result != null) {
-                    context.setPropertyResolved(true);
-                    return result;
-                }
-            }
-        }
-
-        // look for a namespace
-        Namespace namespace = init.getRootNamespace().getChild(key);
-        if (namespace != null) {
-            context.setPropertyResolved(true);
-        }
-        return namespace;
-    }
-
-    private Object resolveInNamespace(ELContext context, Namespace namespace, Object property) {
-        Object result = namespace.get((String) property);
-        // JBSEAM-3077 if the result is null, it means that there is no component instance bound to this qualified name
-        context.setPropertyResolved(true);
-        return result;
-    }
-
-    @Override
-    public boolean isReadOnly(ELContext context, Object base, Object property) 
-    {
-        return base != null
-                && (JSF.DATA_MODEL.isInstance(base) || (base instanceof Collection) || (base instanceof Map));
-    }
-
-    @Override
-    public void setValue(ELContext context, Object base, Object property, Object value) 
-    {
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamExpressionFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamExpressionFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamExpressionFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,101 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.seam.el;
-
-import javax.el.ELContext;
-import javax.el.ExpressionFactory;
-import javax.el.MethodExpression;
-import javax.el.ValueExpression;
-
-import org.jboss.el.lang.EvaluationContext;
-import org.jboss.seam.util.JSF;
-
-/**
- * Allows JSF action listener methods to not declare the
- * totally useless ActionEvent parameter if they don't
- * want to. 
- *
- * @author Gavin King
- */
-public class SeamExpressionFactory extends ExpressionFactory 
-{
-   public static final ExpressionFactory INSTANCE = new SeamExpressionFactory(EL.EXPRESSION_FACTORY);
-   
-    private static final Class[] NO_CLASSES = {};
-    
-    private final ExpressionFactory expressionFactory;
-    
-    SeamExpressionFactory(ExpressionFactory expressionFactory) 
-    {
-       this.expressionFactory = expressionFactory;
-    }
-    
-    /**
-     * Wrap the base ELContext, adding Seam's FunctionMapper.
-     * 
-     * Thus, any expressions with s:hasRole, s:hasPermission 
-     * must be evaluated either via Facelets/JSP (since they
-     * are declared in the tld/taglib.xml or via the 
-     * Expressions component.
-     * 
-     * @param context the JSF ELContext
-     */
-    private static EvaluationContext decorateELContext(ELContext context)
-    {
-       return new EvaluationContext( context, new SeamFunctionMapper( context.getFunctionMapper() ), context.getVariableMapper() );
-    }
-    
-    @Override
-    public Object coerceToType(Object obj, Class targetType) 
-    {
-        return expressionFactory.coerceToType(obj, targetType);
-    }
-
-    @Override
-    public MethodExpression createMethodExpression(ELContext elContext, String expression, Class returnType, Class[] paramTypes) 
-    {
-        if ( paramTypes.length==1 && JSF.FACES_EVENT.isAssignableFrom( paramTypes[0] ) )
-        {
-         return new OptionalParameterMethodExpression(
-                 expressionFactory.createMethodExpression( decorateELContext(elContext), expression, returnType, paramTypes ),
-                 expressionFactory.createMethodExpression( decorateELContext(elContext), expression, returnType, NO_CLASSES )
-              );
-        }
-        else
-        {
-           return expressionFactory.createMethodExpression( decorateELContext(elContext), expression, returnType, paramTypes );
-        }
-    }
-    
-    @Override
-    public ValueExpression createValueExpression(Object instance, Class expectedType) 
-    {
-        return expressionFactory.createValueExpression(instance, expectedType);
-    }
-
-    @Override
-    public ValueExpression createValueExpression(ELContext elContext, String expression, Class expectedType) 
-    {   
-        return expressionFactory.createValueExpression( decorateELContext(elContext), expression, expectedType );
-    }
-    
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamFunctionMapper.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamFunctionMapper.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/SeamFunctionMapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,114 +0,0 @@
-package org.jboss.seam.el;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.el.FunctionMapper;
-
-import org.jboss.el.lang.ExtendedFunctionMapper;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.SecurityFunctions;
-
-/**
- * Resolves Seam Security EL functions, s:hasRole() and s:hasPermission()
- * by decorating a delegate Unified EL FunctionMapper
- *  
- * @author Shane Bryzak
- */
-public class SeamFunctionMapper extends ExtendedFunctionMapper
-{
-   private static Map<String,List<Method>> methodCache = new HashMap<String,List<Method>>();
-   
-   private static final LogProvider log = Logging.getLogProvider(SeamFunctionMapper.class);
-
-   private FunctionMapper functionMapper;
-   
-   public SeamFunctionMapper(FunctionMapper functionMapper)
-   {
-      this.functionMapper = functionMapper;
-   }
-   
-   static 
-   {
-      cacheMethod("hasPermission", SecurityFunctions.class, "hasPermission", 
-               new Class[] {String.class, String.class, Object.class});
-      cacheMethod("hasPermission", SecurityFunctions.class, "hasPermission",
-               new Class[] {Object.class, String.class});
-      cacheMethod("hasRole", SecurityFunctions.class, "hasRole",
-               new Class[] { String.class });      
-   }
-
-   @Override 
-   public Method resolveFunction(String prefix, String localName) 
-   {
-      if ( "s".equals(prefix) )
-      {
-         List<Method> methods = methodCache.get(localName);
-         return methods != null ? methods.get(0) : null;
-      }
-      else if (functionMapper != null)
-      {
-         return functionMapper.resolveFunction(prefix, localName);
-      }
-      else
-      {
-         return null;
-      }
-   }  
-   
-   @Override 
-   public Method resolveFunction(String prefix, String localName, int paramCount) 
-   {
-      if ( "s".equals(prefix) )
-      {
-         List<Method> methods = methodCache.get(localName);
-         if (methods != null)
-         {
-            for (Method m : methods)
-            {
-               if (m.getParameterTypes().length == paramCount) return m;
-            }
-         }
-         
-         return null;
-      }
-      else if (functionMapper != null)
-      {
-         return functionMapper.resolveFunction(prefix, localName);
-      }
-      else
-      {
-         return null;
-      }
-   }    
-   
-   private static void cacheMethod(String localName, Class cls, String name, Class[] params)
-   {
-      try
-      {
-         Method m = cls.getMethod(name, params);
-
-         List<Method> methods;
-         if (methodCache.containsKey(localName))
-         {
-            methods = methodCache.get(localName);
-         }
-         else
-         {
-            methods = new ArrayList<Method>();
-            methodCache.put(localName, methods);
-         }
-         
-         methods.add(m);         
-      }
-      catch (NoSuchMethodException ex)
-      {
-         log.warn(String.format("Method %s.%s could not be cached", cls.getName(), name));
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/el/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-/**
- * Integration with JBoss EL.
- */
-package org.jboss.seam.el;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/AnnotationErrorHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/AnnotationErrorHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/AnnotationErrorHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,39 +0,0 @@
-package org.jboss.seam.exception;
-
-import org.jboss.seam.annotations.exception.HttpError;
-
-/**
- * Implements @HttpError
- * 
- * @see HttpError
- * @author Gavin King
- *
- */
-public class AnnotationErrorHandler extends ErrorHandler
-{
-   @Override
-   public boolean isHandler(Exception e)
-   {
-      return e.getClass().isAnnotationPresent(HttpError.class);
-   }
-   
-   @Override
-   protected String getMessage(Exception e)
-   {
-      return e.getClass().getAnnotation(HttpError.class).message();
-   }
-   
-   @Override
-   protected int getCode(Exception e)
-   {
-      return e.getClass().getAnnotation(HttpError.class).errorCode();
-   }
-   
-   @Override
-   @SuppressWarnings("deprecation")
-   protected boolean isEnd(Exception e)
-   {
-      return e.getClass().getAnnotation(HttpError.class).end();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/AnnotationRedirectHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/AnnotationRedirectHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/AnnotationRedirectHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,49 +0,0 @@
-package org.jboss.seam.exception;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.application.FacesMessage.Severity;
-
-import org.jboss.seam.annotations.exception.Redirect;
-import org.jboss.seam.core.Expressions;
-
-/**
- * Implements @Redirect
- * 
- * @see Redirect
- * @author Gavin King
- *
- */
-public class AnnotationRedirectHandler extends RedirectHandler
-{
-   @Override
-   public boolean isHandler(Exception e)
-   {
-      return e.getClass().isAnnotationPresent(Redirect.class);
-   }
-   
-   @Override
-   protected String getMessage(Exception e)
-   {
-      return e.getClass().getAnnotation(Redirect.class).message();
-   }
-   
-   @Override
-   protected Severity getMessageSeverity(Exception e)
-   {
-      return FacesMessage.SEVERITY_INFO;
-   }
-   
-   @Override
-   protected String getViewId(Exception e)
-   {
-      return Expressions.instance().createValueExpression(e.getClass().getAnnotation(Redirect.class).viewId(), String.class).getValue();
-   }
-   
-   @Override
-   @SuppressWarnings("deprecation")
-   protected boolean isEnd(Exception e)
-   {
-      return e.getClass().getAnnotation(Redirect.class).end();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ConfigErrorHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ConfigErrorHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ConfigErrorHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,48 +0,0 @@
-package org.jboss.seam.exception;
-
-/**
- * Implements &lt;http-error/&gt; for pages.xml
- * 
- * @author Gavin King
- *
- */
-public final class ConfigErrorHandler extends ErrorHandler
-{
-   private final String message;
-   private final boolean conversation;
-   private final Class clazz;
-   private final int code;
-
-   public ConfigErrorHandler(String message, boolean conversation, Class clazz, int code)
-   {
-      this.message = message;
-      this.conversation = conversation;
-      this.clazz = clazz;
-      this.code = code;
-   }
-
-   @Override
-   protected String getMessage(Exception e)
-   {
-      return message;
-   }
-
-   @Override
-   protected int getCode(Exception e)
-   {
-      return code;
-   }
-
-   @Override
-   public boolean isHandler(Exception e)
-   {
-      return clazz.isInstance(e);
-   }
-
-   @Override
-   protected boolean isEnd(Exception e)
-   {
-      return conversation;
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ConfigRedirectHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ConfigRedirectHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ConfigRedirectHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,78 +0,0 @@
-package org.jboss.seam.exception;
-
-import javax.faces.application.FacesMessage.Severity;
-
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-/**
- * Implements &lt;redirect/&gt; for pages.xml
- * 
- * @author Gavin King
- *
- */
-public final class ConfigRedirectHandler extends RedirectHandler
-{
-   private final ValueExpression<String> id;
-   private final Class clazz;
-   private final boolean conversation;
-   private final String message;
-   private final Severity messageSeverity;
-
-   /**
-    * Construct a ConfigRedirectHandler.
-    * 
-    */
-   public ConfigRedirectHandler(ValueExpression<String> id, Class clazz, boolean conversation, String message, Severity messageSeverity)
-   {
-      this.id = id;
-      this.clazz = clazz;
-      this.conversation = conversation;
-      this.message = message;
-      this.messageSeverity = messageSeverity;
-   }
-   
-   @Deprecated
-   public ConfigRedirectHandler(String id, Class clazz, boolean conversation, String message, Severity messageSeverity)
-   {
-      this(Expressions.instance().createValueExpression(id, String.class), clazz, conversation, message, messageSeverity);
-   }
-
-   @Override
-   protected String getMessage(Exception e)
-   {
-      return message;
-   }
-
-   @Override
-   protected String getViewId(Exception e)
-   {
-      if (id != null)
-      {
-         return id.getValue(); 
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   @Override
-   public boolean isHandler(Exception e)
-   {
-      return clazz.isInstance(e);
-   }
-
-   @Override
-   protected boolean isEnd(Exception e)
-   {
-      return conversation;
-   }
-
-   @Override
-   public Severity getMessageSeverity(Exception e)
-   {
-      return messageSeverity;
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/DebugPageHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/DebugPageHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/DebugPageHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,54 +0,0 @@
-package org.jboss.seam.exception;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.faces.RedirectException;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Implements automagic redirection to the Seam debug page.
- * 
- * @author Gavin King
- *
- */
-public class DebugPageHandler extends ExceptionHandler
-{
-
-   private static final LogProvider log = Logging.getLogProvider(DebugPageHandler.class);
-
-   @Override
-   public void handle(Exception e) throws Exception
-   {
-      log.debug("redirecting to debug page", e); //no need to be noisy, ExceptionFilter already logs it
-      org.jboss.seam.faces.Redirect redirect = org.jboss.seam.faces.Redirect.instance();
-      redirect.setViewId("/debug.xhtml");
-      FacesManager manager = FacesManager.instance();
-      manager.beforeRedirect("/debug.xhtml");
-      redirect.setParameter( manager.getConversationIdParameter(), manager.getCurrentConversationId() );
-      
-      try
-      {
-         redirect.execute();
-      }
-      catch (RedirectException re)
-      {
-         //do nothing
-         log.debug("could not redirect", re);
-      }
-      
-      Contexts.getConversationContext().flush();
-   }
-
-   @Override
-   public boolean isHandler(Exception e)
-   {
-      return true;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "DebugPageHandler";
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ErrorHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ErrorHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ErrorHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-package org.jboss.seam.exception;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Conversation;
-
-/**
- * Base implementation of HTTP error exception handlers.
- * 
- * @author Gavin King
- *
- */
-public abstract class ErrorHandler extends ExceptionHandler
-{
-
-   protected abstract int getCode(Exception e);
-   protected abstract String getMessage(Exception e);
-   protected abstract boolean isEnd(Exception e);
-
-   @Override
-   public void handle(Exception e) throws Exception
-   {
-      if ( Contexts.isConversationContextActive() && isEnd(e) ) 
-      {
-         Conversation.instance().end();
-      }
-      
-      String msg = getDisplayMessage( e, getMessage(e) );      
-      error( getCode(e), msg );
-   }
-
-   @Override
-   public String toString()
-   {
-      return "ErrorHandler";
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ExceptionHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ExceptionHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/ExceptionHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,42 +0,0 @@
-package org.jboss.seam.exception;
-
-import org.jboss.seam.faces.Navigator;
-
-/**
- * An element of the chain that knows how to handle a 
- * specific exception type.
- * 
- * @author Gavin King
- *
- */
-public abstract class ExceptionHandler extends Navigator
-{
-   public enum LogLevel { fatal, error, warn, info, debug, trace }
-   
-   private boolean logEnabled;
-   private LogLevel logLevel;
-   
-   public abstract void handle(Exception e) throws Exception;
-   public abstract boolean isHandler(Exception e);
-   
-   public boolean isLogEnabled()
-   {
-      return logEnabled;
-   }
-   
-   public void setLogEnabled(boolean logEnabled)
-   {
-      this.logEnabled = logEnabled;
-   }
-   
-   public LogLevel getLogLevel()
-   {
-      return logLevel;
-   }
-   
-   public void setLogLevel(LogLevel logLevel)
-   {
-      this.logLevel = logLevel;
-   }   
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/Exceptions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/Exceptions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/Exceptions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,266 +0,0 @@
-package org.jboss.seam.exception;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-import static org.jboss.seam.exception.ExceptionHandler.LogLevel;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.application.FacesMessage.Severity;
-
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.ResourceLoader;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.util.Reflections;
-import org.jboss.seam.util.Resources;
-import org.jboss.seam.util.Strings;
-import org.jboss.seam.util.XML;
-
-/**
- *  Manages the exception handler chain
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at Name("org.jboss.seam.exception.exceptions")
-public class Exceptions
-{
-   private static final LogProvider log = Logging.getLogProvider(Exceptions.class);
-   
-   private List<ExceptionHandler> exceptionHandlers = new ArrayList<ExceptionHandler>();
-   
-   public void handle(Exception e) throws Exception
-   {
-      if ( Contexts.isConversationContextActive() )
-      {
-         Contexts.getConversationContext().set("org.jboss.seam.caughtException", e);
-      }
-      
-      //build a list of the nested exceptions
-      List<Exception> causes = new ArrayList<Exception>();
-      for (Exception cause=e; cause!=null; cause=org.jboss.seam.util.Exceptions.getCause(cause))
-      {
-         causes.add(cause);
-      }
-      //try to match each handler in turn
-      for (ExceptionHandler eh: exceptionHandlers)
-      {
-         //Try to handle most-nested exception before least-nested
-         for (int i=causes.size()-1; i>=0; i--)
-         {
-            Exception cause = causes.get(i);
-            if ( eh.isHandler(cause) )
-            {
-               if ( Contexts.isConversationContextActive() )
-               {
-                  Contexts.getConversationContext().set("org.jboss.seam.handledException", cause);
-               }
-               eh.handle(cause);
-               
-               if (eh.isLogEnabled() && eh.getLogLevel() != null)
-               {
-                  switch (eh.getLogLevel())
-                  {
-                     case fatal: 
-                        log.fatal("handled and logged exception", e);
-                        break;
-                     case error:
-                        log.error("handled and logged exception", e);
-                        break;
-                     case warn:
-                        log.warn("handled and logged exception", e);
-                        break;
-                     case info:
-                        log.info("handled and logged exception", e);
-                        break;
-                     case debug: 
-                        log.debug("handled and logged exception", e);
-                        break;
-                     case trace:
-                        log.trace("handled and logged exception", e);
-                  }
-               }
-               
-               Events.instance().raiseEvent("org.jboss.seam.exceptionHandled." + cause.getClass().getName(), cause);
-               Events.instance().raiseEvent("org.jboss.seam.exceptionHandled", cause);
-               return;
-            }
-         }
-      }
-      
-      //finally, rethrow it, since no handler was found
-      Events.instance().raiseEvent("org.jboss.seam.exceptionNotHandled", e);
-      throw e;
-   }
-   
-   @Create
-   public void initialize() throws Exception 
-   {
-      List<ExceptionHandler> deferredHandlers = new ArrayList<ExceptionHandler>();
-      
-      deferredHandlers.add(parse("/WEB-INF/exceptions.xml")); // deprecated
-      
-      for (String pageFile: Pages.instance().getResources()) 
-      {
-          deferredHandlers.add(parse(pageFile));
-      }
-                    
-      addHandler(new AnnotationRedirectHandler());
-      addHandler(new AnnotationErrorHandler());
-      
-      if (Init.instance().isDebugPageAvailable()) 
-      {
-         addHandler(new DebugPageHandler());
-      }
-            
-      for (ExceptionHandler handler: deferredHandlers) 
-      {
-          addHandler(handler);
-      }
-   }
-
-   private void addHandler(ExceptionHandler handler)
-   {
-      if (handler!=null) exceptionHandlers.add(handler);
-   }
-   
-   private ExceptionHandler parse(String fileName) throws DocumentException, ClassNotFoundException
-   {
-      ExceptionHandler anyhandler = null;
-      InputStream stream = ResourceLoader.instance().getResourceAsStream(fileName);
-      if (stream!=null)
-      {
-          log.debug("reading exception mappings from " + fileName);
-
-          List<Element> elements = null;
-          try {
-              elements = XML.getRootElement(stream).elements("exception");
-          } finally {
-              Resources.closeStream(stream);
-          }
-      
-         for (final Element exception: elements)
-         {
-            String className = exception.attributeValue("class");
-            boolean logEnabled = exception.attributeValue("log") != null ? 
-                  Boolean.valueOf(exception.attributeValue("log")) : true;
-            
-            LogLevel logLevel = LogLevel.error;
-            try {
-               String levelValue = exception.attributeValue("log-level");
-               if (levelValue == null) {
-                   levelValue = exception.attributeValue("logLevel");
-               }
-               
-               if (levelValue != null) {
-                   logLevel = LogLevel.valueOf(levelValue.toLowerCase());
-               }
-            } catch (IllegalArgumentException ex) { 
-               StringBuilder sb = new StringBuilder();
-               sb.append("Exception handler");
-               if (className != null) sb.append(" for class " + className);
-               sb.append(" is configured with an invalid log-level.  Acceptable " +
-                         "values are: fatal,error,warn,info,debug,trace. " +
-                         "A default level of 'error' has been configured instead.");               
-               log.warn(sb.toString());
-            }
-            
-            if (className==null)
-            {
-               anyhandler = createHandler(exception, Exception.class);
-               anyhandler.setLogEnabled(logEnabled);
-               anyhandler.setLogLevel(logLevel);
-            }
-            else
-            {
-                ExceptionHandler handler = null;
-
-                try { 
-                    handler = createHandler(exception, 
-                          Reflections.classForName(className));
-                    
-                    if (handler != null) {
-                        handler.setLogEnabled(logEnabled);
-                        handler.setLogLevel(logLevel);   
-                    }
-                } catch (ClassNotFoundException e) {
-                    log.error("Can't find exception class for exception handler", e);
-                }
-               if (handler!=null) exceptionHandlers.add(handler);
-            }
-            
-            
-         }
-      }
-      return anyhandler;
-   }
-
-   private ExceptionHandler createHandler(Element exception, final Class clazz)
-   {
-      final boolean endConversation = exception.elementIterator("end-conversation").hasNext();
-      
-      Element redirect = exception.element("redirect");
-      if (redirect!=null)
-      {
-         String viewId = redirect.attributeValue("view-id");
-         Element messageElement = redirect.element("message");
-         final String message = messageElement==null ? null : messageElement.getTextTrim();
-         String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
-         Severity severity = severityName==null ? 
-                  FacesMessage.SEVERITY_INFO : 
-                  Pages.getFacesMessageValuesMap().get( severityName.toUpperCase() );
-         return new ConfigRedirectHandler(viewId == null ? null : Expressions.instance().createValueExpression(
-               viewId, String.class), clazz, endConversation, message, severity);
-      }
-      
-      Element error = exception.element("http-error");
-      if (error!=null)
-      {
-         String errorCode = error.attributeValue("error-code");
-         final int code = Strings.isEmpty(errorCode) ? 
-               500 : Integer.parseInt(errorCode);
-         Element messageElement = error.element("message");
-         final String message = messageElement==null ? null : messageElement.getTextTrim();
-         return new ConfigErrorHandler(message, endConversation, clazz, code);
-      }
-      
-      return null;
-   }
-   
-   /**
-    * @return the exception handler list, which supports addition and removal
-    *         of handlers
-    */
-   public List<ExceptionHandler> getHandlers()
-   {
-      return exceptionHandlers;
-   }
-
-   public static Exceptions instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application context");
-      }
-      return (Exceptions) Component.getInstance(Exceptions.class, ScopeType.APPLICATION);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/RedirectHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/RedirectHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/RedirectHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,65 +0,0 @@
-package org.jboss.seam.exception;
-
-import javax.faces.application.FacesMessage.Severity;
-import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.faces.RedirectException;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-
-/**
- * Base implementation of redirection exception handlers.
- * 
- * @author Gavin King
- *
- */
-public abstract class RedirectHandler extends ExceptionHandler
-{
-
-   private static final LogProvider log = Logging.getLogProvider(RedirectHandler.class);
-
-   protected abstract String getViewId(Exception e);
-   protected abstract String getMessage(Exception e);
-   protected abstract boolean isEnd(Exception e);
-   protected abstract Severity getMessageSeverity(Exception e);
-
-   @Override
-   public void handle(Exception e) throws Exception
-   {
-      String viewId = getViewId(e);
-      if (viewId==null)
-      {
-         //we want to perform a redirect straight back to the current page
-         //there is no ViewRoot available, so lets do it the hard way
-         String servletPath = ( (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest() ).getServletPath();
-         viewId = servletPath.substring(0, servletPath.lastIndexOf('.')) + Pages.getSuffix();
-      }
-      
-      addFacesMessage( "#0", getMessageSeverity(e), null, getDisplayMessage(e, getMessage(e)));
-      
-      if ( Contexts.isConversationContextActive() && isEnd(e) ) 
-      {
-         Conversation.instance().end();
-      }
-      
-      try
-      {
-         redirect(viewId, null);
-      }
-      catch (RedirectException re)
-      {
-         //do nothing
-         log.debug("could not redirect", re);
-      }
-   }
-
-   @Override
-   public String toString()
-   {
-      return "RedirectHandler";
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/exception/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * Implementation of Seam exception handling for JSF.
- * 
- * @see org.jboss.seam.annotations.exception
- */
-package org.jboss.seam.exception;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/DataModels.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/DataModels.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/DataModels.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,81 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.ScopeType.STATELESS;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.model.DataModel;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.framework.Query;
-import org.jboss.seam.jsf.ArrayDataModel;
-import org.jboss.seam.jsf.ListDataModel;
-import org.jboss.seam.jsf.MapDataModel;
-import org.jboss.seam.jsf.SetDataModel;
-
-/**
- * Wraps a collection as a JSF {@link DataModel}. May be overridden
- * and extended if you don't like the built in collections
- * which are supported: list, map, set, array.
- *
- * @author pmuir
- */
- at Name("org.jboss.seam.faces.dataModels")
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at Scope(STATELESS)
- at BypassInterceptors
-public class DataModels
-{
-   
-   /**
-    * Wrap the value in a DataModel
-    * 
-    * This implementation supports {@link List}, {@link Map}, {@link Set} and
-    * arrays
-    */
-   public DataModel getDataModel(Object value)
-   {
-      if (value instanceof List)
-      {
-         return new ListDataModel( (List) value );
-      }
-      else if (value instanceof Object[])
-      {
-         return new ArrayDataModel( (Object[]) value ); 
-      }
-      else if (value instanceof Map)
-      {
-         return new MapDataModel( (Map) value );
-      }
-      else if (value instanceof Set)
-      {
-         return new SetDataModel( (Set) value );
-      }
-      else
-      {
-         throw new IllegalArgumentException("unknown collection type: " + value.getClass());
-      }
-   }
-   
-   /**
-    * Wrap the the Seam Framework {@link Query} in a JSF DataModel
-    */
-   public DataModel getDataModel(Query query)
-   {
-      return getDataModel( query.getResultList() );
-   }
-   
-   public static DataModels instance()
-   {
-      return (DataModels) Component.getInstance(DataModels.class, ScopeType.STATELESS);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/DateConverter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/DateConverter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/DateConverter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,127 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.ConverterException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.faces.Converter;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-
-/**
- * Provides a default JSF converter for properties of type java.util.Date.
- * 
- * <p>This converter is provided to save a developer from having to specify
- * a DateTimeConverter on an input field or page parameter. By default, it
- * assumes the type to be a date (as opposed to a time or date plus time) and
- * uses the short input style adjusted to the Locale of the user. For Locale.US,
- * the input pattern is mm/DD/yy. However, to comply with Y2K, the year is changed
- * from two digits to four (e.g., mm/DD/yyyy).</p>
- * <p>It's possible to override the input pattern globally using component configuration.
- * Here is an example of changing the style to both and setting the date and
- * time style to medium.</p>
- * <pre>
- * org.jboss.seam.faces.dateConverter.type=both
- * org.jboss.seam.faces.dateConverter.dateStyle=medium
- * org.jboss.seam.faces.dateConverter.timeStyle=medium
- * </pre>
- * <p>Alternatively, a fixed pattern can be specified.</p>
- * <pre>
- * org.jboss.seam.faces.dateConverter.pattern=yyyy-mm-DD
- * </pre>
- * 
- * @author Dan Allen
- */
- at Converter(forClass = Date.class)
- at Name("org.jboss.seam.faces.dateConverter")
- at Install(precedence = BUILT_IN, classDependencies = "javax.faces.context.FacesContext")
- at BypassInterceptors
-public class DateConverter extends javax.faces.convert.DateTimeConverter {
-
-	private Log log = Logging.getLog(DateConverter.class);
-
-	private static final String TYPE_DATE = "date";
-	private static final String STYLE_SHORT = "short";
-	private static final String TWO_DIGIT_YEAR_PATTERN = "yy";
-	private static final String FOUR_DIGIT_YEAR_PATTERN = "yyyy";
-	
-	// constructor is used to initialize converter to allow these values to be overridden using component properties
-	public DateConverter() {
-		super();
-		setType(TYPE_DATE);
-		setDateStyle(STYLE_SHORT);
-		setTimeStyle(STYLE_SHORT); // default in case developer overrides type to be time or both
-	}
-	
-	@Create
-	public void create() {
-		// TODO make this work if using "both" for type; requires more analysis of time style
-		if (TYPE_DATE.equals(getType()) && STYLE_SHORT.equals(getDateStyle()) && getPattern() == null) {
-			// attempt to make the pattern Y2K compliant, which it isn't by default
-			DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, getLocale());
-			if (dateFormat instanceof SimpleDateFormat) {
-				setPattern(((SimpleDateFormat) dateFormat).toPattern().replace(TWO_DIGIT_YEAR_PATTERN, FOUR_DIGIT_YEAR_PATTERN));
-			}
-		}
-		// required since the superclass may access the fields directly
-		setTimeZone(getTimeZone());
-		setLocale(getLocale());
-	}
-
-	@Override
-	public TimeZone getTimeZone() {
-		if (Contexts.isApplicationContextActive()) {
-			return org.jboss.seam.international.TimeZone.instance();
-		} else {
-			// we don't want to use JSF's braindead default (maybe in JSF 2)
-			return TimeZone.getDefault();
-		}
-	}
-
-	@Override
-	public Locale getLocale() {
-		if (Contexts.isApplicationContextActive()) {
-			return org.jboss.seam.international.Locale.instance();
-		} else {
-			return super.getLocale();
-		}
-	}
-
-	@Override
-	public Object getAsObject(FacesContext context, UIComponent component,
-			String value) throws ConverterException {
-		if (log.isDebugEnabled()) {
-			log.debug("Converting string '#0' to date for clientId '#1' using Seam's built-in JSF date converter", value, component.getClientId(context));
-		}
-		return super.getAsObject(context, component, value);
-	}
-
-	@Override
-	public String getAsString(FacesContext context, UIComponent component,
-			Object value) throws ConverterException {
-		if (log.isDebugEnabled()) {
-			log.debug("Converting date '#0' to string for clientId '#1' using Seam's built-in JSF date converter", value, component.getClientId(context));
-		}
-		return super.getAsString(context, component, value);
-	}
-	
-	public static javax.faces.convert.Converter getInstance(){
-
-	   return (javax.faces.convert.Converter) Component.getInstance("org.jboss.seam.faces.dateConverter");
-	   
-	}
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,29 +0,0 @@
-//$Id: FacesContext.java 5350 2007-06-20 17:53:19Z gavin $
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Support for injecting the JSF FacesContext object
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.faces.facesContext")
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class FacesContext
-{
-   @Unwrap
-   public javax.faces.context.FacesContext getContext()
-   {
-      return javax.faces.context.FacesContext.getCurrentInstance();
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesExpressions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesExpressions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesExpressions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,45 +0,0 @@
-//$Id: FacesExpressions.java 9684 2008-12-01 21:41:20Z dan.j.allen $
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import javax.el.ELContext;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.core.Expressions;
-
-/**
- * Factory for method and value bindings in a JSF environment.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Install(precedence=FRAMEWORK, classDependencies="javax.faces.context.FacesContext")
- at Name("org.jboss.seam.core.expressions")
-public class FacesExpressions extends Expressions
-{
-   
-   /**
-    * Get an appropriate ELContext. If there is an active JSF request,
-    * use JSF's ELContext. Otherwise, use one that we created.
-    */
-   @Override
-   public ELContext getELContext()
-   {
-      return isFacesContextActive() ? FacesContext.getCurrentInstance().getELContext() : super.getELContext();
-   }
-   
-   @Override
-   protected boolean isFacesContextActive()
-   { 
-      return FacesContext.getCurrentInstance() != null && FacesLifecycle.getPhaseId() != null;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesManager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesManager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesManager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,316 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseId;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.ConversationIdParameter;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.pageflow.Pageflow;
-
-/**
- * An extended conversation manager for the JSF environment.
- *
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
- at Scope(ScopeType.EVENT)
- at Name("org.jboss.seam.core.manager")
- at Install(precedence=FRAMEWORK, classDependencies="javax.faces.context.FacesContext")
- at BypassInterceptors
-public class FacesManager extends Manager
-{
-   private static final LogProvider log = Logging.getLogProvider(FacesManager.class);
-   
-   
-
-   private boolean controllingRedirect; 
-   
-   /**
-    * Temporarily promote a temporary conversation to
-    * a long running conversation for the duration of
-    * a browser redirect. After the redirect, the 
-    * conversation will be demoted back to a temporary
-    * conversation. Handle any changes to the conversation
-    * id, due to propagation via natural id.
-    */
-   public void beforeRedirect(String viewId)
-   {
-      beforeRedirect();
-      
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      String currentViewId = Pages.getViewId(facesContext);
-      if ( viewId!=null && currentViewId!=null )
-      {
-         ConversationIdParameter currentPage = Pages.instance().getPage(currentViewId).getConversationIdParameter();
-         ConversationIdParameter targetPage = Pages.instance().getPage(viewId).getConversationIdParameter();
-         if ( isDifferentConversationId(currentPage, targetPage) )
-         {
-            updateCurrentConversationId( targetPage.getConversationId() );
-         }      
-      }
-   }
-
-   public void interpolateAndRedirect(String url)
-   {
-      Map<String, Object> parameters = new HashMap<String, Object>();
-      int loc = url.indexOf('?');
-      if (loc>0)
-      {
-         StringTokenizer tokens = new StringTokenizer( url.substring(loc), "?=&" );
-         while ( tokens.hasMoreTokens() )
-         {
-            String name = tokens.nextToken();
-            String value = Interpolator.instance().interpolate( tokens.nextToken() );
-            parameters.put(name, value);
-         }
-         url = url.substring(0, loc);
-      }
-      redirect(url, parameters, true, true);
-   }
-   
-   @Override
-   protected void storeConversationToViewRootIfNecessary()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if ( facesContext!=null && FacesLifecycle.getPhaseId()==PhaseId.RENDER_RESPONSE )
-      {
-         FacesPage.instance().storeConversation();
-      }
-   }
-
-   @Override
-   protected String generateInitialConversationId()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      String viewId = Pages.getViewId(facesContext);
-      if ( viewId!=null )
-      {
-         return Pages.instance().getPage(viewId)
-                     .getConversationIdParameter()
-                     .getInitialConversationId( facesContext.getExternalContext().getRequestParameterMap() );
-      }
-      else
-      {
-         return super.generateInitialConversationId();
-      }
-   }
-
-   public void redirectToExternalURL(String url) {
-       try {
-           FacesContext.getCurrentInstance().getExternalContext().redirect(url);
-       } catch (IOException e) {
-          throw new RedirectException(e);
-       }
-   }
-   
-   /**
-    * Redirect to the given view id, encoding the conversation id
-    * into the request URL.
-    * 
-    * @param viewId the JSF view id
-    */
-   @Override
-   public void redirect(String viewId)
-   {
-      redirect(viewId, null, true, true);
-   }   
-   
-   public void redirect(String viewId, Map<String, Object> parameters, 
-         boolean includeConversationId)
-   {
-      redirect(viewId, parameters, includeConversationId, true);
-   }
-   
-   /**
-    * Redirect to the given view id, after encoding parameters and conversation  
-    * id into the request URL.
-    * 
-    * @param viewId the JSF view id
-    * @param parameters request parameters to be encoded (possibly null)
-    * @param includeConversationId determines if the conversation id is to be encoded
-    */
-   public void redirect(String viewId, Map<String, Object> parameters, 
-            boolean includeConversationId, boolean includePageParams)
-   {
-      if (viewId == null)
-      {
-         throw new RedirectException("cannot redirect to a null viewId");
-      }
-      FacesContext context = FacesContext.getCurrentInstance();
-      String url = context.getApplication().getViewHandler().getActionURL(context, viewId);
-      if (parameters!=null) 
-      {
-         url = encodeParameters(url, parameters);
-      }
-      
-      if (includePageParams)
-      {
-         url = Pages.instance().encodePageParameters(FacesContext.getCurrentInstance(), 
-                  url, viewId, parameters==null ? Collections.EMPTY_SET : parameters.keySet());
-      }
-      
-      if (includeConversationId)
-      {
-         beforeRedirect(viewId);
-         url = encodeConversationId(url, viewId);
-      }
-      redirect(viewId, context, url);
-   }
-   
-   /**
-    * Redirect to the given view id, after encoding the given conversation  
-    * id into the request URL.
-    * 
-    * @param viewId the JSF view id
-    * @param conversationId an id of a long-running conversation
-    */
-   @Override
-   public void redirect(String viewId, String conversationId)
-   {
-      if (viewId == null)
-      {
-         throw new RedirectException("cannot redirect to a null viewId");
-      }
-      FacesContext context = FacesContext.getCurrentInstance();
-      String url = context.getApplication().getViewHandler().getActionURL(context, viewId);
-      url = encodeConversationId(url, viewId, conversationId);
-      redirect(viewId, context, url);
-   }
-   
-   private void redirect(String viewId, FacesContext context, String url)
-   {
-      url = Pages.instance().encodeScheme(viewId, context, url);
-      if ( log.isDebugEnabled() )
-      {
-         log.debug("redirecting to: " + url);
-      }
-      ExternalContext externalContext = context.getExternalContext();
-      controllingRedirect = true;
-      try
-      {  
-         Contexts.getEventContext().set(REDIRECT_FROM_MANAGER, "");
-         externalContext.redirect( externalContext.encodeActionURL(url) );
-      }
-      catch (IOException ioe)
-      {
-         throw new RedirectException(ioe);
-      }
-      finally
-      {
-         Contexts.getEventContext().remove(REDIRECT_FROM_MANAGER);
-         controllingRedirect = false;
-      }
-      context.responseComplete();
-   }
-   
-   /**
-    * Called by the Seam Redirect Filter when a redirect is called.
-    * Appends the conversationId parameter if necessary.
-    * 
-    * @param url the requested URL
-    * @return the resulting URL with the conversationId appended
-    */
-   public String appendConversationIdFromRedirectFilter(String url, String viewId)
-   {
-      boolean appendConversationId = !controllingRedirect;
-      if (appendConversationId)
-      {
-         beforeRedirect(viewId);         
-         url = encodeConversationId(url, viewId);
-      }
-      return url;
-   }
-
-   /**
-    * If a page description is defined, remember the description and
-    * view id for the current page, to support conversation switching.
-    * Called just before the render phase.
-    */
-   public void prepareBackswitch(FacesContext facesContext) 
-   {
-      
-      Conversation conversation = Conversation.instance();
-
-      //stuff from jPDL takes precedence
-      org.jboss.seam.pageflow.Page page = 
-            Manager.instance().isLongRunningConversation() &&
-            Init.instance().isJbpmInstalled() && 
-            Pageflow.instance().isInProcess() && Pageflow.instance().isStarted() ?
-                  Pageflow.instance().getPage() : null;
-      
-      if (page==null)
-      {
-         //handle stuff defined in pages.xml
-         Pages pages = Pages.instance();
-         if (pages!=null) //for tests
-         {
-            String viewId = Pages.getViewId(facesContext);
-            org.jboss.seam.navigation.Page pageEntry = pages.getPage(viewId);
-            if ( pageEntry.isSwitchEnabled() )
-            {
-               conversation.setViewId(viewId);
-            }
-            if ( pageEntry.hasDescription() )
-            {
-               conversation.setDescription( pageEntry.renderDescription() );
-            }
-            else if(pages.hasDescription(viewId))
-            {
-               conversation.setDescription( pages.renderDescription(viewId) );  
-            }
-            conversation.setTimeout( pages.getTimeout(viewId) );
-            conversation.setConcurrentRequestTimeout( pages.getConcurrentRequestTimeout(viewId) );
-         }
-      }
-      else
-      {
-         //use stuff from the pageflow definition
-         if ( page.isSwitchEnabled() )
-         {
-            conversation.setViewId( Pageflow.instance().getPageViewId() );
-         }
-         if ( page.hasDescription() )
-         {
-            conversation.setDescription( page.getDescription() );
-         }
-         conversation.setTimeout( page.getTimeout() );
-      }
-      
-      flushConversationMetadata();
-
-   }
-
-   public static FacesManager instance()
-   {
-      return (FacesManager) Manager.instance();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesMessages.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesMessages.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesMessages.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,357 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.international.StatusMessage;
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.util.Strings;
-
-/**
- * A Seam component that propagates FacesMessages across redirects
- * and interpolates EL expressions in the message string.
- * 
- * @author Gavin King
- * @author Pete Muir
- */
- at Scope(ScopeType.CONVERSATION)
- at Name(StatusMessages.COMPONENT_NAME)
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at BypassInterceptors
-public class FacesMessages extends StatusMessages
-{
-   
-   /**
-    * Called by Seam to transfer messages from FacesMessages to JSF
-    */
-   public void beforeRenderResponse() 
-   {
-      for (StatusMessage statusMessage: getMessages())
-      {
-         FacesContext.getCurrentInstance().addMessage( null, toFacesMessage(statusMessage) );
-      }
-      for ( Map.Entry<String, List<StatusMessage>> entry: getKeyedMessages().entrySet() )
-      {
-         for ( StatusMessage statusMessage: entry.getValue() )
-         {
-            String clientId = getClientId(entry.getKey());
-            FacesContext.getCurrentInstance().addMessage( clientId, toFacesMessage(statusMessage) );
-         }
-      }
-      clear();
-   }
-   
-   /**
-    * Called by Seam to transfer any messages added in the phase just processed
-    * to the FacesMessages component.
-    * 
-    * A task runner is used to allow the messages access to outjected values.
-    */
-   public static void afterPhase()
-   {
-      runTasks();
-   }
-   
-   /**
-    * Convert a StatusMessage to a FacesMessage
-    */
-   private static FacesMessage toFacesMessage(StatusMessage statusMessage)
-   {
-      if (!Strings.isEmpty(statusMessage.getSummary()))
-      {
-         return new FacesMessage(toSeverity(statusMessage.getSeverity()), statusMessage.getSummary(), statusMessage.getDetail() );
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   /**
-    * Convert a StatusMessage.Severity to a FacesMessage.Severity
-    */
-   private static javax.faces.application.FacesMessage.Severity toSeverity(org.jboss.seam.international.StatusMessage.Severity severity)
-   {
-      switch (severity)
-      {
-      case ERROR:
-         return FacesMessage.SEVERITY_ERROR;
-      case FATAL:
-         return FacesMessage.SEVERITY_FATAL;
-      case INFO:
-         return FacesMessage.SEVERITY_INFO;
-      case WARN:
-         return FacesMessage.SEVERITY_WARN;
-      default:
-         return null;
-      }
-   }
-   
-   /**
-    * Convert a FacesMessage.Severity to a StatusMessage.Severity
-    */
-   private static org.jboss.seam.international.StatusMessage.Severity toSeverity(javax.faces.application.FacesMessage.Severity severity)
-   {
-      if (FacesMessage.SEVERITY_ERROR.equals(severity))
-      {
-         return org.jboss.seam.international.StatusMessage.Severity.ERROR;
-      }
-      else if (FacesMessage.SEVERITY_FATAL.equals(severity))
-      {
-         return org.jboss.seam.international.StatusMessage.Severity.FATAL;
-      }
-      else if (FacesMessage.SEVERITY_INFO.equals(severity))
-      {
-         return org.jboss.seam.international.StatusMessage.Severity.INFO;
-      }
-      else if (FacesMessage.SEVERITY_WARN.equals(severity))
-      {
-         return org.jboss.seam.international.StatusMessage.Severity.WARN;
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   /**
-    * Calculate the JSF client ID from the provided widget ID
-    */
-   private String getClientId(String id)
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      return getClientId( facesContext.getViewRoot(), id, facesContext);
-   }
-
-   private static String getClientId(UIComponent component, String id, FacesContext facesContext)
-   {
-      String componentId = component.getId();
-      if (componentId!=null && componentId.equals(id))
-      {
-         return component.getClientId(facesContext);
-      }
-      else
-      {
-         Iterator iter = component.getFacetsAndChildren();
-         while ( iter.hasNext() )
-         {
-            UIComponent child = (UIComponent) iter.next();
-            String clientId = getClientId(child, id, facesContext);
-            if (clientId!=null) return clientId;
-         }
-         return null;
-      }
-   }
-   
-   /**
-    * Get all faces messages that have already been added
-    * to the context.
-    * 
-    */
-   public List<FacesMessage> getCurrentMessages()
-   {
-      List<FacesMessage> result = new ArrayList<FacesMessage>();
-      Iterator<FacesMessage> iter = FacesContext.getCurrentInstance().getMessages();
-      while ( iter.hasNext() )
-      {
-         result.add( iter.next() );
-      }
-      return result;
-   }
-   
-   /**
-    * Get all faces global messages that have already been added
-    * to the context.
-    * 
-    */
-   public List<FacesMessage> getCurrentGlobalMessages()
-   {
-      List<FacesMessage> result = new ArrayList<FacesMessage>();
-      Iterator<FacesMessage> iter = FacesContext.getCurrentInstance().getMessages(null);
-      while ( iter.hasNext() )
-      {
-         result.add( iter.next() );
-      }
-      return result;
-   }
-   
-   /**
-    * Get all faces messages that have already been added
-    * to the control.
-    * 
-    */
-   public List<FacesMessage> getCurrentMessagesForControl(String id)
-   {
-      String clientId = getClientId(id);
-      List<FacesMessage> result = new ArrayList<FacesMessage>();
-      Iterator<FacesMessage> iter = FacesContext.getCurrentInstance().getMessages(clientId);
-      while ( iter.hasNext() )
-      {
-         result.add( iter.next() );
-      }
-      return result;
-   }
-   
-   /**
-    * Utility method to create a FacesMessage from a Severity, messageTemplate 
-    * and params.
-    * 
-    * This method interpolates the parameters provided
-    */
-   public static FacesMessage createFacesMessage(javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)
-   {
-      return createFacesMessage(severity, null, messageTemplate, params);
-   }
-   
-   /**
-    * Utility method to create a FacesMessage from a Severity, key, 
-    * defaultMessageTemplate and params.
-    * 
-    * This method interpolates the parameters provided
-    */
-   public static FacesMessage createFacesMessage(javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)
-   {
-      StatusMessage message = new StatusMessage(toSeverity(severity), key, null, defaultMessageTemplate, null);
-      message.interpolate(params);
-      return toFacesMessage(message);
-   }
-   
-   /**
-    * Add a FacesMessage that will be used
-    * the next time a page is rendered.
-    * 
-    * Deprecated, use a method in {@link StatusMessages} instead
-    */
-   @Deprecated
-   public void add(FacesMessage facesMessage) 
-   {
-      if (facesMessage!=null)
-      {
-         add(toSeverity(facesMessage.getSeverity()), null, null, facesMessage.getSummary(), facesMessage.getDetail());
-      }
-   }
-   
-   /**
-    * Create a new status message, with the messageTemplate is as the message.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    * Deprecated, use {@link #add(org.jboss.seam.international.StatusMessage.Severity, String, Object...)} 
-    * instead
-    */
-   @Deprecated
-   public void add(javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)
-   {
-      add(toSeverity(severity), messageTemplate, params);
-   }
-   
-   
-   /**
-    * Create a new status message, with the messageTemplate is as the message.
-    *
-    * A severity of INFO will be used, and you can specify paramters to be
-    * interpolated
-    * 
-    * Deprecated, use {@link #addToControl(String, org.jboss.seam.international.StatusMessage.Severity, String, Object...)}
-    * instead
-    */
-   @Deprecated
-   public void addToControl(String id, javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)
-   {
-      addToControl(id, toSeverity(severity), messageTemplate, params);
-   }
-   
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    * Deprecated, use {@link #addFromResourceBundle(org.jboss.seam.international.StatusMessage.Severity, String, Object...)}
-    * instead
-    */
-   @Deprecated
-   public void addFromResourceBundle(javax.faces.application.FacesMessage.Severity severity, String key, Object... params)
-   {
-      addFromResourceBundle(toSeverity(severity), key, params);
-   }
-   
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    * Deprecated, use {@link #addFromResourceBundleOrDefault(javax.faces.application.FacesMessage.Severity, String, String, Object...)}
-    * instead
-    */
-   @Deprecated
-   public void addFromResourceBundleOrDefault(javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)
-   {
-      addFromResourceBundleOrDefault(toSeverity(severity), key, defaultMessageTemplate, params);
-   }
-   
-   /**
-    * Create a new status message, looking up the message in the resource bundle
-    * using the provided key.
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    * Deprecated, use {@link #addToControlFromResourceBundle(String, org.jboss.seam.international.StatusMessage.Severity, String, Object...)}
-    * instead
-    */
-   @Deprecated
-   public void addToControlFromResourceBundle(String id, javax.faces.application.FacesMessage.Severity severity, String key, Object... params)
-   {
-      addToControlFromResourceBundle(id, toSeverity(severity), key, params);
-   }
-   
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used.
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    * Deprecated, use {@link #addToControlFromResourceBundleOrDefault(String, org.jboss.seam.international.StatusMessage.Severity, String, String, Object...)}
-    * instead
-    */
-   @Deprecated
-   public void addToControlFromResourceBundleOrDefault(String id, javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)
-   {
-      addToControlFromResourceBundleOrDefault(id, toSeverity(severity), key, defaultMessageTemplate, params);
-   }
-   
-   public static FacesMessages instance()
-   {
-      Component component = Component.forName(StatusMessages.COMPONENT_NAME);
-      if(component != null && !component.getScope().isContextActive())
-      {
-         throw new IllegalStateException("No active "+component.getScope().name()+" context");
-      }
-      //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
-      return (FacesMessages) Component.getInstance(StatusMessages.COMPONENT_NAME);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesPage.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesPage.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/FacesPage.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,173 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.pageflow.Pageflow;
-import org.jboss.seam.web.Session;
-
-/**
- * Book-keeping component that persists information
- * about the conversation associated with the current
- * page.
- * 
- * @author Gavin King
- *
- */
- at Name("org.jboss.seam.faces.facesPage")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at Scope(ScopeType.PAGE)
-public class FacesPage implements Serializable
-{
-   private static final long serialVersionUID = 4807114041808347239L;
-   private String pageflowName;
-   private Integer pageflowCounter;
-   private String pageflowNodeName;
-   
-   private String conversationId;
-   private boolean conversationIsLongRunning;
-   
-   //private Map<String, Object> pageParameters;
-   
-   public String getConversationId()
-   {
-      return conversationId;
-   }
-   
-   public void discardTemporaryConversation()
-   {
-      conversationId = null;
-      conversationIsLongRunning = false;
-   }
-   
-   public void discardNestedConversation(String outerConversationId)
-   {
-      conversationId = outerConversationId;
-      conversationIsLongRunning = true;
-   }
-   
-   public void storeConversation(String conversationId)
-   {
-      this.conversationId = conversationId;
-      conversationIsLongRunning = true;
-   }
-   
-   public void storePageflow()
-   {
-      if ( Init.instance().isJbpmInstalled() )
-      {
-         Pageflow pageflow = Pageflow.instance();
-         if ( pageflow.isInProcess() /*&& !pageflow.getProcessInstance().hasEnded()*/ && Manager.instance().isLongRunningConversation() )
-         {
-            pageflowName = pageflow.getSubProcessInstance().getProcessDefinition().getName();
-            pageflowNodeName = pageflow.getNode().getName();
-            pageflowCounter = pageflow.getPageflowCounter();
-         }
-         else
-         {
-            pageflowName = null;
-            pageflowNodeName = null;
-            pageflowCounter = null;
-         }
-      }
-   }
-
-   public static FacesPage instance()
-   {
-      if ( !Contexts.isPageContextActive() )
-      {
-         throw new IllegalStateException("No page context active");
-      }
-      return (FacesPage) Component.getInstance(FacesPage.class, ScopeType.PAGE);
-   }
-
-   public boolean isConversationLongRunning()
-   {
-      return conversationIsLongRunning;
-   }
-
-   public Integer getPageflowCounter()
-   {
-      return pageflowCounter;
-   }
-
-   public String getPageflowName()
-   {
-      return pageflowName;
-   }
-
-   public String getPageflowNodeName()
-   {
-      return pageflowNodeName;
-   }
-
-   public void storeConversation()
-   {
-      Manager manager = Manager.instance();
-      
-      //we only need to execute this code when we are in the 
-      //RENDER_RESPONSE phase, ie. not before redirects
-   
-      Session session = Session.getInstance();
-      boolean sessionInvalid = session!=null && session.isInvalid();
-      if ( !sessionInvalid && manager.isLongRunningConversation() )
-      {
-         storeConversation( manager.getCurrentConversationId() );
-      }
-      else if ( !sessionInvalid && manager.isNestedConversation() )
-      {
-         discardNestedConversation( manager.getParentConversationId() );
-      }
-      else
-      {
-         discardTemporaryConversation();
-      }
-
-      /*if ( !sessionInvalid && Init.instance().isClientSideConversations()  )
-      {
-         // if we are using client-side conversations, put the
-         // map containing the conversation context variables 
-         // into the view root (or remove it for a temp 
-         // conversation context)
-         Contexts.getConversationContext().flush();
-      }*/
-
-   }
-
-   /*public Map<String, Object> getPageParameters()
-   {
-      return pageParameters==null ? Collections.EMPTY_MAP : pageParameters;
-   }
-
-   public void setPageParameters(Map<String, Object> pageParameters)
-   {
-      this.pageParameters = pageParameters.isEmpty() ? null : pageParameters;
-   }
-   
-   /**
-    * Used by test harness
-    * 
-    * @param name the page parameter name
-    * @param value the value
-    */
-   /*public void setPageParameter(String name, Object value)
-   {
-      if (pageParameters==null)
-      {
-         pageParameters = new HashMap<String, Object>();
-      }
-      pageParameters.put(name, value);
-   }*/
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/HttpError.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/HttpError.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/HttpError.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,76 +0,0 @@
-//$Id: HttpError.java 5350 2007-06-20 17:53:19Z gavin $
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Convenient HTTP errors
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.faces.httpError")
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class HttpError
-{
-   /**
-    * Send a HTTP error as the response
-    */
-   public void send(int code)
-   {
-      try
-      {
-         getResponse().sendError(code);
-      }
-      catch (IOException ioe)
-      {
-         throw new IllegalStateException(ioe);
-      }
-      FacesContext.getCurrentInstance().responseComplete();
-   }
-
-   /**
-    * Send a HTTP error as the response
-    */
-   public void send(int code, String message)
-   {
-      try
-      {
-         getResponse().sendError(code, message);
-      }
-      catch (IOException ioe)
-      {
-         throw new IllegalStateException(ioe);
-      }
-      FacesContext.getCurrentInstance().responseComplete();
-   }
-
-   private static HttpServletResponse getResponse()
-   {
-      return (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
-   }
-
-   public static HttpError instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application scope");
-      }
-      return (HttpError) Component.getInstance(HttpError.class, ScopeType.APPLICATION);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/IsUserInRole.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/IsUserInRole.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/IsUserInRole.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,37 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Manager component for a map of roles assigned
- * to the current user, as exposed via the JSF
- * ExternalContext.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.web.isUserInRole")
- at Install(precedence=FRAMEWORK, classDependencies="javax.faces.context.FacesContext")
-public class IsUserInRole extends org.jboss.seam.web.IsUserInRole
-{
-   @Override
-   protected Boolean isUserInRole(String role)
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if ( facesContext != null ) 
-      {
-         return facesContext.getExternalContext().isUserInRole(role);
-      }
-      
-      return super.isUserInRole(role);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Navigator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Navigator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Navigator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,110 +0,0 @@
-package org.jboss.seam.faces;
-
-import java.util.Map;
-
-import javax.faces.application.FacesMessage.Severity;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.util.Strings;
-
-public abstract class Navigator
-{
-   private static final LogProvider log = Logging.getLogProvider(Navigator.class);
-
-   /**
-    * Send an error.
-    */
-   protected void error(int code, String message)
-   {
-      if ( log.isDebugEnabled() ) log.debug("sending error: " + code);
-      org.jboss.seam.faces.HttpError httpError = org.jboss.seam.faces.HttpError.instance();
-      if (message==null)
-      {
-         httpError.send(code);
-      }
-      else
-      {
-         httpError.send(code, message);
-      }
-   }
-
-   protected void redirectExternal(String url) {
-       FacesManager.instance().redirectToExternalURL(url);
-   }
-   
-   protected void redirect(String viewId, Map<String, Object> parameters)
-   {
-      redirect(viewId, parameters, true);
-   }
-   
-   /**
-    * Redirect to the view id.
-    */
-   protected void redirect(String viewId, Map<String, Object> parameters, boolean includePageParams)
-   {
-      if ( Strings.isEmpty(viewId) )
-      {
-         viewId = Pages.getCurrentViewId();
-      }
-      if ( log.isDebugEnabled() ) log.debug("redirecting to: " + viewId);
-      FacesManager.instance().redirect(viewId, parameters, true, includePageParams);
-   }
-   
-   /**
-    * Render the view id.
-    */
-   protected void render(String viewId)
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if ( !Strings.isEmpty(viewId) )
-      {
-         UIViewRoot viewRoot = facesContext.getApplication().getViewHandler()
-               .createView(facesContext, viewId);
-         facesContext.setViewRoot(viewRoot);
-      }
-      else
-      {
-         viewId = Pages.getViewId(facesContext); //just for the log message
-      }
-      if ( log.isDebugEnabled() ) log.debug("rendering: " + viewId);
-      facesContext.renderResponse();
-   }
-
-   protected static String getDisplayMessage(Exception e, String message)
-   {
-      if ( Strings.isEmpty(message) && e.getMessage()!=null ) 
-      {
-    	  return e.getMessage();
-      }
-      else
-      {
-    	  return Interpolator.instance().interpolate(message, e);
-      }
-   }
-   
-   @SuppressWarnings("deprecation")
-   protected static void addFacesMessage(String message, Severity severity, String control, Object... params)
-   {
-      if ( Contexts.isConversationContextActive() )
-      {
-         if ( !Strings.isEmpty(message) )
-         {
-            if ( Strings.isEmpty(control) )
-            {
-               FacesMessages.instance().add(severity, message, params);
-            }
-            else
-            {
-               FacesMessages.instance().addToControl(control, severity, message, params);
-            }
-         }
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Parameters.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Parameters.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Parameters.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import java.util.Map;
-
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Access to request parameters in the JSF environment.
- * 
- * @author Gavin King
- *
- */
- at Name("org.jboss.seam.web.parameters")
- at BypassInterceptors
- at Scope(ScopeType.STATELESS)
- at Install(precedence=FRAMEWORK, classDependencies="javax.faces.context.FacesContext")
-public class Parameters extends org.jboss.seam.web.Parameters
-{
-
-   @Override
-   protected Object convertRequestParameter(String requestParameter, Class type)
-   {
-      if ( String.class.equals(type) ) return requestParameter;
-   
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if (facesContext==null)
-      {
-         throw new IllegalStateException("No FacesContext associated with current thread, cannot convert request parameter type");
-      }
-      else
-      {
-         Converter converter = facesContext.getApplication().createConverter(type);
-         if (converter==null)
-         {
-            throw new IllegalArgumentException("no converter for type: " + type);
-         }
-         UIViewRoot viewRoot = facesContext.getViewRoot();
-         return converter.getAsObject( 
-                  facesContext, 
-                  viewRoot==null ? new UIViewRoot() : viewRoot, //have to pass something here, or get a totally useless NPE from JSF 
-                  requestParameter );
-      }
-   }
-
-   @Override
-   public Map<String, String[]> getRequestParameters()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if ( facesContext != null )
-      {
-         return facesContext.getExternalContext().getRequestParameterValuesMap();
-      }
-      
-      return super.getRequestParameters();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Redirect.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Redirect.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Redirect.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,204 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.PerNestedConversation;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.AbstractMutable;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.navigation.Pages;
-
-/**
- * Convenient API for performing browser redirects with
- * parameters.
- * 
- * @author Gavin King
- */
- at Name("org.jboss.seam.faces.redirect")
- at BypassInterceptors
- at Scope(ScopeType.CONVERSATION)
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at PerNestedConversation
-public class Redirect extends AbstractMutable implements Serializable
-{
-   private static final long serialVersionUID = 6947384474861235210L;
-   private String viewId;
-   private Map<String, Object> parameters = new HashMap<String, Object>();
-   private boolean conversationPropagationEnabled = true;
-   private boolean conversationBegun;
-   
-   /**
-    * Get the JSF view id to redirect to
-    */
-   public String getViewId()
-   {
-      return viewId;
-   }
-   
-   /**
-    * Set the JSF view id to redirect to
-    * 
-    * @param viewId any JSF view id
-    */
-   public void setViewId(String viewId)
-   {
-      setDirty(this.viewId, viewId);
-      this.viewId = viewId;
-   }
-   
-   /**
-    * Get all the request parameters that have been set
-    */
-   public Map<String, Object> getParameters()
-   {
-      return parameters;
-   }
-   
-   /**
-    * Set a request parameter value (to set a multi-valued
-    * request parameter, pass an array or collection as
-    * the value)
-    */
-   public void setParameter(String name, Object value)
-   {
-      Object old = parameters.put(name, value);
-      setDirty(old, value);
-   }
-   
-   /**
-    * Capture the view id and request parameters from the
-    * current request and squirrel them away so we can
-    * return here later in the conversation.
-    * 
-    * @deprecated use captureCurrentView()
-    */
-   public void captureCurrentRequest()
-   {
-      parameters.clear();
-      FacesContext context = FacesContext.getCurrentInstance();
-      parameters.putAll( context.getExternalContext().getRequestParameterMap() );
-      viewId = Pages.getViewId(context);
-      setDirty();
-   }
-   
-   /**
-    * Capture the view id, request parameters and page parameters (which take
-    * precedence) from the current request and squirrel them away so we can
-    * return here later in the conversation. If no conversation is active,
-    * begin a conversation. The conversation is terminated by {@link
-    * Redirect#returnToCapturedView()} if begun by this method.
-    * 
-    * @see Redirect#returnToCapturedView()
-    */
-   public void captureCurrentView()
-   {
-      FacesContext context = FacesContext.getCurrentInstance();
-      
-      // If this isn't a faces request then just return
-      if (context == null) return;
-      
-      // first capture all request parameters
-      parameters.putAll( context.getExternalContext().getRequestParameterMap() );
-      // then preserve page parameters, overwriting request parameters with same names
-      parameters.putAll( Pages.instance().getStringValuesFromPageContext(context) );
-      
-      // special case only needed for actionMethod if decide not to capture all request parameters
-      //if (context.getExternalContext().getRequestParameterMap().containsKey("actionMethod"))
-      //{
-      //   parameters.put("actionMethod", context.getExternalContext().getRequestParameterMap().get("actionMethod"));
-      //}
-      
-      viewId = Pages.getViewId(context);
-      conversationBegun = Conversation.instance().begin(true, false);
-      setDirty();
-      //if the request ends with an exception,
-      //the conversation context never gets
-      //flushed....
-      Contexts.getConversationContext().flush();
-   }
-   
-   /**
-    * Should the conversation be propagated across the redirect?
-    * @return true by default
-    */
-   public boolean isConversationPropagationEnabled()
-   {
-      return conversationPropagationEnabled;
-   }
-   
-   /**
-    * Note that conversations are propagated by default
-    */
-   public void setConversationPropagationEnabled(boolean conversationPropagationEnabled)
-   {
-      this.conversationPropagationEnabled = conversationPropagationEnabled;
-   }
-   
-   /**
-    * Perform the redirect
-    */
-   public void execute()
-   {
-      FacesManager.instance().redirect(viewId, parameters, conversationPropagationEnabled, true);
-   }
-   
-   /**
-    * Redirect to the captured view, and end any conversation
-    * that began in captureCurrentView(). 
-    *
-    *@see Redirect#captureCurrentView()
-    */
-   public boolean returnToCapturedView()
-   {
-      if (viewId!=null)
-      {
-         if (conversationBegun)
-         {
-            Conversation.instance().end();
-         }
-         execute();
-         return true;
-      }
-      else
-      {
-         return false;
-      }
-   }
-   
-   //TODO: replacement for Conversation.endAndRedirect()
-   /*public boolean returnToParentView()
-   {
-      Manager manager = Manager.instance();
-      String viewId = manager.getParentConversationViewId();
-      if (viewId==null)
-      {
-         return false;
-      }
-      else
-      {
-         manager.redirect(viewId);
-         return true;
-      }         
-   }*/
-   
-   public static Redirect instance()
-   {
-      if ( !Contexts.isConversationContextActive() )
-      {
-         throw new IllegalStateException("No active conversation context");
-      }
-      return (Redirect) Component.getInstance(Redirect.class, ScopeType.CONVERSATION);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/RedirectException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/RedirectException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/RedirectException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,17 +0,0 @@
-package org.jboss.seam.faces;
-
-import java.io.IOException;
-
-public class RedirectException extends RuntimeException
-{
-
-   public RedirectException(IOException ioe)
-   {
-      super(ioe);
-   }
-   
-   public RedirectException(String message)
-   {
-      super(message);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Renderer.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Renderer.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Renderer.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,23 +0,0 @@
-package org.jboss.seam.faces;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-
-/**
- * A component for direct rendering of
- * templates. Especially useful with
- * Seam Mail. 
- *
- */
- at Name("org.jboss.seam.faces.renderer")
- at Install(false)
-public abstract class Renderer
-{
-    public abstract String render(String viewId);
-    
-    public static Renderer instance()
-    {
-        return (Renderer) Component.getInstance(Renderer.class);
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/ResourceLoader.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/ResourceLoader.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/ResourceLoader.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,56 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.util.FacesResources;
-
-/**
- * Access to application resources in tye JSF environment.
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.STATELESS)
- at BypassInterceptors
- at Install(precedence=FRAMEWORK, classDependencies="javax.faces.context.FacesContext")
- at Name("org.jboss.seam.core.resourceLoader")
-public class ResourceLoader extends org.jboss.seam.core.ResourceLoader
-{
-   
-   @Override
-   public InputStream getResourceAsStream(String resource)
-   {
-      javax.faces.context.FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
-      if (context!=null)
-      {
-         return FacesResources.getResourceAsStream( resource, context.getExternalContext() );
-      }
-      else
-      {
-         return super.getResourceAsStream(resource);
-      }
-   }
-
-   @Override
-   public URL getResource(String resource) 
-   {
-      javax.faces.context.FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
-      if (context!=null)
-      {
-         return FacesResources.getResource( resource, context.getExternalContext() );
-      }
-      else
-      {
-         return super.getResource(resource);
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Selector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Selector.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Selector.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,122 +0,0 @@
-package org.jboss.seam.faces;
-
-import java.io.Serializable;
-
-import javax.faces.context.FacesContext;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.core.AbstractMutable;
-
-/**
- * Support for selector objects which remember their selection as a cookie
- * 
- * @author Gavin King
- */
-public abstract class Selector extends AbstractMutable implements Serializable
-{
-   public static final int DEFAULT_MAX_AGE = 31536000; // 1 year in seconds
-   private boolean cookieEnabled;
-   private int cookieMaxAge = DEFAULT_MAX_AGE;
-   private String cookiePath= "/";
-   
-   /**
-    * Is the cookie enabled?
-    * @return false by default
-    */
-   public boolean isCookieEnabled()
-   {
-      return cookieEnabled;
-   }
-   public void setCookieEnabled(boolean cookieEnabled)
-   {
-      setDirty(this.cookieEnabled, cookieEnabled);
-      this.cookieEnabled = cookieEnabled;
-   }
-   /**
-    * The max age of the cookie
-    * @return 1 year by default
-    */
-   public int getCookieMaxAge()
-   {
-      return cookieMaxAge;
-   }
-   public void setCookieMaxAge(int cookieMaxAge)
-   {
-      this.cookieMaxAge = cookieMaxAge;
-   }
-   
-   public String getCookiePath()
-   {
-      return cookiePath;
-   }
-   
-   public void setCookiePath(String cookiePath)
-   {
-      this.cookiePath = cookiePath;
-   }
-   
-   /**
-    * Override to define the cookie name
-    */
-   protected abstract String getCookieName();
-   
-   /**
-    * Get the value of the cookie
-    */
-   protected String getCookieValueIfEnabled()
-   {
-      return isCookieEnabled() ?
-         getCookieValue() : null;
-   }
-   
-   protected Cookie getCookie()
-   {
-      FacesContext ctx = FacesContext.getCurrentInstance();
-      if (ctx != null)
-      {
-          return (Cookie) ctx.getExternalContext().getRequestCookieMap()
-            .get( getCookieName() );
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   protected String getCookieValue()
-   {
-      Cookie cookie = getCookie();
-      return cookie==null ? null : cookie.getValue();
-   }
-   
-   protected void clearCookieValue()
-   {
-      Cookie cookie = getCookie();
-      if ( cookie!=null )
-      {
-         HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();         
-         cookie.setValue(null);
-         cookie.setPath(cookiePath);
-         cookie.setMaxAge(0);
-         response.addCookie(cookie);
-      }
-   }
-   
-   /**
-    * Set the cookie
-    */
-   protected void setCookieValueIfEnabled(String value)
-   {
-      FacesContext ctx = FacesContext.getCurrentInstance();
-      
-      if ( isCookieEnabled() && ctx != null)
-      {
-         HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext().getResponse();
-         Cookie cookie = new Cookie( getCookieName(), value );
-         cookie.setMaxAge( getCookieMaxAge() );
-         cookie.setPath(cookiePath);
-         response.addCookie(cookie);
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Switcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Switcher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Switcher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,125 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.faces.model.SelectItem;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.ConversationEntries;
-import org.jboss.seam.core.ConversationEntry;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.web.Session;
-
-/**
- * Support for the conversation switcher drop-down menu.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.PAGE)
- at Name("org.jboss.seam.faces.switcher")
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at BypassInterceptors
-public class Switcher implements Serializable 
-{
-   
-   private static final long serialVersionUID = -6403911073853051938L;
-   private List<SelectItem> selectItems;
-   private String conversationIdOrOutcome;
-   private String resultingConversationIdOrOutcome;
-      
-   @Create
-   public void createSelectItems()
-   {
-      ConversationEntries conversationEntries = ConversationEntries.getInstance();
-      if (conversationEntries==null)
-      {
-         selectItems = Collections.EMPTY_LIST;
-      }
-      else
-      {
-         Set<ConversationEntry> orderedEntries = new TreeSet<ConversationEntry>();
-         orderedEntries.addAll( conversationEntries.getConversationEntries() );
-         selectItems = new ArrayList<SelectItem>( conversationEntries.size() );
-         for ( ConversationEntry entry: orderedEntries )
-         {
-            if ( entry.isDisplayable() && !Session.instance().isInvalid() )
-            {
-               selectItems.add( new SelectItem( entry.getId(), entry.getDescription() ) );
-            }
-         }
-      }
-   }
-   
-   public List<SelectItem> getSelectItems()
-   {
-      return selectItems;
-   }
-      
-   private String getLongRunningConversationId()
-   {
-      Manager manager = Manager.instance();
-      if ( manager.isLongRunningConversation() )
-      {
-         return manager.getCurrentConversationId();
-      }
-      else if ( manager.isNestedConversation() )
-      {
-         return manager.getParentConversationId();
-      }
-      else
-      {
-         //TODO: is there any way to set it to the current outcome, instead of null?
-         return null;
-      }
-   }
-
-   public String getConversationIdOrOutcome() 
-   {
-      return resultingConversationIdOrOutcome==null ? 
-            getLongRunningConversationId() :
-            resultingConversationIdOrOutcome;
-   }
-
-   public void setConversationIdOrOutcome(String selectedId) 
-   {
-      this.conversationIdOrOutcome = selectedId;
-   }
-   
-   public String select()
-   {
-
-      boolean isOutcome = conversationIdOrOutcome==null || 
-                    (!Character.isDigit(conversationIdOrOutcome.charAt(0)) && conversationIdOrOutcome.indexOf(':') < 0);       
-      
-      String actualOutcome;
-      if (isOutcome)
-      {
-         resultingConversationIdOrOutcome = conversationIdOrOutcome;
-         actualOutcome = conversationIdOrOutcome;
-      }
-      else
-      {
-         ConversationEntry ce = ConversationEntries.instance().getConversationEntry(conversationIdOrOutcome);
-         if (ce!=null)
-         {
-            resultingConversationIdOrOutcome = ce.getId();
-            ce.redirect();
-         }
-         actualOutcome = null;
-      }
-      return actualOutcome;
-   }
-  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/UiComponent.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/UiComponent.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/UiComponent.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,81 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.ScopeType.STATELESS;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.AbstractMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Access to UIComponents in the current view, by id.
- * 
- * @author Gavin King
- *
- */
- at Name("org.jboss.seam.faces.uiComponent")
- at BypassInterceptors
- at Scope(STATELESS)
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class UiComponent
-{
-   
-   @Unwrap
-   public Map<String, UIComponent> getViewComponents()
-   {
-      return new AbstractMap<String, UIComponent>() 
-      {
-
-         @Override
-         public boolean containsKey(Object key) {
-            return get(key) != null;
-         }
-         
-          
-         @Override
-         public Set<Map.Entry<String, UIComponent>> entrySet()
-         {
-            throw new UnsupportedOperationException();
-         }
-
-         @Override
-         public UIComponent get(Object key)
-         {
-            if ( !(key instanceof String) ) return null;
-            try
-            {
-                FacesContext context = FacesContext.getCurrentInstance();
-
-                if (context == null) {
-                    return null;
-                }
-                
-                UIViewRoot viewRoot = context.getViewRoot();
-                
-                if (viewRoot == null)
-                {
-                   return null;
-                }
-
-                return viewRoot.findComponent( (String) key );
-            }
-            catch (IllegalArgumentException iae)
-            {
-               return null;
-            }
-         }
-         
-      };
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/UserPrincipal.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/UserPrincipal.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/UserPrincipal.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,51 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import java.security.Principal;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Manager component for the current user Principal
- * exposed via the JSF ExternalContext.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.web.userPrincipal")
- at Install(precedence=FRAMEWORK, classDependencies="javax.faces.context.FacesContext")
-public class UserPrincipal extends org.jboss.seam.web.UserPrincipal
-{
-   @Unwrap @Override
-   public Principal getUserPrincipal()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if ( facesContext != null ) 
-      {
-         return facesContext.getExternalContext().getUserPrincipal();
-      }
-      
-      return super.getUserPrincipal();
-   }
-   
-   public static Principal instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application scope");
-      }
-      return (Principal) Component.getInstance(UserPrincipal.class, ScopeType.APPLICATION);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Validation.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Validation.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/Validation.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-
-/**
- * Allows the application to determine whether the JSF validation
- * phase completed successfully, or if a validation failure
- * occurred.
- * 
- * @author Gavin king
- *
- */
- at Name("org.jboss.seam.faces.validation")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class Validation
-{
-
-   private boolean succeeded;
-   private boolean failed;
-
-   public static Validation instance()
-   {
-      if ( !Contexts.isEventContextActive() )
-      {
-         throw new IllegalStateException("No active event scope");
-      }
-      return (Validation) Component.getInstance(Validation.class, ScopeType.EVENT);
-   }
-   
-   public void afterProcessValidations(FacesContext facesContext)
-   {
-      failed = facesContext.getRenderResponse();
-      if (failed)
-      {
-         Events.instance().raiseEvent("org.jboss.seam.validationFailed");
-      }
-      succeeded = !failed;
-   }
-
-   public boolean isSucceeded()
-   {
-      return succeeded;
-   }
-
-   public boolean isFailed()
-   {
-      return failed;
-   }
-
-   public void fail()
-   {
-      failed = true;
-      succeeded = false;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/faces/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,11 +0,0 @@
-/**
- * A set of Seam components for working with JSF.
- * Some of these components extend core components
- * and add JSF-specific functionality. Others
- * exist to put a friendly face to JSF.
- */
- at AutoCreate
-package org.jboss.seam.faces;
-
-import org.jboss.seam.annotations.AutoCreate;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/BusinessProcessController.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/BusinessProcessController.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/BusinessProcessController.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-package org.jboss.seam.framework;
-
-import org.jboss.seam.bpm.BusinessProcess;
-import org.jboss.seam.bpm.ManagedJbpmContext;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.taskmgmt.exe.TaskInstance;
-
-/**
- * Superclass for controller objects that control
- * the business process context programmatically.
- * Adds convenience methods for control of the
- * jBPM business process.
- * 
- * @author Gavin King
- *
- */
-public class BusinessProcessController extends Controller
-{
-   protected BusinessProcess getBusinessProcess()
-   {
-      return BusinessProcess.instance();
-   }
-   
-   protected JbpmContext getJbpmContext()
-   {
-      return ManagedJbpmContext.instance();
-   }
-   
-   protected TaskInstance getTaskInstance()
-   {
-      return org.jboss.seam.bpm.TaskInstance.instance();
-   }
-   
-   protected ProcessInstance getProcessInstance()
-   {
-      return org.jboss.seam.bpm.ProcessInstance.instance();
-   }
-     
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Controller.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Controller.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Controller.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,317 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.io.Serializable;
-import java.util.Map;
-
-import javax.faces.context.FacesContext;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.ClassValidator;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.Validators;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.faces.HttpError;
-import org.jboss.seam.faces.Redirect;
-import org.jboss.seam.faces.Renderer;
-import org.jboss.seam.faces.Validation;
-import org.jboss.seam.international.Messages;
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.web.Session;
-
-/**
- * Base class for controller objects. Provides various
- * helper methods that help slightly reduce the code
- * required to create a Seam component that acts as
- * a controller.
- * 
- * @author Gavin King
- *
- */
-public abstract class Controller implements Serializable
-{
-
-   @Logger Log log;
-
-   protected Context getApplicationContext()
-   {
-      return Contexts.getApplicationContext();
-   }
-
-   protected Context getBusinessProcessContext()
-   {
-      return Contexts.getBusinessProcessContext();
-   }
-
-   protected Context getConversationContext()
-   {
-      return Contexts.getConversationContext();
-   }
-
-   protected Context getEventContext()
-   {
-      return Contexts.getEventContext();
-   }
-
-   protected Events getEvents()
-   {
-      return Events.instance();
-   }
-   
-   protected Conversation getConversation()
-   {
-      return Conversation.instance();
-   }
-
-   @Deprecated
-   protected FacesMessages getFacesMessages()
-   {
-      return FacesMessages.instance();
-   }
-   
-   protected StatusMessages getStatusMessages()
-   {
-      return StatusMessages.instance();
-   }
-   
-   protected Identity getIdentity()
-   {
-      return Identity.instance();
-   }
-   
-   protected Cookie getCookie(String name)
-   {
-      return (Cookie) FacesContext.getCurrentInstance().getExternalContext()
-                                  .getRequestCookieMap().get(name);
-   }
-   
-   protected void addCookie(Cookie cookie)
-   {
-      ( (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext()
-                                          .getResponse() ).addCookie(cookie);
-   }
-   
-   protected void addFacesMessage(String messageTemplate, Object... params)
-   {
-      getFacesMessages().add(messageTemplate, params);
-   }
-   
-   protected void addFacesMessageFromResourceBundle(String key, Object... params)
-   {
-      getFacesMessages().addFromResourceBundle(key, params);
-   }
-   
-   protected String render(String path)
-   {
-      return Renderer.instance().render(path);
-   }
-
-   protected void sendHttpError(int code)
-   {
-      HttpError.instance().send(code);
-   }
-   
-   protected void sendHttpError(int code, String message)
-   {
-      HttpError.instance().send(code, message);
-   }
-
-   protected Log getLog()
-   {
-      return log;
-   }
-
-   protected Map<String, String> getMessages()
-   {
-      return Messages.instance();
-   }
-
-   protected Context getMethodContext()
-   {
-      return Contexts.getMethodContext();
-   }
-
-   protected Context getPageContext()
-   {
-      return Contexts.getPageContext();
-   }
-
-   protected Redirect getRedirect()
-   {
-      return Redirect.instance();
-   }
-
-   protected Context getSessionContext()
-   {
-      return Contexts.getSessionContext();
-   }
-   
-   protected FacesContext getFacesContext()
-   {
-      return FacesContext.getCurrentInstance();
-   }
-
-   protected boolean validationSucceeded()
-   {
-      return Validation.instance().isSucceeded();
-   }
-
-   protected boolean validationFailed()
-   {
-      return Validation.instance().isFailed();
-   }
-
-   protected void failValidation()
-   {
-      Validation.instance().fail();
-   }
-   
-   protected String interpolate(String string, Object... params) 
-   {
-      return Interpolator.instance().interpolate(string, params);
-   }
-
-   protected <T> ClassValidator<T> getValidator(Class<T> modelClass)
-   {
-      return Validators.instance().getValidator(modelClass);
-   } 
-
-   protected <T> ClassValidator<T> getValidator(T model)
-   {
-      return Validators.instance().getValidator(model);
-   } 
-
-   protected void debug(Object object, Object... params)
-   {
-      log.debug(object, params);
-   }
-
-   protected void debug(Object object, Throwable t, Object... params)
-   {
-      log.debug(object, t, params);
-   }
-
-   protected void error(Object object, Object... params)
-   {
-      log.error(object, params);
-   }
-
-   protected void error(Object object, Throwable t, Object... params)
-   {
-      log.error(object, t, params);
-   }
-
-   protected void fatal(Object object, Object... params)
-   {
-      log.fatal(object, params);
-   }
-
-   protected void fatal(Object object, Throwable t, Object... params)
-   {
-      log.fatal(object, t, params);
-   }
-
-   protected void info(Object object, Object... params)
-   {
-      log.info(object, params);
-   }
-
-   protected void info(Object object, Throwable t, Object... params)
-   {
-      log.info(object, t, params);
-   }
-
-   protected void trace(Object object, Object... params)
-   {
-      log.trace(object, params);
-   }
-
-   protected void trace(Object object, Throwable t, Object... params)
-   {
-      log.trace(object, t, params);
-   }
-
-   protected void warn(Object object, Object... params)
-   {
-      log.warn(object, params);
-   }
-
-   protected void warn(Object object, Throwable t, Object... params)
-   {
-      log.warn(object, t, params);
-   }
-
-   protected void raiseAsynchronousEvent(String type, Object... parameters)
-   {
-      getEvents().raiseAsynchronousEvent(type, parameters);
-   }
-
-   protected void raiseEvent(String type, Object... parameters)
-   {
-      getEvents().raiseEvent(type, parameters);
-   }
-
-   protected void raiseTransactionSuccessEvent(String type, Object... parameters)
-   {
-      getEvents().raiseTransactionSuccessEvent(type, parameters);
-   }
-   
-   protected Object getComponentInstance(String name)
-   {
-      return Component.getInstance(name);
-   }
-
-   protected Object getComponentInstance(Class clazz)
-   {
-      return Component.getInstance(clazz);
-   }
-   
-   protected void invalidateSession()
-   {
-      Session.instance().invalidate();
-   }
-
-   protected boolean isTransactionMarkedRollback()
-   {
-      try
-      {
-         return Transaction.instance().isMarkedRollback();
-      }
-      catch (Exception e)
-      {
-         return false;
-      }
-   }
-   
-   protected <T> T evaluateValueExpression(String expression, Class<T> type)
-   {
-       return createValueExpression(expression, type).getValue();
-   }
-   
-   protected Object evaluateValueExpression(String expression)
-   {
-       return createValueExpression(expression).getValue();
-   }
-   
-   protected <T> ValueExpression<T> createValueExpression(String expression, Class<T> type)
-   {
-       return Expressions.instance().createValueExpression(expression, type);
-   }
-   
-   protected ValueExpression createValueExpression(String expression)
-   {
-       return createValueExpression(expression, Object.class);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentDate.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentDate.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentDate.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.framework;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.Date;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-
-/**
- * The current date, as an instance of java.util.Date.
- * 
- * @author Gavin King
- *
- */
- at Name("org.jboss.seam.framework.currentDate")
- at Install(precedence=BUILT_IN)
- at Scope(ScopeType.STATELESS)
- at AutoCreate
-public class CurrentDate
-{
-   @Unwrap 
-   public Date getCurrentDate()
-   {
-      return new java.sql.Date( System.currentTimeMillis() );
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentDatetime.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentDatetime.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentDatetime.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.framework;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.Date;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-
-/**
- * The current date and time, as an instance of java.util.Date.
- * 
- * @author Gavin King
- *
- */
- at Name("org.jboss.seam.framework.currentDatetime")
- at Install(precedence=BUILT_IN)
- at Scope(ScopeType.STATELESS)
- at AutoCreate
-public class CurrentDatetime
-{
-   @Unwrap 
-   public Date getCurrentDatetime()
-   {
-      return new java.sql.Timestamp( System.currentTimeMillis() );
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentTime.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentTime.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/CurrentTime.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.framework;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.Date;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-
-/**
- * The current time, as an instance of java.util.Date.
- * 
- * @author Gavin King
- *
- */
- at Name("org.jboss.seam.framework.currentTime")
- at Install(precedence=BUILT_IN)
- at Scope(ScopeType.STATELESS)
- at AutoCreate
-public class CurrentTime
-{
-   @Unwrap 
-   public Date getCurrentTime()
-   {
-      return new java.sql.Time( System.currentTimeMillis() );
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityController.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityController.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityController.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,85 +0,0 @@
-package org.jboss.seam.framework;
-
-import javax.persistence.EntityManager;
-import javax.persistence.LockModeType;
-import javax.persistence.Query;
-
-/**
- * Base class for controller objects that perform
- * persistence operations using JPA. Adds
- * convenience methods for access to the JPA
- * EntityManager.
- * 
- * @author Gavin King
- *
- */
-public class EntityController extends PersistenceController<EntityManager>
-{
-   
-   public EntityManager getEntityManager()
-   {
-      return getPersistenceContext();
-   }
-   
-   public void setEntityManager(EntityManager entityManager)
-   {
-      setPersistenceContext(entityManager);
-   }
-
-   @Override
-   protected String getPersistenceContextName()
-   {
-      return "entityManager";
-   }
-   
-   protected Query createNamedQuery(String name)
-   {
-      return getEntityManager().createNamedQuery(name);
-   }
-
-   protected Query createQuery(String ejbql)
-   {
-      return getEntityManager().createQuery(ejbql);
-   }
-
-   protected <T> T find(Class<T> clazz, Object id)
-   {
-      return getEntityManager().find(clazz, id);
-   }
-
-   protected void flush()
-   {
-      getEntityManager().flush();
-   }
-
-   protected <T> T getReference(Class<T> clazz, Object id)
-   {
-      return getEntityManager().getReference(clazz, id);
-   }
-
-   protected void lock(Object entity, LockModeType lockMode)
-   {
-      getEntityManager().lock(entity, lockMode);
-   }
-
-   protected <T> T merge(T entity)
-   {
-      return getEntityManager().merge(entity);
-   }
-
-   protected void persist(Object entity)
-   {
-      getEntityManager().persist(entity);
-   }
-
-   protected void refresh(Object entity)
-   {
-      getEntityManager().refresh(entity);
-   }
-
-   protected void remove(Object entity)
-   {
-      getEntityManager().remove(entity);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityHome.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityHome.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityHome.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,219 +0,0 @@
-package org.jboss.seam.framework;
-
-import javax.persistence.EntityManager;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.persistence.PersistenceProvider;
-import org.jboss.seam.transaction.Transaction;
-
-/**
- * Base class for Home objects of JPA entities.
- * 
- * @author Gavin King
- *
- */
-public class EntityHome<E> extends Home<EntityManager, E>
-{
-   private static final long serialVersionUID = -3140094990727574632L;
-   
-   /**
-    * Run on {@link EntityHome} instantiation.
-    * <br />
-    * Validates that an {@link EntityManager} is available.
-    * 
-    * @see Home#create()
-    */
-   @Override
-   public void create()
-   {
-      super.create();
-      if ( getEntityManager()==null )
-      {
-         throw new IllegalStateException("entityManager is null");
-      }
-   }
-   
-   /**
-    * Returns true if the entity instance is managed
-    */
-   @Transactional
-   public boolean isManaged()
-   {
-      return getInstance()!=null && 
-            getEntityManager().contains( getInstance() );
-   }
-
-   /**
-    * Flush any changes made to the managed entity instance to the underlying
-    * database. 
-    * <br />
-    * If the update is successful, a log message is printed, a 
-    * {@link javax.faces.application.FacesMessage} is added and a transaction 
-    * success event raised.
-    * 
-    * @see Home#updatedMessage()
-    * @see Home#raiseAfterTransactionSuccessEvent()
-    * 
-    * @return "updated" if the update is successful
-    */
-   @Transactional
-   public String update()
-   {
-      joinTransaction();
-      getEntityManager().flush();
-      updatedMessage();
-      raiseAfterTransactionSuccessEvent();
-      return "updated";
-   }
-   
-   /**
-    * Persist unmanaged entity instance to the underlying database. 
-    * If the persist is successful, a log message is printed, a 
-    * {@link javax.faces.application.FacesMessage } is added and a transaction 
-    * success event raised.
-    * 
-    * @see Home#createdMessage()
-    * @see Home#raiseAfterTransactionSuccessEvent()
-    * 
-    * @return "persisted" if the persist is successful
-    */
-   @Transactional
-   public String persist()
-   {
-      getEntityManager().persist( getInstance() );
-      getEntityManager().flush();
-      assignId( PersistenceProvider.instance().getId( getInstance(), getEntityManager() ) );
-      createdMessage();
-      raiseAfterTransactionSuccessEvent();
-      return "persisted";
-   }
-   
-   /**
-    * Remove managed entity instance from the Persistence Context and the 
-    * underlying database.
-    * If the remove is successful, a log message is printed, a 
-    * {@link javax.faces.application.FacesMessage} is added and a transaction 
-    * success event raised.
-    * 
-    * @see Home#deletedMessage()
-    * @see Home#raiseAfterTransactionSuccessEvent()
-    * 
-    * @return "removed" if the remove is successful
-    */
-   @Transactional
-   public String remove()
-   {
-      getEntityManager().remove( getInstance() );
-      getEntityManager().flush();
-      deletedMessage();
-      raiseAfterTransactionSuccessEvent();
-      return "removed";
-   }
-   
-   /**
-    * Implementation of {@link Home#find() find()} for JPA
-    * 
-    * @see Home#find()
-    */
-   @Transactional
-   @Override
-   public E find()
-   {
-      if (getEntityManager().isOpen())  
-      {
-         E result = loadInstance();
-         if (result==null) 
-         {
-            result = handleNotFound();
-         }
-         return result;
-      }
-      else 
-      {
-         return null;
-      }
-   }
-
-   /**
-    * Utility method to load entity instance from the {@link EntityManager}. 
-    * Called by {@link #find()}.
-    * <br />
-    * Can be overridden to support eager fetching of associations.
-    * 
-    * @return The entity identified by {@link Home#getEntityClass() getEntityClass()}, 
-    * {@link Home#getId() getId()}
-    */
-   protected E loadInstance() 
-   {
-      return getEntityManager().find(getEntityClass(), getId());
-   }
-
-   /**
-    * Implementation of {@link Home#joinTransaction() joinTransaction()} for
-    * JPA.
-    */
-   @Override
-   protected void joinTransaction()
-   {
-      if ( getEntityManager().isOpen() )
-      {
-         try
-         {
-            Transaction.instance().enlist( getEntityManager() );
-         }
-         catch (SystemException se)
-         {
-            throw new RuntimeException("could not join transaction", se);
-         }
-      }
-   }
-
-   /**
-    * The Seam Managed Persistence Context used by this Home component
-    */
-   public EntityManager getEntityManager()
-   {
-      return getPersistenceContext();
-   }
-   
-   /**
-    * The Seam Managed Persistence Context used by this Home component.
-    */
-   public void setEntityManager(EntityManager entityManager)
-   {
-      setPersistenceContext(entityManager);
-   }
-   
-   /**
-    * The name the Seam component managing the Persistence Context.
-    * <br />
-    * Override this or {@link #getEntityManager()} if your persistence context
-    * is not named <code>entityManager</code>.
-    */
-   @Override
-   protected String getPersistenceContextName()
-   {
-      return "entityManager";
-   }
-   
-   /**
-    * Implementation of {@link Home#getEntityName() getEntityName()} for JPA
-    * 
-    * @see Home#getEntityName()
-    */
-   @Override
-   protected String getEntityName()
-   {
-      try
-      {
-         return PersistenceProvider.instance().getName(getInstance(), getEntityManager());
-      }
-      catch (IllegalArgumentException e) 
-      {
-         // Handle that the passed object may not be an entity
-         return null;
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityIdentifier.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityIdentifier.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityIdentifier.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-package org.jboss.seam.framework;
-
-import javax.persistence.EntityManager;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.persistence.PersistenceProvider;
-import org.jboss.seam.transaction.Transaction;
-
-public class EntityIdentifier extends Identifier<EntityManager>
-{
-   public EntityIdentifier(Object entity, EntityManager entityManager)
-   {
-      super(PersistenceProvider.instance().getBeanClass(entity), PersistenceProvider.instance().getId(entity, entityManager));
-      
-   }
-   
-   public EntityIdentifier(Class clazz, Object id)
-   {
-      super(clazz, id);
-   }
-   
-   @Override
-   public Object find(EntityManager entityManager)
-   {
-      if (entityManager == null)
-      {
-         throw new NullPointerException("EntityManager must not be null");
-      }
-      try
-      {
-         Transaction.instance().enlist(entityManager);
-      }
-      catch (SystemException se)
-      {
-         throw new RuntimeException("could not join transaction", se);
-      }
-      return entityManager.find(getClazz(), getId());
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityNotFoundException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityNotFoundException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityNotFoundException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,33 +0,0 @@
-package org.jboss.seam.framework;
-
-import javax.ejb.ApplicationException;
-
-import org.jboss.seam.annotations.exception.HttpError;
-
- at HttpError(errorCode=404)
- at ApplicationException(rollback=true) 
-public class EntityNotFoundException extends RuntimeException
-{
-   private static final long serialVersionUID = -3469578090343847583L;
-   
-   private Object id;
-   private Class entityClass;
-   
-   public EntityNotFoundException(Object id, Class entityClass)
-   {
-      super( String.format("entity not found: %s#%s", entityClass.getName(), id) );
-      this.id = id;
-      this.entityClass = entityClass;
-   }
-   
-   public Class getEntityClass()
-   {
-      return entityClass;
-   }
-
-   public Object getId()
-   {
-      return id;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityQuery.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityQuery.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/EntityQuery.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,244 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.util.List;
-import java.util.Map;
-
-import javax.persistence.EntityManager;
-import javax.persistence.NonUniqueResultException;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.persistence.PersistenceProvider;
-import org.jboss.seam.persistence.QueryParser;
-import org.jboss.seam.persistence.PersistenceProvider.Feature;
-import org.jboss.seam.transaction.Transaction;
-
-/**
- * A Query object for JPA.
- * 
- * @author Gavin King
- *
- */
-public class EntityQuery<E> extends Query<EntityManager, E>
-{
-
-   private List<E> resultList;
-   private E singleResult;
-   private Long resultCount;
-   private Map<String, String> hints;
-
-   /**
-    * Validate the query
-    * 
-    * @throws IllegalStateException if the query is not valid
-    */
-   @Override
-   public void validate()
-   {
-      super.validate();
-      if ( getEntityManager()==null )
-      {
-         throw new IllegalStateException("entityManager is null");
-      }
-      
-      if (!PersistenceProvider.instance().supportsFeature(Feature.WILDCARD_AS_COUNT_QUERY_SUBJECT)) {
-         setUseWildcardAsCountQuerySubject(false);
-      }
-   }
-
-   @Override
-   @Transactional
-   public boolean isNextExists()
-   {
-      return resultList!=null && getMaxResults()!=null &&
-             resultList.size() > getMaxResults();
-   }
-
-
-   /**
-    * Get the list of results this query returns
-    * 
-    * Any changed restriction values will be applied
-    */
-   @Transactional
-   @Override
-   public List<E> getResultList()
-   {
-      if ( isAnyParameterDirty() )
-      {
-         refresh();
-      }
-      initResultList();
-      return truncResultList(resultList);
-   }
-
-   private void initResultList()
-   {
-      if (resultList==null)
-      {
-         javax.persistence.Query query = createQuery();
-         resultList = query==null ? null : query.getResultList();
-      }
-   }
-   
-   /**
-    * Get a single result from the query
-    * 
-    * Any changed restriction values will be applied
-    * 
-    * @throws NonUniqueResultException if there is more than one result
-    */
-   @Transactional
-   @Override
-   public E getSingleResult()
-   {
-      if (isAnyParameterDirty())
-      {
-         refresh();
-      }
-      initSingleResult();
-      return singleResult;
-   }
-
-   private void initSingleResult()
-   {
-      if ( singleResult==null)
-      {
-         javax.persistence.Query query = createQuery();
-         singleResult = (E) (query==null ? 
-               null : query.getSingleResult());
-      }
-   }
-
-   /**
-    * Get the number of results this query returns
-    * 
-    * Any changed restriction values will be applied
-    */
-   @Transactional
-   @Override
-   public Long getResultCount()
-   {
-      if (isAnyParameterDirty())
-      {
-         refresh();
-      }
-      initResultCount();
-      return resultCount;
-   }
-
-   private void initResultCount()
-   {
-      if ( resultCount==null )
-      {
-         javax.persistence.Query query = createCountQuery();
-         resultCount = query==null ? 
-               null : (Long) query.getSingleResult();
-      }
-   }
-
-   /**
-    * The refresh method will cause the result to be cleared.  The next access
-    * to the result set will cause the query to be executed.
-    * 
-    * This method <b>does not</b> cause the ejbql or restrictions to reread.
-    * If you want to update the ejbql or restrictions you must call 
-    * {@link #setEjbql(String)} or {@link #setRestrictions(List)}
-    */
-   @Override
-   public void refresh()
-   {
-      super.refresh();
-      resultCount = null;
-      resultList = null;
-      singleResult = null;
-   }
-   
-   public EntityManager getEntityManager()
-   {
-      return getPersistenceContext();
-   }
-
-   public void setEntityManager(EntityManager entityManager)
-   {
-      setPersistenceContext(entityManager);
-   }
-
-   @Override
-   protected String getPersistenceContextName()
-   {
-      return "entityManager";
-   }
-   
-   protected javax.persistence.Query createQuery()
-   {
-      parseEjbql();
-      
-      evaluateAllParameters();
-      
-      joinTransaction();
-      
-      javax.persistence.Query query = getEntityManager().createQuery( getRenderedEjbql() );
-      setParameters( query, getQueryParameterValues(), 0 );
-      setParameters( query, getRestrictionParameterValues(), getQueryParameterValues().size() );
-      if ( getFirstResult()!=null) query.setFirstResult( getFirstResult() );
-      if ( getMaxResults()!=null) query.setMaxResults( getMaxResults()+1 ); //add one, so we can tell if there is another page
-      if ( getHints()!=null )
-      {
-         for ( Map.Entry<String, String> me: getHints().entrySet() )
-         {
-            query.setHint(me.getKey(), me.getValue());
-         }
-      }
-      return query;
-   }
-   
-   protected javax.persistence.Query createCountQuery()
-   {
-      parseEjbql();
-
-      evaluateAllParameters();
-
-      joinTransaction();
-      
-      javax.persistence.Query query = getEntityManager().createQuery( getCountEjbql() );
-      setParameters( query, getQueryParameterValues(), 0 );
-      setParameters( query, getRestrictionParameterValues(), getQueryParameterValues().size() );
-      return query;
-   }
-
-   private void setParameters(javax.persistence.Query query, List<Object> parameters, int start)
-   {
-      for (int i=0; i<parameters.size(); i++)
-      {
-         Object parameterValue = parameters.get(i);
-         if ( isRestrictionParameterSet(parameterValue) )
-         {
-            query.setParameter( QueryParser.getParameterName(start + i), parameterValue );
-         }
-      }
-   }
-
-   public Map<String, String> getHints()
-   {
-      return hints;
-   }
-
-   public void setHints(Map<String, String> hints)
-   {
-      this.hints = hints;
-   }
-   
-   protected void joinTransaction()
-   {
-      try
-      {
-         Transaction.instance().enlist( getEntityManager() );
-      }
-      catch (SystemException se)
-      {
-         throw new RuntimeException("could not join transaction", se);
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityController.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityController.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityController.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,125 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.io.Serializable;
-
-import org.hibernate.Criteria;
-import org.hibernate.Filter;
-import org.hibernate.HibernateException;
-import org.hibernate.LockMode;
-import org.hibernate.Query;
-import org.hibernate.SQLQuery;
-import org.hibernate.Session;
-
-/**
- * Base class for controller objects that perform
- * persistence operations using Hibernate. Adds
- * convenience methods for access to the Hibernate
- * Session object.
- * 
- * @author Gavin King
- *
- */
-public class HibernateEntityController extends PersistenceController<Session>
-{
-   
-   public Session getSession()
-   {
-      return getPersistenceContext();
-   }
-   
-   public void setSession(Session session)
-   {
-      setPersistenceContext(session);
-   }
-
-   @Override
-   protected String getPersistenceContextName()
-   {
-      return "hibernateSession";
-   }
-   
-   protected Criteria createCriteria(Class clazz)
-   {
-      return getSession().createCriteria(clazz);
-   }
-
-   protected Query createQuery(String hql) throws HibernateException
-   {
-      return getSession().createQuery(hql);
-   }
-
-   protected SQLQuery createSQLQuery(String sql) throws HibernateException
-   {
-      return getSession().createSQLQuery(sql);
-   }
-
-   protected void delete(Object entity) throws HibernateException
-   {
-      getSession().delete(entity);
-   }
-
-   protected Filter enableFilter(String name)
-   {
-      return getSession().enableFilter(name);
-   }
-
-   protected void flush() throws HibernateException
-   {
-      getSession().flush();
-   }
-
-   @SuppressWarnings("deprecation")
-   protected <T> T get(Class<T> clazz, Serializable id, LockMode lockMode) throws HibernateException
-   {
-      return (T) getSession().get(clazz, id, lockMode);
-   }
-
-   protected <T> T get(Class<T> clazz, Serializable id) throws HibernateException
-   {
-      return (T) getSession().get(clazz, id);
-   }
-
-   protected Query getNamedQuery(String name) throws HibernateException
-   {
-      return getSession().getNamedQuery(name);
-   }
-
-   @SuppressWarnings("deprecation")
-   protected <T> T load(Class<T> clazz, Serializable id, LockMode lockMode) throws HibernateException
-   {
-      return (T) getSession().load(clazz, id, lockMode);
-   }
-
-   protected <T> T load(Class<T> clazz, Serializable id) throws HibernateException
-   {
-      return (T) getSession().load(clazz, id);
-   }
-
-   @SuppressWarnings("deprecation")
-   protected void lock(Object entity, LockMode lockMode) throws HibernateException
-   {
-      getSession().lock(entity, lockMode);
-   }
-
-   protected <T> T merge(T entity) throws HibernateException
-   {
-      return (T) getSession().merge(entity);
-   }
-
-   protected void persist(Object entity) throws HibernateException
-   {
-      getSession().persist(entity);
-   }
-
-   @SuppressWarnings("deprecation")
-   protected void refresh(Object entity, LockMode lockMode) throws HibernateException
-   {
-      getSession().refresh(entity, lockMode);
-   }
-
-   protected void refresh(Object entity) throws HibernateException
-   {
-      getSession().refresh(entity);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityHome.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityHome.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityHome.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,122 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.io.Serializable;
-
-import org.hibernate.Session;
-import org.hibernate.TransientObjectException;
-import org.jboss.seam.annotations.Transactional;
-
-/**
- * Base class for Home objects for Hibernate entities.
- * 
- * @author Gavin King
- *
- */
-public class HibernateEntityHome<E> extends Home<Session, E>
-{
-   
-   private static final long serialVersionUID = 6071072408602519385L;
-   
-   @Override
-   public void create()
-   {
-      super.create();
-      if ( getSession()==null )
-      {
-         throw new IllegalStateException("hibernateSession is null");
-      }
-   }
-   
-   @Transactional
-   public boolean isManaged()
-   {
-      return getInstance()!=null && 
-            getSession().contains( getInstance() );
-   }
-   
-   @Transactional
-   public String update()
-   {
-      getSession().flush();
-      updatedMessage();
-      raiseAfterTransactionSuccessEvent();
-      return "updated";
-   }
-   
-   @Transactional
-   public String persist()
-   {
-      getSession().persist( getInstance() );
-      getSession().flush();
-      assignId( getSession().getIdentifier( getInstance() ) );
-      createdMessage();
-      raiseAfterTransactionSuccessEvent();
-      return "persisted";
-   }
-   
-   @Transactional
-   public String remove()
-   {
-      getSession().delete( getInstance() );
-      getSession().flush();
-      deletedMessage();
-      raiseAfterTransactionSuccessEvent();
-      return "removed";
-   }
-    
-    @Transactional
-    @Override
-    public E find()
-    {
-        if (getSession().isOpen()) {
-            E result = loadInstance();
-            if (result==null) {
-                result = handleNotFound();
-            }
-            return result;
-        } else {
-            return null;
-        }
-    }
-
-    protected E loadInstance() 
-    {
-        return (E) getSession().get(getEntityClass(), (Serializable) getId());   
-    }
-
-   @Override
-   protected void joinTransaction()
-   {
-      getSession().isOpen();
-   }
-   
-   public Session getSession()
-   {
-      return getPersistenceContext();
-   }
-   
-   public void setSession(Session session)
-   {
-      setPersistenceContext(session);
-   }
-   
-   @Override
-   protected String getPersistenceContextName()
-   {
-      return "hibernateSession";
-   }
-   
-   @Override
-   protected String getEntityName()
-   {
-      try
-      {
-         return getSession().getEntityName(getInstance());
-      }
-      catch (TransientObjectException e) 
-      {
-         return getSession().getSessionFactory().getClassMetadata(getInstance().getClass()).getEntityName();
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityIdentifier.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityIdentifier.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityIdentifier.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.io.Serializable;
-
-import org.hibernate.Session;
-import org.jboss.seam.persistence.HibernatePersistenceProvider;
-
-public class HibernateEntityIdentifier extends Identifier<Session>
-{
-
-   public HibernateEntityIdentifier(Object entity, Session session)
-   {
-      super(HibernatePersistenceProvider.instance().getBeanClass(entity), session.getIdentifier(entity));
-   }
-   
-   public HibernateEntityIdentifier(Class clazz, Object id)
-   {
-      super(clazz, id);
-   }
-   
-   @Override
-   public Object find(Session session)
-   {
-      if (session == null)
-      {
-         throw new IllegalArgumentException("session must not be null");
-      }
-      return session.get(getClazz(), (Serializable) getId());
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityQuery.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityQuery.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/HibernateEntityQuery.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,210 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.hibernate.Session;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.persistence.QueryParser;
-
-/**
- * A Query object for Hibernate.
- * 
- * @author Gavin King
- *
- */
-public class HibernateEntityQuery<E> extends Query<Session, E>
-{
-
-   private List<E> resultList;
-   private E singleResult;
-   private Long resultCount;
-   
-   private Boolean cacheable;
-   private String cacheRegion;
-   private Integer fetchSize;
-   
-   @Override
-   public void validate()
-   {
-      super.validate();
-      if ( getSession()==null )
-      {
-         throw new IllegalStateException("hibernateSession is null");
-      }
-   }
-
-   @Transactional
-   @Override
-   public List<E> getResultList()
-   {
-      if ( isAnyParameterDirty() )
-      {
-         refresh();
-      }
-      initResultList();
-      return truncResultList(resultList);
-   }
-
-   private void initResultList()
-   {
-      if (resultList==null)
-      {
-         org.hibernate.Query query = createQuery();
-         resultList = query==null ? null : query.list();
-      }
-   }
-   
-   @Override
-   @Transactional
-   public boolean isNextExists()
-   {
-      return resultList!=null && getMaxResults()!=null &&
-            resultList.size() > getMaxResults();
-   }
-   
-   @Transactional
-   @Override
-   public E getSingleResult()
-   {
-      if (isAnyParameterDirty())
-      {
-         refresh();
-      }
-      initSingleResult();
-      return singleResult;
-   }
-
-   private void initSingleResult()
-   {
-      if (singleResult==null)
-      {
-         org.hibernate.Query query = createQuery();
-         singleResult = (E) (query==null ? 
-               null : query.uniqueResult());
-      }
-   }
-
-   @Transactional
-   @Override
-   public Long getResultCount()
-   {
-      if (isAnyParameterDirty())
-      {
-         refresh();
-      }
-      initResultCount();
-      return resultCount;
-   }
-
-   private void initResultCount()
-   {
-      if (resultCount==null)
-      {
-         org.hibernate.Query query = createCountQuery();
-         resultCount = query==null ? 
-               null : (Long) query.uniqueResult();
-      }
-   }
-
-   @Override
-   public void refresh()
-   {
-      super.refresh();
-      resultCount = null;
-      resultList = null;
-      singleResult = null;
-   }
-   
-   public Session getSession()
-   {
-      return getPersistenceContext();
-   }
-
-   public void setSession(Session session)
-   {
-      setPersistenceContext(session);
-   }
-
-   @Override
-   protected String getPersistenceContextName()
-   {
-      return "hibernateSession";
-   }
-   
-   protected org.hibernate.Query createQuery()
-   {
-      parseEjbql();
-      
-      evaluateAllParameters();
-      
-      org.hibernate.Query query = getSession().createQuery( getRenderedEjbql() );
-      setParameters( query, getQueryParameterValues(), 0 );
-      setParameters( query, getRestrictionParameterValues(), getQueryParameterValues().size() );
-      if ( getFirstResult()!=null) query.setFirstResult( getFirstResult() );
-      if ( getMaxResults()!=null) query.setMaxResults( getMaxResults()+1 ); //add one, so we can tell if there is another page
-      if ( getCacheable()!=null ) query.setCacheable( getCacheable() );
-      if ( getCacheRegion()!=null ) query.setCacheRegion( getCacheRegion() );
-      if ( getFetchSize()!=null ) query.setFetchSize( getFetchSize() );
-      return query;
-   }
-   
-   protected org.hibernate.Query createCountQuery()
-   {
-      parseEjbql();
-      
-      evaluateAllParameters();
-      
-      org.hibernate.Query query = getSession().createQuery( getCountEjbql() );
-      setParameters( query, getQueryParameterValues(), 0 );
-      setParameters( query, getRestrictionParameterValues(), getQueryParameterValues().size() );
-      return query;
-   }
-
-   private void setParameters(org.hibernate.Query query, List<Object> parameters, int start)
-   {
-      for (int i=0; i<parameters.size(); i++)
-      {
-         Object parameterValue = parameters.get(i);
-         if ( isRestrictionParameterSet(parameterValue) )
-         {
-            if(parameterValue instanceof Collection){
-               query.setParameterList(QueryParser.getParameterName(start + i), (Collection) parameterValue);
-            }else{
-               query.setParameter( QueryParser.getParameterName(start + i), parameterValue );
-            }
-         }
-      }
-   }
-
-   protected Boolean getCacheable()
-   {
-      return cacheable;
-   }
-
-   protected void setCacheable(Boolean cacheable)
-   {
-      this.cacheable = cacheable;
-   }
-
-   protected String getCacheRegion()
-   {
-      return cacheRegion;
-   }
-
-   protected void setCacheRegion(String cacheRegion)
-   {
-      this.cacheRegion = cacheRegion;
-   }
-
-   protected Integer getFetchSize()
-   {
-      return fetchSize;
-   }
-
-   protected void setFetchSize(Integer fetchSize)
-   {
-      this.fetchSize = fetchSize;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Home.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Home.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Home.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,488 +0,0 @@
-package org.jboss.seam.framework;
-
-import static org.jboss.seam.international.StatusMessage.Severity.INFO;
-
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-/**
- * Base class for components which provide persistence
- * operations to a managed entity instance. This class 
- * may be reused by either configuration or extension, 
- * and may be bound directly to a view, or accessed by 
- * some intermediate Seam component.
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.CONVERSATION)
-public abstract class Home<T, E> extends MutableController<T>
-{
-   private static final long serialVersionUID = -5462396456614090423L;
-   
-   private Object id;
-   protected E instance;
-   private Class<E> entityClass;
-   protected ValueExpression<T> newInstance;
-
-   private ValueExpression deletedMessage;
-   private ValueExpression createdMessage;
-   private ValueExpression updatedMessage;
-   
-   /**
-    * Add a {@link javax.faces.application.FacesMessage} and log a message when 
-    * the entity instance is updated.
-    * 
-    * Utility method to add a {@link javax.faces.application.FacesMessage} from
-    * the Seam managed resource bundle or, if not specified in the resource 
-    * bundle, from {@link #getUpdatedMessage()} and log the entity when the 
-    * managed entity is updated.
-    * 
-    * @see #getUpdatedMessage()
-    * @see #getUpdatedMessageKey()
-    */
-   protected void updatedMessage()
-   {
-      debug("updated entity #0 #1", getEntityClass().getName(), getId());
-      getStatusMessages().addFromResourceBundleOrDefault( INFO, getUpdatedMessageKey(), getUpdatedMessage().getExpressionString() );
-   }
-
-   /**
-    * Add a {@link javax.faces.application.FacesMessage} and log a message when
-    * the entity instance is deleted.
-    * 
-    * Utility method to add a {@link javax.faces.application.FacesMessage} from
-    * the Seam managed resource bundle or, if not specified in the resource
-    * bundle, from {@link #getDeletedMessage()} and log the entity when the 
-    * managed entity is deleted.
-    * 
-    * @see #getDeletedMessage()
-    * @see #getDeletedMessageKey()
-    */
-   protected void deletedMessage()
-   {
-      debug("deleted entity #0 #1", getEntityClass().getName(), getId());
-      getStatusMessages().addFromResourceBundleOrDefault( INFO, getDeletedMessageKey(), getDeletedMessage().getExpressionString() );
-   }
-   
-   /**
-    * Add a {@link javax.faces.application.FacesMessage} and log a message when
-    * the entity instance is created.
-    * 
-    * Utility method to add a {@link javax.faces.application.FacesMessage} from
-    * the Seam managed resource bundle or, if not specified in the resource 
-    * bundle, from {@link #getUpdatedMessage()} and log the entity when the 
-    * managed entity is updated.
-    * 
-    * @see #getCreatedMessage()
-    * @see #getCreatedMessageKey()
-    */
-   protected void createdMessage()
-   {
-      debug("created entity #0 #1", getEntityClass().getName(), getId());
-      getStatusMessages().addFromResourceBundleOrDefault( INFO, getCreatedMessageKey(), getCreatedMessage().getExpressionString() );
-   }
-
-   /**
-    * Run on {@link Home} instantiation to check the Home component is in a 
-    * valid state.
-    * <br />
-    * Validates that the class of the entity to be managed has been specified.
-    */
-   @Create
-   public void create()
-   {
-      if ( getEntityClass()==null )
-      {
-         throw new IllegalStateException("entityClass is null");
-      }
-      initDefaultMessages();
-   }
-   
-   protected void initDefaultMessages()
-   {
-      Expressions expressions = new Expressions();
-      if (createdMessage == null) {
-         createdMessage = expressions.createValueExpression("Successfully created");
-      }
-      if (updatedMessage == null) {
-         updatedMessage = expressions.createValueExpression("Successfully updated");
-      }
-      if (deletedMessage == null) {
-         deletedMessage = expressions.createValueExpression("Successfully deleted");
-      }
-   }
-
-   /**
-    * Get the managed entity, using the id from {@link #getId()} to load it from
-    * the Persistence Context or creating a new instance if the id is not 
-    * defined.
-    * 
-    * @see #getId()
-    */
-   @Transactional
-   public E getInstance()
-   {
-      joinTransaction();
-      if (instance==null)
-      {
-         initInstance();
-      }
-      return instance;
-   }
-   
-   /**
-    * Clear the managed entity (and id), allowing the {@link EntityHome} to be
-    * reused.
-    */
-   public void clearInstance()
-   {
-      setInstance(null);
-      setId(null);
-   }
-
-   /**
-    * Load the instance if the id is defined otherwise create a new instance
-    * <br />
-    * Utility method called by {@link #getInstance()} to load the instance from 
-    * the Persistence Context if the id is defined. Otherwise a new instance is 
-    * created.
-    * 
-    * @see #find()
-    * @see #createInstance()
-    */
-   protected void initInstance()
-   {
-      if ( isIdDefined() )
-      {
-         if ( !isTransactionMarkedRollback() )
-         {
-            //we cache the instance so that it does not "disappear"
-            //after remove() is called on the instance
-            //is this really a Good Idea??
-            setInstance( find() );
-         }
-      }
-      else
-      {
-         setInstance( createInstance() );
-      }
-   }
-   
-   /**
-    * Hook method called to allow the implementation to join the current 
-    * transaction when necessary.
-    */
-   protected void joinTransaction() {}
-   
-   /**
-    * Hook method called by {@link #initInstance()} to allow the implementation 
-    * to load the entity from the Persistence Context.
-    */
-   protected E find()
-   {
-      return null;
-   }
-
-   /**
-    * Utility method called by the framework when no entity is found in the
-    * Persistence Context.
-    */
-   protected E handleNotFound()
-   {
-      throw new EntityNotFoundException( getId(), getEntityClass() );
-   }
-
-   /**
-    * Create a new instance of the entity.
-    * <br />
-    * Utility method called by {@link #initInstance()} to create a new instance 
-    * of the entity.
-    */
-   protected E createInstance()
-   {
-      if (newInstance!=null)
-      {
-         return (E) newInstance.getValue();
-      }
-      else if (getEntityClass()!=null)
-      {
-         try
-         {
-            return getEntityClass().newInstance();
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException(e);
-         }
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   /**
-    * Get the class of the entity being managed.
-    * <br />
-    * If not explicitly specified, the generic type of implementation is used.
-    */
-   public Class<E> getEntityClass()
-   {
-      if (entityClass == null)
-      {
-         Type type = getClass().getGenericSuperclass();
-         if (type instanceof ParameterizedType)
-         {
-            ParameterizedType paramType = (ParameterizedType) type;
-            if (paramType.getActualTypeArguments().length == 2)
-            {
-               // likely dealing with -> new EntityHome<Person>().getEntityClass()
-               if (paramType.getActualTypeArguments()[1] instanceof TypeVariable)
-               {
-                  throw new IllegalArgumentException("Could not guess entity class by reflection");
-               }
-               // likely dealing with -> new Home<EntityManager, Person>() { ... }.getEntityClass()
-               else
-               {
-                  entityClass = (Class<E>) paramType.getActualTypeArguments()[1];
-               }
-            }
-            else
-            {
-               // likely dealing with -> new PersonHome().getEntityClass() where PersonHome extends EntityHome<Person>
-               entityClass = (Class<E>) paramType.getActualTypeArguments()[0];
-            }
-         }
-         else
-         {
-            throw new IllegalArgumentException("Could not guess entity class by reflection");
-         }
-      }
-      return entityClass;
-   }
-
-   /**
-    * Set the class of the entity being managed. 
-    * <br />
-    * Useful for configuring {@link Home} components from 
-    * <code>components.xml</code>.
-    */
-   public void setEntityClass(Class<E> entityClass)
-   {
-      this.entityClass = entityClass;
-   }
-   
-   /**
-    * Get the id of the object being managed.
-    */
-   public Object getId()
-   {
-      return id;
-   }
-
-   /**
-    * Set/change the entity being managed by id.
-    * 
-    * @see #assignId(Object)
-    */
-   public void setId(Object id)
-   {
-      if ( setDirty(this.id, id) ) setInstance(null);
-      this.id = id;
-   }
-   
-   /**
-    * Set the id of entity being managed.
-    * <br />
-    * Does not alter the instance so used if the id of the managed object is 
-    * changed.
-    * 
-    * @see #setId(Object)
-    */
-   protected void assignId(Object id)
-   {
-      setDirty(this.id, id);
-      this.id = id;
-   }
-   
-   /**
-    * Returns true if the id of the object managed is known.
-    */
-   public boolean isIdDefined()
-   {
-      return getId()!=null && !"".equals( getId() );
-   }
-
-   /**
-    * Set/change the entity being managed.
-    */
-   public void setInstance(E instance)
-   {
-      setDirty(this.instance, instance);
-      this.instance = instance;
-   }
-
-   /**
-    * {@link javax.el.ValueExpression} to execute to load a new instance.
-    * <br />
-    * Mainly used when configuring the {@link Home} components in 
-    * <code>components.xml</code>.
-    */
-   public ValueExpression getNewInstance()
-   {
-      return newInstance;
-   }
-
-   /**
-    * {@link javax.el.ValueExpression} to execute to load a new instance.
-    * <br />
-    * Mainly used when configuring the {@link Home} components in 
-    * <code>components.xml</code>.
-    */
-   public void setNewInstance(ValueExpression newInstance)
-   {
-      this.newInstance = newInstance;
-   }
-
-   /**
-    * Message displayed to user when the managed entity is created.
-    */
-   public ValueExpression getCreatedMessage()
-   {
-      return createdMessage;
-   }
-
-   /**
-    * Message displayed to user when the managed entity is created.
-    */
-   public void setCreatedMessage(ValueExpression createdMessage)
-   {
-      this.createdMessage = createdMessage;
-   }
-
-   /**
-    * Message displayed to user when the managed entity is deleted.
-    */
-   public ValueExpression getDeletedMessage()
-   {
-      return deletedMessage;
-   }
-
-   /**
-    * Message displayed to user when the managed entity is deleted.
-    */
-   public void setDeletedMessage(ValueExpression deletedMessage)
-   {
-      this.deletedMessage = deletedMessage;
-   }
-
-   /**
-    * Message displayed to user when the managed entity is updated.
-    */
-   public ValueExpression getUpdatedMessage()
-   {
-      return updatedMessage;
-   }
-
-   /**
-    * Message displayed to user when the managed entity is updated.
-    */
-   public void setUpdatedMessage(ValueExpression updatedMessage)
-   {
-      this.updatedMessage = updatedMessage;
-   }
-   
-   /**
-    * The prefix of the key to look up messages in the Seam managed resource 
-    * bundle.
-    * <br />
-    * By default the simple name of the class suffixed with an underscore.
-    */
-   protected String getMessageKeyPrefix()
-   {
-      String className = getEntityClass().getName();
-      return className.substring( className.lastIndexOf('.') + 1 ) + '_';
-   }
-   
-   /**
-    * The key to look up in the Seam managed resource bundle the message
-    * displayed when the managed entity is created. 
-    * <br />
-    * By default the {@link #getMessageKeyPrefix()} suffixed with created.
-    */
-   protected String getCreatedMessageKey()
-   {
-      return getMessageKeyPrefix() + "created";
-   }
-   
-   /**
-    * The key to look up in the Seam managed resource bundle the message
-    * displayed when the managed entity is updated. 
-    * <br />
-    * By default the {@link #getMessageKeyPrefix()} suffixed with updated.
-    */
-   protected String getUpdatedMessageKey()
-   {
-      return getMessageKeyPrefix() + "updated";
-   }
-   
-   /**
-    * The key to look up in the Seam managed resource bundle the message
-    * displayed when the managed entity is deleted. 
-    * <br />
-    * By default the {@link #getMessageKeyPrefix()} suffixed with deleted.
-    */
-   protected String getDeletedMessageKey()
-   {
-      return getMessageKeyPrefix() + "deleted";
-   }
-   
-   /**
-    * Raise events when a CRUD operation succeeds.
-    * <br />
-    * Utility method to raise two events: an event of type 
-    * <code>org.jboss.seam.afterTransactionSuccess</code> is raised, along with 
-    * an event of type 
-    * <code>org.jboss.seam.afterTransactionSuccess.&lt;entityName&gt;</code>.
-    */
-   protected void raiseAfterTransactionSuccessEvent()
-   {
-      raiseTransactionSuccessEvent("org.jboss.seam.afterTransactionSuccess");
-      String simpleEntityName = getSimpleEntityName();
-      if (simpleEntityName != null)
-      {
-         raiseTransactionSuccessEvent("org.jboss.seam.afterTransactionSuccess." + simpleEntityName);
-      }
-   }
-   
-   /**
-    * The simple name of the managed entity
-    */
-   protected String getSimpleEntityName()
-   {
-      String name = getEntityName();
-      if (name != null)
-      {
-         return name.lastIndexOf(".") > 0 && name.lastIndexOf(".") < name.length()  ? name.substring(name.lastIndexOf(".") + 1, name.length()) : name;
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   /**
-    * Hook method to get the name of the managed entity
-    */
-   protected abstract String getEntityName();
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Identifier.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Identifier.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Identifier.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,57 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.io.Serializable;
-
-/**
- * Wrapper class that identifies an entity
- * 
- * @author Pete Muir
- *
- */
-public abstract class Identifier<T> implements Serializable
-{
-
-   public Identifier(Class clazz, Object id)
-   {
-      if (clazz == null || id == null)
-      {
-         throw new IllegalArgumentException("Id and clazz must not be null");
-      }
-      this.clazz = clazz;
-      this.id = id;
-   }
-   
-   private Class clazz;
-   private Object id;
-
-   public Class getClazz()
-   {
-      return clazz;
-   }
-   
-   public Object getId()
-   {
-      return id;
-   }
-
-   @Override
-   public boolean equals(Object other)
-   {
-      if (other instanceof Identifier)
-      {
-         Identifier that = (Identifier) other; 
-         if (id == null || clazz == null)
-         {
-            throw new IllegalArgumentException("Class and Id must not be null");
-         }
-         else 
-         {
-            return this.getId().equals(that.getId()) && this.getClazz().equals(that.getClazz());
-         }
-      }
-      return false;
-   }
-   
-   public abstract Object find(T persistenceContext);
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/MutableController.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/MutableController.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/MutableController.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,55 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.io.Serializable;
-
-import org.jboss.seam.core.Mutable;
-
-/**
- * Base class for controllers which implement the
- * Mutable interface.
- * 
- * @author Gavin King
- *
- */
-public abstract class MutableController<T> 
-      extends PersistenceController<T> 
-      implements Serializable, Mutable
-{
-   //copy/paste from AbstractMutable
-   
-   private transient boolean dirty;
-
-   public boolean clearDirty()
-   {
-      boolean result = dirty;
-      dirty = false;
-      return result;
-   }
-   
-   /**
-    * Set the dirty flag if the value has changed.
-    * Call whenever a subclass attribute is updated.
-    * 
-    * @param oldValue the old value of an attribute
-    * @param newValue the new value of an attribute
-    * @return true if the newValue is not equal to the oldValue
-    */
-   protected <U> boolean setDirty(U oldValue, U newValue)
-   {
-      boolean attributeDirty = oldValue!=newValue && (
-            oldValue==null || 
-            !oldValue.equals(newValue) 
-         );
-      dirty = dirty || attributeDirty;
-      return attributeDirty;
-   }
-   
-   /**
-    * Set the dirty flag.
-    */
-   protected void setDirty()
-   {
-      dirty = true;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/MutableEntityController.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/MutableEntityController.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/MutableEntityController.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,85 +0,0 @@
-package org.jboss.seam.framework;
-
-import javax.persistence.EntityManager;
-import javax.persistence.LockModeType;
-import javax.persistence.Query;
-
-/**
- * Base class for controller objects that perform
- * persistence operations using JPA. Adds
- * convenience methods for access to the JPA
- * EntityManager.
- * 
- * @author Gavin King
- *
- */
-public class MutableEntityController extends MutableController<EntityManager>
-{
-   
-   public EntityManager getEntityManager()
-   {
-      return getPersistenceContext();
-   }
-   
-   public void setEntityManager(EntityManager entityManager)
-   {
-      setPersistenceContext(entityManager);
-   }
-
-   @Override
-   protected String getPersistenceContextName()
-   {
-      return "entityManager";
-   }
-   
-   protected Query createNamedQuery(String name)
-   {
-      return getEntityManager().createNamedQuery(name);
-   }
-
-   protected Query createQuery(String ejbql)
-   {
-      return getEntityManager().createQuery(ejbql);
-   }
-
-   protected <T> T find(Class<T> clazz, Object id)
-   {
-      return getEntityManager().find(clazz, id);
-   }
-
-   protected void flush()
-   {
-      getEntityManager().flush();
-   }
-
-   protected <T> T getReference(Class<T> clazz, Object id)
-   {
-      return getEntityManager().getReference(clazz, id);
-   }
-
-   protected void lock(Object entity, LockModeType lockMode)
-   {
-      getEntityManager().lock(entity, lockMode);
-   }
-
-   protected <T> T merge(T entity)
-   {
-      return getEntityManager().merge(entity);
-   }
-
-   protected void persist(Object entity)
-   {
-      getEntityManager().persist(entity);
-   }
-
-   protected void refresh(Object entity)
-   {
-      getEntityManager().refresh(entity);
-   }
-
-   protected void remove(Object entity)
-   {
-      getEntityManager().remove(entity);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/PersistenceController.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/PersistenceController.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/PersistenceController.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,32 +0,0 @@
-package org.jboss.seam.framework;
-
-
-/**
- * Base class for controller objects which require a persistence
- * context object.
- * 
- * @author Gavin King
- *
- * @param <T> the persistence context class (eg. Session or EntityManager)
- */
-public abstract class PersistenceController<T> extends Controller
-{
-   private transient T persistenceContext;
-   
-   public T getPersistenceContext()
-   {
-      if (persistenceContext==null)
-      {
-         persistenceContext = (T) getComponentInstance( getPersistenceContextName() );
-      }
-      return persistenceContext;
-   }
-
-   public void setPersistenceContext(T persistenceContext)
-   {
-      this.persistenceContext = persistenceContext;
-   }
-
-   protected abstract String getPersistenceContextName();
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Query.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Query.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/Query.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,630 +0,0 @@
-package org.jboss.seam.framework;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.faces.model.DataModel;
-
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.faces.DataModels;
-import org.jboss.seam.persistence.QueryParser;
-
-/**
- * Base class for components which manage a query
- * result set. This class may be reused by either
- * configuration or extension, and may be bound
- * directly to a view, or accessed by some
- * intermediate Seam component.
- * 
- * @author Gavin King
- *
- */
-public abstract class Query<T, E> 
-      extends PersistenceController<T> //TODO: extend MutableController!
-{
-   private static final Pattern SUBJECT_PATTERN = Pattern.compile("^select\\s+((distinct)?\\s?\\w+(?:\\s*\\.\\s*\\w+)?)(?:\\s,\\s*(\\w+(?:\\s*\\.\\s*\\w+)?))?\\s+from", Pattern.CASE_INSENSITIVE); 
-   private static final Pattern FROM_PATTERN = Pattern.compile("(^|\\s)(from)\\s",       Pattern.CASE_INSENSITIVE);
-   private static final Pattern WHERE_PATTERN = Pattern.compile("\\s(where)\\s",         Pattern.CASE_INSENSITIVE);
-   private static final Pattern ORDER_PATTERN = Pattern.compile("\\s(order)(\\s)+by\\s", Pattern.CASE_INSENSITIVE);
-   private static final Pattern GROUP_PATTERN = Pattern.compile("\\s(group)(\\s)+by\\s", Pattern.CASE_INSENSITIVE);
-
-   private static final Pattern ORDER_COLUMN_PATTERN = Pattern.compile("^\\w+(\\.\\w+)*$");
-
-   private static final String DIR_ASC = "asc";
-   private static final String DIR_DESC = "desc";
-   private static final String LOGIC_OPERATOR_AND = "and";
-   private static final String LOGIC_OPERATOR_OR = "or";
-
-   private String ejbql;
-   private Integer firstResult;
-   private Integer maxResults;
-   private List<ValueExpression> restrictions = new ArrayList<ValueExpression>(0);
-   private String order;
-   private String orderColumn;
-   private String orderDirection;
-   private String restrictionLogicOperator;
-   private String groupBy;
-   
-   private boolean useWildcardAsCountQuerySubject = true;
-   private DataModel dataModel;
-   
-   private String parsedEjbql;
-   private List<ValueExpression> queryParameters;
-   private List<String> parsedRestrictions;
-   private List<ValueExpression> restrictionParameters;
-   
-   private List<Object> queryParameterValues;
-   private List<Object> restrictionParameterValues;
-   
-   public abstract List<E> getResultList();
-   public abstract E getSingleResult();
-   public abstract Long getResultCount();
-
-   @Create
-   public void validate()
-   {
-      if ( getEjbql()==null )
-      {
-         throw new IllegalStateException("ejbql is null");
-      }
-   }
-   
-   /**
-    * Wrap the result set in a JSF {@link DataModel}
-    * 
-    * Delegates to {@link DataModels#getDataModel(Query)}
-    * 
-    */
-   @Transactional
-   public DataModel getDataModel()
-   {
-      if (dataModel==null)
-      {
-         dataModel = DataModels.instance().getDataModel(this);
-      }
-      return dataModel;
-   }
-   
-   /**
-    * Get the selected row of the JSF {@link DataModel}
-    * 
-    */
-   public E getDataModelSelection()
-   {
-      return (E) getDataModel().getRowData();
-   }
-   
-   /**
-    * Get the index of the selected row of the JSF {@link DataModel}
-    * 
-    */
-   public int getDataModelSelectionIndex()
-   {
-      return getDataModel().getRowIndex();
-   }
-   
-   
-   public void refresh()
-   {
-      clearDataModel();
-   }
-   
-   /**
-    * Move the result set cursor to the beginning of the last page
-    * 
-    */
-   @Transactional
-   public void last()
-   {
-      setFirstResult( getLastFirstResult().intValue() );
-   }
-   
-   /**
-    * Move the result set cursor to the beginning of the next page
-    * 
-    */
-   public void next()
-   {
-      setFirstResult( getNextFirstResult() );
-   }
-
-   /**
-    * Move the result set cursor to the beginning of the previous page
-    * 
-    */
-   public void previous()
-   {
-      setFirstResult( getPreviousFirstResult() );
-   }
-   
-   /**
-    * Move the result set cursor to the beginning of the first page
-    * 
-    */
-   public void first()
-   {
-      setFirstResult(0);
-   }
-   
-   protected void clearDataModel()
-   {
-      dataModel = null;
-   }
-
-   /**
-    * Get the index of the first result of the last page
-    * 
-    */
-   @Transactional
-   public Long getLastFirstResult()
-   {
-      Integer pc = getPageCount();
-      return pc==null ? null : ( pc.longValue()-1 ) * getMaxResults();
-   }
-   
-   /**
-    * Get the index of the first result of the next page
-    * 
-    */
-   public int getNextFirstResult()
-   {
-      Integer fr = getFirstResult();
-      return ( fr==null ? 0 : fr ) + getMaxResults();
-   }
-
-   /**
-    * Get the index of the first result of the previous page
-    * 
-    */
-   public int getPreviousFirstResult()
-   {
-      Integer fr = getFirstResult();
-      Integer mr = getMaxResults();
-      return mr >= ( fr==null ? 0 : fr ) ? 
-               0 : fr - mr;
-   }
-   
-   /**
-    * Get the total number of pages
-    * 
-    */
-   @Transactional
-   public Integer getPageCount()
-   {
-      if ( getMaxResults()==null )
-      {
-         return null;
-      }
-      else
-      {
-         int rc = getResultCount().intValue();
-         int mr = getMaxResults().intValue();
-         int pages = rc / mr;
-         return rc % mr == 0 ? pages : pages+1;
-      }
-   }
-          
-   
-   protected void parseEjbql()
-   {
-      if (parsedEjbql==null || parsedRestrictions==null)
-      {
-         QueryParser qp = new QueryParser( getEjbql() );
-         queryParameters = qp.getParameterValueBindings();
-         parsedEjbql = qp.getEjbql();
-         
-         List<ValueExpression> restrictionFragments = getRestrictions();
-         parsedRestrictions = new ArrayList<String>( restrictionFragments.size() );
-         restrictionParameters = new ArrayList<ValueExpression>( restrictionFragments.size() );         
-         for ( ValueExpression restriction: restrictionFragments )
-         {
-            QueryParser rqp = new QueryParser( restriction.getExpressionString(), queryParameters.size() + restrictionParameters.size() );            
-            if ( rqp.getParameterValueBindings().size()!=1 ) 
-            {
-               throw new IllegalArgumentException("there should be exactly one value binding in a restriction: " + restriction);
-            }            
-            parsedRestrictions.add( rqp.getEjbql() );
-            restrictionParameters.addAll( rqp.getParameterValueBindings() );
-         }
-         
-      }
-   }
-   
-   protected String getRenderedEjbql()
-   {
-      StringBuilder builder = new StringBuilder().append(parsedEjbql);
-      
-      for (int i=0; i<getRestrictions().size(); i++)
-      {
-         Object parameterValue = restrictionParameters.get(i).getValue();
-         if ( isRestrictionParameterSet(parameterValue) )
-         {
-            if ( WHERE_PATTERN.matcher(builder).find() )
-            {
-               builder.append(" ").append(getRestrictionLogicOperator()).append(" ");
-            }
-            else
-            {
-               builder.append(" where ");
-            }
-            builder.append( parsedRestrictions.get(i) );
-         }
-      }
-      
-      if (getGroupBy()!=null) {
-          builder.append(" group by ").append(getGroupBy());
-      }
-
-      if (getOrder()!=null) {
-          builder.append(" order by ").append( getOrder() );
-      }
-      
-      return builder.toString();
-   }
-   
-   protected boolean isRestrictionParameterSet(Object parameterValue)
-   {
-      return parameterValue != null && !"".equals(parameterValue) && (parameterValue instanceof Collection ? !((Collection) parameterValue).isEmpty() : true);
-   }
-
-   /**
-    * Return the ejbql to used in a count query (for calculating number of
-    * results)
-    * @return String The ejbql query
-    */
-   protected String getCountEjbql()
-   {
-      String ejbql = getRenderedEjbql();
-      
-      Matcher fromMatcher = FROM_PATTERN.matcher(ejbql);
-      if ( !fromMatcher.find() )
-      {
-         throw new IllegalArgumentException("no from clause found in query");
-      }
-      int fromLoc = fromMatcher.start(2);
-      
-      // TODO can we just create a protected method that builds the query w/o the order by and group by clauses?
-      Matcher orderMatcher = ORDER_PATTERN.matcher(ejbql);
-      int orderLoc = orderMatcher.find() ? orderMatcher.start(1) : ejbql.length();
-
-      Matcher groupMatcher = GROUP_PATTERN.matcher(ejbql);
-      int groupLoc = groupMatcher.find() ? groupMatcher.start(1) : orderLoc;
-
-      Matcher whereMatcher = WHERE_PATTERN.matcher(ejbql);
-      int whereLoc = whereMatcher.find() ? whereMatcher.start(1) : groupLoc;
-
-      String subject;
-      if (useWildcardAsCountQuerySubject) {
-         subject = "*";
-      }
-      else if (getGroupBy() != null) {
-          subject = "distinct " + getGroupBy();
-       }
-      // to be JPA-compliant, we need to make this query like "select count(u) from User u"
-      // however, Hibernate produces queries some databases cannot run when the primary key is composite
-      else {
-          Matcher subjectMatcher = SUBJECT_PATTERN.matcher(ejbql);
-          if ( subjectMatcher.find() )
-          {
-             subject = subjectMatcher.group(1);
-          }
-          else
-          {
-             throw new IllegalStateException("invalid select clause for query");
-          }
-      }
-      
-      return new StringBuilder(ejbql.length() + 15).append("select count(").append(subject).append(") ").
-         append(ejbql.substring(fromLoc, whereLoc).replace("join fetch", "join")).
-         append(ejbql.substring(whereLoc, groupLoc)).toString().trim();
-   }
-   
-   public String getEjbql()
-   {
-      return ejbql;
-   }
-
-   /**
-    * Set the ejbql to use.  Calling this causes the ejbql to be reparsed and
-    * the query to be refreshed
-    */
-   public void setEjbql(String ejbql)
-   {
-      this.ejbql = ejbql;
-      parsedEjbql = null;
-      refresh();
-   }
-
-   /**
-    * Returns the index of the first result of the current page
-    */
-   public Integer getFirstResult()
-   {
-      return firstResult;
-   }
-   
-   /**
-    * Returns true if the previous page exists
-    */
-   public boolean isPreviousExists()
-   {
-      return getFirstResult()!=null && getFirstResult()!=0;
-   }
-
-   /**
-    * Returns true if next page exists
-    */
-   public abstract boolean isNextExists();
-
-   /**
-    * Returns true if the query is paginated, revealing
-    * whether navigation controls are needed.
-    */
-   public boolean isPaginated() {
-      return isNextExists() || isPreviousExists();
-   }
-   
-   /**
-    * Set the index at which the page to display should start
-    */
-   public void setFirstResult(Integer firstResult)
-   {
-      this.firstResult = firstResult;
-      refresh();
-   }
-
-   /**
-    * The page size
-    */
-   public Integer getMaxResults()
-   {
-       return maxResults;
-   }
-
-   public void setMaxResults(Integer maxResults)
-   {
-      this.maxResults = maxResults;
-      refresh();
-   }
-
-   /**
-    * List of restrictions to apply to the query.
-    * 
-    * For a query such as 'from Foo f' a restriction could be 
-    * 'f.bar = #{foo.bar}'
-    */
-   public List<ValueExpression> getRestrictions()
-   {
-      return restrictions;
-   }
-
-   /**
-    * Calling setRestrictions causes the restrictions to be reparsed and the 
-    * query refreshed
-    */
-   public void setRestrictions(List<ValueExpression> restrictions)
-   {
-      this.restrictions = restrictions;
-      parsedRestrictions = null;
-      refresh();
-   }
-
-   /**
-    * A convenience method for registering the restrictions from Strings. This
-    * method is primarily intended to be used from Java, not to expose a bean
-    * property for component configuration. Use setRestrictions() for the later.
-    */
-   public void setRestrictionExpressionStrings(List<String> expressionStrings)
-   {
-      Expressions expressions = new Expressions();
-      List<ValueExpression> restrictionVEs = new ArrayList<ValueExpression>(expressionStrings.size());
-      for (String expressionString : expressionStrings)
-      {
-         restrictionVEs.add(expressions.createValueExpression(expressionString));
-      }
-      setRestrictions(restrictionVEs);
-   }
-   
-   public List<String> getRestrictionExpressionStrings()
-   {
-      List<String> expressionStrings = new ArrayList<String>();
-      for (ValueExpression restriction : getRestrictions())
-      {
-         expressionStrings.add(restriction.getExpressionString());
-      }
-      return expressionStrings;
-   }
-   
-    public String getGroupBy() {
-        return groupBy;
-    }
-    
-    public void setGroupBy(String groupBy) {
-        this.groupBy = groupBy;
-    }
-    
-   /**
-    * The order clause of the query
-    */
-   
-   public String getOrder() {
-       String column = getOrderColumn();
-
-       if (column == null) {
-           return order;
-       }
-       
-       String direction = getOrderDirection();
-       
-       if (direction == null) {
-           return column;
-       } else {
-           return column + ' ' + direction;
-       }   
-   }
-
-   public void setOrder(String order)
-   {      
-       this.order = order;
-       refresh();
-   }
-   
-   public String getOrderDirection() {
-       return orderDirection;
-   }
-
-   public void setOrderDirection(String orderDirection) {
-       this.orderDirection = sanitizeOrderDirection(orderDirection);
-   }
-   
-   private String sanitizeOrderDirection(String direction) {
-       if (direction == null || direction.length()==0) {
-           return null;
-       } else if (direction.equalsIgnoreCase(DIR_ASC)) {
-           return DIR_ASC;
-       } else if (direction.equalsIgnoreCase(DIR_DESC)) {
-           return DIR_DESC;
-       } else {
-           throw new IllegalArgumentException("invalid order direction");
-       }
-   }
-
-   public String getOrderColumn() {
-       return orderColumn;
-   }
-
-   public void setOrderColumn(String orderColumn) {
-       this.orderColumn = sanitizeOrderColumn(orderColumn);
-   }
-
-   private String sanitizeOrderColumn(String columnName) {
-       if (columnName == null || columnName.trim().length() == 0) {
-           return null;
-       } else if (ORDER_COLUMN_PATTERN.matcher(columnName).find()) {
-           return columnName;
-       } else {
-           throw new IllegalArgumentException("invalid order column (\"" + columnName + "\" must match the regular expression \"" + ORDER_COLUMN_PATTERN + "\")");
-       }
-   }
-   
-   public String getRestrictionLogicOperator()
-   {
-      return restrictionLogicOperator != null ? restrictionLogicOperator : LOGIC_OPERATOR_AND;
-   }
-   
-   public void setRestrictionLogicOperator(String operator)
-   {
-      restrictionLogicOperator = sanitizeRestrictionLogicOperator(operator);
-   }
-   
-   private String sanitizeRestrictionLogicOperator(String operator) {
-      if (operator == null || operator.trim().length() == 0)
-      {
-         return LOGIC_OPERATOR_AND;
-      }
-      if (!(LOGIC_OPERATOR_AND.equals(operator) || LOGIC_OPERATOR_OR.equals(operator)))
-      {
-         throw new IllegalArgumentException("Invalid restriction logic operator: " + operator);
-      }
-      else
-      {
-         return operator;
-      }  
-   }
-   protected List<ValueExpression> getQueryParameters()
-   {
-      return queryParameters;
-   }
-   
-   protected List<ValueExpression> getRestrictionParameters()
-   {
-      return restrictionParameters;
-   }
-   
-   private static boolean isAnyParameterDirty(List<ValueExpression> valueBindings, List<Object> lastParameterValues)
-   {
-      if (lastParameterValues==null) return true;
-      for (int i=0; i<valueBindings.size(); i++)
-      {
-         Object parameterValue = valueBindings.get(i).getValue();
-         Object lastParameterValue = lastParameterValues.get(i);
-         //treat empty strings as null, for consistency with isRestrictionParameterSet()
-         if ( "".equals(parameterValue) ) parameterValue = null;
-         if ( "".equals(lastParameterValue) ) lastParameterValue = null;
-         if ( parameterValue!=lastParameterValue && ( parameterValue==null || !parameterValue.equals(lastParameterValue) ) )
-         {
-            return true;
-         }
-      }
-      return false;
-   }
-   
-   private static List<Object> getParameterValues(List<ValueExpression> valueBindings)
-   {
-      List<Object> values = new ArrayList<Object>( valueBindings.size() );
-      for (int i=0; i<valueBindings.size(); i++)
-      {
-         values.add( valueBindings.get(i).getValue() );
-      }
-      return values;
-   }
-   
-   protected void evaluateAllParameters()
-   {
-      setQueryParameterValues( getParameterValues( getQueryParameters() ) );
-      setRestrictionParameterValues( getParameterValues( getRestrictionParameters() ) );
-   }
-   
-   protected boolean isAnyParameterDirty()
-   {
-      return isAnyParameterDirty( getQueryParameters(), getQueryParameterValues() )
-            || isAnyParameterDirty( getRestrictionParameters(), getRestrictionParameterValues() );
-   }
-   
-   protected List<Object> getQueryParameterValues()
-   {
-      return queryParameterValues;
-   }
-   
-   protected void setQueryParameterValues(List<Object> queryParameterValues)
-   {
-      this.queryParameterValues = queryParameterValues;
-   }
-   
-   protected List<Object> getRestrictionParameterValues()
-   {
-      return restrictionParameterValues;
-   }
-   
-   protected void setRestrictionParameterValues(List<Object> restrictionParameterValues)
-   {
-      this.restrictionParameterValues = restrictionParameterValues;
-   }
-   protected List<E> truncResultList(List<E> results)
-   {
-      Integer mr = getMaxResults();
-      if ( mr!=null && results.size() > mr )
-      {
-         return results.subList(0, mr);
-      }
-      else
-      {
-         return results;
-      }
-   }
-
-   protected boolean isUseWildcardAsCountQuerySubject() {
-      return useWildcardAsCountQuerySubject;
-   }
-
-   protected void setUseWildcardAsCountQuerySubject(boolean useCompliantCountQuerySubject) {
-       this.useWildcardAsCountQuerySubject = useCompliantCountQuerySubject;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/framework/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,9 +0,0 @@
-/**
- * A framework for data access in Seam. Components in
- * this package my be reused either by extension or
- * by configuration.
- */
- at Namespace(value="http://jboss.com/products/seam/framework", prefix="org.jboss.seam.core.framework")
-package org.jboss.seam.framework;
-
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/ComponentDescriptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/ComponentDescriptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/ComponentDescriptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,233 +0,0 @@
-package org.jboss.seam.init;
-
-import java.util.Comparator;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.security.permission.PermissionResolver;
-import org.jboss.seam.web.AbstractResource;
-
-/**
- * Meta-data about a Seam component.
- * 
- * @author Norman Richards
- *
- */
-public class ComponentDescriptor implements Comparable<ComponentDescriptor>
-{
-    protected String name;
-    protected Class<?> componentClass;
-    protected ScopeType scope;
-    protected String jndiName;
-    protected Boolean installed;
-    protected Boolean autoCreate;
-    protected Boolean startup;
-    protected String[] startupDepends;
-    protected Integer precedence;
-
-    /**
-     * For components.xml
-     */
-    public ComponentDescriptor(String name, Class<?> componentClass, ScopeType scope,
-            Boolean autoCreate, Boolean startup, String[] startupDepends, String jndiName, Boolean installed, Integer precedence)
-    {
-        this.name = name;
-        this.componentClass = componentClass;
-        this.scope = scope;
-        this.jndiName = jndiName;
-        this.installed = installed;
-        this.autoCreate = autoCreate;
-        this.precedence = precedence;
-        this.startup = startup;
-        this.startupDepends = startupDepends;
-    }
-
-    /**
-     * For a scanned role
-     */
-    public ComponentDescriptor(String name, Class<?> componentClass, ScopeType scope)
-    {
-        this.name = name;
-        this.componentClass = componentClass;
-        this.scope = scope;
-    }
-
-    /**
-     * For a scanned default role
-     */
-    public ComponentDescriptor(Class componentClass)
-    {
-        this.componentClass = componentClass;
-    }
-
-    /**
-     * For built-ins with special rules
-     */
-    public ComponentDescriptor(Class componentClass, Boolean installed)
-    {
-        this.componentClass = componentClass;
-        this.installed = installed;
-
-    }
-
-    public String getName()
-    {
-        return name == null ? Seam.getComponentName(componentClass) : name;
-    }
-
-    public ScopeType getScope()
-    {
-        return scope == null ? Seam.getComponentScope(componentClass) : scope;
-    }
-
-    public Class getComponentClass()
-    {
-        return componentClass;
-    }
-
-    public String getJndiName()
-    {
-        return jndiName;
-    }
-    
-    public boolean isStartup()
-    {
-       return startup!=null ? startup : componentClass.isAnnotationPresent(Startup.class);
-    }
-
-    public boolean isAutoCreate()
-    {
-        return autoCreate!=null ? autoCreate : isAutoCreateAnnotationPresent();
-    }
-
-    private boolean isAutoCreateAnnotationPresent()
-    {
-        if (componentClass.isAnnotationPresent(AutoCreate.class)) {
-           return true;
-        }
-   
-        Package pkg = componentClass.getPackage();
-        return pkg!=null && pkg.isAnnotationPresent(AutoCreate.class);
-    }
-
-    public String[] getStartupDependencies()
-    {
-        if (startupDepends != null && startupDepends.length > 0) {
-           return startupDepends;
-        }
-        Startup startup = componentClass.getAnnotation(Startup.class);
-        if (startup != null)
-        {
-            return startup.depends();
-        }
-        return new String[0];
-    }
-
-   public String[] getDependencies()
-    {
-        Install install = componentClass.getAnnotation(Install.class);
-        if (install == null)
-        {
-            return null;
-        }
-        return install.dependencies();
-    }
-
-    public Class[] getGenericDependencies()
-    {
-        
-        Install install = componentClass.getAnnotation(Install.class);
-        if (install == null)
-        {
-            return null;
-        }
-        return install.genericDependencies();
-    }
-
-    public String[] getClassDependencies() 
-    {
-        Install install = componentClass.getAnnotation(Install.class);
-        if (install == null)
-        {
-            return null;
-        }
-        return install.classDependencies();  
-    }
-
-    public boolean isInstalled()
-    {
-        if (installed != null)
-        {
-            return installed;
-        }
-        Install install = componentClass.getAnnotation(Install.class);
-        if (install == null)
-        {
-            return true;
-        }
-        return install.debug() ? Init.instance().isDebug() : install.value();
-    }
-
-    public int getPrecedence()
-    {
-        if (precedence != null)
-        {
-            return precedence;
-        }
-        Install install = componentClass.getAnnotation(Install.class);
-        if (install == null)
-        {
-            return Install.APPLICATION;
-        }
-        return install.precedence();
-    }
-
-    public int compareTo(ComponentDescriptor other)
-    {
-        return other.getPrecedence() - getPrecedence();
-    }
-
-    public boolean isFilter()
-    {
-        if (javax.servlet.Filter.class.isAssignableFrom(componentClass))
-        {
-           for (Class clazz = componentClass; !Object.class.equals(clazz); clazz = clazz.getSuperclass())
-           {
-              if (clazz.isAnnotationPresent(org.jboss.seam.annotations.web.Filter.class))
-              {
-                 return true;
-              }
-           }
-        }
-        return false;
-    }
-
-    public boolean isResourceProvider()
-    {
-        return AbstractResource.class.isAssignableFrom(componentClass);
-    }
-    
-    public boolean isPermissionResolver()
-    {
-       return PermissionResolver.class.isAssignableFrom(componentClass);
-    }
-    
-    @Override
-    public String toString()
-    {
-        return "ComponentDescriptor(" + getName() + ":" + getComponentClass() + ')';
-    }
-            
-    public static class PrecedenceComparator    
-         implements Comparator<ComponentDescriptor>
-    {               
-        public int compare(ComponentDescriptor obj1, ComponentDescriptor obj2) 
-        {        
-            return obj2.getPrecedence() - obj1.getPrecedence();
-        }
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/DependencyManager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/DependencyManager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/DependencyManager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,271 +0,0 @@
-package org.jboss.seam.init;
-
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-/**
- * Evaluates component dependencies to determine which
- * components are installed.
- * 
- * @author Norman Richards
- *
- */
-public class DependencyManager 
-{
-    private Map<String, Set<ComponentDescriptor>> componentDescriptors;
-    private Set<ComponentDescriptor> currentTestSet;
-    private Set<ComponentDescriptor> installedSet;    
-
-    public DependencyManager(Map<String, Set<ComponentDescriptor>> componentDescriptors) 
-    {
-        this.componentDescriptors = new HashMap<String, Set<ComponentDescriptor>>(componentDescriptors);
-    }
-    
-    public Set<ComponentDescriptor> installedSet()
-    {
-        computeInstallSet();
-        return installedSet;        
-    }
-    
-    private static final Comparator<ComponentDescriptor> ORDER = new Comparator<ComponentDescriptor>() 
-    { 
-       public int compare(ComponentDescriptor x, ComponentDescriptor y) 
-       { 
-          return x.getName().compareTo( y.getName() ); 
-       } 
-    };
-        
-    private void computeInstallSet() 
-    {
-        installedSet = new TreeSet<ComponentDescriptor>(ORDER);
-        Set<String> keys = componentDescriptors.keySet();
-        for (String key: keys) {
-            currentTestSet = new HashSet<ComponentDescriptor>();            
-            
-            if (tryToInstall(key)) {
-                installedSet.addAll(currentTestSet);
-            }
-            
-            currentTestSet = null;            
-        }        
-    }
-    
-    private boolean tryToInstall(String key) 
-    {
-        Set<ComponentDescriptor> descriptors = componentDescriptors.get(key);
-        if (descriptors == null) 
-        {
-            return false;
-        }
-        
-        for (ComponentDescriptor descriptor : descriptors) 
-        {
-            
-            Set<ComponentDescriptor> saved = new HashSet<ComponentDescriptor>(currentTestSet);
-            if (tryToInstall(descriptor)) 
-            {                
-                return true;
-            } 
-            else 
-            {               
-                currentTestSet = saved;
-            }
-            
-        }
-        
-        return false;
-    }
-    
-
-    private boolean tryToInstall(ComponentDescriptor descriptor) 
-    {        
-        if (isInInstallSet(descriptor.getName())) 
-        {            
-            return true;
-        }
-        
-        currentTestSet.add(descriptor);
-        
-        return checkAllDependencies(descriptor);
-    }
-    
-    private boolean checkAllDependencies(ComponentDescriptor descriptor) 
-    {
-        return descriptor.isInstalled() &&
-               checkClassDependencies(descriptor) &&
-               checkComponentDependencies(descriptor) &&
-               checkGenericDependencies(descriptor);     
-    }
-    
-    
-    private boolean checkComponentDependencies(ComponentDescriptor descriptor) 
-    {
-        String[] dependencies = descriptor.getDependencies();
-        if (dependencies == null) 
-        { 
-           return true;
-        }
-        
-        for (String componentName: dependencies) 
-        {
-            if (!tryToInstall(componentName)) 
-            {
-                return false;
-            }
-        }
-        
-        return true;
-    }
-
-
-    private boolean checkClassDependencies(ComponentDescriptor descriptor) 
-    {
-        String[] classDependencies = descriptor.getClassDependencies();
-        
-        if (classDependencies == null) 
-        {
-            return true;   
-        }
-            
-        for (String className: classDependencies) 
-        {   
-            try 
-            {   
-                descriptor.getComponentClass().getClassLoader().loadClass(className);
-            }
-            catch (NoClassDefFoundError e)
-            {
-               return false;
-            }
-            catch (Exception e)
-            {
-                return false;                 
-            }
-        }
-
-        return true;
-    }
-    
-    private boolean checkGenericDependencies(ComponentDescriptor descriptor) 
-    {
-        Class[] dependencies = descriptor.getGenericDependencies();
-        if (dependencies == null) 
-        {
-            return true;
-        }
-        
-        for (Class dependency: dependencies) 
-        {
-            if (!isInInstallSet(dependency)) 
-            {                                
-                Set<String> searchList = findPotentialComponents(dependency);
-                               
-                if (!tryToSatisfyDependencyUsing(dependency, searchList)) 
-                {
-                    return false;
-                }
-            }
-        }        
-
-        return true;        
-    }
-    
-    
-    private boolean tryToSatisfyDependencyUsing(Class dependency, Set<String> searchList) 
-    {
-        for (String componentName:searchList) 
-        {
-
-            Set<ComponentDescriptor> saved = new HashSet<ComponentDescriptor>(currentTestSet);
-            
-            // the second check is important for edge case
-            if (tryToInstall(componentName) && isInInstallSet(dependency)) 
-            {
-                return true;
-            } 
-            else 
-            {                        
-                currentTestSet = saved;
-            }
-        }
-        return false;
-    }
-
-
-    private Set<String> findPotentialComponents(Class dependency) 
-    {
-        Set<String> keys = new HashSet<String>();
-        
-        for (String candidateKey: componentDescriptors.keySet()) 
-        {            
-            if (componentMightSatisfy(candidateKey, dependency)) 
-            {
-                keys.add(candidateKey);
-            }
-        }
-        
-        return keys;
-    }
-
-    private boolean componentMightSatisfy(String candidateKey, Class dependency) 
-    {
-        for (ComponentDescriptor descriptor: componentDescriptors.get(candidateKey)) 
-        {            
-            if (descriptor.getComponentClass().equals(dependency)) 
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-
-    private boolean isInInstallSet(Class dependency) 
-    {
-        for (ComponentDescriptor descriptor: currentTestSet) 
-        {
-            if (dependency.equals(descriptor.getComponentClass())) 
-            {
-                return true;
-            }
-        }
-        
-        for (ComponentDescriptor descriptor: installedSet) 
-        {
-            if (dependency.equals(descriptor.getComponentClass())) 
-            {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-
-    // install set is already installed or the current working set
-    private boolean isInInstallSet(String key) 
-    {
-        for (ComponentDescriptor descriptor: currentTestSet) 
-        {
-            if (key.equals(descriptor.getName())) 
-            {
-                return true;
-            }
-        }
-        
-        for (ComponentDescriptor descriptor: installedSet) 
-        {
-            if (key.equals(descriptor.getName())) 
-            {
-                return true;
-            }
-        }
-        
-        return false;
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/DeploymentDescriptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/DeploymentDescriptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/DeploymentDescriptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,139 +0,0 @@
-package org.jboss.seam.init;
-
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.jboss.seam.ComponentType;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.XML;
-
-/**
- * Parser for ejb-jar.xml and orm.xml deployment descriptors
- * 
- * @author Norman Richards
- *
- */
-public class DeploymentDescriptor 
-{ 
-    private static final LogProvider log = Logging.getLogProvider(DeploymentDescriptor.class);
-    
-    private Map<Class, EjbDescriptor> ejbDescriptors = new HashMap<Class, EjbDescriptor>();
-    private Class componentClass;
-
-    public DeploymentDescriptor(Class clazz) 
-    {
-        componentClass = clazz;
-        if (clazz.getClassLoader() == null) {
-            return;
-        }
-
-        try 
-        {
-            InputStream ejbJarXml = clazz.getClassLoader().getResourceAsStream("META-INF/ejb-jar.xml");
-            if (ejbJarXml!=null)
-            {
-               parseEjbJarXml( XML.getRootElementSafely(ejbJarXml) );
-            }
-        } 
-        catch (DocumentException e) 
-        {
-            log.warn("Couldn't parse META-INF/ejb-jar.xml for component types " + e.getMessage());
-        }
-
-        try 
-        {
-            InputStream ormXml = clazz.getClassLoader().getResourceAsStream("META-INF/orm.xml");
-            if (ormXml!=null)
-            {
-               parseOrmXml( XML.getRootElementSafely(ormXml) );
-            }
-        } 
-        catch (DocumentException e) 
-        {
-            log.warn("Couldn't parse META-INF/orm.xml for component types " + e.getMessage());
-        }
-    }
-    
-    public Map<Class, EjbDescriptor> getEjbDescriptors()
-    {
-       return ejbDescriptors;
-    }
-    
-    
-    @SuppressWarnings("unchecked")
-    private void parseEjbJarXml(Element root) 
-    {
-
-        Element beans = root.element("enterprise-beans");
-        if (beans != null) 
-        {
-            for (Element bean: (List<Element>) beans.elements("session")) 
-            {
-                EjbDescriptor info = new EjbDescriptor();
-                info.setEjbName(bean.element("ejb-name").getTextTrim());
-                Element ejbClass = bean.element("ejb-class");
-                if (ejbClass != null)
-                {
-                   info.setEjbClassName(ejbClass.getTextTrim());
-                   Element sessionType = bean.element("session-type");
-                   if (sessionType != null && sessionType.getTextTrim().equalsIgnoreCase("Stateful")) 
-                   {
-                       info.setBeanType(ComponentType.STATEFUL_SESSION_BEAN);            
-                   } 
-                   else 
-                   {
-                       info.setBeanType(ComponentType.STATELESS_SESSION_BEAN);     
-                   }
-                   add(info);
-                }
-            }          
-            for (Element bean: (List<Element>) beans.elements("message-driven")) 
-            {
-                EjbDescriptor info = new EjbDescriptor();
-                info.setEjbName(bean.element("ejb-name").getTextTrim());
-                info.setEjbClassName(bean.element("ejb-class").getTextTrim());
-                info.setBeanType(ComponentType.MESSAGE_DRIVEN_BEAN);
-                add(info);
-            }      
-        }
-    }
-        
-    @SuppressWarnings("unchecked")
-    private void parseOrmXml(Element root) 
-    {
-        String packagePrefix = "";
-        
-        Element pkg = root.element("package");
-        if (pkg!=null) 
-        {
-            packagePrefix = pkg.getTextTrim() + ".";
-        }
-                
-        for (Element entity: (List<Element>) root.elements("entity")) 
-        {
-            String className = packagePrefix + entity.attribute("class").getText();
-            EjbDescriptor info = new EjbDescriptor();
-            info.setBeanType(ComponentType.ENTITY_BEAN);
-            info.setEjbClassName(className);
-            add(info);
-        }
-    }
-
-    protected void add(EjbDescriptor descriptor) 
-    {
-       try
-       {
-          Class ejbClass = componentClass.getClassLoader().loadClass( descriptor.getEjbClassName() );
-          ejbDescriptors.put(ejbClass, descriptor);
-       }
-       catch (ClassNotFoundException cnfe)
-       {
-          log.warn("Could not load EJB class: " + descriptor.getEjbClassName());
-       }
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/EjbDescriptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/EjbDescriptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/EjbDescriptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,47 +0,0 @@
-package org.jboss.seam.init;
-
-import org.jboss.seam.ComponentType;
-
-/**
- * Meta-data about an EJB, discovered from a deployment
- * descriptor.
- * 
- * @author Norman Richards
- *
- */
-public class EjbDescriptor 
-{
-     private String ejbName;
-     private String ejbClassName;
-     private ComponentType beanType;
-     
-     public ComponentType getBeanType() 
-     {
-         return beanType;
-     }
-     
-     public void setBeanType(ComponentType beanType) 
-     {
-         this.beanType = beanType;
-     }
-     
-     public String getEjbClassName() 
-     {
-         return ejbClassName;
-     }
-     
-     public void setEjbClassName(String ejbClass) 
-     {
-         this.ejbClassName = ejbClass;
-     }
-     
-     public String getEjbName() 
-     {
-         return ejbName;
-     }
-     
-     public void setEjbName(String name) 
-     {
-         this.ejbName = name;
-     }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/EjbEntityDescriptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/EjbEntityDescriptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/EjbEntityDescriptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,130 +0,0 @@
-package org.jboss.seam.init;
-
-public class EjbEntityDescriptor extends EjbDescriptor
-{
-   
-   private boolean metaDataComplete;
-
-   private String preRemoveMethodName;
-   private String prePersistMethodName;
-   private String preUpdateMethodName;
-   private String postLoadMethodName;
-   private String identifierPropertyName;
-   private String identifierFieldName;
-   private String versionPropertyName;
-   private String versionFieldName;
-   
-
-   public String getPreRemoveMethodName()
-   {
-      return preRemoveMethodName;
-   }
-
-   public void setPreRemoveMethodName(String preRemoveMethodName)
-   {
-      this.preRemoveMethodName = preRemoveMethodName;
-   }
-
-   public String getPrePersistMethodName()
-   {
-      return prePersistMethodName;
-   }
-
-   public void setPrePersistMethodName(String prePersistMethodName)
-   {
-      this.prePersistMethodName = prePersistMethodName;
-   }
-
-   public String getPreUpdateMethodName()
-   {
-      return p!
 reUpdateMethodName;
-   }
-
-   public void setPreUpdateMethodName(String preUpdateMethodName)
-   {
-      this.preUpdateMethodName = preUpdateMethodName;
-   }
-
-   public String getPostLoadMethodName()
-   {
-      return postLoadMethodName;
-   }
-
-   public void setPostLoadMethodName(String postLoadMethodName)
-   {
-      this.postLoadMethodName = postLoadMethodName;
-   }
-
-   public String getIdentifierPropertyName()
-   {
-      return identifierPropertyName;
-   }
-
-   public void setIdentifierPropertyName(String identifierProperty)
-   {
-      this.identifierPropertyName = identifierProperty;
-   }
-
-   public String getVersionPropertyName()
-   {
-      return versionPropertyName;
-   }
-
-   public void setVersionPropertyName(String versionProperty)
-   {
-      this.versionPropertyName = versionProperty;
-   }
-
-   public String getIdentifierFieldName()
-   {
-      return identifierFieldName;
-   }
-
-   public void setIdentifierFieldName(String identi!
 fierField)
-   {
-      this.identifierFieldName = identifierF!
 ield;
- 
  }
-
-   public String getVersionFieldName()
-   {
-      return versionFieldName;
-   }
-
-   public void setVersionFieldName(String versionField)
-   {
-      this.versionFieldName = versionField;
-   }
-   
-   public void setVersionAttribute(String versionAttributeName, String accessType)
-   {
-       if (accessType != null) {
-	   if (accessType.equals("PROPERTY")) {
-	       this.versionPropertyName = versionAttributeName;
-	   } else if (accessType.equals("FIELD")) {
-	       this.versionFieldName = versionAttributeName;
-	   }
-       }
-   }
-   
-   public void setIdentifierAttribute(String identifierAttributeName, String accessType)
-   {
-       if (accessType != null) {
-	   if (accessType.equals("PROPERTY")) {
-	       this.identifierPropertyName = identifierAttributeName;
-	   } else if (accessType.equals("FIELD")) {
-	       this.identifierFieldName = identifierAttributeName;
-	   }
-       }
-   }
-   
-   public boolean isMetaDataComplete()
-   {
-      r!
 eturn metaDataComplete;
-   }
-   
-   public void setMetaDataComplete(boolean metaDataComplete)
-   {
-      this.metaDataComplete = metaDataComplete;
-   }
-
-}
Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/FactoryDescriptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/FactoryDescriptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/FactoryDescriptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,60 +0,0 @@
-package org.jboss.seam.init;
-
-import org.jboss.seam.ScopeType;
-
-class FactoryDescriptor
-{
-   private String name;
-   private ScopeType scope;
-   private String method;
-   private String value;
-   private boolean autoCreate;
-
-   FactoryDescriptor(String name, ScopeType scope, String method, String value,
-                     boolean autoCreate)
-   {
-      super();
-      this.name = name;
-      this.scope = scope;
-      this.method = method;
-      this.value = value;
-      this.autoCreate = autoCreate;
-   }
-
-   public String getMethod()
-   {
-      return method;
-   }
-
-   public String getValue()
-   {
-      return value;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public ScopeType getScope()
-   {
-      return scope;
-   }
-
-   public boolean isValueBinding()
-   {
-      return method == null;
-   }
-
-   public boolean isAutoCreate()
-   {
-      return autoCreate;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "FactoryDescriptor(" + name + ')';
-   }
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/Initialization.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/Initialization.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/Initialization.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1259 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * 
- * Distributable under LGPL license. See terms of license at gnu.org.
- */
-package org.jboss.seam.init;
-
-import static org.jboss.seam.util.Resources.getRealFile;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-
-import org.dom4j.Attribute;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Namespace;
-import org.jboss.seam.annotations.Role;
-import org.jboss.seam.annotations.Roles;
-import org.jboss.seam.bpm.Jbpm;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.deployment.ClassDescriptor;
-import org.jboss.seam.deployment.DeploymentStrategy;
-import org.jboss.seam.deployment.FileDescriptor;
-import org.jboss.seam.deployment.HotDeploymentStrategy;
-import org.jboss.seam.deployment.SeamDeploymentProperties;
-import org.jboss.seam.deployment.StandardDeploymentStrategy;
-import org.jboss.seam.deployment.TimestampCheckForwardingDeploymentStrategy;
-import org.jboss.seam.deployment.WarRootDeploymentStrategy;
-import org.jboss.seam.exception.Exceptions;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.util.Conversions;
-import org.jboss.seam.util.Naming;
-import org.jboss.seam.util.Reflections;
-import org.jboss.seam.util.Resources;
-import org.jboss.seam.util.Strings;
-import org.jboss.seam.util.XML;
-
-/**
- * Builds configuration metadata when Seam first initialized.
- * 
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @author Pete Muir
- */
-public class Initialization
-{
-   public static final String COMPONENT_NAMESPACE = "http://jboss.com/products/seam/components";
-   public static final String COMPONENT_SUFFIX = ".component";
-   public static final String DUPLICATE_JARS_PATTERNS = "org.jboss.seam.init.duplicateJarsPatterns";
-   
-   private static final LogProvider log = Logging.getLogProvider(Initialization.class);
-
-   private ServletContext servletContext;
-   private Map<String, Conversions.PropertyValue> properties = new HashMap<String, Conversions.PropertyValue>();
-   private Map<String, Set<ComponentDescriptor>> componentDescriptors = new HashMap<String, Set<ComponentDescriptor>>();
-   private List<FactoryDescriptor> factoryDescriptors = new ArrayList<FactoryDescriptor>();
-   private Set<Class> installedComponentClasses = new HashSet<Class>();
-   //private Set<String> importedPackages = new HashSet<String>();
-   private Map<String, NamespaceDescriptor> namespaceMap = new HashMap<String, NamespaceDescriptor>();
-   private NamespacePackageResolver namespacePackageResolver = new NamespacePackageResolver();
-   private Map<String, EventListenerDescriptor> eventListenerDescriptors = new HashMap<String, EventListenerDescriptor>();
-   private Collection<String> globalImports = new ArrayList<String>();
-   
-   private StandardDeploymentStrategy standardDeploymentStrategy;
-   private HotDeploymentStrategy hotDeploymentStrategy;
-   private WarRootDeploymentStrategy warRootDeploymentStrategy;
-   
-   private File warClassesDirectory;
-   private File warLibDirectory;
-   private File hotDeployDirectory;
-   private File warRoot;
-   
-   private Set<String> nonPropertyAttributes = new HashSet<String>();
-   
-   {
-       nonPropertyAttributes.add("name");
-       nonPropertyAttributes.add("installed");
-       nonPropertyAttributes.add("scope");
-       nonPropertyAttributes.add("startup");
-       nonPropertyAttributes.add("startupDepends");
-       nonPropertyAttributes.add("class");
-       nonPropertyAttributes.add("jndi-name");
-       nonPropertyAttributes.add("precedence");
-       nonPropertyAttributes.add("auto-create");           
-   }   
-   
-   public Initialization(ServletContext servletContext)
-   {
-      this.servletContext = servletContext;
-      this.warRoot = getRealFile(servletContext, "/");
-      this.warClassesDirectory = getRealFile(servletContext, "/WEB-INF/classes");
-      this.warLibDirectory = getRealFile(servletContext, "/WEB-INF/lib");
-      this.hotDeployDirectory = getRealFile(servletContext, HotDeploymentStrategy.DEFAULT_HOT_DEPLOYMENT_DIRECTORY_PATH);
-   }
-   
-   public Initialization create()
-   {
-      standardDeploymentStrategy = new StandardDeploymentStrategy(Thread.currentThread().getContextClassLoader(),servletContext);
-      standardDeploymentStrategy.scan();
-      addNamespaces();
-      initComponentsFromXmlDocument("/WEB-INF/components.xml");
-      initComponentsFromXmlDocument("/WEB-INF/events.xml"); //deprecated
-      initComponentsFromXmlDocuments();
-      initPropertiesFromServletContext();
-      initPropertiesFromResource();
-      initJndiProperties();
-      initPropertiesFromSystem();
-      return this;
-   }
-
-   private void initComponentsFromXmlDocuments()
-   {
-      Enumeration<URL> resources;
-      try
-      {
-         resources = Thread.currentThread().getContextClassLoader().getResources("META-INF/components.xml");
-      }
-      catch (IOException ioe)
-      {
-         throw new RuntimeException("error scanning META-INF/components.xml files", ioe);
-      }
-
-      List<String> seenDocuments = new ArrayList<String>();
-      
-      Properties replacements = getReplacements();
-      Set<Pattern> duplicateJarPatterns = new HashSet<Pattern>();
-      for (String duplicateJarRegex : new HashSet<String>(new SeamDeploymentProperties(Thread.currentThread().getContextClassLoader()).getPropertyValues(DUPLICATE_JARS_PATTERNS)))
-      {
-         duplicateJarPatterns.add(Pattern.compile(duplicateJarRegex));
-      }
-      while (resources.hasMoreElements())
-      {
-         URL url = resources.nextElement();
-         boolean skip = false;
-         String path = url.getPath();
-         String prefixPattern = "^(\\S*/)([\\S^/]*.jar)(\\S*)$";
-         Pattern pattern = Pattern.compile(prefixPattern);
-         Matcher matcher = pattern.matcher(path);
-         String jarName;
-         String fileName;
-         if (matcher.matches())
-         {
-            jarName = matcher.group(2);
-            fileName = matcher.group(3);
-            Set<String> documentNames = new HashSet<String>();
-            for (Pattern duplicateJarPattern : duplicateJarPatterns)
-            {
-               Matcher duplicateMatcher = duplicateJarPattern.matcher(jarName);
-               
-               if (duplicateMatcher.matches())
-               {
-                  jarName = duplicateMatcher.group(1);
-               }
-               
-               documentNames.add(jarName + fileName);
-            }
-            for (String documentName : documentNames)
-            {
-               if (seenDocuments.contains(documentName))
-               {
-                  skip = true;
-               }
-            }
-            seenDocuments.addAll(documentNames);
-         }
-         
-         if (!skip) {
-            try{
-               InputStream stream = url.openStream();
-
-               log.debug("reading " + url);
-               try {
-                   installComponentsFromXmlElements(XML.getRootElement(stream), replacements);
-               } finally {
-                   Resources.closeStream(stream);
-               }
-            } catch (Exception e) {
-               throw new RuntimeException("error while reading " + url, e);
-            }
-         } else {
-            log.trace("skipping read of duplicate components.xml " + url);
-         }
-      }
-
-   }
-
-   private void initComponentsFromXmlDocument(String resource)
-   {
-      InputStream stream = Resources.getResourceAsStream(resource, servletContext);
-      if (stream != null)
-      {
-         log.info("reading " + resource);
-         try
-         {
-            installComponentsFromXmlElements( XML.getRootElement(stream), getReplacements() );
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException("error while reading /WEB-INF/components.xml", e);
-         } finally {
-             Resources.closeStream(stream);
-         }
-      }
-   }
-
-   private Properties getReplacements()
-   {
-      InputStream replaceStream = null;
-      try {
-         Properties replacements = new Properties();
-         replaceStream = Resources.getResourceAsStream("/components.properties", servletContext);
-         if (replaceStream != null) {
-             replacements.load(replaceStream);
-         }
-         return replacements;
-      } catch (IOException ioe) {
-         throw new RuntimeException("error reading components.properties", ioe);
-      } finally {
-          Resources.closeStream(replaceStream);
-      }
-   }
-
-   private List<Element> elements(Element rootElement, String name) {
-       return rootElement.elements(name);
-   }
-   
-   @SuppressWarnings("unchecked")
-   private void installComponentsFromXmlElements(Element rootElement, Properties replacements)
-   throws DocumentException, ClassNotFoundException
-   {
-	   /*List<Element> importJavaElements = rootElement.elements("import-java-package");
-        for (Element importElement : importJavaElements)
-        {
-            String pkgName = importElement.getTextTrim();
-            importedPackages.add(pkgName);
-            addNamespace( Package.getPackage(pkgName) );
-        }*/
-
-	   for (Element importElement: elements(rootElement,"import")) {
-		   globalImports.add( importElement.getTextTrim() );
-	   }
-
-	   for (Element component: elements(rootElement,"component")) {
-		   installComponentFromXmlElement(component, 
-				   component.attributeValue("name"), 
-				   component.attributeValue("class"), 
-				   replacements);
-	   }
-
-	   for (Element factory: elements(rootElement,"factory")) {
-		   installFactoryFromXmlElement(factory);
-	   }
-
-	   for (Element event: elements(rootElement, "event")) {
-		   installEventListenerFromXmlElement(event);
-	   }
-
-	   for (Element elem : (List<Element>) rootElement.elements()) {
-		   String ns = elem.getNamespace().getURI();
-		   NamespaceDescriptor nsInfo = resolveNamespace(ns);
-		   if (nsInfo == null) {
-			   if (!ns.equals(COMPONENT_NAMESPACE)) {
-			       log.warn("namespace declared in components.xml does not resolve to a package: " + ns);
-			   }
-		   } else {
-			   String name = elem.attributeValue("name");
-			   String elemName = toCamelCase(elem.getName(), true);
-
-			   String className = elem.attributeValue("class");
-			   if (className == null) 
-			   {
-			      for (String packageName : nsInfo.getPackageNames())
-			      {
-			         try
-			         {
-			            // Try each of the packages in the namespace descriptor for a matching class
-			            className = packageName + '.' + elemName;
-			            Reflections.classForName(className);
-			            break;
-			         }
-			         catch (ClassNotFoundException ex)
-			         {
-			            className = null;
-			         }
-			      }				   				   
-			   }
-
-			   try {
-               Class<Object> clazz = null;
-               Name nameAnnotation = null;
-               if (className != null) {
-				       //get the class implied by the namespaced XML element name
-				       clazz = Reflections.classForName(className);
-				       nameAnnotation = clazz.getAnnotation(Name.class);
-               }
-
-				   //if the name attribute is not explicitly specified in the XML,
-				   //imply the name from the @Name annotation on the class implied
-				   //by the XML element name
-				   if (name == null && nameAnnotation!=null) {
-					   name = nameAnnotation.value();
-				   }
-
-				   //if this class already has the @Name annotation, the XML element 
-				   //is just adding configuration to the existing component, don't
-				   //add another ComponentDescriptor (this is super-important to
-				   //allow overriding!)
-				   if (nameAnnotation!=null && nameAnnotation.value().equals(name)) {
-					   Install install = clazz.getAnnotation(Install.class);
-					   if (install == null || install.value()) {
-						   className = null;
-					   }
-				   }
-			   } catch (ClassNotFoundException cnfe) {
-				   //there is no class implied by the XML element name so the
-				   //component must be defined some other way, assume that we are
-				   //just adding configuration, don't add a ComponentDescriptor 
-				   //TODO: this is problematic, it results in elements getting 
-				   //      ignored when mis-spelled or given the wrong namespace!!
-				   className = null;
-			   }
-			   catch (Exception e) 
-			   {
-               throw new RuntimeException("Error loading element " + elemName + " with component name " + name + " and component class " + className,e);
-            }
-
-			   //finally, if we could not get the name from the XML name attribute,
-			   //or from an @Name annotation on the class, imply it
-			   if (name == null) {
-				   String prefix = nsInfo.getComponentPrefix();
-				   String componentName = toCamelCase(elem.getName(), false);
-				   name = Strings.isEmpty(prefix) ? 
-						   componentName : prefix + '.' + componentName;
-			   }
-   
-			   installComponentFromXmlElement(elem, name, className, replacements);
-		   }
-	   }
-   }
-
-	private NamespaceDescriptor resolveNamespace(String namespace) {
-		if (Strings.isEmpty(namespace) || namespace.equals(COMPONENT_NAMESPACE)) {
-			return null;
-		}
-		
-		NamespaceDescriptor descriptor = namespaceMap.get(namespace);	
-		if (descriptor == null) {
-			try {
-				String packageName = namespacePackageResolver.resolve(namespace);
-				descriptor = new NamespaceDescriptor(namespace, packageName);
-				namespaceMap.put(namespace, descriptor);
-			} catch (Exception e) {
-				log.warn("Could not determine java package for namespace: " + namespace, e);
-			}
-		}
-		
-		return descriptor;
-	}
-
-   @SuppressWarnings("unchecked")
-   private void installEventListenerFromXmlElement(Element event)
-   {
-      String type = event.attributeValue("type");
-      if (type==null)
-      {
-         throw new IllegalArgumentException("must specify type for <event/> declaration");
-      }
-      EventListenerDescriptor eventListener = eventListenerDescriptors.get(type);
-      if (eventListener==null) 
-      {
-         eventListener = new EventListenerDescriptor(type);
-         eventListenerDescriptors.put(type, eventListener);
-      }
-      
-      List<Element> actions = event.elements("action");
-      for (Element action: actions)
-      {
-         String execute = action.attributeValue("execute");
-         if (execute==null)
-         {
-            String actionExpression = action.attributeValue("expression");
-            if (actionExpression!=null)
-            {
-                log.warn("<action expression=\"" + actionExpression + "\" /> has been deprecated, use <action execute=\"" + actionExpression + "\" /> instead");
-                execute = actionExpression;
-            }
-            else
-            {    
-                throw new IllegalArgumentException("must specify execute for <action/> declaration");
-            }
-         }
-         eventListener.getListenerMethodBindings().add(execute);
-      }
-   }
-
-   private void installFactoryFromXmlElement(Element factory)
-   {
-      String scopeName = factory.attributeValue("scope");
-      String name = factory.attributeValue("name");
-      if (name == null)
-      {
-         throw new IllegalArgumentException("must specify name in <factory/> declaration");
-      }
-      String method = factory.attributeValue("method");
-      String value = factory.attributeValue("value");
-      if (method == null && value == null)
-      {
-         throw new IllegalArgumentException(
-                  "must specify either method or value in <factory/> declaration for variable: "
-                           + name);
-      }
-      ScopeType scope = scopeName == null ? ScopeType.UNSPECIFIED : ScopeType.valueOf(scopeName
-               .toUpperCase());
-      boolean autoCreate = Boolean.parseBoolean(factory.attributeValue("auto-create"));
-      factoryDescriptors.add(new FactoryDescriptor(name, scope, method, value, autoCreate));
-   }
-
-   private String replace(String value, Properties replacements)
-   {
-      if (value.startsWith("@"))
-      {
-         value = replacements.getProperty(value.substring(1, value.length() - 1));
-      }
-      return value;
-   }
-
-   @SuppressWarnings("unchecked")
-   private void installComponentFromXmlElement(Element component, String name, String className,
-            Properties replacements) throws ClassNotFoundException
-   {  
-      String installText = component.attributeValue("installed");
-      boolean installed = false;
-      if (installText == null || Boolean.parseBoolean(replace(installText, replacements)))
-      {
-         installed = true;
-      }
-
-      String scopeName = component.attributeValue("scope");
-      String jndiName = component.attributeValue("jndi-name");
-      String precedenceString = component.attributeValue("precedence");
-      int precedence = precedenceString==null ? Install.APPLICATION : Integer.valueOf(precedenceString);
-      ScopeType scope = scopeName == null ? null : ScopeType.valueOf(scopeName.toUpperCase());
-      String autocreateAttribute = component.attributeValue("auto-create");
-      Boolean autoCreate = autocreateAttribute==null ? null : Boolean.parseBoolean(autocreateAttribute);
-      String startupAttribute = component.attributeValue("startup");
-      Boolean startup = startupAttribute==null ? null : Boolean.parseBoolean(startupAttribute);
-      String startupDependsAttribute = component.attributeValue("startupDepends");
-      String[] startupDepends = startupDependsAttribute==null ? new String[0] : startupDependsAttribute.split(" ");
-
-      if (className != null)
-      {
-         Class<?> clazz = getClassUsingImports(className);
-
-         if (name == null)
-         {
-            if ( !clazz.isAnnotationPresent(Name.class) )
-            {
-               throw new IllegalArgumentException(
-                        "Component class must have @Name annotation or name must be specified in components.xml: " +
-                        clazz.getName());
-            }
-            
-            name = clazz.getAnnotation(Name.class).value();
-         }
-
-         ComponentDescriptor descriptor = new ComponentDescriptor(name, clazz, scope, autoCreate, startup, startupDepends, jndiName, installed, precedence);
-         addComponentDescriptor(descriptor);
-         installedComponentClasses.add(clazz);
-      }
-      else if (name == null)
-      {
-         throw new IllegalArgumentException("must specify either class or name in <component/> declaration");
-      }
-
-      for ( Element prop : (List<Element>) component.elements() )
-      {
-         String propName = prop.attributeValue("name");
-         if (propName == null)
-         {
-            propName = prop.getQName().getName();
-         }
-         String qualifiedPropName = name + '.' + toCamelCase(propName, false);
-         properties.put( qualifiedPropName, getPropertyValue(prop, qualifiedPropName, replacements) );
-      }
-      
-      for ( Attribute prop: (List<Attribute>) component.attributes() )
-      {
-         String attributeName = prop.getName();
-         if (isProperty(prop.getNamespaceURI(),attributeName))
-         {
-            String qualifiedPropName = name + '.' + toCamelCase( prop.getQName().getName(), false );
-            Conversions.PropertyValue propValue = null;
-            try
-            {
-               propValue = getPropertyValue(prop, replacements);
-               properties.put( qualifiedPropName, propValue );
-            }
-            catch (Exception ex)
-            {
-               throw new IllegalArgumentException(String.format(
-                        "Exception setting property %s on component %s.  Expression %s evaluated to %s.",
-                        qualifiedPropName, name, prop.getValue(), propValue), ex);
-                        
-            }
-         }
-      }
-   }
-
-   /**
-    * component properties are non-namespaced and not in the reserved attribute list
-    */
-   private boolean isProperty(String namespaceURI, String attributeName) {
-       return (namespaceURI == null || namespaceURI.length()==0) && 
-              !nonPropertyAttributes.contains(attributeName);
-   }
-
-   private Class<?> getClassUsingImports(String className) throws ClassNotFoundException
-   {
-      Class<?> clazz = null;
-      /*try
-      {*/
-         clazz = Reflections.classForName(className);
-      /*}
-      catch (ClassNotFoundException cnfe)
-      {
-         for (String pkg : importedPackages)
-         {
-            try
-            {
-               clazz = Reflections.classForName(pkg + '.' + className);
-               break;
-            }
-            catch (Exception e)
-            {
-            }
-         }
-         if (clazz == null) throw cnfe;
-      }*/
-      return clazz;
-   }
-
-   private void addComponentDescriptor(ComponentDescriptor descriptor)
-   {
-      String name = descriptor.getName();
-      
-      Set<ComponentDescriptor> set = componentDescriptors.get(name);
-      if (set==null)
-      {
-         set = new TreeSet<ComponentDescriptor>(new ComponentDescriptor.PrecedenceComparator());
-         componentDescriptors.put(name, set);
-      }
-      if ( !set.isEmpty() )
-      {
-         log.info("two components with same name, higher precedence wins: " + name);
-      }
-      if ( !set.add(descriptor) )
-      {
-         ComponentDescriptor other = null;
-         for (ComponentDescriptor d : set)
-         {
-            if (descriptor.compareTo(d) == 0)
-            {
-               other = d;
-               break;
-            }
-         }
-         
-         // for the same component name and the same class in classpath don't throw exception,
-         // use the first in classpath as standard order - JBSEAM-3996 
-         Class clazz = descriptor.getComponentClass();         
-         if (!clazz.getName().equals(other.getComponentClass().getName())) 
-         {         
-            throw new IllegalStateException("Two components with the same name and precedence - " +
-                  "component name: " + name + ", component classes: " + 
-                  descriptor.getComponentClass().getName() + ", " +
-                  (other != null ? other.getComponentClass().getName() : "<unknown>"));
-         }
-      }
-   }
-
-   private Conversions.PropertyValue getPropertyValue(Attribute prop, Properties replacements)
-   {
-      return new Conversions.FlatPropertyValue( trimmedText(prop, replacements) );
-   }
-   
-   @SuppressWarnings("unchecked")
-   private Conversions.PropertyValue getPropertyValue(Element prop, String propName,
-            Properties replacements)
-   {
-      String typeName = prop.attributeValue("type");
-      Class type = null;
-      try
-      {
-         if(typeName != null )
-         {
-            type = Class.forName(typeName);
-         }
-      }
-      catch(ClassNotFoundException e)
-      {
-         throw new RuntimeException("Cannot find class " + typeName + " when setting up property " + propName);
-      }
-      
-      
-      List<Element> keyElements = prop.elements("key");
-      List<Element> valueElements = prop.elements("value");
-
-      if (valueElements.isEmpty() && keyElements.isEmpty())
-      {
-         return new Conversions.FlatPropertyValue(
-                  trimmedText(prop, propName, replacements));
-      }
-      else if (keyElements.isEmpty())
-      {
-         // a list-like structure
-         int len = valueElements.size();
-         String[] values = new String[len];
-         for (int i = 0; i < len; i++)
-         {
-            values[i] = trimmedText(valueElements.get(i), propName, replacements);
-         }
-         return new Conversions.MultiPropertyValue(values, type);
-      }
-      else
-      {
-         // a map-like structure
-         if (valueElements.size() != keyElements.size())
-         {
-            throw new IllegalArgumentException("value elements must match key elements: "
-                     + propName);
-         }
-         Map<String, String> keyedValues = new LinkedHashMap<String, String>();
-         for (int i = 0; i < keyElements.size(); i++)
-         {
-            String key = trimmedText(keyElements.get(i), propName, replacements);
-            String value = trimmedText(valueElements.get(i), propName, replacements);
-            keyedValues.put(key, value);
-         }
-         return new Conversions.AssociativePropertyValue(keyedValues, type);
-      }
-   }
-
-   private String trimmedText(Element element, String propName, Properties replacements)
-   {
-      String text = element.getTextTrim();
-      if (text == null)
-      {
-         throw new IllegalArgumentException("property value must be specified in element body: "
-                  + propName);
-      }
-      return replace(text, replacements);
-   }
-
-   private String trimmedText(Attribute attribute, Properties replacements)
-   {
-      return replace( attribute.getText(), replacements );
-   }
-
-   public Initialization setProperty(String name, Conversions.PropertyValue value)
-   {
-      properties.put(name, value);
-      return this;
-   }
-   
-   public Initialization init()
-   {
-      log.debug("initializing Seam");
-      if (standardDeploymentStrategy == null)
-      {
-         throw new IllegalStateException("No deployment strategy!");
-      }
-      ServletLifecycle.beginInitialization();
-      Contexts.getApplicationContext().set(Component.PROPERTIES, properties);
-      addComponent( new ComponentDescriptor(Init.class), Contexts.getApplicationContext());
-      Init init = (Init) Component.getInstance(Init.class, ScopeType.APPLICATION);
-      // Make the deployment strategies available in the contexts. This gives
-      // access to custom deployment handlers for processing custom annotations
-      Contexts.getEventContext().set(StandardDeploymentStrategy.NAME, standardDeploymentStrategy);
-      scanForComponents();
-      ComponentDescriptor desc = findDescriptor(Jbpm.class);
-      if (desc != null && desc.isInstalled())
-      {
-         init.setJbpmInstalled(true);
-      }
-      init.checkDefaultInterceptors();
-      init.setTimestamp(System.currentTimeMillis());
-      addSpecialComponents(init);
-      
-      // Add the war root deployment
-      warRootDeploymentStrategy = new WarRootDeploymentStrategy(
-            Thread.currentThread().getContextClassLoader(), warRoot,servletContext, new File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
-      Contexts.getEventContext().set(WarRootDeploymentStrategy.NAME, warRootDeploymentStrategy);
-      warRootDeploymentStrategy.scan();
-      init.setWarTimestamp(System.currentTimeMillis());
-      
-      hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader(), isHotDeployEnabled(init));
-      Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
-      init.setHotDeployPaths( hotDeploymentStrategy.getHotDeploymentPaths() );
-      
-      if (hotDeploymentStrategy.available())
-      {
-         hotDeploymentStrategy.scan();
-         installHotDeployableComponents();
-      }
-      
-      installComponents(init);
-           
-      for (String globalImport: globalImports)
-      {
-         init.importNamespace(globalImport);
-      }
-      
-      ServletLifecycle.endInitialization();
-      log.debug("done initializing Seam");
-      return this;
-   }
-
-   public void redeploy(HttpServletRequest request) throws InterruptedException
-   {
-      redeploy(request, (Init) servletContext.getAttribute( Seam.getComponentName(Init.class) ));
-   }
-   
-   public void redeploy(HttpServletRequest request, Init init) throws InterruptedException
-   {
-      // It's possible to have the HotDeployFilter installed but disabled
-      if (!isHotDeployEnabled(init))
-      {
-         return;
-      }
-      
-      try
-      {
-         hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader(), isHotDeployEnabled(init));
-         
-         boolean changed = new TimestampCheckForwardingDeploymentStrategy()
-         {
-            @Override
-            protected DeploymentStrategy delegate()
-            {
-               return hotDeploymentStrategy;
-            }
-            
-         }.changedSince(init.getTimestamp());
-         
-         if (hotDeploymentStrategy.available() && changed)
-         {
-            ServletLifecycle.beginReinitialization(request);
-            Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
-            hotDeploymentStrategy.scan();
-            
-            if (hotDeploymentStrategy.getTimestamp() > init.getTimestamp())
-            {
-               log.debug("redeploying components");
-               Seam.clearComponentNameCache();
-               for ( String name: init.getHotDeployableComponents() )
-               {
-                  Component component = Component.forName(name);
-                  if (component!=null)
-                  {
-                     ScopeType scope = component.getScope();
-                     if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
-                     {
-                        scope.getContext().remove(name);
-                     }
-                     init.removeObserverMethods(component);
-                  }
-                  Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
-               }
-            
-               init.getHotDeployableComponents().clear();
-               installHotDeployableComponents();
-               installComponents(init);
-               log.debug("done redeploying components");
-            }
-            // update the timestamp outside of the second timestamp check to be sure we don't cause an unnecessary scan
-            // the second scan checks annotations (the slow part) which might happen to exclude the most recent file
-            init.setTimestamp(System.currentTimeMillis());
-            ServletLifecycle.endReinitialization();
-         }
-            
-         final WarRootDeploymentStrategy warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot, servletContext, new File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
-         changed = new TimestampCheckForwardingDeploymentStrategy()
-         {
-            @Override
-            protected DeploymentStrategy delegate()
-            {
-               return warRootDeploymentStrategy;
-            }
-            
-         }.changedSince(init.getWarTimestamp());
-         if (changed)
-         {
-            warRootDeploymentStrategy.scan();
-            if (warRootDeploymentStrategy.getTimestamp() > init.getWarTimestamp())
-            {
-               log.debug("redeploying page descriptors...");
-               Pages pages = (Pages) ServletLifecycle.getServletContext().getAttribute(Seam.getComponentName(Pages.class));
-               if (pages != null) {
-                  // application context is needed for creating expressions
-                  Lifecycle.setupApplication();
-                  pages.initialize(warRootDeploymentStrategy.getDotPageDotXmlFileNames());
-                  Lifecycle.cleanupApplication();
-               }
-               ServletLifecycle.getServletContext().removeAttribute(Seam.getComponentName(Exceptions.class));
-               init.setWarTimestamp(warRootDeploymentStrategy.getTimestamp());
-               log.debug ("done redeploying page descriptors");
-            }
-         }
-      }
-      finally
-      {
-         
-      }
-   }
-
-   private void installHotDeployableComponents()
-   {
-      for (ClassDescriptor classDescriptor: hotDeploymentStrategy.getScannedComponentClasses() )
-      {
-         Class<?> scannedClass = classDescriptor.getClazz();
-         installScannedComponentAndRoles(scannedClass);
-      }
-   }
-   
-   private HotDeploymentStrategy createHotDeployment(ClassLoader classLoader, boolean hotDeployEnabled)
-   {
-      if (isGroovyPresent())
-      {
-         log.debug("Using Java + Groovy hot deploy");
-         return HotDeploymentStrategy.createInstance("org.jboss.seam.deployment.GroovyHotDeploymentStrategy", classLoader, hotDeployDirectory, servletContext, hotDeployEnabled);
-      }
-      else 
-      {
-         log.debug("Using Java hot deploy");
-         return new HotDeploymentStrategy(classLoader, hotDeployDirectory, servletContext, hotDeployEnabled);
-      }
-   }
-   
-   private boolean isHotDeployEnabled(Init init)
-   {
-      return init.isDebug();
-   }
-   
-   private boolean isGroovyPresent()
-   {
-      try 
-      {
-         Reflections.classForName( "groovy.lang.GroovyObject" );
-         return true;
-      }
-      catch (ClassNotFoundException e)
-      {
-         //groovy is not there
-         return false;
-      }
-   }
-
-   private void scanForComponents()
-   {
-      for ( ClassDescriptor classDescriptor : standardDeploymentStrategy.getAnnotatedComponents() ) 
-      {
-         Class<?> scannedClass = classDescriptor.getClazz();
-         installScannedComponentAndRoles(scannedClass);
-      }
-      
-      for ( FileDescriptor fileDescriptor : standardDeploymentStrategy.getXmlComponents() ) 
-      {
-         installComponentsFromDescriptor( fileDescriptor, standardDeploymentStrategy.getClassLoader() );              
-      }
-   }
-
-   private static String classFilenameFromDescriptor(String descriptor) {
-       int pos = descriptor.lastIndexOf(".component.xml");
-       if (pos==-1) {
-           return null;
-       }
-       
-       return descriptor.substring(0,pos).replace('/', '.').replace('\\', '.');
-   }
-
-   private void installComponentsFromDescriptor(FileDescriptor fileDescriptor, ClassLoader loader)
-   {
-      //note: this is correct, we do not need to scan other classloaders!
-      InputStream stream = null;
-      try
-      {
-         stream = fileDescriptor.getUrl().openStream();
-      }
-      catch (IOException e) 
-      {
-         // No-op
-      }
-      if (stream != null) 
-      {
-         try 
-         {
-            Properties replacements = getReplacements();
-            Element root = XML.getRootElement(stream);
-            if (root.getName().equals("components")) 
-            {
-               installComponentsFromXmlElements(root, replacements);
-            } 
-            else
-            {
-                installComponentFromXmlElement(root, 
-                        root.attributeValue("name"), 
-                        classFilenameFromDescriptor(fileDescriptor.getName()),
-                        replacements);
-            }
-         } catch (Exception e) {
-            throw new RuntimeException("error while reading " + fileDescriptor.getName(), e);
-         } finally {
-             Resources.closeStream(stream);
-         }
-      }
-   }
-
-   private void installScannedComponentAndRoles(Class<?> scannedClass)
-   {
-      try {
-         if ( scannedClass.isAnnotationPresent(Name.class) )
-         {
-            addComponentDescriptor( new ComponentDescriptor(scannedClass) );
-         }
-         if ( scannedClass.isAnnotationPresent(Role.class) )
-         {
-            installRole( scannedClass, scannedClass.getAnnotation(Role.class) );
-         }
-         if ( scannedClass.isAnnotationPresent(Roles.class) )
-         {
-            Role[] roles = scannedClass.getAnnotation(Roles.class).value();
-            for (Role role : roles)
-            {
-               installRole(scannedClass, role);
-            }
-         }
-      } catch(TypeNotPresentException e) {
-         log.info("Failed to install "+scannedClass.getName()+": "+e.getMessage());
-      }
-   }
-
-   private void installRole(Class<?> scannedClass, Role role)
-   {
-      ScopeType scope = Seam.getComponentRoleScope(scannedClass, role);
-      addComponentDescriptor( new ComponentDescriptor( role.name(), scannedClass, scope ) );
-   }
-
-   private void addNamespace(Package pkg)
-   {
-	   if (pkg != null) {
-		   Namespace ns = pkg.getAnnotation(Namespace.class);
-		   if (ns != null) {
-			   log.debug("Namespace: " + ns.value() + ", package: " + pkg.getName() + 
-					   ", prefix: " + ns.prefix());
-
-			   NamespaceDescriptor descriptor = namespaceMap.get(ns.value());
-			   if (descriptor != null)
-			   {
-			      descriptor.addPackageName(pkg.getName());
-			   }
-			   else
-			   {
-			      namespaceMap.put(ns.value(), new NamespaceDescriptor(ns, pkg));
-			   }
-		   }
-	   }
-   }
-
-   private void addNamespaces()
-   {
-	   for (Package pkg: standardDeploymentStrategy.getScannedNamespaces()) {
-		   addNamespace(pkg);
-	   }
-   }
-
-   private void initPropertiesFromServletContext()
-   {
-      Enumeration params = servletContext.getInitParameterNames();
-      while (params.hasMoreElements())
-      {
-         String name = (String) params.nextElement();
-         properties.put(name, new Conversions.FlatPropertyValue(servletContext
-                  .getInitParameter(name)));
-      }
-   }
-
-   private void initPropertiesFromSystem()
-   {
-      Properties filtered = new Properties();
-      String prefix = Component.PROPERTIES + ".";
-      for (Map.Entry me : System.getProperties().entrySet())
-      {
-         if (((String)me.getKey()).startsWith(prefix))
-         {
-            filtered.put(((String)me.getKey()).substring(prefix.length()),me.getValue());
-         }
-      }
-      initPropertiesFromMap(filtered);
-   }
-      
-   private void initPropertiesFromResource()
-   {
-      initPropertiesFromMap(loadFromResource("/seam.properties"));
-   }
-   
-   private void initPropertiesFromMap(Properties props)
-   {
-      for (Map.Entry me : props.entrySet())
-      {
-         properties.put((String) me.getKey(), new Conversions.FlatPropertyValue((String) me
-                  .getValue()));
-      }
-   }
-   
-
-   private void initJndiProperties()
-   {
-      Properties jndiProperties = new Properties();
-      jndiProperties.putAll(loadFromResource("/jndi.properties"));
-      jndiProperties.putAll(loadFromResource("/seam-jndi.properties"));
-      Naming.setInitialContextProperties(jndiProperties);
-   }
-
-   private Properties loadFromResource(String resource)
-   {
-      Properties props = new Properties();
-      InputStream stream = Resources.getResourceAsStream(resource, servletContext);
-      if (stream != null)
-      {
-         try
-         {
-            log.info("reading properties from: " + resource);
-            try
-            {
-               props.load(stream);
-            }
-            catch (IOException ioe)
-            {
-               log.error("could not read " + resource, ioe);
-            }
-         }
-         finally 
-         {
-            Resources.closeStream(stream);
-         }
-      }
-      else
-      {
-         log.debug("not found: " + resource);
-      }
-      return props;
-   }
-
-   protected ComponentDescriptor findDescriptor(Class<?> componentClass)
-   {
-      for (Set<ComponentDescriptor> components : componentDescriptors.values())
-      {
-         for (ComponentDescriptor component: components)
-         {
-            if ( component.getComponentClass().equals(componentClass) )
-            {
-               return component;
-            }
-         }
-      }
-      return null;
-   }
-
-   private void addSpecialComponents(Init init)
-   {
-   }
-
-   private void installComponents(Init init)
-   {
-      log.debug("Installing components...");
-      Context context = Contexts.getApplicationContext();
-
-      DependencyManager manager = new DependencyManager(componentDescriptors);
-
-      Set<ComponentDescriptor> installable = manager.installedSet();      
-      for (ComponentDescriptor componentDescriptor: installable) 
-      {
-          String compName = componentDescriptor.getName() + COMPONENT_SUFFIX;
-
-          if ( !context.isSet(compName) ) 
-          {
-              addComponent(componentDescriptor, context);
-
-              if ( componentDescriptor.isAutoCreate() ) 
-              {
-                  init.addAutocreateVariable( componentDescriptor.getName() );
-              }
-
-              if ( componentDescriptor.isFilter() ) 
-              {
-                  init.addInstalledFilter( componentDescriptor.getName() );
-              }
-
-              if ( componentDescriptor.isResourceProvider() ) 
-              {
-                 if (!componentDescriptor.getScope().equals(ScopeType.APPLICATION))
-                 {
-                    throw new RuntimeException("Resource providers must be application-scoped components");
-                 }
-                 
-                 init.addResourceProvider( componentDescriptor.getName() );
-              }
-              
-              if ( componentDescriptor.isPermissionResolver() )
-              {
-                 init.addPermissionResolver( componentDescriptor.getName() );
-              }
-          }
-      }
-
-
-      for (FactoryDescriptor factoryDescriptor : factoryDescriptors)
-      {
-         if (factoryDescriptor.isValueBinding())
-         {
-            init.addFactoryValueExpression(factoryDescriptor.getName(), factoryDescriptor.getValue(),
-                     factoryDescriptor.getScope());
-         }
-         else
-         {
-            init.addFactoryMethodExpression(factoryDescriptor.getName(),
-                     factoryDescriptor.getMethod(), factoryDescriptor.getScope());
-         }
-         if (factoryDescriptor.isAutoCreate())
-         {
-            init.addAutocreateVariable(factoryDescriptor.getName());
-         }
-      }
-      
-      for (EventListenerDescriptor listenerDescriptor: eventListenerDescriptors.values())
-      {
-         for (String expression: listenerDescriptor.getListenerMethodBindings())
-         {
-            init.addObserverMethodExpression( listenerDescriptor.getType(), Expressions.instance().createMethodExpression(expression) );
-         }
-      }
-   }
-
-  
-   /**
-    * This actually creates a real Component and should only be called when
-    * we want to install a component
-    */
-   protected void addComponent(ComponentDescriptor descriptor, Context context)
-   {
-      String name = descriptor.getName();
-      String componentName = name + COMPONENT_SUFFIX;
-      try
-      {
-         Component component = new Component(
-               descriptor.getComponentClass(), 
-               name, 
-               descriptor.getScope(), 
-               descriptor.isStartup(),
-               descriptor.getStartupDependencies(),
-               descriptor.getJndiName()
-            );
-         context.set(componentName, component);
-         if ( hotDeploymentStrategy != null && hotDeploymentStrategy.isEnabled() && hotDeploymentStrategy.isFromHotDeployClassLoader( descriptor.getComponentClass() ) )
-         {
-            Init.instance().addHotDeployableComponent( component.getName() );
-         }
-      }
-      catch (Throwable e)
-      {
-         throw new RuntimeException("Could not create Component: " + name, e);
-      }      
-   }
-
-   private static String toCamelCase(String hyphenated, boolean initialUpper)
-   {
-      StringTokenizer tokens = new StringTokenizer(hyphenated, "-");
-      StringBuilder result = new StringBuilder( hyphenated.length() );
-      String firstToken = tokens.nextToken();
-      if (initialUpper)
-      {
-         result.append( Character.toUpperCase( firstToken.charAt(0) ) )
-         .append( firstToken.substring(1) );         
-      }
-      else
-      {
-         result.append(firstToken);
-      }
-      while ( tokens.hasMoreTokens() )
-      {
-         String token = tokens.nextToken();
-         result.append( Character.toUpperCase( token.charAt(0) ) )
-               .append( token.substring(1) );
-      }
-      return result.toString();
-   }
-
-   
-   
-   private static class EventListenerDescriptor
-   {
-      private String type;
-      private List<String> listenerMethodBindings = new ArrayList<String>();
-      
-      EventListenerDescriptor(String type)
-      {
-         this.type = type;
-      }
-      
-      public String getType()
-      {
-         return type;
-      }
-
-      public List<String> getListenerMethodBindings()
-      {
-         return listenerMethodBindings;
-      }
-      
-      @Override
-      public String toString()
-      {
-         return "EventListenerDescriptor(" + type + ')';
-      }
-   }
-
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/NamespaceDescriptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/NamespaceDescriptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/NamespaceDescriptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,49 +0,0 @@
-package org.jboss.seam.init;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.seam.annotations.Namespace;
-
-class NamespaceDescriptor
-{
-	private String namespace;
-	private Set<String> packageNames = new HashSet<String>();
-	private String componentPrefix;
-
-	NamespaceDescriptor(Namespace namespaceAnnotation, Package pkg)
-	{
-		this.namespace       = namespaceAnnotation.value();
-		this.componentPrefix = namespaceAnnotation.prefix();
-		packageNames.add(pkg.getName());
-	}
-	
-	NamespaceDescriptor(String namespace, String packageName) {
-		this.namespace       = namespace;
-		packageNames.add(packageName);
-		this.componentPrefix = "";
-	}
-
-	public String getNamespace() {
-		return namespace;
-	}
-	
-	public String getComponentPrefix() {
-		return componentPrefix;
-	}
-	
-	public void addPackageName(String packageName)
-	{
-	   packageNames.add(packageName);
-	}
-
-	public Set<String> getPackageNames() {
-		return packageNames;
-	}
-
-	@Override
-	public String toString()
-	{
-		return "NamespaceDescriptor(" + namespace + ')';
-	}
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/NamespacePackageResolver.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/NamespacePackageResolver.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/NamespacePackageResolver.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,135 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * 
- * Distributable under LGPL license. See terms of license at gnu.org.
- */
-package org.jboss.seam.init;
-
-import java.net.URI;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * <p>Converts an <a href="http://www.w3.org/TR/xml-names/">XML namespace</a> to a Java package name.</p>
- * 
- * @author <a href="mailto:eric DOT jung AT yahoo DOT com">Eric H. Jung</a>
- */
-public class NamespacePackageResolver {
-    private static final String JAVA_SCHEME = "java";
-    
-    @SuppressWarnings("unused")
-   private static final LogProvider log = 
-        Logging.getLogProvider(NamespacePackageResolver.class);
-    
-    
-    /**
-     * <p>Converts an XML namespace, <code>ns</code>, to a Stringified package name
-     *
-     * @param ns the xml namespace to convert
-     * 
-     * @returns a namespace descriptor
-     */
-    public String resolve(final String ns) {
-        try {
-            return parseURI(new URI(ns));
-        } catch (Exception e) {
-            // the exact exception doesn't matter here.  The caller
-            // can log if needed
-            return null;
-        }
-    }
-    
-    private String parseURI(URI uri) {
-        if (!uri.isAbsolute()) {
-            throw new IllegalArgumentException(uri + " is not an absolute URI");
-        }
-		
-        return uri.isOpaque() ? parseOpaqueURI(uri) : parseHierarchicalURI(uri);
-    }
-    
-    /**
-     * java:package 
-     * seam:component
-     * seam:package:prefix
-     */
-    private String parseOpaqueURI(URI uri) {
-        if (uri.getScheme().equalsIgnoreCase(JAVA_SCHEME)) {
-            return uri.getSchemeSpecificPart();
-        }
-        throw new IllegalArgumentException("Unrecognized scheme in " + uri);
-    }
-    
-    private String parseHierarchicalURI(URI uri) {
-        String scheme = uri.getScheme().toLowerCase();
-        if (!scheme.equals("http") && !scheme.equals("https")) {
-            throw new IllegalArgumentException("Hierarchical URLs must use http or https scheme " + uri);
-        }
-	
-        StringBuffer buf = new StringBuffer();
-	
-        appendToPackageName(buf, hostnameToPackage(uri.getHost()));
-        appendToPackageName(buf, pathToPackage(uri.getPath()));
-	
-        return buf.toString();
-    }
-    
-    /**
-     * Convert path elements to package names in forward order
-     */
-    private String pathToPackage(String path) {
-        StringBuffer buf = new StringBuffer();
-	
-        if (path != null) {
-            String[] pathElements = path.split("/");
-            for (int i = 1, len = pathElements.length; i < len; i++) {
-                appendToPackageName(buf, pathElements[i]);
-            }
-        }
-	
-        return buf.toString();
-    }
-	
-    private String hostnameToPackage(String hostname) {
-        StringBuffer result = new StringBuffer(); 
-	
-        String[] subdomains = hostname.split("\\.");
-        
-        //Iterate through the subdomains in reverse converting each to a package name. 
-        for (int i = subdomains.length - 1; i >= 0; i--) {
-            String subdomain = subdomains[i];
-            if (i > 0 || !subdomain.equalsIgnoreCase("www")) {
-                appendToPackageName(result, subdomain);
-            }
-        }
-        
-        return result.toString();
-    }	
-    
-    private void appendToPackageName(StringBuffer buf, String subdomain) {
-        if (subdomain.length()>0) {
-            subdomain = makeSafeForJava(subdomain);
-            
-            if (buf.length() > 0) {
-                buf.append('.');
-            }
-            
-            buf.append(subdomain);
-        }
-    }
-    
-    /**
-     * Converts characters in <code>subdomain</code> which aren't java-friendly
-     * into java-friendly equivalents. Right now, we only support the conversion
-     * of hyphens ("-") to underscores ("_"). We could do other things like toLowerCase(),
-     * but there are instances of upper-case package names in widespread use even by the
-     * likes of IBM (e.g., <a href="http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.dc.doc/dc/r_jdbcdrivers.htm">
-     * COM.ibm.db2 classnames</a>).
-     * 
-     * @param subdomain
-     * @return
-     */
-    private String makeSafeForJava(String subdomain) {
-        return subdomain.replace("-", "_");
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/init/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-/**
- * Stuff for starting and initializing Seam in 
- * a servlet environment. You don't need to 
- * call this stuff yourself.
- */
-package org.jboss.seam.init;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/AbstractInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/AbstractInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/AbstractInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,34 +0,0 @@
-//$Id: AbstractInterceptor.java 5537 2007-06-25 23:59:31Z gavin $
-package org.jboss.seam.intercept;
-
-import java.io.Serializable;
-
-import org.jboss.seam.Component;
-
-/**
- * Superclass of built-in interceptors
- * 
- * @author Gavin King
- */
-public abstract class AbstractInterceptor implements Serializable, OptimizedInterceptor
-{
-   private static final long serialVersionUID = -8838873111255032911L;
-   private transient Component component; //a cache of the Component reference
-   private String componentName;
-
-   public void setComponent(Component component)
-   {
-      componentName = component.getName();
-      this.component = component;
-   }
-
-   protected Component getComponent()
-   {
-      if (component==null)
-      {
-         component = Component.forName(componentName);
-      }
-      return component;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/ClientSideInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/ClientSideInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/ClientSideInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,121 +0,0 @@
-//$Id: ClientSideInterceptor.java 5883 2007-07-21 21:01:59Z gavin $
-package org.jboss.seam.intercept;
-
-import java.lang.reflect.Method;
-
-import javassist.util.proxy.MethodHandler;
-import javassist.util.proxy.ProxyObject;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ComponentType;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.ejb.SeamInterceptor;
-
-/**
- * Controller interceptor for client-side interceptors of
- * EJB3 session bean components
- * 
- * @author Gavin King
- */
-public class ClientSideInterceptor extends RootInterceptor 
-      implements MethodHandler
-{
-   private static final long serialVersionUID = -1578313703571846699L;
-   
-   private final Object bean;
-   private final Class beanClass;
-
-   public ClientSideInterceptor(Object bean, Component component)
-   {
-      super(InterceptorType.CLIENT);
-      this.bean = bean;
-      this.beanClass = component.getBeanClass();
-      init(component);
-   }
-   
-   public Object invoke(final Object proxy, final Method method, final Method proceed, final Object[] params) throws Throwable
-   {
-      String methodName = method.getName();
-      if ( params!=null && params.length==0 )
-      {
-         if ( "finalize".equals(methodName) )
-         {
-            return proceed.invoke(proxy, params);
-         }
-         else if ( "writeReplace".equals(methodName) )
-         {
-            return this;
-         }
-         else if ( "getComponent".equals(methodName) )
-         {
-            return getComponent();
-         }
-      }
-      Object result = invoke( createInvocationContext(method, params), EventType.AROUND_INVOKE );
-      return sessionBeanReturnedThis(result) ? proxy : result;
-   }
-
-   private boolean sessionBeanReturnedThis(Object result)
-   {
-      return result==bean || (
-            result!=null && getComponent().getBeanClass().isAssignableFrom( result.getClass() )
-         );
-   }
-
-   private RootInvocationContext createInvocationContext(final Method method, final Object[] params)
-   {
-      return new RootInvocationContext(bean, method, params)
-      {
-         @Override
-         public Object proceed() throws Exception
-         {
-            Component old = SessionBeanInterceptor.COMPONENT.get();
-            SeamInterceptor.COMPONENT.set( getComponent() );
-            try
-            {
-               return super.proceed();
-            }
-            finally
-            {
-               SeamInterceptor.COMPONENT.set(old);
-            }
-         }
-      };
-   }
-   
-   //TODO: copy/paste from JavaBean interceptor
-   Object readResolve()
-   {
-      Component comp = null;
-      try
-      {
-         comp = getComponent();
-      }
-      catch (IllegalStateException ise) {
-         //this can occur when tomcat deserializes persistent sessions
-      }
-      
-      try
-      {
-         if (comp==null)
-         {
-            ProxyObject proxy = Component.createProxyFactory( 
-                  ComponentType.STATEFUL_SESSION_BEAN, 
-                  beanClass, 
-                  Component.getBusinessInterfaces(beanClass)
-               ).newInstance();
-            proxy.setHandler(this);
-            return proxy;
-         }
-         else
-         {
-            return comp.wrap(bean, this);
-         }
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EE5SeamInvocationContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EE5SeamInvocationContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EE5SeamInvocationContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-package org.jboss.seam.intercept;
-
-import java.util.List;
-
-/**
- * Adapts from Seam's InvocationContext API to the standard EE5 API.
- * (Not much to see here, they are identical apart from package names.)
- * 
- * @author Gavin King
- *
- */
-class EE5SeamInvocationContext extends SeamInvocationContext implements javax.interceptor.InvocationContext
-{
-
-   public EE5SeamInvocationContext(InvocationContext context, EventType type, List<Object> userInterceptors, List<Interceptor> interceptors)
-   {
-      super(context, type, userInterceptors, interceptors);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EJBInvocationContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EJBInvocationContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EJBInvocationContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,51 +0,0 @@
-package org.jboss.seam.intercept;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * Wraps the invocation context coming from EJB3, and
- * adapts it to the Seam version of the API.
- * 
- * @author Gavin King
- *
- */
-class EJBInvocationContext implements InvocationContext, javax.interceptor.InvocationContext
-{
-   private javax.interceptor.InvocationContext context;
-
-   public EJBInvocationContext(javax.interceptor.InvocationContext context)
-   {
-      this.context = context;
-   }
-
-   public Map getContextData()
-   {
-      return context.getContextData();
-   }
-
-   public Method getMethod()
-   {
-      return context.getMethod();
-   }
-
-   public Object[] getParameters()
-   {
-      return context.getParameters();
-   }
-
-   public Object getTarget()
-   {
-      return context.getTarget();
-   }
-
-   public Object proceed() throws Exception
-   {
-      return context.proceed();
-   }
-
-   public void setParameters(Object[] params)
-   {
-      context.setParameters(params);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EventType.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EventType.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/EventType.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,17 +0,0 @@
-package org.jboss.seam.intercept;
-
-/**
- * The kinds of invocations that can be intercepted
- * by an EJB3 interceptor.
- * 
- * @author Gavin King
- *
- */
-enum EventType
-{
-   AROUND_INVOKE,
-   PRE_DESTORY,
-   POST_CONSTRUCT,
-   PRE_PASSIVATE,
-   POST_ACTIVATE
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/Interceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/Interceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/Interceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,253 +0,0 @@
-//$Id: Interceptor.java 10311 2009-04-06 16:14:09Z pete.muir at jboss.org $
-package org.jboss.seam.intercept;
-
-import static org.jboss.seam.util.EJB.AROUND_INVOKE;
-import static org.jboss.seam.util.EJB.POST_ACTIVATE;
-import static org.jboss.seam.util.EJB.POST_CONSTRUCT;
-import static org.jboss.seam.util.EJB.PRE_DESTROY;
-import static org.jboss.seam.util.EJB.PRE_PASSIVATE;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.annotations.intercept.PostActivate;
-import org.jboss.seam.annotations.intercept.PostConstruct;
-import org.jboss.seam.annotations.intercept.PrePassivate;
-import org.jboss.seam.util.Reflections;
-
-/**
- * Wraps and delegates to a Seam interceptor.
- * 
- * @author Gavin King
- */
-public final class Interceptor extends Reflections
-{
-   private Class<?> userInterceptorClass;
-   private Object statelessUserInterceptorInstance;
-   private Method aroundInvokeMethod;
-   private Method postConstructMethod;
-   private Method preDestroyMethod;
-   private Method postActivateMethod;
-   private Method prePassivateMethod;
-   private Method componentInjectorMethod;
-   private Method annotationInjectorMethod;
-   private Method interceptorEnabledMethod;
-   private InterceptorType type;
-   private Annotation annotation;
-   private Component component;
-   private boolean optimized;
-
-   private boolean isStateless()
-   {
-      return userInterceptorClass.isAnnotationPresent(org.jboss.seam.annotations.intercept.Interceptor.class) &&
-            userInterceptorClass.getAnnotation(org.jboss.seam.annotations.intercept.Interceptor.class).stateless();
-   }
-   
-   public Object createUserInterceptor()
-   {
-      if ( isStateless() )
-      {
-         return statelessUserInterceptorInstance;
-      }
-      else
-      {
-         try
-         {
-            Object userInterceptor = userInterceptorClass.newInstance();
-            if (componentInjectorMethod!=null)
-            {
-               Reflections.invokeAndWrap(componentInjectorMethod, userInterceptor, component);
-            }
-            if (annotationInjectorMethod!=null) 
-            {
-               Reflections.invokeAndWrap(annotationInjectorMethod, userInterceptor, annotation);
-            }
-            return userInterceptor;
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException(e);
-         }
-      }
-   }
-
-   public Class getUserInterceptorClass()
-   {
-      return userInterceptorClass;
-   }
-   
-   public InterceptorType getType()
-   {
-      return type;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "Interceptor(" + userInterceptorClass.getName() + ")";
-   }
-   
-   public Interceptor(Object interceptor, Component component)
-   {
-      userInterceptorClass = interceptor.getClass();
-      statelessUserInterceptorInstance = interceptor;
-      this.component = component;
-      init();
-   }
-   
-   public Interceptor(Class[] classes, Annotation annotation, Component component) 
-   {
-      if (classes.length!=1)
-      {
-         //TODO: remove this silly restriction!
-         throw new IllegalArgumentException("Must be exactly one interceptor when used as a meta-annotation");
-      }
-      userInterceptorClass = classes[0];
-      
-      try
-      {
-         statelessUserInterceptorInstance = userInterceptorClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new IllegalArgumentException("could not instantiate interceptor", e);
-      }
-      
-      this.annotation = annotation;
-      this.component = component;
-      
-      init();
-   }
-   
-
-   private void init()
-   {
-      for ( Method method : userInterceptorClass.getMethods() )
-      {
-         if ( !method.isAccessible() ) method.setAccessible(true);
-         if ( method.isAnnotationPresent(AROUND_INVOKE) || method.isAnnotationPresent(AroundInvoke.class) )
-         {
-            aroundInvokeMethod = method;
-         }
-         if ( method.isAnnotationPresent(POST_CONSTRUCT) || method.isAnnotationPresent(PostConstruct.class))
-         {
-            postConstructMethod = method;
-         }
-         if ( method.isAnnotationPresent(PRE_DESTROY) )
-         {
-            preDestroyMethod = method;
-         }
-         if ( method.isAnnotationPresent(PRE_PASSIVATE) || method.isAnnotationPresent(PrePassivate.class) )
-         {
-            prePassivateMethod = method;
-         }
-         if ( method.isAnnotationPresent(POST_ACTIVATE) || method.isAnnotationPresent(PostActivate.class) )
-         {
-            postActivateMethod = method;
-         }
-
-         Class[] params = method.getParameterTypes();
-         //if there is a method that takes the annotation, call it, to pass initialization info
-         if ( annotation!=null && params.length==1 && params[0]==annotation.annotationType() )
-         {
-            annotationInjectorMethod = method;
-            Reflections.invokeAndWrap(method, statelessUserInterceptorInstance, annotation);
-         }
-         //if there is a method that takes the component, call it
-         if ( params.length==1 && params[0]==Component.class )
-         {
-            componentInjectorMethod = method;
-            Reflections.invokeAndWrap(method, statelessUserInterceptorInstance, component);
-         }
-         // if there is an interceptor enabled method, store it
-         if ( "isInterceptorEnabled".equals(method.getName()) && method.getReturnType().equals(boolean.class) )
-         {
-            interceptorEnabledMethod = method;
-         }
-         
-      }
-
-      type = userInterceptorClass.isAnnotationPresent(org.jboss.seam.annotations.intercept.Interceptor.class) ?
-            userInterceptorClass.getAnnotation(org.jboss.seam.annotations.intercept.Interceptor.class).type() :
-            InterceptorType.SERVER;
-            
-      optimized = OptimizedInterceptor.class.isAssignableFrom(userInterceptorClass);
-   }
-   
-   public boolean isOptimized()
-   {
-      return optimized;
-   }
-   
-   public Object aroundInvoke(InvocationContext invocation, Object userInterceptor) throws Exception
-   {
-      return aroundInvokeMethod==null ?
-            invocation.proceed() :
-            Reflections.invoke( aroundInvokeMethod, userInterceptor, invocation );
-   }
-   
-   public Object postConstruct(InvocationContext invocation, Object userInterceptor) throws Exception
-   {
-      return postConstructMethod==null ?
-            invocation.proceed() :
-            Reflections.invoke( postConstructMethod, userInterceptor, invocation );
-   }
-   
-   public Object preDestroy(InvocationContext invocation, Object userInterceptor) throws Exception
-   {
-      return preDestroyMethod==null ?
-            invocation.proceed() :
-            Reflections.invoke( preDestroyMethod, userInterceptor, invocation );
-   }
-   
-   public Object prePassivate(InvocationContext invocation, Object userInterceptor) throws Exception
-   {
-      return prePassivateMethod==null ?
-            invocation.proceed() :
-            Reflections.invoke( prePassivateMethod, userInterceptor, invocation );
-   }
-   
-   public Object postActivate(InvocationContext invocation, Object userInterceptor) throws Exception
-   {
-      return postActivateMethod==null ?
-            invocation.proceed() :
-            Reflections.invoke( postActivateMethod, userInterceptor, invocation );
-   }
-   
-   /**
-    * Return true if the interceptor should be enabled for the component instance
-    * 
-    * Should only be called during deployment
-    */
-   public boolean isInterceptorEnabled()
-   {
-      if (interceptorEnabledMethod != null)
-      {
-         // Set up component metadata
-         if (componentInjectorMethod!=null)
-         {
-            Reflections.invokeAndWrap(componentInjectorMethod, statelessUserInterceptorInstance, component);
-         }
-         if (annotationInjectorMethod!=null) 
-         {
-            Reflections.invokeAndWrap(annotationInjectorMethod, statelessUserInterceptorInstance, annotation);
-         }
-         if (isOptimized())
-         {
-            return ( (OptimizedInterceptor) statelessUserInterceptorInstance ).isInterceptorEnabled(); 
-         }
-         else
-         {
-            return ((Boolean) Reflections.invokeAndWrap(interceptorEnabledMethod, statelessUserInterceptorInstance));
-         }
-      }
-      else
-      {
-         return true;
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/InvocationContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/InvocationContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/InvocationContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-package org.jboss.seam.intercept;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * A copy of the EE5 standard InvocationContext API.
- * We do this because some poor souls are still using
- * J2EE. Pray for them.
- * 
- * @author Gavin King
- *
- */
-public interface InvocationContext
-{
-   public Object getTarget();
-   public Map getContextData();
-   public Method getMethod();
-   public Object[] getParameters();
-   public Object proceed() throws Exception;
-   public void setParameters(Object[] params);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,223 +0,0 @@
-//$Id: JavaBeanInterceptor.java 9715 2008-12-04 08:00:42Z dan.j.allen $
-package org.jboss.seam.intercept;
-
-import java.lang.reflect.Method;
-
-import javassist.util.proxy.MethodHandler;
-import javassist.util.proxy.ProxyObject;
-
-import javax.servlet.http.HttpSessionActivationListener;
-import javax.servlet.http.HttpSessionEvent;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ComponentType;
-import org.jboss.seam.annotations.ReadOnly;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.core.Mutable;
-
-/**
- * Controller interceptor for JavaBean components
- * 
- * @author Gavin King
- */
-public class JavaBeanInterceptor extends RootInterceptor
-      implements MethodHandler
-{
-   private static final long serialVersionUID = -771725005103740533L;
-   
-   private final Object bean;
-   private final Class beanClass;
-   private transient boolean dirty;
-   
-   public JavaBeanInterceptor(Object bean, Component component)
-   {
-      super(InterceptorType.ANY);
-      this.bean = bean;
-      this.beanClass = component.getBeanClass();
-      init(component);
-   }
-
-   public Object invoke(final Object proxy, final Method method, final Method proceed, final Object[] params) throws Throwable
-   {
-
-      if ( params!=null )
-      {
-         if ( params.length==0 )
-         {
-            String methodName = method.getName();
-            if ( "finalize".equals(methodName) ) 
-            {
-               return proceed.invoke (proxy, params);
-            }
-            else if ( "writeReplace".equals(methodName) )
-            {
-               return this;
-            }
-            else if ( "clearDirty".equals(methodName) && !(bean instanceof Mutable) )
-            {
-               //clear and return the dirty flag
-               boolean result = dirty;
-               dirty = false;
-               return result;
-            }
-            else if ( "getComponent".equals(methodName) )
-            {
-               return getComponent();
-            }
-         }
-         else if ( params.length==1 && (params[0] instanceof HttpSessionEvent) )
-         {
-            String methodName = method.getName();
-            if ( "sessionDidActivate".equals(methodName) )
-            {
-               callPostActivate();
-               return (bean instanceof HttpSessionActivationListener) ? method.invoke(bean, params) : null;
-            }
-            else if ( "sessionWillPassivate".equals(methodName) )
-            {
-               callPrePassivate();
-               return (bean instanceof HttpSessionActivationListener) ? method.invoke(bean, params) : null;
-            }
-         }
-      }
-
-      if ( markDirty(method) )
-      {
-         //mark it dirty each time it gets called 
-         //this flag will be ignored if the bean 
-         //implements Mutable
-         dirty = true;
-      }
-   
-      //make default equals() method return true when called on itself
-      //by unwrapping the proxy
-      if ( method.getName().equals("equals") 
-               && method.getParameterTypes().length == 1
-               && method.getParameterTypes()[0] == Object.class
-               && params[0] == proxy) 
-      {
-            return interceptInvocation(method, new Object[]{bean});
-      }
-
-      
-      Object result = interceptInvocation(method, params);
-      return result==bean ? proxy : result;
-
-   }
-
-   private boolean markDirty(Method method)
-   {
-      return !getComponent().getBeanClass().isAnnotationPresent(ReadOnly.class) && 
-            !method.isAnnotationPresent(ReadOnly.class);
-   }
-   
-   public void postConstruct()
-   {
-      super.postConstruct(bean);
-      callPostConstruct();
-   }
-
-   private void callPostConstruct()
-   {
-      final Component component = getComponent();
-      if (!component.hasPostConstructMethod())
-      {
-         return;
-      }
-      
-      InvocationContext context = new RootInvocationContext( bean, component.getPostConstructMethod(), new Object[0] )
-      {
-         @Override
-         public Object proceed() throws Exception
-         {
-            component.callPostConstructMethod(bean);
-            return null;
-         }
-         
-      };
-      invokeAndHandle(context, EventType.POST_CONSTRUCT);
-   }
-
-   private void callPrePassivate()
-   {
-      final Component component = getComponent();
-      if (!component.hasPrePassivateMethod())
-      {
-         return;
-      }
-      
-      InvocationContext context = new RootInvocationContext( bean, component.getPrePassivateMethod(), new Object[0] )
-      {
-         @Override
-         public Object proceed() throws Exception
-         {
-            component.callPrePassivateMethod(bean);
-            return null;
-         }
-         
-      };
-      invokeAndHandle(context, EventType.PRE_PASSIVATE);
-   }
-
-   private void callPostActivate()
-   {
-      final Component component = getComponent();
-      if (!component.hasPostActivateMethod())
-      {
-         return;
-      }
-      
-      RootInvocationContext context = new RootInvocationContext(bean, component.getPostActivateMethod(), new Object[0])
-      {
-         @Override
-         public Object proceed() throws Exception
-         {
-            component.callPostActivateMethod(bean);
-            return null;
-         }
-         
-      };
-      invokeAndHandle(context, EventType.POST_ACTIVATE);
-   }
-
-   private Object interceptInvocation(final Method method, final Object[] params) throws Exception
-   {
-      return invoke( new RootInvocationContext(bean, method, params), EventType.AROUND_INVOKE );
-   }
-   
-   // TODO: copy/paste from ClientSide interceptor
-   Object readResolve()
-   {
-      Component comp = null;
-      try
-      {
-         comp = getComponent();
-      }
-      catch (IllegalStateException ise) {
-         //this can occur when tomcat deserializes persistent sessions
-      }
-      
-      try
-      {
-         if (comp==null)
-         {
-            ProxyObject proxy = Component.createProxyFactory( 
-                  ComponentType.JAVA_BEAN, 
-                  beanClass, 
-                  Component.getBusinessInterfaces(beanClass)
-               ).newInstance();
-            proxy.setHandler(this);
-            return proxy;
-         }
-         else
-         {
-            return comp.wrap(bean, this);
-         }
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/OptimizedInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/OptimizedInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/OptimizedInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.intercept;
-
-/**
- * Interface that may be optionally implemented by an
- * interceptor, to make the stacktrace smaller.
- * 
- * @author Gavin King
- * @author Pete Muir
- *
- */
-public interface OptimizedInterceptor
-{
-   
-   public Object aroundInvoke(InvocationContext ic) throws Exception;
-   
-   /**
-    * Returns true if this interceptor should be enabled. The component and the
-    * annotation will be injected into the interceptor instance before this 
-    * method is called, and can be used to decide whether the interceptor should
-    * be enabled
-    */
-   public boolean isInterceptorEnabled();
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/Proxy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/Proxy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/Proxy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,8 +0,0 @@
-package org.jboss.seam.intercept;
-
-import java.io.Serializable;
-
-public interface Proxy extends Serializable
-{
-   public Object writeReplace();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/RootInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/RootInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/RootInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,241 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.intercept;
-
-import java.io.Serializable;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.util.List;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Mutable;
-import org.jboss.seam.util.EJB;
-
-/**
- * Abstract superclass of all controller interceptors
- * 
- * @author Gavin King
- */
-public class RootInterceptor implements Serializable
-{
-   private static final long serialVersionUID = 8041533870186694663L;
-   private static final LogProvider log = Logging.getLogProvider(RootInterceptor.class);
-   
-   private final InterceptorType type;
-   private boolean isSeamComponent;
-   private String componentName;
-   private List<Object> userInterceptors;
-   
-   private transient Component component; //a cache of the Component reference for performance
-
-   protected RootInterceptor(InterceptorType type)
-   {
-      this.type = type;
-   }
-   
-   protected void init(Component component)
-   {
-      isSeamComponent = true;
-      componentName = component.getName();
-      userInterceptors = component.createUserInterceptors(type);
-      this.component = component;
-   }
-   
-   protected void initNonSeamComponent()
-   {
-      isSeamComponent = false;
-   }
-   
-   protected void postConstruct(Object bean)
-   {
-      // initialize the bean instance
-      if (isSeamComponent)
-      {
-         try
-         {
-            getComponent().initialize(bean);
-         }
-         catch (RuntimeException e)
-         {
-            throw e;
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException("exception initializing EJB component", e);
-         }
-      }      
-   }
-
-   protected void invokeAndHandle(InvocationContext invocation, EventType invocationType)
-   {
-      try
-      {
-         invoke(invocation, invocationType);
-      }
-      catch (RuntimeException e)
-      {
-         throw e;
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("exception in EJB lifecycle callback", e);
-      }
-   }
-   
-   protected Object invoke(InvocationContext invocation, EventType invocationType) throws Exception
-   {
-      if ( !isSeamComponent || !Lifecycle.isApplicationInitialized())
-      {
-         //not a Seam component
-         return invocation.proceed();
-      }
-      else if ( Contexts.isEventContextActive() || Contexts.isApplicationContextActive() ) //not sure about the second bit (only needed at init time!)
-      {
-
-         // a Seam component, and Seam contexts exist
-         return createInvocationContext(invocation, invocationType).proceed();
-      }
-      else
-      {            
-         //if invoked outside of a set of Seam contexts,
-         //set up temporary Seam EVENT and APPLICATION
-         //contexts just for this call
-         
-         Lifecycle.beginCall();         
-         try
-         {
-            return createInvocationContext(invocation, invocationType).proceed();
-         }
-         finally
-         {
-            Lifecycle.endCall();
-         }
-      }
-   }
-
-   private InvocationContext createInvocationContext(InvocationContext invocation, EventType eventType) throws Exception
-   {
-      if ( isProcessInterceptors( invocation.getMethod(), invocation.getTarget() ) )
-      {
-         if ( log.isTraceEnabled() ) 
-         {
-            log.trace( "intercepted: " + getInterceptionMessage(invocation, eventType) );
-         }
-         return createSeamInvocationContext(invocation, eventType);
-      }
-      else 
-      {
-         if ( log.isTraceEnabled() ) 
-         {
-            log.trace( "not intercepted: " + getInterceptionMessage(invocation, eventType) );
-         }
-         return invocation;
-      }
-   }
-
-   private SeamInvocationContext createSeamInvocationContext(InvocationContext invocation, EventType eventType) throws Exception
-   {
-      return EJB.INVOCATION_CONTEXT_AVAILABLE ?
-            createEE5SeamInvocationContext(invocation, eventType) :
-            createNonEE5SeamInvocationContext(invocation, eventType);
-   }
-
-   private SeamInvocationContext createNonEE5SeamInvocationContext(InvocationContext invocation, EventType eventType)
-   {
-      return new SeamInvocationContext( invocation, eventType, userInterceptors, getComponent().getInterceptors(type) );
-   }
-   
-   private static final Constructor CONSTRUCTOR;
-   static
-   {
-      if ( EJB.INVOCATION_CONTEXT_AVAILABLE )
-      {
-         try
-         {
-            Class[] paramTypes = {InvocationContext.class, EventType.class, List.class, List.class};
-            CONSTRUCTOR = Class.forName("org.jboss.seam.intercept.EE5SeamInvocationContext").getConstructor(paramTypes);
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException(e);
-         }
-      }
-      else
-      {
-         CONSTRUCTOR = null;
-      }
-      
-   }
-
-   private SeamInvocationContext createEE5SeamInvocationContext(InvocationContext invocation, EventType eventType)
-   {
-      try
-      {
-         return (SeamInvocationContext) CONSTRUCTOR.newInstance( invocation, eventType, userInterceptors, getComponent().getInterceptors(type) );
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   private String getInterceptionMessage(InvocationContext invocation, EventType eventType)
-   {
-      return getComponent().getName() + '.' + 
-            ( eventType==EventType.AROUND_INVOKE ? invocation.getMethod().getName() : eventType );
-   }
-
-   private boolean isProcessInterceptors(Method method, Object bean)
-   {
-      boolean res = isSeamComponent && 
-            getComponent().isInterceptionEnabled() &&
-            !isBypassed(method) &&
-            !isClearDirtyMethod(method, bean);
-
-      return res;
-   }
-
-   private boolean isBypassed(Method method)
-   {
-      return method!=null && method.isAnnotationPresent(BypassInterceptors.class);
-   }
-
-   private boolean isClearDirtyMethod(Method method, Object bean)
-   {
-      return bean instanceof Mutable &&
-            method!=null &&
-            method.getName().equals("clearDirty") &&
-            method.getParameterTypes().length==0;
-   }
-   
-   protected Component getComponent()
-   {
-      if (isSeamComponent && component==null) 
-      {
-         component = Seam.componentForName(componentName);
-      }
-      return component;
-   }
-   
-   protected boolean isSeamComponent()
-   {
-      return isSeamComponent;
-   }
-
-   protected String getComponentName()
-   {
-      return componentName;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/RootInvocationContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/RootInvocationContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/RootInvocationContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,59 +0,0 @@
-package org.jboss.seam.intercept;
-
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.seam.util.Reflections;
-
-/**
- * InvocationContext for use with CGLIB-based interceptors.
- * 
- * @author Gavin King
- *
- */
-class RootInvocationContext implements InvocationContext
-{
-   private final Object bean;
-   private final Method method;
-   private Object[] params;
-   private final Map contextData = new HashMap();
-
-   public RootInvocationContext(Object bean, Method method, Object[] params)
-   {
-      this.bean = bean;
-      this.method = method;
-      this.params = params;
-   }
-   
-   public Object proceed() throws Exception
-   {     
-      method.setAccessible(true);
-      return Reflections.invoke(method, bean, params);
-   }
-
-   public Object getTarget()
-   {
-      return bean;
-   }
-
-   public Map getContextData()
-   {
-      return contextData;
-   }
-
-   public Method getMethod()
-   {
-      return method;
-   }
-
-   public Object[] getParameters()
-   {
-      return params;
-   }
-
-   public void setParameters(Object[] newParams)
-   {
-      params = newParams;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/SeamInvocationContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/SeamInvocationContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/SeamInvocationContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,88 +0,0 @@
-//$Id: SeamInvocationContext.java 5537 2007-06-25 23:59:31Z gavin $
-package org.jboss.seam.intercept;
-
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Map;
-
-
-
-/**
- * Adapts from EJB interception to Seam component interceptors
- * 
- * @author Gavin King
- */
-class SeamInvocationContext implements InvocationContext
-{
-   
-   private final EventType eventType;
-   private final InvocationContext context;
-   private final List<Interceptor> interceptors;
-   private final List<Object> userInterceptors;
-   int location = 0;
-
-   public SeamInvocationContext(InvocationContext context, EventType type, List<Object> userInterceptors, List<Interceptor> interceptors)
-   {
-      this.context = context;
-      this.interceptors = interceptors;
-      this.userInterceptors = userInterceptors;
-      this.eventType = type;
-   }
-   
-   public Object getTarget()
-   {
-      return context.getTarget();
-   }
-
-   public Map getContextData()
-   {
-      return context.getContextData();
-   }
-
-   public Method getMethod()
-   {
-      return context.getMethod();
-   }
-
-   public Object[] getParameters()
-   {
-      return context.getParameters();
-   }
-
-   public Object proceed() throws Exception
-   {
-      if ( location==interceptors.size() )
-      {
-         return context.proceed();
-      }
-      else
-      {
-         Object userInterceptor = userInterceptors.get(location);
-         Interceptor interceptor = interceptors.get(location);
-         location++;
-         switch (eventType)
-         {
-            case AROUND_INVOKE:
-               if ( interceptor.isOptimized() )
-               {
-                  return ( (OptimizedInterceptor) userInterceptor ).aroundInvoke(this);
-               }
-               else
-               {
-                  return interceptor.aroundInvoke(this, userInterceptor);
-               }
-            case POST_CONSTRUCT: return interceptor.postConstruct(this, userInterceptor);
-            case PRE_DESTORY: return interceptor.preDestroy(this, userInterceptor);
-            case PRE_PASSIVATE: return interceptor.prePassivate(this, userInterceptor);
-            case POST_ACTIVATE: return interceptor.postActivate(this, userInterceptor);
-            default: throw new IllegalArgumentException("no InvocationType");
-         }
-      }
-   }
-
-   public void setParameters(Object[] params)
-   {
-      context.setParameters(params);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/SessionBeanInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/SessionBeanInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/SessionBeanInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,118 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.intercept;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.ejb.PostActivate;
-import javax.ejb.PrePassivate;
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.InvocationContext;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-
-/**
- * Controller interceptor for server-side interceptors of
- * EJB3 session bean components.
- * 
- * @author Gavin King
- */
-public class SessionBeanInterceptor extends RootInterceptor
-{
-   private static final long serialVersionUID = -7474586917199426345L;
-   private static final LogProvider log = Logging.getLogProvider(SessionBeanInterceptor.class);
-   
-   public static ThreadLocal<Component> COMPONENT = new ThreadLocal<Component>();
-
-   /**
-    * Called when instantiated by EJB container.
-    * (In this case it might be a Seam component,
-    * but we won't know until postConstruct() is
-    * called.)
-    */
-   public SessionBeanInterceptor()
-   {
-      super(InterceptorType.SERVER);
-   }
-   
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      return invoke( new EJBInvocationContext(invocation), EventType.AROUND_INVOKE);
-   }
-   
-   @PrePassivate
-   public void prePassivate(InvocationContext invocation)
-   {
-      invokeAndHandle( new EJBInvocationContext(invocation), EventType.PRE_PASSIVATE);
-   }
-   
-   @PostActivate
-   public void postActivate(InvocationContext invocation)
-   {
-      invokeAndHandle( new EJBInvocationContext(invocation), EventType.POST_ACTIVATE);
-   }
-   
-   @PreDestroy
-   public void preDestroy(InvocationContext invocation)
-   {
-      invokeAndHandle( new EJBInvocationContext(invocation), EventType.PRE_DESTORY);
-   }
-   
-   @PostConstruct
-   public void postConstruct(InvocationContext invocation)
-   {
-      Component invokingComponent = SessionBeanInterceptor.COMPONENT.get();
-      Object bean = invocation.getTarget();
-      if ( invokingComponent!=null && invokingComponent.getBeanClass().isInstance(bean) )
-      {
-         //the session bean was obtained by the application by
-         //calling Component.getInstance(), could be a role
-         //other than the default role
-         //note: minor bug here, since if we got another instance of the same
-         //      bean from JNDI or @EJB while constructing a component,
-         //      or in an interceptor while calling a component,
-         //      this will cause that bean to think it is an instance of the
-         //      component role (rather than the default role)
-         if ( log.isTraceEnabled() ) 
-         {
-            log.trace("post construct phase for instance of component: " + invokingComponent.getName());
-         }
-         init(invokingComponent);
-      }
-      else if ( bean.getClass().isAnnotationPresent(Name.class) )
-      {
-         //the session bean was obtained by the application from
-         //JNDI, or @EJB (or it was an MDB), so assume the default role
-         //TODO: look at more than just @Name, consider components.xml
-         String defaultComponentName = bean.getClass().getAnnotation(Name.class).value();
-         if ( log.isTraceEnabled() ) 
-         {
-            log.trace("post construct phase for component instantiated outside Seam, assuming default role: " + defaultComponentName);
-         }
-         init( Seam.componentForName(defaultComponentName) );
-      }
-      else
-      {
-         if ( log.isTraceEnabled() ) 
-         {
-            log.trace("post construct phase for non-component bean");
-         }
-         initNonSeamComponent();
-      }
-      
-      postConstruct(bean);
-      invokeAndHandle( new EJBInvocationContext(invocation), EventType.POST_CONSTRUCT );
-   }
- 
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/intercept/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * Implementation of the Seam interceptor
- * stack.
- * 
- * @see org.jboss.seam.annotations.intercept
- */
-package org.jboss.seam.intercept;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/Locale.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/Locale.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/Locale.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,34 +0,0 @@
-package org.jboss.seam.international;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Manager component for the current locale that is
- * aware of the selected locale
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at Name("org.jboss.seam.core.locale")
- at Install(precedence=FRAMEWORK, dependencies="org.jboss.seam.international.localeSelector")
- at BypassInterceptors
-public class Locale extends org.jboss.seam.core.Locale
-{
-
-   @Unwrap @Override
-   public java.util.Locale getLocale()
-   {
-      return Contexts.isSessionContextActive() ?
-            LocaleSelector.instance().getLocale() :
-            super.getLocale();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/LocaleConfig.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/LocaleConfig.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/LocaleConfig.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,153 +0,0 @@
-package org.jboss.seam.international;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import javax.faces.FactoryFinder;
-import javax.faces.application.Application;
-import javax.faces.application.ApplicationFactory;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Strings;
-
-/**
- * Configures the JSF locale support from the Seam container.
- * 
- * <p>
- * This component merely passes on configuration settings to the JSF runtime, so
- * you still have to option of configure the locale support in the JSF
- * configuration file. However, if you enable this component, it will overwrite
- * any settings from that file.
- * </p>
- * 
- * <code>
- *   &lt;i18n:locale-config default-locale="en" supported-locales="en fr de"/&gt;
- * </code>
- * 
- * @author Dan Allen
- */
- at Scope(APPLICATION)
- at BypassInterceptors
- at Startup
- at Name("org.jboss.seam.international.localeConfig")
- at Install(value = false, precedence = BUILT_IN, classDependencies = "javax.faces.context.FacesContext")
-public class LocaleConfig
-{
-   private String defaultLocale;
-
-   private List<String> supportedLocales;
-   
-   private static final LogProvider log = Logging.getLogProvider(LocaleConfig.class);
-
-   @Create
-   public void initLocaleConfig()
-   {
-      Application application = getApplication();
-      if (application == null)
-      {
-         return;
-      }
-
-      String defaultAsString = getDefaultLocale();
-      if (defaultAsString != null)
-      {
-         application.setDefaultLocale(getLocaleFromString(defaultAsString));
-      }
-
-      List<String> supportedAsStrings = getSupportedLocales();
-      int numSupported = supportedAsStrings != null ? supportedAsStrings.size() : 0;
-      if (numSupported > 0)
-      {
-         // use set to prevent duplicates, yet retain order just to be nice
-         Set<java.util.Locale> locales = new LinkedHashSet<java.util.Locale>(numSupported);
-         for (String supportedAsString : supportedAsStrings)
-         {
-            locales.add(getLocaleFromString(supportedAsString));
-         }
-         application.setSupportedLocales(locales);
-      }
-   }
-
-   public String getDefaultLocale()
-   {
-      return defaultLocale;
-   }
-
-   public void setDefaultLocale(String defaultLocale)
-   {
-      this.defaultLocale = defaultLocale;
-      log.debug("Default locale was set to " + this.defaultLocale);
-   }
-
-   public List<String> getSupportedLocales()
-   {
-      return supportedLocales;
-   }
-
-   public void setSupportedLocales(List<String> supportedLocales)
-   {
-      this.supportedLocales = supportedLocales;
-      log.debug("Supported locales are " + this.supportedLocales);
-   }
-
-   public static LocaleConfig instance()
-   {
-      return (LocaleConfig) Component.getInstance(LocaleConfig.class, ScopeType.APPLICATION);
-   }
-
-   private java.util.Locale getLocaleFromString(String localeString)
-   {
-      if (localeString == null || localeString.length() < 2)
-      {
-         throw new IllegalArgumentException("Invalid locale string: " + localeString);
-      }
-
-      StringTokenizer tokens = new StringTokenizer(localeString, "-_");
-      String language = tokens.hasMoreTokens() ? tokens.nextToken() : null;
-      String country = tokens.hasMoreTokens() ? tokens.nextToken() : null;
-      String variant = tokens.hasMoreTokens() ? tokens.nextToken() : null;
-      if (!Strings.isEmpty(variant))
-      {
-         return new java.util.Locale(language, country, variant);
-      }
-      else if (!Strings.isEmpty(country))
-      {
-         return new java.util.Locale(language, country);
-      }
-      else
-      {
-         return new java.util.Locale(language);
-      }
-   }
-
-   private Application getApplication()
-   {
-      try
-      {
-         ApplicationFactory factory = (ApplicationFactory) FactoryFinder
-            .getFactory(FactoryFinder.APPLICATION_FACTORY);
-         return factory.getApplication();
-      }
-      catch (IllegalStateException e)
-      {
-         log.warn("JSF is not properly initialized, see http://jira.jboss.org/jira/browse/JBSEAM-4401");
-         // just in case, for units and the like
-         // if we can't do it, it just wan't meant to be
-         return null;
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/LocaleSelector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/LocaleSelector.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/LocaleSelector.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,217 +0,0 @@
-package org.jboss.seam.international;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-import javax.faces.context.FacesContext;
-import javax.faces.event.ValueChangeEvent;
-import javax.faces.model.SelectItem;
-import javax.servlet.ServletRequest;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.faces.Selector;
-import org.jboss.seam.util.Strings;
-import org.jboss.seam.web.ServletContexts;
-
-/**
- * Selects the current user's locale
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.SESSION)
- at Name("org.jboss.seam.international.localeSelector")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class LocaleSelector extends Selector
-{
-   private static final long serialVersionUID = -6087667065688208261L;
-   
-   private String language;
-   private String country;
-   private String variant;
-   
-   @Create
-   public void initLocale()
-   {
-      String localeString = getCookieValueIfEnabled();
-      if (localeString!=null) setLocaleString(localeString);
-   }
-   
-   @Override
-   protected String getCookieName()
-   {
-      return "org.jboss.seam.core.Locale";
-   }
-   
-   /**
-    * Force the resource bundle to reload, using the current locale,
-    * and raise the org.jboss.seam.localeSelected event.
-    */
-   public void select()
-   {
-      FacesContext.getCurrentInstance().getViewRoot().setLocale( getLocale() );
-      //Contexts.removeFromAllContexts("org.jboss.seam.core.resourceBundle");
-      Contexts.removeFromAllContexts("org.jboss.seam.international.messages");
-      
-      setCookieValueIfEnabled( getLocaleString() );
-
-      if ( Events.exists() ) 
-      {
-          Events.instance().raiseEvent( "org.jboss.seam.localeSelected", getLocaleString() );
-      }
-   }
-   
-   public void select(ValueChangeEvent event) 
-   {
-      setLocaleString( (String) event.getNewValue() );
-      select();
-   }
-
-   /**
-    * Set the language and force resource bundle reload, useful for quick action links:
-    * <tt>&lt;h:commandLink value="DE" action="#{localeSelector.selectLanguage('de')}"/>"/></tt>
-    */
-   public void selectLanguage(String language) {
-      setLanguage(language);
-      select();
-   }
-
-   public Locale calculateLocale(Locale jsfLocale)
-   {
-      if ( !Strings.isEmpty(variant) )
-      {
-         return new java.util.Locale(language, country, variant);
-      }
-      else if ( !Strings.isEmpty(country) )
-      {
-         return new java.util.Locale(language, country);
-      }
-      else if ( !Strings.isEmpty(language) )
-      {
-         return new java.util.Locale(language);
-      }
-      else
-      {
-         return jsfLocale;
-      }
-   }
-   
-   public void setLocale(Locale locale)
-   {
-      language = Strings.nullIfEmpty( locale.getLanguage() );
-      country = Strings.nullIfEmpty( locale.getCountry() );
-      variant = Strings.nullIfEmpty( locale.getVariant() );
-   }
-   
-   public String getLocaleString()
-   {
-      return getLocale().toString();
-   }
-   
-   public void setLocaleString(String localeString)
-   {
-      StringTokenizer tokens = new StringTokenizer(localeString, "-_");
-      language = tokens.hasMoreTokens() ? tokens.nextToken() : null;
-      country =  tokens.hasMoreTokens() ? tokens.nextToken() : null;
-      variant =  tokens.hasMoreTokens() ? tokens.nextToken() : null;
-   }
-   
-   public List<SelectItem> getSupportedLocales()
-   {
-      List<SelectItem> selectItems = new ArrayList<SelectItem>();
-      Iterator<Locale> locales = FacesContext.getCurrentInstance().getApplication().getSupportedLocales();
-      while ( locales.hasNext() )
-      {
-         Locale locale = locales.next();
-         if ( !Strings.isEmpty( locale.getLanguage() ) )
-         {
-            selectItems.add( new SelectItem( locale.toString(), locale.getDisplayName(locale) ) );
-         }
-      }
-      return selectItems;
-   }
-
-   /**
-    * Get the selected locale
-    */
-   public Locale getLocale() 
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if (facesContext!=null)
-      {
-         //Note: this does a double dispatch back to LocaleSelector.calculateLocale()
-         return facesContext.getApplication().getViewHandler().calculateLocale(facesContext);
-      }
-      
-      ServletContexts servletContexts = ServletContexts.getInstance();
-      if (servletContexts!=null)
-      {
-         ServletRequest request = servletContexts.getRequest();
-         if (request!=null)
-         {
-            return calculateLocale( request.getLocale() );
-         }
-      }
-
-      return calculateLocale( Locale.getDefault() );
-   }
-
-   public static LocaleSelector instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-      return (LocaleSelector) Component.getInstance(LocaleSelector.class, ScopeType.SESSION);
-   }
-
-   public String getCountry() 
-   {
-      if (country==null) return getLocale().getCountry();
-      return country;
-   }
-
-   public void setCountry(String country) 
-   {
-      setDirty(this.country, country);
-      this.country = country;
-   }
-
-   public String getLanguage() 
-   {
-      if (language==null) return getLocale().getLanguage();
-      return language;
-   }
-
-   public void setLanguage(String language) 
-   {
-      setDirty(this.language, language);
-      this.language = language;
-   }
-
-   public String getVariant() 
-   {
-      if (variant==null) return getLocale().getVariant();
-      return variant;
-   }
-
-   public void setVariant(String variant) 
-   {
-      setDirty(this.variant, variant);
-      this.variant = variant;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/Messages.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/Messages.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/Messages.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,115 +0,0 @@
-package org.jboss.seam.international;
-
-import static org.jboss.seam.ScopeType.EVENT;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.AbstractMap;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.SeamResourceBundle;
-
-/**
- * Factory for a Map that contains interpolated messages defined in the Seam
- * ResourceBundle.
- * 
- * @see org.jboss.seam.core.SeamResourceBundle
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at BypassInterceptors
- at Name("org.jboss.seam.international.messagesFactory")
- at Install(precedence = BUILT_IN)
-public class Messages {
-    protected Map<String, String> createMap() {
-        final java.util.ResourceBundle bundle = SeamResourceBundle.getBundle();
-
-        if (bundle == null) {
-            return null;
-        }
-
-        return new AbstractMap<String, String>() {
-            @Override
-            public String get(Object key) {
-                if (key instanceof String) {
-                    String resourceKey = (String) key;
-
-                    String resource;
-                    try {
-                        resource = bundle.getString(resourceKey);
-                    } catch (MissingResourceException mre) {
-                        return resourceKey;
-                    }
-
-                    return (resource == null) ? resourceKey : resource;
-
-                } else {
-                    return null;
-                }
-            }
-
-            @Override
-            public Set<Map.Entry<String, String>> entrySet() {
-                Set<Map.Entry<String, String>> entrySet = new HashSet<Map.Entry<String, String>>();
-
-                Enumeration<String> keys = bundle.getKeys();
-
-                while (keys.hasMoreElements()) {
-                    final String key = keys.nextElement();
-
-                    entrySet.add(new Map.Entry<String, String>() {
-
-                        public String getKey() {
-                            return key;
-                        }
-
-                        public String getValue() {
-                            return get(key);
-                        }
-
-                        public String setValue(String arg0) {
-                            throw new UnsupportedOperationException("not implemented");
-                        }
-                    });
-                }
-
-                return entrySet;
-            }
-
-        };
-
-    }
-
-    /**
-     * Create the Map and cache it in the EVENT scope. No need to cache it in
-     * the SESSION scope, since it is inexpensive to create.
-     * 
-     * @return a Map that interpolates messages in the Seam ResourceBundle
-     */
-    @Factory(value = "org.jboss.seam.international.messages", autoCreate = true, scope = EVENT)
-    public Map<String, String> getMessages() {
-        return createMap();
-    }
-
-    /**
-     * @return the message Map instance
-     */
-    public static Map<String, String> instance() {
-        if (!Contexts.isSessionContextActive()) {
-            throw new IllegalStateException("no event context active");
-        }
-        return (Map<String, String>) Component.getInstance("org.jboss.seam.international.messages", true);
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/StatusMessage.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/StatusMessage.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/StatusMessage.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,122 +0,0 @@
-package org.jboss.seam.international;
-
-import java.io.Serializable;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.SeamResourceBundle;
-import org.jboss.seam.util.Strings;
-
-/**
- * A status message which can be created in the business layer and displayed
- * in the view layer
- *
- * @author Pete Muir
- *
- */
-public class StatusMessage implements Serializable
-{
-   
-   /**
-    * The severity of the status message
-    *
-    */
-   public enum Severity
-   {
-      INFO, 
-      WARN, 
-      ERROR, 
-      FATAL;
-   }
-   
-   private String summaryTemplate;
-   private String summary;
-   private String detailTemplate;
-   private String detail;
-   private Severity severity = Severity.INFO;
-   
-   /**
-    * Create a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used.
-    * 
-    */
-   public StatusMessage(Severity severity, String key, String detailKey, String defaultMessageTemplate, String defaultMessageDetailTemplate)
-   {
-      this.summaryTemplate = getBundleMessage(key, defaultMessageTemplate);
-      this.detailTemplate = getBundleMessage(detailKey, defaultMessageDetailTemplate);
-      if ( !Strings.isEmpty(summaryTemplate) )
-      {
-         this.severity = severity;
-      }
-   }
-   
-   public boolean isEmpty()
-   {
-      return Strings.isEmpty(summary) && Strings.isEmpty(summaryTemplate);
-   }
-   
-   public void interpolate(Object... params)
-   {
-      if (!Strings.isEmpty(summaryTemplate))
-      {
-         this.summary = Interpolator.instance().interpolate(summaryTemplate, params);
-      }
-      if (!Strings.isEmpty(detailTemplate))
-      {
-         this.detail = Interpolator.instance().interpolate(detailTemplate, params);
-      }
-   }
-
-   /**
-    * Get the message
-    * 
-    */
-   public String getSummary()
-   {
-      return summary;
-   }
-   
-   /**
-    * Get the message severity
-    */
-   public Severity getSeverity()
-   {
-      return severity;
-   }
-   
-   public String getDetail()
-   {
-      return detail;
-   }
-   
-   public static String getBundleMessage(String key, String defaultMessageTemplate)
-   {
-      String messageTemplate = defaultMessageTemplate;
-      if ( key!=null )
-      {
-         ResourceBundle resourceBundle = SeamResourceBundle.getBundle();
-         if ( resourceBundle!=null ) 
-         {
-            try
-            {
-               String bundleMessage = resourceBundle.getString(key);
-               if (bundleMessage!=null) 
-               {
-                  messageTemplate = bundleMessage;
-               }
-            }
-            catch (MissingResourceException mre) {} //swallow
-         }
-      }
-      return messageTemplate;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "[" + severity + "] " + summary + " (" + detail +")";
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/StatusMessages.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/StatusMessages.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/StatusMessages.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,407 +0,0 @@
-package org.jboss.seam.international;
-
-import static org.jboss.seam.international.StatusMessage.Severity.INFO;
-import static org.jboss.seam.international.StatusMessage.Severity.WARN;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.validation.ConstraintViolation;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.international.StatusMessage.Severity;
-
-/**
- * Abstract base class for providing status messages. View layers should provide
- * a concrete implementation.
- * 
- * @author Pete Muir
- *
- */
-public abstract class StatusMessages implements Serializable
-{
-   private static final long serialVersionUID = -5395975397632138270L;
-   
-   public static final String COMPONENT_NAME = "org.jboss.seam.international.statusMessages";
-   
-   private List<StatusMessage> messages = new ArrayList<StatusMessage>();
-   private Map<String, List<StatusMessage>> keyedMessages = new HashMap<String, List<StatusMessage>>();
-   
-   private transient List<Runnable> tasks;
-   
-   protected List<StatusMessage> getMessages()
-   {
-      return messages;
-   }
-   
-   protected Map<String, List<StatusMessage>> getKeyedMessages()
-   {
-      return keyedMessages;
-   }
-   
-   /**
-    * Clear all status messages
-    */
-   public void clear()
-   {
-      messages.clear();
-      keyedMessages.clear();
-   }
-   
-   public void clearKeyedMessages(String id)
-   {
-      keyedMessages.remove(id);
-   }
-   
-   public void clearGlobalMessages()
-   {
-      messages.clear();
-   }
-   
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    */
-   public void add(Severity severity, String key, String detailKey, String messageTemplate, String messageDetailTemplate, final Object... params)
-   {
-      final StatusMessage message = new StatusMessage(severity, key, detailKey, messageTemplate, messageDetailTemplate);
-      if (!message.isEmpty())
-      {
-         messages.add(message);
-         getTasks().add(
-               new Runnable() 
-               {
-                  
-                  public void run() 
-                  {
-                      message.interpolate(params);
-                  }
-                  
-               }
-         );
-      }
-   }
-   
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used. 
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    */
-   public void addToControl(String id, Severity severity, String key, String messageTemplate, final Object... params)
-   {
-      final StatusMessage message = new StatusMessage(severity, key, null, messageTemplate, null);
-      if (!message.isEmpty())
-      {         
-         if (keyedMessages.containsKey(id))
-         {
-            keyedMessages.get(id).add(message);
-         }
-         else
-         {
-            List<StatusMessage> list = new ArrayList<StatusMessage>();
-            list.add(message);
-            keyedMessages.put(id, list);
-         }
-         getTasks().add(
-               new Runnable() 
-               {
-                  
-                  public void run() 
-                  {
-                     message.interpolate(params);
-                  }
-                  
-               }
-         );
-      }      
-   }
-
-   /**
-    * Create a new status message, with the messageTemplate is as the message.
-    *
-    * A severity of INFO will be used, and you can specify paramters to be
-    * interpolated
-    */
-   public void add(String messageTemplate, Object... params)
-   {
-      add(INFO, messageTemplate, params);
-   }
-
-   /**
-    * Create a new status message, with the messageTemplate is as the message.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    */
-   public void add(Severity severity, String messageTemplate, Object... params)
-   {
-      add(severity, null, null, messageTemplate, null, params);
-   }
-
-   /**
-    * Create a new status message, with the messageTemplate is as the message.
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * A severity of INFO will be used, and you can specify parameters to be 
-    * interpolated
-    * 
-    */
-   public void addToControl(String id, String messageTemplate, Object... params)
-   {
-      addToControl(id, INFO, null, messageTemplate, params);
-   }
-
-   /**
-    * Create a new status message, with the messageTemplate is as the message.
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    */
-   public void addToControl(String id, Severity severity, String messageTemplate, Object... params)
-   {
-      addToControl(id, severity, null, messageTemplate, params);
-   }
-
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used.
-    * 
-    * A severity of INFO will be used, and you can specify parameters to be 
-    * interpolated
-    */
-   public void addFromResourceBundle(String key, Object... params)
-   {
-      addFromResourceBundle(INFO, key, params);
-   }
-
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    */
-   public void addFromResourceBundle(Severity severity, String key, Object... params)
-   {
-      addFromResourceBundleOrDefault(severity, key, key, params);
-   }
-
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used.
-    * 
-    * A severity of INFO will be used, and you can specify parameters to be 
-    * interpolated
-    * 
-    */
-   public void addFromResourceBundleOrDefault(String key, String defaultMessageTemplate, Object... params)
-   {
-      addFromResourceBundleOrDefault(INFO, key, defaultMessageTemplate, params);
-   }
-
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    */
-   public void addFromResourceBundleOrDefault(Severity severity, String key, String defaultMessageTemplate, Object... params)
-   {
-      add(severity, key, null, defaultMessageTemplate, null, params);
-   }
-
-   /**
-    * Create a new status message, looking up the message in the resource bundle
-    * using the provided key.
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * A severity of INFO will be used, and you can specify parameters to be 
-    * interpolated
-    * 
-    */
-   public void addToControlFromResourceBundle(String id, String key, Object... params)
-   {
-      addToControlFromResourceBundle(id, INFO, key, params);
-   }
-
-   /**
-    * Create a new status message, looking up the message in the resource bundle
-    * using the provided key.
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    */
-   public void addToControlFromResourceBundle(String id, Severity severity, String key, Object... params)
-   {
-      addToControlFromResourceBundleOrDefault(id, severity, key, key, params);
-   }
-
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used.
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * A severity of INFO will be used, and you can specify parameters to be 
-    * interpolated
-    * 
-    */
-   public void addToControlFromResourceBundleOrDefault(String id, String key, String defaultMessageTemplate, Object... params)
-   {
-      addToControlFromResourceBundleOrDefault(id, INFO, key, defaultMessageTemplate, params);
-   }
-
-   /**
-    * Add a status message, looking up the message in the resource bundle
-    * using the provided key. If the message is found, it is used, otherwise, 
-    * the defaultMessageTemplate will be used.
-    * 
-    * The message will be added to the widget specified by the ID. The algorithm
-    * used determine which widget the id refers to is determined by the view 
-    * layer implementation in use.
-    * 
-    * You can also specify the severity, and parameters to be interpolated
-    * 
-    */
-   public void addToControlFromResourceBundleOrDefault(String id, Severity severity, String key, String defaultMessageTemplate, Object... params)
-   {
-      addToControl(id, severity, key, defaultMessageTemplate, params);
-   }
-
-   /**
-    * Add an array of InvalidValues from Hibernate Validator. Each message will
-    * be added with a severity of WARN.
-    */
-   public void add(Set<ConstraintViolation<Object>> constraintViolations)
-   {
-      for (ConstraintViolation<Object> constraintViolation: constraintViolations)
-      {
-         add(constraintViolation);
-      }
-   }
-
-   /**
-    * Add an array of InvalidValues from Hibernate Validator. Each message will
-    * be added with a severity of WARN.
-    * 
-    * The name of the property that was validated will be used as the widget ID
-    */
-   public void addToControls(Set<ConstraintViolation<Object>> constraintViolations)
-   {
-      for (ConstraintViolation<Object> constraintViolation: constraintViolations)
-      {
-         addToControl(constraintViolation);
-      }
-   }
-
-   /**
-    * Add an InvalidValue from Hibernate Validator. The message will
-    * be added with a severity of WARN.
-    */
-   public void add(ConstraintViolation<Object> constraintViolation)
-   {
-      add( WARN, constraintViolation.getMessage() );
-   }
-
-   /**
-    * Add an InvalidValue from Hibernate Validator. The message will
-    * be added with a severity of WARN.
-    * 
-    * The name of the property that was validated will be used as the widget ID
-    */
-   public void addToControl(ConstraintViolation<Object> constraintViolation)
-   {
-      addToControl( constraintViolation.getInvalidValue().toString(),  constraintViolation);
-   }
-
-   /**
-    * Add an InvalidValue from Hibernate Validator. The message will
-    * be added with a severity of WARN.
-    * 
-    * You can also specify the id of the widget to add the message to
-    */
-   public void addToControl(String id, ConstraintViolation<Object> constraintViolation)
-   {
-      addToControl( id, WARN, constraintViolation.getMessage() );
-   }
-   
-   private List<Runnable> getTasks()
-   {
-      if (tasks == null)
-      {
-         tasks = new ArrayList<Runnable>();
-      }
-      return tasks;
-   }
-   
-   protected static void runTasks()
-   {
-      Component component = Component.forName(StatusMessages.COMPONENT_NAME);
-      if( component != null && !component.getScope().isContextActive() )
-      {
-         return;
-      }
-      //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
-      StatusMessages statusMessages = instance();
-      if ( statusMessages != null )
-      {
-         statusMessages.doRunTasks();
-      }
-   }
-   
-   protected void doRunTasks()
-   {
-      if (tasks!=null)
-      {
-         for (Runnable task: tasks) task.run();
-         tasks.clear();
-      }
-   }
-   
-   public static StatusMessages instance()
-   {
-      Component component = Component.forName(StatusMessages.COMPONENT_NAME);
-      if(component != null && !component.getScope().isContextActive())
-      {
-         throw new IllegalStateException("No active "+component.getScope().name()+" context");
-      }
-      //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
-      return (StatusMessages) Component.getInstance(COMPONENT_NAME);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZone.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZone.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZone.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-package org.jboss.seam.international;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Manager component for the current user's locale
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at Name("org.jboss.seam.international.timeZone")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, dependencies="org.jboss.seam.international.timeZoneSelector")
-public class TimeZone 
-{
-
-   @Unwrap
-   public java.util.TimeZone getTimeZone()
-   {
-      return TimeZoneSelector.instance().getTimeZone();
-   }
-   
-   public static java.util.TimeZone instance()
-   {
-      return (java.util.TimeZone) Component.getInstance(TimeZone.class, ScopeType.STATELESS);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZoneSelector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZoneSelector.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZoneSelector.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,112 +0,0 @@
-package org.jboss.seam.international;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.faces.event.ValueChangeEvent;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.faces.Selector;
-
-/**
- * Selects the current user's time zone, defaulting
- * to the server time zone.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.SESSION)
- at Name("org.jboss.seam.international.timeZoneSelector")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class TimeZoneSelector extends Selector
-{
-   private static final long serialVersionUID = -5013819375360015369L;
-   
-   private String id;
-   
-   @Create
-   public void initTimeZone()
-   {
-      String timeZoneId = getCookieValueIfEnabled();
-      if (timeZoneId!=null) setTimeZoneId(timeZoneId);
-   }
-   
-   @Override
-   protected String getCookieName()
-   {
-      return "org.jboss.seam.core.TimeZone";
-   }
-   
-   /**
-    * Force the resource bundle to reload, using the current locale, 
-    * and raise the org.jboss.seam.timeZoneSelected event
-    */
-   public void select()
-   {
-      setCookieValueIfEnabled( getTimeZoneId() );
-
-      if ( Events.exists() ) 
-      {
-          Events.instance().raiseEvent( "org.jboss.seam.timeZoneSelected", getTimeZoneId() );
-      }
-   }
-
-   public void select(ValueChangeEvent event) 
-   {
-      selectTimeZone( (String) event.getNewValue() );
-   }
-   
-   public void selectTimeZone(String timeZoneId)
-   {
-      setTimeZoneId(timeZoneId);
-      select();
-   }
-   
-   public void setTimeZone(java.util.TimeZone timeZone)
-   {
-      setTimeZoneId( timeZone.getID() );
-   }
-
-   public void setTimeZoneId(String id)
-   {
-      setDirty(this.id, id);
-      this.id = id;
-   }
-   
-   public String getTimeZoneId()
-   {
-      return id;
-   }
-
-   /**
-    * Get the selected timezone
-    */
-   public java.util.TimeZone getTimeZone() 
-   {
-      if (id==null)
-      {
-         return java.util.TimeZone.getDefault();
-      }
-      else
-      {
-         return java.util.TimeZone.getTimeZone( getTimeZoneId() );
-      }
-   }
-
-   public static TimeZoneSelector instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-      return (TimeZoneSelector) Component.getInstance(TimeZoneSelector.class, ScopeType.SESSION);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZoneWrapper.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZoneWrapper.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZoneWrapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,102 +0,0 @@
-package org.jboss.seam.international;
-
-import java.util.Date;
-import java.util.TimeZone;
-
-/**
- * A wrapper around a TimeZone that provides a more convenience interface to
- * access the time zone information in the UI, in particular in the options of
- * a select menu.
- *
- * @author Dan Allen
- */
-public class TimeZoneWrapper extends TimeZone
-{
-   private static final int MILLISECONDS_PER_HOUR = 1000 * 60 * 60;
-
-   private TimeZone timeZone;
-
-   public TimeZoneWrapper(TimeZone tz) {
-      timeZone = tz;
-      setID(tz.getID());
-   }
-
-   @Override
-   public void setID(String id) {
-      super.setID(id);
-      timeZone = TimeZone.getTimeZone(id);
-   }
-
-   public String getId() {
-      return timeZone.getID();
-   }
-
-   public String getLabel() {
-      StringBuilder label = new StringBuilder(50);
-      label.append(getId().replace("_", " "));
-      label.append(" (UTC");
-      label.append(timeZone.getRawOffset() > 0 ? "+" : "-");
-      if (Math.abs(timeZone.getRawOffset()) < MILLISECONDS_PER_HOUR * 10) {
-         label.append("0");
-      }
-      label.append(Math.abs(timeZone.getRawOffset())/MILLISECONDS_PER_HOUR);
-      label.append(":00)");
-      return label.toString();
-   }
-
-   public TimeZone getTimeZone() {
-      return timeZone;
-   }
-
-   @Override
-   public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) {
-      return timeZone.getOffset(era, year, month, day, dayOfWeek, millis);
-   }
-
-   @Override
-   public void setRawOffset(int offset) {
-      timeZone.setRawOffset(offset);
-   }
-
-   @Override
-   public int getRawOffset() {
-      return timeZone.getRawOffset();
-   }
-
-   @Override
-   public boolean useDaylightTime() {
-      return timeZone.useDaylightTime();
-   }
-
-   @Override
-   public boolean inDaylightTime(Date date) {
-      return timeZone.inDaylightTime(date);
-   }
-
-   @Override
-   public Object clone() {
-      return timeZone.clone();
-   }
-
-   @Override
-   public boolean equals(Object obj) {
-      if (obj == null) {
-         return false;
-      }
-      if (getClass() != obj.getClass()) {
-         return false;
-      }
-      final TimeZoneWrapper other = (TimeZoneWrapper) obj;
-      if (timeZone != other.timeZone && (timeZone == null || !timeZone.equals(other.timeZone))) {
-         return false;
-      }
-      return true;
-   }
-
-   @Override
-   public int hashCode() {
-      int hash = 7;
-      hash = 79 * hash + (timeZone != null ? timeZone.hashCode() : 0);
-      return hash;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZones.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZones.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/TimeZones.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,71 +0,0 @@
-package org.jboss.seam.international;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.TimeZone;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.Create;
-
-/**
- * <p>Seam component that provides a list of time zones, limited to time zones
- * with IDs in the form Continent/Place, excluding deprecated three-letter time
- * zone IDs. The time zones returned have a fixed offset from UTC, which takes
- * daylight savings time into account. For example, Europe/Amsterdam is UTC+1;
- * in winter this is GMT+1 and in summer GMT+2.</p>
- *
- * <p>The time zone objects returned are wrapped in an implementation of
- * TimeZone that provides a more friendly interface for accessing the time zone
- * information. In particular, this type provides a more bean-friend property
- * for the time zone id (id than ID) and provides a convenience property named
- * label that formats the time zone for display in the UI. This wrapper can be
- * disabled by setting the component property wrap to false.</p>
- *
- * @author Peter Hilton, Lunatech Research
- * @author Dan Allen
- */
- at Scope(ScopeType.APPLICATION)
- at Name("org.jboss.seam.international.timeZones")
-public class TimeZones
-{
-   private static final String TIMEZONE_ID_PREFIXES =
-      "^(Africa|America|Asia|Atlantic|Australia|Europe|Indian|Pacific)/.*";
-
-   private boolean wrap = true;
-
-   private List<TimeZone> timeZones = null;
-   
-   @Create
-   public void init() {
-      timeZones = new ArrayList<TimeZone>();
-      final String[] timeZoneIds = TimeZone.getAvailableIDs();
-      for (final String id : timeZoneIds) {
-         if (id.matches(TIMEZONE_ID_PREFIXES)) {
-            timeZones.add(wrap ? new TimeZoneWrapper(TimeZone.getTimeZone(id)) : TimeZone.getTimeZone(id));
-         }
-      }
-      Collections.sort(timeZones, new Comparator<TimeZone>() {
-         public int compare(final TimeZone a, final TimeZone b) {
-            return a.getID().compareTo(b.getID());
-         }
-      });
-   }
-
-   @Unwrap
-   public List<TimeZone> getTimeZones() {
-      return timeZones;
-   }
-
-   public boolean isWrap() {
-      return wrap;
-   }
-
-   public void setWrap(boolean wrap) {
-      this.wrap = wrap;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/international/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,9 +0,0 @@
-/**
- * Seam components for internationalition of JSF applications.
- */
- at Namespace(value="http://jboss.com/products/seam/international", prefix="org.jboss.seam.international")
- at AutoCreate
-package org.jboss.seam.international;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/ManagedQueueSender.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/ManagedQueueSender.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/ManagedQueueSender.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,72 +0,0 @@
-package org.jboss.seam.jms;
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueSender;
-import javax.naming.NamingException;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.util.Naming;
-
-/**
- * Manager for a JMS QueueSender for a named JMS queue
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.EVENT)
- at BypassInterceptors
-public class ManagedQueueSender
-{
-   private String queueJndiName;
-   
-   private QueueSender queueSender;
-
-   /**
-    * The JNDI name of the queue
-    */
-   public String getQueueJndiName()
-   {
-      return queueJndiName;
-   }
-
-   public void setQueueJndiName(String jndiName)
-   {
-      this.queueJndiName = jndiName;
-   }
-   
-   public Queue getQueue() throws NamingException
-   {
-      return (Queue) Naming.getInitialContext().lookup(queueJndiName);
-   }
-   
-   @Create
-   public void create() throws JMSException, NamingException
-   {
-      queueSender = org.jboss.seam.jms.QueueSession.instance().createSender( getQueue() );
-   }
-   
-   @Destroy
-   public void destroy() throws JMSException
-   {
-      queueSender.close();
-   }
-   
-   @Unwrap
-   public QueueSender getQueueSender()
-   {
-      return queueSender;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "ManagedQueueSender(" + queueJndiName + ")";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/ManagedTopicPublisher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/ManagedTopicPublisher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/ManagedTopicPublisher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,74 +0,0 @@
-package org.jboss.seam.jms;
-
-import javax.jms.JMSException;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.naming.NamingException;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.util.Naming;
-
-/**
- * Manager for a JMS TopicPublisher for a named JMS topic
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.EVENT)
- at BypassInterceptors
- at Install(false)
-public class ManagedTopicPublisher
-{
-   private String topicJndiName;
-   
-   private TopicPublisher topicPublisher;
-   
-   /**
-    * The JNDI name of the topic
-    */
-   public String getTopicJndiName()
-   {
-      return topicJndiName;
-   }
-
-   public void setTopicJndiName(String jndiName)
-   {
-      this.topicJndiName = jndiName;
-   }
-   
-   public Topic getTopic() throws NamingException
-   {
-      return (Topic) Naming.getInitialContext().lookup(topicJndiName);
-   }
-   
-   @Create
-   public void create() throws JMSException, NamingException
-   {
-      topicPublisher = org.jboss.seam.jms.TopicSession.instance().createPublisher( getTopic() );
-   }
-   
-   @Destroy
-   public void destroy() throws JMSException
-   {
-      topicPublisher.close();
-   }
-   
-   @Unwrap
-   public TopicPublisher getTopicPublisher()
-   {
-      return topicPublisher;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "TopicConnection(" + topicJndiName + ")";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/QueueConnection.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/QueueConnection.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/QueueConnection.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,100 +0,0 @@
-package org.jboss.seam.jms;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.naming.NamingException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.util.Naming;
-
-/**
- * Manager for a JMS QueueConnection. By default, the JBoss MQ UIL2.
- * 
- * @author Gavin King
- * 
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.jms.queueConnection")
- at Install(precedence = BUILT_IN, genericDependencies = ManagedQueueSender.class)
-public class QueueConnection
-{
-   
-   @Logger
-   private Log log;
-   
-   private String queueConnectionFactoryJndiName = "UIL2ConnectionFactory";
-   private javax.jms.QueueConnection queueConnection;
-   
-   /**
-    * The JNDI name of the QueueConnectionFactory
-    */
-   public String getQueueConnectionFactoryJndiName()
-   {
-      return queueConnectionFactoryJndiName;
-   }
-   
-   public void setQueueConnectionFactoryJndiName(String jndiName)
-   {
-      this.queueConnectionFactoryJndiName = jndiName;
-   }
-   
-   @Create
-   public void init() throws NamingException, JMSException
-   {
-      queueConnection = getQueueConnectionFactory().createQueueConnection();
-      queueConnection.start();
-   }
-   
-   @Destroy
-   public void destroy() throws JMSException
-   {
-      try
-      {
-         queueConnection.stop();
-      }
-      catch (javax.jms.IllegalStateException e)
-      {
-         // as for JEE v5 specs, section EE 6.6
-         // At least WebSphere v7 enforce this
-         log.warn("queueSession.stop() called during @Destroy in an invalid context for this container. Msg={0}", e.getMessage());
-      }
-      
-      queueConnection.close();
-   }
-   
-   private QueueConnectionFactory getQueueConnectionFactory() throws NamingException
-   {
-      return (QueueConnectionFactory) Naming.getInitialContext().lookup(queueConnectionFactoryJndiName);
-   }
-   
-   @Unwrap
-   public javax.jms.QueueConnection getQueueConnection()
-   {
-      return queueConnection;
-   }
-   
-   public static javax.jms.QueueConnection instance()
-   {
-      return (javax.jms.QueueConnection) Component.getInstance(QueueConnection.class);
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "QueueConnection(" + queueConnectionFactoryJndiName + ")";
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/QueueSession.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/QueueSession.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/QueueSession.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-package org.jboss.seam.jms;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.naming.NamingException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Manager for a JMS QueueSession
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.EVENT)
- at BypassInterceptors
- at Name("org.jboss.seam.jms.queueSession")
- at Install(precedence=BUILT_IN, genericDependencies=ManagedQueueSender.class)
-public class QueueSession
-{
-   
-   private javax.jms.QueueSession queueSession;
-   
-   @Create
-   public void create() throws JMSException, NamingException
-   {
-      //TODO: i really want a transactional session!
-      queueSession = QueueConnection.instance().createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-   }
-   
-   @Destroy
-   public void destroy() throws JMSException
-   {
-      queueSession.close();
-   }
-   
-   @Unwrap
-   public javax.jms.QueueSession getQueueSession()
-   {
-      return queueSession;
-   }
-   
-   public static javax.jms.QueueSession instance()
-   {
-      return (javax.jms.QueueSession) Component.getInstance(QueueSession.class);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/TopicConnection.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/TopicConnection.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/TopicConnection.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,84 +0,0 @@
-package org.jboss.seam.jms;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.jms.JMSException;
-import javax.jms.TopicConnectionFactory;
-import javax.naming.NamingException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.util.Naming;
-
-/**
- * Manager for a JMS TopicConnection. By default, the JBoss MQ UIL2.
- * 
- * @author Gavin King
- * 
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.jms.topicConnection")
- at Install(precedence=BUILT_IN, genericDependencies=ManagedTopicPublisher.class)
-public class TopicConnection
-{
-   private String topicConnectionFactoryJndiName = "UIL2ConnectionFactory";
-   private javax.jms.TopicConnection topicConnection;
-
-   /**
-    * The JNDI name of the TopicConnectionFactory
-    */
-   public String getTopicConnectionFactoryJndiName()
-   {
-      return topicConnectionFactoryJndiName;
-   }
-
-   public void setTopicConnectionFactoryJndiName(String jndiName)
-   {
-      this.topicConnectionFactoryJndiName = jndiName;
-   }
-   
-   @Create
-   public void init() throws NamingException, JMSException
-   {
-      topicConnection = getTopicConnectionFactory().createTopicConnection();
-      topicConnection.start();
-   }
-   
-   @Destroy
-   public void destroy() throws JMSException
-   {
-      topicConnection.stop();
-      topicConnection.close();
-   }
-
-   private TopicConnectionFactory getTopicConnectionFactory() throws NamingException
-   {
-      return (TopicConnectionFactory) Naming.getInitialContext().lookup(getTopicConnectionFactoryJndiName());
-   }
-   
-   @Unwrap
-   public javax.jms.TopicConnection getTopicConnection()
-   {
-      return topicConnection;
-   }
-   
-   public static javax.jms.TopicConnection instance()
-   {
-      return (javax.jms.TopicConnection) Component.getInstance(TopicConnection.class);
-   }
-
-   @Override
-   public String toString()
-   {
-      return "TopicConnection(" + getTopicConnectionFactoryJndiName() + ")";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/TopicSession.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/TopicSession.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/TopicSession.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-package org.jboss.seam.jms;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.naming.NamingException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Manager for a JMS TopicSession
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.EVENT)
- at BypassInterceptors
- at Name("org.jboss.seam.jms.topicSession")
- at Install(precedence=BUILT_IN, genericDependencies=ManagedTopicPublisher.class)
-public class TopicSession
-{
-   
-   private javax.jms.TopicSession topicSession;
-   
-   @Create
-   public void create() throws JMSException, NamingException
-   {
-      //TODO: i really want a transactional session!
-      topicSession = TopicConnection.instance().createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-   }
-   
-   @Destroy
-   public void destroy() throws JMSException
-   {
-      topicSession.close();
-   }
-   
-   @Unwrap
-   public javax.jms.TopicSession getTopicSession()
-   {
-      return topicSession;
-   }
-   
-   public static javax.jms.TopicSession instance()
-   {
-      return (javax.jms.TopicSession) Component.getInstance(TopicSession.class);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jms/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * Seam components for sending JMS messages.
- */
- at Namespace(value="http://jboss.com/products/seam/jms",prefix="org.jboss.seam.jms")
-package org.jboss.seam.jms;
-
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/AgentID.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/AgentID.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/AgentID.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,103 +0,0 @@
-package org.jboss.seam.jmx;
-
-import java.net.InetAddress;
-import java.security.AccessController;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import java.util.Random;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import EDU.oswego.cs.dl.util.concurrent.SynchronizedLong;
-
-import org.jboss.mx.server.ServerConstants;
-
-/**
- * Utility class for creating JMX agent identifiers. Also contains the
- * helper method for retrieving the <tt>AgentID</tt> of an existing MBean server
- * instance.
- *
- * @see javax.management.MBeanServerDelegateMBean
- *
- * @author  <a href="mailto:juha at jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $
- *   
- */
-public class AgentID 
-   implements ServerConstants
-{
-   // Static ----------------------------------------------------
-   private static SynchronizedLong id = new SynchronizedLong(0);
-
-   private static final Random rand = new Random(System.currentTimeMillis());
-
-   /**
-    * Creates a new agent ID string. The identifier is of the form
-    * <tt>&lt;ip.address&gt;/&lt;creation time in ms&gt;/&lt;VMID+(random int 0-100)&gt;/&lt;sequence #&gt;</tt>.<P>
-    *
-    * This AgentID string is globally unique.
-    *
-    * @return Agent ID string
-    */
-   public static String create()
-   {
-      String ipAddress = null;
-
-      try
-      {
-         ipAddress = (String) AccessController.doPrivileged(
-            new PrivilegedExceptionAction()
-            {
-               public Object run() throws Exception
-               {
-                  return InetAddress.getLocalHost().getHostAddress();
-               }
-            }
-         );
-      }
-      catch(PrivilegedActionException e)
-      {
-         ipAddress = "127.0.0.1";
-      }
-      // use the VMID to create a more unique ID that can be used to guarantee that this
-      // MBeanServerID is unique across multiple JVMs, even on the same host
-      String vmid = new java.rmi.dgc.VMID().toString().replace(':','x').replace('-','X') + rand.nextInt(100);
-
-      return ipAddress + "/" + System.currentTimeMillis() + "/" + vmid + "/"+ (id.increment());
-   }
-    /**
-     * test
-     *
-     * @param args
-     */
-   public static void main (String args[])
-   {
-       for (int c=0;c<10;c++)
-        System.out.println(AgentID.create());
-   }
-
-   /**
-    * Returns the agent identifier string of a given MBean server instance.
-    *
-    * @return <tt>MBeanServerId</tt> attribute of the MBean server delegate.
-    */
-   public static String get(MBeanServer server)
-   {
-      try 
-      {
-         ObjectName name = new ObjectName(MBEAN_SERVER_DELEGATE);
-         String agentID = (String)server.getAttribute(name, "MBeanServerId");   
-      
-         return agentID;
-      }
-      catch (Throwable t)
-      {
-         throw new Error("Cannot find the MBean server delegate: " + t.toString());
-      }
-   }
-}
-      
-
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/DefaultExceptionHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/DefaultExceptionHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/DefaultExceptionHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,110 +0,0 @@
-package org.jboss.seam.jmx;
-
-
-import java.lang.reflect.Method;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.AttributeNotFoundException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.MBeanException;
-import javax.management.ReflectionException;
-import javax.management.RuntimeOperationsException;
-import javax.management.RuntimeMBeanException;
-import javax.management.RuntimeErrorException;
-
-/**
- * Default exception handler for MBean proxy.
- *
- * @author  <a href="mailto:juha at jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $
- *   
- */
-public class DefaultExceptionHandler
-      implements ProxyExceptionHandler
-{
-
-   // InstanceNotFound, AttributeNotFound and InvalidAttributeValue
-   // are not exceptions declared in the mgmt interface and therefore
-   // must be rethrown as runtime exceptions to avoid UndeclaredThrowable
-   // exceptions on the client
-
-   public Object handleInstanceNotFound(ProxyContext ctx,
-                                        InstanceNotFoundException e,
-                                        Method m, Object[] args)
-                                        throws Exception
-   {
-      throw new RuntimeProxyException("Instance not found: " + e.toString());
-   }
-   
-   public Object handleAttributeNotFound(ProxyContext ctx,
-                                         AttributeNotFoundException e,
-                                         Method m, Object[] args)
-                                         throws Exception
-   {
-      throw new RuntimeProxyException("Attribute not found: " + e.toString());
-   }
-   
-   public Object handleInvalidAttributeValue(ProxyContext ctx,
-                                             InvalidAttributeValueException e,
-                                             Method m, Object[] args)
-                                             throws Exception
-   {
-      throw new RuntimeProxyException("Invalid attribute value: " + e.toString());
-   }
-   
-   public Object handleMBeanException(ProxyContext ctx, MBeanException e,
-                                      Method m, Object[] args)
-                                      throws Exception
-   {
-      // assuming MBeanException only wraps mgmt interface "application" 
-      // exceptions therefore we can safely rethrow the target exception
-      // as its declared in the mgmt interface
-      throw e.getTargetException();
-   }
-   
-   public Object handleReflectionException(ProxyContext ctx,
-                                           ReflectionException e,
-                                           Method m, Object[] args)
-                                           throws Exception
-   {
-      // use of reflection exception is inconsistent in the API so the 
-      // safest bet is to rethrow a runtime exception
-      
-      Exception target = e.getTargetException();
-      if (target instanceof RuntimeException)
-         throw target;
-      else
-         throw new RuntimeProxyException(target.toString());
-   }
-   
-   public Object handleRuntimeOperationsException(ProxyContext ctx,
-                                                  RuntimeOperationsException e,
-                                                  Method m, Object[] args)
-                                                  throws Exception
-   {
-      // target is always a runtime exception, so its ok to throw it from here
-      throw e.getTargetException();
-   }
-   
-   public Object handleRuntimeMBeanException(ProxyContext ctx,
-                                             RuntimeMBeanException e,
-                                             Method m, Object[] args)
-                                             throws Exception
-   {
-      // target is always a runtime exception, so its ok to throw it from here
-      throw e.getTargetException();
-   }
-   
-   public Object handleRuntimeError(ProxyContext ctx, RuntimeErrorException e,
-                                    Method m, Object[] args)
-                                    throws Exception
-   {
-      // just unwrap and throw the actual error
-      throw e.getTargetError();
-   }
-   
-}
-      
-
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/JBossClusterMonitor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/JBossClusterMonitor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/JBossClusterMonitor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,155 +0,0 @@
-package org.jboss.seam.jmx;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.Vector;
-
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-
-/**
- * The purpose of this component is to detect a clustered environment and
- * to inform the HttpSessionListener whether the origin of a session destroyed
- * event is the failover of a session from one node to the next. If a node
- * is failing over, we don't want the SFSBs referenced by the session to be
- * destroyed.
- * 
- * @author Dan Allen
- */
- at Name("org.jboss.seam.jmx.jbossClusterMonitor")
- at BypassInterceptors
- at Scope(APPLICATION)
- at Startup
- at Install(precedence=BUILT_IN, classDependencies="org.jgroups.MembershipListener")
-public class JBossClusterMonitor
-{
-   private static Log log = Logging.getLog(JBossClusterMonitor.class);
-   
-   private MBeanServer jbossMBeanServer;
-   
-   private boolean clustered;
-   
-   private ObjectName clusteringCacheObjectName;
-   
-   private ObjectName serverObjectName;
-   
-   @Create
-   public void create()
-   {
-      jbossMBeanServer = locateJBoss();
-      
-      if (!isJBoss())
-      {
-         return;
-      }
-      
-      try
-      {
-         clusteringCacheObjectName = new ObjectName("jboss.cache:service=TomcatClusteringCache");
-         serverObjectName = new ObjectName("jboss.system:type=Server");
-      }
-      catch (MalformedObjectNameException e)
-      {
-         log.warn("Invalid JMX name: " + e.getMessage());
-      }
-      
-      try
-      {
-         jbossMBeanServer.getMBeanInfo(clusteringCacheObjectName);
-         clustered = true;
-         log.info("JBoss cluster detected");
-      }
-      catch (Exception e) {}
-   }
-   
-   public boolean isClustered()
-   {
-      return clustered;
-   }
-   
-   /**
-    * Consults the jboss.system:type=Server MBean to determine if this instance
-    * of JBoss AS is currently being shutdown. Note that the flag only returns
-    * true if the shutdown() method on this MBean is used. It does not detect a
-    * force halt via a process signal (i.e., CTRL-C).
-    */
-   public boolean nodeIsShuttingDown()
-   {
-      if (!isJBoss())
-      {
-         return false;
-      }
-      
-      try
-      {
-         return (Boolean) jbossMBeanServer.getAttribute(serverObjectName, "InShutdown");
-      }
-      catch (Exception e)
-      {
-         return false;
-      }
-   }
-   
-   public boolean isLastNode()
-   {
-      if (!clustered)
-      {
-         return true;
-      }
-      
-      // other options
-      // object name => jboss.jgroups:cluster=DefaultPartition,type=channel
-      // object name => jboss.jgroups:cluster=Tomcat-Cluster,type=channel
-      // attribute => NumberOfTasksInTimer
-      
-      try
-      {
-         return ((Vector) jbossMBeanServer.getAttribute(clusteringCacheObjectName, "Members")).size() == 1;
-      }
-      catch (Exception e) {
-         log.warn("Could not determine number of members in cluster", e);
-         return true;
-      }
-   }
-   
-   public boolean failover()
-   {
-      return isClustered() && nodeIsShuttingDown() && !isLastNode();
-   }
-   
-   public boolean isJBoss()
-   {
-      return jbossMBeanServer != null;
-   }
-   
-   protected MBeanServer locateJBoss()
-   {
-      for (Object o: MBeanServerFactory.findMBeanServer(null)) {
-         MBeanServer server = (MBeanServer) o;
-         if ("jboss".equals(server.getDefaultDomain())) {
-            return server;
-         }
-      }
-      return null;
-   }
-   
-   // FIXME my sense is that this could lookup could be more elegant or conforming
-   public static JBossClusterMonitor getInstance(ServletContext ctx)
-   {
-      return (JBossClusterMonitor) ctx.getAttribute(Seam.getComponentName(JBossClusterMonitor.class));
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/JMXInvocationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/JMXInvocationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/JMXInvocationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,445 +0,0 @@
-package org.jboss.seam.jmx;
-
-
-import java.io.Serializable;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import java.util.HashMap;
-
-import javax.management.Attribute;
-import javax.management.AttributeList;
-import javax.management.AttributeNotFoundException;
-import javax.management.DynamicMBean;
-import javax.management.InstanceNotFoundException;
-import javax.management.IntrospectionException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanException;
-import javax.management.MBeanInfo;
-import javax.management.MBeanOperationInfo;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.management.RuntimeErrorException;
-import javax.management.RuntimeMBeanException;
-import javax.management.RuntimeOperationsException;
-
-/**
- * Invocation handler for MBean proxies.
- *
- * @author  <a href="mailto:juha at jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $
- *   
- */
-public class JMXInvocationHandler 
-      implements ProxyContext, InvocationHandler, Serializable
-{  
-   private static final long serialVersionUID = 3714728148040623702L;
-   
-   // Attributes -------------------------------------------------
-   
-   /**
-    * Reference to the MBean server this proxy connects to.
-    */
-   protected MBeanServer server    = null;
-   
-   /**
-    * The object name of the MBean this proxy represents.
-    */
-   protected ObjectName objectName = null;
-   
-   /**
-    * Default exception handler for the proxy.
-    */
-   private ProxyExceptionHandler handler = new DefaultExceptionHandler();
-   
-   /**
-    * MBean attribute meta data.
-    */
-   private HashMap attributeMap          = new HashMap();
-   
-   /**
-    * Indicates whether Object.toString() should be delegated to the resource
-    * or handled by the proxy.
-    */
-   private boolean delegateToStringToResource = false;
-
-   /**
-    * Indicates whether Object.equals() should be delegated to the resource
-    * or handled by the proxy.
-    */
-   private boolean delegateEqualsToResource   = false;
-
-   /**
-    * Indicates whether Object.hashCode() should be delegated to the resource
-    * or handled by the proxy.
-    */
-   private boolean delegateHashCodeToResource = false;
-   
-   
-   // Constructors -----------------------------------------------
-   
-   /**
-    * Constructs a new JMX MBean Proxy invocation handler.
-    *
-    * @param server  reference to the MBean server this proxy connects to
-    * @param name    object name of the MBean this proxy represents
-    *
-    * @throws MBeanProxyCreationException wraps underlying JMX exceptions in
-    *         case the proxy creation fails
-    */
-   public JMXInvocationHandler(MBeanServer server, ObjectName name) 
-      throws MBeanProxyCreationException
-   {
-      try
-      {
-         if (server == null)
-            throw new MBeanProxyCreationException("null agent reference");
-            
-         this.server     = server;
-         this.objectName = name;
-         
-         MBeanInfo info = server.getMBeanInfo(objectName);
-         MBeanAttributeInfo[] attributes = info.getAttributes();
-         MBeanOperationInfo[] operations = info.getOperations();
-         
-         // collect the MBean attribute metadata for standard mbean proxies
-         for (int i = 0; i < attributes.length; ++i)
-            attributeMap.put(attributes[i].getName(), attributes[i]);
-         
-         // Check whether the target resource exposes the common object methods.
-         // Dynamic Proxy will delegate these methods automatically to the
-         // invoke() implementation.
-         for (int i = 0; i < operations.length; ++i)
-         {
-            if (operations[i].getName().equals("toString") &&
-                operations[i].getReturnType().equals("java.lang.String") &&
-                operations[i].getSignature().length == 0)
-            {
-               delegateToStringToResource = true;  
-            }
-            
-            else if (operations[i].getName().equals("equals") &&
-                     operations[i].getReturnType().equals(Boolean.TYPE.getName()) &&
-                     operations[i].getSignature().length == 1 &&
-                     operations[i].getSignature() [0].getType().equals("java.lang.Object"))
-            {
-               delegateEqualsToResource = true;
-            }
-            
-            else if (operations[i].getName().equals("hashCode") &&
-                     operations[i].getReturnType().equals(Integer.TYPE.getName()) &&
-                     operations[i].getSignature().length == 0)
-            {
-               delegateHashCodeToResource = true;  
-            }
-         }
-      }
-      catch (InstanceNotFoundException e)
-      {
-         throw new MBeanProxyCreationException("Object name " + name + " not found: " + e.toString());
-      }
-      catch (IntrospectionException e)
-      {
-         throw new MBeanProxyCreationException(e.toString());
-      }
-      catch (ReflectionException e)
-      {
-         throw new MBeanProxyCreationException(e.toString());
-      }
-   }
-   
-   
-   // InvocationHandler implementation ---------------------------
-   
-   public Object invoke(Object proxy, Method method, Object[] args) 
-      throws Exception
-   {
-      Class declaringClass = method.getDeclaringClass();
-      
-      // Handle methods from Object class. If the target resource exposes 
-      // operation metadata with same signature then the invocations will be
-      // delegated to the target. Otherwise this instance of invocation handler
-      // will execute them.
-      if (declaringClass == Object.class)
-         return handleObjectMethods(method, args);
-      
-      // Check methods from ProxyContext interface. If invoked, delegate
-      // to the context implementation part of this invocation handler.
-      if (declaringClass == ProxyContext.class)
-         return method.invoke(this, args);
-      
-      // Check methods from DynamicMBean interface. This allows the proxy
-      // to be used in cases where the underlying metadata has changed (a la
-      // Dynamic MBean).
-      if (declaringClass == DynamicMBean.class)
-         return handleDynamicMBeanInvocation(method, args);
-      
-      try 
-      {
-         String methodName = method.getName();
-         
-         // Assume a get/setAttribute convention on the typed proxy interface.
-         // If the MBean metadata exposes a matching attribute then use the
-         // MBeanServer attribute accessors to read/modify the value. If not,
-         // fallback to MBeanServer.invoke() assuming this is an operation
-         // invocation despite the accessor naming convention.
-         
-         // getter
-         if (methodName.startsWith("get") && args == null)
-         {
-            String attrName = methodName.substring(3, methodName.length());
-            
-            // check that the metadata exists
-            MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
-            if (info != null)
-            {
-               String retType  = method.getReturnType().getName();
-      
-               // check for correct return type on the getter         
-               if (retType.equals(info.getType())) 
-               {
-                  return server.getAttribute(objectName, attrName);
-               }
-            }
-         }
-         
-         // boolean getter
-         else if (methodName.startsWith("is") && args == null)
-         {
-            String attrName = methodName.substring(2, methodName.length());
-            
-            // check that the metadata exists
-            MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
-            if (info != null && info.isIs())
-            {
-               Class retType = method.getReturnType();
-               
-               // check for correct return type on the getter
-               if (retType.equals(Boolean.class) || retType.equals(Boolean.TYPE))
-               {
-                  return server.getAttribute(objectName, attrName);
-               }
-            }
-         }
-         
-         // setter
-         else if (methodName.startsWith("set") && args != null && args.length == 1)
-         {
-            String attrName = methodName.substring(3, methodName.length());
-            
-            // check that the metadata exists
-            MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
-            if (info != null && method.getReturnType().equals(Void.TYPE))
-            {
-               ClassLoader cl = Thread.currentThread().getContextClassLoader();
-               
-               Class signatureClass = null;
-               String classType     = info.getType();
-               
-               if (isPrimitive(classType))
-                  signatureClass = getPrimitiveClass(classType);
-               else
-                  signatureClass = cl.loadClass(info.getType());
-               
-               if (signatureClass.isAssignableFrom(args[0].getClass()))
-               {
-                  server.setAttribute(objectName, new Attribute(attrName, args[0]));
-                  return null;
-               }
-            }
-         }
-
-         String[] signature = null;
-         
-         if (args != null)
-         {
-            signature = new String[args.length];
-            Class[] sign = method.getParameterTypes();
-            
-            for (int i = 0; i < sign.length; ++i)
-               signature[i] = sign[i].getName();
-         }
-         
-         return server.invoke(objectName, methodName, args, signature);
-      }
-      catch (InstanceNotFoundException e)
-      {
-         return getExceptionHandler().handleInstanceNotFound(this, e, method, args);
-      }
-      catch (AttributeNotFoundException e)
-      {
-         return getExceptionHandler().handleAttributeNotFound(this, e, method, args);
-      }
-      catch (InvalidAttributeValueException e)
-      {
-         return getExceptionHandler().handleInvalidAttributeValue(this, e, method, args);
-      }
-      catch (MBeanException e)
-      {
-         return getExceptionHandler().handleMBeanException(this, e, method, args);
-      }
-      catch (ReflectionException e)
-      {
-         return getExceptionHandler().handleReflectionException(this, e, method, args);
-      }
-      catch (RuntimeOperationsException e)
-      {
-         return getExceptionHandler().handleRuntimeOperationsException(this, e, method, args);
-      }
-      catch (RuntimeMBeanException e)
-      {
-         return getExceptionHandler().handleRuntimeMBeanException(this, e, method, args);
-      }
-      catch (RuntimeErrorException e)
-      {
-         return getExceptionHandler().handleRuntimeError(this, e, method, args);
-      }
-   }
-
-   public ProxyExceptionHandler getExceptionHandler()
-   {
-      return handler;
-   }
-   
-   
-   // ProxyContext implementation -----------------------------------
-   
-   // The proxy provides an access point for the client to methods not part
-   // of the MBean's management interface. It can be used to configure the
-   // invocation (with context, client side interceptors, RPC), exception
-   // handling, act as an access point to MBean server interface and so on.
-      
-   public void setExceptionHandler(ProxyExceptionHandler handler)
-   {
-      this.handler = handler;
-   }
-   
-   public MBeanServer getMBeanServer() 
-   {
-      return server;
-   }      
-
-   public ObjectName getObjectName()
-   {
-      return objectName;
-   }
-   
-   
-   // Object overrides ----------------------------------------------
-   @Override
-   public String toString() 
-   {
-      return "MBeanProxy for " + objectName + " (Agent ID: " + AgentID.get(server) + ")";
-   }
-   
-   
-   // Private -------------------------------------------------------
-   
-   private Object handleObjectMethods(Method method, Object[] args)
-      throws InstanceNotFoundException, ReflectionException,
-      IntrospectionException, MBeanException
-   {
-      if (method.getName().equals("toString"))
-      {
-         if (delegateToStringToResource)
-            return server.invoke(objectName, "toString", null, null);
-         else
-            return toString();
-      }
-      
-      else if (method.getName().equals("equals"))
-      {
-         if (delegateEqualsToResource)
-         {
-            return server.invoke(objectName, "equals", 
-                                 new Object[] { args[0] },
-                                 new String[] { "java.lang.Object" }
-            );
-         }
-         else if (Proxy.isProxyClass(args[0].getClass()))
-         {
-            Proxy prxy = (Proxy)args[0];
-            return new Boolean(this.equals(Proxy.getInvocationHandler(prxy)));
-         }
-         else
-         {
-            return new Boolean(this.equals(args[0]));
-         }
-      }
-      
-      else if (method.getName().equals("hashCode"))
-      {
-         if (delegateHashCodeToResource)
-            return server.invoke(objectName, "hashCode", null, null);
-         else  
-            return new Integer(this.hashCode());
-      }
-      
-      else throw new Error("Unexpected method invocation!");
-   }
-   
-   private Object handleDynamicMBeanInvocation(Method method, Object[] args)
-      throws InstanceNotFoundException, ReflectionException,
-      IntrospectionException, MBeanException, AttributeNotFoundException,
-      InvalidAttributeValueException
-   {
-      String methodName = method.getName();
-      
-      if (methodName.equals("setAttribute"))
-      {
-         server.setAttribute(objectName, (Attribute)args[0]);
-         return null;
-      }
-      else if (methodName.equals("setAttributes"))
-         return server.setAttributes(objectName, (AttributeList)args[0]);
-      else if (methodName.equals("getAttribute"))
-         return server.getAttribute(objectName, (String)args[0]);
-      else if (methodName.equals("getAttributes"))
-         return server.getAttributes(objectName, (String[])args[0]);
-      else if (methodName.equals("invoke"))
-         return server.invoke(objectName, (String)args[0], (Object[])args[1], (String[])args[2]);
-      else if (methodName.equals("getMBeanInfo"))
-         return server.getMBeanInfo(objectName);
-      
-      else throw new Error("Unexpected method invocation!");
-   }
-
-   private boolean isPrimitive(String type)
-   {
-      if (type.equals(Integer.TYPE.getName()))   return true;
-      if (type.equals(Long.TYPE.getName()))      return true;
-      if (type.equals(Boolean.TYPE.getName()))   return true;
-      if (type.equals(Byte.TYPE.getName()))      return true;
-      if (type.equals(Character.TYPE.getName())) return true;
-      if (type.equals(Short.TYPE.getName()))     return true;
-      if (type.equals(Float.TYPE.getName()))     return true;
-      if (type.equals(Double.TYPE.getName()))    return true;
-      if (type.equals(Void.TYPE.getName()))      return true;
-      
-      return false;
-   }
-
-   private Class getPrimitiveClass(String type)
-   {
-      if (type.equals(Integer.TYPE.getName()))  return Integer.TYPE;
-      if (type.equals(Long.TYPE.getName()))     return Long.TYPE;
-      if (type.equals(Boolean.TYPE.getName()))  return Boolean.TYPE;
-      if (type.equals(Byte.TYPE.getName()))     return Byte.TYPE;
-      if (type.equals(Character.TYPE.getName()))return Character.TYPE;
-      if (type.equals(Short.TYPE.getName()))    return Short.TYPE;
-      if (type.equals(Float.TYPE.getName()))    return Float.TYPE;
-      if (type.equals(Double.TYPE.getName()))   return Double.TYPE;
-      if (type.equals(Void.TYPE.getName()))     return Void.TYPE;
-      
-      return null;
-   }
-   
-}
-      
-
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/MBeanProxy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/MBeanProxy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/MBeanProxy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,119 +0,0 @@
-package org.jboss.seam.jmx;
-
-import java.lang.reflect.Proxy;
-
-import javax.management.DynamicMBean;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.NotCompliantMBeanException;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-
-public class MBeanProxy
-{
-
-   // Static --------------------------------------------------------
-   
-   /**
-    * Creates a proxy to an MBean in the given MBean server.
-    *
-    * @param   intrface    the interface this proxy implements
-    * @param   name        object name of the MBean this proxy connects to
-    * @param   agentID     agent ID of the MBean server this proxy connects to
-    *
-    * @return  proxy instance
-    *
-    * @throws MBeanProxyCreationException if the proxy could not be created
-    */
-   public static Object get(Class intrface, ObjectName name, String agentID) throws MBeanProxyCreationException
-   {
-      return get(intrface, name, (MBeanServer) MBeanServerFactory.findMBeanServer(agentID).get(0));
-   }
-
-   /**
-    * Creates a proxy to an MBean in the given MBean server.
-    *
-    * @param   intrface the interface this proxy implements
-    * @param   name     object name of the MBean this proxy connects to
-    * @param   server   MBean server this proxy connects to
-    *
-    * @return proxy instance
-    *
-    * @throws MBeanProxyCreationException if the proxy could not be created
-    */
-   public static Object get(Class intrface, ObjectName name, MBeanServer server)  throws MBeanProxyCreationException
-   {
-      return get(new Class[] { intrface, ProxyContext.class, DynamicMBean.class }, name, server);
-   }
-
-   /**
-    */
-   public static Object get(ObjectName name, MBeanServer server)  throws MBeanProxyCreationException
-   {
-      return get(new Class[] { ProxyContext.class, DynamicMBean.class }, name, server);
-   }
-
-   private static Object get(Class[] interfaces, ObjectName name, MBeanServer server) throws MBeanProxyCreationException
-   {
-      return Proxy.newProxyInstance(
-            Thread.currentThread().getContextClassLoader(),
-            interfaces, new JMXInvocationHandler(server, name)
-      );
-   }
-   
-   /**
-    * Convenience method for registering an MBean and retrieving a proxy for it.
-    *
-    * @param   instance MBean instance to be registered
-    * @param   intrface the interface this proxy implements
-    * @param   name     object name of the MBean
-    * @param   agentID  agent ID of the MBean server this proxy connects to
-    *
-    * @return proxy instance
-    *
-    * @throws MBeanProxyCreationException if the proxy could not be created
-    */
-   public static Object create(Class instance, Class intrface, ObjectName name, String agentID) throws MBeanProxyCreationException
-   {
-      return create(instance, intrface, name,(MBeanServer) MBeanServerFactory.findMBeanServer(agentID).get(0));
-   }   
-   
-   /**
-    * Convenience method for registering an MBean and retrieving a proxy for it.
-    *
-    * @param   instance MBean instance to be registered
-    * @param   intrface the interface this proxy implements
-    * @param   name     object name of the MBean
-    * @param   server   MBean server this proxy connects to
-    *
-    * @throws MBeanProxyCreationException if the proxy could not be created
-    */
-   public static Object create(Class instance, Class intrface, ObjectName name, MBeanServer server) throws MBeanProxyCreationException
-   {
-      try
-      {
-         server.createMBean(instance.getName(), name);
-         return get(intrface, name, server);
-      }
-      catch (ReflectionException e) {
-         throw new MBeanProxyCreationException("Creating the MBean failed: " + e.toString());
-      }
-      catch (InstanceAlreadyExistsException e) {
-         throw new MBeanProxyCreationException("Instance already exists: " + name);
-      }
-      catch (MBeanRegistrationException e) {
-         throw new MBeanProxyCreationException("Error registering the MBean to the server: " + e.toString());
-      }
-      catch (MBeanException e) {
-         throw new MBeanProxyCreationException(e.toString());
-      }
-      catch (NotCompliantMBeanException e) {
-         throw new MBeanProxyCreationException("Not a compliant MBean " + instance.getClass().getName() + ": " + e.toString());
-      }
-   }
-   
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/MBeanProxyCreationException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/MBeanProxyCreationException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/MBeanProxyCreationException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.jmx;
-
-import javax.management.JMException;
-
-public class MBeanProxyCreationException
-   extends JMException
-{
-   private static final long serialVersionUID = 1008637966352433381L;
-
-   // Constructors --------------------------------------------------
-   public MBeanProxyCreationException() 
-   {
-      super();
-   }
-   
-   public MBeanProxyCreationException(String msg)
-   {
-      super(msg);
-   }
-}
-      
-
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/Mbean.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/Mbean.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/Mbean.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,46 +0,0 @@
-package org.jboss.seam.jmx;
-
-import javax.management.ObjectName;
-
-import org.jboss.seam.annotations.Unwrap;
-
-public class Mbean
-{
-    String objectName;
-    String agentId;
-    String proxyClass;
-    
-    public String getAgentId() {
-        return agentId;
-    }
-
-    public void setAgentId(String agentId) {
-        this.agentId = agentId;
-    }
-
-    public String getObjectName() {
-        return objectName;
-    }
-   
-    public void setObjectName(String objectName) {
-        this.objectName = objectName;
-    }
-   
-    public String getProxyClass() {
-        return proxyClass;
-    }
-   
-    public void setProxyClass(String proxyClass) {
-        this.proxyClass = proxyClass;
-    }
-   
-    @Unwrap 
-    public Object createProxy() {
-        try {
-            Object o = MBeanProxy.get(Class.forName(proxyClass), new ObjectName(getObjectName()), getAgentId());
-            return o;
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/ProxyContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/ProxyContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/ProxyContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,23 +0,0 @@
-package org.jboss.seam.jmx;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-/**
- *
- * @author  <a href="mailto:juha at jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $
- *   
- */
-public interface ProxyContext
-{
-   void setExceptionHandler(ProxyExceptionHandler handler);
-   
-   MBeanServer getMBeanServer();
-   
-   ObjectName getObjectName();
-}
-      
-
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/ProxyExceptionHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/ProxyExceptionHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/ProxyExceptionHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-package org.jboss.seam.jmx;
-
-import java.lang.reflect.Method;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.AttributeNotFoundException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.MBeanException;
-import javax.management.ReflectionException;
-import javax.management.RuntimeOperationsException;
-import javax.management.RuntimeMBeanException;
-import javax.management.RuntimeErrorException;
-
-/**
- *
- * @author  <a href="mailto:juha at jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $
- */
-public interface ProxyExceptionHandler
-{
-   public Object handleInstanceNotFound(ProxyContext ctx, InstanceNotFoundException e, Method m, Object[] args) throws Exception;
-   
-   public Object handleAttributeNotFound(ProxyContext ctx, AttributeNotFoundException e, Method m, Object[] args) throws Exception;
-   
-   public Object handleInvalidAttributeValue(ProxyContext ctx, InvalidAttributeValueException e, Method m, Object[] args) throws Exception;
-   
-   public Object handleMBeanException(ProxyContext ctx, MBeanException e, Method m, Object[] args) throws Exception;
-   
-   public Object handleReflectionException(ProxyContext ctx, ReflectionException e, Method m, Object[] args) throws Exception;
-   
-   public Object handleRuntimeOperationsException(ProxyContext ctx, RuntimeOperationsException e, Method m, Object[] args) throws Exception;
-   
-   public Object handleRuntimeMBeanException(ProxyContext ctx, RuntimeMBeanException e, Method m, Object[] args) throws Exception;
-   
-   public Object handleRuntimeError(ProxyContext ctx, RuntimeErrorException e, Method m, Object[] args) throws Exception;
-}
-      
-
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/RuntimeProxyException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/RuntimeProxyException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/RuntimeProxyException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,29 +0,0 @@
-package org.jboss.seam.jmx;
-
-import javax.management.JMRuntimeException;
-
-/**
- *
- * @author  <a href="mailto:juha at jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $  
- */
-public class RuntimeProxyException
-   extends JMRuntimeException
-{
-   private static final long serialVersionUID = -1166909485463779459L;
-
-   // Constructors --------------------------------------------------
-   public RuntimeProxyException() 
-   {
-      super();
-   }
-   
-   public RuntimeProxyException(String msg)
-   {
-      super(msg);
-   }
-}
-      
-
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jmx/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
- at Namespace(value="http://jboss.com/products/seam/jmx", prefix="org.jboss.seam.jmx")
- at AutoCreate
-package org.jboss.seam.jmx;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/ArrayDataModel.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/ArrayDataModel.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/ArrayDataModel.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-//$Id: ArrayDataModel.java 5372 2007-06-21 05:27:29Z gavin $
-package org.jboss.seam.jsf;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-
-/**
- * A JSF DataModel for arrays.
- * 
- * @author Gavin King
- *
- */
-public class ArrayDataModel extends javax.faces.model.ArrayDataModel implements
-      Serializable
-{
-   private static final long serialVersionUID = -1369792328129853864L;
-   
-   private void writeObject(ObjectOutputStream oos) throws IOException
-   {
-      oos.writeObject(getWrappedData());
-      oos.writeInt(getRowIndex());
-   }
-   
-   private void readObject(ObjectInputStream ois) throws IOException,
-         ClassNotFoundException
-   {
-      this.setWrappedData( ois.readObject() );
-      this.setRowIndex( ois.readInt() );
-   }
-   
-   public ArrayDataModel() {}
-   
-   public ArrayDataModel(Object[] array)
-   {
-      super(array);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/DelegatingFacesContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/DelegatingFacesContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/DelegatingFacesContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,172 +0,0 @@
-package org.jboss.seam.jsf;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.el.ELContext;
-import javax.faces.application.Application;
-import javax.faces.application.FacesMessage;
-import javax.faces.application.FacesMessage.Severity;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseStream;
-import javax.faces.context.ResponseWriter;
-import javax.faces.render.RenderKit;
-
-/**
- * Implementation of FacesContext that delegates all calls.
- * 
- * Further, it exposes {@link #setCurrentInstance(FacesContext)} as a public
- * method
- * 
- * @author Pete Muir
- *
- */
-public class DelegatingFacesContext extends FacesContext
-{
-   
-   private FacesContext delegate;
-   
-   public DelegatingFacesContext(FacesContext delegate)
-   {
-      this.delegate = delegate;
-   }
-
-   @Override
-   public void addMessage(String clientId, FacesMessage message)
-   {
-      delegate.addMessage(clientId, message);
-   }
-
-   @Override
-   public Application getApplication()
-   {
-     return delegate.getApplication();
-   }
-   
-   
-   public Map<Object, Object> getAttributes() 
-   {
-      return delegate.getAttributes();
-   }
-
-   @Override
-   public Iterator getClientIdsWithMessages()
-   {
-     return delegate.getClientIdsWithMessages();
-   }
-
-   @Override
-   public ExternalContext getExternalContext()
-   {
-      return delegate.getExternalContext();
-   }
-
-   @Override
-   public Severity getMaximumSeverity()
-   {
-      return delegate.getMaximumSeverity();
-   }
-
-   @Override
-   public Iterator getMessages()
-   {
-     return delegate.getMessages();
-   }
-
-   @Override
-   public Iterator getMessages(String clientId)
-   {
-      return delegate.getMessages(clientId);
-   }
-
-   @Override
-   public RenderKit getRenderKit()
-   {
-     return delegate.getRenderKit();
-   }
-
-   @Override
-   public boolean getRenderResponse()
-   {
-      return delegate.getRenderResponse();
-   }
-
-   @Override
-   public boolean getResponseComplete()
-   {
-     return delegate.getResponseComplete();
-   }
-
-   @Override
-   public ResponseStream getResponseStream()
-   {
-      return delegate.getResponseStream();
-   }
-
-   @Override
-   public ResponseWriter getResponseWriter()
-   {
-      return delegate.getResponseWriter();
-   }
-
-   @Override
-   public UIViewRoot getViewRoot()
-   {
-     return delegate.getViewRoot();
-   }
-
-   @Override
-   public void release()
-   {
-      delegate.release();
-   }
-
-   @Override
-   public void renderResponse()
-   {
-     delegate.renderResponse();
-   }
-
-   @Override
-   public void responseComplete()
-   {
-      delegate.responseComplete();
-   }
-
-   @Override
-   public void setResponseStream(ResponseStream responseStream)
-   {
-      delegate.setResponseStream(responseStream);
-   }
-
-   @Override
-   public void setResponseWriter(ResponseWriter responseWriter)
-   {
-      delegate.setResponseWriter(responseWriter);
-   }
-
-   @Override
-   public void setViewRoot(UIViewRoot root)
-   {
-      delegate.setViewRoot(root);
-   }
-   
-   public FacesContext getDelegate() 
-   {
-      return delegate;
-   }
-   
-   @Override
-   public ELContext getELContext()
-   {
-      return delegate.getELContext();
-   }
-
-   public static void setCurrentInstance(FacesContext context) 
-   {
-      FacesContext.setCurrentInstance(context);
-  }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/ListDataModel.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/ListDataModel.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/ListDataModel.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-//$Id: ListDataModel.java 5372 2007-06-21 05:27:29Z gavin $
-package org.jboss.seam.jsf;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * A JSF DataModel for lists - yes, I know, JSF has one, but its not
- * serializable (go figure).
- * 
- * @author Gavin King
- *
- */
-public class ListDataModel extends javax.faces.model.ListDataModel implements Serializable
-{
-   private static final long serialVersionUID = 5156131434571541698L;
-   
-   private void writeObject(ObjectOutputStream oos) throws IOException 
-   {
-      oos.writeObject( getWrappedData() );
-      oos.writeInt( getRowIndex() );
-   }
-   
-   private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException 
-   {
-      this.setWrappedData( ois.readObject() );
-      this.setRowIndex( ois.readInt() );
-   }
-   
-   public ListDataModel() {}
-   
-   public ListDataModel(List list)
-   {
-      super(list);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/MapDataModel.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/MapDataModel.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/MapDataModel.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,156 +0,0 @@
-//$Id: MapDataModel.java 7579 2008-03-14 12:08:54Z pete.muir at jboss.org $
-package org.jboss.seam.jsf;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.util.AbstractMap;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.model.DataModelEvent;
-import javax.faces.model.DataModelListener;
-
-/**
- * A JSF DataModel for maps.
- * 
- * @author Gavin King
- *
- */
-public class MapDataModel extends javax.faces.model.DataModel implements
-      Serializable
-{
-   private static final long serialVersionUID = -4888962547222002402L;
-   
-   private int rowIndex = -1;
-   
-   private Map data;
-   private transient List<Map.Entry> entries;
-   
-   public MapDataModel() {}
-   
-   public MapDataModel(Map map)
-   {
-      if (map == null)
-      {
-         throw new IllegalArgumentException("null map data");
-      }
-      setWrappedData(map);
-   }
-   
-   @Override
-   public int getRowCount()
-   {
-      if (entries == null)
-      {
-         return -1;
-      }
-      return entries.size();
-   }
-   
-   /**
-    * Returns a Map.Entry
-    */
-   @Override
-   public Object getRowData()
-   {
-      if (entries == null)
-      {
-         return null;
-      }
-      if ( !isRowAvailable() )
-      {
-         throw new IllegalArgumentException("row is unavailable");
-      }
-      return entries.get(rowIndex);
-   }
-   
-   @Override
-   public int getRowIndex()
-   {
-      return rowIndex;
-   }
-   
-   @Override
-   public Object getWrappedData()
-   {
-      return new AbstractMap()
-      {
-         @Override
-         public Set entrySet()
-         {
-            return new AbstractSet()
-            {
-               @Override
-               public Iterator iterator()
-               {
-                  return entries.iterator();
-               }
-               @Override
-               public int size()
-               {
-                  return entries.size();
-               }
-            };
-         }
-      };
-   }
-   
-   @Override
-   public boolean isRowAvailable()
-   {
-      return entries!=null && 
-            rowIndex >= 0 && 
-            rowIndex < entries.size();
-   }
-   
-   @Override
-   public void setRowIndex(int newRowIndex)
-   {
-      if (newRowIndex < -1)
-      {
-         throw new IllegalArgumentException("illegal rowIndex " + newRowIndex);
-      }
-      int oldRowIndex = rowIndex;
-      rowIndex = newRowIndex;
-      if (entries != null && oldRowIndex != newRowIndex)
-      {
-         Object data = isRowAvailable() ? getRowData() : null;
-         DataModelEvent event = new DataModelEvent(this, newRowIndex, data);
-         DataModelListener[] listeners = getDataModelListeners();
-         for (int i = 0; i < listeners.length; i++)
-         {
-            listeners[i].rowSelected(event);
-         }
-      }
-   }
-   
-   @Override
-   public void setWrappedData(Object data)
-   {
-      this.data = (Map) data;
-      entries = data == null ? null : new ArrayList( ( (Map) data ).entrySet() );
-      int rowIndex = data != null ? 0 : -1;
-      setRowIndex(rowIndex);
-   }
-   
-   private void writeObject(ObjectOutputStream oos) throws IOException
-   {
-      oos.writeInt(rowIndex);
-      oos.writeObject(data);
-   }
-   
-   private void readObject(ObjectInputStream ois) throws IOException,
-         ClassNotFoundException
-   {
-      rowIndex = ois.readInt();
-      data = (Map) ois.readObject();
-      entries = data == null ? null : new ArrayList( data.entrySet() );
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplication.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplication.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplication.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,461 +0,0 @@
-package org.jboss.seam.jsf;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import javax.el.ELContextListener;
-import javax.el.ELException;
-import javax.el.ELResolver;
-import javax.el.ExpressionFactory;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
-import javax.faces.application.Application;
-import javax.faces.application.NavigationHandler;
-import javax.faces.application.Resource;
-import javax.faces.application.StateManager;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.el.MethodBinding;
-import javax.faces.el.PropertyResolver;
-import javax.faces.el.ReferenceSyntaxException;
-import javax.faces.el.ValueBinding;
-import javax.faces.el.VariableResolver;
-import javax.faces.event.ActionListener;
-import javax.faces.event.SystemEvent;
-import javax.faces.validator.Validator;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.el.SeamExpressionFactory;
-
-/**
- * Proxies the JSF Application object, and adds all kinds
- * of tasty extras.
- * 
- * @author Gavin King
- *
- */
- at SuppressWarnings("deprecation")
-public class SeamApplication extends Application
-{  
-   
-   protected Application application;
-      
-   public SeamApplication(Application application)
-   {
-      this.application = application;
-   }
-   
-   public Application getDelegate()
-   {
-      return application;
-   }
-   
-   @Override
-   public ELResolver getELResolver() 
-   {
-      return application.getELResolver();
-   }
-
-   @Override
-   public void addComponent(String componentType, String componentClass)
-   {
-      application.addComponent(componentType, componentClass);
-   }
-
-   @Override
-   public void addConverter(String converterId, String converterClass)
-   {
-      application.addConverter(converterId, converterClass);
-   }
-
-   @Override
-   public void addConverter(Class targetClass, String converterClass)
-   {
-      application.addConverter(targetClass, converterClass);
-   }
-
-   @Override
-   public void addValidator(String validatorId, String validatorClass)
-   {
-      application.addValidator(validatorId, validatorClass);
-   }
-
-   @Override
-   public UIComponent createComponent(String componentType)
-         throws FacesException
-   {
-      return application.createComponent(componentType);
-   }
-
-   @Override
-   public UIComponent createComponent(ValueBinding componentBinding,
-         FacesContext context, String componentType) throws FacesException
-   {
-      return application.createComponent(componentBinding, context, componentType);
-   }
-   
-   @Override
-   public UIComponent createComponent(FacesContext context, 
-         String componentType, String rendererType)
-   {
-      return application.createComponent(context, componentType, rendererType);
-   }
-   
-   @Override
-   public UIComponent createComponent(FacesContext context, Resource resource)
-   {
-      return application.createComponent(context, resource);
-   }
-
-   @Override
-   public Converter createConverter(String converterId)
-   {
-      if ( Contexts.isApplicationContextActive() )
-      {
-         String name = Init.instance().getConverters().get(converterId);
-         if (name!=null)
-         {
-            return (Converter) Component.getInstance(name);
-         }
-      }
-      return application.createConverter(converterId);
-   }
-
-   @Override
-   public Converter createConverter(Class targetClass)
-   {
-      Converter converter = null;
-      if ( Contexts.isApplicationContextActive() )
-      {
-         converter = new ConverterLocator(targetClass).getConverter();
-      }
-      if (converter == null)
-      {
-         converter = application.createConverter(targetClass);
-      }
-      return converter;
-   }
-   
-   private class ConverterLocator 
-   {
-      
-      private Map<Class, String> converters;
-      private Class targetClass;
-      private Converter converter;
-      
-      public ConverterLocator(Class targetClass)
-      {
-         converters = Init.instance().getConvertersByClass();
-         this.targetClass = targetClass;
-      }
-      
-      public Converter getConverter()
-      {
-         if (converter == null)
-         {
-            locateConverter(targetClass);
-         }
-         return converter;
-      }
-      
-      private Converter createConverter(Class clazz)
-      {
-         return (Converter) Component.getInstance(converters.get(clazz));
-      }
-      
-      private void locateConverter(Class clazz)
-      {
-         if (converters.containsKey(clazz))
-         {
-            converter = createConverter(clazz);
-            return;
-         }
-         
-         for (Class _interface: clazz.getInterfaces())
-         {
-            if (converters.containsKey(_interface))
-            {
-               converter = createConverter(_interface);
-               return;
-            }
-            else
-            {
-               locateConverter(_interface);
-               if (converter != null)
-               {
-                  return;
-               }
-            }
-         }
-         
-         Class superClass = clazz.getSuperclass();
-         if (converters.containsKey(superClass))
-         {
-            converter = createConverter(superClass);
-            return;
-         }
-         else if (superClass != null)
-         {
-            locateConverter(superClass);
-         }
-      }
-   }
-
-   @Override
-   public Validator createValidator(String validatorId) throws FacesException
-   {
-      if ( Contexts.isApplicationContextActive() )
-      {
-         String name = Init.instance().getValidators().get(validatorId);
-         if (name!=null)
-         {
-            return (Validator) Component.getInstance(name);
-         }
-      }
-      return application.createValidator(validatorId);
-   }
-
-   @Override
-   public MethodBinding createMethodBinding(String expression, Class[] params)
-         throws ReferenceSyntaxException
-   {
-      return new UnifiedELMethodBinding(expression, params);
-
-   }
-
-   @Override
-   public ValueBinding createValueBinding(String expression)
-         throws ReferenceSyntaxException
-   {
-      return new UnifiedELValueBinding(expression);
-   }
-
-   @Override
-   public ActionListener getActionListener()
-   {
-      return application.getActionListener();
-   }
-
-   @Override
-   public Iterator getComponentTypes()
-   {
-      return application.getComponentTypes();
-   }
-
-   @Override
-   public Iterator getConverterIds()
-   {
-      return application.getConverterIds();
-   }
-
-   @Override
-   public Iterator getConverterTypes()
-   {
-      return application.getComponentTypes();
-   }
-
-   @Override
-   public Locale getDefaultLocale()
-   {
-      return application.getDefaultLocale();
-   }
-
-   @Override
-   public String getDefaultRenderKitId()
-   {
-      return application.getDefaultRenderKitId();
-   }
-
-   @Override
-   public String getMessageBundle()
-   {
-      return application.getMessageBundle();
-      //obsolete, now handled by faces-config.xml:
-      /*String messageBundle = application.getMessageBundle();
-      if (messageBundle!=null)
-      {
-         return messageBundle;
-      }
-      else
-      {
-         return "org.jboss.seam.core.SeamResourceBundle";
-      }*/
-   }
-
-   @Override
-   public NavigationHandler getNavigationHandler()
-   {
-      return application.getNavigationHandler();
-   }
-
-   @Override
-   public PropertyResolver getPropertyResolver()
-   {
-      return application.getPropertyResolver();
-   }
-
-   @Override
-   public StateManager getStateManager()
-   {
-      return application.getStateManager();
-   }
-
-   @Override
-   public Iterator getSupportedLocales()
-   {
-      return application.getSupportedLocales();
-   }
-
-   @Override
-   public Iterator getValidatorIds()
-   {
-      return application.getValidatorIds();
-   }
-
-   @Override
-   public VariableResolver getVariableResolver()
-   {
-      return application.getVariableResolver();
-   }
-
-   @Override
-   public ViewHandler getViewHandler()
-   {
-      return application.getViewHandler();
-   }
-
-   @Override
-   public void setActionListener(ActionListener listener)
-   {
-      application.setActionListener(listener);
-   }
-
-   @Override
-   public void setDefaultLocale(Locale locale)
-   {
-      application.setDefaultLocale(locale);
-   }
-
-   @Override
-   public void setDefaultRenderKitId(String renderKitId)
-   {
-      application.setDefaultRenderKitId(renderKitId);
-   }
-
-   @Override
-   public void setMessageBundle(String bundle)
-   {
-      application.setMessageBundle(bundle);
-   }
-
-   @Override
-   public void setNavigationHandler(NavigationHandler handler)
-   {
-      application.setNavigationHandler(handler);
-   }
-
-   @Override
-   public void setPropertyResolver(PropertyResolver resolver)
-   {
-      application.setPropertyResolver(resolver);
-   }
-
-   @Override
-   public void setStateManager(StateManager manager)
-   {
-      application.setStateManager(manager);
-   }
-
-   @Override
-   public void setSupportedLocales(Collection locales)
-   {
-      application.setSupportedLocales(locales);
-   }
-
-   @Override
-   public void setVariableResolver(VariableResolver resolver)
-   {
-      application.setVariableResolver(resolver);
-   }
-
-   @Override
-   public void setViewHandler(ViewHandler handler)
-   {
-      application.setViewHandler(handler);
-   }
-
-   @Override
-   public void addELContextListener(ELContextListener elcl)
-   {
-      application.addELContextListener(elcl);
-   }
-
-   @Override
-   public void addELResolver(ELResolver elr)
-   {
-      application.addELResolver(elr);
-   }
-
-   @Override
-   public UIComponent createComponent(ValueExpression ve, FacesContext fc, String id) throws FacesException
-   {
-      return application.createComponent(ve, fc, id);
-   }
-
-   @Override
-   public Object evaluateExpressionGet(FacesContext ctx, String expr, Class type) throws ELException
-   {
-      return getExpressionFactory().createValueExpression( ctx.getELContext(), expr, type).getValue( ctx.getELContext() );
-   }
-
-   @Override
-   public ELContextListener[] getELContextListeners()
-   {
-      return application.getELContextListeners();
-   }
-
-   @Override
-   public ExpressionFactory getExpressionFactory()
-   {
-      //JBoss EL
-      return SeamExpressionFactory.INSTANCE;
-   }
-
-   @Override
-   public ResourceBundle getResourceBundle(FacesContext fc, String name)
-   {
-      return application.getResourceBundle(fc, name);
-   }
-
-   @Override
-   public void removeELContextListener(ELContextListener elcl)
-   {
-      application.removeELContextListener(elcl);
-   }
-
-   @Override
-   public String toString()
-   {
-      return application.toString();
-   }
-   
-   @Override
-   public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source)
-   {
-      application.publishEvent(context, systemEventClass, source);      
-   }
-
-   @Override
-   public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
-   {
-      application.publishEvent(context, systemEventClass, sourceBaseType, source);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplicationFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplicationFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplicationFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-package org.jboss.seam.jsf;
-
-import javax.faces.application.Application;
-import javax.faces.application.ApplicationFactory;
-
-/**
- * Factory for SeamApplication (how could you possibly
- * have figured that out without JavaDoc?)
- * 
- * @see SeamApplication
- * @author Gavin King
- *
- */
-public class SeamApplicationFactory extends ApplicationFactory
-{
-   
-   private final ApplicationFactory delegate;
-   
-   public SeamApplicationFactory(ApplicationFactory af)
-   {
-      delegate = af;
-   }
-
-   @Override
-   public Application getApplication()
-   {
-      return new SeamApplication( delegate.getApplication() );
-   }
-
-   @Override
-   public void setApplication(Application application)
-   {
-      delegate.setApplication(application);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamNavigationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamNavigationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamNavigationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,54 +0,0 @@
-package org.jboss.seam.jsf;
-
-import javax.faces.application.NavigationHandler;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.core.Init;
-import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.pageflow.Pageflow;
-
-/**
- * Adds three new navigation possibilities beyond the
- * frumpy JSF navigation rules: returning the view id
- * directly, pages.xml, and jPDL-based pageflows.
- * 
- * @author Gavin King
- *
- */
-public class SeamNavigationHandler extends NavigationHandler 
-{
-   
-   private final NavigationHandler baseNavigationHandler;
-   
-   public SeamNavigationHandler(NavigationHandler navigationHandler)
-   {
-      this.baseNavigationHandler = navigationHandler;
-   }
-
-   @Override
-   public void handleNavigation(FacesContext context, String fromAction, String outcome) 
-   {
-      if ( !context.getResponseComplete() ) //workaround for a bug in MyFaces
-      {
-         if ( isOutcomeViewId(outcome) )
-         {
-            FacesManager.instance().interpolateAndRedirect(outcome);
-         }
-         else if ( Init.instance().isJbpmInstalled() && Pageflow.instance().isInProcess() && Pageflow.instance().hasTransition(outcome) )
-         {
-            Pageflow.instance().navigate(context, outcome);
-         }
-         else if ( !Pages.instance().navigate(context, fromAction, outcome) )
-         {
-            baseNavigationHandler.handleNavigation(context, fromAction, outcome);
-         }
-      }
-   }
-
-   private static boolean isOutcomeViewId(String outcome)
-   {
-      return outcome!=null && outcome.startsWith("/");
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,628 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.jsf;
-
-import static javax.faces.event.PhaseId.ANY_PHASE;
-import static javax.faces.event.PhaseId.INVOKE_APPLICATION;
-import static javax.faces.event.PhaseId.PROCESS_VALIDATIONS;
-import static javax.faces.event.PhaseId.RENDER_RESPONSE;
-import static javax.faces.event.PhaseId.RESTORE_VIEW;
-import static org.jboss.seam.transaction.Transaction.TRANSACTION_FAILED;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.core.ConversationPropagation;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.exception.Exceptions;
-import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.faces.FacesPage;
-import org.jboss.seam.faces.Switcher;
-import org.jboss.seam.faces.Validation;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.pageflow.Pageflow;
-import org.jboss.seam.persistence.PersistenceContexts;
-import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.transaction.UserTransaction;
-import org.jboss.seam.util.Reflections;
-import org.jboss.seam.web.ServletContexts;
-
-/**
- * Manages the Seam contexts associated with a JSF request
- * throughout the lifecycle of the request. Performs
- * transaction demarcation when Seam transaction management
- * is enabled. Hacks the JSF lifecyle to provide page
- * actions and page parameters.
- *
- * @author Gavin King
- */
-public class SeamPhaseListener implements PhaseListener
-{
-   private static final long serialVersionUID = -9127555729455066493L;
-   
-   private static final LogProvider log = Logging.getLogProvider(SeamPhaseListener.class);
-   
-   private static boolean exists = false;
-   
-   private static final Method SET_RENDER_PARAMETER;
-   private static final Class ACTION_RESPONSE;
-   private static final Class PORTLET_REQUEST;
-   
-   static
-   {
-      Method method = null;
-      Class actionResponseClass = null;
-      Class portletRequestClass = null;
-      try
-      {
-         Class[] parameterTypes = { String.class, String.class };
-         actionResponseClass = Class.forName("javax.portlet.ActionResponse");
-         portletRequestClass = Class.forName("javax.portlet.PortletRequest");
-         method = actionResponseClass.getMethod("setRenderParameter", parameterTypes);
-      }
-      catch (Exception e) {}
-      SET_RENDER_PARAMETER = method;
-      ACTION_RESPONSE = actionResponseClass;
-      PORTLET_REQUEST = portletRequestClass;
-   }
-
-   public SeamPhaseListener()
-   {
-      if (exists) 
-      {
-         log.warn("There should only be one Seam phase listener per application");
-      }
-      exists=true;
-   }
-   
-   public PhaseId getPhaseId()
-   {
-      return ANY_PHASE;
-   }
-   
-   public void beforePhase(PhaseEvent event)
-   {
-      log.trace( "before phase: " + event.getPhaseId() );
-      
-      FacesLifecycle.setPhaseId( event.getPhaseId() );
-
-      try
-      {
-         if ( isPortletRequest(event) )
-         {
-            beforePortletPhase(event);
-         }
-         else
-         {
-            beforeServletPhase(event);
-         }
-         raiseEventsBeforePhase(event);
-      }
-      catch (Exception e)
-      {
-         try
-         {
-            Exceptions.instance().handle(e);
-         }
-         catch (Exception ehe) 
-         {
-            log.error("swallowing exception", e);
-         }
-      }
-
-   }
-
-   private void beforeServletPhase(PhaseEvent event)
-   {
-      if ( event.getPhaseId() == RESTORE_VIEW )
-      {
-         beforeRestoreView( event.getFacesContext() );
-         ServletContexts.instance().setRequest((HttpServletRequest) event.getFacesContext().getExternalContext().getRequest());
-      }
-      
-      handleTransactionsBeforePhase(event);         
-      
-      if ( event.getPhaseId() == RENDER_RESPONSE )
-      {
-         beforeRenderResponse( event.getFacesContext() );
-      }
-      
-   }
-   
-   private void beforePortletPhase(PhaseEvent event)
-   {
-
-      FacesContext facesContext = event.getFacesContext();
-      
-      boolean notInitialised=false;
-
-      if ( event.getPhaseId() == RESTORE_VIEW )
-      {
-         beforeRestoreView(facesContext);
-      }
-      if ( event.getPhaseId() == RENDER_RESPONSE && !Contexts.isApplicationContextActive() ) 
-      {
-          beforeRestoreView(facesContext);
-          notInitialised = true;
-      }
-      
-      //delegate to subclass:
-      handleTransactionsBeforePhase(event);
-      
-      if (event.getPhaseId() == RENDER_RESPONSE) 
-      {
-         if (notInitialised) 
-         {
-            afterRestoreView(facesContext);
-         }
-         beforeRenderResponse(event.getFacesContext());
-      }
-   }
-
-   public void afterPhase(PhaseEvent event)
-   {
-      log.trace( "after phase: " + event.getPhaseId() );
-      
-      try
-      {
-         raiseEventsAfterPhase(event);
-         if ( isPortletRequest(event) )
-         {
-            afterPortletPhase(event);
-         }
-         else
-         {
-            afterServletPhase(event);
-         }
-      }
-      catch (Exception e)
-      {
-         log.warn("uncaught exception, passing to exception handler", e);
-         try
-         {
-            Exceptions.instance().handle(e);
-            // A redirect occurred inside the error handler, and we are in after
-            // phase, so we need to clean up now as there are no more after
-            // phases to be run
-            if ( event.getFacesContext().getResponseComplete() )
-            {
-               afterResponseComplete(event.getFacesContext());
-            }
-         }
-         catch (Exception ehe) 
-         {
-            log.error("swallowing exception", e);
-         }
-      }
-
-      FacesLifecycle.clearPhaseId();
-      
-   }
-
-   private void afterServletPhase(PhaseEvent event)
-   {
-  
-      FacesContext facesContext = event.getFacesContext();
-      
-      if ( event.getPhaseId() == RESTORE_VIEW )
-      {
-         afterRestoreView(facesContext);
-      }      
-      else if ( event.getPhaseId() == INVOKE_APPLICATION )
-      {
-         afterInvokeApplication();
-      }
-      else if ( event.getPhaseId() == PROCESS_VALIDATIONS )
-      {
-         afterProcessValidations(facesContext);
-      }
-            
-      //has to happen after, since restoreAnyConversationContext() 
-      //can add messages
-      FacesMessages.afterPhase();
-      
-      handleTransactionsAfterPhase(event);
-            
-      if ( event.getPhaseId() == RENDER_RESPONSE )
-      {
-         afterRenderResponse(facesContext);
-      }
-      else if ( facesContext.getResponseComplete() )
-      {
-         afterResponseComplete(facesContext);
-      }
-   }
-   
-   private void afterPortletPhase(PhaseEvent event)
-   {
-      Object portletPhase = event.getFacesContext().getExternalContext().getRequestMap().get("javax.portlet.faces.phase");
-
-      if (event.getPhaseId() == RESTORE_VIEW) 
-      {
-         afterRestoreView(event.getFacesContext());
-      }
-      else if (event.getPhaseId() == INVOKE_APPLICATION) 
-      {
-         afterInvokeApplication();
-      }
-      else if (event.getPhaseId() == PROCESS_VALIDATIONS) 
-      {
-         afterProcessValidations(event.getFacesContext());
-      }
-
-      FacesMessages.afterPhase();
-
-      // delegate to subclass:
-      handleTransactionsAfterPhase(event);
-
-      if (event.getPhaseId() == RENDER_RESPONSE) 
-      {
-         // writeConversationIdToResponse(
-         // facesContext.getExternalContext().getResponse() );
-         afterRenderResponse(event.getFacesContext());
-      }
-      else if ( (null != portletPhase && "ActionPhase".equals(portletPhase.toString()) )
-             && (event.getPhaseId() == INVOKE_APPLICATION
-                     || event.getFacesContext().getRenderResponse() 
-                     || event.getFacesContext().getResponseComplete()) )
-      {
-         Manager.instance().beforeRedirect();
-         if ( Manager.instance().isLongRunningConversation() ) 
-         {
-             setPortletRenderParameter(
-                   event.getFacesContext().getExternalContext().getResponse(),
-                   Manager.instance().getConversationIdParameter(),
-                     Manager.instance().getCurrentConversationId() );
-         }
-         afterResponseComplete( event.getFacesContext() );
-      }
-   }
-   
-   private static void setPortletRenderParameter(Object response, String conversationIdParameter, String conversationId)
-   {
-      if ( ACTION_RESPONSE.isInstance(response) )
-      {
-         Reflections.invokeAndWrap(SET_RENDER_PARAMETER, response, conversationIdParameter, conversationId);
-      }
-   }
-   
-   private static boolean isPortletRequest(PhaseEvent event)
-   {
-      return PORTLET_REQUEST!=null && 
-            PORTLET_REQUEST.isInstance( event.getFacesContext().getExternalContext().getRequest() );
-   }
-   
-   public void handleTransactionsBeforePhase(PhaseEvent event)
-   {
-      if ( Init.instance().isTransactionManagementEnabled() ) 
-      {
-         PhaseId phaseId = event.getPhaseId();
-         boolean beginTran = phaseId == PhaseId.RENDER_RESPONSE || 
-               phaseId == ( Transaction.instance().isConversationContextRequired() ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.RESTORE_VIEW );
-               //( phaseId == PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
-         
-         if (beginTran) 
-         {
-            begin(phaseId);
-         }
-      }
-   }
-   
-   public void handleTransactionsAfterPhase(PhaseEvent event)
-   {
-      if ( Init.instance().isTransactionManagementEnabled() ) 
-      {
-         PhaseId phaseId = event.getPhaseId();
-         boolean commitTran = phaseId == PhaseId.INVOKE_APPLICATION || 
-               event.getFacesContext().getRenderResponse() || //TODO: no need to commit the tx if we failed to restore the view
-               event.getFacesContext().getResponseComplete() ||
-               phaseId == PhaseId.RENDER_RESPONSE;
-               //( phaseId == PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
-         
-         if (commitTran)
-         { 
-            commitOrRollback(phaseId); //we commit before destroying contexts, cos the contexts have the PC in them
-         }
-      }
-   }
-   
-   protected void handleTransactionsAfterPageActions(FacesContext facesContext)
-   {
-      if ( Init.instance().isTransactionManagementEnabled() ) 
-      {
-         commitOrRollback("after invoking page actions");
-         if ( !facesContext.getResponseComplete() )
-         {
-            begin("before continuing render");
-         }
-      }
-   }
-   
-   protected void afterInvokeApplication() 
-   {
-      if ( Init.instance().isTransactionManagementEnabled() ) 
-      {
-         raiseTransactionFailedEvent();
-      }
-   }
-
-   protected void afterProcessValidations(FacesContext facesContext)
-   {
-      Validation.instance().afterProcessValidations(facesContext);
-   }
-   
-   /**
-    * Set up the Seam contexts, except for the conversation
-    * context
-    */
-   protected void beforeRestoreView(FacesContext facesContext)
-   {
-      FacesLifecycle.beginRequest( facesContext.getExternalContext() );
-   }
-   
-   /**
-    * Restore the page and conversation contexts during a JSF request
-    */
-   protected void afterRestoreView(FacesContext facesContext)
-   {
-      FacesLifecycle.resumePage();
-      Map parameters = facesContext.getExternalContext().getRequestParameterMap();
-      ConversationPropagation.instance().restoreConversationId(parameters);
-      boolean conversationFound = Manager.instance().restoreConversation();
-      FacesLifecycle.resumeConversation( facesContext.getExternalContext() );
-      postRestorePage(facesContext, parameters, conversationFound);
-   }
-
-   public void raiseEventsBeforePhase(PhaseEvent event)
-   {
-      if ( Contexts.isApplicationContextActive() )
-      {
-         Events.instance().raiseEvent("org.jboss.seam.beforePhase", event);
-      }
-      
-      /*if ( Contexts.isConversationContextActive() && Init.instance().isJbpmInstalled() && Pageflow.instance().isInProcess() )
-      {
-         String name;
-         PhaseId phaseId = event.getPhaseId();
-         if ( phaseId == PhaseId.PROCESS_VALIDATIONS )
-         {
-            name = "process-validations";
-         }
-         else if ( phaseId == PhaseId.UPDATE_MODEL_VALUES )
-         {
-            name = "update-model-values";
-         }
-         else if ( phaseId == PhaseId.INVOKE_APPLICATION )
-         {
-            name = "invoke-application";
-         }
-         else if ( phaseId == PhaseId.RENDER_RESPONSE )
-         {
-            name = "render-response";
-         }
-         else
-         {
-            return;
-         }
-         Pageflow.instance().processEvents(name);
-      }*/
-   }
-   
-   public void raiseEventsAfterPhase(PhaseEvent event)
-   {
-      if ( Contexts.isApplicationContextActive() )
-      {
-         Events.instance().raiseEvent("org.jboss.seam.afterPhase", event);
-      }
-   }
-   
-   /**
-    * Raise an event so that an observer may add a faces message when Seam-managed transactions fail.
-    */
-   protected void raiseTransactionFailedEvent()
-   {
-      try
-      {
-         UserTransaction tx = Transaction.instance();
-         if ( tx.isRolledBackOrMarkedRollback() )
-         {
-            if (Events.exists()) Events.instance().raiseEvent(TRANSACTION_FAILED, tx.getStatus());
-         }
-      }
-      catch (Exception e) {} //swallow silently, not important
-   }
-   
-   protected void beforeRenderResponse(FacesContext facesContext)
-   {  
-      
-      if ( Contexts.isPageContextActive() )
-      {
-         Context pageContext = Contexts.getPageContext();
-         //after every time that the view may have changed,
-         //we need to flush the page context, since the 
-         //attribute map is being discarder
-         pageContext.flush();
-         //force refresh of the conversation lists (they are kept in PAGE context)
-         pageContext.remove(Seam.getComponentName(Switcher.class));
-         pageContext.remove("org.jboss.seam.core.conversationList");
-         pageContext.remove("org.jboss.seam.core.conversationStack");
-      }
-      
-      preRenderPage(facesContext);
-      
-      if ( facesContext.getResponseComplete() )
-      {
-         //workaround for a bug in MyFaces prior to 1.1.3
-         if ( Init.instance().isMyFacesLifecycleBug() ) 
-         {
-            FacesLifecycle.endRequest( facesContext.getExternalContext() );
-         }
-      }
-      else //if the page actions did not call responseComplete()
-      {
-         FacesMessages.instance().beforeRenderResponse();
-         //do this both before and after render, since conversations 
-         //and pageflows can begin during render
-         FacesManager.instance().prepareBackswitch(facesContext); 
-      }
-      
-      FacesPage.instance().storeConversation();
-      FacesPage.instance().storePageflow();
-      
-      PersistenceContexts persistenceContexts = PersistenceContexts.instance();
-      if (persistenceContexts != null) 
-      {
-          persistenceContexts.beforeRender();
-      }
-   }
-   
-   protected void afterRenderResponse(FacesContext facesContext)
-   {
-      //do this both before and after render, since conversations 
-      //and pageflows can begin during render
-      FacesManager.instance().prepareBackswitch(facesContext);
-      
-      PersistenceContexts persistenceContexts = PersistenceContexts.instance();
-      if (persistenceContexts != null) 
-      {
-          persistenceContexts.afterRender();
-      }
-      
-      ExternalContext externalContext = facesContext.getExternalContext();
-      Manager.instance().endRequest( externalContext.getSessionMap() );
-      FacesLifecycle.endRequest(externalContext);
-   }
-   
-   protected void afterResponseComplete(FacesContext facesContext)
-   {
-      //responseComplete() was called by one of the other phases, 
-      //so we will never get to the RENDER_RESPONSE phase
-      //Note: we can't call Manager.instance().beforeRedirect() here, 
-      //since a redirect is not the only reason for a responseComplete
-      ExternalContext externalContext = facesContext.getExternalContext();
-      Manager.instance().endRequest( externalContext.getSessionMap() );
-      FacesLifecycle.endRequest( facesContext.getExternalContext() );
-   }
-   
-   private void postRestorePage(FacesContext facesContext, Map parameters, boolean conversationFound)
-   {
-      if ( !Pages.isDebugPage() )
-      {
-         // Only redirect to no-conversation-view if a login redirect isn't required
-         if (!conversationFound && !Pages.instance().isLoginRedirectRequired(facesContext))
-         {
-            Pages.instance().redirectToNoConversationView();
-         }
-         
-         Manager.instance().handleConversationPropagation(parameters);
-         
-         if ( Init.instance().isJbpmInstalled() && !isExceptionHandlerRedirect() )
-         {
-            Pageflow.instance().validatePageflow(facesContext);
-         }
-         
-         Pages.instance().postRestore(facesContext);
-      }
-   }
-  
-   private boolean preRenderPage(FacesContext facesContext)
-   {
-      if ( Pages.isDebugPage() )
-      {
-         return false;
-      }
-      else
-      {
-         FacesLifecycle.setPhaseId(PhaseId.INVOKE_APPLICATION);
-         boolean actionsWereCalled = false;
-         try
-         {
-            actionsWereCalled = Pages.instance().preRender(facesContext);
-            return actionsWereCalled;
-         }
-         finally
-         {
-            FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
-            if (actionsWereCalled) 
-            {
-               FacesMessages.afterPhase();
-               handleTransactionsAfterPageActions(facesContext); //TODO: does it really belong in the finally?
-            }
-         }
-      }
-   }
-   
-   private boolean isExceptionHandlerRedirect()
-   {
-      return Contexts.getConversationContext().isSet("org.jboss.seam.handledException");
-   }
-     
-   void begin(PhaseId phaseId)
-   {
-      begin("prior to phase: " + phaseId);
-   }
-   
-   void begin(String phaseString) 
-   {
-      try 
-      {
-         if ( !Transaction.instance().isActiveOrMarkedRollback() )
-         {
-            log.debug("beginning transaction " + phaseString);
-            Transaction.instance().begin();
-         }
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Could not start transaction", e);
-      }
-   }
-   
-   void commitOrRollback(PhaseId phaseId)
-   {
-      commitOrRollback("after phase: " + phaseId);
-   }
-   
-   void commitOrRollback(String phaseString) 
-   {  
-      try {
-         if (Transaction.instance().isActive()) {
-             try {
-                 log.debug("committing transaction " + phaseString);            
-                 Transaction.instance().commit();
-
-             } catch (IllegalStateException e) {
-                 log.warn("TX commit failed with illegal state exception. This may be " + 
-                          "because the tx timed out and was rolled back in the background.", e);
-             }
-         } else if ( Transaction.instance().isRolledBackOrMarkedRollback()) {
-            log.debug("rolling back transaction " + phaseString);
-            Transaction.instance().rollback();
-         }
-         
-      } catch (Exception e) {
-         throw new IllegalStateException("Could not commit transaction", e);
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamStateManager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamStateManager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamStateManager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,104 +0,0 @@
-package org.jboss.seam.jsf;
-
-import java.io.IOException;
-
-import javax.faces.application.StateManager;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.navigation.Pages;
-
-/**
- * A wrapper for the JSF implementation's StateManager that allows
- * us to intercept saving of the serialized component tree. This
- * is quite ugly but was needed in order to allow conversations to
- * be started and manipulated during the RENDER_RESPONSE phase.
- * 
- * @author Gavin King
- */
- at SuppressWarnings("deprecation")
-public class SeamStateManager extends StateManager 
-{
-   private final StateManager stateManager;
-
-   public SeamStateManager(StateManager sm) 
-   {
-      this.stateManager = sm;
-   }
-
-   @Override
-   protected Object getComponentStateToSave(FacesContext ctx) 
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   protected Object getTreeStructureToSave(FacesContext ctx) 
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   protected void restoreComponentState(FacesContext ctx, UIViewRoot viewRoot, String str) 
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   protected UIViewRoot restoreTreeStructure(FacesContext ctx, String str1, String str2) 
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SerializedView saveSerializedView(FacesContext facesContext) 
-   {
-      
-      if ( Contexts.isPageContextActive() )
-      {
-         //store the page parameters in the view root
-         Pages.instance().updateStringValuesInPageContextUsingModel(facesContext);
-      }
-
-      return stateManager.saveSerializedView(facesContext);
-   }
-
-   @Override
-   public void writeState(FacesContext ctx, SerializedView sv) throws IOException 
-   {
-      stateManager.writeState(ctx, sv);
-   }
-
-   @Override
-   public UIViewRoot restoreView(FacesContext ctx, String str1, String str2) 
-   {
-      return stateManager.restoreView(ctx, str1, str2);
-   }
-
-   @Override
-   public Object saveView(FacesContext facesContext) 
-   {
-      
-      if ( Contexts.isPageContextActive() )
-      {
-         //store the page parameters in the view root
-         Pages.instance().updateStringValuesInPageContextUsingModel(facesContext);
-      }
-
-      return stateManager.saveView(facesContext);
-   }
-
-   @Override
-   public void writeState(FacesContext ctx, Object sv) throws IOException 
-   {
-      stateManager.writeState(ctx, sv);
-   }
-
-   @Override
-   public boolean isSavingStateInClient(FacesContext ctx) 
-   {
-      return stateManager.isSavingStateInClient(ctx);
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,111 +0,0 @@
-package org.jboss.seam.jsf;
-
-import java.io.IOException;
-import java.util.Locale;
-
-import javax.faces.FacesException;
-import javax.faces.application.ViewHandler;
-import javax.faces.application.ViewHandlerWrapper;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.international.LocaleSelector;
-
-/**
- * Allows the JSF view locale to be integrated with
- * the locale coming from Seam internationalization.
- * 
- * @see org.jboss.seam.international.LocaleSelector
- * 
- * @author Gavin King
- *
- */
-public class SeamViewHandler extends ViewHandlerWrapper
-{
-   
-   private ViewHandler viewHandler;
-   
-   public SeamViewHandler(ViewHandler viewHandler)
-   {
-      this.viewHandler = viewHandler;
-   }
-   
-   @Override
-   public String calculateCharacterEncoding(FacesContext context)
-   {
-      return viewHandler.calculateCharacterEncoding(context);
-   }
-
-   @Override
-   public void initView(FacesContext context) throws FacesException
-   {
-      viewHandler.initView(context);
-   }
-   
-   @Override
-   public Locale calculateLocale(FacesContext facesContext) 
-   {
-      Locale jsfLocale = viewHandler.calculateLocale(facesContext);
-      if ( !Contexts.isSessionContextActive() )
-      {
-         return jsfLocale;
-      }
-      else
-      {
-         return LocaleSelector.instance().calculateLocale(jsfLocale);
-      }
-   }
-
-   @Override
-   public String calculateRenderKitId(FacesContext ctx) 
-   {
-      return viewHandler.calculateRenderKitId(ctx);
-   }
-
-   @Override
-   public UIViewRoot createView(FacesContext ctx, String viewId) 
-   {
-      return viewHandler.createView(ctx, viewId);
-   }
-
-   @Override
-   public String getActionURL(FacesContext ctx, String viewId) 
-   {
-      return viewHandler.getActionURL(ctx, viewId);
-   }
-
-   @Override
-   public String getResourceURL(FacesContext ctx, String path) 
-   {
-      return viewHandler.getResourceURL(ctx, path);
-   }
-
-   @Override
-   public void renderView(FacesContext ctx, UIViewRoot viewRoot)
-         throws IOException, FacesException 
-   {
-      viewHandler.renderView(ctx, viewRoot);
-   }
-
-   @Override
-   public UIViewRoot restoreView(FacesContext ctx, String viewId) 
-   {
-      UIViewRoot viewRoot =viewHandler.restoreView(ctx, viewId);
-      viewRoot.setViewId(viewHandler.deriveViewId(ctx,viewId));
-      return viewRoot;
-   }
-
-   @Override
-   public void writeState(FacesContext ctx) throws IOException 
-   {
-      viewHandler.writeState(ctx);
-   }
-
-   @Override
-   public ViewHandler getWrapped()
-   {
-      return viewHandler;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SetDataModel.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SetDataModel.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SetDataModel.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,139 +0,0 @@
-//$Id: SetDataModel.java 7577 2008-03-14 11:47:09Z pete.muir at jboss.org $
-package org.jboss.seam.jsf;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.faces.model.DataModelEvent;
-import javax.faces.model.DataModelListener;
-
-/**
- * A JSF DataModel for sets.
- * 
- * @author Gavin King
- *
- */
-public class SetDataModel extends javax.faces.model.DataModel implements
-      Serializable
-{
-   private static final long serialVersionUID = -616367764778689337L;
-   private int rowIndex = -1;
-   private List entries;
-
-   public SetDataModel() {}
-
-   public SetDataModel(Set set)
-   {
-      if (set == null)
-      {
-         throw new IllegalArgumentException("null set data");
-      }
-      setWrappedData(set);
-   }
-
-   @Override
-   public int getRowCount()
-   {
-      if (entries==null)
-      {
-         return -1;
-      }
-      return entries.size();
-   }
-
-   @Override
-   public Object getRowData()
-   {
-      if (entries == null)
-      {
-         return null;
-      }
-      if ( !isRowAvailable() )
-      {
-         throw new IllegalArgumentException("row is unavailable");
-      }
-      return entries.get(rowIndex);
-   }
-
-   @Override
-   public int getRowIndex()
-   {
-      return rowIndex;
-   }
-
-   @Override
-   public Object getWrappedData()
-   {
-      return new AbstractSet()
-      {
-         @Override
-         public Iterator iterator()
-         {
-            return entries.iterator();
-         }
-         @Override
-         public int size()
-         {
-            return entries.size();
-         }
-      };
-   }
-
-   @Override
-   public boolean isRowAvailable()
-   {
-      return entries!=null && 
-            rowIndex >= 0 && 
-            rowIndex < entries.size();
-   }
-
-   @Override
-   public void setRowIndex(int newRowIndex)
-   {
-      if (newRowIndex < -1)
-      {
-         throw new IllegalArgumentException("illegal rowIndex " + newRowIndex);
-      }
-      int oldRowIndex = rowIndex;
-      rowIndex = newRowIndex;
-      if (entries != null && oldRowIndex != newRowIndex)
-      {
-         Object data = isRowAvailable() ? getRowData() : null;
-         DataModelEvent event = new DataModelEvent(this, newRowIndex, data);
-         DataModelListener[] listeners = getDataModelListeners();
-         for (int i = 0; i < listeners.length; i++)
-         {
-            listeners[i].rowSelected(event);
-         }
-      }
-   }
-
-   @Override
-   public void setWrappedData(Object data)
-   {
-      entries = data == null ? null : new ArrayList( (Set) data );
-      int rowIndex = data != null ? 0 : -1;
-      setRowIndex(rowIndex);
-   }
-
-   private void writeObject(ObjectOutputStream oos) throws IOException
-   {
-      oos.writeInt(rowIndex);
-      oos.writeObject(entries);
-   }
-
-   private void readObject(ObjectInputStream ois) throws IOException,
-         ClassNotFoundException
-   {
-      rowIndex = ois.readInt();
-      entries = (List) ois.readObject();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/UnifiedELMethodBinding.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/UnifiedELMethodBinding.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/UnifiedELMethodBinding.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,69 +0,0 @@
-package org.jboss.seam.jsf;
-
-import java.io.Serializable;
-
-import javax.el.MethodExpression;
-import javax.faces.context.FacesContext;
-import javax.faces.el.EvaluationException;
-import javax.faces.el.MethodBinding;
-import javax.faces.el.MethodNotFoundException;
-
-/**
- * Nobody should be using MethodBinding anymore, but if they 
- * are, we need this.
- * 
- * @author Gavin King
- *
- */
- at SuppressWarnings("deprecation")
- at Deprecated
-public class UnifiedELMethodBinding extends MethodBinding implements Serializable
-{
-   private transient MethodExpression methodExpression;
-   
-   private String expressionString;
-   private Class[] argTypes;
-
-   public UnifiedELMethodBinding() {}
-   
-   public UnifiedELMethodBinding(String expressionString, Class[] argTypes)
-   {
-      this.expressionString = expressionString;
-      this.argTypes = argTypes;
-   }
-
-   @Override
-   public String getExpressionString()
-   {
-      return expressionString;
-   }
-
-   @Override
-   public Class getType(FacesContext ctx) throws MethodNotFoundException
-   {
-      return getMethodExpression(ctx).getMethodInfo( ctx.getELContext() ).getReturnType();
-   }
-
-   @Override
-   public Object invoke(FacesContext ctx, Object[] args) throws EvaluationException, MethodNotFoundException
-   {
-      return getMethodExpression(ctx).invoke( ctx.getELContext(), args);
-   }
-
-   @Override
-   public String toString()
-   {
-      return getExpressionString();
-   }
-
-   private MethodExpression getMethodExpression(FacesContext ctx)
-   {
-      if (methodExpression==null)
-      {
-         // In JSF 1.1 EL (argTypes = null) == (argTypes = new Class[0]), but not in Unified EL
-         methodExpression = ctx.getApplication().getExpressionFactory()
-                  .createMethodExpression( ctx.getELContext(), expressionString, Object.class, argTypes == null ? new Class[0] : argTypes );
-      }
-      return methodExpression;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/UnifiedELValueBinding.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/UnifiedELValueBinding.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/UnifiedELValueBinding.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,74 +0,0 @@
-package org.jboss.seam.jsf;
-
-import java.io.Serializable;
-
-import javax.el.ValueExpression;
-import javax.faces.context.FacesContext;
-import javax.faces.el.EvaluationException;
-import javax.faces.el.PropertyNotFoundException;
-import javax.faces.el.ValueBinding;
-
-/**
- * Nobody should be using ValueBinding anymore, but if they 
- * are, we need this.
- * 
- * @author Gavin King
- *
- */
- at SuppressWarnings("deprecation")
- at Deprecated
-public class UnifiedELValueBinding extends ValueBinding implements Serializable
-{
-   private transient ValueExpression valueExpression;
-   
-   private String expressionString;
-
-   public UnifiedELValueBinding(String expressionString)
-   {
-      this.expressionString = expressionString;
-   }
-
-   public UnifiedELValueBinding() {}
-   
-   @Override
-   public String getExpressionString()
-   {
-      return expressionString;
-   }
-
-   @Override
-   public Class getType(FacesContext ctx) throws EvaluationException, PropertyNotFoundException {
-      return getValueExpression(ctx).getType( ctx.getELContext() );
-   }
-
-   @Override
-   public Object getValue(FacesContext ctx) throws EvaluationException, PropertyNotFoundException {
-   	return getValueExpression(ctx).getValue( ctx.getELContext() );
-   }
-
-   @Override
-   public boolean isReadOnly(FacesContext ctx) throws EvaluationException, PropertyNotFoundException {
-   	return getValueExpression(ctx).isReadOnly( ctx.getELContext() );
-   }
-
-   @Override
-   public void setValue(FacesContext ctx, Object value) throws EvaluationException, PropertyNotFoundException {
-      getValueExpression(ctx).setValue( ctx.getELContext(), value);
-   }
-   
-   @Override
-   public String toString()
-   {
-      return getExpressionString();
-   }
-
-   private ValueExpression getValueExpression(FacesContext ctx)
-   {
-      if (valueExpression==null)
-      {
-         valueExpression = ctx.getApplication().getExpressionFactory()
-                  .createValueExpression( ctx.getELContext(), expressionString, Object.class );
-      }
-      return valueExpression;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-/**
- * Integration with the JSF implementation.
- * You're not really interested in the classes
- * in this package.
- */
-package org.jboss.seam.jsf;
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/JDKProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/JDKProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/JDKProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,135 +0,0 @@
-package org.jboss.seam.log;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-class JDKProvider implements LogProvider
-{
-   private final Logger logger;
-   private final boolean isWrapped;
-
-   JDKProvider(String category, boolean wrapped)
-   {
-      this.logger = Logger.getLogger(category);
-      this.isWrapped = wrapped;
-   }
-
-   private void log( Level level, Object object, Throwable ex ) 
-   {
-
-      if ( logger.isLoggable(level) ) 
-      {
-          Throwable dummyException=new Throwable();
-          StackTraceElement locations[]=dummyException.getStackTrace();
-          String className="unknown";
-          String methodName="unknown";
-          int depth = isWrapped ? 3 : 2;
-          if( locations!=null && locations.length>depth ) 
-          {
-              StackTraceElement caller=locations[depth];
-              className=caller.getClassName();
-              methodName=caller.getMethodName();
-          }
-          if( ex==null ) 
-          {
-              logger.logp( level, className, methodName, String.valueOf(object) );
-          } 
-          else 
-          {
-              logger.logp( level, className, methodName, String.valueOf(object), ex );
-          }
-      }
-
-  }
-   
-   public void debug(Object object, Throwable t)
-   {
-      log(Level.FINE, object, t);
-   }
-
-   public void debug(Object object)
-   {
-      log(Level.FINE, object, null);
-   }
-
-   public void error(Object object, Throwable t)
-   {
-      log(Level.SEVERE, object, t);
-   }
-
-   public void error(Object object)
-   {
-      log(Level.SEVERE, object, null);
-   }
-
-   public void fatal(Object object, Throwable t)
-   {
-      log(Level.SEVERE, object, t);
-   }
-
-   public void fatal(Object object)
-   {
-      log(Level.SEVERE, object, null);
-   }
-
-   public void info(Object object, Throwable t)
-   {
-      log(Level.INFO, object, t);
-   }
-
-   public void info(Object object)
-   {
-      log(Level.INFO, object, null);
-   }
-
-   public boolean isDebugEnabled()
-   {
-      return logger.isLoggable(Level.FINE);
-   }
-
-   public boolean isErrorEnabled()
-   {
-      return logger.isLoggable(Level.SEVERE);
-   }
-
-   public boolean isFatalEnabled()
-   {
-      return logger.isLoggable(Level.SEVERE);
-   }
-
-   public boolean isInfoEnabled()
-   {
-      return logger.isLoggable(Level.INFO);
-   }
-
-   public boolean isTraceEnabled()
-   {
-      return logger.isLoggable(Level.FINER);
-   }
-
-   public boolean isWarnEnabled()
-   {
-      return logger.isLoggable(Level.WARNING);
-   }
-
-   public void trace(Object object, Throwable t)
-   {
-      log(Level.FINER, object, t);
-   }
-
-   public void trace(Object object)
-   {
-      log(Level.FINER, object, null);
-   }
-
-   public void warn(Object object, Throwable t)
-   {
-      log(Level.WARNING, object, t);
-   }
-
-   public void warn(Object object)
-   {
-      log(Level.WARNING, object, null);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Log.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Log.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Log.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.log;
-
-/**
- * A logging interface that integrates with Seam's
- * message interpolation functionality.
- * 
- * @author Gavin King
- */
-public interface Log
-{
-   public boolean isDebugEnabled();
-   public boolean isErrorEnabled();
-   public boolean isFatalEnabled();
-   public boolean isInfoEnabled();
-   public boolean isTraceEnabled();
-   public boolean isWarnEnabled();
-
-   public void trace(Object object, Object... params);
-   public void trace(Object object, Throwable t, Object... params);
-   public void debug(Object object, Object... params);
-   public void debug(Object object, Throwable t, Object... params);
-   public void info(Object object, Object... params);
-   public void info(Object object, Throwable t, Object... params);
-   public void warn(Object object, Object... params);
-   public void warn(Object object, Throwable t, Object... params);
-   public void error(Object object, Object... params);
-   public void error(Object object, Throwable t, Object... params);
-   public void fatal(Object object, Object... params);
-   public void fatal(Object object, Throwable t, Object... params);
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Log4JProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Log4JProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Log4JProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,130 +0,0 @@
-package org.jboss.seam.log;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-
-final class Log4JProvider implements LogProvider
-{
-   private final Logger logger;
-   private final boolean isWrapped;
-   
-   private static final String LOG_IMPL_FQCN = LogImpl.class.getName();
-   private static final String LOG_PROVIDER_FQCN = Log4JProvider.class.getName();
-   
-   private static final Level TRACE;
-   static
-   {
-      Object trace;
-      try
-      {
-         trace = Level.class.getDeclaredField("TRACE").get(null);
-      }
-      catch (Exception e)
-      {
-         trace = Level.DEBUG;
-      }
-      TRACE = (Level) trace;
-   }
-   
-   Log4JProvider(String category, boolean wrapped)
-   {
-      logger = Logger.getLogger(category);
-      isWrapped = wrapped;
-   }
-   
-   private String getFQCN()
-   {
-      return isWrapped ? LOG_IMPL_FQCN : LOG_PROVIDER_FQCN;
-   }
-
-   public void debug(Object object)
-   {
-      logger.log( getFQCN(), Level.DEBUG, object, null);
-   }
-
-   public void debug(Object object, Throwable t)
-   {
-      logger.log( getFQCN(), Level.DEBUG, object, t);
-   }
-
-   public void error(Object object)
-   {
-      logger.log( getFQCN(), Level.ERROR, object, null);
-   }
-
-   public void error(Object object, Throwable t)
-   {
-      logger.log( getFQCN(), Level.ERROR, object, t);
-   }
-
-   public void fatal(Object object)
-   {
-      logger.log( getFQCN(), Level.FATAL, object, null);
-   }
-
-   public void fatal(Object object, Throwable t)
-   {
-      logger.log( getFQCN(), Level.FATAL, object, t);
-   }
-
-   public void info(Object object)
-   {
-      logger.log( getFQCN(), Level.INFO, object, null);
-   }
-
-   public void info(Object object, Throwable t)
-   {
-      logger.log( getFQCN(), Level.INFO, object, t);
-   }
-
-   public boolean isDebugEnabled()
-   {
-      return logger.isEnabledFor(Level.DEBUG);
-   }
-
-   public boolean isErrorEnabled()
-   {
-      return logger.isEnabledFor(Level.ERROR);
-   }
-
-   public boolean isFatalEnabled()
-   {
-      return logger.isEnabledFor(Level.FATAL);
-   }
-
-   public boolean isInfoEnabled()
-   {
-      return logger.isEnabledFor(Level.INFO);
-   }
-
-   public boolean isTraceEnabled()
-   {
-      return logger.isEnabledFor(TRACE);
-   }
-
-   public boolean isWarnEnabled()
-   {
-      return logger.isEnabledFor(Level.WARN);
-   }
-
-   public void trace(Object object)
-   {
-      logger.log( getFQCN(), TRACE, object, null);
-   }
-
-   public void trace(Object object, Throwable t)
-   {
-      logger.log( getFQCN(), TRACE, object, t);
-   }
-
-   public void warn(Object object)
-   {
-      logger.log( getFQCN(), Level.WARN, object, null);
-   }
-
-   public void warn(Object object, Throwable t)
-   {
-      logger.log( getFQCN(), Level.WARN, object, t);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/LogImpl.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/LogImpl.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/LogImpl.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,176 +0,0 @@
-package org.jboss.seam.log;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-import org.jboss.seam.core.Interpolator;
-
-/**
- * Implementation of the Log interface using commons logging.
- * 
- * @author Gavin King
- */
-class LogImpl implements Log, Externalizable
-{
-   private static final long serialVersionUID = -1664298172030714342L;
-   
-   private transient LogProvider log;
-   private String category;
-   
-   public LogImpl() {} //for Externalizable
-   
-   LogImpl(String category)
-   {
-      this.category = category;
-      this.log = Logging.getLogProvider(category, true);
-   }
-   
-   public boolean isDebugEnabled()
-   {
-      return log.isDebugEnabled();
-   }
-   public boolean isErrorEnabled()
-   {
-      return log.isErrorEnabled();
-   }
-   public boolean isFatalEnabled()
-   {
-      return log.isFatalEnabled();
-   }
-   public boolean isInfoEnabled()
-   {
-      return log.isInfoEnabled();
-   }
-   public boolean isTraceEnabled()
-   {
-      return log.isTraceEnabled();
-   }
-   public boolean isWarnEnabled()
-   {
-      return log.isWarnEnabled();
-   }
-   public void trace(Object object, Object... params)
-   {
-      if ( isTraceEnabled() )
-      {
-         log.trace(  interpolate(object, params) );
-      }
-   }
-   public void trace(Object object, Throwable t, Object... params)
-   {
-      if ( isTraceEnabled() )
-      {
-         log.trace(  interpolate(object, params), t );
-      }
-   }
-   public void debug(Object object, Object... params)
-   {
-      if ( isDebugEnabled() )
-      {
-         log.debug(  interpolate(object, params) );
-      }
-   }
-   public void debug(Object object, Throwable t, Object... params)
-   {
-      if ( isDebugEnabled() )
-      {
-         log.debug(  interpolate(object, params), t );
-      }
-   }
-   public void info(Object object, Object... params)
-   {
-      if ( isInfoEnabled() )
-      {
-         log.info( interpolate(object, params) );
-      }
-   }
-   public void info(Object object, Throwable t, Object... params)
-   {
-      if ( isInfoEnabled() )
-      {
-         log.info( interpolate(object, params), t );
-      }
-   }
-   public void warn(Object object, Object... params)
-   {
-      if ( isWarnEnabled() )
-      {
-         log.warn( interpolate(object, params) );
-      }
-   }
-   public void warn(Object object, Throwable t, Object... params)
-   {
-      if ( isWarnEnabled() )
-      {
-         log.warn( interpolate(object, params), t );
-      }
-   }
-   public void error(Object object, Object... params)
-   {
-      if ( isErrorEnabled() )
-      {
-         log.error( interpolate(object, params) );
-      }
-   }
-   public void error(Object object, Throwable t, Object... params)
-   {
-      if ( isErrorEnabled() )
-      {
-         log.error( interpolate(object, params), t );
-      }
-   }
-   public void fatal(Object object, Object... params)
-   {
-      if ( isFatalEnabled() )
-      {
-         log.fatal( interpolate(object, params) );
-      }
-   }
-   public void fatal(Object object, Throwable t, Object... params)
-   {
-      if ( isFatalEnabled() )
-      {
-         log.fatal( interpolate(object, params), t );
-      }
-   }
-   
-   @SuppressWarnings("finally")
-   private Object interpolate(Object object, Object... params)
-   {
-      if (object instanceof String)
-      {
-         try {
-            object = Interpolator.instance().interpolate( (String) object, params );
-         } catch (Exception e) {
-            log.error("exception interpolating string: " + object, e);
-         } finally {
-            return object;
-         }
-         
-      }
-      else
-      {
-         return object;
-      }
-   }
-   
-   public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
-   {
-      category = (String) in.readObject();
-      log = Logging.getLogProvider(category, true);
-   }
-   
-   public void writeExternal(ObjectOutput out) throws IOException
-   {
-      out.writeObject(category);
-   }
-   
-   /*void readObject(ObjectInputStream ois) 
-         throws ClassNotFoundException, IOException
-   {
-      ois.defaultReadObject();
-      log = LogFactory.getLog(category);
-   }*/     
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/LogProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/LogProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/LogProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,33 +0,0 @@
-package org.jboss.seam.log;
-
-/**
- * 
- * Abstracts the underlying logging implementation
- * (log4j or JDK logging). This saves us from having
- * to use evil and absurdly overengineered stuff
- * like commons-logging.
- * 
- * @author Gavin King
- *
- */
-public interface LogProvider
-{
-   public void trace(Object object);
-   public void trace(Object object, Throwable t);
-   public void debug(Object object);
-   public void debug(Object object, Throwable t);
-   public void info(Object object);
-   public void info(Object object, Throwable t);
-   public void warn(Object object);
-   public void warn(Object object, Throwable t);
-   public void error(Object object);
-   public void error(Object object, Throwable t);
-   public void fatal(Object object);
-   public void fatal(Object object, Throwable t);
-   public boolean isTraceEnabled();
-   public boolean isDebugEnabled();
-   public boolean isInfoEnabled();
-   public boolean isWarnEnabled();
-   public boolean isErrorEnabled();
-   public boolean isFatalEnabled();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Logging.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Logging.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/Logging.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,53 +0,0 @@
-package org.jboss.seam.log;
-
-/**
- * Factory for Seam Logs and LogProviders. If log4j exists
- * in the classpath, the LogProvider will be log4j. Otherwise,
- * it will be JDK logging.
- * 
- * @author Gavin King
- *
- */
-public class Logging
-{
-   
-   private static final boolean isLog4JAvailable;
-   
-   static
-   {
-      boolean available;
-      try
-      {
-         Class.forName("org.apache.log4j.Logger");
-         available = true;
-      }
-      catch (ClassNotFoundException cnfe)
-      {
-         available = false;
-      }
-      isLog4JAvailable = available;
-   }
-   
-   public static Log getLog(String category)
-   {
-      return new LogImpl(category);
-   }
-   
-   public static Log getLog(Class clazz)
-   {
-      return new LogImpl( clazz.getName() );
-   }
-   
-   public static LogProvider getLogProvider(String category, boolean wrapped)
-   {
-      return isLog4JAvailable ? 
-               new Log4JProvider(category, wrapped) : 
-               new JDKProvider(category, wrapped);
-   }
-
-   public static LogProvider getLogProvider(Class clazz)
-   {
-       return getLogProvider( clazz.getName(), false );
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/log/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,4 +0,0 @@
-/**
- * The Seam logging API (just what the world needed)
- */
-package org.jboss.seam.log;
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/MailSession.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/MailSession.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/MailSession.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,319 +0,0 @@
-package org.jboss.seam.mail;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.Properties;
-
-import javax.mail.Authenticator;
-import javax.mail.PasswordAuthentication;
-import javax.mail.Session;
-import javax.naming.NamingException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.AbstractMutable;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Naming;
-
-/**
- * Manager component for a javax.mail.Session
- */
- at Name("org.jboss.seam.mail.mailSession")
- at Install(precedence = BUILT_IN, classDependencies = "javax.mail.Session")
- at Scope(APPLICATION)
- at BypassInterceptors
-public class MailSession extends AbstractMutable implements Serializable
-{
-    private static final LogProvider log = Logging
-            .getLogProvider(MailSession.class);
-
-    private Session session;
-    private String host = "localhost";
-    private Integer port;
-    private String username;
-    private String password;
-    private boolean debug = false;
-    private String sessionJndiName;
-    private boolean ssl;
-    private boolean tls = true;
-    private String transport;
-    
-    public MailSession() {}
-    
-    // Only used for tests
-    public MailSession(String transport)
-    {
-        this.transport = transport;
-    }
-
-    @Unwrap
-    public Session getSession() throws NamingException
-    {
-        if (session == null)
-        {
-            // This simulates an EVENT scope component
-            return (Session) Naming.getInitialContext().lookup(getSessionJndiName());
-        } 
-        else
-        {
-            return session;
-        }
-    }
-
-    /**
-     * Initialise mail session
-     * 
-     * Unless disabled, if a mail Session can be found in JNDI, then just manage
-     * be a simple wrapper; otherwise configure the session as specified in
-     * components.xml
-     */
-    @Create
-    public MailSession create()
-    {
-        if (getSessionJndiName() == null)
-        {
-            createSession();
-        }
-        return this;
-    }
-
-    private void createSession()
-    {
-        if (getPort() != null)
-        {
-           log.debug("Creating JavaMail Session (" + getHost() + ':' + getPort() + ")");
-        }
-        else
-        {
-           log.debug("Creating JavaMail Session (" + getHost() + ")");
-        }
-
-        Properties properties = new Properties();
-
-        // Enable debugging if set
-        properties.put("mail.debug", isDebug());
-
-        if (getUsername() != null && getPassword() == null)
-        {
-            log.warn("username supplied without a password (if an empty password is required supply an empty string)");
-        }
-        if (getUsername() == null && getPassword() != null)
-        {
-            log.warn("password supplied without a username (if no authentication required supply neither)");
-        }
-
-        if (getHost() != null)
-        {
-            if (isSsl())
-            {
-                properties.put("mail.smtps.host", getHost());
-            } 
-            else
-            {
-                properties.put("mail.smtp.host", getHost());
-            }
-
-        }
-        if (getPort() != null)
-        {
-            if (isSsl())
-            {
-                properties.put("mail.smtps.port", getPort().toString());
-            }
-            else
-            {
-                properties.put("mail.smtp.port", getPort().toString());
-            }
-        } else
-        {
-            if (isSsl())
-            {
-                properties.put("mail.smtps.port", "465");
-            } 
-            else
-            {
-                properties.put("mail.smtp.port", "25");
-            }
-        }
-
-        properties.put("mail.transport.protocol", getTransport());
-
-        // Authentication if required
-        Authenticator authenticator = null;
-        if (getUsername() != null && getPassword() != null)
-        {
-            if (isSsl())
-            {
-                properties.put("mail.smtps.auth", "true");
-            }
-            else
-            {
-
-                properties.put("mail.smtp.auth", "true");
-            }
-            authenticator = new Authenticator()
-            {
-                @Override
-                protected PasswordAuthentication getPasswordAuthentication()
-                {
-                    return new PasswordAuthentication(getUsername(), getPassword());
-                }
-            };
-        }
-
-        // Use TLS (if supported)
-        if (isTls())
-        {
-            properties.put("mail.smtp.starttls.enable", "true");
-        }
-
-        session = javax.mail.Session.getInstance(properties, authenticator);
-        session.setDebug(isDebug());
-
-        log.debug("connected to mail server");
-    }
-
-    public String getPassword()
-    {
-        return password;
-    }
-
-    /**
-     * @param password The password to use to authenticate to the sending
-     *            server. If no authentication is required it should be left
-     *            empty. Must be supplied in conjunction with username.
-     */
-    public void setPassword(String password)
-    {
-        this.password = password;
-    }
-
-    public String getUsername()
-    {
-        return username;
-    }
-
-    /**
-     * @param username The username to use to authenticate to the server. If not
-     *            set then no authentication is used. Must be set in conjunction
-     *            with password.
-     */
-    public void setUsername(String username)
-    {
-        this.username = username;
-    }
-
-    public boolean isDebug()
-    {
-        return debug;
-    }
-
-    /**
-     * @param debug Whether to display debug message logging. Warning, very
-     *            verbose.
-     */
-    public void setDebug(boolean debug)
-    {
-        this.debug = debug;
-    }
-
-    public String getHost()
-    {
-        return host;
-    }
-
-    /**
-     * @param host The host to connect to
-     */
-    public void setHost(String host)
-    {
-        this.host = host;
-    }
-
-    public void setPort(Integer port)
-    {
-        this.port = port;
-    }
-
-    public Integer getPort()
-    {
-        return port;
-    }
-
-    public String getSessionJndiName()
-    {
-        return sessionJndiName;
-    }
-
-    public void setSessionJndiName(String jndiName)
-    {
-        this.sessionJndiName = jndiName;
-    }
-
-    public boolean isSsl()
-    {
-        return ssl;
-    }
-
-    public void setSsl(boolean ssl)
-    {
-        this.ssl = ssl;
-    }
-
-    public boolean isTls()
-    {
-        return tls;
-    }
-
-    public void setTls(boolean tls)
-    {
-        this.tls = tls;
-    }
-    
-    /**
-     * Get the transport to used. If the not explicitly specified smtp or smtps
-     * is used
-     */
-    public String getTransport()
-    {
-        if (transport != null)
-        {
-            return transport;
-        }
-        if (isSsl())
-        {
-            return "smtps";
-        } 
-        else
-        {
-            return "smtp";
-        }
-    }
-    
-    /**
-     * Explicitly set the transport to use
-     */
-    public void setTransport(String transport)
-    {
-        this.transport = transport;
-    }
-
-    public static Session instance()
-    {
-        if (!Contexts.isApplicationContextActive())
-        {
-           throw new IllegalArgumentException("Application scope not active");
-        }
-        return (Session) Component.getInstance(MailSession.class, APPLICATION);
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,9 +0,0 @@
-/**
- * Seam components for sending email.
- */
- at Namespace(value="http://jboss.com/products/seam/mail",prefix="org.jboss.seam.mail")
- at AutoCreate
-package org.jboss.seam.mail;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1059 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.util.AbstractSet;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.el.ELResolver;
-import javax.el.ValueExpression;
-import javax.faces.FactoryFinder;
-import javax.faces.application.Application;
-import javax.faces.application.ApplicationFactory;
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.mail.internet.MimeMessage;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-import javax.servlet.http.HttpSession;
-import javax.transaction.UserTransaction;
-import javax.validation.ConstraintViolation;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.contexts.TestLifecycle;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.core.Validators;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.faces.Renderer;
-import org.jboss.seam.init.Initialization;
-import org.jboss.seam.jsf.SeamPhaseListener;
-import org.jboss.seam.mail.MailSession;
-import org.jboss.seam.pageflow.Pageflow;
-import org.jboss.seam.servlet.SeamFilter;
-import org.jboss.seam.servlet.ServletSessionMap;
-import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.util.Naming;
-import org.jboss.seam.util.Reflections;
-
-/**
- * Base class for integration tests for JSF/Seam applications. This class can be
- * extended or referenced directly for integration with various testing
- * frameworks.
- * 
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class AbstractSeamTest
-{
-
-   private Application application;
-   private ApplicationFactory applicationFactory;
-   protected ServletContext servletContext;
-   private static SeamPhaseListener phases;
-   protected MockHttpSession session;
-   private Map<String, Map> conversationViewRootAttributes;
-   protected Filter seamFilter;
-   
-   private static ServletContext realServletContext = null;
-   
-   static 
-   {
-      phases = new SeamPhaseListener();
-   }
-
-   protected boolean isSessionInvalid()
-   {
-      return session.isInvalid();
-   }
-
-   protected HttpSession getSession()
-   {
-      return session;
-   }
-
-   /**
-    * Helper method for resolving components in the test script.
-    */
-   protected Object getInstance(Class clazz)
-   {
-      return Component.getInstance(clazz);
-   }
-
-   /**
-    * Helper method for resolving components in the test script.
-    */
-   protected Object getInstance(String name)
-   {
-      return Component.getInstance(name);
-   }
-
-   /**
-    * Is there a long running conversation associated with the current request?
-    */
-   protected boolean isLongRunningConversation()
-   {
-      return Manager.instance().isLongRunningConversation();
-   }
-
-   /**
-    * Search in all contexts
-    */
-   public Object lookup(String name)
-   {
-      return Contexts.lookupInStatefulContexts(name);
-   }
-
-   public abstract class ComponentTest
-   {
-      /**
-       * Call a method binding
-       */
-      protected Object invokeMethod(String methodExpression)
-      {
-         return Expressions.instance().createMethodExpression(methodExpression).invoke();
-      }
-
-      /**
-       * Evaluate (get) a value binding
-       */
-      protected Object getValue(String valueExpression)
-      {
-         return Expressions.instance().createValueExpression(valueExpression).getValue();
-      }
-
-      /**
-       * Set a value binding
-       */
-      protected void setValue(String valueExpression, Object value)
-      {
-         Expressions.instance().createValueExpression(valueExpression).setValue(value);
-      }
-
-      protected abstract void testComponents() throws Exception;
-
-      public void run() throws Exception
-      {
-         TestLifecycle.beginTest(servletContext, new ServletSessionMap(session));
-         try
-         {
-            testComponents();
-         }
-         finally
-         {
-            TestLifecycle.endTest();
-         }
-      }
-   }
-
-   /**
-    * Request is an abstract superclass for usually anonymous inner classes that
-    * test JSF interactions.
-    * 
-    * @author Gavin King
-    */
-   abstract class Request
-   {
-      private String conversationId;
-      private String outcome;
-      private String action;
-      private boolean validationFailed;
-      private String viewId;
-
-      private boolean renderResponseBegun;
-      private boolean renderResponseComplete;
-      private boolean invokeApplicationBegun;
-      private boolean invokeApplicationComplete;
-
-      private HttpServletRequest request;
-      private HttpServletResponse response;
-      private MockFacesContext facesContext;
-      private MockExternalContext externalContext;
-      private Map<String, Object> pageParameters = new HashMap<String, Object>();
-
-      protected void setPageParameter(String name, Object value)
-      {
-         pageParameters.put(name, value);
-      }
-
-      protected void setParameter(String name, String value)
-      {
-         getParameters().put(name, new String[] { value });
-      }
-
-      protected Map<String, String[]> getParameters()
-      {
-         return ((MockHttpServletRequest) externalContext.getRequest()).getParameters();
-      }
-
-      protected Map<String, String[]> getHeaders()
-      {
-         return ((MockHttpServletRequest) externalContext.getRequest()).getHeaders();
-      }
-
-      /**
-       * Override to define the name of the current principal
-       * 
-       * @return "gavin" by default
-       */
-      public String getPrincipalName()
-      {
-         return "gavin";
-      }
-
-      /**
-       * Override to define the roles assigned to the current principal
-       * 
-       * @return a Set of all roles by default
-       */
-      public Set<String> getPrincipalRoles()
-      {
-         return new AbstractSet<String>()
-         {
-            @Override
-            public boolean contains(Object o)
-            {
-               return true;
-            }
-
-            @Override
-            public Iterator<String> iterator()
-            {
-               throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public int size()
-            {
-               throw new UnsupportedOperationException();
-            }
-         };
-      }
-
-      public List<Cookie> getCookies()
-      {
-         return Collections.EMPTY_LIST;
-      }
-
-      /**
-       * A script for a JSF interaction with no existing long-running
-       * conversation.
-       */
-      protected Request()
-      {
-      }
-
-      /**
-       * A script for a JSF interaction in the scope of an existing long-running
-       * conversation.
-       */
-      protected Request(String conversationId)
-      {
-         this.conversationId = conversationId;
-      }
-
-      /**
-       * Is this a non-faces request? Override if it is.
-       * 
-       * @return false by default
-       */
-      protected boolean isGetRequest()
-      {
-         return false;
-      }
-
-      /**
-       * The JSF view id of the form that is being submitted or of the page that
-       * is being rendered in a non-faces request. (override if you need page
-       * actions to be called, and page parameters applied)
-       */
-      protected String getViewId()
-      {
-         return viewId;
-      }
-
-      protected void setViewId(String viewId)
-      {
-         this.viewId = viewId;
-      }
-
-      /**
-       * Override to implement any logic that requires active scopes
-       * but must happen before the rest of the JSF lifecycle.
-       */ 
-      protected void afterRestoreViewPhase() throws Exception
-      {
-      }
-
-      /**
-       * Override to implement the interactions between the JSF page and your
-       * components that occurs during the apply request values phase.
-       */
-      protected void applyRequestValues() throws Exception
-      {
-      }
-
-      /**
-       * Override to implement the interactions between the JSF page and your
-       * components that occurs during the process validations phase.
-       */
-      protected void processValidations() throws Exception
-      {
-      }
-
-      /**
-       * Override to implement the interactions between the JSF page and your
-       * components that occurs during the update model values phase.
-       */
-      protected void updateModelValues() throws Exception
-      {
-      }
-
-      /**
-       * Override to implement the interactions between the JSF page and your
-       * components that occurs during the invoke application phase.
-       */
-      protected void invokeApplication() throws Exception
-      {
-      }
-
-      /**
-       * Set the outcome of the INVOKE_APPLICATION phase
-       */
-      protected void setOutcome(String outcome)
-      {
-         this.outcome = outcome;
-      }
-
-      /**
-       * The outcome of the INVOKE_APPLICATION phase
-       */
-      protected String getOutcome()
-      {
-         return outcome;
-      }
-
-      /**
-       * Get the outcome of the INVOKE_APPLICATION phase
-       */
-      protected String getInvokeApplicationOutcome()
-      {
-         return outcome;
-      }
-
-      /**
-       * Override to implement the interactions between the JSF page and your
-       * components that occurs during the render response phase.
-       */
-      protected void renderResponse() throws Exception
-      {
-      }
-
-      /**
-       * Make some assertions, after the end of the request.
-       */
-      protected void afterRequest()
-      {
-      }
-
-      /**
-       * Do anything you like, after the start of the request. Especially, set
-       * up any request parameters for the request.
-       */
-      protected void beforeRequest()
-      {
-      }
-
-      /**
-       * Get the view id to be rendered
-       * 
-       * @return the JSF view id
-       */
-      protected String getRenderedViewId()
-      {
-         if (Init.instance().isJbpmInstalled() && Pageflow.instance().isInProcess())
-         {
-            return Pageflow.instance().getPageViewId();
-         }
-         else
-         {
-            // TODO: not working right now, 'cos no mock navigation handler!
-            return getFacesContext().getViewRoot().getViewId();
-         }
-      }
-
-      /**
-       * Did a validation failure occur during a call to validate()?
-       */
-      protected boolean isValidationFailure()
-      {
-         return validationFailed;
-      }
-
-      protected FacesContext getFacesContext()
-      {
-         return facesContext;
-      }
-
-      protected String getConversationId()
-      {
-         return conversationId;
-      }
-
-      /**
-       * Evaluate (get) a value binding
-       */
-      protected Object getValue(String valueExpression)
-      {
-         return application.evaluateExpressionGet(facesContext, valueExpression, Object.class);
-      }
-
-      /**
-       * Set a value binding
-       */
-      protected void setValue(String valueExpression, Object value)
-      {
-         application.getExpressionFactory().createValueExpression(facesContext.getELContext(), valueExpression, Object.class).setValue(facesContext.getELContext(), value);
-      }
-
-      /**
-       * Validate the value against model-based constraints return true if the
-       * value is valid
-       */
-      protected boolean validateValue(String valueExpression, Object value)
-      {
-         ValueExpression ve = application.getExpressionFactory().createValueExpression(facesContext.getELContext(), valueExpression, Object.class);
-         Set<ConstraintViolation<Object>> ivs = Validators.instance().validate(ve, facesContext.getELContext(), value);
-         if (ivs.size() > 0)
-         {
-            validationFailed = true;
-            String message = ivs.iterator().next().getMessage();
-            facesContext.addMessage(null, FacesMessages.createFacesMessage(FacesMessage.SEVERITY_ERROR, message));
-            return false;
-         }
-         else
-         {
-            return true;
-         }
-      }
-
-      protected void onException(Exception e)
-      {
-         throw new AssertionError(e);
-      }
-
-      /**
-       * Call a method binding
-       */
-      protected Object invokeMethod(String methodExpression)
-      {
-         return application.getExpressionFactory().createMethodExpression(facesContext.getELContext(), methodExpression, Object.class, new Class[0]).invoke(facesContext.getELContext(), null);
-      }
-
-      /**
-       * Simulate an action method
-       */
-      protected Object invokeAction(String actionMethodExpression)
-      {
-         action = actionMethodExpression;
-         Object result = invokeMethod(actionMethodExpression);
-         if (result != null)
-         {
-            setOutcome(result.toString());
-         }
-         return result;
-      }
-
-      /**
-       * @return the conversation id
-       * @throws Exception to fail the test
-       */
-      public String run() throws Exception
-      {
-         try
-         {
-            init();
-            beforeRequest();
-            setStandardJspVariables();
-            seamFilter.doFilter(request, response, new FilterChain()
-            {
-               public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException
-               {
-                  try
-                  {
-                     if (emulateJsfLifecycle())
-                     {
-                        saveConversationViewRoot();
-                     }
-                  }
-                  catch (Exception e)
-                  {
-                     onException(e);
-                     throw new ServletException(e);
-                  }
-               }
-            });
-            seamFilter.destroy();
-            afterRequest();
-            facesContext.release();
-            return conversationId;
-         }
-         finally
-         {
-            if (Contexts.isEventContextActive())
-            {
-               FacesLifecycle.endRequest(externalContext);
-            }
-         }
-
-      }
-
-      private void saveConversationViewRoot()
-      {
-         Map renderedViewRootAttributes = facesContext.getViewRoot().getViewMap();
-         if (renderedViewRootAttributes != null && conversationId != null)
-         {
-            Map conversationState = new HashMap();
-            conversationState.putAll(renderedViewRootAttributes);
-            conversationViewRootAttributes.put(conversationId, conversationState);
-         }
-      }
-
-      protected void init()
-      {
-         request = createRequest();
-         response = createResponse();
-         externalContext = new MockExternalContext(servletContext, request, response);
-         facesContext = new MockFacesContext(externalContext, application);
-         facesContext.setCurrent();
-      }
-
-      /**
-       * Override if you wish to customize the HttpServletRequest used in this request.
-       * You may find {@link HttpServletRequestWrapper} useful.
-       */
-      protected HttpServletRequest createRequest()
-      {
-         Cookie[] cookieArray = getCookies().toArray(new Cookie[] {});
-         return new MockHttpServletRequest(session, getPrincipalName(), getPrincipalRoles(), cookieArray, isGetRequest() ? "GET" : "POST");
-      }
-      
-      /**
-       * Override if you wish to customize the HttpServletResponse used in this request.
-       * You may find {@link HttpServletResponseWrapper} useful. 
-       */
-      protected HttpServletResponse createResponse()
-      {
-         return new MockHttpServletResponse();
-      }
-
-      private void setStandardJspVariables()
-      {
-         // TODO: looks like we should also set request, session, application,
-         // page...
-         Map<String, String> params = new HashMap<String, String>();
-         for (Map.Entry<String, String[]> e : ((Map<String, String[]>) request.getParameterMap()).entrySet())
-         {
-            if (e.getValue().length == 1)
-            {
-               params.put(e.getKey(), e.getValue()[0]);
-            }
-         }
-         request.setAttribute("param", params);
-      }
-
-      /**
-       * @return true if a response was rendered
-       */
-      private boolean emulateJsfLifecycle() throws Exception
-      {
-         restoreViewPhase();
-         if (!isGetRequest() && !skipToRender())
-         {
-            afterRestoreViewPhase();
-
-            applyRequestValuesPhase();
-            if (!skipToRender())
-            {
-               processValidationsPhase();
-               if (!skipToRender())
-               {
-                  updateModelValuesPhase();
-                  if (!skipToRender())
-                  {
-                     invokeApplicationPhase();
-                  }
-               }
-            }
-         }
-
-         if (skipRender())
-         {
-            // we really should look at redirect parameters here!
-            return false;
-         }
-         else
-         {
-            renderResponsePhase();
-            return true;
-         }
-      }
-
-      private void renderResponsePhase() throws Exception
-      {
-         phases.beforePhase(new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE));
-
-         try
-         {
-            updateConversationId();
-
-            renderResponseBegun = true;
-
-            renderResponse();
-
-            renderResponseComplete = true;
-
-            facesContext.getApplication().getStateManager().saveView(facesContext);
-
-            updateConversationId();
-         }
-         finally
-         {
-            phases.afterPhase(new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE));
-         }
-      }
-
-      private void invokeApplicationPhase() throws Exception
-      {
-         phases.beforePhase(new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE));
-         try
-         {
-            updateConversationId();
-
-            invokeApplicationBegun = true;
-
-            invokeApplication();
-
-            invokeApplicationComplete = true;
-
-            String outcome = getInvokeApplicationOutcome();
-            facesContext.getApplication().getNavigationHandler().handleNavigation(facesContext, action, outcome);
-
-            viewId = getRenderedViewId();
-
-            updateConversationId();
-         }
-         finally
-         {
-            phases.afterPhase(new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE));
-         }
-      }
-
-      private void updateModelValuesPhase() throws Exception
-      {
-         phases.beforePhase(new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE));
-         try
-         {
-            updateConversationId();
-
-            updateModelValues();
-
-            updateConversationId();
-         }
-         finally
-         {
-            phases.afterPhase(new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE));
-         }
-      }
-
-      private void processValidationsPhase() throws Exception
-      {
-         phases.beforePhase(new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE));
-         try
-         {
-            updateConversationId();
-
-            processValidations();
-
-            updateConversationId();
-
-            if (isValidationFailure())
-            {
-               facesContext.renderResponse();
-            }
-         }
-         finally
-         {
-            phases.afterPhase(new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE));
-         }
-      }
-
-      private void applyRequestValuesPhase() throws Exception
-      {
-         phases.beforePhase(new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE));
-         try
-         {
-            updateConversationId();
-
-            applyRequestValues();
-
-            updateConversationId();
-         }
-         finally
-         {
-            phases.afterPhase(new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE));
-         }
-      }
-
-      private void restoreViewPhase()
-      {
-         phases.beforePhase(new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE));
-         try
-         {
-            UIViewRoot viewRoot = facesContext.getApplication().getViewHandler().createView(facesContext, getViewId());
-            facesContext.setViewRoot(viewRoot);
-            Map restoredViewRootAttributes = facesContext.getViewRoot().getViewMap();
-            if (conversationId != null)
-            {
-               if (isGetRequest())
-               {
-                  setParameter(Manager.instance().getConversationIdParameter(), conversationId);
-                  // TODO: what about conversationIsLongRunning????
-               }
-               else
-               {
-                  if (conversationViewRootAttributes.containsKey(conversationId))
-                  {
-                     // should really only do this if the view id matches (not
-                     // really possible to implement)
-                     Map state = conversationViewRootAttributes.get(conversationId);
-                     restoredViewRootAttributes.putAll(state);
-                  }
-               }
-            }
-            if (isGetRequest())
-            {
-               facesContext.renderResponse();
-            }
-            else
-            {
-               restoredViewRootAttributes.putAll(pageParameters);
-            }
-         }
-         finally
-         {
-            phases.afterPhase(new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE));
-         }
-      }
-
-      private void updateConversationId()
-      {
-         Manager manager = Manager.instance();
-         conversationId = manager.isLongRunningConversation() ? manager.getCurrentConversationId() : manager.getParentConversationId();
-      }
-
-      private boolean skipRender()
-      {
-         return FacesContext.getCurrentInstance().getResponseComplete();
-      }
-
-      private boolean skipToRender()
-      {
-         return FacesContext.getCurrentInstance().getRenderResponse() || FacesContext.getCurrentInstance().getResponseComplete();
-      }
-
-      protected boolean isInvokeApplicationBegun()
-      {
-         return invokeApplicationBegun;
-      }
-
-      protected boolean isInvokeApplicationComplete()
-      {
-         return invokeApplicationComplete;
-      }
-
-      protected boolean isRenderResponseBegun()
-      {
-         return renderResponseBegun;
-      }
-
-      protected boolean isRenderResponseComplete()
-      {
-         return renderResponseComplete;
-      }
-
-      protected MimeMessage getRenderedMailMessage(String viewId)
-      {
-         installMockTransport();
-         MockTransport.clearMailMessage();
-         Renderer.instance().render(viewId);
-         return MockTransport.getMailMessage();
-      }
-
-   }
-
-   public class NonFacesRequest extends Request
-   {
-      public NonFacesRequest()
-      {
-      }
-
-      /**
-       * @param viewId the view id to be rendered
-       */
-      public NonFacesRequest(String viewId)
-      {
-         setViewId(viewId);
-      }
-
-      /**
-       * @param viewId the view id to be rendered
-       * @param conversationId the conversation id
-       */
-      public NonFacesRequest(String viewId, String conversationId)
-      {
-         super(conversationId);
-         setViewId(viewId);
-      }
-
-      @Override
-      protected final boolean isGetRequest()
-      {
-         return true;
-      }
-
-      @Override
-      protected final void applyRequestValues() throws Exception
-      {
-         throw new UnsupportedOperationException();
-      }
-
-      @Override
-      protected final void processValidations() throws Exception
-      {
-         throw new UnsupportedOperationException();
-      }
-
-      @Override
-      protected final void updateModelValues() throws Exception
-      {
-         throw new UnsupportedOperationException();
-      }
-
-      @Override
-      protected final void invokeApplication() throws Exception
-      {
-         throw new UnsupportedOperationException();
-      }
-
-   }
-
-   public class FacesRequest extends Request
-   {
-
-      public FacesRequest()
-      {
-      }
-
-      /**
-       * @param viewId the view id of the form that was submitted
-       */
-      public FacesRequest(String viewId)
-      {
-         setViewId(viewId);
-      }
-
-      /**
-       * @param viewId the view id of the form that was submitted
-       * @param conversationId the conversation id
-       */
-      public FacesRequest(String viewId, String conversationId)
-      {
-         super(conversationId);
-         setViewId(viewId);
-      }
-
-      @Override
-      protected final boolean isGetRequest()
-      {
-         return false;
-      }
-
-   }
-
-   public void begin()
-   {
-      session = new MockHttpSession(servletContext);
-      ServletLifecycle.beginSession(session);
-   }
-
-   public void end()
-   {
-      ServletLifecycle.endSession(session);
-      session = null;
-   }
-   
-   /**
-    * Boot Seam. Can be used at class, test group or suite level (e.g.
-    * @BeforeClass, @BeforeTest, @BeforeSuite)
-    * Use in conjunction with {@link #stopSeam()}.
-    * @throws Exception
-    */
-   protected void startSeam() throws Exception
-   {
-      // If the Seam Filter is already initialized, we can grab the real servlet context
-     if (realServletContext == null && ServletLifecycle.getServletContext() != null) {
-        realServletContext = ServletLifecycle.getServletContext();
-     }
-     
-     ServletContext realContext = realServletContext;
-      this.servletContext = createServletContext(realContext);
-      ServletLifecycle.beginApplication(servletContext);
-      FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY, MockApplicationFactory.class.getName());
-      new Initialization(servletContext).create().init();
-      ((Init) servletContext.getAttribute(Seam.getComponentName(Init.class))).setDebug(false);
-   }
-   
-   protected ServletContext createServletContext(ServletContext realContext)
-   {
-     if (realContext != null)
-     {
-        ServletContextWrapper wrappedServletContext = new ServletContextWrapper(realContext);
-        // TODO: 
-        //initServletContext(wrappedServletContext.getInitParameters());
-        return wrappedServletContext;
-     }
-     else
-     {
-        MockServletContext mockServletContext = new MockServletContext();
-        initServletContext(mockServletContext.getInitParameters());
-        return mockServletContext;
-     }
-   }
-   
-   /**
-    * Shutdown Seam. Can be used at class, test group or suite level (e.g
-    * @AfterClass, @AfterTest, @AfterSuite)
-    * Use in conjunction with {@link #startSeam()}.
-    * @throws Exception
-    */
-   protected void stopSeam() throws Exception
-   {
-      ServletLifecycle.endApplication();
-   }
-   
-   /**
-    * Setup this test class instance
-    * Must be run for each test class instance (e.g. @BeforeClass)
-    * @throws Exception
-    */
-   protected void setupClass() throws Exception
-   {
-      servletContext = ServletLifecycle.getServletContext();
-      applicationFactory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
-      application = applicationFactory.getApplication();
-      conversationViewRootAttributes = new HashMap<String, Map>();
-      seamFilter = createSeamFilter();
-      FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY, MockFacesContextFactory.class.getName());
-      
-      for (ELResolver elResolver : getELResolvers())
-      {
-         application.addELResolver(elResolver);
-      }
-   }
-   
-   /**
-    * Cleanup this test class instance
-    * Must be run for each test class instance (e.g. @AfterClass)
-    */
-   protected void cleanupClass() throws Exception
-   {
-      seamFilter.destroy();
-      conversationViewRootAttributes = null;
-      // applicationFactory.setApplication(null);
-   }
-
-   protected Filter createSeamFilter() throws ServletException
-   {
-      SeamFilter seamFilter = new SeamFilter();
-      seamFilter.init(new MockFilterConfig(servletContext));
-      return seamFilter;
-   }
-
-   /**
-    * Override to set up any servlet context attributes.
-    */
-   public void initServletContext(Map initParams)
-   {
-   }
-
-   protected InitialContext getInitialContext() throws NamingException
-   {
-      return Naming.getInitialContext();
-   }
-
-   protected UserTransaction getUserTransaction() throws NamingException
-   {
-      return Transaction.instance();
-   }
-
-   /**
-    * Get the value of an object field, by reflection.
-    */
-   protected Object getField(Object object, String fieldName)
-   {
-      Field field = Reflections.getField(object.getClass(), fieldName);
-      if (!field.isAccessible())
-         field.setAccessible(true);
-      return Reflections.getAndWrap(field, object);
-   }
-
-   /**
-    * Set the value of an object field, by reflection.
-    */
-   protected void setField(Object object, String fieldName, Object value)
-   {
-      Field field = Reflections.getField(object.getClass(), fieldName);
-      if (!field.isAccessible())
-         field.setAccessible(true);
-      Reflections.setAndWrap(field, object, value);
-   }
-
-   private static boolean started;
-
-   protected ELResolver[] getELResolvers()
-   {
-      return new ELResolver[0];
-   }
-
-   protected void installMockTransport()
-   {
-      Contexts.getApplicationContext().set(Seam.getComponentName(MailSession.class), new MailSession("mock").create());
-
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DBUnitSeamTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DBUnitSeamTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DBUnitSeamTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,577 +0,0 @@
-package org.jboss.seam.mock;
-
-import static org.jboss.seam.mock.DBUnitSeamTest.Database.HSQL;
-import static org.jboss.seam.mock.DBUnitSeamTest.Database.MYSQL;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.sql.Connection;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.sql.DataSource;
-
-import org.dbunit.database.DatabaseConfig;
-import org.dbunit.database.DatabaseConnection;
-import org.dbunit.database.IDatabaseConnection;
-import org.dbunit.dataset.IDataSet;
-import org.dbunit.dataset.ReplacementDataSet;
-import org.dbunit.dataset.datatype.DataType;
-import org.dbunit.dataset.datatype.DataTypeException;
-import org.dbunit.dataset.datatype.DefaultDataTypeFactory;
-import org.dbunit.dataset.xml.FlatXmlDataSet;
-import org.dbunit.operation.DatabaseOperation;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Optional;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.AfterMethod;
-
-/**
- * Utility for integration testing with Seam and DBUnit datasets.
- * <p>
- * Subclass this class instead of <tt>SeamTest</tt> if you need to insert or clean data in
- * your database before and after a test. You need to implement <tt>prepareDBUnitOperations()</tt> and
- * add instances of <tt>DataSetOperation</tt>s to the <tt>beforeTestOperations</tt> and
- * <tt>afterTestOperations</tt> lists. An example:
- * <pre>
- * public class MyTest extends DBUnitSeamTest {
- *
- *   protected void prepareDBUnitOperations() {
- *       beforeTestOperations.add(
- *          new DataSetOperation("my/datasets/BaseData.xml")
- *       );
- *       beforeTestOperations.add(
- *           new DataSetOperation("my/datasets/AdditionalData.xml", DatabaseOperation.INSERT)
- *       );
- *   }
- * ... // Various test methods with @Test annotation
- * }
- * </pre>
- * <p>
- * Note that <tt>DataSetOperation</tt> defaults to <tt>DatabaseOperation.CLEAN_INSERT</tt> if no
- * other operation is specified as a constructor argument. The above example cleans all tables defined
- * in <tt>BaseData.xml</tt>, then inserts all rows declared in <tt>BaseData.xml</tt>, then inserts
- * all the rows declared in <tt>AdditionalData.xml</tt>. This executes before each test method
- * is invoked. If you require extra cleanup after a test method executes, add operations to the
- * <tt>afterTestOperations</tt> list.
- * </p>
- * <p>
- * A test class obtains the database connection for loading and cleaning of datasets in one of the following ways:
- * </p>
- * <dl>
- * <li>A TestNG test parameter named <tt>datasourceJndiName</tt> is provided by the TestNG test runner, which
- * automatically calls <tt>setDatasourceJndiName()</tt> on the test class before a logical test runs.</li>
- * <p/>
- * <li>An instance of a test class is created manually and the <tt>setDatasourceJndiName()</tt> method is
- * called after creation and before a test runs.</li>
- * <p/>
- * <li>A subclass overrides the <tt>getConnection()</tt> method and returns a custom database connection.</li>
- * <p/>
- * </dl>
- * <p>
- * Binary files can be imported into the database from a binary directory, configured with the TestNG parameter
- * <tt>binaryDir</tt> or by calling <tt>setBinaryDir()</tt> before a test runs. The binary directory is a classpath
- * reference, e.g. <tt>my/org/test/package/binarydir</tt>. In your DBUnit XML flat dataset, declare the path of your file
- * as follows: <tt>&lt;MYTABLE MYCOLUMN="[BINARY_DIR]/mytestfile.png"/&gt;</tt>
- * </p>
- * <p>
- * Referential integrity checks (foreign keys) will be or have to be disabled on the database connection
- * used for DBUnit operations. This makes adding circular references in datasets easier (especially for nullable
- * foreign key columns). Referential integrity checks are enabled again after the connection has been used.
- * </p>
- * <p>
- * <b>IMPORTANT: The methods <tt>disableReferentialIntegrity()</tt>,
- * <tt>enableReferentialIntegrity()</tt>, and <tt>editConfig()</tt> are implemented for HSQL and MySQL. You need to
- * configure the DBMS you are using with the <tt>database</tt> TestNG parameter or by calling <tt>setDatabase()</tt>
- * before the the test run. If you want to run unit tests on any other DBMS, you need to override the
- * <tt>disableReferentialIntegrity()</tt> and <tt>enableReferentialIntegrity()</tt> methods and implement them
- * for your DBMS. Also note that by default, if no <tt>database</tt> TestNG parameter has been set or if the
- * <tt>setDatabase()</tt> method has not been called before test runs, HSQL DB will be used as the default.</b>
- * </p>
- * @author Christian Bauer
- */
-public abstract class DBUnitSeamTest extends SeamTest
-{
-
-   public enum Database
-   {
-      HSQL, MYSQL
-   }
-
-   private LogProvider log = Logging.getLogProvider(DBUnitSeamTest.class);
-
-   protected String datasourceJndiName;
-   protected String binaryDir;
-   protected Database database = HSQL;
-   protected boolean replaceNull = true;
-   protected List<DataSetOperation> beforeTestOperations = new ArrayList<DataSetOperation>();
-   protected List<DataSetOperation> afterTestOperations = new ArrayList<DataSetOperation>();
-
-   private boolean prepared = false;
-
-   @BeforeClass
-   @Parameters("datasourceJndiName")
-   public void setDatasourceJndiName(@Optional String datasourceJndiName)
-   {
-      if (datasourceJndiName == null) return;
-      log.debug("Setting datasource name: " + datasourceJndiName);
-      this.datasourceJndiName = datasourceJndiName;
-   }
-
-   public String getDatasourceJndiName()
-   {
-      return datasourceJndiName;
-   }
-
-   @BeforeClass
-   @Parameters("binaryDir")
-   public void setBinaryDir(@Optional String binaryDir)
-   {
-      if (binaryDir == null) return;
-      log.debug("Setting binary directory: " + binaryDir);
-      this.binaryDir = binaryDir;
-   }
-
-   public String getBinaryDir()
-   {
-      return binaryDir;
-   }
-
-   @BeforeClass
-   @Parameters("database")
-   public void setDatabase(@Optional String database)
-   {
-      if (database == null) return;
-      log.debug("Setting database: " + database);
-      this.database = Database.valueOf(database.toUpperCase());
-   }
-
-   // We don't have a getDatabase() getter because subclasses might use a different Enum!
-
-   @BeforeClass
-   @Parameters("replaceNull")
-   public void setReplaceNull(@Optional Boolean replaceNull)
-   {
-      if (replaceNull == null) return;
-      log.debug("Setting replace null: " + replaceNull);
-      this.replaceNull = replaceNull;
-   }
-
-   public Boolean isReplaceNull()
-   {
-      return replaceNull;
-   }
-
-   @BeforeMethod
-   public void prepareDataBeforeTest()
-   {
-      // This is not pretty but we unfortunately can not have dependencies between @BeforeClass methods.
-      // This was a basic design mistake and we can't change it now because we need to be backwards
-      // compatible. We can only "prepare" the datasets once all @BeforeClass have been executed.
-      if (!prepared) {
-         log.debug("Before test method runs, preparing datasets");
-         prepareDBUnitOperations();
-         for (DataSetOperation beforeTestOperation : beforeTestOperations)
-         {
-            beforeTestOperation.prepare(this);
-         }
-         for (DataSetOperation afterTestOperation : afterTestOperations)
-         {
-            afterTestOperation.prepare(this);
-         }
-         prepared = true;
-      }
-
-      executeOperations(beforeTestOperations);
-   }
-
-   @AfterMethod
-   public void cleanDataAfterTest()
-   {
-      executeOperations(afterTestOperations);
-   }
-
-   private void executeOperations(List<DataSetOperation> list)
-   {
-      log.debug("Executing DataSetOperations: " + list.size());
-      IDatabaseConnection con = null;
-      try
-      {
-         con = getConnection();
-         disableReferentialIntegrity(con);
-         for (DataSetOperation op : list)
-         {
-            prepareExecution(con, op);
-            op.execute(con);
-            afterExecution(con, op);
-         }
-         enableReferentialIntegrity(con);
-      }
-      finally
-      {
-         if (con != null)
-         {
-            try
-            {
-               con.close();
-            }
-            catch (Exception ex)
-            {
-               ex.printStackTrace(System.err);
-            }
-         }
-      }
-   }
-
-   protected static class DataSetOperation
-   {
-
-      private LogProvider log = Logging.getLogProvider(DataSetOperation.class);
-
-      String dataSetLocation;
-      ReplacementDataSet dataSet;
-      DatabaseOperation operation;
-
-      protected DataSetOperation()
-      {
-         // Support subclassing
-      }
-
-      /**
-       * Defaults to <tt>DatabaseOperation.CLEAN_INSERT</tt>
-       *
-       * @param dataSetLocation location of DBUnit dataset
-       */
-      public DataSetOperation(String dataSetLocation)
-      {
-         this(dataSetLocation, DatabaseOperation.CLEAN_INSERT);
-      }
-
-      /**
-       * Defaults to <tt>DatabaseOperation.CLEAN_INSERT</tt>
-       *
-       * @param dataSetLocation location of DBUnit dataset
-       * @param dtdLocation optional (can be null) location of XML file DTD on classpath
-       */
-      public DataSetOperation(String dataSetLocation, String dtdLocation)
-      {
-         this(dataSetLocation, dtdLocation, DatabaseOperation.CLEAN_INSERT);
-      }
-
-      /**
-       * @param dataSetLocation location of DBUnit dataset
-       * @param operation operation to execute
-       */
-      public DataSetOperation(String dataSetLocation, DatabaseOperation operation)
-      {
-         this(dataSetLocation, null, operation);
-      }
-
-      public DataSetOperation(String dataSetLocation, String dtdLocation, DatabaseOperation operation)
-      {
-         if (dataSetLocation == null)
-         {
-            this.operation = operation;
-            return;
-         }
-
-         // Load the base dataset file
-         InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(dataSetLocation);
-         try
-         {
-            InputStream dtdInput = null;
-            if (dtdLocation != null)
-            {
-               dtdInput = Thread.currentThread().getContextClassLoader().getResourceAsStream(dtdLocation);
-            }
-            if (dtdInput == null)
-            {
-               this.dataSet = new ReplacementDataSet(new FlatXmlDataSet(input));
-            }
-            else
-            {
-               this.dataSet = new ReplacementDataSet(new FlatXmlDataSet(input, dtdInput));
-            }
-         }
-         catch (Exception ex)
-         {
-            throw new RuntimeException(ex);
-         }
-         this.operation = operation;
-         this.dataSetLocation = dataSetLocation;
-      }
-
-      public IDataSet getDataSet()
-      {
-         return dataSet;
-      }
-
-      public DatabaseOperation getOperation()
-      {
-         return operation;
-      }
-
-      public void prepare(DBUnitSeamTest test)
-      {
-         if (dataSet == null) return;
-         log.debug("Preparing DataSetOperation replacement values");
-
-         if (test.isReplaceNull())
-         {
-            log.debug("Replacing [NULL] placeholder with real null value");
-            dataSet.addReplacementObject("[NULL]", null);
-         }
-         if (test.getBinaryDir() != null)
-         {
-            log.debug("Replacing [BINARY_DIR] placeholder with path: " + test.getBinaryDirFullpath().toString());
-            dataSet.addReplacementSubstring("[BINARY_DIR]", test.getBinaryDirFullpath().toString());
-         }
-      }
-
-      public void execute(IDatabaseConnection connection)
-      {
-         if (dataSet == null || operation == null) return;
-         try
-         {
-            log.debug("Executing: " + this);
-            this.operation.execute(connection, dataSet);
-         }
-         catch (Exception ex)
-         {
-            throw new RuntimeException(ex);
-         }
-      }
-
-      @Override
-      public String toString()
-      {
-         return getClass().getName() + " with dataset location: " + dataSetLocation;
-      }
-   }
-
-   // Subclasses can/have to override the following methods
-
-   /**
-    * Override this method if you want to provide your own DBUnit <tt>IDatabaseConnection</tt> instance.
-    * <p/>
-    * If you do not override this, default behavior is to use the * configured datasource name and
-    * to obtain a connection with a JNDI lookup.
-    *
-    * @return a DBUnit database connection (wrapped)
-    */
-   protected IDatabaseConnection getConnection()
-   {
-      try
-      {
-         if (getDatasourceJndiName() == null)
-         {
-            throw new RuntimeException("Please set datasourceJndiName TestNG property");
-         }
-
-         DataSource datasource = ((DataSource) getInitialContext().lookup(getDatasourceJndiName()));
-
-         // Get a JDBC connection from JNDI datasource
-         Connection con = datasource.getConnection();
-         IDatabaseConnection dbUnitCon = new DatabaseConnection(con);
-         editConfig(dbUnitCon.getConfig());
-         return dbUnitCon;
-      }
-      catch (Exception ex)
-      {
-         throw new RuntimeException(ex);
-      }
-   }
-
-   /**
-    * Execute whatever statement is necessary to either defer or disable foreign
-    * key constraint checking on the given database connection, which is used by
-    * DBUnit to import datasets.
-    *
-    * @param con A DBUnit connection wrapper, which is used afterwards for dataset operations
-    */
-   protected void disableReferentialIntegrity(IDatabaseConnection con)
-   {
-      try
-      {
-         if (database.equals(HSQL))
-         {
-            con.getConnection().prepareStatement("set referential_integrity FALSE").execute(); // HSQL DB
-         }
-         else if (database.equals(MYSQL))
-         {
-            con.getConnection().prepareStatement("set foreign_key_checks=0").execute(); // MySQL > 4.1.1
-         }
-      }
-      catch (Exception ex)
-      {
-         throw new RuntimeException(ex);
-      }
-   }
-
-   /**
-    * Execute whatever statement is necessary to enable integrity constraint checks after
-    * dataset operations.
-    *
-    * @param con A DBUnit connection wrapper, before it is used by the application again
-    */
-   protected void enableReferentialIntegrity(IDatabaseConnection con)
-   {
-      try
-      {
-         if (database.equals(HSQL))
-         {
-            con.getConnection().prepareStatement("set referential_integrity TRUE").execute();  // HSQL DB
-         }
-         else if (database.equals(MYSQL))
-         {
-            con.getConnection().prepareStatement("set foreign_key_checks=1").execute(); // MySQL > 4.1.1
-         }
-      }
-      catch (Exception ex)
-      {
-         throw new RuntimeException(ex);
-      }
-   }
-
-   /**
-    * Override this method if you require DBUnit configuration features or additional properties.
-    * <p/>
-    * Called after a connection has been obtaind and before the connection is used. Can be a
-    * NOOP method if no additional settings are necessary for your DBUnit/DBMS setup.
-    *
-    * @param config A DBUnit <tt>DatabaseConfig</tt> object for setting properties and features
-    */
-   protected void editConfig(DatabaseConfig config)
-   {
-      if (database.equals(HSQL))
-      {
-         // DBUnit/HSQL bugfix
-         // http://www.carbonfive.com/community/archives/2005/07/dbunit_hsql_and.html
-         config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new DefaultDataTypeFactory()
-         {
-            @Override
-            public DataType createDataType(int sqlType, String sqlTypeName)
-                  throws DataTypeException
-            {
-               if (sqlType == Types.BOOLEAN)
-               {
-                  return DataType.BOOLEAN;
-               }
-               return super.createDataType(sqlType, sqlTypeName);
-            }
-         });
-      }
-   }
-
-   /**
-    * Callback for each operation before DBUnit executes the operation, useful if extra preparation of
-    * data/tables is necessary, e.g. additional SQL commands on a per-operation (per table?) granularity
-    * on the given database connection.
-    *
-    * @param con       A DBUnit connection wrapper
-    * @param operation The operation to be executed, call <tt>getDataSet()</tt> to access the data.
-    */
-   protected void prepareExecution(IDatabaseConnection con, DataSetOperation operation)
-   {
-   }
-
-   /**
-    * Callback for each operation, useful if extra preparation of data/tables is necessary.
-    *
-    * @param con       A DBUnit connection wrapper
-    * @param operation The operation that was executed, call <tt>getDataSet()</tt> to access the data.
-    */
-   protected void afterExecution(IDatabaseConnection con, DataSetOperation operation)
-   {
-   }
-
-   /**
-    * Resolves the binary dir location with the help of the classloader, we need the
-    * absolute full path of that directory.
-    *
-    * @return URL full absolute path of the binary directory
-    */
-   protected URL getBinaryDirFullpath()
-   {
-      if (getBinaryDir() == null)
-      {
-         throw new RuntimeException("Please set binaryDir TestNG property to location of binary test files");
-      }
-      return getResourceURL(getBinaryDir());
-   }
-
-   protected URL getResourceURL(String resource)
-   {
-      URL url = Thread.currentThread().getContextClassLoader().getResource(resource);
-      if (url == null)
-      {
-         throw new RuntimeException("Could not find resource with classloader: " + resource);
-      }
-      return url;
-   }
-
-   /**
-    * Load a file and return it as a <tt>byte[]</tt>. Useful for comparison operations in an actual
-    * unit test, e.g. to compare an imported database record against a known file state.
-    *
-    * @param filename the path of the file on the classpath, relative to configured <tt>binaryDir</tt> base path
-    * @return the file content as bytes
-    * @throws Exception when the file could not be found or read
-    */
-   protected byte[] getBinaryFile(String filename) throws Exception
-   {
-      if (getBinaryDir() == null)
-      {
-         throw new RuntimeException("Please set binaryDir TestNG property to location of binary test files");
-      }
-      File file = new File(getResourceURL(getBinaryDir() + "/" + filename).toURI());
-      InputStream is = new FileInputStream(file);
-
-      // Get the size of the file
-      long length = file.length();
-
-      if (length > Integer.MAX_VALUE)
-      {
-         // File is too large
-      }
-
-      // Create the byte array to hold the data
-      byte[] bytes = new byte[(int) length];
-
-      // Read in the bytes
-      int offset = 0;
-      int numRead;
-      while (offset < bytes.length
-            && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)
-      {
-         offset += numRead;
-      }
-
-      // Ensure all the bytes have been read in
-      if (offset < bytes.length)
-      {
-         throw new IOException("Could not completely read file " + file.getName());
-      }
-
-      // Close the input stream and return bytes
-      is.close();
-      return bytes;
-   }
-
-   /**
-    * Implement this in a subclass.
-    * <p/>
-    * Use it to stack DBUnit <tt>DataSetOperation</tt>'s with
-    * the <tt>beforeTestOperations</tt> and <tt>afterTestOperations</tt> lists.
-    */
-   protected abstract void prepareDBUnitOperations();
-
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DelegatingServletInputStream.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DelegatingServletInputStream.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DelegatingServletInputStream.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,71 +0,0 @@
-/*
- * Copyright 2002-2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.seam.mock;
-
-import javax.servlet.ServletInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Delegating implementation of {@link javax.servlet.ServletInputStream}.
- * <p/>
- * <p>Used by {@link MockHttpServletRequest}; typically not directly
- * used for testing application controllers.
- *
- * @author Juergen Hoeller
- * @see MockHttpServletRequest
- * @since 1.0.2
- */
-public class DelegatingServletInputStream extends ServletInputStream
-{
-
-   private final InputStream sourceStream;
-
-
-   /**
-    * Create a DelegatingServletInputStream for the given source stream.
-    *
-    * @param sourceStream the source stream (never <code>null</code>)
-    */
-   public DelegatingServletInputStream(InputStream sourceStream)
-   {
-      this.sourceStream = sourceStream;
-   }
-
-   /**
-    * Return the underlying source stream (never <code>null</code>).
-    */
-   public final InputStream getSourceStream()
-   {
-      return this.sourceStream;
-   }
-
-
-   @Override
-   public int read() throws IOException
-   {
-      return this.sourceStream.read();
-   }
-
-   @Override
-   public void close() throws IOException
-   {
-      super.close();
-      this.sourceStream.close();
-	}
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DelegatingServletOutputStream.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DelegatingServletOutputStream.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/DelegatingServletOutputStream.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,76 +0,0 @@
-/*
- * Copyright 2002-2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.seam.mock;
-
-import javax.servlet.ServletOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-/**
- * Delegating implementation of {@link javax.servlet.ServletOutputStream}.
- * <p/>
- * <p>Used by {@link MockHttpServletResponse}; typically not directly
- * used for testing application controllers.
- *
- * @author Juergen Hoeller
- * @see MockHttpServletResponse
- * @since 1.0.2
- */
-public class DelegatingServletOutputStream extends ServletOutputStream
-{
-
-   private final OutputStream targetStream;
-
-
-   /**
-    * Create a DelegatingServletOutputStream for the given target stream.
-    *
-    * @param targetStream the target stream (never <code>null</code>)
-    */
-   public DelegatingServletOutputStream(OutputStream targetStream)
-   {
-      this.targetStream = targetStream;
-   }
-
-   /**
-    * Return the underlying target stream (never <code>null</code>).
-    */
-   public final OutputStream getTargetStream()
-   {
-      return this.targetStream;
-   }
-
-
-   public void write(int b) throws IOException
-   {
-      this.targetStream.write(b);
-   }
-
-   public void flush() throws IOException
-   {
-      super.flush();
-      this.targetStream.flush();
-   }
-
-   public void close() throws IOException
-   {
-      super.close();
-      this.targetStream.close();
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EmbeddedBootstrap.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EmbeddedBootstrap.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EmbeddedBootstrap.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.mock;
-
-import org.jboss.embedded.Bootstrap;
-
-public class EmbeddedBootstrap
-{
-   
-   public void startAndDeployResources() throws Exception
-   {
-      Bootstrap bootstrap = Bootstrap.getInstance();
-      bootstrap.bootstrap();
-
-      if (resourceExists("seam.properties")) 
-      {
-         bootstrap.deployResourceBases("seam.properties");
-      }
-      if (resourceExists("META-INF/components.xml")) 
-      {
-         bootstrap.deployResourceBases("META-INF/components.xml");
-      }
-      if (resourceExists("META-INF/seam.properties")) 
-      {
-         bootstrap.deployResourceBases("META-INF/seam.properties");
-      }
-   }
-
-   private boolean resourceExists(String name)
-   {
-      return Thread.currentThread().getContextClassLoader().getResource(name)!=null;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EnhancedMockHttpServletRequest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EnhancedMockHttpServletRequest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EnhancedMockHttpServletRequest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1093 +0,0 @@
-/*
- * Copyright 2002-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.seam.mock;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.security.Principal;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-
-/**
- * Mock implementation of the {@link javax.servlet.http.HttpServletRequest}
- * interface. Supports the Servlet 2.4 API level.
- * <p/>
- * <p>Used for testing the web framework; also useful for testing
- * application controllers.
- *
- * @author Juergen Hoeller
- * @author Rod Johnson
- * @author Rick Evans
- * @author Mark Fisher
- * @since 1.0.2
- */
-public class EnhancedMockHttpServletRequest implements HttpServletRequest
-{
-
-   /**
-    * The default protocol: 'http'.
-    */
-   public static final String DEFAULT_PROTOCOL = "http";
-
-   /**
-    * The default server address: '127.0.0.1'.
-    */
-   public static final String DEFAULT_SERVER_ADDR = "127.0.0.1";
-
-   /**
-    * The default server name: 'localhost'.
-    */
-   public static final String DEFAULT_SERVER_NAME = "localhost";
-
-   /**
-    * The default server port: '80'.
-    */
-   public static final int DEFAULT_SERVER_PORT = 80;
-
-   /**
-    * The default remote address: '127.0.0.1'.
-    */
-   public static final String DEFAULT_REMOTE_ADDR = "127.0.0.1";
-
-   /**
-    * The default remote host: 'localhost'.
-    */
-   public static final String DEFAULT_REMOTE_HOST = "localhost";
-
-   private boolean active = true;
-
-
-   //---------------------------------------------------------------------
-   // ServletRequest properties
-   //---------------------------------------------------------------------
-
-   private final Hashtable attributes = new Hashtable();
-
-   private String characterEncoding;
-
-   private byte[] content;
-
-   private String contentType;
-
-   private final Map parameters = new LinkedHashMap(16);
-
-   private String protocol = DEFAULT_PROTOCOL;
-
-   private String scheme = DEFAULT_PROTOCOL;
-
-   private String serverName = DEFAULT_SERVER_NAME;
-
-   private int serverPort = DEFAULT_SERVER_PORT;
-
-   private String remoteAddr = DEFAULT_REMOTE_ADDR;
-
-   private String remoteHost = DEFAULT_REMOTE_HOST;
-
-   /**
-    * List of locales in descending order
-    */
-   private final Vector locales = new Vector();
-
-   private boolean secure = false;
-
-   private final ServletContext servletContext;
-
-   private int remotePort = DEFAULT_SERVER_PORT;
-
-   private String localName = DEFAULT_SERVER_NAME;
-
-   private String localAddr = DEFAULT_SERVER_ADDR;
-
-   private int localPort = DEFAULT_SERVER_PORT;
-
-
-   //---------------------------------------------------------------------
-   // HttpServletRequest properties
-   //---------------------------------------------------------------------
-
-   private String authType;
-
-   private Cookie[] cookies;
-
-   /**
-    * The key is the lowercase header name; the value is a {@link org.jboss.seam.mock.HeaderValueHolder} object.
-    */
-   private final Hashtable headers = new Hashtable();
-
-   private String method;
-
-   private String pathInfo;
-
-   private String contextPath = "";
-
-   private String queryString;
-
-   private Map<String, String> queryParameters = new HashMap();
-
-   private String remoteUser;
-
-   private Set<String> userRoles = new HashSet();
-
-   private Principal userPrincipal;
-
-   private String requestURI;
-
-   private String servletPath = "";
-
-   private HttpSession session;
-
-   private boolean requestedSessionIdValid = true;
-
-   private boolean requestedSessionIdFromCookie = true;
-
-   private boolean requestedSessionIdFromURL = false;
-
-
-   //---------------------------------------------------------------------
-   // Constructors
-   //---------------------------------------------------------------------
-
-   /**
-    * Create a new MockHttpServletRequest with a default
-    * {@link MockServletContext}.
-    *
-    * @see MockServletContext
-    */
-   public EnhancedMockHttpServletRequest()
-   {
-      this(null, "", "");
-   }
-
-   /**
-    * Create a new MockHttpServletRequest with a default
-    * {@link MockServletContext}.
-    *
-    * @param method     the request method (may be <code>null</code>)
-    * @param requestURI the request URI (may be <code>null</code>)
-    * @see #setMethod
-    * @see #setRequestURI
-    * @see MockServletContext
-    */
-   public EnhancedMockHttpServletRequest(String method, String requestURI)
-   {
-      this(null, method, requestURI);
-   }
-
-   /**
-    * Create a new MockHttpServletRequest.
-    *
-    * @param servletContext the ServletContext that the request runs in
-    *                       (may be <code>null</code> to use a default MockServletContext)
-    * @see MockServletContext
-    */
-   public EnhancedMockHttpServletRequest(ServletContext servletContext)
-   {
-      this(servletContext, "", "");
-   }
-
-   /**
-    * Create a new MockHttpServletRequest.
-    *
-    * @param servletContext the ServletContext that the request runs in
-    *                       (may be <code>null</code> to use a default MockServletContext)
-    * @param method         the request method (may be <code>null</code>)
-    * @param requestURI     the request URI (may be <code>null</code>)
-    * @see #setMethod
-    * @see #setRequestURI
-    * @see MockServletContext
-    */
-   public EnhancedMockHttpServletRequest(ServletContext servletContext, String method, String requestURI)
-   {
-      this.servletContext = (servletContext != null ? servletContext : new MockServletContext());
-      this.method = method;
-      this.requestURI = requestURI;
-      this.locales.add(Locale.ENGLISH);
-
-      // Old mock: The 1.2 RI NPEs if this header isn't present
-      addHeader("Accept", new String[0]);
-   }
-
-
-   // OLD CONSTRUCTORS FROM < SEAM 2.2 MOCKS!
-
-   public EnhancedMockHttpServletRequest(HttpSession session)
-   {
-      this(session, null, new HashSet<String>());
-   }
-
-   public EnhancedMockHttpServletRequest(HttpSession session, String principalName, Set<String> principalRoles)
-   {
-      this(session, principalName, principalRoles, new Cookie[]{}, null);
-   }
-
-   public EnhancedMockHttpServletRequest(HttpSession session, final String principalName, Set<String> principalRoles, Cookie[] cookies, String method)
-   {
-      this(null, method, "");
-      this.session = session;
-
-      this.userPrincipal = principalName == null
-            ? null
-            : new Principal()
-      {
-         public String getName()
-         {
-            return principalName;
-         }
-      };
-
-      this.userRoles = principalRoles;
-      this.cookies = cookies;
-
-      // Old mock: The 1.2 RI NPEs if this header isn't present
-      addHeader("Accept", new String[0]);
-   }
-
-
-   //---------------------------------------------------------------------
-   // Lifecycle methods
-   //---------------------------------------------------------------------
-
-   /**
-    * Return the ServletContext that this request is associated with.
-    * (Not available in the standard HttpServletRequest interface for some reason.)
-    */
-   public ServletContext getServletContext()
-   {
-      return this.servletContext;
-   }
-
-   /**
-    * Return whether this request is still active (that is, not completed yet).
-    */
-   public boolean isActive()
-   {
-      return this.active;
-   }
-
-   /**
-    * Mark this request as completed, keeping its state.
-    */
-   public void close()
-   {
-      this.active = false;
-   }
-
-   /**
-    * Invalidate this request, clearing its state.
-    */
-   public void invalidate()
-   {
-      close();
-      clearAttributes();
-   }
-
-   /**
-    * Check whether this request is still active (that is, not completed yet),
-    * throwing an IllegalStateException if not active anymore.
-    */
-   protected void checkActive() throws IllegalStateException
-   {
-      if (!this.active)
-      {
-         throw new IllegalStateException("Request is not active anymore");
-      }
-   }
-
-
-   //---------------------------------------------------------------------
-   // ServletRequest interface
-   //---------------------------------------------------------------------
-
-   public Object getAttribute(String name)
-   {
-      checkActive();
-      return this.attributes.get(name);
-   }
-
-   public Enumeration getAttributeNames()
-   {
-      checkActive();
-      return this.attributes.keys();
-   }
-
-   public String getCharacterEncoding()
-   {
-      return this.characterEncoding;
-   }
-
-   public void setCharacterEncoding(String characterEncoding)
-   {
-      this.characterEncoding = characterEncoding;
-   }
-
-   public void setContent(byte[] content)
-   {
-      this.content = content;
-   }
-
-   public int getContentLength()
-   {
-      return (this.content != null ? this.content.length : -1);
-   }
-
-   public void setContentType(String contentType)
-   {
-      this.contentType = contentType;
-   }
-
-   public String getContentType()
-   {
-      return this.contentType;
-   }
-
-   public ServletInputStream getInputStream() throws IOException
-   {
-      if (this.content != null)
-      {
-         return new DelegatingServletInputStream(new ByteArrayInputStream(this.content));
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   /**
-    * Set a single value for the specified HTTP parameter.
-    * <p>If there are already one or more values registered for the given
-    * parameter name, they will be replaced.
-    */
-   public void setParameter(String name, String value)
-   {
-      setParameter(name, new String[]{value});
-   }
-
-   /**
-    * Set an array of values for the specified HTTP parameter.
-    * <p>If there are already one or more values registered for the given
-    * parameter name, they will be replaced.
-    */
-   public void setParameter(String name, String[] values)
-   {
-      this.parameters.put(name, values);
-   }
-
-   /**
-    * Sets all provided parameters <emphasis>replacing</emphasis> any
-    * existing values for the provided parameter names. To add without
-    * replacing existing values, use {@link #addParameters(java.util.Map)}.
-    */
-   public void setParameters(Map params)
-   {
-      for (Iterator it = params.keySet().iterator(); it.hasNext();)
-      {
-         Object key = it.next();
-         Object value = params.get(key);
-         if (value instanceof String)
-         {
-            this.setParameter((String) key, (String) value);
-         }
-         else if (value instanceof String[])
-         {
-            this.setParameter((String) key, (String[]) value);
-         }
-         else
-         {
-            throw new IllegalArgumentException("Parameter map value must be single value " +
-                  " or array of type [" + String.class.getName() + "]");
-         }
-      }
-   }
-
-   /**
-    * Add a single value for the specified HTTP parameter.
-    * <p>If there are already one or more values registered for the given
-    * parameter name, the given value will be added to the end of the list.
-    */
-   public void addParameter(String name, String value)
-   {
-      addParameter(name, new String[]{value});
-   }
-
-   /**
-    * Add an array of values for the specified HTTP parameter.
-    * <p>If there are already one or more values registered for the given
-    * parameter name, the given values will be added to the end of the list.
-    */
-   public void addParameter(String name, String[] values)
-   {
-      String[] oldArr = (String[]) this.parameters.get(name);
-      if (oldArr != null)
-      {
-         String[] newArr = new String[oldArr.length + values.length];
-         System.arraycopy(oldArr, 0, newArr, 0, oldArr.length);
-         System.arraycopy(values, 0, newArr, oldArr.length, values.length);
-         this.parameters.put(name, newArr);
-      }
-      else
-      {
-         this.parameters.put(name, values);
-      }
-   }
-
-   /**
-    * Adds all provided parameters <emphasis>without</emphasis> replacing
-    * any existing values. To replace existing values, use
-    * {@link #setParameters(java.util.Map)}.
-    */
-   public void addParameters(Map params)
-   {
-      for (Iterator it = params.keySet().iterator(); it.hasNext();)
-      {
-         Object key = it.next();
-         Object value = params.get(key);
-         if (value instanceof String)
-         {
-            this.addParameter((String) key, (String) value);
-         }
-         else if (value instanceof String[])
-         {
-            this.addParameter((String) key, (String[]) value);
-         }
-         else
-         {
-            throw new IllegalArgumentException("Parameter map value must be single value " +
-                  " or array of type [" + String.class.getName() + "]");
-         }
-      }
-   }
-
-   /**
-    * Remove already registered values for the specified HTTP parameter, if any.
-    */
-   public void removeParameter(String name)
-   {
-      this.parameters.remove(name);
-   }
-
-   /**
-    * Removes all existing parameters.
-    */
-   public void removeAllParameters()
-   {
-      this.parameters.clear();
-   }
-
-   public String getParameter(String name)
-   {
-      String[] arr = (String[]) this.parameters.get(name);
-      return (arr != null && arr.length > 0 ? arr[0] : null);
-   }
-
-   public Enumeration getParameterNames()
-   {
-      return Collections.enumeration(this.parameters.keySet());
-   }
-
-   public String[] getParameterValues(String name)
-   {
-      return (String[]) this.parameters.get(name);
-   }
-
-   public Map getParameterMap()
-   {
-      return this.parameters;
-   }
-
-   // Old mock
-   public Map<String, String[]> getParameters()
-   {
-      return parameters;
-   }
-
-   /**
-    * Add a query parameter that will be appended to the URI query string.
-    */
-   public void addQueryParameter(String name, String value)
-   {
-      addParameter(name, value);
-      this.queryParameters.put(name, value);
-   }
-
-   public void removeQueryParameter(String name)
-   {
-      removeParameter(name);
-      this.queryParameters.remove(name);
-   }
-
-   public Map<String, String> getQueryParameters()
-   {
-      return queryParameters;
-   }
-
-   public void setProtocol(String protocol)
-   {
-      this.protocol = protocol;
-   }
-
-   public String getProtocol()
-   {
-      return this.protocol;
-   }
-
-   public void setScheme(String scheme)
-   {
-      this.scheme = scheme;
-   }
-
-   public String getScheme()
-   {
-      return this.scheme;
-   }
-
-   public void setServerName(String serverName)
-   {
-      this.serverName = serverName;
-   }
-
-   public String getServerName()
-   {
-      return this.serverName;
-   }
-
-   public void setServerPort(int serverPort)
-   {
-      this.serverPort = serverPort;
-   }
-
-   public int getServerPort()
-   {
-      return this.serverPort;
-   }
-
-   public BufferedReader getReader() throws UnsupportedEncodingException
-   {
-      if (this.content != null)
-      {
-         InputStream sourceStream = new ByteArrayInputStream(this.content);
-         Reader sourceReader = (this.characterEncoding != null) ?
-               new InputStreamReader(sourceStream, this.characterEncoding) : new InputStreamReader(sourceStream);
-         return new BufferedReader(sourceReader);
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   public void setRemoteAddr(String remoteAddr)
-   {
-      this.remoteAddr = remoteAddr;
-   }
-
-   public String getRemoteAddr()
-   {
-      return this.remoteAddr;
-   }
-
-   public void setRemoteHost(String remoteHost)
-   {
-      this.remoteHost = remoteHost;
-   }
-
-   public String getRemoteHost()
-   {
-      return this.remoteHost;
-   }
-
-   public void setAttribute(String name, Object value)
-   {
-      checkActive();
-      if (value != null)
-      {
-         this.attributes.put(name, value);
-      }
-      else
-      {
-         this.attributes.remove(name);
-      }
-   }
-
-   public void removeAttribute(String name)
-   {
-      checkActive();
-      this.attributes.remove(name);
-   }
-
-   /**
-    * Clear all of this request's attributes.
-    */
-   public void clearAttributes()
-   {
-      this.attributes.clear();
-   }
-
-   /**
-    * Add a new preferred locale, before any existing locales.
-    */
-   public void addPreferredLocale(Locale locale)
-   {
-      this.locales.add(0, locale);
-   }
-
-   public Locale getLocale()
-   {
-      return (Locale) this.locales.get(0);
-   }
-
-   public Enumeration getLocales()
-   {
-      return this.locales.elements();
-   }
-
-   public void setSecure(boolean secure)
-   {
-      this.secure = secure;
-   }
-
-   public boolean isSecure()
-   {
-      return this.secure;
-   }
-
-   public RequestDispatcher getRequestDispatcher(String path)
-   {
-      return new MockRequestDispatcher(path);
-   }
-
-   public String getRealPath(String path)
-   {
-      return this.servletContext.getRealPath(path);
-   }
-
-   public void setRemotePort(int remotePort)
-   {
-      this.remotePort = remotePort;
-   }
-
-   public int getRemotePort()
-   {
-      return this.remotePort;
-   }
-
-   public void setLocalName(String localName)
-   {
-      this.localName = localName;
-   }
-
-   public String getLocalName()
-   {
-      return this.localName;
-   }
-
-   public void setLocalAddr(String localAddr)
-   {
-      this.localAddr = localAddr;
-   }
-
-   public String getLocalAddr()
-   {
-      return this.localAddr;
-   }
-
-   public void setLocalPort(int localPort)
-   {
-      this.localPort = localPort;
-   }
-
-   public int getLocalPort()
-   {
-      return this.localPort;
-   }
-
-
-   //---------------------------------------------------------------------
-   // HttpServletRequest interface
-   //---------------------------------------------------------------------
-
-   public void setAuthType(String authType)
-   {
-      this.authType = authType;
-   }
-
-   public String getAuthType()
-   {
-      return this.authType;
-   }
-
-   public void setCookies(Cookie[] cookies)
-   {
-      this.cookies = cookies;
-   }
-
-   public Cookie[] getCookies()
-   {
-      return this.cookies;
-   }
-
-   public void addCookie(Cookie cookie)
-   {
-      this.cookies = new Cookie[this.cookies.length + 1];
-      this.cookies[this.cookies.length - 1] = cookie;
-   }
-
-   /**
-    * Add a header entry for the given name.
-    * <p>If there was no entry for that header name before,
-    * the value will be used as-is. In case of an existing entry,
-    * a String array will be created, adding the given value (more
-    * specifically, its toString representation) as further element.
-    * <p>Multiple values can only be stored as list of Strings,
-    * following the Servlet spec (see <code>getHeaders</code> accessor).
-    * As alternative to repeated <code>addHeader</code> calls for
-    * individual elements, you can use a single call with an entire
-    * array or Collection of values as parameter.
-    *
-    * @see #getHeaderNames
-    * @see #getHeader
-    * @see #getHeaders
-    * @see #getDateHeader
-    * @see #getIntHeader
-    */
-   public void addHeader(String name, Object value)
-   {
-      HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
-      if (header == null)
-      {
-         header = new HeaderValueHolder();
-         this.headers.put(name, header);
-      }
-      if (value instanceof Collection)
-      {
-         header.addValues((Collection) value);
-      }
-      else if (value.getClass().isArray())
-      {
-         header.addValueArray(value);
-      }
-      else
-      {
-         header.addValue(value);
-      }
-   }
-
-   public long getDateHeader(String name)
-   {
-      HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
-      Object value = (header != null ? header.getValue() : null);
-      if (value instanceof Date)
-      {
-         return ((Date) value).getTime();
-      }
-      else if (value instanceof Number)
-      {
-         return ((Number) value).longValue();
-      }
-      else if (value != null)
-      {
-         throw new IllegalArgumentException(
-               "Value for header '" + name + "' is neither a Date nor a Number: " + value);
-      }
-      else
-      {
-         return -1L;
-      }
-   }
-
-   public String getHeader(String name)
-   {
-      HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
-      return (header != null ? header.getValue().toString() : null);
-   }
-
-   public Map<String, String[]> getHeaders()
-   {
-      Map<String, String[]> headerValues = new HashMap();
-
-      for (Object o : this.headers.entrySet())
-      {
-         Map.Entry<String, HeaderValueHolder> entry = (Map.Entry<String, HeaderValueHolder>)o;
-         String[] values = (String[])entry.getValue().getValues().toArray(new String[entry.getValue().getValues().size()]);
-         headerValues.put(entry.getKey(), values);
-      }
-
-      return headerValues;
-   }
-
-   public Enumeration getHeaders(String name)
-   {
-      HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
-      return Collections.enumeration(header != null ? header.getValues() : Collections.EMPTY_LIST);
-   }
-
-   public Enumeration getHeaderNames()
-   {
-      return this.headers.keys();
-   }
-
-   public int getIntHeader(String name)
-   {
-      HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
-      Object value = (header != null ? header.getValue() : null);
-      if (value instanceof Number)
-      {
-         return ((Number) value).intValue();
-      }
-      else if (value instanceof String)
-      {
-         return Integer.parseInt((String) value);
-      }
-      else if (value != null)
-      {
-         throw new NumberFormatException("Value for header '" + name + "' is not a Number: " + value);
-      }
-      else
-      {
-         return -1;
-      }
-   }
-
-   public void setMethod(String method)
-   {
-      this.method = method;
-   }
-
-   public String getMethod()
-   {
-      return this.method;
-   }
-
-   public void setPathInfo(String pathInfo)
-   {
-      this.pathInfo = pathInfo;
-   }
-
-   public String getPathInfo()
-   {
-      return this.pathInfo;
-   }
-
-   public String getPathTranslated()
-   {
-      return (this.pathInfo != null ? getRealPath(this.pathInfo) : null);
-   }
-
-   public void setContextPath(String contextPath)
-   {
-      this.contextPath = contextPath;
-   }
-
-   public String getContextPath()
-   {
-      return this.contextPath != null ? this.contextPath : "/project"; // Old mock default
-   }
-
-   public void setQueryString(String queryString)
-   {
-      this.queryString = queryString;
-   }
-
-   public String getQueryString()
-   {
-      if (getQueryParameters().size() > 0)
-      {
-         StringBuilder q = new StringBuilder(queryString);
-         if (!queryString.endsWith("&")) q.append("&");
-         for (Map.Entry<String, String> entry : getQueryParameters().entrySet())
-         {
-            q.append(entry.getKey());
-            q.append("=");
-            q.append(entry.getValue());
-            q.append("&");
-         }
-         if (q.toString().endsWith("&"))
-         {
-            q.deleteCharAt(q.length() - 1);
-         }
-         return q.toString();
-      }
-      return this.queryString;
-   }
-
-   public void setRemoteUser(String remoteUser)
-   {
-      this.remoteUser = remoteUser;
-   }
-
-   public String getRemoteUser()
-   {
-      return this.remoteUser;
-   }
-
-   /**
-    * @see #addUserRole
-    * @deprecated in favor of addUserRole
-    */
-   public void addRole(String role)
-   {
-      addUserRole(role);
-   }
-
-   public void addUserRole(String role)
-   {
-      this.userRoles.add(role);
-   }
-
-   public boolean isUserInRole(String role)
-   {
-      return this.userRoles.contains(role);
-   }
-
-   public void setUserPrincipal(Principal userPrincipal)
-   {
-      this.userPrincipal = userPrincipal;
-   }
-
-   public Principal getUserPrincipal()
-   {
-      return this.userPrincipal;
-   }
-
-   public String getRequestedSessionId()
-   {
-      HttpSession session = getSession();
-      return (session != null ? session.getId() : null);
-   }
-
-   public void setRequestURI(String requestURI)
-   {
-      this.requestURI = requestURI;
-   }
-
-   public String getRequestURI()
-   {
-      return this.requestURI;
-   }
-
-   public StringBuffer getRequestURL()
-   {
-      StringBuffer url = new StringBuffer(this.scheme);
-      url.append("://").append(this.serverName).append(':').append(this.serverPort);
-      url.append(getRequestURI());
-      return url;
-   }
-
-   public void setServletPath(String servletPath)
-   {
-      this.servletPath = servletPath;
-   }
-
-   public String getServletPath()
-   {
-      return this.servletPath;
-   }
-
-   public void setSession(HttpSession session)
-   {
-      /*
-	   TODO: We don't track access times in mocks (yet) mockSession.access();
-		if (session instanceof MockHttpSession) {
-			MockHttpSession mockSession = ((MockHttpSession) session);
-			...
-		}
-		*/
-      this.session = session;
-   }
-
-   public HttpSession getSession(boolean create)
-   {
-      checkActive();
-      // Reset session if invalidated.
-      if (this.session instanceof MockHttpSession && ((MockHttpSession) this.session).isInvalid())
-      {
-         this.session = null;
-      }
-      // Create new session if necessary.
-      if (this.session == null && create)
-      {
-         this.session = new MockHttpSession(this.servletContext);
-      }
-      return this.session;
-   }
-
-   public HttpSession getSession()
-   {
-      return getSession(true);
-   }
-
-   public void setRequestedSessionIdValid(boolean requestedSessionIdValid)
-   {
-      this.requestedSessionIdValid = requestedSessionIdValid;
-   }
-
-   public boolean isRequestedSessionIdValid()
-   {
-      return this.requestedSessionIdValid;
-   }
-
-   public void setRequestedSessionIdFromCookie(boolean requestedSessionIdFromCookie)
-   {
-      this.requestedSessionIdFromCookie = requestedSessionIdFromCookie;
-   }
-
-   public boolean isRequestedSessionIdFromCookie()
-   {
-      return this.requestedSessionIdFromCookie;
-   }
-
-   public void setRequestedSessionIdFromURL(boolean requestedSessionIdFromURL)
-   {
-      this.requestedSessionIdFromURL = requestedSessionIdFromURL;
-   }
-
-   public boolean isRequestedSessionIdFromURL()
-   {
-      return this.requestedSessionIdFromURL;
-   }
-
-   public boolean isRequestedSessionIdFromUrl()
-   {
-      return isRequestedSessionIdFromURL();
-	}
-
-   public boolean isAllParametersInQueryString() {
-      return true;
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EnhancedMockHttpServletResponse.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EnhancedMockHttpServletResponse.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/EnhancedMockHttpServletResponse.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,515 +0,0 @@
-/*
- * Copyright 2002-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.seam.mock;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletResponse;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * Mock implementation of the {@link javax.servlet.http.HttpServletResponse}
- * interface. Supports the Servlet 2.4 API level.
- *
- * <p>Used for testing the web framework; also useful for testing
- * application controllers.
- *
- * @author Juergen Hoeller
- * @author Rod Johnson
- * @since 1.0.2
- */
-public class EnhancedMockHttpServletResponse implements HttpServletResponse {
-
-	public static final int DEFAULT_SERVER_PORT = 80;
-
-	private static final String CHARSET_PREFIX = "charset=";
-
-
-	//---------------------------------------------------------------------
-	// ServletResponse properties
-	//---------------------------------------------------------------------
-
-	private boolean outputStreamAccessAllowed = true;
-
-	private boolean writerAccessAllowed = true;
-
-	private String characterEncoding = "ISO-8859-1";
-
-	private final ByteArrayOutputStream content = new ByteArrayOutputStream();
-
-	private final ServletOutputStream outputStream = new ResponseServletOutputStream(this.content);
-
-	private PrintWriter writer;
-
-	private int contentLength = 0;
-
-	private String contentType;
-
-	private int bufferSize = 4096;
-
-	private boolean committed;
-
-	private Locale locale = Locale.getDefault();
-
-
-	//---------------------------------------------------------------------
-	// HttpServletResponse properties
-	//---------------------------------------------------------------------
-
-	private final List cookies = new ArrayList();
-
-	/**
-	 * The key is the lowercase header name; the value is a {@link org.jboss.seam.mock.HeaderValueHolder} object.
-	 */
-	private final Map headers = new HashMap();
-
-	private int status = HttpServletResponse.SC_OK;
-
-	private String statusMessage;
-
-	private String redirectedUrl;
-
-	private String forwardedUrl;
-
-	private String includedUrl;
-
-
-   //---------------------------------------------------------------------
-	// ServletResponse interface
-	//---------------------------------------------------------------------
-
-	/**
-	 * Set whether {@link #getOutputStream()} access is allowed.
-	 * <p>Default is <code>true</code>.
-	 */
-	public void setOutputStreamAccessAllowed(boolean outputStreamAccessAllowed) {
-		this.outputStreamAccessAllowed = outputStreamAccessAllowed;
-	}
-
-	/**
-	 * Return whether {@link #getOutputStream()} access is allowed.
-	 */
-	public boolean isOutputStreamAccessAllowed() {
-		return this.outputStreamAccessAllowed;
-	}
-
-	/**
-	 * Set whether {@link #getWriter()} access is allowed.
-	 * <p>Default is <code>true</code>.
-	 */
-	public void setWriterAccessAllowed(boolean writerAccessAllowed) {
-		this.writerAccessAllowed = writerAccessAllowed;
-	}
-
-	/**
-	 * Return whether {@link #getOutputStream()} access is allowed.
-	 */
-	public boolean isWriterAccessAllowed() {
-		return this.writerAccessAllowed;
-	}
-
-	public void setCharacterEncoding(String characterEncoding) {
-		this.characterEncoding = characterEncoding;
-	}
-
-	public String getCharacterEncoding() {
-		return this.characterEncoding;
-	}
-
-	public ServletOutputStream getOutputStream() {
-		if (!this.outputStreamAccessAllowed) {
-			throw new IllegalStateException("OutputStream access not allowed");
-		}
-		return this.outputStream;
-	}
-
-	public PrintWriter getWriter() throws UnsupportedEncodingException {
-		if (!this.writerAccessAllowed) {
-			throw new IllegalStateException("Writer access not allowed");
-		}
-		if (this.writer == null) {
-			Writer targetWriter = (this.characterEncoding != null ?
-					new OutputStreamWriter(this.content, this.characterEncoding) : new OutputStreamWriter(this.content));
-			this.writer = new ResponsePrintWriter(targetWriter);
-		}
-		return this.writer;
-	}
-
-	public byte[] getContentAsByteArray() {
-		flushBuffer();
-		return this.content.toByteArray();
-	}
-
-	public String getContentAsString() {
-		flushBuffer();
-      try {
-         return (this.characterEncoding != null) ?
-               this.content.toString(this.characterEncoding) : this.content.toString();
-      } catch (UnsupportedEncodingException ex) {
-         throw new RuntimeException(ex);
-      }
-	}
-
-	public void setContentLength(int contentLength) {
-		this.contentLength = contentLength;
-	}
-
-	public int getContentLength() {
-		return this.contentLength;
-	}
-
-	public void setContentType(String contentType) {
-		this.contentType = contentType;
-		if (contentType != null) {
-			int charsetIndex = contentType.toLowerCase().indexOf(CHARSET_PREFIX);
-			if (charsetIndex != -1) {
-				String encoding = contentType.substring(charsetIndex + CHARSET_PREFIX.length());
-				setCharacterEncoding(encoding);
-			}
-		}
-	}
-
-	public String getContentType() {
-		return this.contentType;
-	}
-
-	public void setBufferSize(int bufferSize) {
-		this.bufferSize = bufferSize;
-	}
-
-	public int getBufferSize() {
-		return this.bufferSize;
-	}
-
-	public void flushBuffer() {
-		setCommitted(true);
-	}
-
-	public void resetBuffer() {
-		if (isCommitted()) {
-			throw new IllegalStateException("Cannot reset buffer - response is already committed");
-		}
-		this.content.reset();
-	}
-
-	private void setCommittedIfBufferSizeExceeded() {
-		int bufSize = getBufferSize();
-		if (bufSize > 0 && this.content.size() > bufSize) {
-			setCommitted(true);
-		}
-	}
-
-	public void setCommitted(boolean committed) {
-		this.committed = committed;
-	}
-
-	public boolean isCommitted() {
-		return this.committed;
-	}
-
-	public void reset() {
-		resetBuffer();
-		this.characterEncoding = null;
-		this.contentLength = 0;
-		this.contentType = null;
-		this.locale = null;
-		this.cookies.clear();
-		this.headers.clear();
-		this.status = HttpServletResponse.SC_OK;
-		this.statusMessage = null;
-	}
-
-	public void setLocale(Locale locale) {
-		this.locale = locale;
-	}
-
-	public Locale getLocale() {
-		return this.locale;
-	}
-
-
-	//---------------------------------------------------------------------
-	// HttpServletResponse interface
-	//---------------------------------------------------------------------
-
-	public void addCookie(Cookie cookie) {
-		this.cookies.add(cookie);
-	}
-
-	public Cookie[] getCookies() {
-		return (Cookie[]) this.cookies.toArray(new Cookie[this.cookies.size()]);
-	}
-
-	public Cookie getCookie(String name) {
-		for (Iterator it = this.cookies.iterator(); it.hasNext();) {
-			Cookie cookie = (Cookie) it.next();
-			if (name.equals(cookie.getName())) {
-				return cookie;
-			}
-		}
-		return null;
-	}
-
-	public boolean containsHeader(String name) {
-		return (HeaderValueHolder.getByName(this.headers, name) != null);
-	}
-
-	/**
-	 * Return the names of all specified headers as a Set of Strings.
-	 * @return the <code>Set</code> of header name <code>Strings</code>, or an empty <code>Set</code> if none
-	 */
-	public Set getHeaderNames() {
-		return this.headers.keySet();
-	}
-
-	/**
-	 * Return the primary value for the given header, if any.
-	 * <p>Will return the first value in case of multiple values.
-	 * @param name the name of the header
-	 * @return the associated header value, or <code>null<code> if none
-	 */
-	public Object getHeader(String name) {
-		HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
-		return (header != null ? header.getValue() : null);
-	}
-
-	/**
-	 * Return all values for the given header as a List of value objects.
-	 * @param name the name of the header
-	 * @return the associated header values, or an empty List if none
-	 */
-	public List getHeaders(String name) {
-		HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
-		return (header != null ? header.getValues() : Collections.EMPTY_LIST);
-	}
-
-	/**
-	 * The default implementation returns the given URL String as-is.
-	 * <p>Can be overridden in subclasses, appending a session id or the like.
-	 */
-	public String encodeURL(String url) {
-		return url;
-	}
-
-	/**
-	 * The default implementation delegates to {@link #encodeURL},
-	 * returning the given URL String as-is.
-	 * <p>Can be overridden in subclasses, appending a session id or the like
-	 * in a redirect-specific fashion. For general URL encoding rules,
-	 * override the common {@link #encodeURL} method instead, appyling
-	 * to redirect URLs as well as to general URLs.
-	 */
-	public String encodeRedirectURL(String url) {
-		return encodeURL(url);
-	}
-
-	public String encodeUrl(String url) {
-		return encodeURL(url);
-	}
-
-	public String encodeRedirectUrl(String url) {
-		return encodeRedirectURL(url);
-	}
-
-	public void sendError(int status, String errorMessage) throws IOException {
-		if (isCommitted()) {
-			throw new IllegalStateException("Cannot set error status - response is already committed");
-		}
-		this.status = status;
-		this.statusMessage = errorMessage;
-		setCommitted(true);
-	}
-
-	public void sendError(int status) throws IOException {
-		if (isCommitted()) {
-			throw new IllegalStateException("Cannot set error status - response is already committed");
-		}
-		this.status = status;
-		setCommitted(true);
-	}
-
-	public void sendRedirect(String url) throws IOException {
-		if (isCommitted()) {
-			throw new IllegalStateException("Cannot send redirect - response is already committed");
-		}
-		this.redirectedUrl = url;
-		setCommitted(true);
-	}
-
-	public String getRedirectedUrl() {
-		return this.redirectedUrl;
-	}
-
-	public void setDateHeader(String name, long value) {
-		setHeaderValue(name, new Long(value));
-	}
-
-	public void addDateHeader(String name, long value) {
-		addHeaderValue(name, new Long(value));
-	}
-
-	public void setHeader(String name, String value) {
-		setHeaderValue(name, value);
-	}
-
-	public void addHeader(String name, String value) {
-		addHeaderValue(name, value);
-	}
-
-	public void setIntHeader(String name, int value) {
-		setHeaderValue(name, new Integer(value));
-	}
-
-	public void addIntHeader(String name, int value) {
-		addHeaderValue(name, new Integer(value));
-	}
-
-	private void setHeaderValue(String name, Object value) {
-		doAddHeaderValue(name, value, true);
-	}
-
-	private void addHeaderValue(String name, Object value) {
-		doAddHeaderValue(name, value, false);
-	}
-
-	private void doAddHeaderValue(String name, Object value, boolean replace) {
-		HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
-		if (header == null) {
-			header = new HeaderValueHolder();
-			this.headers.put(name, header);
-		}
-		if (replace) {
-			header.setValue(value);
-		}
-		else {
-			header.addValue(value);
-		}
-	}
-
-	public void setStatus(int status) {
-		this.status = status;
-	}
-
-	public void setStatus(int status, String statusMessage) {
-		this.status = status;
-		this.statusMessage = statusMessage;
-	}
-
-	public int getStatus() {
-		return this.status;
-	}
-
-	public String getStatusMessage() {
-		return this.statusMessage;
-	}
-
-
-	//---------------------------------------------------------------------
-	// Methods for MockRequestDispatcher
-	//---------------------------------------------------------------------
-
-	public void setForwardedUrl(String forwardedUrl) {
-		this.forwardedUrl = forwardedUrl;
-	}
-
-	public String getForwardedUrl() {
-		return this.forwardedUrl;
-	}
-
-	public void setIncludedUrl(String includedUrl) {
-		this.includedUrl = includedUrl;
-	}
-
-	public String getIncludedUrl() {
-		return this.includedUrl;
-	}
-
-
-   /**
-	 * Inner class that adapts the ServletOutputStream to mark the
-	 * response as committed once the buffer size is exceeded.
-	 */
-	private class ResponseServletOutputStream extends DelegatingServletOutputStream
-   {
-
-		public ResponseServletOutputStream(OutputStream out) {
-			super(out);
-		}
-
-		public void write(int b) throws IOException {
-			super.write(b);
-			super.flush();
-			setCommittedIfBufferSizeExceeded();
-		}
-
-		public void flush() throws IOException {
-			super.flush();
-			setCommitted(true);
-		}
-	}
-
-
-	/**
-	 * Inner class that adapts the PrintWriter to mark the
-	 * response as committed once the buffer size is exceeded.
-	 */
-	private class ResponsePrintWriter extends PrintWriter {
-
-		public ResponsePrintWriter(Writer out) {
-			super(out, true);
-		}
-
-		public void write(char buf[], int off, int len) {
-			super.write(buf, off, len);
-			super.flush();
-			setCommittedIfBufferSizeExceeded();
-		}
-
-		public void write(String s, int off, int len) {
-			super.write(s, off, len);
-			super.flush();
-			setCommittedIfBufferSizeExceeded();
-		}
-
-		public void write(int c) {
-			super.write(c);
-			super.flush();
-			setCommittedIfBufferSizeExceeded();
-		}
-
-		public void flush() {
-			super.flush();
-			setCommitted(true);
-		}
-	}
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/HeaderValueHolder.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/HeaderValueHolder.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/HeaderValueHolder.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,123 +0,0 @@
-/*
- * Copyright 2002-2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.seam.mock;
-
-import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Internal helper class that serves as value holder for request headers.
- *
- * @author Juergen Hoeller
- * @author Rick Evans
- * @since 2.0.1
- */
-class HeaderValueHolder
-{
-
-   private final List values = new LinkedList();
-
-
-   public void setValue(Object value)
-   {
-      this.values.clear();
-      this.values.add(value);
-   }
-
-   public void addValue(Object value)
-   {
-      this.values.add(value);
-   }
-
-   public void addValues(Collection values)
-   {
-      this.values.addAll(values);
-   }
-
-   public void addValueArray(Object values)
-   {
-      Object[] arr = toObjectArray(values);
-      this.values.addAll(Arrays.asList(arr));
-   }
-
-   public List getValues()
-   {
-      return Collections.unmodifiableList(this.values);
-   }
-
-   public Object getValue()
-   {
-      return (!this.values.isEmpty() ? this.values.get(0) : null);
-   }
-
-
-   /**
-    * Find a HeaderValueHolder by name, ignoring casing.
-    *
-    * @param headers the Map of header names to HeaderValueHolders
-    * @param name    the name of the desired header
-    * @return the corresponding HeaderValueHolder,
-    *         or <code>null</code> if none found
-    */
-   public static HeaderValueHolder getByName(Map headers, String name)
-   {
-      for (Iterator it = headers.keySet().iterator(); it.hasNext();)
-      {
-         String headerName = (String) it.next();
-         if (headerName.equalsIgnoreCase(name))
-         {
-            return (HeaderValueHolder) headers.get(headerName);
-         }
-      }
-      return null;
-   }
-
-   public static Object[] toObjectArray(Object source)
-   {
-      if (source instanceof Object[])
-      {
-         return (Object[]) source;
-      }
-      if (source == null)
-      {
-         return new Object[0];
-      }
-      if (!source.getClass().isArray())
-      {
-         throw new IllegalArgumentException("Source is not an array: " + source);
-      }
-      int length = Array.getLength(source);
-      if (length == 0)
-      {
-         return new Object[0];
-      }
-      Class wrapperType = Array.get(source, 0).getClass();
-      Object[] newArray = (Object[]) Array.newInstance(wrapperType, length);
-      for (int i = 0; i < length; i++)
-      {
-         newArray[i] = Array.get(source, i);
-      }
-      return newArray;
-	}
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/JUnitSeamTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.mock;
-
-import org.junit.After;
-import org.junit.Before;
-
-/**
- * Provides BaseSeamTest functionality for TestNG integration tests.
- * 
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @author Mike Youngstrom
- * @author <a href="http://community.jboss.org/people/jharting">Jozef Hartinger</a>
- * @author <a href="http://community.jboss.org/people/maschmid">Marek Schmidt</a>
- */
-public class JUnitSeamTest extends AbstractSeamTest
-{
-   
-   @Before
-   @Override
-   public void begin()
-   {
-      try {
-         startSeam();
-         setupClass();
-      }
-      catch (Exception x) {
-         throw new RuntimeException(x);
-      }
-      super.begin();
-   }
-
-   @After
-   @Override
-   public void end()
-   {
-      super.end();
-      try {
-         cleanupClass();
-         stopSeam();
-      }
-      catch (Exception x) {
-         throw new RuntimeException(x);
-      }
-   }
-   
-   /**
-    * Call this method within a test method to end the previous
-    * mock session and start another one. 
-    */
-   public void reset()
-   {
-      end();
-      begin();
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplication.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplication.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplication.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,451 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.el.CompositeELResolver;
-import javax.el.ExpressionFactory;
-import javax.faces.FacesException;
-import javax.faces.application.Application;
-import javax.faces.application.NavigationHandler;
-import javax.faces.application.StateManager;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIOutput;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.BigDecimalConverter;
-import javax.faces.convert.BigIntegerConverter;
-import javax.faces.convert.BooleanConverter;
-import javax.faces.convert.ByteConverter;
-import javax.faces.convert.CharacterConverter;
-import javax.faces.convert.Converter;
-import javax.faces.convert.DoubleConverter;
-import javax.faces.convert.FloatConverter;
-import javax.faces.convert.IntegerConverter;
-import javax.faces.convert.LongConverter;
-import javax.faces.convert.ShortConverter;
-import javax.faces.el.EvaluationException;
-import javax.faces.el.MethodBinding;
-import javax.faces.el.PropertyResolver;
-import javax.faces.el.ReferenceSyntaxException;
-import javax.faces.el.ValueBinding;
-import javax.faces.el.VariableResolver;
-import javax.faces.event.ActionListener;
-import javax.faces.event.SystemEvent;
-import javax.faces.validator.Validator;
-
-import org.jboss.seam.el.EL;
-import org.jboss.seam.el.SeamExpressionFactory;
-import org.jboss.seam.jsf.SeamNavigationHandler;
-import org.jboss.seam.jsf.SeamStateManager;
-import org.jboss.seam.jsf.SeamViewHandler;
-import org.jboss.seam.jsf.UnifiedELMethodBinding;
-import org.jboss.seam.jsf.UnifiedELValueBinding;
-import org.jboss.seam.util.Reflections;
-
- at SuppressWarnings("deprecation")
-public class MockApplication extends Application
-{
-   
-   @Override
-   public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source)
-   {
-      // empty publish method      
-   }
-
-   @Override
-   public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
-   {
-      // empty publish method
-   }
-
-   private javax.el.CompositeELResolver elResolver;
-   private javax.el.CompositeELResolver additionalResolvers;
-   private Collection locales;
-   
-   public MockApplication()
-   {
-     elResolver = new CompositeELResolver();
-     additionalResolvers = new CompositeELResolver();
-     elResolver.add(additionalResolvers);
-     elResolver.add(EL.EL_RESOLVER); 
-   }
-   
-   @Override
-   public Object evaluateExpressionGet(FacesContext context, String expression, Class type) throws javax.el.ELException 
-   {
-      return getExpressionFactory().createValueExpression(context.getELContext(), expression, type).getValue(context.getELContext());
-   }
-   
-   @Override
-   public void addELContextListener(javax.el.ELContextListener elcl) 
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   @Override
-   public void addELResolver(javax.el.ELResolver r) 
-   {
-      additionalResolvers.add(r);
-   }
-   
-   @Override
-   public UIComponent createComponent(javax.el.ValueExpression ve, FacesContext context, String id) throws FacesException 
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   @Override
-   public javax.el.ELContextListener[] getELContextListeners() 
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   
-   
-   @Override
-   public javax.el.ELResolver getELResolver() 
-   {
-      return elResolver;
-   }
-   
-   @Override
-   public java.util.ResourceBundle getResourceBundle(FacesContext context, String string) 
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   @Override
-   public void removeELContextListener(javax.el.ELContextListener elcl) 
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   @Override
-   public ActionListener getActionListener()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void setActionListener(ActionListener listener)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   private Locale defaultLocale = Locale.ENGLISH;
-
-   @Override
-   public Locale getDefaultLocale()
-   {
-      return defaultLocale;
-   }
-
-   @Override
-   public void setDefaultLocale(Locale locale)
-   {
-      defaultLocale = locale;
-   }
-
-   @Override
-   public String getDefaultRenderKitId()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void setDefaultRenderKitId(String rk)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   private String msgBundleName;
-
-   @Override
-   public String getMessageBundle()
-   {
-      return msgBundleName;
-   }
-
-   @Override
-   public void setMessageBundle(String bundleName)
-   {
-      this.msgBundleName = bundleName;
-   }
-
-   private NavigationHandler navigationHandler = new SeamNavigationHandler( new MockNavigationHandler() );
-
-   @Override
-   public NavigationHandler getNavigationHandler()
-   {
-      return navigationHandler;
-   }
-
-   @Override
-   public void setNavigationHandler(NavigationHandler navigationHandler)
-   {
-      this.navigationHandler = navigationHandler;
-   }
-
-   @Override
-   public PropertyResolver getPropertyResolver()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void setPropertyResolver(PropertyResolver pr)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   private VariableResolver variableResolver = /*new SeamVariableResolver(*/ new VariableResolver() { 
-      @Override
-      public Object resolveVariable(FacesContext ctx, String name) throws EvaluationException
-      {
-         return null;
-      }
-   } /*)*/;
-
-   @Override
-   public VariableResolver getVariableResolver()
-   {
-      return variableResolver;
-   }
-
-   @Override
-   public void setVariableResolver(VariableResolver variableResolver)
-   {
-      this.variableResolver = variableResolver;
-   }
-
-   private ViewHandler viewHandler = new SeamViewHandler( new MockViewHandler() );
-
-   @Override
-   public ViewHandler getViewHandler()
-   {
-      return viewHandler;
-   }
-
-   @Override
-   public void setViewHandler(ViewHandler viewHandler)
-   {
-      this.viewHandler = viewHandler;
-   }
-
-   private StateManager stateManager = new SeamStateManager( new MockStateManager() );
-
-   @Override
-   public StateManager getStateManager()
-   {
-      return stateManager;
-   }
-
-   @Override
-   public void setStateManager(StateManager stateManager)
-   {
-      this.stateManager = stateManager;
-   }
-
-   @Override
-   public void addComponent(String name, String x)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public UIComponent createComponent(String name) throws FacesException
-   {
-      // Best guess component creation with a dummy component if it can't be found
-      if (name.startsWith("org.jboss.seam.mail.ui") || name.startsWith("org.jboss.seam.excel.ui"))
-      {
-        try
-        {
-           return (UIComponent) Thread.currentThread().getContextClassLoader().loadClass(name).newInstance();
-        } 
-        catch (Exception e)
-        {           
-           throw new UnsupportedOperationException("Unable to create component " + name, e);
-        }
-      }
-      else
-      {
-         // Oh well, can't simply create the component so put a dummy one in its place
-         return new UIOutput();
-      }
-   }
-   
-   @Override
-   public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
-   {
-      return createComponent(componentType);
-   }
-
-   @Override
-   public UIComponent createComponent(ValueBinding vb, FacesContext fc, String x)
-            throws FacesException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Iterator getComponentTypes()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   private final Map<Class, Converter> converters = new HashMap<Class, Converter>();
-   {
-      converters.put(Integer.class, new IntegerConverter());
-      converters.put(Long.class, new LongConverter());
-      converters.put(Float.class, new FloatConverter());
-      converters.put(Double.class, new DoubleConverter());
-      converters.put(Boolean.class, new BooleanConverter());
-      converters.put(Short.class, new ShortConverter());
-      converters.put(Byte.class, new ByteConverter());
-      converters.put(Character.class, new CharacterConverter());
-      converters.put(BigDecimal.class, new BigDecimalConverter());
-      converters.put(BigInteger.class, new BigIntegerConverter());
-   }
-
-   private final Map<String, Converter> convertersById = new HashMap<String, Converter>();
-   {
-      convertersById.put(IntegerConverter.CONVERTER_ID, new IntegerConverter());
-      convertersById.put(LongConverter.CONVERTER_ID, new LongConverter());
-      convertersById.put(FloatConverter.CONVERTER_ID, new FloatConverter());
-      convertersById.put(DoubleConverter.CONVERTER_ID, new DoubleConverter());
-      convertersById.put(BooleanConverter.CONVERTER_ID, new BooleanConverter());
-      convertersById.put(ShortConverter.CONVERTER_ID, new ShortConverter());
-      convertersById.put(ByteConverter.CONVERTER_ID, new ByteConverter());
-      convertersById.put(CharacterConverter.CONVERTER_ID, new CharacterConverter());
-      convertersById.put(BigDecimalConverter.CONVERTER_ID, new BigDecimalConverter());
-      convertersById.put(BigIntegerConverter.CONVERTER_ID, new BigIntegerConverter());
-   }
-
-   @Override
-   public void addConverter(String id, String converterClass)
-   {
-      convertersById.put(id, instantiateConverter(converterClass));
-   }
-
-   @Override
-   public void addConverter(Class type, String converterClass)
-   {
-      converters.put(type, instantiateConverter(converterClass));
-   }
-
-   private Converter instantiateConverter(String converterClass)
-   {
-      try
-      {
-         return (Converter) Reflections.classForName(converterClass).newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   @Override
-   public Converter createConverter(String id)
-   {
-      return convertersById.get(id);
-   }
-
-   @Override
-   public Converter createConverter(Class clazz)
-   {
-      return converters.get(clazz);
-   }
-
-   @Override
-   public Iterator getConverterIds()
-   {
-      return convertersById.keySet().iterator();
-   }
-
-   @Override
-   public Iterator getConverterTypes()
-   {
-      return converters.keySet().iterator();
-   }
-
-   @Override
-   public MethodBinding createMethodBinding(String expression, Class[] params)
-         throws ReferenceSyntaxException
-   {
-      return new UnifiedELMethodBinding(expression, params);
-
-   }
-
-   @Override
-   public ValueBinding createValueBinding(String expression)
-         throws ReferenceSyntaxException
-   {
-      return new UnifiedELValueBinding(expression);
-   }
-
-   @Override
-   public Iterator getSupportedLocales()
-   {
-      if (locales == null)
-      {
-         return  Collections.singleton(defaultLocale).iterator();
-      }
-      else
-      {
-         return locales.iterator();
-      }
-   }
-
-   @Override
-   public void setSupportedLocales(Collection locales)
-   {
-      this.locales = locales;
-   }
-
-   private final Map<String, Validator> validatorsById = new HashMap<String, Validator>();
-   
-   @Override
-   public void addValidator(String id, String validatorClass)
-   {
-      validatorsById.put(id, instantiateValidator(validatorClass));
-   }
-
-   private Validator instantiateValidator(String validatorClass)
-   {
-      try
-      {
-         return (Validator) Reflections.classForName(validatorClass).newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   @Override
-   public Validator createValidator(String id) throws FacesException
-   {
-      return validatorsById.get(id);
-   }
-
-   @Override
-   public Iterator getValidatorIds()
-   {
-      return validatorsById.keySet().iterator();
-   }
-
-   @Override
-   public ExpressionFactory getExpressionFactory()
-   {
-      return SeamExpressionFactory.INSTANCE;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplicationFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplicationFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplicationFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,41 +0,0 @@
-package org.jboss.seam.mock;
-
-import javax.faces.application.Application;
-import javax.faces.application.ApplicationFactory;
-
-import org.jboss.seam.jsf.SeamApplication;
-
-/**
- * An mock implementation of the JSF ApplicationFactory which returns a mock
- * Application wrapped in a SeamApplication. This class can be registered with
- * JSF to allow JSF to be used formally in a test environment as follows:
- * 
- * <code>
- * FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
- *    "org.jboss.seam.mock.MockApplicationFactory");
- * Application application = ((ApplicationFactory) FactoryFinder
- *    .getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();    
- * </code>
- * 
- * @author Dan Allen
- */
-public class MockApplicationFactory extends ApplicationFactory
-{
-   private Application application;
-   
-   @Override
-   public Application getApplication()
-   {
-      if (application == null) {
-         application = new SeamApplication(new MockApplication());
-      }
-      return application;
-   }
-
-   @Override
-   public void setApplication(Application application)
-   {
-      this.application = application;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockExternalContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockExternalContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockExternalContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,565 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.mock;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.security.Principal;
-import java.util.AbstractSet;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.servlet.ServletContext;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.seam.util.EnumerationIterator;
-
-/**
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 13963 $
- */
-public class MockExternalContext extends ExternalContext
-{
-   private ServletContext context;
-
-   private HttpServletRequest request;
-
-   private HttpServletResponse response;
-
-   public MockExternalContext()
-   {
-      this.context = new MockServletContext();
-      this.request = new MockHttpServletRequest(new MockHttpSession(context));
-      this.response = new MockHttpServletResponse();
-   }
-
-   public MockExternalContext(ServletContext context)
-   {
-      this.context = context;
-      this.request = new MockHttpServletRequest(new MockHttpSession(context));
-      this.response = new MockHttpServletResponse();
-   }
-
-   public MockExternalContext(ServletContext context, HttpSession session)
-   {
-      this.context = context;
-      this.request = new MockHttpServletRequest(session);
-      this.response = new MockHttpServletResponse();
-   }
-
-   public MockExternalContext(ServletContext context, HttpServletRequest request)
-   {
-      this.context = context;
-      this.request = request;
-      this.response = new MockHttpServletResponse();
-   }
-
-   public MockExternalContext(ServletContext context, HttpServletRequest request,
-            HttpServletResponse response)
-   {
-      this.context = context;
-      this.request = request;
-      this.response = response;
-   }
-   
-   public MockExternalContext(HttpServletRequest request)
-   {
-      this.request = request;
-   }
-
-   @Override
-   public void dispatch(String url) throws IOException
-   {
-
-   }
-
-   @Override
-   public String encodeActionURL(String url)
-   {
-      return encodeURL(url);
-   }
-
-   @Override
-   public String encodeNamespace(String ns)
-   {
-      return ns;
-   }
-
-   @Override
-   public String encodeResourceURL(String url)
-   {
-      return encodeURL(url);
-   }
-
-   @Override
-   public Map getApplicationMap()
-   {
-      return new AttributeMap()
-      {
-         @Override
-         public Enumeration keys()
-         {
-            return context.getAttributeNames();
-         }
-
-         @Override
-         public Object getAttribute(String key)
-         {
-            return context.getAttribute(key);
-         }
-
-         @Override
-         public void setAttribute(String key, Object value)
-         {
-            context.setAttribute(key, value);
-         }
-         
-         @Override
-         public void removeAttribute(String key)
-         {
-            context.removeAttribute(key);
-         }
-      };
-   }
-
-   @Override
-   public String getAuthType()
-   {
-      return request.getAuthType();
-   }
-
-   @Override
-   public Object getContext()
-   {
-      return context;
-   }
-
-   @Override
-   public String getInitParameter(String name)
-   {
-      return context.getInitParameter(name);
-   }
-
-   @Override
-   public Map getInitParameterMap()
-   {
-      Map result = new HashMap();
-      Enumeration e = context.getInitParameterNames();
-      while (e.hasMoreElements())
-      {
-         String name = (String) e.nextElement();
-         result.put(name, context.getInitParameter(name));
-      }
-      return result;
-   }
-
-   @Override
-   public String getRemoteUser()
-   {
-      return request.getRemoteUser();
-   }
-
-   @Override
-   public Object getRequest()
-   {
-      return request;
-   }
-
-   @Override
-   public String getRequestContextPath()
-   {
-      String path = (String) request.getAttribute("org.jboss.seam.web.requestContextPath");
-      return path!=null ? path : request.getContextPath();
-   }
-
-   @Override
-   public Map getRequestCookieMap()
-   {
-      Map<String, Cookie> cookieMap = new HashMap<String, Cookie>();
-      
-      if (request != null && request.getCookies() != null)
-      {
-         for (Cookie cookie : request.getCookies())
-         {
-            cookieMap.put(cookie.getName(), cookie);
-         }
-      }
-      
-      return cookieMap;
-   }
-
-   @Override
-   public Map getRequestHeaderMap()
-   {
-      Map result = new HashMap();
-      Enumeration<String> names = request.getHeaderNames();
-      while (names.hasMoreElements())
-      {
-         String name = names.nextElement();
-         result.put(name, request.getHeader(name));
-      }
-      return result;
-   }
-
-   @Override
-   public Map getRequestHeaderValuesMap()
-   {
-      Map<String, String[]> result = new HashMap<String, String[]>();
-      Enumeration<String> en = request.getHeaderNames();
-      while (en.hasMoreElements())
-      {
-         String header = en.nextElement();
-         List<String> headerList = Collections.list(request.getHeaders(header));
-         String[] headers = new String[headerList.size()];
-         for (int i = 0; i < headerList.size(); i++)
-         {
-            headers[i] = headerList.get(i);
-         }
-         result.put(header, headers);
-      }
-      return result;
-   }
-
-   @Override
-   public Locale getRequestLocale()
-   {
-      return Locale.ENGLISH;
-   }
-
-   @Override
-   public Iterator getRequestLocales()
-   {
-      return Collections.singleton(Locale.ENGLISH).iterator();
-   }
-
-   @Override
-   public Map getRequestMap()
-   {
-      return new AttributeMap()
-      {
-         @Override
-         public Enumeration keys()
-         {
-            return request.getAttributeNames();
-         }
-
-         @Override
-         public Object getAttribute(String key)
-         {
-            return request.getAttribute(key);
-         }
-
-         @Override
-         public void setAttribute(String key, Object value)
-         {
-            request.setAttribute(key, value);
-         }
-         
-         @Override
-         public void removeAttribute(String key)
-         {
-            request.removeAttribute(key);
-         }
-      };
-   }
-
-   @Override
-   public Map getRequestParameterMap()
-   {
-      Map map = new HashMap();
-      Enumeration<String> names = request.getParameterNames();
-      while (names.hasMoreElements())
-      {
-         String name = names.nextElement();
-         map.put(name, request.getParameter(name));
-      }
-      return map;
-   }
-
-   @Override
-   public Iterator getRequestParameterNames()
-   {
-      return request.getParameterMap().keySet().iterator();
-   }
-
-   @Override
-   public Map getRequestParameterValuesMap()
-   {
-      return request.getParameterMap();
-   }
-
-   @Override
-   public String getRequestPathInfo()
-   {
-       String path = (String) request.getAttribute("org.jboss.seam.web.requestPathInfo");
-       return path!=null ? path : request.getPathInfo();
-   }
-
-   @Override
-   public String getRequestServletPath()
-   {
-       String path = (String) request.getAttribute("org.jboss.seam.web.requestServletPath");
-       return path!=null ? path : request.getServletPath();
-   }
-
-   @Override
-   public URL getResource(String name) throws MalformedURLException
-   {
-      return context.getResource(name);
-   }
-
-   @Override
-   public InputStream getResourceAsStream(String name)
-   {
-      return context.getResourceAsStream(name);
-   }
-
-   @Override
-   public Set getResourcePaths(String name)
-   {
-      return context.getResourcePaths(name);
-   }
-
-   @Override
-   public Object getResponse()
-   {
-      return response;
-   }
-
-   @Override
-   public Object getSession(boolean create)
-   {
-      return request.getSession();
-   }
-
-   @Override
-   public Map getSessionMap()
-   {
-      final HttpSession session = request.getSession(true); //TODO: create the session lazily, RI should do that to
-      return new AttributeMap()
-      {
-         @Override
-         public Enumeration keys()
-         {
-            return session.getAttributeNames();
-         }
-
-         @Override
-         public Object getAttribute(String key)
-         {
-            return session.getAttribute(key);
-         }
-
-         @Override
-         public void setAttribute(String key, Object value)
-         {
-            session.setAttribute(key, value);
-         }
-
-         @Override
-         public void removeAttribute(String key)
-         {
-            session.removeAttribute(key);
-         }
-      };
-   }
-
-   static abstract class AttributeMap implements Map
-   {
-
-      public abstract Enumeration keys();
-
-      public Object get(Object key)
-      {
-         return getAttribute((String) key);
-      }
-
-      public Object put(Object key, Object value)
-      {
-         Object result = get(key);
-         setAttribute((String) key, value);
-         return result;
-      }
-
-      public void clear()
-      {
-         Enumeration e = keys();
-         while (e.hasMoreElements())
-         {
-            remove(e.nextElement());
-         }
-      }
-
-      public boolean containsKey(Object key)
-      {
-         Enumeration e = keys();
-         while (e.hasMoreElements())
-         {
-            if (key.equals(e.nextElement())) return true;
-         }
-         return false;
-      }
-
-      public boolean containsValue(Object value)
-      {
-         Enumeration e = keys();
-         while (e.hasMoreElements())
-         {
-            if (value.equals(get(e.nextElement()))) return true;
-         }
-         return false;
-      }
-
-      public Set entrySet()
-      {
-         throw new UnsupportedOperationException();
-      }
-
-      public abstract Object getAttribute(String key);
-
-      public boolean isEmpty()
-      {
-         return size() == 0;
-      }
-
-      public Set keySet()
-      {
-         return new AbstractSet()
-         {
-
-            @Override
-            public Iterator iterator()
-            {
-               return new EnumerationIterator(keys());
-            }
-
-            @Override
-            public int size()
-            {
-               return AttributeMap.this.size();
-            }
-
-         };
-      }
-
-      public abstract void setAttribute(String key, Object value);
-
-      public abstract void removeAttribute(String key);
-
-      public void putAll(Map t)
-      {
-         for (Map.Entry me : (Set<Map.Entry>) t.entrySet())
-         {
-            put(me.getKey(), me.getValue());
-         }
-      }
-
-      public Object remove(Object key)
-      {
-         Object result = getAttribute((String) key);
-         removeAttribute((String) key);
-         return result;
-      }
-
-      public int size()
-      {
-         int i = 0;
-         Enumeration e = keys();
-         while (e.hasMoreElements())
-         {
-            e.nextElement();
-            i++;
-         }
-         return i;
-      }
-
-      public Collection values()
-      {
-         throw new UnsupportedOperationException();
-      }
-
-   }
-
-   @Override
-   public Principal getUserPrincipal()
-   {
-      return request.getUserPrincipal();
-   }
-
-   @Override
-   public boolean isUserInRole(String role)
-   {
-      return request.isUserInRole(role);
-   }
-
-   @Override
-   public void log(String message, Throwable t)
-   {
-
-   }
-
-   @Override
-   public void log(String t)
-   {
-   }
-
-   @Override
-   public void redirect(String url) throws IOException
-   {
-      response.sendRedirect(url);
-      FacesContext.getCurrentInstance().responseComplete();
-   }
-   
-   
-
-   @Override
-   public void setRequest(Object myrequest)
-   {
-      this.request = (HttpServletRequest) myrequest;
-   }
-
-   /**
-    * @since 1.2
-    */
-   @Override
-   public String getResponseContentType()
-   {
-      return response.getContentType();
-   }
-
-   /**
-    * Attempt to encode the URL, falling back to
-    * an identity function if the response has
-    * not been set on this mock context. This
-    * functionality is needed in order for
-    * the ExceptionFilter to maintain the session id
-    * when url rewriting is used.
-    */
-   protected String encodeURL(String url)
-   {
-      if (response != null) {
-         String encodedUrl = response.encodeURL(url); 
-         url = (encodedUrl != null ? encodedUrl : url);
-      }
-      return url;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFacesContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFacesContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFacesContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,249 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.mock;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.el.ELContext;
-import javax.faces.FactoryFinder;
-import javax.faces.application.Application;
-import javax.faces.application.ApplicationFactory;
-import javax.faces.application.FacesMessage;
-import javax.faces.application.FacesMessage.Severity;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseStream;
-import javax.faces.context.ResponseWriter;
-import javax.faces.render.RenderKit;
-import javax.faces.render.RenderKitFactory;
-
-import org.jboss.seam.el.EL;
-
-/**
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class MockFacesContext extends FacesContext
-{
-
-   private UIViewRoot viewRoot;// = new UIViewRoot();
-
-   private final Map<FacesMessage, String> messages = new LinkedHashMap<FacesMessage, String>();
-
-   private ExternalContext externalContext;
-
-   private ResponseWriter responseWriter;
-
-   private RenderKitFactory renderKitFactory;
-   
-   private ELContext elContext;
-
-   public MockFacesContext(ExternalContext externalContext, Application application)
-   {
-      this.externalContext = externalContext;
-      this.application = application;
-   }
-
-   // Create a MockFacesContext using a ApplicationFactory to get the
-   // Application
-   public MockFacesContext(ExternalContext externalContext)
-   {
-      application = ((ApplicationFactory) FactoryFinder
-               .getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();
-      renderKitFactory = (RenderKitFactory) FactoryFinder
-               .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
-      this.externalContext = externalContext;
-   }
-
-   private Application application;
-
-   @Override
-   public Application getApplication()
-   {
-      return application;
-   }
-
-   @Override
-   public Iterator getClientIdsWithMessages()
-   {
-      return messages.values().iterator();
-   }
-
-   @Override
-   public ExternalContext getExternalContext()
-   {
-      return externalContext;
-   }
-
-   @Override
-   public Severity getMaximumSeverity()
-   {
-      Severity max = null;
-      for (FacesMessage msg : messages.keySet())
-      {
-         if (max == null || msg.getSeverity().compareTo(max) > 0)
-         {
-            max = msg.getSeverity();
-         }
-      }
-      return max;
-   }
-
-   @Override
-   public Iterator getMessages()
-   {
-      return messages.keySet().iterator();
-   }
-
-   @Override
-   public Iterator getMessages(String clientId)
-   {
-      List list = new ArrayList();
-      for (Map.Entry<FacesMessage, String> entry : messages.entrySet())
-      {
-         String messageId = entry.getValue();
-         if ( idsAreEqual(clientId, messageId) )
-         {
-            list.add(entry.getKey());
-         }
-      }
-      return list.iterator();
-   }
-
-   private boolean idsAreEqual(String clientId, String messageId)
-   {
-      return (clientId==null && messageId==null) || 
-            (clientId!=null && clientId.equals(messageId));
-   }
-
-   @Override
-   public RenderKit getRenderKit()
-   {  
-      if (getViewRoot() == null || getViewRoot().getRenderKitId() == null || renderKitFactory == null)
-      {
-         return MockRenderKit.INSTANCE;
-      }
-      else
-      {
-         return renderKitFactory.getRenderKit(this, getViewRoot().getRenderKitId());
-      }
-   }
-
-   private boolean renderResponse;
-
-   @Override
-   public boolean getRenderResponse()
-   {
-      return renderResponse;
-   }
-
-   private boolean responseComplete;
-
-   @Override
-   public boolean getResponseComplete()
-   {
-      return responseComplete;
-   }
-
-   @Override
-   public ResponseStream getResponseStream()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void setResponseStream(ResponseStream stream)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public ResponseWriter getResponseWriter()
-   {
-      return responseWriter;
-   }
-
-   @Override
-   public void setResponseWriter(ResponseWriter writer)
-   {
-      responseWriter = writer;
-   }
-
-   @Override
-   public UIViewRoot getViewRoot()
-   {
-      return viewRoot;
-   }
-
-   @Override
-   public void setViewRoot(UIViewRoot vr)
-   {
-      viewRoot = vr;
-   }
-
-   @Override
-   public void addMessage(String clientId, FacesMessage msg)
-   {
-      messages.put(msg, clientId);
-   }
-
-   @Override
-   public void release()
-   {
-      setCurrentInstance(null);
-      MockFacesContextFactory.setFacesContext(null);
-   }
-
-   @Override
-   public void renderResponse()
-   {
-      renderResponse = true;
-   }
-
-   @Override
-   public void responseComplete()
-   {
-      responseComplete = true;
-   }
-
-   public MockFacesContext setCurrent()
-   {
-      setCurrentInstance(this);
-      
-      MockFacesContextFactory.setFacesContext(this);
-      return this;
-   }
-
-   public MockFacesContext createViewRoot()
-   {
-      viewRoot = new UIViewRoot();
-      viewRoot.setRenderKitId(getApplication().getViewHandler().calculateRenderKitId(this));
-      return this;
-   }
-
-   @Override
-   public ELContext getELContext()
-   {
-      if (elContext == null)
-      {
-         elContext = EL.createELContext(EL.createELContext(), getApplication().getELResolver());
-         elContext.putContext(FacesContext.class, this);
-      }
-      return elContext;
-   }
-   
-   @Override
-   public boolean isPostback() {
-      return false;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFacesContextFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFacesContextFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFacesContextFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,29 +0,0 @@
-package org.jboss.seam.mock;
-
-import javax.faces.FacesException;
-import javax.faces.context.FacesContext;
-import javax.faces.context.FacesContextFactory;
-import javax.faces.lifecycle.Lifecycle;
-
-public class MockFacesContextFactory extends FacesContextFactory
-{
-   
-   private static FacesContext facesContext;
-
-   @Override
-   public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException
-   {
-      return facesContext;
-   }
-   
-   public static void setFacesContext(FacesContext facesContext)
-   {
-      MockFacesContextFactory.facesContext = facesContext;
-   }
-
-   public static FacesContext getFacesContext()
-   {
-      return MockFacesContextFactory.facesContext;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFilterConfig.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFilterConfig.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockFilterConfig.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,42 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.util.Collections;
-import java.util.Enumeration;
-
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.util.IteratorEnumeration;
-
-/**
- * @author Gavin King
- */
-public class MockFilterConfig implements FilterConfig
-{
-   private ServletContext servletContext;
-   
-   public MockFilterConfig(ServletContext servletContext)
-   {
-      this.servletContext = servletContext;
-   }
-   
-   public String getFilterName()
-   {
-      return "Seam Filter";
-   }
-
-   public ServletContext getServletContext()
-   {
-      return servletContext;
-   }
-
-   public String getInitParameter(String name)
-   {
-      return null;
-   }
-
-   public Enumeration getInitParameterNames()
-   {
-      return new IteratorEnumeration( Collections.EMPTY_LIST.iterator() );
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpServletRequest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpServletRequest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpServletRequest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,459 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.mock;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.context.ExternalContext;
-import javax.portlet.PortletRequest;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.seam.util.IteratorEnumeration;
-
-/**
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class MockHttpServletRequest implements HttpServletRequest
-{
-   
-   private Map<String, String[]> parameters = new HashMap<String, String[]>();
-   private Map<String, Object> attributes = new HashMap<String, Object>();
-   private HttpSession session;
-   private Map<String, String[]> headers = new HashMap<String, String[]>();
-   private String principalName;
-   private Set<String> principalRoles;
-   private Cookie[] cookies;
-   private String method;
-   private HttpServletRequest httpServletRequest;
-   private PortletRequest portletRequest;
-   private String authType;
-   private String pathInfo;
-   private String pathTranslated;
-   private String contextPath;
-   private String queryString;
-   private String requestedSessionId;
-   private String requestURI;
-   private StringBuffer requestURL;
-   private String servletPath;
-   private String characterEncoding;
-   private int contentLength;
-   private String contentType;
-   private ServletInputStream inputStream;
-   private String protocol;
-   private String scheme;
-   private String serverName;
-   private int serverPort;
-   private BufferedReader reader;
-   private String remoteAddr;
-   private String remoteHost;
-   private Locale locale;
-   private Enumeration locales;
-   private boolean isSecure;
-   private int remotePort;
-   private String localName;
-   private String localAddr;
-   private int localPort;
-
-   
-   
-   public MockHttpServletRequest(HttpSession session)
-   {
-      this(session, null, new HashSet<String>());
-   }
-   
-   public MockHttpServletRequest(HttpSession session, ExternalContext externalContext) 
-   {
-      this(session, null, new HashSet<String>());
-      Object request = externalContext.getRequest();
-      if(externalContext != null && (request instanceof HttpServletRequest)) 
-      {
-         httpServletRequest = (HttpServletRequest)request;
-         authType = httpServletRequest.getAuthType();
-         pathInfo = httpServletRequest.getPathInfo();
-         pathTranslated = httpServletRequest.getPathTranslated();
-         contextPath = httpServletRequest.getContextPath();
-         queryString = httpServletRequest.getQueryString();
-         requestedSessionId = httpServletRequest.getRequestedSessionId();
-         requestURI = httpServletRequest.getRequestURI();
-         requestURL = httpServletRequest.getRequestURL();
-         servletPath = httpServletRequest.getServletPath();
-         characterEncoding = httpServletRequest.getCharacterEncoding();
-         contentLength = httpServletRequest.getContentLength();
-         contentType = httpServletRequest.getContentType();
-         protocol = httpServletRequest.getProtocol();
-         scheme = httpServletRequest.getScheme();
-         serverName = httpServletRequest.getServerName();
-         serverPort = httpServletRequest.getServerPort();
-         remoteAddr = httpServletRequest.getRemoteAddr();
-         remoteHost = httpServletRequest.getRemoteHost();
-         locale = httpServletRequest.getLocale();
-         locales = httpServletRequest.getLocales();
-         isSecure = httpServletRequest.isSecure();
-         remotePort = httpServletRequest.getRemotePort();
-         localName = httpServletRequest.getLocalName();
-         localAddr = httpServletRequest.getLocalAddr();
-         localPort = httpServletRequest.getLocalPort();
-         
-      } else if(externalContext != null && (request instanceof PortletRequest)) 
-      {
-         portletRequest = (PortletRequest)request;
-         authType = portletRequest.getAuthType();
-         contextPath = portletRequest.getContextPath();
-         requestedSessionId = portletRequest.getRequestedSessionId();
-         scheme = portletRequest.getScheme();
-         serverName = portletRequest.getServerName();
-         serverPort = portletRequest.getServerPort();
-         locale = portletRequest.getLocale();
-         locales = portletRequest.getLocales();
-         isSecure = portletRequest.isSecure();
-      }
-   }
-
-   public MockHttpServletRequest(HttpSession session, String principalName, Set<String> principalRoles)
-   {
-      this(session, principalName, principalRoles, new Cookie[] {}, null);
-   }
-
-   public MockHttpServletRequest(HttpSession session, String principalName, Set<String> principalRoles, Cookie[] cookies, String method)
-   {
-      this.session = session;
-      this.principalName = principalName;
-      this.principalRoles = principalRoles;
-      this.cookies = cookies;
-      this.method = method;
-      // The 1.2 RI NPEs if this header isn't present 
-      headers.put("Accept", new String[0]);
-      locales = new IteratorEnumeration(new ArrayList().iterator());
-   }
-
-   public Map<String, String[]> getParameters()
-   {
-      return parameters;
-   }
-
-   public Map<String, Object> getAttributes()
-   {
-      return attributes;
-   }
-   
-   public String getAuthType()
-   {
-      return authType;
-   }
-
-   public Cookie[] getCookies()
-   {
-      return cookies;
-   }
-
-   public long getDateHeader(String arg0)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public String getHeader(String header)
-   {
-      String[] values = headers.get(header);
-      return values==null || values.length==0 ? null : values[0];
-   }
-
-   public Enumeration getHeaders(String header)
-   {
-      return new IteratorEnumeration( Arrays.asList( headers.get(header) ).iterator() );
-   }
-
-   public Enumeration getHeaderNames()
-   {
-      return new IteratorEnumeration( headers.keySet().iterator() );
-   }
-
-   public int getIntHeader(String header)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public String getMethod()
-   {
-      return method;
-   }
-
-   public String getPathInfo()
-   {
-      return pathInfo;
-   }
-
-   public String getPathTranslated()
-   {
-      return pathTranslated;
-   }
-
-   public String getContextPath()
-   {
-      return (contextPath != null ? contextPath : "/project");
-   }
-
-   public String getQueryString()
-   {
-      return queryString;
-   }
-
-   public String getRemoteUser()
-   {
-      return principalName;
-   }
-
-   public boolean isUserInRole(String role)
-   {
-      return principalRoles.contains(role);
-   }
-
-   public Principal getUserPrincipal()
-   {
-      return principalName==null ? null : 
-         new Principal() 
-         {
-            public String getName()
-            {
-               return principalName;
-            }
-         };
-   }
-
-   public String getRequestedSessionId()
-   {
-      return requestedSessionId;
-   }
-
-   public String getRequestURI()
-   {
-      return (requestURI != null ? requestURI : "http://localhost:8080/myproject/page.seam");
-   }
-
-   public StringBuffer getRequestURL()
-   {
-      return (requestURL != null ? requestURL : new StringBuffer(getRequestURI())); 
-   }
-
-   public String getServletPath()
-   {
-      return (servletPath != null ? servletPath : "/page.seam");
-   }
-
-   public HttpSession getSession(boolean create)
-   {
-      return session;
-   }
-
-   public HttpSession getSession()
-   {
-      return getSession(true);
-   }
-
-   public boolean isRequestedSessionIdValid()
-   {
-      return true;
-   }
-
-   public boolean isRequestedSessionIdFromCookie()
-   {
-      return true;
-   }
-
-   public boolean isRequestedSessionIdFromURL()
-   {
-      return false;
-   }
-
-   public boolean isRequestedSessionIdFromUrl()
-   {
-      return false;
-   }
-
-   public Object getAttribute(String att)
-   {
-      return attributes.get(att);
-   }
-
-   public Enumeration getAttributeNames()
-   {
-      return new IteratorEnumeration( attributes.keySet().iterator() );
-   }
-
-   public String getCharacterEncoding()
-   {
-      return characterEncoding;
-   }
-
-   public void setCharacterEncoding(String enc)
-         throws UnsupportedEncodingException
-   {
-      //TODO
-
-   }
-
-   public int getContentLength()
-   {
-      return contentLength;
-   }
-
-   public String getContentType()
-   {
-      return contentType;
-   }
-
-   public ServletInputStream getInputStream() throws IOException
-   {
-      return inputStream;
-   }
-
-   public String getParameter(String param)
-   {
-      String[] values = parameters.get(param);
-      return values==null || values.length==0 ? null : values[0];
-   }
-
-   public Enumeration getParameterNames()
-   {
-      return new IteratorEnumeration( parameters.keySet().iterator() );
-   }
-
-   public String[] getParameterValues(String param)
-   {
-      return parameters.get(param);
-   }
-
-   public Map getParameterMap()
-   {
-      return parameters;
-   }
-
-   public String getProtocol()
-   {
-      return protocol;
-   }
-
-   public String getScheme()
-   {
-      return scheme;
-   }
-
-   public String getServerName()
-   {
-      return serverName;
-   }
-
-   public int getServerPort()
-   {
-      return serverPort;
-   }
-
-   public BufferedReader getReader() throws IOException
-   {
-      return reader;
-   }
-
-   public String getRemoteAddr()
-   {
-      return remoteAddr;
-   }
-
-   public String getRemoteHost()
-   {
-      return remoteHost;
-   }
-
-   public void setAttribute(String att, Object value)
-   {
-      if (value==null)
-      {
-         attributes.remove(value);
-      }
-      else
-      {
-         attributes.put(att, value);
-      }
-   }
-
-   public void removeAttribute(String att)
-   {
-      attributes.remove(att);
-   }
-
-   public Locale getLocale()
-   {
-      return locale;
-   }
-
-   public Enumeration getLocales()
-   {
-      return locales;
-   }
-
-   public boolean isSecure()
-   {
-      return isSecure;
-   }
-
-   public RequestDispatcher getRequestDispatcher(String path)
-   {
-      if(httpServletRequest != null) 
-      {
-         return httpServletRequest.getRequestDispatcher(path);
-      }
-      return null;
-   }
-
-   public String getRealPath(String path)
-   {
-      if(httpServletRequest != null) 
-      {
-         return httpServletRequest.getRealPath(path);
-      }
-      return null;
-   }
-
-   public int getRemotePort()
-   {
-      return remotePort;
-   }
-
-   public String getLocalName()
-   {
-      return localName;
-   }
-
-   public String getLocalAddr()
-   {
-      return localAddr;
-   }
-
-   public int getLocalPort()
-   {
-      return localPort;
-   }
-
-   public Map<String, String[]> getHeaders()
-   {
-      return headers;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpServletResponse.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpServletResponse.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpServletResponse.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,205 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Locale;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletResponse;
-
-public class MockHttpServletResponse implements HttpServletResponse
-{
-
-   public void addCookie(Cookie arg0)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void addDateHeader(String arg0, long arg1)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void addHeader(String arg0, String arg1)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void addIntHeader(String arg0, int arg1)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public boolean containsHeader(String arg0)
-   {
-      // TODO Auto-generated method stub
-      return false;
-   }
-
-   public String encodeRedirectURL(String arg0)
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-
-   public String encodeRedirectUrl(String arg0)
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-
-   public String encodeURL(String arg0)
-   {
-      return arg0;
-   }
-
-   @Deprecated
-   public String encodeUrl(String arg0)
-   {
-      return encodeURL(arg0);
-   }
-
-   public void sendError(int arg0) throws IOException
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void sendError(int arg0, String arg1) throws IOException
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void sendRedirect(String arg0) throws IOException
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setDateHeader(String arg0, long arg1)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setHeader(String arg0, String arg1)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setIntHeader(String arg0, int arg1)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setStatus(int arg0)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setStatus(int arg0, String arg1)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void flushBuffer() throws IOException
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public int getBufferSize()
-   {
-      // TODO Auto-generated method stub
-      return 0;
-   }
-
-   public String getCharacterEncoding()
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-
-   public String getContentType()
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-
-   public Locale getLocale()
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-
-   public ServletOutputStream getOutputStream() throws IOException
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-
-   public PrintWriter getWriter() throws IOException
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-
-   public boolean isCommitted()
-   {
-      // TODO Auto-generated method stub
-      return false;
-   }
-
-   public void reset()
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void resetBuffer()
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setBufferSize(int arg0)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setCharacterEncoding(String arg0)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setContentLength(int arg0)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setContentType(String arg0)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-   public void setLocale(Locale arg0)
-   {
-      // TODO Auto-generated method stub
-
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpSession.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpSession.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockHttpSession.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,149 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.mock;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionContext;
-
-import org.jboss.seam.util.IteratorEnumeration;
-
-/**
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 9668 $
- */
- at SuppressWarnings("deprecation")
-public class MockHttpSession implements HttpSession
-{
-   
-   private Map<String, Object> attributes = new HashMap<String, Object>();
-   private boolean isInvalid;
-   private ServletContext servletContext;
-   
-   public MockHttpSession() {}
-   
-   public MockHttpSession(ServletContext servletContext) 
-   {
-      this.servletContext = servletContext;
-   }
-   
-   public boolean isInvalid()
-   {
-      return isInvalid;
-   }
-
-   public long getCreationTime()
-   {
-      return 0;
-   }
-
-   public String getId()
-   {
-      return null;
-   }
-
-   public long getLastAccessedTime()
-   {
-      return 0;
-   }
-   
-   private int maxInactiveInterval;
-
-   public void setMaxInactiveInterval(int max)
-   {
-      maxInactiveInterval = max;
-   }
-
-   public int getMaxInactiveInterval()
-   {
-      return maxInactiveInterval;
-   }
-   
-   public HttpSessionContext getSessionContext()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object getAttribute(String att)
-   {
-      return attributes.get(att);
-   }
-
-   public Object getValue(String att)
-   {
-      return getAttribute(att);
-   }
-
-   public Enumeration getAttributeNames()
-   {
-      return new IteratorEnumeration( attributes.keySet().iterator() );
-   }
-
-   public String[] getValueNames()
-   {
-      return attributes.keySet().toArray( new String[0] );
-   }
-
-   public void setAttribute(String att, Object value)
-   {
-      if (value==null)
-      {
-         attributes.remove(att);
-      }
-      else
-      {
-         attributes.put(att, value);
-      }
-   }
-
-   public void putValue(String att, Object value)
-   {
-      setAttribute(att, value);
-   }
-
-   public void removeAttribute(String att)
-   {
-      attributes.remove(att);
-   }
-
-   public void removeValue(String att)
-   {
-      removeAttribute(att);
-   }
-
-   public void invalidate()
-   {
-      attributes.clear();
-      isInvalid = true;
-   }
-
-   public boolean isNew()
-   {
-      return false;
-   }
-
-   public Map<String, Object> getAttributes()
-   {
-      return attributes;
-   }
-
-   public ServletContext getServletContext()
-   {
-      return servletContext;
-   }
-
-   /*public void clear() {
-      attributes.clear();
-      isInvalid = false;
-   }*/
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLifecycle.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLifecycle.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLifecycle.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,51 +0,0 @@
-//$Id: MockLifecycle.java 8195 2008-05-15 13:25:37Z pete.muir at jboss.org $
-package org.jboss.seam.mock;
-
-import javax.faces.FacesException;
-import javax.faces.FactoryFinder;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseListener;
-import javax.faces.lifecycle.Lifecycle;
-
-public class MockLifecycle extends Lifecycle
-{
-   
-   public static final Lifecycle INSTANCE = new MockLifecycle();
-   
-   public MockLifecycle()
-   {
-      MockLifecycleFactory.setLifecycle(this);
-      FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY, MockLifecycleFactory.class.getName());
-   }
-
-   @Override
-   public void addPhaseListener(PhaseListener pl)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void execute(FacesContext ctx) throws FacesException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public PhaseListener[] getPhaseListeners()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void removePhaseListener(PhaseListener pl)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void render(FacesContext ctx) throws FacesException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLifecycleFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLifecycleFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLifecycleFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,42 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import javax.faces.lifecycle.Lifecycle;
-import javax.faces.lifecycle.LifecycleFactory;
-
-public class MockLifecycleFactory extends LifecycleFactory
-{
-   
-   private static Lifecycle lifecycle;
-   
-   public static void setLifecycle(Lifecycle lifecycle)
-   {
-      MockLifecycleFactory.lifecycle = lifecycle;
-   }
-   
-   public static Lifecycle getLifecycle()
-   {
-      return MockLifecycleFactory.lifecycle;
-   }
-
-   @Override
-   public void addLifecycle(String lifecycleId, Lifecycle lifecycle)
-   {
-      throw new IllegalArgumentException("Not supported");
-   }
-
-   @Override
-   public Lifecycle getLifecycle(String lifecycleId)
-   {
-      return lifecycle;
-   }
-
-   @Override
-   public Iterator<String> getLifecycleIds()
-   {
-      return Arrays.asList(DEFAULT_LIFECYCLE).iterator();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLoginModule.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLoginModule.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockLoginModule.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,18 +0,0 @@
-package org.jboss.seam.mock;
-
-import javax.security.auth.login.LoginException;
-
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.jaas.SeamLoginModule;
-
-public class MockLoginModule extends SeamLoginModule 
-{
-   @Override
-   public boolean login() throws LoginException
-   {
-      Identity.instance().addRole("foo");
-      
-      return true;
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockNavigationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockNavigationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockNavigationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,15 +0,0 @@
-package org.jboss.seam.mock;
-
-import javax.faces.application.NavigationHandler;
-import javax.faces.context.FacesContext;
-
-public class MockNavigationHandler extends NavigationHandler
-{
-
-   @Override
-   public void handleNavigation(FacesContext context, String action, String outcome)
-   {
-
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockRenderKit.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockRenderKit.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockRenderKit.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,47 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.io.OutputStream;
-import java.io.Writer;
-
-import javax.faces.context.ResponseStream;
-import javax.faces.context.ResponseWriter;
-import javax.faces.render.RenderKit;
-import javax.faces.render.Renderer;
-import javax.faces.render.ResponseStateManager;
-
-public class MockRenderKit extends RenderKit 
-{
-   
-   public static final MockRenderKit INSTANCE = new MockRenderKit();
-
-   @Override
-   public void addRenderer(String x, String y, Renderer renderer) 
-   {
-       // Do nothing
-   }
-
-   @Override
-   public Renderer getRenderer(String x, String y) 
-   {
-      return null;
-   }
-
-   @Override
-   public ResponseStateManager getResponseStateManager() 
-   {
-      return new MockResponseStateManager();
-   }
-
-   @Override
-   public ResponseWriter createResponseWriter(Writer writer, String x, String y) 
-   {
-      return new MockResponseWriter();
-   }
-   
-   @Override
-   public ResponseStream createResponseStream(OutputStream stream) 
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockRequestDispatcher.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,95 +0,0 @@
-/*
- * Copyright 2002-2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.seam.mock;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-
-/**
- * Mock implementation of the {@link javax.servlet.RequestDispatcher} interface.
- * <p/>
- * <p>Used for testing the web framework; typically not necessary for
- * testing application controllers.
- *
- * @author Rod Johnson
- * @author Juergen Hoeller
- * @since 1.0.2
- */
-public class MockRequestDispatcher implements RequestDispatcher
-{
-
-   private final Log logger = LogFactory.getLog(getClass());
-
-   private final String url;
-
-
-   /**
-    * Create a new MockRequestDispatcher for the given URL.
-    *
-    * @param url the URL to dispatch to.
-    */
-   public MockRequestDispatcher(String url)
-   {
-      this.url = url;
-   }
-
-
-   public void forward(ServletRequest request, ServletResponse response)
-   {
-      if (response.isCommitted())
-      {
-         throw new IllegalStateException("Cannot perform forward - response is already committed");
-      }
-      getMockHttpServletResponse(response).setForwardedUrl(this.url);
-      if (logger.isDebugEnabled())
-      {
-         logger.debug("MockRequestDispatcher: forwarding to URL [" + this.url + "]");
-      }
-   }
-
-   public void include(ServletRequest request, ServletResponse response)
-   {
-      getMockHttpServletResponse(response).setIncludedUrl(this.url);
-      if (logger.isDebugEnabled())
-      {
-         logger.debug("MockRequestDispatcher: including URL [" + this.url + "]");
-      }
-   }
-
-   /**
-    * Obtain the underlying EnhancedMockHttpServletResponse,
-    * unwrapping {@link javax.servlet.http.HttpServletResponseWrapper} decorators if necessary.
-    */
-   protected EnhancedMockHttpServletResponse getMockHttpServletResponse(ServletResponse response)
-   {
-      if (response instanceof EnhancedMockHttpServletResponse)
-      {
-         return (EnhancedMockHttpServletResponse) response;
-      }
-      if (response instanceof HttpServletResponseWrapper)
-      {
-         return getMockHttpServletResponse(((HttpServletResponseWrapper) response).getResponse());
-      }
-      throw new IllegalArgumentException("MockRequestDispatcher requires MockHttpServletResponse");
-	}
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockResponseStateManager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockResponseStateManager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockResponseStateManager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,37 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.io.IOException;
-
-import javax.faces.application.StateManager.SerializedView;
-import javax.faces.context.FacesContext;
-import javax.faces.render.ResponseStateManager;
-
- at SuppressWarnings("deprecation")
-public class MockResponseStateManager extends ResponseStateManager 
-{
-
-   @Override
-   public Object getComponentStateToRestore(FacesContext ctx) 
-   {
-      return new Object();
-   }
-
-   @Override
-   public Object getTreeStructureToRestore(FacesContext ctx, String x) 
-   {
-      return new Object();
-   }
-
-   @Override
-   public void writeState(FacesContext ctx, SerializedView viewState) throws IOException 
-   {
-      
-   }
-   
-   @Override
-   public boolean isPostback(FacesContext context)
-   {
-      return context.getExternalContext().getRequestParameterMap().containsKey(ResponseStateManager.VIEW_STATE_PARAM);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockResponseWriter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockResponseWriter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockResponseWriter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,162 +0,0 @@
- package org.jboss.seam.mock;
-
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.ResponseWriter;
-
-public class MockResponseWriter extends ResponseWriter
-{
-
-   private Writer writer; 
-    
-   public MockResponseWriter(Writer writer)
-   {
-       this.writer = writer;
-   }
-   
-   public MockResponseWriter()
-   {
-       this.writer = new StringWriter();
-   }
-   
-   @Override
-   public ResponseWriter cloneWithWriter(Writer writer)
-   {
-      return new MockResponseWriter(writer);
-   }
-
-   @Override
-   public void endDocument() throws IOException
-   {
-      // Do nothing
-   }
-
-   @Override
-   public void endElement(String element) throws IOException
-   {
-      // Do nothing
-   }
-
-   @Override
-   public void flush() throws IOException
-   {
-      writer.flush();
-
-   }
-
-   @Override
-   public String getCharacterEncoding()
-   {
-      return null;
-   }
-
-   @Override
-   public String getContentType()
-   {
-      return null;
-   }
-
-   @Override
-   public void startDocument() throws IOException
-   {
-      // Do nothing
-   }
-
-   @Override
-   public void startElement(String element, UIComponent component) throws IOException
-   {
-      // Do nothing
-   }
-
-   @Override
-   public void writeAttribute(String attribute, Object object, String string) throws IOException
-   {
-      // Do nothing
-   }
-
-   @Override
-   public void writeComment(Object object) throws IOException
-   {
-      // TODO Do nothing
-
-   }
-
-   @Override
-   public void writeText(Object value, String string) throws IOException
-   {
-       if (value == null)
-       {
-          throw new NullPointerException("Text must not be null.");
-       }
-       String strValue = value.toString();
-       write(strValue);
-   }
-
-   @Override
-   public void writeText(char[] chars, int start, int end) throws IOException
-   {
-       if (chars== null)
-       {
-          throw new NullPointerException("cbuf name must not be null");
-       }
-       if (chars.length < start + end)
-       {
-          throw new IndexOutOfBoundsException((start + end) + " > " + chars.length);
-       }
-       String strValue = new String(chars, start, end);
-       write(strValue);
-   }
-
-   @Override
-   public void writeURIAttribute(String attribute, Object object, String string) throws IOException
-   {
-      // Do nothing
-
-   }
-
-   @Override
-   public void close() throws IOException
-   {
-      writer.close();
-
-   }
-
-   @Override
-   public void write(char[] chars, int start, int end) throws IOException
-   {
-       writer.write(chars, start, end);
-   }
-
-   @Override
-   public void write(String str) throws IOException
-   {
-       writer.write(str);
-   }
-   
-   @Override
-   public void write(int c) throws IOException
-   {
-      writer.write(c);
-   }
-
-   @Override
-   public void write(char cbuf[]) throws IOException
-   {
-      writer.write(cbuf);
-   }
-   
-   @Override
-   public void write(String str, int off, int len) throws IOException
-   {
-      writer.write(str, off, len);
-   }
-   
-   public Writer getWriter()
-   {
-       return this.writer;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockSecureEntity.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockSecureEntity.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockSecureEntity.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,47 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-
-/**
- * Used by security unit tests
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.mock.mockSecureEntity")
- at Install(false)
- at Entity
-public class MockSecureEntity implements Serializable
-{
-   private static final long serialVersionUID = -6885685305122412324L;
-
-   private Integer id;
-
-   private String value;
-
-   @Id
-   public Integer getId()
-   {
-      return id;
-   }
-
-   public void setId(Integer id)
-   {
-      this.id = id;
-   }
-
-   public String getValue()
-   {
-      return value;
-   }
-
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockServletContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockServletContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockServletContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,326 +0,0 @@
-//$Id: MockServletContext.java 9513 2008-11-06 03:09:55Z shane.bryzak at jboss.com $
-package org.jboss.seam.mock;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.IteratorEnumeration;
-import org.jboss.seam.util.XML;
-
-public class MockServletContext implements ServletContext
-{
-
-   private transient LogProvider log = Logging.getLogProvider(MockServletContext.class);
-   
-   private Map<String, String> initParameters = new HashMap<String, String>();
-   private Map<String, Object> attributes = new HashMap<String, Object>();
-   
-   private File webappRoot;
-   private File webInfRoot;
-   private File webInfClassesRoot;
-   
-   public MockServletContext()
-   {
-      try
-      {
-         URL webxml = getClass().getResource("/WEB-INF/web.xml");
-         if (webxml != null)
-         {
-            webInfRoot = new File(webxml.toURI()).getParentFile();
-            if (webInfRoot != null)
-            {
-               webInfClassesRoot = new File(webInfRoot.getParentFile().getPath() + "/classes");
-               webappRoot = webInfRoot.getParentFile();
-            }
-            // call processing of context parameters
-            processContextParameters(webxml);
-         }
-         else
-         {
-            webappRoot = new File(getClass().getResource("/.").toURI());
-         }
-      }
-      catch (URISyntaxException e)
-      {
-         log.warn("Unable to find web.xml", e);
-      }
-   }
-   
-   private void processContextParameters(URL webXML)
-   {
-      try
-      {
-         Element root = XML.getRootElementSafely(webXML.openStream());         
-         for (Element element : (List<Element>) root.elements("context-param"))
-         {
-            getInitParameters().put(element.elementText("param-name"), element.elementText("param-value"));
-         }
-      }
-      catch (IOException e) 
-      {
-         throw new RuntimeException("Error parsing web.xml", e);
-      }
-      catch (DocumentException e)
-      {
-         throw new RuntimeException("Error parsing web.xml", e);
-      }
-      
-
-   }
-   
-   public Map<String, String> getInitParameters()
-   {
-      return initParameters;
-   }
-   
-   public Map<String, Object> getAttributes()
-   {
-      return attributes;
-   }
-   
-   public ServletContext getContext(String name)
-   {
-      return this;
-   }
-   
-   public int getMajorVersion()
-   {
-      return 2;
-   }
-   
-   public int getMinorVersion()
-   {
-      return 4;
-   }
-
-   public String getMimeType(String arg0)
-   {
-      return null;
-   }
-   
-   public Set getResourcePaths(String name)
-   {
-      Enumeration<URL> enumeration = null;
-      try
-      {
-         enumeration = getClass().getClassLoader().getResources("WEB-INF");
-      }
-      catch (IOException e)
-      {
-         throw new RuntimeException("Error finding webroot.", e);
-      }
-      Set<String> result = new HashSet<String>();
-      while (enumeration.hasMoreElements())
-      {
-         URL url = enumeration.nextElement();
-         File rootFile = new File(url.getPath()).getParentFile();
-         File newFile = new File(rootFile.getPath() + name);
-         File[] files = newFile.listFiles();
-         if (files != null)
-         {
-            addPaths(result, files, rootFile.getPath());
-         }
-      }
-      return result;
-   }
-   
-   private static void addPaths(Set<String> result, File[] files, String rootPath)
-   {
-      for (File file : files)
-      {
-         String filePath = file.getPath().substring(rootPath.length()).replace('\\', '/');
-         if (file.isDirectory())
-         {
-            result.add(filePath + "/");
-         }
-         else
-         {
-            result.add(filePath);
-         }
-      }
-   }
-
-   /**
-    * Get the URL for a particular resource that is relative to the web app root
-    * directory.
-    * 
-    * @param name The name of the resource to get
-    * @return The resource, or null if resource not found
-    * @throws MalformedURLException If the URL is invalid
-    */
-   public URL getResource(String name) throws MalformedURLException
-   {
-      File file = getFile(name, webappRoot);
-      
-      if (file == null)
-      {
-         file = getFile(name, webInfRoot);
-      }
-      
-      if (file == null)
-      {
-         file = getFile(name, webInfClassesRoot);
-      }
-      
-      if (file != null)
-      {
-         return file.toURI().toURL();
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   private static File getFile(String name, File root)
-   {
-      if (root == null)
-      {
-         return null;
-      }
-      
-      if (name.startsWith("/"))
-      {
-         name = name.substring(1);
-      }
-      
-      File f = new File(root, name);
-      if (!f.exists())
-      {
-         return null;
-      }
-      else
-      {
-         return f;
-      }
-   }
-
-   public InputStream getResourceAsStream(String name)
-   {
-      return getClass().getResourceAsStream(name);
-   }
-
-   public RequestDispatcher getRequestDispatcher(String url)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public RequestDispatcher getNamedDispatcher(String name)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Servlet getServlet(String name) throws ServletException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Enumeration getServlets()
-   {
-      return null;
-   }
-
-   public Enumeration getServletNames()
-   {
-      return null;
-   }
-
-   public void log(String msg)
-   {
-
-   }
-
-   public void log(Exception ex, String msg)
-   {
-
-   }
-
-   public void log(String msg, Throwable ex)
-   {
-
-   }
-
-   public String getRealPath(String relativePath)
-   {
-      if (webappRoot != null)
-      {
-         return webappRoot.getAbsolutePath() + relativePath;
-      }
-      else
-      {
-         return relativePath;
-      }
-   }
-
-   public String getServerInfo()
-   {
-      return null;
-   }
-
-   public String getInitParameter(String param)
-   {
-      return initParameters.get(param);
-   }
-
-   public Enumeration getInitParameterNames()
-   {
-      return new IteratorEnumeration(initParameters.keySet().iterator());
-   }
-
-   public Object getAttribute(String att)
-   {
-      return attributes.get(att);
-   }
-
-   public Enumeration getAttributeNames()
-   {
-      return new IteratorEnumeration(attributes.keySet().iterator());
-   }
-
-   public void setAttribute(String att, Object value)
-   {
-      if (value == null)
-      {
-         attributes.remove(value);
-      }
-      else
-      {
-         attributes.put(att, value);
-      }
-   }
-
-   public void removeAttribute(String att)
-   {
-      attributes.remove(att);
-   }
-
-   public String getServletContextName()
-   {
-      return "Mock";
-   }
-
-   public String getContextPath()
-   {
-      return null;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockStateManager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockStateManager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockStateManager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.io.IOException;
-
-import javax.faces.application.StateManager;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-
- at SuppressWarnings("deprecation")
-public class MockStateManager extends StateManager 
-{
-   
-   @Override
-   public Object saveView(FacesContext ctx) {
-      return null;
-   }
-   
-   @Override
-   public void writeState(FacesContext ctx, Object state) throws IOException {}
-   
-   @Override
-   public SerializedView saveSerializedView(FacesContext ctx) 
-   {
-      return null;
-   }
-
-   @Override
-   protected Object getTreeStructureToSave(FacesContext ctx) 
-   {
-      return null;
-   }
-
-   @Override
-   protected Object getComponentStateToSave(FacesContext ctx) 
-   {
-      return null;
-   }
-
-   @Override
-   public void writeState(FacesContext ctx, SerializedView sv)
-         throws IOException {}
-
-   @Override
-   public UIViewRoot restoreView(FacesContext ctx, String x, String y) 
-   {
-      return null;
-   }
-
-   @Override
-   protected UIViewRoot restoreTreeStructure(FacesContext ctx, String x, String y) 
-   {
-      return null;
-   }
-
-   @Override
-   protected void restoreComponentState(FacesContext ctx, UIViewRoot viewRoot, String x) {}
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockTransport.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockTransport.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockTransport.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,65 +0,0 @@
-package org.jboss.seam.mock;
-
-import javax.mail.Address;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.URLName;
-import javax.mail.internet.MimeMessage;
-
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Provides a MockTransport for integration testing Seam Mail.
- * {@link MockTransport#getMailMessage()} returns the most recently rendered 
- * message sent using the MockTransport.
- * 
- * To enable the mock transport, set the mailSession.transport property to mock
- * in components.properties.
- * 
- * @see javax.mail.Transport
- *
- * @author Pete Muir
- *
- */
-public class MockTransport extends Transport 
-{
-
-    private static final String VAR_NAME = "org.jboss.seam.mock.mailMessage";
-    
-    public MockTransport(Session session, URLName urlname) 
-    {
-        super(session, urlname);
-    }
-
-    @Override
-    public void sendMessage(Message message, Address[] recipients)
-            throws MessagingException 
-    {
-        Contexts.getApplicationContext().set(VAR_NAME, message);
-    }
-    
-    /**
-     * Get the most recently rendered message sent using the MockTransport.
-     */
-    public static void clearMailMessage()
-    {
-        Contexts.getApplicationContext().remove(VAR_NAME);
-    }
-    
-    /**
-     * Get the most recently rendered message sent using the MockTransport.
-     */
-    public static MimeMessage getMailMessage()
-    {
-        return (MimeMessage) Contexts.getApplicationContext().get(VAR_NAME);
-    }
-    
-    @Override
-    public void connect() throws MessagingException
-    {
-        // No-op
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockViewHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockViewHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockViewHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,91 +0,0 @@
-package org.jboss.seam.mock;
-
-import java.io.IOException;
-import java.util.Locale;
-
-import javax.faces.FacesException;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.seam.util.Strings;
-
-public class MockViewHandler extends ViewHandler {
-
-	private final Log logger = LogFactory.getLog(getClass());
-	
-	@Override
-	public Locale calculateLocale(FacesContext ctx) {
-		return Locale.getDefault();
-	}
-
-	@Override
-	public String calculateRenderKitId(FacesContext ctx) {
-		return null;
-	}
-
-	@Override
-	public UIViewRoot createView(FacesContext ctx, String viewId) {
-		UIViewRoot viewRoot = new UIViewRoot();
-      viewRoot.setViewId(viewId);
-      //TODO: set locale?
-      return viewRoot;
-	}
-
-	@Override
-	public String getActionURL(FacesContext ctx, String viewId)
-   {
-      String contextPath = ctx.getExternalContext().getRequestContextPath();
-      String pathInfo = ctx.getExternalContext().getRequestPathInfo();
-      String servletPath = ctx.getExternalContext().getRequestServletPath(); 
-      
-      if (Strings.isEmpty(pathInfo))
-      {
-         int sploc = servletPath.lastIndexOf('.');
-         if (sploc < 0)
-         {
-        	logger.warn("You should catch the exception before Seam", new IllegalArgumentException("no file extension in servlet path: " + servletPath));
-        	// in case of Servlet exception which is not mapped and handled by Seam
-        	return contextPath + viewId;            
-         }
-         return contextPath + getViewIdSansSuffix(viewId) + servletPath.substring(sploc);
-
-      }
-      else
-      {
-         return contextPath + (servletPath!=null?servletPath : "") + viewId;
-      }
-   }
-
-	private static String getViewIdSansSuffix(String viewId)
-	{
-	   int loc = viewId.lastIndexOf('.');
-      if (loc < 0)
-      {
-         throw new IllegalArgumentException("no file extension in view id: " + viewId);
-      }
-      return viewId.substring(0, loc);
-	}
-
-	@Override
-	public String getResourceURL(FacesContext ctx, String url) 
-   {
-		return url;
-	}
-
-	@Override
-	public void renderView(FacesContext ctx, UIViewRoot viewRoot)
-			throws IOException, FacesException {}
-
-	@Override
-	public UIViewRoot restoreView(FacesContext ctx, String id) 
-   {
-		return null;
-	}
-
-	@Override
-	public void writeState(FacesContext ctx) throws IOException {}
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ResourceRequestEnvironment.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ResourceRequestEnvironment.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ResourceRequestEnvironment.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,267 +0,0 @@
-package org.jboss.seam.mock;
-
-import org.jboss.seam.servlet.SeamResourceServlet;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.Cookie;
-import javax.servlet.ServletException;
-import javax.servlet.ServletResponse;
-import javax.servlet.ServletRequest;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import java.util.Collections;
-import java.util.Set;
-import java.util.List;
-import java.util.Map;
-import java.util.Enumeration;
-import java.security.Principal;
-import java.io.IOException;
-
-/**
- * Executes (through local calls, not TCP sockets) an HTTP request in a unit test, passing it through
- * the Seam resource handlers and filters.
- *
- * <p>
- * This class is supposed to be used <b>within</b> a <tt>SeamTest</tt>, in fact, you need
- * to pass an instance of <tt>SeamTest</tt> into its constructor. This prepares the environment
- * for the resource request processing. You can either share an instance of the environment between
- * all your test methods (prepare it in <tt>&#064;BeforeClass</tt>) or you can create a new instance
- * for each <tt>ResourceRequest</tt>:
- * </p>
- *
- * <pre>
- * import org.jboss.seam.mock.ResourceRequestEnvironment;
- * import org.jboss.seam.mock.EnhancedMockHttpServletRequest;
- * import org.jboss.seam.mock.EnhancedMockHttpServletResponse;
- * import static org.jboss.seam.mock.ResourceRequestEnvironment.ResourceRequest;
- * import static org.jboss.seam.mock.ResourceRequestEnvironment.Method;
- *
- * public class MyTest extends SeamTest {
- *
- *    ResourceRequestEnvironment sharedEnvironment;
- *
- *    &#064;BeforeClass
- *    public void prepareSharedEnvironment() throws Exception {
- *        sharedEnvironment = new ResourceRequestEnvironment(this) {
- *             &#064;Override
- *             public Map<String, Object> getDefaultHeaders() {
- *                return new HashMap<String, Object>() {{
- *                    put("Accept", "text/plain");
- *                }};
- *             }
- *          };
- *    }
- *
- *    &#064;Test
- *    public void test() throws Exception
- *    {
- *       //Not shared: new ResourceRequest(new ResourceRequestEnvironment(this), Method.GET, "/my/relative/uri)
- *
- *       new ResourceRequest(sharedEnvironment, Method.GET, "/my/relative/uri)
- *       {
- *
- *          &#064;Override
- *          protected void prepareRequest(EnhancedMockHttpServletRequest request)
- *          {
- *             request.addQueryParameter("foo", "123");
- *             request.addHeader("Accept-Language", "en_US, de");
- *          }
- *
- *          &#064;Override
- *          protected void onResponse(EnhancedMockHttpServletResponse response)
- *          {
- *             assert response.getStatus() == 200;
- *             assert response.getContentAsString().equals("foobar");
- *          }
- *
- *       }.run();
- *    }
- *
- * }
- * </pre>
- * <p>
- * Note that in a <tt>SeamTest</tt> the (mock) HTTP session is always shared between all requests in a particular test
- * method. Each test method however executes with a new (mock) HTTP session. Design your tests accordingly, this is not
- * configurable.
- * </p>
- * <p>
- * <b>IMPORTANT: A <tt>ResourceRequest</tt> has to be executed in a <tt>@Test</tt> method or in a
- * <tt>@BeforeMethod</tt> callback. You can not execute it in any other callback, such * as <tt>@BeforeClass</tt>.
- * </p>
- *
- * @author Christian Bauer
- */
-public class ResourceRequestEnvironment
-{
-
-   public enum Method
-   {
-      GET, PUT, POST, DELETE, HEAD, OPTIONS
-   }
-
-   final protected AbstractSeamTest seamTest;
-   final protected SeamResourceServlet resourceServlet;
-
-   public ResourceRequestEnvironment(AbstractSeamTest seamTest)
-   {
-      this.seamTest = seamTest;
-      resourceServlet = new SeamResourceServlet();
-      try {
-         resourceServlet.init(
-               new ServletConfig()
-               {
-                  public String getServletName()
-                  {
-                     return "Seam Resource Servlet";
-                  }
-
-                  public ServletContext getServletContext()
-                  {
-                     return ResourceRequestEnvironment.this.seamTest.servletContext;
-                  }
-
-                  public String getInitParameter(String s)
-                  {
-                     return null;
-                  }
-
-                  public Enumeration getInitParameterNames()
-                  {
-                     return null;
-                  }
-               }
-         );
-      } catch (Exception ex) {
-         throw new RuntimeException(ex);
-      }
-   }
-
-   public static class ResourceRequest
-   {
-
-      final private ResourceRequestEnvironment environment;
-      private Method httpMethod;
-      private String requestPath;
-      private EnhancedMockHttpServletRequest request;
-      private EnhancedMockHttpServletResponse response;
-
-      public ResourceRequest(ResourceRequestEnvironment environment, Method httpMethod, String requestPath)
-      {
-         this.environment = environment;
-         this.httpMethod = httpMethod;
-         this.requestPath = environment.getServletPath() + (requestPath.startsWith("/") ? requestPath : "/" + requestPath);
-      }
-
-      public void run() throws Exception
-      {
-         init();
-         prepareRequest(request);
-         environment.seamTest.seamFilter.doFilter(request, response, new FilterChain()
-         {
-            public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException
-            {
-               environment.resourceServlet.service(request, response);
-            }
-         });
-         environment.seamTest.seamFilter.destroy();
-         onResponse(getResponse());
-      }
-
-      protected void init()
-      {
-         request = createRequest();
-         response = createResponse();
-
-         request.setMethod(httpMethod.toString());
-         request.setRequestURI(requestPath);
-
-         request.setServletPath(environment.getServletPath());
-
-         request.setCookies(getCookies().toArray(new Cookie[getCookies().size()]));
-
-         for (Map.Entry<String, Object> entry : environment.getDefaultHeaders().entrySet())
-         {
-            request.addHeader(entry.getKey(), entry.getValue());
-         }
-
-         request.setUserPrincipal(
-               new Principal()
-               {
-                  public String getName()
-                  {
-                     return getPrincipalName();
-                  }
-               }
-         );
-         for (String role : getPrincipalRoles())
-         {
-            request.addUserRole(role);
-         }
-
-         // Use the (mock) HttpSession that Seam uses, see AbstractSeamTest
-         request.setSession(environment.seamTest.session);
-
-      }
-
-      protected EnhancedMockHttpServletRequest createRequest()
-      {
-         return new EnhancedMockHttpServletRequest();
-      }
-
-      protected EnhancedMockHttpServletResponse createResponse()
-      {
-         return new EnhancedMockHttpServletResponse();
-      }
-
-      protected Map<String, String> getRequestQueryParameters()
-      {
-         return Collections.EMPTY_MAP;
-      }
-
-      protected List<Cookie> getCookies()
-      {
-         return Collections.EMPTY_LIST;
-      }
-
-      protected String getPrincipalName()
-      {
-         return null;
-      }
-
-      protected Set<String> getPrincipalRoles()
-      {
-         return Collections.EMPTY_SET;
-      }
-
-      protected void prepareRequest(EnhancedMockHttpServletRequest request)
-      {
-      }
-
-      protected void onResponse(EnhancedMockHttpServletResponse response)
-      {
-      }
-
-      public HttpServletRequest getRequest()
-      {
-         return request;
-      }
-
-      public EnhancedMockHttpServletResponse getResponse()
-      {
-         return response;
-      }
-
-   }
-
-   public String getServletPath()
-   {
-      return "/seam/resource";
-   }
-
-   public Map<String, Object> getDefaultHeaders()
-   {
-      return Collections.EMPTY_MAP;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/SeamTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/SeamTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/SeamTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.mock;
-
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.BeforeSuite;
-
-/**
- * Provides BaseSeamTest functionality for TestNG integration tests.
- * 
- * @author Gavin King
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @author Mike Youngstrom
- * @author <a href="http://community.jboss.org/people/jharting">Jozef Hartinger</a>
- */
-public class SeamTest extends AbstractSeamTest
-{
-   
-   @BeforeMethod
-   @Override
-   public void begin()
-   {
-      super.begin();
-   }
-
-   @AfterMethod
-   @Override
-   public void end()
-   {
-      super.end();
-   }
-   
-   /**
-    * Call this method within a test method to end the previous
-    * mock session and start another one. 
-    */
-   public void reset()
-   {
-      end();
-      begin();
-   }
-   
-   @Override
-   @BeforeClass
-   public void setupClass() throws Exception
-   {
-      super.setupClass();
-   }
-   
-   @Override
-   @AfterClass
-   public void cleanupClass() throws Exception
-   {
-      super.cleanupClass();
-   }
-   
-   @Override
-   @BeforeSuite
-   public void startSeam() throws Exception
-   {
-      super.startSeam();
-   }
-   
-   @Override
-   @AfterSuite
-   protected void stopSeam() throws Exception
-   {
-      super.stopSeam();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/ServletContextWrapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,147 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package org.jboss.seam.mock;
-
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-
-import org.jboss.seam.util.IteratorEnumeration;
-
-/**
- * Wraps a ServletContext with own attributes.
- *
- * @author Marek Schmidt
- */
-public class ServletContextWrapper implements ServletContext {
-   
-   private ServletContext delegate; 
-   
-   private Map<String, Object> attributes = new HashMap<String, Object>();
-   
-   public ServletContextWrapper(ServletContext delegate) {
-      this.delegate = delegate;
-   }
-
-   public Object getAttribute(String arg0) {
-      return attributes.get(arg0);
-   }
-
-   public Enumeration getAttributeNames() {
-      return new IteratorEnumeration(attributes.keySet().iterator());
-   }
-
-   public ServletContext getContext(String arg0) {
-      return delegate.getContext(arg0);
-   }
-
-   public String getContextPath() {
-      return delegate.getContextPath();
-   }
-
-   public String getInitParameter(String arg0) {
-      return delegate.getInitParameter(arg0);
-   }
-
-   public Enumeration getInitParameterNames() {
-      return delegate.getInitParameterNames();
-   }
-
-   public int getMajorVersion() {
-      return delegate.getMajorVersion();
-   }
-
-   public String getMimeType(String arg0) {
-      return delegate.getMimeType(arg0);
-   }
-
-   public int getMinorVersion() {
-      return delegate.getMinorVersion();
-   }
-
-   public RequestDispatcher getNamedDispatcher(String arg0) {
-      return delegate.getNamedDispatcher(arg0);
-   }
-
-   public String getRealPath(String arg0) {
-      return delegate.getRealPath(arg0);
-   }
-
-   public RequestDispatcher getRequestDispatcher(String arg0) {
-      return delegate.getRequestDispatcher(arg0);
-   }
-
-   public URL getResource(String arg0) throws MalformedURLException {
-      return delegate.getResource(arg0);
-   }
-
-   public InputStream getResourceAsStream(String arg0) {
-      InputStream ret = delegate.getResourceAsStream(arg0);
-      return ret;
-   }
-
-   public Set getResourcePaths(String arg0) {
-      return delegate.getResourcePaths(arg0);
-   }
-
-   public String getServerInfo() {
-      return delegate.getServerInfo();
-   }
-
-   public Servlet getServlet(String arg0) throws ServletException {
-      return delegate.getServlet(arg0);
-   }
-
-   public String getServletContextName() {
-      return "Wrap";
-   }
-
-   public Enumeration getServletNames() {
-      return delegate.getServletNames();
-   }
-
-   public Enumeration getServlets() {
-      return delegate.getServlets();
-   }
-
-   public void log(String arg0) {
-      delegate.log(arg0);
-   }
-
-   public void log(Exception arg0, String arg1) {
-      delegate.log(arg0, arg1);
-   }
-
-   public void log(String arg0, Throwable arg1) {
-      delegate.log(arg0, arg1);
-   }
-
-   public void removeAttribute(String arg0) {
-      attributes.remove(arg0);
-   }
-
-   public void setAttribute(String key, Object value) {
-      if (value == null)
-      {
-         attributes.remove(key);
-      }
-      else
-      {
-         attributes.put(key, value);
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,8 +0,0 @@
-/**
- * An integration test harness for Seam applications and
- * Seam components, with built-in support for TestNG.
- * 
- * @see org.jboss.seam.mock.SeamTest 
- * @see org.jboss.seam.mock.AbstractSeamTest 
- */
-package org.jboss.seam.mock;
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Action.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Action.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Action.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,61 +0,0 @@
-package org.jboss.seam.navigation;
-
-import org.jboss.seam.core.Expressions.MethodExpression;
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-/**
- * Metadata for an &lt;action/&gt; in pages.xml
- * 
- * @author Gavin King
- *
- */
-public class Action
-{
-   private MethodExpression methodExpression;
-   private ValueExpression valueExpression;
-   private String outcome;
-   private boolean onPostback = true;
-   
-   public boolean isExecutable(boolean postback)
-   {
-      return (!postback || (postback && onPostback)) &&
-         (valueExpression == null || Boolean.TRUE.equals( valueExpression.getValue()));
-   }
-   
-   public MethodExpression getMethodExpression()
-   {
-      return methodExpression;
-   }
-   public void setMethodExpression(MethodExpression methodExpression)
-   {
-      this.methodExpression = methodExpression;
-   }
-   
-   public ValueExpression getValueExpression()
-   {
-      return valueExpression;
-   }
-   public void setValueExpression(ValueExpression valueExpression)
-   {
-      this.valueExpression = valueExpression;
-   }
-
-   public String getOutcome()
-   {
-      return outcome;
-   }
-   public void setOutcome(String outcome)
-   {
-      this.outcome = outcome;
-   }
-
-   public boolean isOnPostback()
-   {
-      return onPostback;
-   }
-
-   public void setOnPostback(boolean onPostback)
-   {
-      this.onPostback = onPostback;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ConversationControl.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ConversationControl.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ConversationControl.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,171 +0,0 @@
-package org.jboss.seam.navigation;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.core.ConversationEntries;
-import org.jboss.seam.core.ConversationEntry;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.pageflow.Pageflow;
-/**
- * 
- * Demarcation of the conversation in pages.xml
- *
- * @author Gavin King
- */
-public class ConversationControl
-{
-   private boolean isBeginConversation;
-   private boolean isEndConversation;
-   private boolean isEndConversationBeforeRedirect;
-   private boolean isEndRootConversation;
-   private boolean join;
-   private boolean nested;
-   private FlushModeType flushMode;
-   private String pageflow;
-   private ValueExpression<Boolean> beginConversationCondition;
-   private ValueExpression<Boolean> endConversationCondition;
-   private String conversationName;
-   public boolean isBeginConversation()
-   {
-      return isBeginConversation;
-   }
-   public void setBeginConversation(boolean isBeginConversation)
-   {
-      this.isBeginConversation = isBeginConversation;
-   }
-   public boolean isEndConversation()
-   {
-      return isEndConversation;
-   }
-   public void setEndConversation(boolean isEndConversation)
-   {
-      this.isEndConversation = isEndConversation;
-   }
-   
-   public void beginOrEndConversation()
-   {
-      if ( endConversation() )
-      {
-         if(isEndRootConversation)
-         {
-            Manager.instance().endRootConversation(isEndConversationBeforeRedirect);
-         }
-         else
-         {
-            Manager.instance().endConversation(isEndConversationBeforeRedirect);
-         }
-      }
-      if ( beginConversation() )
-      {
-         if (conversationName != null)
-         {
-            ConversationIdParameter param = Pages.instance().getConversationIdParameter(conversationName);
-            
-            ConversationEntry ce = ConversationEntries.instance().getConversationEntry(param.getConversationId());
-            if (ce != null)
-            {
-               ce.redirect();
-               return;
-            }            
-         }
-         
-         boolean begun = Conversation.instance().begin(join, nested);
-         if (begun)
-         {
-            if ( flushMode!=null )
-            {
-               Conversation.instance().changeFlushMode(flushMode);
-            }
-            if ( pageflow!=null )
-            {
-               Pageflow.instance().begin(pageflow);
-            }
-         }
-      }
-   }
-   private boolean beginConversation()
-   {
-      return isBeginConversation && 
-         (beginConversationCondition==null || Boolean.TRUE.equals( beginConversationCondition.getValue() ) );
-   }
-   private boolean endConversation()
-   {
-      return isEndConversation && 
-         (endConversationCondition==null || Boolean.TRUE.equals( endConversationCondition.getValue() ) );
-   }
-   public FlushModeType getFlushMode()
-   {
-      return flushMode;
-   }
-   public void setFlushMode(FlushModeType flushMode)
-   {
-      this.flushMode = flushMode;
-   }
-   public boolean isJoin()
-   {
-      return join;
-   }
-   public void setJoin(boolean join)
-   {
-      this.join = join;
-   }
-   public boolean isNested()
-   {
-      return nested;
-   }
-   public void setNested(boolean nested)
-   {
-      this.nested = nested;
-   }
-   public String getPageflow()
-   {
-      return pageflow;
-   }
-   public void setPageflow(String pageflow)
-   {
-      this.pageflow = pageflow;
-   }
-   public boolean isEndConversationBeforeRedirect()
-   {
-      return isEndConversationBeforeRedirect;
-   }
-   public void setEndConversationBeforeRedirect(boolean isEndConversationBeforeRedirect)
-   {
-      this.isEndConversationBeforeRedirect = isEndConversationBeforeRedirect;
-   }
-   public boolean isEndRootConversation()
-   {
-      return isEndConversationBeforeRedirect;
-   }
-   public void setEndRootConversation(boolean isEndRootConversation)
-   {
-      this.isEndRootConversation = isEndRootConversation;
-   }
-   public ValueExpression<Boolean> getBeginConversationCondition()
-   {
-      return beginConversationCondition;
-   }
-   public void setBeginConversationCondition(ValueExpression<Boolean> beginConversationCondition)
-   {
-      this.beginConversationCondition = beginConversationCondition;
-   }
-   public ValueExpression<Boolean> getEndConversationCondition()
-   {
-      return endConversationCondition;
-   }
-   public void setEndConversationCondition(ValueExpression<Boolean> endConversationCondition)
-   {
-      this.endConversationCondition = endConversationCondition;
-   }
-   
-   public String getConversationName()
-   {
-      return conversationName;
-   }
-   
-   public void setConversationName(String conversationName)
-   {
-      this.conversationName = conversationName;
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ConversationIdParameter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ConversationIdParameter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ConversationIdParameter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-package org.jboss.seam.navigation;
-
-import java.util.Map;
-
-/**
- * A strategy for propagating conversations across links
- * and redirects
- * 
- */
-public interface ConversationIdParameter
-{
-   String getName();
-   String getParameterName();
-   String getParameterValue();
-   
-   // Performs any necessary conversions on the specified conversation ID to get the actual parameter value 
-   String getParameterValue(String value);
-   
-   String getConversationId();
-   String getInitialConversationId(Map parameters);
-   String getRequestConversationId(Map parameters);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Header.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Header.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Header.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,51 +0,0 @@
-package org.jboss.seam.navigation;
-
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-public class Header {
-    public String name;
-    public ValueExpression<Object> expression;
-    
-    public String getName() {
-        return name;
-    }
-    public void setName(String name) {
-        this.name = name;
-    }
-    public ValueExpression<Object> getValue() {
-        return expression;
-    }
-    public void setValue(ValueExpression<Object> valueExpression) {
-        this.expression = valueExpression;
-    }
-    
-    public void sendHeader(HttpServletResponse response) {
-        sendHeader(response, name, evaluateValue());
-    }
-    
-    private String evaluateValue() {
-        String result = "";
-        
-        if (expression != null) {
-            Object value = expression.getValue();
-       
-            if (value != null) {
-                result = value.toString(); 
-            }
-        }
-        
-        return result;
-    }
-    
-    
-    public static void sendHeader(HttpServletResponse response, 
-                                  String name,
-                                  String value)
-    {
-        if (response !=null && name !=null && value != null) {
-            response.addHeader(name, value);
-        }
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Input.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Input.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Input.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,16 +0,0 @@
-package org.jboss.seam.navigation;
-
-import org.jboss.seam.Component;
-
-
-public class Input extends Put
-{
-   public void in()
-   {
-      Object object = getScope()==null ?
-               Component.getInstance( getName() ) :
-               getScope().getContext().get( getName() );
-      getValue().setValue( object );
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/NaturalConversationIdParameter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/NaturalConversationIdParameter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/NaturalConversationIdParameter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,84 +0,0 @@
-package org.jboss.seam.navigation;
-
-import java.util.Map;
-
-import org.jboss.seam.core.ConversationPropagation;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-/**
- * A conversation parameter strategy for "natural" conversation ids.
- * Natural conversation ids are defined using &lt;conversation/&gt; in 
- * pages.xml. 
- *  
- * @author Shane Bryzak
- */
-public class NaturalConversationIdParameter implements ConversationIdParameter
-{
-   private String name;
-   private String parameterName;
-   private ValueExpression vb;
-   
-   public NaturalConversationIdParameter(String name, String paramName, String expression)
-   {
-      this.name = name;
-      this.parameterName = paramName;
-      
-      this.vb = expression != null ? 
-               Expressions.instance().createValueExpression(expression) : null;
-   }
-   
-   public String getName()
-   {
-      return name;
-   }
-   
-   public String getParameterName()
-   {
-      return parameterName;
-   }
-   
-   public String getInitialConversationId(Map parameters)
-   {
-      String id = getRequestConversationId(parameters);
-      return id==null ? getConversationId() : id;
-   }
-   
-   public String getRequestConversationId(Map parameters)
-   {
-      String value = ConversationPropagation.getRequestParameterValue(parameters, parameterName);
-      if (value==null)
-      {
-         return null;
-      }
-      else
-      {
-         return name + ':' + value;
-      }
-   }
-   
-   public String getConversationId()
-   {
-      return name + ':' + getParameterValue();
-   }
-
-   public String getParameterValue()
-   {
-      Object value = vb.getValue();
-      if (value==null)
-      {
-         throw new IllegalStateException("conversation id evaluated to null: " + name);
-      }
-      else
-      {
-         //TODO: use a JSF converter!
-         return vb.getValue().toString();
-      }
-   }
-   
-   public String getParameterValue(String value)
-   {
-      return value.startsWith(name + ":") ? value.substring(name.length() + 1) : value;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Navigation.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Navigation.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Navigation.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,65 +0,0 @@
-package org.jboss.seam.navigation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-public final class Navigation
-{
-   private ValueExpression<Object> outcome;
-   private List<Rule> rules = new ArrayList<Rule>();
-   private Rule rule;
-   
-   public List<Rule> getRules()
-   {
-      return rules;
-   }
-   
-   public void setOutcome(ValueExpression<Object> outcomeValueExpression)
-   {
-      this.outcome = outcomeValueExpression;
-   }
-   
-   public ValueExpression<Object> getOutcome()
-   {
-      return outcome;
-   }
-
-   public Rule getRule()
-   {
-      return rule;
-   }
-
-   public void setRule(Rule rule)
-   {
-      this.rule = rule;
-   }
-
-   public boolean navigate(FacesContext context, final String actionOutcomeValue)
-   {
-      String outcomeValue;
-      if ( getOutcome()==null )
-      {
-         outcomeValue = actionOutcomeValue;
-      }
-      else
-      {
-         Object value = getOutcome().getValue();
-         outcomeValue = value==null ? null : value.toString();
-      }
-      
-      for ( Rule rule: getRules() )
-      {
-         if ( rule.matches(outcomeValue) )
-         {
-            return rule.execute(context);
-         }
-      }
-      
-      return getRule().execute(context);
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/NavigationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/NavigationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/NavigationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam.navigation;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.faces.Navigator;
-
-/**
- * The result of a navigation rule.
- * 
- * @author Gavin King
- *
- */
-public abstract class NavigationHandler extends Navigator
-{
-   /**
-    * Go ahead and execute the navigation rule. 
-    */
-   public abstract boolean navigate(FacesContext context);
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Output.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Output.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Output.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,10 +0,0 @@
-package org.jboss.seam.navigation;
-
-public class Output extends Put
-{
-   public void out()
-   {
-      getScope().getContext().set( getName(), getValue().getValue() );
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Page.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Page.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Page.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,446 +0,0 @@
-package org.jboss.seam.navigation;
-
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.ResourceLoader;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.util.Strings;
-import org.jboss.seam.web.Pattern;
-
-/**
- * Metadata about page actions, page parameters, action navigation,
- * resource bundle, etc, for a particular JSF view id.
- */
-public final class Page
-{
-   public static final String RFC_1123_DATE = "EEE, dd MMM yyyy HH:mm:ss zzz";
-
-   private final String viewId;
-   private String description;
-   private Integer timeout;
-   private Integer concurrentRequestTimeout;
-   private ValueExpression<String> noConversationViewId;
-   private String resourceBundleName;
-   private boolean switchEnabled = true;
-   private boolean validateModel = true;
-   private List<Param> parameters = new ArrayList<Param>();
-   private List<Input> inputs = new ArrayList<Input>();
-   private List<Action> actions = new ArrayList<Action>();
-   private Map<String, Navigation> navigations = new HashMap<String, Navigation>();
-   private Navigation defaultNavigation;
-   private boolean conversationRequired;
-   private boolean loginRequired;
-   private ConversationControl conversationControl = new ConversationControl();
-   private TaskControl taskControl = new TaskControl();
-   private ProcessControl processControl = new ProcessControl();
-   private ConversationIdParameter conversationIdParameter;
-   private List<String> eventTypes = new ArrayList<String>();
-   private List<Pattern> rewritePatterns = new ArrayList<Pattern>();
-   private List<Header> httpHeaders = new ArrayList<Header>();
-   
-   private Integer expires;
-
-   /**
-    * The scheme (http/https) required by this page.
-    */
-   private String scheme;
-   
-   /**
-    * Indicates whether this view id has a security restriction.  
-    */
-   private boolean restricted;
-   
-   /**
-    * A security restriction expression to evaluate when requesting this view id.
-    * If the view is restricted but no restriction expression is set, the implied
-    * permission restriction will be name="[viewid]", action="[get or post]" 
-    */
-   private String restriction;
-   
-   public Page(String viewId)
-   {
-      this.viewId = viewId;
-      if (viewId!=null)
-      {
-         if (viewId.equals("/debug.xhtml")) 
-         {
-             switchEnabled = false;
-         }
-         int loc = viewId.lastIndexOf('.');
-         if ( loc>0 && viewId.startsWith("/") )
-         {
-            this.setResourceBundleName( viewId.substring(1, loc) );
-         }
-      }
-      
-      conversationIdParameter = new SyntheticConversationIdParameter();
-   }
-   
-   public java.util.ResourceBundle getResourceBundle()
-   {
-      String resourceBundleName = getResourceBundleName();
-      if (resourceBundleName==null)
-      {
-         return null;
-      }
-      else
-      {
-          return ResourceLoader.instance().loadBundle(resourceBundleName);
-      }
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "Page(" + getViewId() + ")";
-   }
-   
-   public String getViewId()
-   {
-      return viewId;
-   }
-   
-   public String renderDescription()
-   {
-      return Interpolator.instance().interpolate( getDescription() );
-   }
-   
-   public void setDescription(String description)
-   {
-      this.description = description;
-   }
-   
-   public String getDescription()
-   {
-      return description;
-   }
-   
-   public void setTimeout(Integer timeout)
-   {
-      this.timeout = timeout;
-   }
-   
-   public Integer getTimeout()
-   {
-      return timeout;
-   }
-   
-   public void setConcurrentRequestTimeout(Integer concurrentRequestTimeout)
-   {
-      this.concurrentRequestTimeout = concurrentRequestTimeout;
-   }
-   
-   public Integer getConcurrentRequestTimeout()
-   {
-      return concurrentRequestTimeout;
-   }
-   
-   public void setNoConversationViewId(ValueExpression<String> noConversationViewId)
-   {
-      this.noConversationViewId = noConversationViewId;
-   }
-   
-   public ValueExpression<String> getNoConversationViewId()
-   {
-      return noConversationViewId;
-   }
-   
-   public void setResourceBundleName(String resourceBundleName)
-   {
-      this.resourceBundleName = resourceBundleName;
-   }
-   
-   public String getResourceBundleName()
-   {
-      return resourceBundleName;
-   }
-   
-   public void setSwitchEnabled(boolean switchEnabled)
-   {
-      this.switchEnabled = switchEnabled;
-   }
-   
-   public boolean isSwitchEnabled()
-   {
-      return switchEnabled;
-   }
-   
-   public void setValidateModel(boolean validateModel)
-   {
-      this.validateModel = validateModel;
-   }
-   
-   /**
-    * Indicates whether the model validator (Hibernate Validator) should be
-    * registered on the page parameters by default. The default is to add the
-    * model validator. This setting can be overridden per page parameter. If
-    * parameters are registered on the page programatically, this setting should
-    * be honored as the default.
-    */
-   public boolean isValidateModel()
-   {
-      return validateModel;
-   }
-   
-   public List<Param> getParameters()
-   {
-      return parameters;
-   }
-   
-   public Map<String, Navigation> getNavigations()
-   {
-      return navigations;
-   }
-   
-   public boolean hasDescription()
-   {
-      return description!=null;
-   }
-   
-   public boolean isConversationRequired()
-   {
-      return conversationRequired;
-   }
-   
-   public void setConversationRequired(boolean conversationRequired)
-   {
-      this.conversationRequired = conversationRequired;
-   }
-   
-   public Navigation getDefaultNavigation()
-   {
-      return defaultNavigation;
-   }
-   
-   public void setDefaultNavigation(Navigation defaultActionOutcomeMapping)
-   {
-      this.defaultNavigation = defaultActionOutcomeMapping;
-   }
-   
-   public ConversationControl getConversationControl()
-   {
-      return conversationControl;
-   }
-   
-   public TaskControl getTaskControl()
-   {
-      return taskControl;
-   }
-   
-   public ProcessControl getProcessControl()
-   {
-      return processControl;
-   }
-   
-   public List<Action> getActions()
-   {
-      return actions;
-   }
-   
-   private void checkPermission(FacesContext facesContext, String name)
-   {
-      if ( isRestricted() && Identity.isSecurityEnabled() )
-      {
-         // If no expression is configured, create a default one
-         if (restriction == null)
-         {
-            Identity.instance().checkPermission( Pages.getViewId(facesContext), name );
-         }
-         else
-         {
-            Identity.instance().checkRestriction(restriction);
-         }
-      }
-   }
-   
-   /**
-    * Check the restore permission.
-    */
-   public void postRestore(FacesContext facesContext)
-   {
-      checkPermission(facesContext, "restore");
-   }
-
-   /**
-    * Call page actions, in order they appear in XML, and
-    * handle conversation begin/end. Also check the 
-    * render permission.
-    */
-   public boolean preRender(FacesContext facesContext)
-   {
-      checkPermission(facesContext, "render");     
-     
-      sendHeaders(facesContext);
-      
-      boolean result = false;
-      
-      getConversationControl().beginOrEndConversation();
-      getTaskControl().beginOrEndTask();
-      getProcessControl().createOrResumeProcess();
-      
-      for ( Input in: getInputs() ) in.in();
-      
-      for (String eventType : eventTypes)
-      {
-         Events.instance().raiseEvent(eventType);
-      }
-   
-      for ( Action action: getActions() )
-      {
-         if ( action.isExecutable(facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext)) )
-         {
-            String outcome = action.getOutcome();
-            String fromAction = outcome;
-            
-            if (outcome==null)
-            {
-               fromAction = action.getMethodExpression().getExpressionString();
-               result = true;
-               outcome = Pages.toString( action.getMethodExpression().invoke() );
-               UIViewRoot oldViewRoot = facesContext.getViewRoot();
-               Pages.handleOutcome(facesContext, outcome, fromAction);
-               if (facesContext.getResponseComplete() || oldViewRoot != facesContext.getViewRoot()) {
-                  break;
-               }
-            }
-            else
-            {
-               UIViewRoot oldViewRoot = facesContext.getViewRoot();
-               Pages.handleOutcome(facesContext, outcome, fromAction);
-               if (facesContext.getResponseComplete() || oldViewRoot != facesContext.getViewRoot()) {
-                  break;
-               }
-            }
-         }
-      }
-      
-      return result;
-   }
-
-    private void sendHeaders(FacesContext facesContext) {
-        Object value = facesContext.getExternalContext().getResponse();
-        
-        if (value == null || !(value instanceof HttpServletResponse)) {
-            return;
-        }
-        
-        HttpServletResponse response = (HttpServletResponse) value;
-        for (Header header: httpHeaders) {
-            header.sendHeader(response);
-        }
-        
-        if (expires != null) {
-            Header.sendHeader(response, 
-                              "Expires", 
-                              rfc1123Date(new Date(System.currentTimeMillis()+expires*1000)));
-        }
-    }
-   
-    private String rfc1123Date(Date when) {
-        SimpleDateFormat format = new SimpleDateFormat(RFC_1123_DATE);
-       
-        return format.format(when);
-    }
-
-   public List<Input> getInputs()
-   {
-      return inputs;
-   }
-   
-   public boolean isRestricted()
-   {
-      return restricted;
-   }
-   
-   public void setRestricted(boolean restricted)
-   {
-      this.restricted = restricted;
-   }
-   public String getRestriction()
-   {
-      return restriction;
-   }
-   
-   public void setRestriction(String restriction)
-   {
-      this.restriction = restriction;
-   }
-
-   public boolean isLoginRequired()
-   {
-      return loginRequired;
-   }
-
-   public void setLoginRequired(boolean loginRequired)
-   {
-      this.loginRequired = loginRequired;
-   }
-   
-   public String getScheme()
-   {
-      return scheme;
-   }
-   
-   public void setScheme(String scheme)
-   {
-      this.scheme = scheme;
-   }
-   
-   public ConversationIdParameter getConversationIdParameter()
-   {
-      return conversationIdParameter;
-   }
-   
-   public void setConversationIdParameter(ConversationIdParameter param)
-   {
-      this.conversationIdParameter = param;
-   }
-
-   public List<String> getEventTypes()
-   {
-      return eventTypes;
-   }
-
-   public void addEventType(String eventType)
-   {
-      if (!Strings.isEmpty(eventType))
-      {
-         eventTypes.add(eventType);
-      }
-   }
-   
-   public List<Pattern> getRewritePatterns() 
-   {
-      return rewritePatterns;
-   }
-
-    //public void setRewritePatterns(List<String> rewritePatterns) {
-    //    this.rewritePatterns = rewritePatterns;
-    //} 
-
-    public void addRewritePattern(String value) {
-        Pattern pattern = new Pattern(viewId, value);
-        rewritePatterns.add(pattern);
-    }
-
-    public List<Header> getHeaders() {
-        return httpHeaders;
-    }
-
-    public void setExpires(Integer expires) {
-        this.expires = expires;   
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Pages.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Pages.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Pages.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1747 +0,0 @@
-package org.jboss.seam.navigation;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.application.FacesMessage.Severity;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.ConverterException;
-import javax.faces.model.DataModel;
-import javax.faces.validator.ValidatorException;
-import javax.servlet.http.HttpServletRequest;
-
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.MethodExpression;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.core.ResourceLoader;
-import org.jboss.seam.deployment.DotPageDotXmlDeploymentHandler;
-import org.jboss.seam.deployment.FileDescriptor;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.faces.Validation;
-import org.jboss.seam.international.StatusMessage;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.pageflow.Pageflow;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.NotLoggedInException;
-import org.jboss.seam.util.Resources;
-import org.jboss.seam.util.Strings;
-import org.jboss.seam.util.XML;
-import org.jboss.seam.web.Parameters;
-
-/**
- * Holds metadata for pages defined in pages.xml, including
- * page actions and page descriptions.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.navigation.pages")
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at Startup
-public class Pages
-{   
-   private static final LogProvider log = Logging.getLogProvider(Pages.class);
-
-   private ValueExpression<String> noConversationViewId;
-   private String loginViewId;
-     
-   private Integer httpPort;
-   private Integer httpsPort;
-   
-   private Map<String, Page> pagesByViewId;  
-   private Map<String, List<Page>> pageStacksByViewId;   
-   private Map<String, ConversationIdParameter> conversations;    
-   
-   private String[] resources = { "/WEB-INF/pages.xml" };
- 
-   private SortedSet<String> wildcardViewIds = new TreeSet<String>( 
-         new Comparator<String>() 
-         {
-            public int compare(String x, String y)
-            {
-               if ( x.length()<y.length() ) return -1;
-               if ( x.length()> y.length() ) return 1;
-               return x.compareTo(y);
-            }
-         } 
-      );
-
-   @Create
-   public void create()
-   {
-      if (DotPageDotXmlDeploymentHandler.instance() != null)
-      {
-          initialize(DotPageDotXmlDeploymentHandler.instance().getResources());
-      }
-      else
-      {
-          initialize();
-      }
-   }
-   
-   
-   
-   public void initialize()
-   {
-       initialize(null);
-   }
-   
-   public void initialize(Set<FileDescriptor> fileNames)
-   {
-      pagesByViewId = Collections.synchronizedMap(new HashMap<String, Page>());   
-      pageStacksByViewId = Collections.synchronizedMap(new HashMap<String, List<Page>>());   
-      conversations = Collections.synchronizedMap(new HashMap<String, ConversationIdParameter>());
-
-      for (String resource: resources) 
-      {
-         InputStream stream = ResourceLoader.instance().getResourceAsStream(resource);      
-         if (stream==null) 
-         {
-            log.debug("no pages.xml file found: " + resource);
-         } else {
-            log.debug("reading pages.xml file: " + resource);
-            try {
-                parse(stream);
-            } finally {
-                Resources.closeStream(stream);
-            }
-         }
-      }
-      
-      if (fileNames != null)
-      {
-          parsePages(fileNames);
-      }
-   }
-   
-   private void parsePages(Set<FileDescriptor> files)
-   {
-      for (FileDescriptor file : files)  
-      {
-         String fileName = file.getName();
-         String viewId = "/" + fileName.substring(0,fileName.length()-".page.xml".length()) + ".xhtml"; // needs more here
-         
-         InputStream stream = null;
-         try
-         {
-            stream = file.getUrl().openStream();
-         }
-         catch (IOException exception)
-         {
-            // No-op
-         }
-         if (stream != null) 
-         {
-            log.debug("reading pages.xml file: " + fileName);
-            try {
-                parse(stream,viewId);
-            } finally {
-                Resources.closeStream(stream);
-            }
-         } 
-     }
-   }
-   
-   /**
-    * Run any navigation rule defined in pages.xml
-    * 
-    * @param actionExpression the action method binding expression
-    * @param actionOutcomeValue the outcome of the action method
-    * @return true if a navigation rule was found
-    */
-   public boolean navigate(FacesContext context, String actionExpression, String actionOutcomeValue)
-   {
-      String viewId = getViewId(context);
-      if (viewId!=null)
-      {
-         List<Page> stack = getPageStack(viewId);
-         for (int i=stack.size()-1; i>=0; i--)
-         {
-            Page page = stack.get(i);
-            Navigation navigation = page.getNavigations().get(actionExpression);
-            if (navigation==null)
-            {
-               navigation = page.getDefaultNavigation();
-            }
-            
-            if ( navigation!=null && navigation.navigate(context, actionOutcomeValue) ) return true;  
-            
-         }
-      }
-      return false;
-   }
-   /**
-    * Get the Page object for the given view id.
-    * 
-    * @param viewId a JSF view id
-    */
-   public Page getPage(String viewId)
-   {
-      if (viewId==null)
-      {
-         //for tests
-         return new Page(viewId);
-      }
-      else
-      {
-         Page result = getCachedPage(viewId);
-         if (result==null)
-         {
-            return createPage(viewId);
-         }
-         else
-         {
-            return result;
-         }
-      }
-   }
-   
-   /**
-    * Create a new default Page object for a JSF view id
-    */
-   private Page createPage(String viewId)
-   {
-      Page result = new Page(viewId);
-      pagesByViewId.put(viewId, result);
-      return result;
-   }
-   
-   private Page getCachedPage(String viewId)
-   {
-      return pagesByViewId.get(viewId);
-   }
-   
-   /**
-    * Get the stack of Page objects, from least specific to 
-    * most specific, that match the given view id.
-    * 
-    * @param viewId a JSF view id
-    */
-   protected List<Page> getPageStack(String viewId)
-   {
-      List<Page> stack = pageStacksByViewId.get(viewId);
-      if (stack==null)
-      {
-         stack = createPageStack(viewId);
-         pageStacksByViewId.put(viewId, stack);
-      }
-      return stack;
-   }
-   /**
-    * Create the stack of pages that match a JSF view id
-    */
-   private List<Page> createPageStack(String viewId)
-   {
-      List<Page> stack = new ArrayList<Page>(1);
-      if ( viewId!=null && !isDebugPage(viewId) )
-      {
-         for (String wildcard: wildcardViewIds)
-         {
-            if ( viewId.startsWith( wildcard.substring(0, wildcard.length()-1) ) )
-            {
-               stack.add( getPage(wildcard) );
-            }
-         }
-      }
-      Page page = getPage(viewId);
-      if (page!=null) stack.add(page);
-      return stack;
-   }
-   
-   /**
-    * Call page actions, check permissions and validate the existence 
-    * of a conversation for pages which require a long-running 
-    * conversation, starting with the most general view id, ending at 
-    * the most specific. Also perform redirection to the required
-    * scheme if necessary.
-    */
-   public boolean preRender(FacesContext facesContext)
-   {
-      String viewId = getViewId(facesContext);
-      
-      //redirect to HTTPS if necessary
-      String requestScheme = getRequestScheme(facesContext);
-      if ( requestScheme!=null )
-      {
-         String scheme = getScheme(viewId);
-         if ( scheme!=null && !requestScheme.equals(scheme) )
-         {
-            Manager.instance().redirect(viewId);
-            return false;
-         }
-      }
-      
-      //apply the datamodelselection passed by s:link or s:button
-      //before running any actions
-      selectDataModelRow(facesContext);
-
-      //redirect if necessary
-      List<Page> pageStack = getPageStack(viewId);
-      for ( Page page: pageStack )
-      {         
-         if ( isNoConversationRedirectRequired(page) )
-         {
-            redirectToNoConversationView();
-            return false;
-         }
-         else if ( isLoginRedirectRequired(viewId, page) )
-         {
-            redirectToLoginView();
-            return false;
-         }
-      }
-
-      boolean result = callAction(facesContext); 
-
-      //If responseComplete then we're probably doing a redirect so don't call the page actions now. 
-      if (!facesContext.getResponseComplete()) { 
-          String newViewId = getViewId(facesContext); 
-
-          for ( Page page: getPageStack(newViewId) ) { 
-              if ( isNoConversationRedirectRequired(page) ) { 
-                  redirectToNoConversationView(); 
-                  return false; 
-              } else if ( isLoginRedirectRequired(newViewId, page) ) { 
-                  redirectToLoginView(); 
-                  return false; 
-              } 
-          } 
-
-          //run the page actions, check permissions, 
-          //handle conversation begin/end 
-
-          for ( Page page: getPageStack(newViewId) ) { 
-              result = page.preRender(facesContext) || result; 
-          } 
-      } 
-      
-      return result;
-   }
-   
-   /**
-    * Look for a DataModel row selection in the request parameters,
-    * and apply it to the DataModel.
-    */
-   protected void selectDataModelRow(FacesContext facesContext)
-   {
-      String dataModelSelection = facesContext.getExternalContext()
-               .getRequestParameterMap().get("dataModelSelection");
-      if (dataModelSelection!=null)
-      {
-         int colonLoc = dataModelSelection.indexOf(':');
-         int bracketLoc = dataModelSelection.indexOf('[');
-         if (colonLoc>0 && bracketLoc>colonLoc)
-         {
-            String var = dataModelSelection.substring(0, colonLoc);
-            String name = dataModelSelection.substring(colonLoc+1, bracketLoc);
-            int index = Integer.parseInt( dataModelSelection.substring( bracketLoc+1, dataModelSelection.length()-1 ) );
-            Object value = Component.getInstance(name, true);
-            if (value!=null)
-            {
-               DataModel dataModel = (DataModel) value;
-               if ( index<dataModel.getRowCount() )
-               {
-                  dataModel.setRowIndex(index);
-                  Contexts.getEventContext().set( var, dataModel.getRowData() );
-               }
-               else
-               {
-                  log.debug("DataModel row was unavailable");
-                  Contexts.getEventContext().remove(var);
-               }
-            }
-         }
-      }
-   }
-   
-   /**
-    * Check permissions and validate the existence of a conversation
-    * for pages which require a long-running conversation, starting
-    * with the most general view id, ending at the most specific.
-    * Finally apply page parameters to the model.
-    */
-   public void postRestore(FacesContext facesContext)
-   {
-      //first store the page parameters into the viewroot, so 
-      //that if a login redirect occurs, or if a failure
-      //occurs while validating of applying to the model, we can 
-      //still make Redirect.captureCurrentView() work.
-      storeRequestStringValuesInPageContext(facesContext);
-      
-      //check if we need to redirect
-      String viewId = getViewId(facesContext);      
-      for ( Page page: getPageStack(viewId) )
-      {         
-         if ( isLoginRedirectRequired(viewId, page) )
-         {
-            redirectToLoginView();
-            return;
-         }
-         else if ( isNoConversationRedirectRequired(page) )
-         {
-            redirectToNoConversationView();
-            return;
-         }
-         else
-         {
-            //if we are about to proceed to the action
-            //phase, check the permission.
-            if ( !facesContext.getRenderResponse() )
-            {
-               page.postRestore(facesContext);
-            }
-         }
-      }
-
-      //now validate the values we just stored in
-      //the view root, after the redirect checking
-      if ( convertAndValidateStringValuesInPageContext(facesContext) ) 
-      {
-         Validation.instance().fail();
-         //and don't apply them to the model
-      }
-      else
-      {   
-         //finally apply page parameters to the model
-         //(after checking permissions)
-         applyConvertedValidatedValuesToModel(facesContext);
-      }
-   }
-   
-   /**
-    * Check if a login redirect is required for the current FacesContext
-    * 
-    * @param facesContext The faces context containing the view ID
-    * @return boolean Returns true if a login redirect is required
-    */
-   public boolean isLoginRedirectRequired(FacesContext facesContext)
-   {
-      String viewId = getViewId(facesContext);      
-      for ( Page page: getPageStack(viewId) )
-      {         
-         if ( isLoginRedirectRequired(viewId, page) ) return true;
-      }
-      return false;
-   }
-   
-   private boolean isNoConversationRedirectRequired(Page page)
-   {
-      return page.isConversationRequired() && 
-            !Manager.instance().isLongRunningOrNestedConversation();
-   }
-   
-   private boolean isLoginRedirectRequired(String viewId, Page page)
-   {
-      return page.isLoginRequired() && 
-            !viewId.equals( getLoginViewId() ) && 
-            !Identity.instance().isLoggedIn();
-   }
-   
-   public String getRequestScheme(FacesContext facesContext)
-   {
-      String requestUrl = getRequestUrl(facesContext);
-      if (requestUrl==null)
-      {
-         return null;
-      }
-      else
-      {
-         int idx = requestUrl.indexOf(':');
-         return idx<0 ? null : requestUrl.substring(0, idx);
-      }
-   }
-   
-   public String encodeScheme(String viewId, FacesContext context, String url)
-   {
-      String scheme = getScheme(viewId);
-      if (scheme != null)
-      {
-         String requestUrl = getRequestUrl(context);
-         if (requestUrl!=null)
-         {
-            try
-            {
-               URL serverUrl = new URL(requestUrl);
-               
-               StringBuilder sb = new StringBuilder();
-               sb.append(scheme);
-               sb.append("://");
-               sb.append(serverUrl.getHost());
-               
-               if ("http".equals(scheme) && httpPort != null)
-               {
-                  sb.append(":");
-                  sb.append(httpPort);
-               }
-               else if ("https".equals(scheme) && httpsPort != null)
-               {
-                  sb.append(":");
-                  sb.append(httpsPort);
-               }
-               else if (serverUrl.getPort() != -1)
-               {
-                  sb.append(":");
-                  sb.append(serverUrl.getPort());
-               }
-               
-               if (!url.startsWith("/")) sb.append("/");
-               
-               sb.append(url);
-               
-               url = sb.toString();
-            }
-            catch (MalformedURLException ex) 
-            {
-               throw new RuntimeException(ex);
-            }
-         }
-      }
-      return url;   
-   }
-   
-   private static String getRequestUrl(FacesContext facesContext)
-   {
-      Object request = facesContext.getExternalContext().getRequest(); 
-      if (request instanceof HttpServletRequest) 
-      {
-         return ( (HttpServletRequest) request).getRequestURL().toString();
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   public void redirectToLoginView()
-   {
-      notLoggedIn();
-      
-      String loginViewId = getLoginViewId();
-      if (loginViewId==null)
-      {
-         throw new NotLoggedInException();
-      }
-      else
-      {
-         Manager.instance().redirect(loginViewId);
-      }
-   }
-   
-   public void redirectToNoConversationView()
-   {
-      noConversation();
-      
-      //stuff from jPDL takes precedence
-      org.jboss.seam.faces.FacesPage facesPage = org.jboss.seam.faces.FacesPage.instance();
-      String pageflowName = facesPage.getPageflowName();
-      String pageflowNodeName = facesPage.getPageflowNodeName();
-      
-      String noConversationViewId = null;
-      if (pageflowName==null || pageflowNodeName==null)
-      {
-         String viewId = Pages.getCurrentViewId();
-         noConversationViewId = getNoConversationViewId(viewId);
-      }
-      else
-      {
-         noConversationViewId = Pageflow.instance().getNoConversationViewId(pageflowName, pageflowNodeName);
-      }
-      
-      if (noConversationViewId!=null)
-      {
-         Manager.instance().redirect(noConversationViewId);
-      }
-   }
-   
-   public String getScheme(String viewId)
-   {
-      List<Page> stack = getPageStack(viewId);
-      for ( int i = stack.size() - 1; i >= 0; i-- )
-      {
-         Page page = stack.get(i);
-         if (page.getScheme() != null) return page.getScheme();
-      }
-      return null;
-   }
-
-   public boolean hasDescription(String viewId)
-   {
-      return getDescription(viewId)!=null;
-   }
-
-   public String getDescription(String viewId)
-   {
-      List<Page> stack = getPageStack(viewId);
-      for ( int i = stack.size() - 1; i >= 0; i-- )
-      {
-         Page page = stack.get(i);
-         if (page.hasDescription()) return page.getDescription();
-      }
-      return null;
-   }
-
-   public String renderDescription(String viewId)
-   {
-      return Interpolator.instance().interpolate( getDescription(viewId) );
-   }
-   
-   protected void noConversation()
-   {
-      Events.instance().raiseEvent("org.jboss.seam.noConversation");
-      
-      FacesMessages.instance().addFromResourceBundleOrDefault( 
-            StatusMessage.Severity.WARN, 
-            "org.jboss.seam.NoConversation", 
-            "The conversation ended, timed out or was processing another request" 
-         );
-   }
-
-   protected void notLoggedIn()
-   {
-      //    TODO - Deprecated, remove for next major release
-      Events.instance().raiseEvent("org.jboss.seam.notLoggedIn");
-      Events.instance().raiseEvent(Identity.EVENT_NOT_LOGGED_IN);
-   }
-
-   public static String toString(Object returnValue)
-   {
-      return returnValue == null ? null : returnValue.toString();
-   }
-   
-   /**
-    * Call the JSF navigation handler
-    */
-   public static void handleOutcome(FacesContext facesContext, String outcome, String fromAction)
-   {
-      facesContext.getApplication().getNavigationHandler()
-            .handleNavigation(facesContext, fromAction, outcome);
-      //after every time that the view may have changed,
-      //we need to flush the page context, since the 
-      //attribute map is being discarder
-      Contexts.getPageContext().flush();
-   }
-   
-   public static Pages instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application context");
-      }
-      return (Pages) Component.getInstance(Pages.class, ScopeType.APPLICATION);
-   }
-   
-   /**
-    * Call the action requested by s:link or s:button.
-    */
-   @SuppressWarnings("deprecation")
-   private static boolean callAction(FacesContext facesContext)
-   {
-      //TODO: refactor with Pages.instance().callAction()!!
-      
-      boolean result = false;
-      
-      String outcome = facesContext.getExternalContext()
-            .getRequestParameterMap().get("actionOutcome");
-      String fromAction = outcome;
-
-      String decodedOutcome = null;
-      if (outcome != null)
-      {
-         decodedOutcome = URLDecoder.decode(outcome);
-      }
-
-      if (decodedOutcome != null && (decodedOutcome.indexOf('#') >= 0 || decodedOutcome.indexOf('{') >= 0) ){
-         throw new IllegalArgumentException("EL expressions are not allowed in actionOutcome parameter");
-      }
-      
-      if (outcome==null)
-      {
-         String actionId = facesContext.getExternalContext()
-               .getRequestParameterMap().get("actionMethod");
-         if (actionId!=null)
-         {
-            String decodedActionId = URLDecoder.decode(actionId);
-            if (decodedActionId != null && (decodedActionId.indexOf('#') >= 0 || decodedActionId.indexOf('{') >= 0) ){
-               throw new IllegalArgumentException("EL expressions are not allowed in actionMethod parameter");
-            }
-            if ( !SafeActions.instance().isActionSafe(actionId) ) return result;
-            String expression = SafeActions.toAction(actionId);
-            result = true;
-            MethodExpression actionExpression = Expressions.instance().createMethodExpression(expression);
-            outcome = toString( actionExpression.invoke() );
-            fromAction = expression;
-            handleOutcome(facesContext, outcome, fromAction);
-         }
-      }
-      else
-      {
-         handleOutcome(facesContext, outcome, fromAction);
-      }
-      
-      return result;
-   }
-   
-   /**
-    * Build a list of page-scoped resource bundles, from most
-    * specific view id, to most general.
-    */
-   public List<ResourceBundle> getResourceBundles(String viewId)
-   {
-      List<ResourceBundle> result = new ArrayList<ResourceBundle>(1);
-      List<Page> stack = getPageStack(viewId);
-      for (int i=stack.size()-1; i>=0; i--)
-      {
-         Page page = stack.get(i);
-         ResourceBundle bundle = page.getResourceBundle();
-         if ( bundle!=null ) result.add(bundle);
-      }
-      return result;
-   }
-   
-   /**
-    * Get the values of any page parameters by evaluating the value bindings
-    * against the model and converting to String.
-    * 
-    * @param viewId the JSF view id
-    * @param overridden excluded parameters
-    * @return a map of page parameter name to String value
-    */
-   public Map<String, Object> getStringValuesFromModel(FacesContext facesContext, String viewId, Set<String> overridden)
-   {
-      Map<String, Object> parameters = new HashMap<String, Object>();
-      for ( Page page: getPageStack(viewId) )
-      {
-         for ( Param pageParameter: page.getParameters() )
-         {
-            if ( !overridden.contains( pageParameter.getName() ) )
-            {
-               String value = null;
-               if ( pageParameter.getValueExpression()==null )
-               {                  
-                  if (Contexts.isPageContextActive()) {
-                      value = (String) Contexts.getPageContext().get(pageParameter.getName());
-                  }
-               }
-               else
-               {
-                  value = pageParameter.getStringValueFromModel(facesContext);
-               }
-               if (value!=null) 
-               {
-                  parameters.put( pageParameter.getName(), value );
-               }
-            }
-         }
-      }
-      return parameters;
-   }
-   
-   private void storeRequestStringValuesInPageContext(FacesContext facesContext)
-   {
-      Parameters parameters = Parameters.instance();
-      if (parameters!=null) //for unit tests
-      {
-         Map<String, String[]> requestParameters = parameters.getRequestParameters();
-         for ( Page page: getPageStack( getViewId(facesContext) ) )
-         {
-            for ( Param pageParameter: page.getParameters() )
-            {
-               String value = pageParameter.getStringValueFromRequest(facesContext, requestParameters);
-               if (value==null)
-               {
-                  //this should not be necessary, were it not for a MyFaces bug
-                  if ( facesContext.getRenderResponse() ) //ie. for a non-faces request
-                  {
-                     Contexts.getPageContext().remove( pageParameter.getName() );
-                  }
-               }
-               else
-               {
-                  Contexts.getPageContext().set( pageParameter.getName(), value );
-               }
-            }
-         }
-      }
-   }
-   
-   /**
-    * Convert and validate page parameters passed as view root attributes or request parameters
-    */
-   private boolean convertAndValidateStringValuesInPageContext(FacesContext facesContext)
-   {
-      boolean validationFailed = false;
-      for ( Page page: getPageStack( getViewId(facesContext) ) )
-      {
-         for ( Param pageParameter: page.getParameters() )
-         {  
-            try
-            {
-               String value = (String) Contexts.getPageContext().get( pageParameter.getName() );
-               if (value!=null)
-               {
-                  Object convertedValue = pageParameter.convertValueFromString(facesContext, value);
-                  pageParameter.validateConvertedValue(facesContext, convertedValue);
-                  Contexts.getEventContext().set( pageParameter.getName(), convertedValue );
-               }
-            }
-            catch (ValidatorException ve)
-            {
-               if (ve.getFacesMessage() != null)
-               {
-                  facesContext.addMessage(null, ve.getFacesMessage());
-               }
-               
-               validationFailed = true;
-            }
-            catch (ConverterException ce)
-            {
-               if (ce.getFacesMessage() != null)
-               {
-                  facesContext.addMessage( null, ce.getFacesMessage() );
-               }
-               validationFailed = true;
-            }
-         }
-      }
-      return validationFailed;
-   }
-   
-   /**
-    * Apply page parameters passed as view root attributes or request parameters to the model
-    */
-   private void applyConvertedValidatedValuesToModel(FacesContext facesContext)
-   {
-      String viewId = getViewId(facesContext);
-      for ( Page page: getPageStack(viewId) )
-      {
-         for ( Param pageParameter: page.getParameters() )
-         {         
-            ValueExpression valueExpression = pageParameter.getValueExpression();
-            if (valueExpression!=null)
-            {
-               Object object = Contexts.getEventContext().get( pageParameter.getName() );
-               if (object!=null)
-               {
-                  valueExpression.setValue(object);
-               }
-            }
-         }
-      }
-   }
-
-   /**
-    * Get the page parameter values that were passed in the original request from
-    * the PAGE context
-    */
-   public Map<String, Object> getStringValuesFromPageContext(FacesContext facesContext)
-   {
-      Map<String, Object> parameters = new HashMap<String, Object>();
-      String viewId = getViewId(facesContext);
-      for ( Page page: getPageStack(viewId) )
-      {
-         for ( Param pageParameter: page.getParameters() )
-         {
-            Object object = Contexts.getPageContext().get( pageParameter.getName() );
-            if (object!=null)
-            {
-               parameters.put( pageParameter.getName(), object );
-            }
-         }
-      }
-      return parameters;
-   }
-   
-   /**
-    * Update the page parameter values stored in the PAGE context with the current
-    * values of the mapped attributes of the model
-    */
-   public void updateStringValuesInPageContextUsingModel(FacesContext facesContext)
-   {
-      for ( Page page: getPageStack( getViewId(facesContext) ) )
-      {
-         for ( Param pageParameter: page.getParameters() )
-         {
-            if ( pageParameter.getValueExpression()!=null )
-            {
-               String value = pageParameter.getStringValueFromModel(facesContext);
-               if (value==null)
-               {
-                  Contexts.getPageContext().remove( pageParameter.getName() );
-               }
-               else
-               {
-                  Contexts.getPageContext().set( pageParameter.getName(), value );
-               }
-            }
-         }
-      }
-   }
-   
-   /**
-    * Encode page parameters into a URL
-    * 
-    * @param url the base URL
-    * @param viewId the JSF view id of the page
-    * @return the URL with parameters appended
-    */
-   public String encodePageParameters(FacesContext facesContext, String url, String viewId)
-   {
-      return encodePageParameters(facesContext, url, viewId, Collections.EMPTY_SET);
-   }
-   
-   /**
-    * Encode page parameters into a URL
-    * 
-    * @param url the base URL
-    * @param viewId the JSF view id of the page
-    * @param overridden excluded parameters
-    * @return the URL with parameters appended
-    */
-   public String encodePageParameters(FacesContext facesContext, String url, String viewId, Set<String> overridden)
-   {
-      Map<String, Object> parameters = getStringValuesFromModel(facesContext, viewId, overridden);
-      return Manager.instance().encodeParameters(url, parameters);
-   }
-   
-   /**
-    * Search for a defined no-conversation-view-id, beginning with
-    * the most specific view id, then wildcarded view ids, and 
-    * finally the global setting
-    */
-   public String getNoConversationViewId(String viewId)
-   {
-      List<Page> stack = getPageStack(viewId);
-      for (int i=stack.size()-1; i>=0; i--)
-      {
-         Page page = stack.get(i);
-         if (page.getNoConversationViewId() != null)
-         {
-            String noConversationViewId = page.getNoConversationViewId().getValue();
-            if (noConversationViewId!=null)
-            {
-               return noConversationViewId;
-            }
-         }
-      }
-      return this.noConversationViewId != null ? this.noConversationViewId.getValue() : null;
-   }
-   
-   /**
-    * Search for a defined conversation timeout, beginning with
-    * the most specific view id, then wildcarded view ids, and 
-    * finally the global setting from Manager
-    */
-   public Integer getTimeout(String viewId)
-   {
-      List<Page> stack = getPageStack(viewId);
-      for (int i=stack.size()-1; i>=0; i--)
-      {
-         Page page = stack.get(i);
-         Integer timeout = page.getTimeout();
-         if (timeout!=null)
-         {
-            return timeout;
-         }
-      }
-      return Manager.instance().getConversationTimeout();
-   }
-   
-   /**
-    * Search for a defined concurrent request timeout, beginning with
-    * the most specific view id, then wildcarded view ids, and 
-    * finally the global setting from Manager
-    */
-   public Integer getConcurrentRequestTimeout(String viewId)
-   {
-      List<Page> stack = getPageStack(viewId);
-      for (int i=stack.size()-1; i>=0; i--)
-      {
-         Page page = stack.get(i);
-         Integer concurrentRequestTimeout = page.getConcurrentRequestTimeout();
-         if (concurrentRequestTimeout!=null)
-         {
-            return concurrentRequestTimeout;
-         }
-      }
-      return Manager.instance().getConcurrentRequestTimeout();
-   }
-   
-   public static String getSuffix()
-   {
-      String defaultSuffix = FacesContext.getCurrentInstance().getExternalContext()
-            .getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
-      return defaultSuffix == null ? ViewHandler.DEFAULT_SUFFIX : defaultSuffix;
-   }
-   
-   /**
-    * Parse a pages.xml file
-    */
-   private void parse(InputStream stream)
-   {
-      Element root = getDocumentRoot(stream);
-      if (noConversationViewId==null) //let the setting in components.xml override the pages.xml
-      {
-         String noConversationViewIdString = root.attributeValue("no-conversation-view-id");
-         if (noConversationViewIdString != null)
-         {
-            noConversationViewId = Expressions.instance().createValueExpression(noConversationViewIdString, String.class);
-         }
-      }
-      if (loginViewId==null) //let the setting in components.xml override the pages.xml
-      {
-         loginViewId = root.attributeValue("login-view-id");
-      }
-      
-      if (httpPort == null)
-      {
-         try
-         {
-            String value = root.attributeValue("http-port");
-            if (!Strings.isEmpty(value))
-            {
-               httpPort = Integer.parseInt(value);
-            }
-         }
-         catch (NumberFormatException ex)
-         {
-            throw new IllegalStateException("Invalid value specified for http-port attribute in pages.xml");
-         }
-      }
-      
-      if (httpsPort == null)
-      {
-         try
-         {
-            String value = root.attributeValue("https-port");
-            if (!Strings.isEmpty(value))
-            {
-               httpsPort = Integer.parseInt(value);
-            }
-         }
-         catch (NumberFormatException ex)
-         {
-            throw new IllegalStateException("Invalid valid specified for https-port attribute in pages.xml");
-         }
-      }
-      
-      List<Element> elements = root.elements("conversation");
-      for (Element conversation : elements)
-      {
-         parseConversation(conversation, conversation.attributeValue("name"));
-      }
-      
-      elements = root.elements("page");
-      for (Element page: elements)
-      {
-         parse( page, page.attributeValue("view-id") );
-      } 
-   }
-   
-   /**
-    * Parse a viewId.page.xml file
-    */
-   private void parse(InputStream stream, String viewId)
-   {
-      parse( getDocumentRoot(stream), viewId );
-   }
-   
-   /**
-    * Get the root element of the document
-    */
-   private static Element getDocumentRoot(InputStream stream)
-   {
-      try
-      {
-         return XML.getRootElement(stream);
-      }
-      catch (DocumentException de)
-      {
-         throw new RuntimeException(de);
-      }
-   }
-   
-   private void parseConversation(Element element, String name)
-   {
-      if (name == null)
-      {
-         throw new IllegalStateException("Must specify name for <conversation/> declaration");
-      }
-      
-      if (conversations.containsKey(name))
-      {
-         throw new IllegalStateException("<conversation/> declaration already exists for [" + name + "]");
-      }
-      
-      NaturalConversationIdParameter param = new NaturalConversationIdParameter(name, 
-               element.attributeValue("parameter-name"), 
-               element.attributeValue("parameter-value"));
-      
-      conversations.put(name, param);
-   }
-   
-   /**
-    * Parse a page element and add a Page to the map
-    */
-   private void parse(Element element, String viewId)
-   {
-      if (viewId==null)
-      {
-         throw new IllegalStateException("Must specify view-id for <page/> declaration");
-      }
-      
-      if ( viewId.endsWith("*") )
-      {
-         wildcardViewIds.add(viewId);
-      }
-      Page page = new Page(viewId);
-      pagesByViewId.put(viewId, page);
-      
-      parsePage(page, element, viewId);
-      parseConversationControl( element, page.getConversationControl() );
-      parseTaskControl(element, page.getTaskControl());
-      parseProcessControl(element, page.getProcessControl());
-      List<Element> children = element.elements("param");
-      for (Element param: children)
-      {
-         page.getParameters().add( parseParam(param, page.isValidateModel()) );
-      }
-      
-      List<Element> moreChildren = element.elements("navigation");
-      for (Element fromAction: moreChildren)
-      {
-         parseActionNavigation(page, fromAction);
-      }
-      
-      Element restrict = element.element("restrict");
-      if (restrict != null)
-      {
-         page.setRestricted(true);
-         String expr = restrict.getTextTrim();
-         if ( !Strings.isEmpty(expr) ) page.setRestriction(expr);
-      }
-      
-      List<Element> headers = element.elements("header");
-      for (Element header: headers) {
-         page.getHeaders().add(parseHeader(header));
-      }
-   }
-   
-   public ConversationIdParameter getConversationIdParameter(String conversationName)
-   {
-      return conversations.get(conversationName);
-   }
-   
-   /**
-    * Parse the attributes of page
-    */
-   private Page parsePage(Page page, Element element, String viewId)
-   {
-      
-      page.setSwitchEnabled( !"disabled".equals( element.attributeValue("switch") ) );
-      
-      Element optionalElement = element.element("description");
-      String description = optionalElement==null ? 
-               element.getTextTrim() : optionalElement.getTextTrim();
-      if (description!=null && description.length()>0)
-      {
-         page.setDescription(description);
-      }
-      
-      String timeoutString = element.attributeValue("timeout");
-      if (timeoutString!=null)
-      {
-         page.setTimeout(Integer.parseInt(timeoutString));
-      }
-      
-      String concurrentRequestTimeoutString = element.attributeValue("concurrent-request-timeout");
-      if (concurrentRequestTimeoutString!=null)
-      {
-         page.setConcurrentRequestTimeout(Integer.parseInt(concurrentRequestTimeoutString));
-      }
-      
-      String noConversationViewIdString = element.attributeValue("no-conversation-view-id");
-      if (noConversationViewIdString != null)
-      {
-         page.setNoConversationViewId(Expressions.instance().createValueExpression(noConversationViewIdString, String.class));
-      }
-      page.setConversationRequired(Boolean.parseBoolean(element.attributeValue("conversation-required")));
-      page.setLoginRequired(Boolean.parseBoolean(element.attributeValue("login-required")));
-      page.setScheme(element.attributeValue("scheme"));
-      
-      String expiresValue = element.attributeValue("expires");
-      if (expiresValue != null) {
-           page.setExpires(Integer.parseInt(expiresValue));
-      }
-      
-      ConversationIdParameter param = conversations.get( element.attributeValue("conversation") );
-      if (param != null) page.setConversationIdParameter(param);
-      
-
-      List<Element> patterns = element.elements("rewrite");
-      for (Element pattern: patterns) {
-           page.addRewritePattern(pattern.attributeValue("pattern"));
-      }
-      
-      List<Element> events = element.elements("raise-event");
-      for (Element eventElement : events)
-      {
-         page.addEventType( eventElement.attributeValue("type") );
-      }
-      
-      Action action = parseAction(element, "action", false);
-      if (action!=null) page.getActions().add(action);
-      List<Element> childElements = element.elements("action");
-      for (Element childElement: childElements)
-      {
-         page.getActions().add( parseAction(childElement, "execute", true) );
-      }
-            
-      String bundle = element.attributeValue("bundle");
-      if (bundle!=null)
-      {
-         page.setResourceBundleName(bundle);
-      }
-      List<Element> moreChildElements = element.elements("in");
-      for (Element child: moreChildElements)
-      {
-         Input input = new Input();
-         input.setName( child.attributeValue("name") );
-         input.setValue( Expressions.instance().createValueExpression( child.attributeValue("value") ) );
-         String scopeName = child.attributeValue("scope");
-         if (scopeName!=null)
-         {
-            input.setScope( ScopeType.valueOf( scopeName.toUpperCase() ) );
-         }
-         page.getInputs().add(input);
-      }
-      // by default the model is validated by Hibernate validator; this attribute is used to disable that feature
-      // this setting can be overridden at the param level
-      String validateModelStr = element.attributeValue("validate-model");
-      if (validateModelStr != null)
-      {
-         page.setValidateModel(Boolean.parseBoolean(validateModelStr));
-      }
-      
-      return page;
-   }
-   
-   private static Action parseAction(Element element, String actionAtt, boolean conditionalsAllowed)
-   {
-      Action action = new Action();
-      String methodExpression = element.attributeValue(actionAtt);
-      if (methodExpression==null) return null;
-      if ( methodExpression.startsWith("#{") )
-      {
-         action.setMethodExpression( Expressions.instance().createMethodExpression(methodExpression) );
-      }
-      else
-      {
-         action.setOutcome(methodExpression);
-      }
-      
-      if (conditionalsAllowed)
-      {
-         String expression = element.attributeValue("if");
-         if (expression!=null)
-         {
-            action.setValueExpression( Expressions.instance().createValueExpression(expression) );
-         }
-         action.setOnPostback(!"false".equals(element.attributeValue("on-postback")));
-      }
-      return action;
-   }
-   
-   /**
-    * Parse end-conversation (and end-task) and begin-conversation (start-task and begin-task) 
-    *
-    */
-   private static void parseConversationControl(Element element, ConversationControl control)
-   {
-      Element endConversation = element.element("end-conversation");
-      endConversation = endConversation == null ? element.element("end-task") : endConversation;
-      if ( endConversation!=null )
-      {
-         control.setEndConversation(true);
-         control.setEndConversationBeforeRedirect( Boolean.parseBoolean( endConversation.attributeValue("before-redirect") ) );
-         control.setEndRootConversation( Boolean.parseBoolean( endConversation.attributeValue("root") ) );
-         String expression = endConversation.attributeValue("if");
-         if (expression!=null)
-         {
-            control.setEndConversationCondition( Expressions.instance().createValueExpression(expression, Boolean.class) );
-         }
-      }
-      
-      Element beginConversation = element.element("begin-conversation");
-      beginConversation = beginConversation == null ? element.element("begin-task") : beginConversation;
-      beginConversation = beginConversation == null ? element.element("start-task") : beginConversation;
-      if ( beginConversation!=null )
-      {
-         control.setBeginConversation(true);
-         control.setJoin( Boolean.parseBoolean( beginConversation.attributeValue("join") ) );
-         control.setNested( Boolean.parseBoolean( beginConversation.attributeValue("nested") ) );
-         control.setPageflow( beginConversation.attributeValue("pageflow") );
-         control.setConversationName( beginConversation.attributeValue("conversation") );
-         String flushMode = beginConversation.attributeValue("flush-mode");
-         if (flushMode!=null)
-         {
-            control.setFlushMode( FlushModeType.valueOf( flushMode.toUpperCase() ) );
-         }
-         String expression = beginConversation.attributeValue("if");
-         if (expression!=null)
-         {
-            control.setBeginConversationCondition( Expressions.instance().createValueExpression(expression, Boolean.class) );
-         }
-      }
-      
-      if ( control.isBeginConversation() && control.isEndConversation() )
-      {
-         throw new IllegalStateException("cannot use both <begin-conversation/> and <end-conversation/>");
-      }
-   }
-   
-   /**
-    * Parse begin-task, start-task and end-task
-    */
-   private static void parseTaskControl(Element element, TaskControl control)
-   {
-      Element endTask = element.element("end-task");
-      if ( endTask!=null )
-      {
-         control.setEndTask(true);
-         String transition = endTask.attributeValue("transition");
-         if (transition != null)
-         {
-            control.setTransition( Expressions.instance().createValueExpression(transition, String.class) );
-         }
-      }
-      
-      Element beginTask = element.element("begin-task");
-      if ( beginTask!=null )
-      {
-         control.setBeginTask(true);
-         String taskId = beginTask.attributeValue("task-id");
-         if (taskId==null)
-         {
-           taskId = "#{param.taskId}";
-         }
-         control.setTaskId( Expressions.instance().createValueExpression(taskId, Long.class) );
-      }
-      
-      Element startTask = element.element("start-task");
-      if ( startTask!=null )
-      {
-         control.setStartTask(true);
-         String taskId = startTask.attributeValue("task-id");
-         if (taskId==null)
-         {
-           taskId = "#{param.taskId}";
-         }
-         control.setTaskId( Expressions.instance().createValueExpression(taskId, Long.class) );
-      }
-      
-      if ( control.isBeginTask() && control.isEndTask() )
-      {
-         throw new IllegalStateException("cannot use both <begin-task/> and <end-task/>");
-      }
-      else if ( control.isBeginTask() && control.isStartTask() )
-      {
-          throw new IllegalStateException("cannot use both <start-task/> and <begin-task/>");
-       }
-      else if ( control.isStartTask() && control.isEndTask() )
-      {
-           throw new IllegalStateException("cannot use both <start-task/> and <end-task/>");
-       }
-   }
-   
-   /**
-    * Parse create-process and end-process
-    */
-   private static void parseProcessControl(Element element, ProcessControl control)
-   {
-      Element createProcess = element.element("create-process");
-      if ( createProcess!=null )
-      {
-         control.setCreateProcess(true);
-         control.setDefinition( createProcess.attributeValue("definition") );
-      }
-      
-      Element resumeProcess = element.element("resume-process");
-      if ( resumeProcess!=null )
-      {
-         control.setResumeProcess(true);
-         String processId = resumeProcess.attributeValue("process-id");
-         if (processId==null)
-         {
-           processId = "#{param.processId}";
-         }
-         control.setProcessId( Expressions.instance().createValueExpression(processId, Long.class) );
-      }
-      
-      if ( control.isCreateProcess() && control.isResumeProcess() )
-      {
-         throw new IllegalStateException("cannot use both <create-process/> and <resume-process/>");
-      }
-   }
-   
-   private static void parseEvent(Element element, Rule rule)
-   {
-      List<Element> events = element.elements("raise-event");
-      for (Element eventElement : events)
-      {
-         rule.addEventType( eventElement.attributeValue("type") );
-      }
-   }
-   
-   /**
-    * Parse navigation
-    */
-   private static void parseActionNavigation(Page entry, Element element)
-   {
-      Navigation navigation = new Navigation(); 
-      String outcomeExpression = element.attributeValue("evaluate");
-      if (outcomeExpression!=null)
-      {
-         navigation.setOutcome( Expressions.instance().createValueExpression(outcomeExpression) );
-      }
-      
-      List<Element> cases = element.elements("rule");
-      for (Element childElement: cases)
-      {
-         navigation.getRules().add( parseRule(childElement) );
-      }
-      
-      Rule rule = new Rule();
-      parseEvent(element, rule);
-      parseNavigationHandler(element, rule);
-      parseConversationControl( element, rule.getConversationControl() );
-      parseTaskControl(element, rule.getTaskControl());
-      parseProcessControl(element, rule.getProcessControl());
-      navigation.setRule(rule);
-      
-      String expression = element.attributeValue("from-action");
-      if (expression==null)
-      {
-         if (entry.getDefaultNavigation()==null)
-         {
-            entry.setDefaultNavigation(navigation);
-         }
-         else
-         {
-            throw new IllegalStateException("multiple catchall <navigation> elements");
-         }
-      }
-      else
-      {
-         Object old = entry.getNavigations().put(expression, navigation);
-         if (old!=null)
-         {
-            throw new IllegalStateException("multiple <navigation> elements for action: " + expression);
-         }
-      }
-   }
-   
-   /**
-    * Parse param
-    */
-   private static Param parseParam(Element element, boolean validateModel)
-   {
-      String valueExpression = element.attributeValue("value");
-      String name = element.attributeValue("name");
-      if (name==null)
-      {
-         if (valueExpression==null)
-         {
-            throw new IllegalArgumentException("must specify name or value for page <param/> declaration");
-         }
-         name = valueExpression.substring(2, valueExpression.length()-1);
-      }
-      Param param = new Param(name, validateModel);
-      if (valueExpression!=null)
-      {
-         param.setValueExpression(Expressions.instance().createValueExpression(valueExpression));
-      }
-      param.setConverterId(element.attributeValue("converterId"));
-      String converterExpression = element.attributeValue("converter");
-      if (converterExpression!=null)
-      {
-         param.setConverterValueExpression(Expressions.instance().createValueExpression(converterExpression));
-      }
-      param.setValidatorId(element.attributeValue("validatorId"));
-      String validatorExpression = element.attributeValue("validator");
-      if (validatorExpression!=null)
-      {
-         param.setValidatorValueExpression(Expressions.instance().createValueExpression(validatorExpression));
-      }
-      param.setRequired( Boolean.parseBoolean( element.attributeValue("required") ) );
-      String validateModelStr = element.attributeValue("validateModel");
-      if (validateModelStr != null)
-      {
-         param.setValidateModel(Boolean.parseBoolean(validateModelStr));
-      }
-      
-      return param;
-   }
-   
-   private static Header parseHeader(Element element)
-   {
-       Header header = new Header();
-
-       String name = element.attributeValue("name");
-       header.setName(name);
-
-       String valueExpression = element.attributeValue("value");
-       if (valueExpression==null) {
-           valueExpression = element.getTextTrim();
-       }
-       header.setValue(Expressions.instance().createValueExpression(valueExpression));
-
-       return header;
-   }
-   
-   /**
-    * Parse rule
-    */
-   private static Rule parseRule(Element element)
-   {
-      Rule rule = new Rule();
-      
-      rule.setOutcomeValue( element.attributeValue("if-outcome") );
-      String expression = element.attributeValue("if");
-      if (expression!=null)
-      {
-         rule.setCondition( Expressions.instance().createValueExpression(expression)  );
-      }
-      
-      parseConversationControl( element, rule.getConversationControl() );
-      parseTaskControl(element, rule.getTaskControl());
-      parseProcessControl(element, rule.getProcessControl());
-      parseEvent(element, rule);
-      parseNavigationHandler(element, rule);
-      
-      return rule;
-   }
-   
-   private static void parseNavigationHandler(Element element, Rule rule)
-   {
-      
-      Element render = element.element("render");
-      if (render!=null)
-      {
-         final String viewId = render.attributeValue("view-id");
-         Element messageElement = render.element("message");
-         String message = messageElement==null ? null : messageElement.getTextTrim();
-         String control = messageElement==null ? null : messageElement.attributeValue("for");
-         String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
-         Severity severity = severityName==null ? 
-                  FacesMessage.SEVERITY_INFO : 
-                  getFacesMessageValuesMap().get( severityName.toUpperCase() );
-         rule.addNavigationHandler( new RenderNavigationHandler(stringValueExpressionFor(viewId), message, severity, control) );
-      }
-      
-      Element redirect = element.element("redirect");
-      if (redirect!=null)
-      {
-         List<Element> children = redirect.elements("param");
-         final List<Param> params = new ArrayList<Param>();
-         for (Element child: children)
-         {
-            params.add( parseParam(child, true) );
-         }
-         final String viewId = redirect.attributeValue("view-id");
-         final String url    = redirect.attributeValue("url");
-         final String includePageParamsAttr = redirect.attributeValue("include-page-params");
-         final boolean includePageParams = includePageParamsAttr == null ? true : Boolean.getBoolean(includePageParamsAttr);
-
-         Element messageElement = redirect.element("message");
-         String control = messageElement==null ? null : messageElement.attributeValue("for");
-         String message = messageElement==null ? null : messageElement.getTextTrim();
-         String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
-         Severity severity = severityName==null ? 
-                  FacesMessage.SEVERITY_INFO : 
-                  getFacesMessageValuesMap().get( severityName.toUpperCase() );
-         rule.addNavigationHandler(new RedirectNavigationHandler(stringValueExpressionFor(viewId), 
-               stringValueExpressionFor(url), params, message, severity, control, includePageParams) );
-      }
-      
-      List<Element> childElements = element.elements("out");
-      for (Element child: childElements)
-      {
-         Output output = new Output();
-         output.setName( child.attributeValue("name") );
-         output.setValue( Expressions.instance().createValueExpression( child.attributeValue("value") ) );
-         String scopeName = child.attributeValue("scope");
-         if (scopeName==null)
-         {
-            output.setScope(ScopeType.CONVERSATION);
-         }
-         else
-         {
-            output.setScope( ScopeType.valueOf( scopeName.toUpperCase() ) );
-         }
-         rule.getOutputs().add(output);
-      }
-      
-   }
-   
-   private static ValueExpression<String> stringValueExpressionFor(String expr) {
-       return (ValueExpression<String>) ((expr == null) ? expr : Expressions.instance().createValueExpression(expr, String.class));
-   }
-   
-   public static Map<String, Severity> getFacesMessageValuesMap()
-   {
-      Map<String, Severity> result = new HashMap<String, Severity>();
-      for (Map.Entry<String, Severity> me: (Set<Map.Entry<String, Severity>>) FacesMessage.VALUES_MAP.entrySet())
-      {
-         result.put( me.getKey().toUpperCase(), me.getValue() );
-      }
-      return result;
-   }
-   
-   /**
-    * The global setting for no-conversation-viewid.
-    * 
-    * @return a JSF view id
-    */
-   public ValueExpression<String> getNoConversationViewId()
-   {
-      return noConversationViewId;
-   }
-   
-   public void setNoConversationViewId(ValueExpression<String> noConversationViewId)
-   {
-      this.noConversationViewId = noConversationViewId;
-   }
-   
-   /**
-    * The global setting for login-viewid.
-    * 
-    * @return a JSF view id
-    */
-   public String getLoginViewId()
-   {
-      return loginViewId;
-   }
-   
-   public void setLoginViewId(String loginViewId)
-   {
-      this.loginViewId = loginViewId;
-   }
-   
-   public static String getCurrentViewId()
-   {
-      return getViewId( FacesContext.getCurrentInstance() );
-   }
-   
-   public static String getCurrentBaseName()
-   {
-      String viewId = getViewId(FacesContext.getCurrentInstance());
-
-      int pos = viewId.lastIndexOf("/");
-      if (pos != -1)
-      {
-         viewId = viewId.substring(pos + 1);
-      }
-
-      pos = viewId.lastIndexOf(".");
-      if (pos != -1)
-      {
-         viewId = viewId.substring(0, pos);
-      }
-
-      return viewId;      
-   }   
-   
-   public static String getViewId(FacesContext facesContext)
-   {
-      if (facesContext!=null)
-      {
-         UIViewRoot viewRoot = facesContext.getViewRoot();
-         if (viewRoot!=null) return viewRoot.getViewId();
-      }
-      return null;
-   }
-   
-   public Integer getHttpPort()
-   {
-      return httpPort;
-   }
-   
-   public void setHttpPort(Integer httpPort)
-   {
-      this.httpPort = httpPort;
-   }
-   
-   public Integer getHttpsPort()
-   {
-      return httpsPort;
-   }
-   
-   public void setHttpsPort(Integer httpsPort)
-   {
-      this.httpsPort = httpsPort;
-   }
-   
-   public String[] getResources()
-   {
-      return resources;
-   }
-   
-   public void setResources(String[] resources)
-   {
-      this.resources = resources;
-   }
-   
-   private static boolean isDebugPage(String viewId)
-   {
-      return Init.instance().isDebugPageAvailable() && viewId.startsWith("/debug.");
-   }
-   
-   public static boolean isDebugPage()
-   {
-      return Init.instance().isDebugPageAvailable() &&
-            getCurrentViewId() != null &&
-            getCurrentViewId().startsWith("/debug.");
-   }
-   
-   public Collection<String> getKnownViewIds() {
-       return pagesByViewId.keySet();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Param.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Param.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Param.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,344 +0,0 @@
-package org.jboss.seam.navigation;
-
-import java.util.Date;
-import java.util.Map;
-import java.util.Set;
-
-import javax.el.ELContext;
-import javax.el.ELException;
-import javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.validator.Validator;
-import javax.faces.validator.ValidatorException;
-import javax.validation.ConstraintViolation;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Validators;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Metadata for a &lt;param/&gt; in pages.xml
- * 
- * @author Gavin King
- *
- */
-public final class Param
-{
-   private static final LogProvider log = Logging.getLogProvider(Param.class);
-   
-   public static final String INVALID_MESSAGE_ID = "org.jboss.seam.param.Invalid";
-   public static final String REQUIRED_MESSAGE_ID = "org.jboss.seam.param.Required";
-   
-   private final String name;
-   private ValueExpression valueExpression;
-   
-   private boolean required;
-   private boolean validateModel;
-   
-   private ValueExpression converterValueExpression;
-   private String converterId;
-   
-   private ValueExpression validatorValueExpression;
-   private String validatorId;
-   
-   public Param(String name)
-   {
-      this(name, true);
-   }
-   
-   public Param(String name, boolean validateModel)
-   {
-      this.name = name;
-      this.validateModel = validateModel;
-   }
-   
-   public Converter getConverter()
-   {
-      if (converterId!=null)
-      {
-         return FacesContext.getCurrentInstance().getApplication().createConverter(converterId);
-      }
-      else if (converterValueExpression!=null)
-      {
-         return (Converter) converterValueExpression.getValue();
-      }
-      else if (valueExpression==null)
-      {
-         return null;
-      } 
-      else
-      {
-         Class<?> type = valueExpression.getType();
-         if (type == null)
-         {
-            return null;
-         }
-         
-         if (type.equals(Date.class))
-         {
-            return org.jboss.seam.faces.DateConverter.getInstance();
-         }
-         else
-         {
-            return FacesContext.getCurrentInstance().getApplication().createConverter(type);
-         }
-      }
-   }
-
-   public Validator getValidator()
-   {
-      if (validatorId!=null)
-      {
-         return FacesContext.getCurrentInstance().getApplication().createValidator(validatorId);
-      }
-      else if (validatorValueExpression!=null)
-      {
-         return (Validator) validatorValueExpression.getValue();
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setValueExpression(ValueExpression valueExpression)
-   {
-      this.valueExpression = valueExpression;
-   }
-
-   public ValueExpression getValueExpression()
-   {
-      return valueExpression;
-   }
-
-   public void setConverterValueExpression(ValueExpression converterValueExpression)
-   {
-      this.converterValueExpression = converterValueExpression;
-   }
-
-   public ValueExpression getConverterValueExpression()
-   {
-      return converterValueExpression;
-   }
-
-   public void setConverterId(String converterId)
-   {
-      this.converterId = converterId;
-   }
-
-   public String getConverterId()
-   {
-      return converterId;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "PageParameter(" + name + ")";
-   }
-
-   /**
-    * Get the current value of a page or redirection parameter
-    * from the model, and convert to a String
-    */
-   public String getStringValueFromModel(FacesContext facesContext)
-   {
-      Object value = getValueExpression().getValue();
-      if (value==null)
-      {
-         return null;
-      }
-      else
-      {
-         Converter converter = null;
-         try
-         {
-            converter = getConverter();
-         }
-         catch (RuntimeException re)
-         {
-            //YUCK! due to bad JSF/MyFaces error handling
-            log.warn("could not create converter for: " + name, re);
-            return null;
-         }
-         
-         return converter==null ? 
-               value.toString() : 
-               converter.getAsString( facesContext, facesContext.getViewRoot(), value );
-      }
-   }
-
-   /**
-    * Get the current value of a page parameter from the request parameters
-    */
-   public String getStringValueFromRequest(FacesContext facesContext, Map<String, String[]> requestParameters)
-            throws ValidatorException
-   {
-      String[] parameterValues = requestParameters.get( getName() );
-
-      if (parameterValues==null || parameterValues.length==0)
-      {
-         // Page parameters are propagated in the page context through faces requests
-         if ( isRequired() && !Contexts.getPageContext().isSet( getName() ) )
-         {
-            addRequiredMessage(facesContext);
-         }
-         return null;
-      }
-
-      if (parameterValues.length>1)
-      {
-         throw new IllegalArgumentException("page parameter may not be multi-valued: " + getName());
-      }         
-
-      String value = parameterValues[0];
-      
-      // if the length is zero and the parameter is required, treat the value as
-      // missing (and report it as null); this differs from how JSF handles inputs
-      if (value.length() == 0)
-      {
-         if (isRequired())
-         {
-         addRequiredMessage(facesContext);
-         return null;
-      }
-      }
-      
-      return value;
-   }
-   
-   /**
-    * Convert the string value of a page parameter to the required type
-    */
-   public Object convertValueFromString(FacesContext facesContext, String value)
-   {
-      Converter converter = null;
-      try
-      {
-         converter = getConverter();
-      }
-      catch (RuntimeException re)
-      {
-         //YUCK! due to bad JSF/MyFaces error handling
-         log.warn("could not create converter for: " + name, re);
-         return null;
-      }
-      
-      return converter==null ? 
-            value :
-            converter.getAsObject( facesContext, facesContext.getViewRoot(), value );
-   }
-
-   /**
-    * Validate the pre-converted value of the parameter using the JSF
-    * validator specified in pages.xml, and using Hibernate Validator
-    * annotations specified on the model.
-    */
-   public void validateConvertedValue(FacesContext facesContext, Object value)
-   {
-      Validator validator = getValidator();
-      if (validator!=null)
-      {
-         validator.validate( facesContext, facesContext.getViewRoot(), value );
-      }
-      
-      if (valueExpression!=null && validateModel)
-      {
-         //TODO: note that this code is duplicated from ModelValidator!!
-         ELContext elContext = facesContext.getELContext();
-         Set<ConstraintViolation<Object>> invalidValues; 
-         try
-         {
-            invalidValues = Validators.instance().validate( valueExpression.toUnifiedValueExpression(), elContext, value );
-         }
-         catch (ELException ele)
-         {
-            Throwable cause = ele.getCause();
-            if (cause==null) cause = ele;
-            throw new ValidatorException( createMessage(cause), cause );
-         }
-         
-         if ( invalidValues.size()>0 )
-         {
-            throw new ValidatorException( createMessage(invalidValues) );
-         }
-      }
-   }
-
-   private FacesMessage createMessage(Set<ConstraintViolation<Object>> invalidValues)
-   {
-      String message = invalidValues.iterator().next().getMessage();
-      return FacesMessages.createFacesMessage(FacesMessage.SEVERITY_ERROR, INVALID_MESSAGE_ID, "'" + name + "' parameter is invalid: " + message, new Object[] { message, name });
-   }
-
-   private FacesMessage createMessage(Throwable cause)
-   {
-      return FacesMessages.createFacesMessage(
-            FacesMessage.SEVERITY_ERROR,
-            INVALID_MESSAGE_ID,
-            "'" + name + "' parameter is invalid: " + cause.getMessage(),
-            new Object[] { cause.getMessage(), name }
-      );
-   }
-
-   private void addRequiredMessage(FacesContext facesContext)
-   {
-      throw new ValidatorException(
-            FacesMessages.createFacesMessage(
-                FacesMessage.SEVERITY_ERROR,
-                REQUIRED_MESSAGE_ID,
-                "'" + name + "' parameter is required",
-                name)
-      );
-   }
-
-   public String getValidatorId()
-   {
-      return validatorId;
-   }
-
-   public void setValidatorId(String validatorId)
-   {
-      this.validatorId = validatorId;
-   }
-
-   public ValueExpression getValidatorValueExpression()
-   {
-      return validatorValueExpression;
-   }
-
-   public void setValidatorValueExpression(ValueExpression validatorValueExpression)
-   {
-      this.validatorValueExpression = validatorValueExpression;
-   }
-
-   public boolean isRequired()
-   {
-      return required;
-   }
-
-   public void setRequired(boolean required)
-   {
-      this.required = required;
-   }
-
-   public boolean isValidateModel()
-   {
-      return validateModel;
-   }
-
-   public void setValidateModel(boolean validateModel)
-   {
-      this.validateModel = validateModel;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ProcessControl.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ProcessControl.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/ProcessControl.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,80 +0,0 @@
-package org.jboss.seam.navigation;
-
-import org.jboss.seam.bpm.BusinessProcess;
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-/**
- * 
- * Demarcation of the business process in pages.xml
- *
- */
-public class ProcessControl
-{
-   private boolean isCreateProcess;
-   private boolean isResumeProcess;
-   private String definition;
-   private ValueExpression<Long> processId;
-
-   public void createOrResumeProcess()
-   {
-      if ( createProcess() )
-      {
-         BusinessProcess.instance().createProcess(definition);
-      }
-      if ( resumeProcess() )
-      {
-         BusinessProcess.instance().resumeProcess( processId.getValue() );
-      }
-   }
-
-   private boolean createProcess()
-   {
-      return isCreateProcess;
-   }
-
-   private boolean resumeProcess()
-   {
-      return isResumeProcess;
-   }
-
-   public boolean isCreateProcess()
-   {
-      return isCreateProcess;
-   }
-   
-   public void setCreateProcess(boolean isCreateProcess)
-   {
-      this.isCreateProcess = isCreateProcess;
-   }
-   
-   public boolean isResumeProcess()
-   {
-      return isResumeProcess;
-   }
-   
-   public void setResumeProcess(boolean isResumeProcess)
-   {
-      this.isResumeProcess = isResumeProcess;
-   }
-   
-   public String getDefinition()
-   {
-      return definition;
-   }
-   
-   public void setDefinition(String definition)
-   {
-      this.definition = definition;
-   }
-   
-   public ValueExpression<Long> getProcessId()
-   {
-      return processId;
-   }
-   
-   public void setProcessId(ValueExpression<Long> processId)
-   {
-      this.processId = processId;
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Put.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Put.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Put.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,37 +0,0 @@
-package org.jboss.seam.navigation;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-public class Put
-{
-   private String name;
-   private ScopeType scope;
-   private ValueExpression value;
-
-   public String getName()
-   {
-      return name;
-   }
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-   public ScopeType getScope()
-   {
-      return scope;
-   }
-   public void setScope(ScopeType scope)
-   {
-      this.scope = scope;
-   }
-   public ValueExpression getValue()
-   {
-      return value;
-   }
-   public void setValue(ValueExpression value)
-   {
-      this.value = value;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/RedirectNavigationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/RedirectNavigationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/RedirectNavigationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-package org.jboss.seam.navigation;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.faces.application.FacesMessage.Severity;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-/**
- * Metadata for a &lt;redirect/&gt; in pages.xml
- * 
- * @author Gavin King
- *
- */
-public final class RedirectNavigationHandler extends NavigationHandler
-{
-   private final ValueExpression<String> viewId;
-   private final ValueExpression<String> url;
-   private final List<Param> params;
-   private final String message;
-   private final Severity severity;
-   private final String control;
-   private final boolean includePageParams;
-
-   public RedirectNavigationHandler(ValueExpression<String> viewId, ValueExpression<String> url, List<Param> params, 
-         String message, Severity severity, String control, boolean includePageParams)
-   {
-      this.viewId = viewId;
-      this.url    = url;
-      this.params = params;
-      this.message = message;
-      this.severity = severity;
-      this.control = control;
-      this.includePageParams = includePageParams;
-   }
-
-   @Override
-   public boolean navigate(FacesContext context)
-   {
-      addFacesMessage(message, severity, control);
-      
-      Map<String, Object> parameters = new HashMap<String, Object>();
-      for ( Param parameter: params )
-      {
-         String value = parameter.getStringValueFromModel(context);
-         //render it even if the value is null, since we want it
-         //to override page parameter values which would be
-         //appended by the redirect filter
-         //if (value!=null)
-         //{
-            parameters.put( parameter.getName(), value );
-         //}
-      }
-      
-      if (url != null) {
-          redirectExternal(url.getValue());
-      } else {
-          redirect(viewId == null ? null : viewId.getValue(), parameters, includePageParams);
-      }
-
-      return true;
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/RenderNavigationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/RenderNavigationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/RenderNavigationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-package org.jboss.seam.navigation;
-
-import javax.faces.application.FacesMessage.Severity;
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-/**
- * Metadata for a &lt;render/&gt; in pages.xml
- * 
- * @author Gavin King
- *
- */
-public final class RenderNavigationHandler extends NavigationHandler
-{
-   private final ValueExpression<String> viewId;
-   private final String message;
-   private final Severity severity;
-   private final String control;
-
-   public RenderNavigationHandler(ValueExpression<String> viewId, String message, Severity severity, String control)
-   {
-      this.viewId = viewId;
-      this.message = message;
-      this.severity = severity;
-      this.control = control;
-   }
-
-   @Override
-   public boolean navigate(FacesContext context)
-   {
-      addFacesMessage(message, severity, control);
-      render(viewId == null ? null : viewId.getValue());
-      return true;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Rule.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Rule.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/Rule.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,118 +0,0 @@
-package org.jboss.seam.navigation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.util.Strings;
-
-/**
- * Metadata for an &lt;rule/&gt; in pages.xml
- * 
- * @author Gavin King
- *
- */
-public final class Rule
-{
-   private String outcomeValue;
-   private ValueExpression condition;
-   private List<Output> outputs = new ArrayList<Output>();
-   private ConversationControl conversationControl = new ConversationControl();
-   private TaskControl taskControl = new TaskControl();
-   private ProcessControl processControl = new ProcessControl();
-   private List<NavigationHandler> navigationHandlers = new ArrayList<NavigationHandler>();
-   private List<String> eventTypes = new ArrayList<String>();
-
-   public boolean matches(String actualValue)
-   {
-      return ( actualValue!=null || condition!=null ) &&
-            ( outcomeValue==null || outcomeValue.equals(actualValue) ) &&
-            ( condition==null || Boolean.TRUE.equals( condition.getValue() ) );
-   }
-   
-   public List<NavigationHandler> getNavigationHandlers()
-   {
-      return navigationHandlers;
-   }
-
-   public void addNavigationHandler(NavigationHandler navigationHandler)
-   {
-      this.navigationHandlers.add(navigationHandler);
-   }
-
-   public ConversationControl getConversationControl()
-   {
-      return conversationControl;
-   }
-   
-   public TaskControl getTaskControl()
-   {
-      return taskControl;
-   }
-   
-   public ProcessControl getProcessControl()
-   {
-      return processControl;
-   }
-
-   public ValueExpression getCondition()
-   {
-      return condition;
-   }
-
-   public void setCondition(ValueExpression expression)
-   {
-      this.condition = expression;
-   }
-
-   public String getOutcomeValue()
-   {
-      return outcomeValue;
-   }
-
-   public void setOutcomeValue(String value)
-   {
-      this.outcomeValue = value;
-   }
-
-   public List<Output> getOutputs()
-   {
-      return outputs;
-   }
-
-   public boolean execute(FacesContext context)
-   {
-      getConversationControl().beginOrEndConversation();
-      getTaskControl().beginOrEndTask();
-      getProcessControl().createOrResumeProcess();
-      for ( Output output: getOutputs() ) 
-      {
-         output.out();
-      }
-      for (String eventType : eventTypes)
-      {
-         Events.instance().raiseEvent(eventType);
-      }
-      for ( NavigationHandler nh: getNavigationHandlers() )
-      {
-         if ( nh.navigate(context) ) return true;
-      }
-      return false;
-   }
-
-   public List<String> getEventTypes()
-   {
-      return eventTypes;
-   }
-
-   public void addEventType(String eventType)
-   {
-      if (!Strings.isEmpty(eventType))
-      {
-         eventTypes.add(eventType);
-      }
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/SafeActions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/SafeActions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/SafeActions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,107 +0,0 @@
-package org.jboss.seam.navigation;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Maintains a set of "safe" actions that may be performed 
- * by &lt;s:link/&gt;, as determined by actually parsing
- * the view.
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.navigation.safeActions")
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class SafeActions
-{
-   
-   private Set<String> safeActions = Collections.synchronizedSet( new HashSet<String>() );
-   
-   public static String toActionId(String viewId, String expression)
-   {
-      return viewId.substring(1) + ':' + expression.substring( 2, expression.length()-1 );
-   }
-   
-   public static String toAction(String id)
-   {
-      int loc = id.indexOf(':');
-      if (loc<0) throw new IllegalArgumentException();
-      return "#{" + id.substring(loc+1) + "}";
-   }
-   
-   public void addSafeAction(String id)
-   {
-      safeActions.add(id);
-   }
-   
-   public boolean isActionSafe(String id)
-   {
-      if ( safeActions.contains(id) ) return true;
-      
-      int loc = id.indexOf(':');
-      if (loc<0) throw new IllegalArgumentException("Invalid action method " + id);
-      String viewId = id.substring(0, loc);
-      String action = "\"#{" + id.substring(loc+1) + "}\"";
-      
-      // adding slash as it otherwise won't find a page viewId by getResource*
-      InputStream is = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/" +viewId);
-      if (is==null) throw new IllegalStateException("Unable to read view " + "/" + viewId + " to execute action " + action);
-      BufferedReader reader = new BufferedReader( new InputStreamReader(is) );
-      try
-      {
-         while ( reader.ready() ) 
-         {
-            if ( reader.readLine().contains(action) ) 
-            {
-               addSafeAction(id);
-               return true;
-            }
-         }
-         return false;
-      }
-      catch (IOException ioe)
-      {
-         throw new RuntimeException("Error parsing view " + "/" + viewId + " to execute action " + action, ioe);
-      }
-      finally
-      {
-         try
-         {
-            reader.close();
-         }
-         catch (IOException ioe) {
-            throw new RuntimeException(ioe);
-         }
-      }
-   }
-   
-   public static SafeActions instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application context");
-      }
-      return (SafeActions) Component.getInstance(SafeActions.class, ScopeType.APPLICATION);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/SyntheticConversationIdParameter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/SyntheticConversationIdParameter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/SyntheticConversationIdParameter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,50 +0,0 @@
-package org.jboss.seam.navigation;
-
-import java.util.Map;
-
-import org.jboss.seam.core.ConversationPropagation;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.util.Id;
-
-/**
- * 
- * Seam's default strategy for propagating conversations.
- *
- */
-public class SyntheticConversationIdParameter implements ConversationIdParameter
-{
-   public String getName()
-   {
-      return null;
-   }
-   
-   public String getParameterName()
-   {
-      return Manager.instance().getConversationIdParameter();
-   }
-   
-   public String getParameterValue()
-   {
-      return Manager.instance().getCurrentConversationId();
-   }
-   
-   public String getParameterValue(String value)
-   {
-      return value;
-   }
-   
-   public String getInitialConversationId(Map parameters)
-   {
-      return Id.nextId();  
-   }
-   
-   public String getConversationId()
-   {
-      return Id.nextId();
-   }
-   
-   public String getRequestConversationId(Map parameters)
-   {
-      return ConversationPropagation.getRequestParameterValue( parameters, getParameterName() );      
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/TaskControl.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/TaskControl.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/TaskControl.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,105 +0,0 @@
-package org.jboss.seam.navigation;
-
-import org.jboss.seam.bpm.BusinessProcess;
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-public class TaskControl
-{
-
-   private boolean isBeginTask;
-
-   private boolean isStartTask;
-
-   private boolean isEndTask;
-
-   private ValueExpression<Long> taskId;
-
-   private ValueExpression<String> transition;
-
-   public void beginOrEndTask()
-   {
-      if ( endTask() )
-      {
-         BusinessProcess.instance().validateTask();
-         BusinessProcess.instance().endTask(transition == null ? null : transition.getValue());
-      }
-      if ( beginTask() || startTask() )
-      {
-         if (taskId==null || taskId.getValue() == null)
-         {
-            throw new NullPointerException("task id may not be null");
-         }
-         BusinessProcess.instance().resumeTask(taskId.getValue());
-      }
-      if ( startTask() )
-      {
-         BusinessProcess.instance().startTask();
-      }
-   }
-
-   private boolean beginTask()
-   {
-      return isBeginTask && taskId.getValue() != null;
-   }
-
-   private boolean startTask()
-   {
-      return isStartTask && taskId.getValue() != null;
-   }
-
-   private boolean endTask()
-   {
-      return isEndTask;
-   }
-
-   public boolean isBeginTask()
-   {
-      return isBeginTask;
-   }
-
-   public void setBeginTask(boolean isBeginTask)
-   {
-      this.isBeginTask = isBeginTask;
-   }
-
-   public boolean isEndTask()
-   {
-      return isEndTask;
-   }
-
-   public void setEndTask(boolean isEndTask)
-   {
-      this.isEndTask = isEndTask;
-   }
-
-   public boolean isStartTask()
-   {
-      return isStartTask;
-   }
-
-   public void setStartTask(boolean isStartTask)
-   {
-      this.isStartTask = isStartTask;
-   }
-
-   public void setTaskId(ValueExpression<Long> taskId)
-   {
-      this.taskId = taskId;
-   }
-
-   public ValueExpression<Long> getTaskId()
-   {
-      return taskId;
-   }
-   
-   public ValueExpression<String> getTransition()
-   {
-      return transition;
-   }
-   
-   public void setTransition(ValueExpression<String> transition)
-   {
-      this.transition = transition;
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/navigation/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * Implementation of pages.xml based navigation
- */
- at Namespace(value="http://jboss.com/products/seam/navigation", prefix="org.jboss.seam.navigation")
-package org.jboss.seam.navigation;
-
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-/**
- * The Seam component meta-model.
- */
-package org.jboss.seam;
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/Page.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/Page.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/Page.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,193 +0,0 @@
-package org.jboss.seam.pageflow;
-
-import org.dom4j.Element;
-import org.jboss.seam.bpm.BusinessProcess;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.core.Interpolator;
-import org.jbpm.graph.def.Node;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.jpdl.xml.JpdlXmlReader;
-import org.jbpm.jpdl.xml.Parsable;
-
-/**
- * A page node in a jPDL pageflow
- * 
- * @author Tom Baeyens
- * @author Gavin King
- *
- */
-public class Page extends Node implements Parsable 
-{
-   
-   // This classname is configured in the jbpm configuration 
-   // file : org/jbpm/graph/node/node.types.xml inside 
-   // the jbpm-{version}.jar
-   
-   // In case it would be necessary, that file, can be customized
-   // by updating the reference to it in the central jbpm configuration 
-   // file 'jbpm.cfg.xml'
-
-   private static final long serialVersionUID = 1L;
-   
-   private String viewId;
-   private boolean isConversationEnd = false;
-   private boolean isConversationEndBeforeRedirect = false;
-   private boolean isTaskEnd = false;
-   private String transition;
-   private String processToCreate;
-   private boolean redirect;
-   private String description;
-   private Integer timeout;
-   private boolean backEnabled;
-   private boolean switchEnabled;
-   private String noConversationViewId;
-
-   /**
-    * parses the dom4j element that corresponds to this page.
-    */
-   @Override
-   public void read(Element pageElement, JpdlXmlReader jpdlXmlReader) 
-   {
-      super.read(pageElement, jpdlXmlReader);
-      viewId = pageElement.attributeValue("view-id");
-      if (viewId==null)
-      {
-         throw new IllegalStateException("must specify view-id for <page/> node: " + pageElement.attributeValue("name"));
-      }
-      noConversationViewId = pageElement.attributeValue("no-conversation-view-id");
-      backEnabled = "enabled".equals( pageElement.attributeValue("back") );
-      switchEnabled = !"disabled".equals( pageElement.attributeValue("switch") );
-      Element endConversationElement = pageElement.element("end-conversation");
-      if ( endConversationElement!=null )
-      {
-         isConversationEnd = true;
-         isConversationEndBeforeRedirect = Boolean.parseBoolean( endConversationElement.attributeValue("before-redirect") );
-         processToCreate = endConversationElement.attributeValue("create-process");
-      }
-      Element endTaskElement = pageElement.element("end-task");
-      if (endTaskElement!=null) 
-      {
-         isTaskEnd = true;
-         transition = endTaskElement.attributeValue("transition");
-      }
-      redirect = Boolean.parseBoolean( pageElement.attributeValue("redirect") );
-      if ( pageElement.element("redirect")!=null )
-      {
-         redirect = true;
-      }
-      Element descriptionElement = pageElement.element("description");
-      if (descriptionElement!=null)
-      {
-         description = descriptionElement.getTextTrim();
-      }
-      String timeoutString = pageElement.attributeValue("timeout");
-      if ( timeoutString!=null )
-      {
-         timeout = Integer.valueOf(timeoutString);
-      }
-   }
-
-   /**
-    * is executed when execution arrives in this page at runtime.
-    */
-   @Override
-   public void execute(ExecutionContext executionContext) 
-   {
-      if ( isConversationEnd && processToCreate!=null )
-      {
-         BusinessProcess.instance().createProcess(processToCreate);
-      }
-      
-      if ( isTaskEnd ) 
-      {
-         BusinessProcess.instance().endTask(transition);         
-      }
-
-      if (isConversationEnd || isTaskEnd ) 
-      {
-         if (isConversationEndBeforeRedirect)
-         {
-            Conversation.instance().endBeforeRedirect();
-         }
-         else
-         {
-            Conversation.instance().end();
-         }
-      }
-      if (getAction() != null)
-      {
-         try
-         {
-            getAction().execute(executionContext);
-         }
-         catch (Exception e)
-         {
-            raiseException(e, executionContext);
-         }
-      }
-   }
-
-   public boolean isConversationEnd() 
-   {
-      return isConversationEnd;
-   }
-   
-   public String getTransition() 
-   {    
-      return transition;
-   }
-   
-   public String getViewId() 
-   {
-      return Interpolator.instance().interpolate(viewId);
-   }
-   
-   public boolean isRedirect()
-   {
-      return redirect;
-   }
-   
-   public boolean hasDescription()
-   {
-      return description!=null;
-   }
-
-   @Override
-   public String getDescription() {
-      return Interpolator.instance().interpolate(description);
-   }
-
-   public Integer getTimeout() {
-      return timeout;
-   }
-
-   public boolean isBackEnabled()
-   {
-      return backEnabled;
-   }
-
-   public boolean isSwitchEnabled()
-   {
-      return switchEnabled;
-   }
-
-   public String getNoConversationViewId()
-   {
-      return noConversationViewId;
-   }
-
-   protected boolean isTaskEnd()
-   {
-      return isTaskEnd;
-   }
-
-   protected String getProcessToCreate()
-   {
-      return processToCreate;
-   }
-
-   public boolean isConversationEndBeforeRedirect()
-   {
-      return isConversationEndBeforeRedirect;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/Pageflow.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/Pageflow.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/Pageflow.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,493 +0,0 @@
-package org.jboss.seam.pageflow;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseId;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.PerNestedConversation;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.bpm.Jbpm;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.core.AbstractMutable;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.faces.FacesPage;
-import org.jboss.seam.international.StatusMessage;
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.def.Action;
-import org.jbpm.graph.def.Event;
-import org.jbpm.graph.def.Node;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.graph.exe.ProcessInstance;
-
-/**
- * A Seam component that manages the current
- * jBPM ProcessInstance used for pageflow.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.CONVERSATION)
- at PerNestedConversation
- at Name("org.jboss.seam.pageflow.pageflow")
- at BypassInterceptors
- at Install(dependencies="org.jboss.seam.bpm.jbpm", precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class Pageflow extends AbstractMutable implements Serializable
-{
-   private static final long serialVersionUID = -2337682140346213333L;
-
-   private static final LogProvider log = Logging.getLogProvider(Pageflow.class);
-   
-   private int counter;
-   
-   private ProcessInstance processInstance;
-
-   public boolean isInProcess()
-   {
-      return processInstance!=null;
-   }
-   
-   public boolean isStarted()
-   {
-	   return getSubProcessInstance().getRootToken().getNode() != null;
-   }
-
-   public ProcessInstance getProcessInstance() 
-   {
-      return processInstance;
-   }
-
-   public void setProcessInstance(ProcessInstance processInstance) 
-   {
-      this.processInstance = processInstance;
-      setDirty();
-   }
-   
-   public static Pageflow instance()
-   {
-      if ( !Contexts.isConversationContextActive() )
-      {
-         throw new IllegalStateException("No active conversation context");
-      }
-      return (Pageflow) Component.getInstance(Pageflow.class, ScopeType.CONVERSATION);
-   }
-   
-   /**
-    * Get the current counter value, used for detecting
-    * illegal use of the backbutton.
-    */
-   public int getPageflowCounter()
-   {
-      return counter;
-   }
-   
-   /**
-    * Check that the current state of the pageflow matches
-    * what is expected by the faces request.
-    */
-   public void validatePageflow(FacesContext facesContext) 
-   {
-      if ( processInstance!=null )
-      {
-         org.jboss.seam.faces.FacesPage page = org.jboss.seam.faces.FacesPage.instance();
-         String pageflowName = page.getPageflowName();
-         String pageflowNodeName = page.getPageflowNodeName();
-         boolean canReposition = getPage().isBackEnabled() && 
-               getSubProcessInstance().getProcessDefinition().getName().equals(pageflowName) && //possibly not necessary?
-               pageflowNodeName!=null;
-         if (canReposition)
-         {
-            //check the node name to make sure we are still on the same node
-            if ( !pageflowNodeName.equals( getNode().getName() ) )
-            {
-               //legal use of back/forward button, so reposition the pageflow
-               reposition(pageflowNodeName);
-            }
-         }
-         else
-         {
-            //check the counter to detect illegal use of backbutton
-            //(we user counter instead of view id since multiple
-            //nodes can share the same view id)
-            Integer pageCounter = org.jboss.seam.faces.FacesPage.instance().getPageflowCounter();
-            if ( pageCounter!=null && getPageflowCounter()!=pageCounter )
-            {
-               illegalNavigationError();
-            }
-         }
-         
-         //now check that the restored view id matches what we expect
-         //from the pageflow node
-         //TODO: we need some way to disable this check, since users
-         //      might want some adhoc nav in and out of a pageflow?
-         String viewId = Pages.getViewId(facesContext);
-         if ( !viewId.equals( getPage().getViewId() ) )
-         {
-            illegalNavigationError();
-         }
-      }
-   }
-
-   private void illegalNavigationError()
-   {
-      FacesContext context = FacesContext.getCurrentInstance();
-      navigate(context);
-      illegalNavigation();
-      context.renderResponse();
-   }
-
-   /**
-    * Add a message to indicate that illegal navigation
-    * occurred. May be overridden by user to perform
-    * special processing.
-    */
-   protected void illegalNavigation()
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault( 
-            StatusMessage.Severity.WARN, 
-            "org.jboss.seam.IllegalNavigation", 
-            "Illegal navigation" 
-         );
-   }
-   
-   /**
-    * Get the current Node of the pageflow.
-    */
-   public Node getNode()
-   {
-      if (processInstance==null) return null;
-      Node node = getSubProcessInstance().getRootToken().getNode();
-      if (node==null) 
-      {
-         throw new IllegalStateException("pageflow has not yet started");
-      }
-      return node;
-   }
-
-   public ProcessInstance getSubProcessInstance()
-   {
-      return getSubProcess(processInstance);
-   }
-   
-   private static ProcessInstance getSubProcess(ProcessInstance processInstance)
-   {
-      ProcessInstance subProcess = processInstance.getRootToken().getSubProcessInstance();
-      if (subProcess!=null)
-      {
-         return getSubProcess(subProcess);
-      }
-      else
-      {
-         return processInstance;
-      }
-   }
-   
-   /**
-    * Reposition the pageflow at the named node.
-    * 
-    * @param nodeName the name of a node
-    */
-   public void reposition(String nodeName)
-   {
-      if (processInstance==null)
-      {
-         throw new IllegalStateException("no pageflow in progress");
-      }
-      ProcessInstance subProcess = getSubProcessInstance();
-      Node node = subProcess.getProcessDefinition().getNode(nodeName);
-      if (node==null)
-      {
-         throw new IllegalArgumentException(
-               "no node named: " + nodeName + 
-               " for pageflow: " + subProcess.getProcessDefinition().getName()
-            );
-      }
-      subProcess.getRootToken().setNode(node);
-      setDirty();
-   }
-   
-   /**
-    * Get the current Page of the pageflow.
-    */
-   public Page getPage() 
-   {
-      Node node = getNode();
-      if ( node!=null && !(node instanceof Page) )
-      {
-         throw new IllegalStateException("pageflow is not currently at a <page> or <start-page> node (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)");
-      }
-      return (Page) node;
-   }
-   
-   /**
-    * Navigate to the current page.
-    */
-   protected void navigate(FacesContext context) 
-   {
-      Page page = getPage();
-      if ( !page.isRedirect() )
-      {
-         render(context, page);
-      }
-      else
-      {
-         redirect(page);
-      }
-
-      counter++;
-      setDirty();
-   }
-
-   /**
-    * Redirect to the Page.
-    */
-   protected void redirect(Page page)
-   {
-      FacesManager.instance().redirect( getViewId(page) );
-   }
-
-   /**
-    * Proceed to render the Page.
-    */
-   protected void render(FacesContext context, Page page)
-   {
-      UIViewRoot viewRoot = context.getApplication().getViewHandler()
-            .createView( context, getViewId(page) );
-      context.setViewRoot(viewRoot);
-   }
-
-   /**
-    * Allows the user to extend this class and use some
-    * logical naming of pages other than the JSF view id
-    * in their pageflow.
-    * 
-    * @param page the Page object
-    * @return a JSF view id
-    */
-   protected String getViewId(Page page)
-   {
-      return page.getViewId();
-   }
-   
-   /**
-    * Get the JSF view id of the current page in the
-    * pageflow.
-    */
-   public String getPageViewId()
-   {
-      Page page = getPage();
-      return page==null ? null : getViewId(page);
-   }
-
-   /**
-    * Does the current node have a default transition?
-    */
-   public boolean hasDefaultTransition()
-   {
-      //we don't use jBPM's default transition,
-      //instead we use the "anonymous" transition
-      return getNode().getLeavingTransition(null)!=null;
-   }
-   
-   private boolean isNullOutcome(String outcome) 
-   {
-      return outcome==null || "".equals(outcome);
-   }
-
-   public boolean hasTransition(String outcome)
-   {
-      return isNullOutcome(outcome) ? 
-            hasDefaultTransition() : 
-            getNode().getLeavingTransition(outcome)!=null;
-   }
-
-   /**
-    * Given the JSF action outcome, perform navigation according
-    * to the current pageflow.
-    */
-   public void navigate(FacesContext context, String outcome) 
-   {
-      ProcessInstance subProcess = getSubProcessInstance();
-      if ( isNullOutcome(outcome) )
-      {
-         //if it has a default transition defined, trigger it,
-         //otherwise just redisplay the page
-         if ( hasDefaultTransition() )
-         {
-            //we don't use jBPM's default transition,
-            //instead we use the "anonymous" transition
-            Pageflow.signal(subProcess, null);
-            navigate(context);
-         }
-      }
-      else
-      {
-         //trigger the named transition
-         Pageflow.signal(subProcess, outcome);
-         navigate(context);
-      }
-      
-      raiseEndEventIfNecessary();
-   }
-
-   protected void raiseEndEventIfNecessary()
-   {
-      if ( processInstance.hasEnded() )
-      {
-         Events.instance().raiseEvent(
-                  "org.jboss.seam.endPageflow." + 
-                  processInstance.getProcessDefinition().getName()
-               );
-         Events.instance().raiseEvent(
-                 "org.jboss.seam.endPageflow");
-      }
-   }
-
-   /**
-    * Process events defined in the pageflow.
-    * 
-    * @param type one of: "process-validations", "update-model-values",
-    *                     "invoke-application", "render-response"
-    */
-   public void processEvents(String type)
-   {
-      Event event = getNode().getEvent(type);
-      if (event!=null)
-      {
-         for ( Action action: (List<Action>) event.getActions() )
-         {
-            try
-            {
-               action.execute( ExecutionContext.currentExecutionContext() );
-            }
-            catch (Exception e)
-            {
-               throw new RuntimeException(e);
-            }
-         }
-      }
-   }
-   
-   /**
-    * Begin executing a pageflow.
-    * 
-    * @param pageflowDefinitionName the name of the pageflow definition
-    */
-   public void begin(String pageflowDefinitionName)
-   {
-      if ( log.isDebugEnabled() )
-      {
-         log.debug("beginning pageflow: " + pageflowDefinitionName);
-      }
-      
-      processInstance = Pageflow.createInstance( getPageflowProcessDefinition(pageflowDefinitionName) );
-      
-      //if ( Lifecycle.getPhaseId().equals(PhaseId.RENDER_RESPONSE) ) 
-      //{
-    	  //if a pageflow starts during the render response phase
-    	  //(as a result of a @Create method), we know the navigation
-    	  //handler will not get called, so we should force the
-    	  //pageflow out of the start state immediately
-        //TODO: this is not actually completely true, what about <s:actionLink/>
-    	  //pi.signal();
-      //}
-      
-      setDirty();
-      
-      raiseBeginEvent(pageflowDefinitionName);
-      
-      storePageflowToViewRootIfNecessary();
-
-   }
-
-   protected void raiseBeginEvent(String pageflowDefinitionName)
-   {
-      Events.instance().raiseEvent("org.jboss.seam.beginPageflow." + pageflowDefinitionName);
-      Events.instance().raiseEvent("org.jboss.seam.beginPageflow");
-   }
-
-   private void storePageflowToViewRootIfNecessary()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if ( facesContext!=null && FacesLifecycle.getPhaseId()==PhaseId.RENDER_RESPONSE )
-      {
-         FacesPage.instance().storePageflow();
-      }
-   }
-   
-   public String getNoConversationViewId(String pageflowName, String pageflowNodeName)
-   {
-      ProcessDefinition pageflowProcessDefinition = getPageflowProcessDefinition(pageflowName);
-      Node node = pageflowProcessDefinition.getNode(pageflowNodeName);
-      if (node!=null && node instanceof Page)
-      {
-         return ( (Page) node ).getNoConversationViewId();
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   protected ProcessDefinition getPageflowProcessDefinition(String pageflowName)
-   {
-      ProcessDefinition pageflowProcessDefinition = Jbpm.instance().getPageflowProcessDefinition(pageflowName);
-      if (pageflowProcessDefinition==null)
-      {
-         throw new IllegalArgumentException("pageflow definition not found: " + pageflowName);
-      }
-      return pageflowProcessDefinition;
-   }
-   
-   @Override
-   public String toString()
-   {
-      String name = processInstance==null ? 
-            "null" : processInstance.getProcessDefinition().getName();
-      return "Pageflow(" + name + ")";
-   }
-
-   private static ProcessInstance createInstance(ProcessDefinition processDefinition) 
-   {
-      JbpmContext jbpmContext = Jbpm.createPageflowContext();
-      try 
-      {
-         log.debug( "new pageflow instance for definition: " + processDefinition.getName() );
-         return processDefinition.createProcessInstance();
-      } 
-      finally 
-      {
-         jbpmContext.close();
-      }
-   }
-
-   private static void signal(ProcessInstance processInstance, String outcome) 
-   {
-      JbpmContext jbpmContext = Jbpm.createPageflowContext();
-      try 
-      {
-         log.debug("signaling pageflow transition for outcome: " + outcome);
-         processInstance.signal(outcome);
-      } 
-      finally 
-      {
-         jbpmContext.close();
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/pageflow/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * Support for jPDL-based pageflows.
- */
- at AutoCreate
-package org.jboss.seam.pageflow;
-
-import org.jboss.seam.annotations.AutoCreate;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/AbstractPersistenceProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/AbstractPersistenceProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/AbstractPersistenceProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,150 +0,0 @@
-package org.jboss.seam.persistence;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Date;
-
-import javax.persistence.EntityManager;
-import javax.persistence.OptimisticLockException;
-import javax.transaction.Synchronization;
-
-import org.jboss.seam.Entity;
-
-/**
- * Provides a default implementation of PersistenceProvider methods where possible
- * 
- * Other methods must be implemented
- * 
- * @author Pete Muir
- *
- */
-public abstract class AbstractPersistenceProvider
-{
-
-   /**
-    *  Set the flush mode to manual-only flushing. Called when
-    *  an atomic persistence context is required.
-    */
-   public abstract void setFlushModeManual(EntityManager entityManager);
-
-   /**
-    * Does the persistence context have unflushed changes? If
-    * it does not, persistence context replication can be
-    * optimized.
-    * 
-    * @return true to indicate that there are unflushed changes
-    */
-   public abstract boolean isDirty(EntityManager entityManager);
-
-   /**
-    * Get the value of the entity identifier attribute.
-    * 
-    * @param bean a managed entity instance
-    */
-   public Object getId(Object bean, EntityManager entityManager)
-   {
-      return Entity.forClass( bean.getClass() ).getIdentifier(bean);
-   }
-
-   /**
-    * Get the name of the entity
-    * 
-    * @param bean
-    * @param entityManager
-    * 
-    * @throws IllegalArgumentException if the passed object is not an entity
-    */
-   public String getName(Object bean, EntityManager entityManager) throws IllegalArgumentException
-   {
-      return Entity.forClass(bean.getClass()).getName();
-   }
-
-   /**
-    * Get the value of the entity version attribute.
-    * 
-    * @param bean a managed entity instance
-    */
-   public Object getVersion(Object bean, EntityManager entityManager)
-   {
-      return Entity.forClass( bean.getClass() ).getVersion(bean);
-   }
-
-   public void checkVersion(Object bean, EntityManager entityManager, Object oldVersion, Object version)
-   {
-      boolean equal;
-      if (oldVersion instanceof Date)
-      {
-         equal = ( (Date) oldVersion ).getTime() == ( (Date) version ).getTime();
-      }
-      else
-      {
-         equal = oldVersion.equals(version);
-      }
-      if ( !equal )
-      {
-         throw new OptimisticLockException("current database version number does not match passivated version number");
-      }
-   }
-
-   /**
-    * Enable a Filter. This is here just especially for Hibernate,
-    * since we well know that other products don't have such cool
-    * features. 
-    */
-   public abstract void enableFilter(Filter filter, EntityManager entityManager);
-
-   /**
-    * Register a Synchronization with the current transaction.
-    */
-   public abstract boolean registerSynchronization(Synchronization sync, EntityManager entityManager);
-
-   /**
-    * Wrap the delegate before returning it to the application
-    */
-   public Object proxyDelegate(Object delegate)
-   {
-      return delegate;
-   }
-
-   /**
-    * Wrap the entityManager before returning it to the application
-    */
-   public EntityManager proxyEntityManager(EntityManager entityManager)
-   {
-      return (EntityManager) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
-            new Class[] { EntityManagerProxy.class },
-            new EntityManagerInvocationHandler(entityManager));
-   }
-
-   /**
-    * Returns the class of an entity bean instance
-    * 
-    * @param bean The entity bean instance
-    * @return The class of the entity bean
-    */
-   public Class getBeanClass(Object bean)
-   {
-      return Entity.forClass(bean.getClass()).getBeanClass();
-   }
-
-   public Method getPostLoadMethod(Class beanClass, EntityManager entityManager)
-   {
-      return Entity.forClass(beanClass).getPostLoadMethod();      
-   }
-
-   public Method getPrePersistMethod(Class beanClass, EntityManager entityManager)
-   {
-      return Entity.forClass(beanClass).getPrePersistMethod();
-   }
-
-   public Method getPreUpdateMethod(Class beanClass, EntityManager entityManager)
-   {
-      return Entity.forClass(beanClass).getPreUpdateMethod();
-   }
-
-   public Method getPreRemoveMethod(Class beanClass, EntityManager entityManager)
-   {
-      return Entity.forClass(beanClass).getPreRemoveMethod();
-   }
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,115 +0,0 @@
-//$Id: EntityManagerFactory.java 6280 2007-09-27 15:29:56Z pmuir $
-package org.jboss.seam.persistence;
-
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-
-import javax.persistence.Persistence;
-
-import org.hibernate.cfg.Environment;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.util.Naming;
-
-/**
- * A Seam component that bootstraps an EntityManagerFactory,
- * for use of JPA outside of Java EE 5 / Embedded JBoss.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Startup
-public class EntityManagerFactory
-{
-   private javax.persistence.EntityManagerFactory entityManagerFactory;
-
-   private String persistenceUnitName;
-   private Map<String, String> persistenceUnitProperties;
-   
-   @Unwrap
-   public javax.persistence.EntityManagerFactory getEntityManagerFactory()
-   {
-      return entityManagerFactory;
-   }
-   
-   @Create
-   public void startup(Component component) throws Exception
-   {
-      if (persistenceUnitName==null)
-      {
-         persistenceUnitName = component.getName();
-      }
-      entityManagerFactory = createEntityManagerFactory();
-   }
-
-   @Destroy
-   public void shutdown()
-   {
-      if (entityManagerFactory!=null)
-      {
-         entityManagerFactory.close();
-      }
-   }
-   
-   protected javax.persistence.EntityManagerFactory createEntityManagerFactory()
-   {
-      Map properties = new HashMap();
-      Hashtable<String, String> jndiProperties = Naming.getInitialContextProperties();
-      if ( jndiProperties!=null )
-      {
-         // Prefix regular JNDI properties for Hibernate
-         for (Map.Entry<String, String> entry : jndiProperties.entrySet())
-         {
-            properties.put( Environment.JNDI_PREFIX + "." + entry.getKey(), entry.getValue() );
-         }
-      }
-      if (persistenceUnitProperties!=null)
-      {
-         properties.putAll(persistenceUnitProperties);
-      }
-
-      if ( properties.isEmpty() )
-      {
-         return Persistence.createEntityManagerFactory(persistenceUnitName);
-      }
-      else
-      {
-         return Persistence.createEntityManagerFactory(persistenceUnitName, properties);
-      }
-   }
-   
-   /**
-    * The persistence unit name
-    */
-   public String getPersistenceUnitName()
-   {
-      return persistenceUnitName;
-   }
-
-   public void setPersistenceUnitName(String persistenceUnitName)
-   {
-      this.persistenceUnitName = persistenceUnitName;
-   }
-
-   /**
-    * Properties to pass to Persistence.createEntityManagerFactory()
-    */
-   public Map<String, String> getPersistenceUnitProperties()
-   {
-      return persistenceUnitProperties;
-   }
-
-   public void setPersistenceUnitProperties(Map<String, String> persistenceUnitProperties)
-   {
-      this.persistenceUnitProperties = persistenceUnitProperties;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerInvocationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerInvocationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerInvocationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,94 +0,0 @@
-package org.jboss.seam.persistence;
-
-import java.io.Serializable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-import org.jboss.seam.security.permission.PermissionManager;
-
-/**
- * InvocationHandler that Proxies the EntityManager, and implements EL
- * interpolation in JPA-QL
- * 
- * @author Gavin King
- * @author Mike Youngstrom
- */
-public class EntityManagerInvocationHandler implements InvocationHandler, Serializable
-{
-   
-   private EntityManager delegate;
-   
-   public EntityManagerInvocationHandler(EntityManager delegate)
-   {
-      this.delegate = delegate;
-   }
-   
-   public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
-   {
-      try
-      {
-         if ("createQuery".equals(method.getName()) && method.getParameterTypes().length > 0 && method.getParameterTypes()[0].equals(String.class))
-         {
-            return handleCreateQueryWithString(method, args);
-         }
-         if ("getDelegate".equals(method.getName()))
-         {
-            return handleGetDelegate(method, args);
-         }
-         if ("remove".equals(method.getName()) && method.getParameterTypes().length > 0)
-         {
-            return handleRemove(method, args);
-         }
-         return method.invoke(delegate, args);
-      }
-      catch (InvocationTargetException e)
-      {
-         throw e.getTargetException();
-      }
-   }
-   
-   protected Object handleCreateQueryWithString(Method method, Object[] args) throws Throwable
-   {
-      if (args[0] == null)
-      {
-         return method.invoke(delegate, args);
-      }
-      String ejbql = (String) args[0];
-      if (ejbql.indexOf('#') > 0)
-      {
-         QueryParser qp = new QueryParser(ejbql);
-         Object[] newArgs = args.clone();
-         newArgs[0] = qp.getEjbql();
-         Query query = (Query) method.invoke(delegate, newArgs);
-         for (int i = 0; i < qp.getParameterValueBindings().size(); i++)
-         {
-            query.setParameter(QueryParser.getParameterName(i), qp.getParameterValueBindings().get(i).getValue());
-         }
-         return query;
-      }
-      else
-      {
-         return method.invoke(delegate, args);
-      }
-   }
-   
-   protected Object handleGetDelegate(Method method, Object[] args) throws Throwable
-   {
-      return PersistenceProvider.instance().proxyDelegate(method.invoke(delegate, args));
-   }
-   
-   protected Object handleRemove(Method method, Object[] args) throws Throwable
-   {
-      if (args.length == 0)
-      {
-         return method.invoke(delegate, args);
-      }
-      Object result = method.invoke(delegate, args);
-      PermissionManager.instance().clearPermissions(args[0]);
-      return result;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerProxy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerProxy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerProxy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,16 +0,0 @@
-package org.jboss.seam.persistence;
-
-import java.io.Serializable;
-
-import javax.persistence.EntityManager;
-
-/**
- * Proxies the EntityManager, and implements EL interpolation
- * in JPA-QL
- * 
- * @author Gavin King
- *
- */
-public interface EntityManagerProxy extends EntityManager, Serializable
-{
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerProxyInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerProxyInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/EntityManagerProxyInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-package org.jboss.seam.persistence;
-
-import static org.jboss.seam.ComponentType.STATEFUL_SESSION_BEAN;
-import static org.jboss.seam.ComponentType.STATELESS_SESSION_BEAN;
-
-import javax.persistence.EntityManager;
-
-import org.jboss.seam.Component.BijectedAttribute;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.annotations.intercept.PostActivate;
-import org.jboss.seam.annotations.intercept.PostConstruct;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Proxy the EntityManager if injected using @PersistenceContext
- * 
- * @author Pete Muir
- */
-
- at Interceptor(stateless=true)
-public class EntityManagerProxyInterceptor extends AbstractInterceptor
-{
-
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext ic) throws Exception
-   {
-      return ic.proceed();
-   }
-   
-   @PostActivate
-   public void postActivate(InvocationContext invocation) throws Exception
-   {
-      //just in case the container does some special handling of PC serialization
-      proxyPersistenceContexts(invocation.getTarget());
-      invocation.proceed();
-   }
-   
-   @PostConstruct
-   public void postConstruct(InvocationContext invocation) throws Exception
-   {
-      proxyPersistenceContexts(invocation.getTarget());
-      invocation.proceed();
-   }
-   
-   
-   private void proxyPersistenceContexts(Object bean)
-   {
-      //wrap any @PersistenceContext attributes in our proxy
-      for ( BijectedAttribute ba: getComponent().getPersistenceContextAttributes() )
-      {
-         Object object = ba.get(bean);
-         if ( ! ( object instanceof EntityManagerProxy ) && object instanceof EntityManager )
-         {
-            PersistenceProvider provider = PersistenceProvider.instance();
-            ba.set( bean, provider.proxyEntityManager( (EntityManager) object ) );
-         }
-      }
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().getType()==STATEFUL_SESSION_BEAN || getComponent().getType()==STATELESS_SESSION_BEAN;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/Filter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/Filter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/Filter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,100 +0,0 @@
-package org.jboss.seam.persistence;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-/**
- * Support for declarative application of
- * Hibernate filters to persistence contexts.
- * 
- * @see org.hibernate.Filter
- * @see ManagedHibernateSession
- * @see ManagedPersistenceContext
- * @author Gavin King
- */
- at BypassInterceptors
- at Scope(ScopeType.APPLICATION)
-public class Filter implements Serializable
-{
-   private String name;
-   // default to no parameters
-   private Map<String, ValueExpression> parameters = new HashMap<String, ValueExpression>();
-   private ValueExpression enabled;
-   
-   @Create
-   public void create(Component component)
-   {
-      //default the filter name to the component name
-      if (name==null)
-      {
-         name = component.getName();
-      }
-   }
-   
-   /**
-    * The filter parameters.
-    * 
-    * @see org.hibernate.Filter#setParameter(String, Object)
-    */
-   public Map<String, ValueExpression> getParameters()
-   {
-      return parameters;
-   }
-   public void setParameters(Map<String, ValueExpression> parameters)
-   {
-      this.parameters = parameters;
-   }
-   
-   /**
-    * The Hibernate filter name.
-    * 
-    * @see org.hibernate.Session#enableFilter(String)
-    */
-   public String getName()
-   {
-      return name;
-   }
-   
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-   
-   public boolean isFilterEnabled()
-   {
-      ValueExpression enabledValueBinding = getEnabled();
-      if (enabledValueBinding==null)
-      {
-         return true;
-      }
-      else
-      {
-         Boolean enabled = (Boolean) enabledValueBinding.getValue();
-         return enabled!=null && enabled;
-      }
-   }
-
-   @Override
-   public String toString()
-   {
-      return "Filter(" + name + ")";
-   }
-
-   public ValueExpression getEnabled()
-   {
-      return enabled;
-   }
-
-   public void setEnabled(ValueExpression enabled)
-   {
-      this.enabled = enabled;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/FullTextEntityManagerProxy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/FullTextEntityManagerProxy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/FullTextEntityManagerProxy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,17 +0,0 @@
-//$Id: FullTextEntityManagerProxy.java 12070 2010-02-23 20:35:56Z youngm $
-package org.jboss.seam.persistence;
-
-import org.hibernate.search.jpa.FullTextEntityManager;
-
-/**
- * Marker Interface here to show that a given EntityManager is doing EL
- * manipulation and for backwards compatibility with previous non proxy
- * solution.
- * 
- * @author Emmanuel Bernard
- * @author Sanne Grinovero
- * @author Mike Youngstrom
- */
-public interface FullTextEntityManagerProxy extends EntityManagerProxy, FullTextEntityManager
-{
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/FullTextHibernateSessionProxy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/FullTextHibernateSessionProxy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/FullTextHibernateSessionProxy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,16 +0,0 @@
-package org.jboss.seam.persistence;
-
-import org.hibernate.search.FullTextSession;
-
-/**
- * Marker Interface here to show that a given EntityManager is doing EL
- * manipulation and for backwards compatibility with previous non proxy
- * solution.
- * 
- * @author Gavin King
- * @author Sanne Grinovero
- * @author Mike Youngstrom
- */
-public interface FullTextHibernateSessionProxy extends HibernateSessionProxy, FullTextSession
-{
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernatePersistenceProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernatePersistenceProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernatePersistenceProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,434 +0,0 @@
-package org.jboss.seam.persistence;
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Collection;
-import java.util.Map;
-
-import javax.persistence.EntityManager;
-import javax.transaction.Synchronization;
-
-import org.hibernate.EntityMode;
-import org.hibernate.FlushMode;
-import org.hibernate.Hibernate;
-import org.hibernate.Session;
-import org.hibernate.StaleStateException;
-import org.hibernate.TransientObjectException;
-import org.hibernate.metadata.ClassMetadata;
-import org.hibernate.proxy.HibernateProxy;
-import org.hibernate.type.VersionType;
-import org.jboss.seam.Component;
-import org.jboss.seam.Entity;
-import org.jboss.seam.Entity.NotEntityException;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-/**
- * Support for non-standardized features of Hibernate, when
- * used as the JPA persistence provider.
- * 
- * @author Gavin King
- * @author Pete Muir
- *
- */
- at Name("org.jboss.seam.persistence.persistenceProvider")
- at Scope(ScopeType.STATELESS)
- at BypassInterceptors
- at Install(precedence=FRAMEWORK, classDependencies={"org.hibernate.Session", "javax.persistence.EntityManager"})
-public class HibernatePersistenceProvider extends PersistenceProvider
-{
-   
-   private static Log log = Logging.getLog(HibernatePersistenceProvider.class);
-   private static Class FULL_TEXT_SESSION_PROXY_CLASS;
-   private static Method FULL_TEXT_SESSION_CONSTRUCTOR;
-   private static Class FULL_TEXT_ENTITYMANAGER_PROXY_CLASS;
-   private static Method FULL_TEXT_ENTITYMANAGER_CONSTRUCTOR;
-   static
-   {
-      boolean hibernateSearchPresent = false;
-      try 
-      {
-         Class.forName("org.hibernate.search.Version");
-         hibernateSearchPresent = true;
-      }
-      catch (Exception e)
-      {
-         log.debug("Hibernate Search not present", e);
-      }
-      if (hibernateSearchPresent) 
-      {
-         try 
-         {
-            Class searchClass = Class.forName("org.hibernate.search.Search");
-            try 
-            {
-               FULL_TEXT_SESSION_CONSTRUCTOR = searchClass.getDeclaredMethod("getFullTextSession", Session.class);
-            }
-            catch (NoSuchMethodException noSuchMethod) 
-            {
-               log.debug("org.hibernate.search.Search.getFullTextSession(Session) not found, trying deprecated method name createFullTextSession");
-               FULL_TEXT_SESSION_CONSTRUCTOR = searchClass.getDeclaredMethod("createFullTextSession", Session.class);
-            }
-            FULL_TEXT_SESSION_PROXY_CLASS = Class.forName("org.jboss.seam.persistence.FullTextHibernateSessionProxy");
-            Class jpaSearchClass = Class.forName("org.hibernate.search.jpa.Search");
-            try 
-            {
-               FULL_TEXT_ENTITYMANAGER_CONSTRUCTOR = jpaSearchClass.getDeclaredMethod("getFullTextEntityManager", EntityManager.class);   
-            }
-            catch (NoSuchMethodException noSuchMethod) 
-            {
-               log.debug("org.hibernate.search.jpa.getFullTextSession(EntityManager) not found, trying deprecated method name createFullTextEntityManager");
-               FULL_TEXT_ENTITYMANAGER_CONSTRUCTOR = jpaSearchClass.getDeclaredMethod("createFullTextEntityManager", EntityManager.class);
-            }
-            FULL_TEXT_ENTITYMANAGER_PROXY_CLASS = Class.forName("org.jboss.seam.persistence.FullTextEntityManagerProxy");
-            log.debug("Hibernate Search is available :-)");
-         }
-         catch (Exception e)
-         {
-            log.debug("Unable to load Hibernate Search for ORM", e);
-         }
-      }    
-   }
-
-   public HibernatePersistenceProvider()
-   {
-      super.init();
-      featureSet.add(Feature.WILDCARD_AS_COUNT_QUERY_SUBJECT);
-   } 
-   
-   /**
-    * Wrap the Hibernate Session in a proxy that supports HQL
-    * EL interpolation and implements FullTextSession if Hibernate
-    * Search is available in the classpath.
-    */
-   static Session proxySession(Session session)
-   {
-      if (FULL_TEXT_SESSION_PROXY_CLASS==null)
-      {
-         if ( session instanceof HibernateSessionProxy )
-         {
-            return session;
-         }
-         else 
-         {  
-            return (Session) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
-                  new Class[] { HibernateSessionProxy.class },
-                  new HibernateSessionInvocationHandler(session));//, (FullTextSession) session) );
-         }
-      }
-      else
-      {
-         try 
-         {
-            if ( FULL_TEXT_SESSION_PROXY_CLASS.isAssignableFrom( session.getClass() ) )
-            {
-               return session;
-            }
-            else {
-               return (Session) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
-                     new Class[] { FULL_TEXT_SESSION_PROXY_CLASS },
-                     new HibernateSessionInvocationHandler( (Session) FULL_TEXT_SESSION_CONSTRUCTOR.invoke(null, session) ) );
-            }
-         }
-         catch(Exception e) {
-            log.warn("Unable to wrap into a FullTextSessionProxy, regular SessionProxy returned", e);
-            if ( session instanceof HibernateSessionProxy ) 
-            {
-               return session;
-            }
-            else {
-               return (Session) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
-                     new Class[] { HibernateSessionProxy.class },
-                     new HibernateSessionInvocationHandler( session) );
-            }
-         }
-      }
-   }
-   
-   /**
-    * Wrap the delegate Hibernate Session in a proxy that supports HQL
-    * EL interpolation and implements FullTextSession if Hibernate
-    * Search is available in the classpath.
-    */
-   @Override
-   public Object proxyDelegate(Object delegate)
-   {
-      try
-      {
-         return proxySession( (Session) delegate );
-      }
-      catch (NotHibernateException nhe)
-      {
-         return super.proxyDelegate(delegate);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("could not proxy delegate", e);
-      }
-   }
-   
-   @Override
-   public void setFlushModeManual(EntityManager entityManager)
-   {
-       try
-       {
-          getSession(entityManager).setFlushMode(FlushMode.MANUAL);
-       }
-       catch (NotHibernateException nhe)
-       {
-          super.setFlushModeManual(entityManager);
-       }
-   }
-   
-   @Override
-   public void setRenderFlushMode()
-   {
-      PersistenceContexts.instance().changeFlushMode(FlushModeType.MANUAL, true);
-   }
-
-   @Override
-   public boolean isDirty(EntityManager entityManager)
-   {
-       try
-       {
-          return getSession(entityManager).isDirty();
-       }
-       catch (NotHibernateException nhe)
-       {
-          return super.isDirty(entityManager);
-       }
-   }
-   
-   @Override
-   public Object getId(Object bean, EntityManager entityManager) 
-   {
-       try
-       {
-          return getSession(entityManager).getIdentifier(bean);
-       }
-       catch (NotHibernateException nhe)
-       {
-          return super.getId(bean, entityManager);
-       }
-       catch (TransientObjectException e) 
-       {
-          if (bean instanceof HibernateProxy)
-          {
-             return super.getId(((HibernateProxy) bean).getHibernateLazyInitializer().getImplementation(), entityManager);
-          }
-          else
-          {
-             return super.getId(bean, entityManager);
-          }
-       }
-   }
-   
-   @Override
-   public Object getVersion(Object bean, EntityManager entityManager) 
-   {
-       try
-       {
-          return getVersion( bean, getSession(entityManager) );
-       }
-       catch (NotHibernateException nhe)
-       {
-          return super.getVersion(bean, entityManager);
-       }
-   }
-   
-   @Override
-   public void checkVersion(Object bean, EntityManager entityManager, Object oldVersion, Object version)
-   {
-       try
-       {
-          checkVersion(bean, getSession(entityManager), oldVersion, version);
-       }
-       catch (NotHibernateException nhe)
-       {
-          super.checkVersion(bean, entityManager, oldVersion, version);
-       }
-   }
-   
-   @Override
-   public void enableFilter(Filter f, EntityManager entityManager)
-   {
-      try
-      {
-         org.hibernate.Filter filter = getSession(entityManager).enableFilter( f.getName() );
-         for ( Map.Entry<String, ValueExpression> me: f.getParameters().entrySet() )
-         {
-            Object filterValue = me.getValue().getValue();
-            if ( filterValue instanceof Collection ) 
-            {
-               filter.setParameterList(me.getKey(), (Collection) filterValue);
-            } 
-            else 
-            {
-               filter.setParameter(me.getKey(), filterValue);
-            }
-         }
-         filter.validate();
-      }
-      catch (NotHibernateException nhe)
-      {
-         super.enableFilter(f, entityManager);
-      }
-
-   }
-   
-   @Override
-   public boolean registerSynchronization(Synchronization sync, EntityManager entityManager)
-   {
-      try
-      {
-         //TODO: just make sure that a Hibernate JPA EntityTransaction
-         //      delegates to the Hibernate Session transaction
-         getSession(entityManager).getTransaction().registerSynchronization(sync);
-         return true;
-      }
-      catch (NotHibernateException nhe)
-      {
-         return super.registerSynchronization(sync, entityManager);
-      }
-
-   }
-
-   @Override
-   public String getName(Object bean, EntityManager entityManager) throws IllegalArgumentException
-   {
-      try 
-      {
-         return getSession(entityManager).getEntityName(bean);
-      } 
-      catch (NotHibernateException nhe)
-      {
-         return super.getName(bean, entityManager);
-      }
-      catch (TransientObjectException e) 
-      {
-         return super.getName(bean, entityManager);
-      }
-   }
-   
-   @Override
-   public EntityManager proxyEntityManager(EntityManager entityManager)
-   {
-      if (FULL_TEXT_ENTITYMANAGER_PROXY_CLASS==null)
-      {
-         return super.proxyEntityManager(entityManager);
-      }
-      else
-      {
-         try
-         {
-            return (EntityManager) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
-                  new Class[] { FULL_TEXT_ENTITYMANAGER_PROXY_CLASS },
-                  new EntityManagerInvocationHandler(
-                        (EntityManager) FULL_TEXT_ENTITYMANAGER_CONSTRUCTOR.invoke(null,
-                              super.proxyEntityManager(entityManager))));
-         }
-         catch (Exception e)
-         {
-            //throw new RuntimeException("could not proxy FullTextEntityManager", e);
-            return super.proxyEntityManager(entityManager);
-         }
-      }
-   }
-   
-   public static void checkVersion(Object value, Session session, Object oldVersion, Object version)
-   {
-      ClassMetadata classMetadata = getClassMetadata(value, session);
-      VersionType versionType = (VersionType) classMetadata.getPropertyTypes()[ classMetadata.getVersionProperty() ];
-      if ( !versionType.isEqual(oldVersion, version) )
-      {
-         throw new StaleStateException("current database version number does not match passivated version number");
-      }
-   }
-   
-   public static Object getVersion(Object value, Session session)
-   {
-      ClassMetadata classMetadata = getClassMetadata(value, session);
-      return classMetadata!=null && classMetadata.isVersioned() ? 
-               classMetadata.getVersion(value) : null;
-   }
-   
-   private static ClassMetadata getClassMetadata(Object value, Session session)
-   {
-      Class entityClass = getEntityClass(value);
-      ClassMetadata classMetadata = null;
-      if (entityClass!=null)
-      {
-         classMetadata = session.getSessionFactory().getClassMetadata(entityClass);
-         if (classMetadata==null)
-         {
-            throw new IllegalArgumentException( 
-                     "Could not find ClassMetadata object for entity class: " + 
-                     entityClass.getName() 
-                  );
-         }
-      }
-      return classMetadata;
-   }
-   
-   /**
-    * Returns the class of the specified Hibernate entity
-    */
-   @Override
-   public Class getBeanClass(Object bean)
-   {
-      return getEntityClass(bean);
-   }
-   
-   public static Class getEntityClass(Object bean)
-   {
-      Class clazz = null;
-      try
-      {
-         clazz = Entity.forBean(bean).getBeanClass();
-      }
-      catch (NotEntityException e) {
-         // It's ok, try some other methods
-      }
-      
-      if (clazz == null)
-      {
-         clazz = Hibernate.getClass(bean);
-      }
-      
-      return clazz;
-   }
-   
-   private Session getSession(EntityManager entityManager)
-   {
-      Object delegate = entityManager.getDelegate();
-      if ( delegate instanceof Session )
-      {
-         return (Session) delegate;
-      }
-      else
-      {
-         throw new NotHibernateException();
-      }
-   }
-   
-   /**
-    * Occurs when Hibernate is in the classpath, but this particular
-    * EntityManager is not from Hibernate
-    * 
-    * @author Gavin King
-    *
-    */
-   static class NotHibernateException extends IllegalArgumentException {}
-   
-   public static HibernatePersistenceProvider instance()
-   {
-       return (HibernatePersistenceProvider) Component.getInstance(HibernatePersistenceProvider.class, ScopeType.STATELESS);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,248 +0,0 @@
-//$Id: HibernateSessionFactory.java 6143 2007-09-07 00:59:34Z gavin $
-package org.jboss.seam.persistence;
-
-import java.io.File;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.cfg.Environment;
-import org.hibernate.cfg.NamingStrategy;
-import org.hibernate.internal.util.ReflectHelper;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.security.HibernateSecurityInterceptor;
-import org.jboss.seam.util.Naming;
-
-/**
- * A Seam component that bootstraps a Hibernate SessionFactory
- * 
- * <p>
- * Loads Hibernate configuration options by checking:
- * <li>hibernate.properties in root of the classpath
- * <li>hibernate.cfg.xml in root of the classpath
- * <li>cfgResourceName as location of a cfg.xml file
- * <li>factory-supplied cfgProperties options
- * <p>
- * Note that this factory only supports cfg.xml files <b>or</b> programmatic
- * <tt>cfgProperties</tt> supplied to the factory. Any
- * <tt>hibernate.properties</tt> are always loaded from the classpath.
- * <p>
- * Mapping metadata can be supplied via
- * <li>mappingClasses: equivalent to &lt;mapping class="..."/>
- * <li>mappingFiles: equivalent to &lt;mapping file="..."/>
- * <li>mappingJars: equivalent to &lt;mapping jar="..."/>
- * <li>mappingPackages: equivalent to &lt;mapping package="..."/>
- * <li>mappingResources: equivalent to &lt;mapping resource="..."/>
- * <p>
- * or via cfg.xml files.
- * <p>
- * The <tt>jndiProperties</tt> are convenience, the factory will automatically
- * prefix regular JNDI properties for use as Hibernate configuration properties.
- * 
- * @author Gavin King
- * @author Christian Bauer
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Startup
-public class HibernateSessionFactory
-{
-   private SessionFactory sessionFactory;
-
-   private String cfgResourceName;
-   private Map<String, String> cfgProperties;
-   private List<String> mappingClasses;
-   private List<String> mappingFiles;
-   private List<String> mappingJars;
-   private List<String> mappingPackages;
-   private List<String> mappingResources;
-   private NamingStrategy namingStrategy;
-   
-   @Unwrap
-   public SessionFactory getSessionFactory() throws Exception
-   {
-      return sessionFactory;
-   }
-   
-   @Create
-   public void startup() throws Exception
-   {
-      sessionFactory = createSessionFactory();
-   }
-   
-   @Destroy
-   public void shutdown()
-   {
-      if (sessionFactory!=null)
-      {
-         sessionFactory.close();
-      }
-   }
-
-   protected SessionFactory createSessionFactory() throws ClassNotFoundException
-   {
-      Configuration configuration = new Configuration();
-      
-      // setup non-default naming strategy
-      if (namingStrategy != null)
-      {
-         configuration.setNamingStrategy(namingStrategy);
-      }
-      
-      // Programmatic configuration
-      if (cfgProperties != null)
-      {
-         Properties props = new Properties();
-         props.putAll(cfgProperties);
-         configuration.setProperties(props);
-      }
-      Hashtable<String, String> jndiProperties = Naming.getInitialContextProperties();
-      if ( jndiProperties!=null )
-      {
-         // Prefix regular JNDI properties for Hibernate
-         for (Map.Entry<String, String> entry : jndiProperties.entrySet())
-         {
-            configuration.setProperty( Environment.JNDI_PREFIX + "." + entry.getKey(), entry.getValue() );
-         }
-      }
-      // hibernate.cfg.xml configuration
-      if (cfgProperties==null && cfgResourceName==null)
-      {
-         configuration.configure();
-      } 
-      else if (cfgProperties==null && cfgResourceName!=null)
-      {
-         configuration.configure(cfgResourceName);
-      }
-      // Mapping metadata
-      if (mappingClasses!=null)
-      {
-         for (String className: mappingClasses) 
-         {
-            configuration.addAnnotatedClass(ReflectHelper.classForName(className));
-         }
-      }
-      if (mappingFiles!=null)
-      {
-         for (String fileName: mappingFiles) 
-         {
-            configuration.addFile(fileName);
-         }
-      }
-      if (mappingJars!=null)
-      {
-         for (String jarName: mappingJars) 
-         {
-            configuration.addJar(new File(jarName));
-         }
-      }
-      if (mappingPackages!= null)
-      {
-         for (String packageName: mappingPackages) 
-         {
-            configuration.addPackage(packageName);
-         }
-      }
-      if (mappingResources!= null)
-      {
-         for (String resourceName : mappingResources) 
-         {
-            configuration.addResource(resourceName);
-         }
-      }
-      
-      configuration.setInterceptor(new HibernateSecurityInterceptor(configuration.getInterceptor()));
-      
-      return configuration.buildSessionFactory();
-   }
-   
-   public String getCfgResourceName()
-   {
-      return cfgResourceName;
-   }
-   
-   public void setCfgResourceName(String cfgFileName)
-   {
-      this.cfgResourceName = cfgFileName;
-   }
-   
-   public NamingStrategy getNamingStrategy()
-   {
-      return namingStrategy;
-   }
-   
-   public void setNamingStrategy(NamingStrategy namingStrategy)
-   {
-      this.namingStrategy = namingStrategy;
-   }
-   
-   public Map<String, String> getCfgProperties()
-   {
-      return cfgProperties;
-   }
-   
-   public void setCfgProperties(Map<String, String> cfgProperties)
-   {
-      this.cfgProperties = cfgProperties;
-   }
-   
-   public List<String> getMappingClasses()
-   {
-      return mappingClasses;
-   }
-   
-   public void setMappingClasses(List<String> mappingClasses)
-   {
-      this.mappingClasses = mappingClasses;
-   }
-   
-   public List<String> getMappingFiles()
-   {
-      return mappingFiles;
-   }
-   
-   public void setMappingFiles(List<String> mappingFiles)
-   {
-      this.mappingFiles = mappingFiles;
-   }
-   
-   public List<String> getMappingJars()
-   {
-      return mappingJars;
-   }
-   
-   public void setMappingJars(List<String> mappingJars)
-   {
-      this.mappingJars = mappingJars;
-   }
-   
-   public List<String> getMappingPackages()
-   {
-      return mappingPackages;
-   }
-   
-   public void setMappingPackages(List<String> mappingPackages)
-   {
-      this.mappingPackages = mappingPackages;
-   }
-   
-   public List<String> getMappingResources()
-   {
-      return mappingResources;
-   }
-   
-   public void setMappingResources(List<String> mappingResources)
-   {
-      this.mappingResources = mappingResources;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionInvocationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,815 +0,0 @@
-package org.jboss.seam.persistence;
-
-import java.io.Serializable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.sql.Connection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.hibernate.CacheMode;
-import org.hibernate.Criteria;
-import org.hibernate.Filter;
-import org.hibernate.FlushMode;
-import org.hibernate.HibernateException;
-import org.hibernate.Interceptor;
-import org.hibernate.LobHelper;
-import org.hibernate.LockMode;
-import org.hibernate.LockOptions;
-import org.hibernate.Query;
-import org.hibernate.ReplicationMode;
-import org.hibernate.SQLQuery;
-import org.hibernate.ScrollMode;
-import org.hibernate.ScrollableResults;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.SharedSessionBuilder;
-import org.hibernate.Transaction;
-import org.hibernate.TypeHelper;
-import org.hibernate.cache.spi.CacheKey;
-import org.hibernate.collection.spi.PersistentCollection;
-import org.hibernate.engine.jdbc.spi.JdbcConnectionAccess;
-import org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification;
-import org.hibernate.engine.spi.ActionQueue;
-import org.hibernate.engine.spi.EntityEntry;
-import org.hibernate.engine.spi.EntityKey;
-import org.hibernate.engine.spi.LoadQueryInfluencers;
-import org.hibernate.engine.spi.NonFlushedChanges;
-import org.hibernate.engine.spi.PersistenceContext;
-import org.hibernate.engine.spi.QueryParameters;
-import org.hibernate.engine.spi.SessionFactoryImplementor;
-import org.hibernate.engine.spi.SessionImplementor;
-import org.hibernate.engine.transaction.spi.TransactionCoordinator;
-import org.hibernate.event.spi.EventSource;
-import org.hibernate.internal.CriteriaImpl;
-import org.hibernate.jdbc.ReturningWork;
-import org.hibernate.jdbc.Work;
-import org.hibernate.loader.custom.CustomQuery;
-import org.hibernate.persister.entity.EntityPersister;
-import org.hibernate.stat.SessionStatistics;
-import org.hibernate.type.Type;
-
-/**
- * InvocationHandler that proxies the Session, and implements EL interpolation
- * in HQL. Needs to implement SessionImplementor because DetachedCriteria casts
- * the Session to SessionImplementor.
- * 
- * @author Gavin King
- * @author Emmanuel Bernard
- * @author Mike Youngstrom
- * @author Marek Novotny
- * 
- */
-public class HibernateSessionInvocationHandler implements InvocationHandler, Serializable, EventSource
-{
-     
-   private static final long serialVersionUID = 4954720887288965536L;
-   
-   private Session delegate;
-   
-   public HibernateSessionInvocationHandler(Session paramDelegate)
-   {
-      this.delegate = paramDelegate;
-   }
-     
-   public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
-   {
-      try
-      {
-         if ("createQuery".equals(method.getName()) && method.getParameterTypes().length > 0 && method.getParameterTypes()[0].equals(String.class))
-         {
-            return handleCreateQueryWithString(method, args);
-         }
-         if ("reconnect".equals(method.getName()) && method.getParameterTypes().length == 0)
-         {
-            return handleReconnectNoArg(method);
-         }
-         return method.invoke(delegate, args);
-      }
-      catch (InvocationTargetException e)
-      {
-         throw e.getTargetException();
-      }
-   }
-   
-   protected Object handleCreateQueryWithString(Method method, Object[] args) throws Throwable
-   {
-      if (args[0] == null)
-      {
-         //return method.invoke(getDelegate(method), args);
-         return method.invoke(delegate, args);
-      }
-      String ejbql = (String) args[0];
-      if (ejbql.indexOf('#') > 0)
-      {
-         QueryParser qp = new QueryParser(ejbql);
-         Object[] newArgs = args.clone();
-         newArgs[0] = qp.getEjbql();
-         //Query query = (Query) method.invoke(getDelegate(method), newArgs);
-         Query query = (Query) method.invoke(delegate, newArgs);
-         for (int i = 0; i < qp.getParameterValueBindings().size(); i++)
-         {
-            query.setParameter(QueryParser.getParameterName(i), qp.getParameterValueBindings().get(i).getValue());
-         }
-         return query;
-      }
-      else
-      {
-         return method.invoke(delegate, args);
-      }
-   }
-   
-   protected Object handleReconnectNoArg(Method method) throws Throwable
-   {
-      throw new UnsupportedOperationException("deprecated");
-   }
-
-   public Interceptor getInterceptor()
-   {
-      return ((SessionImplementor) delegate).getInterceptor();
-   }
-
-   public void setAutoClear(boolean paramBoolean)
-   {
-      ((SessionImplementor) delegate).setAutoClear(paramBoolean);
-   }
-
-   public boolean isTransactionInProgress()
-   {
-      return ((SessionImplementor) delegate).isTransactionInProgress();
-   }
-
-   public void initializeCollection(PersistentCollection paramPersistentCollection, boolean paramBoolean) throws HibernateException
-   {
-      ((SessionImplementor) delegate).initializeCollection(paramPersistentCollection, paramBoolean);
-   }
-
-   public Object internalLoad(String paramString, Serializable paramSerializable, boolean paramBoolean1, boolean paramBoolean2) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).internalLoad(paramString, paramSerializable, paramBoolean1, paramBoolean2);
-   }
-
-   public Object immediateLoad(String paramString, Serializable paramSerializable) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).immediateLoad(paramString, paramSerializable);
-   }
-
-   public long getTimestamp()
-   {
-      return ((SessionImplementor) delegate).getTimestamp();
-   }
-
-   public SessionFactoryImplementor getFactory()
-   {
-      return ((SessionImplementor) delegate).getFactory();
-   }
-
-   public List list(String paramString, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).list(paramString, paramQueryParameters);
-   }
-
-   public Iterator iterate(String paramString, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).iterate(paramString, paramQueryParameters);
-   }
-
-   public ScrollableResults scroll(String paramString, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).scroll(paramString, paramQueryParameters);
-   }
-
-   public ScrollableResults scroll(CriteriaImpl paramCriteriaImpl, ScrollMode paramScrollMode)
-   {
-      return ((SessionImplementor) delegate).scroll(paramCriteriaImpl, paramScrollMode);
-   }
-
-   public List list(CriteriaImpl paramCriteriaImpl)
-   {
-      return ((SessionImplementor) delegate).list(paramCriteriaImpl);
-   }
-
-   public List listFilter(Object paramObject, String paramString, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).listFilter(paramObject, paramString, paramQueryParameters);
-   }
-
-   public Iterator iterateFilter(Object paramObject, String paramString, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).iterateFilter(paramObject, paramString, paramQueryParameters);
-   }
-
-   public EntityPersister getEntityPersister(String paramString, Object paramObject) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).getEntityPersister(paramString, paramObject);
-   }
-
-   public Object getEntityUsingInterceptor(EntityKey paramEntityKey) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).getEntityUsingInterceptor(paramEntityKey);
-   }
-
-   public Serializable getContextEntityIdentifier(Object paramObject)
-   {
-      return ((SessionImplementor) delegate).getContextEntityIdentifier(paramObject);
-   }
-
-   public String bestGuessEntityName(Object paramObject)
-   {
-      return ((SessionImplementor) delegate).bestGuessEntityName(paramObject);
-   }
-
-   public String guessEntityName(Object paramObject) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).guessEntityName(paramObject);
-   }
-
-   public Object instantiate(String paramString, Serializable paramSerializable) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).instantiate(paramString, paramSerializable);
-   }
-
-   public List listCustomQuery(CustomQuery paramCustomQuery, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).listCustomQuery(paramCustomQuery, paramQueryParameters);
-   }
-
-   public ScrollableResults scrollCustomQuery(CustomQuery paramCustomQuery, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).scrollCustomQuery(paramCustomQuery, paramQueryParameters);
-   }
-
-   public List list(NativeSQLQuerySpecification paramNativeSQLQuerySpecification, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).list(paramNativeSQLQuerySpecification, paramQueryParameters);
-   }
-
-   public ScrollableResults scroll(NativeSQLQuerySpecification paramNativeSQLQuerySpecification, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).scroll(paramNativeSQLQuerySpecification, paramQueryParameters);
-   }
-
-   public Object getFilterParameterValue(String paramString)
-   {
-      return ((SessionImplementor) delegate).getFilterParameterValue(paramString);
-   }
-
-   public Type getFilterParameterType(String paramString)
-   {
-      return ((SessionImplementor) delegate).getFilterParameterType(paramString);
-   }
-
-   public Map getEnabledFilters()
-   {
-      return ((SessionImplementor) delegate).getEnabledFilters();
-   }
-
-   public int getDontFlushFromFind()
-   {
-      return ((SessionImplementor) delegate).getDontFlushFromFind();
-   }
-
-   public PersistenceContext getPersistenceContext()
-   {
-      return ((SessionImplementor) delegate).getPersistenceContext();
-   }
-
-   public int executeUpdate(String paramString, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).executeUpdate(paramString, paramQueryParameters);
-   }
-
-   public int executeNativeUpdate(NativeSQLQuerySpecification paramNativeSQLQuerySpecification, QueryParameters paramQueryParameters) throws HibernateException
-   {
-      return ((SessionImplementor) delegate).executeNativeUpdate(paramNativeSQLQuerySpecification, paramQueryParameters);
-   }
-
-   public CacheMode getCacheMode()
-   {
-      return ((SessionImplementor) delegate).getCacheMode();
-   }
-
-   public void setCacheMode(CacheMode paramCacheMode)
-   {
-      ((SessionImplementor) delegate).setCacheMode(paramCacheMode);      
-   }
-
-   public boolean isOpen()
-   {
-      return ((SessionImplementor) delegate).isOpen();
-   }
-
-   public boolean isConnected()
-   {
-      return ((SessionImplementor) delegate).isConnected();
-   }
-
-   public FlushMode getFlushMode()
-   {
-      return ((SessionImplementor) delegate).getFlushMode();
-   }
-
-   public void setFlushMode(FlushMode paramFlushMode)
-   {
-      ((SessionImplementor) delegate).setFlushMode(paramFlushMode);      
-   }
-
-   public Connection connection()
-   {
-      return ((SessionImplementor) delegate).connection();
-   }
-
-   public void flush()
-   {
-      ((SessionImplementor) delegate).flush();   
-   }
-
-   public Query getNamedQuery(String paramString)
-   {
-      return ((SessionImplementor) delegate).getNamedQuery(paramString);
-   }
-
-   public Query getNamedSQLQuery(String paramString)
-   {
-      return ((SessionImplementor) delegate).getNamedSQLQuery(paramString);
-   }
-
-   public boolean isEventSource()
-   {
-      return ((SessionImplementor) delegate).isEventSource();
-   }
-
-   public void afterScrollOperation()
-   {
-      ((SessionImplementor) delegate).afterScrollOperation();      
-   }
-
-   public String getFetchProfile()
-   {
-      return ((SessionImplementor) delegate).getFetchProfile();
-   }
-
-   public void setFetchProfile(String paramString)
-   {
-      ((SessionImplementor) delegate).setFetchProfile(paramString);      
-   }
-
-   public boolean isClosed()
-   {
-      return ((SessionImplementor) delegate).isClosed();
-   }
-
-   public SessionFactory getSessionFactory()
-   {
-      return delegate.getSessionFactory();
-   }
-
-   public Connection close() throws HibernateException
-   {
-      return delegate.close();
-   }
-
-   public void cancelQuery() throws HibernateException
-   {
-      delegate.cancelQuery();
-   }
-
-   public boolean isDirty() throws HibernateException
-   {
-      return delegate.isDirty();
-   }
-
-   public boolean isDefaultReadOnly()
-   {
-      return ((HibernateSessionInvocationHandler) delegate).isDefaultReadOnly();
-   }
-
-   public void setDefaultReadOnly(boolean paramBoolean)
-   {
-      ((HibernateSessionInvocationHandler) delegate).setDefaultReadOnly(paramBoolean);      
-   }
-
-   public Serializable getIdentifier(Object paramObject) throws HibernateException
-   {
-      return delegate.getIdentifier(paramObject);
-   }
-
-   public boolean contains(Object paramObject)
-   {
-      return delegate.contains(paramObject);
-   }
-
-   public void evict(Object paramObject) throws HibernateException
-   {
-      delegate.evict(paramObject);
-   }
-
-   public Object load(Class paramClass, Serializable paramSerializable, LockMode paramLockMode) throws HibernateException
-   {
-      return delegate.load(paramClass, paramSerializable, paramLockMode);
-   }
-
-   public Object load(String paramString, Serializable paramSerializable, LockMode paramLockMode) throws HibernateException
-   {
-      return delegate.load(paramString, paramSerializable, paramLockMode);
-   }
-
-   public Object load(Class paramClass, Serializable paramSerializable) throws HibernateException
-   {
-      return delegate.load(paramClass, paramSerializable);
-   }
-
-   public Object load(String paramString, Serializable paramSerializable) throws HibernateException
-   {
-      return delegate.load(paramString, paramSerializable);
-   }
-
-   public void load(Object paramObject, Serializable paramSerializable) throws HibernateException
-   {
-      delegate.load(paramObject, paramSerializable);      
-   }
-
-   public void replicate(Object paramObject, ReplicationMode paramReplicationMode) throws HibernateException
-   {
-      delegate.replicate(paramObject, paramReplicationMode);      
-   }
-
-   public void replicate(String paramString, Object paramObject, ReplicationMode paramReplicationMode) throws HibernateException
-   {
-      delegate.replicate(paramString, paramObject, paramReplicationMode);      
-   }
-
-   public Serializable save(Object paramObject) throws HibernateException
-   {
-      return delegate.save(paramObject);
-   }
-
-   public Serializable save(String paramString, Object paramObject) throws HibernateException
-   {
-      return delegate.save(paramString, paramObject);
-   }
-
-   public void saveOrUpdate(Object paramObject) throws HibernateException
-   {
-      delegate.saveOrUpdate(paramObject);      
-   }
-
-   public void saveOrUpdate(String paramString, Object paramObject) throws HibernateException
-   {
-      delegate.saveOrUpdate(paramString, paramObject);      
-   }
-
-   public void update(Object paramObject) throws HibernateException
-   {
-      delegate.update(paramObject);      
-   }
-
-   public void update(String paramString, Object paramObject) throws HibernateException
-   {
-      delegate.update(paramString, paramObject);      
-   }
-
-   public Object merge(Object paramObject) throws HibernateException
-   {
-      return delegate.merge(paramObject);
-   }
-
-   public Object merge(String paramString, Object paramObject) throws HibernateException
-   {
-      return delegate.merge(paramString, paramObject);
-   }
-
-   public void persist(Object paramObject) throws HibernateException
-   {
-      delegate.persist(paramObject);
-   }
-
-   public void persist(String paramString, Object paramObject) throws HibernateException
-   {
-      delegate.persist(paramString, paramObject);
-   }
-
-   public void delete(Object paramObject) throws HibernateException
-   {
-      delegate.delete(paramObject);
-   }
-
-   public void delete(String paramString, Object paramObject) throws HibernateException
-   {
-      ((EventSource) delegate).delete(paramString, paramObject);
-   }
-
-   public void lock(Object paramObject, LockMode paramLockMode) throws HibernateException
-   {
-      delegate.lock(paramObject, paramLockMode);      
-   }
-
-   public void lock(String paramString, Object paramObject, LockMode paramLockMode) throws HibernateException
-   {
-      delegate.lock(paramString, paramObject, paramLockMode);      
-   }
-
-   public void refresh(Object paramObject) throws HibernateException
-   {
-      delegate.refresh(paramObject);
-   }
-
-   public void refresh(Object paramObject, LockMode paramLockMode) throws HibernateException
-   {
-      delegate.refresh(paramObject, paramLockMode);
-   }
-
-   public LockMode getCurrentLockMode(Object paramObject) throws HibernateException
-   {
-      return delegate.getCurrentLockMode(paramObject);
-   }
-
-   public Transaction beginTransaction() throws HibernateException
-   {
-      return delegate.beginTransaction();
-   }
-
-   public Transaction getTransaction()
-   {
-      return delegate.getTransaction();
-   }
-
-   public Criteria createCriteria(Class paramClass)
-   {
-      return delegate.createCriteria(paramClass);
-   }
-
-   public Criteria createCriteria(Class paramClass, String paramString)
-   {
-      return delegate.createCriteria(paramClass, paramString);
-   }
-
-   public Criteria createCriteria(String paramString)
-   {
-      return delegate.createCriteria(paramString);
-   }
-
-   public Criteria createCriteria(String paramString1, String paramString2)
-   {
-      return delegate.createCriteria(paramString1, paramString2);
-   }
-
-   public Query createQuery(String paramString) throws HibernateException
-   {
-      return delegate.createQuery(paramString);
-   }
-
-   public SQLQuery createSQLQuery(String paramString) throws HibernateException
-   {
-      return delegate.createSQLQuery(paramString);
-   }
-
-   public Query createFilter(Object paramObject, String paramString) throws HibernateException
-   {
-      return delegate.createFilter(paramObject, paramString);
-   }
-
-   public void clear()
-   {
-      delegate.clear();      
-   }
-
-   public Object get(Class paramClass, Serializable paramSerializable) throws HibernateException
-   {
-      return delegate.get(paramClass, paramSerializable);
-   }
-
-   public Object get(Class paramClass, Serializable paramSerializable, LockMode paramLockMode) throws HibernateException
-   {
-      return delegate.get(paramClass, paramSerializable, paramLockMode);
-   }
-
-   public Object get(String paramString, Serializable paramSerializable) throws HibernateException
-   {
-      return delegate.get(paramString, paramSerializable);
-   }
-
-   public Object get(String paramString, Serializable paramSerializable, LockMode paramLockMode) throws HibernateException
-   {
-      return delegate.get(paramString, paramSerializable, paramLockMode);
-   }
-
-   public String getEntityName(Object paramObject) throws HibernateException
-   {
-      return delegate.getEntityName(paramObject);
-   }
-
-   public Filter enableFilter(String paramString)
-   {
-      return delegate.enableFilter(paramString);
-   }
-
-   public Filter getEnabledFilter(String paramString)
-   {
-      return delegate.getEnabledFilter(paramString);
-   }
-
-   public void disableFilter(String paramString)
-   {
-      delegate.disableFilter(paramString);      
-   }
-
-   public SessionStatistics getStatistics()
-   {
-      return delegate.getStatistics();
-   }
-
-   public boolean isReadOnly(Object paramObject)
-   {
-      return ((HibernateSessionInvocationHandler) delegate).isReadOnly(paramObject);
-   }
-
-   public void setReadOnly(Object paramObject, boolean paramBoolean)
-   {
-      delegate.setReadOnly(paramObject, paramBoolean);
-   }
-
-   public void doWork(Work paramWork) throws HibernateException
-   {
-      delegate.doWork(paramWork);
-   }
-
-   public Connection disconnect() throws HibernateException
-   {
-      return delegate.disconnect();
-   }
-
-   public void reconnect(Connection paramConnection) throws HibernateException
-   {
-      delegate.reconnect(paramConnection);
-   }
-
-   public boolean isFetchProfileEnabled(String paramString)
-   {
-      return ((HibernateSessionInvocationHandler) delegate).isFetchProfileEnabled(paramString);
-   }
-
-   public void enableFetchProfile(String paramString)
-   {
-      ((HibernateSessionInvocationHandler) delegate).enableFetchProfile(paramString);
-   }
-
-   public void disableFetchProfile(String paramString)
-   {
-      ((HibernateSessionInvocationHandler) delegate).disableFetchProfile(paramString);
-   }
-
-   public ActionQueue getActionQueue()
-   {
-      return ((EventSource) delegate).getActionQueue();
-   }
-
-   public Object instantiate(EntityPersister paramEntityPersister, Serializable paramSerializable) throws HibernateException
-   {
-      return ((EventSource) delegate).instantiate(paramEntityPersister, paramSerializable);
-   }
-
-   public void forceFlush(EntityEntry paramEntityEntry) throws HibernateException
-   {
-      ((EventSource) delegate).forceFlush(paramEntityEntry);
-   }
-
-   public void merge(String paramString, Object paramObject, Map paramMap) throws HibernateException
-   {
-      ((EventSource) delegate).merge(paramString, paramObject, paramMap);
-   }
-
-   public void persist(String paramString, Object paramObject, Map paramMap) throws HibernateException
-   {
-      ((EventSource) delegate).persist(paramString, paramObject, paramMap);
-   }
-
-   public void persistOnFlush(String paramString, Object paramObject, Map paramMap)
-   {
-      ((EventSource) delegate).persistOnFlush(paramString, paramObject, paramMap);
-   }
-
-   public void refresh(Object paramObject, Map paramMap) throws HibernateException
-   {
-      ((EventSource) delegate).refresh(paramObject, paramMap);
-   }
-
-   public void delete(String paramString, Object paramObject, boolean paramBoolean, Set paramSet)
-   {
-      ((EventSource) delegate).delete(paramString, paramObject, paramBoolean, paramSet);
-   }
-
-   public String getTenantIdentifier()
-   {
-     return delegate.getTenantIdentifier();
-   }
-
-   public JdbcConnectionAccess getJdbcConnectionAccess()
-   {
-      return ((SessionImplementor) delegate).getJdbcConnectionAccess();
-   }
-
-   public EntityKey generateEntityKey(Serializable id, EntityPersister persister)
-   {
-      return ((SessionImplementor) delegate).generateEntityKey(id, persister);
-   }
-
-   public CacheKey generateCacheKey(Serializable id, Type type, String entityOrRoleName)
-   {
-      return ((SessionImplementor) delegate).generateCacheKey(id, type, entityOrRoleName);
-   }
-
-   public void disableTransactionAutoJoin()
-   {
-      ((SessionImplementor) delegate).disableTransactionAutoJoin();
-   }
-
-   public NonFlushedChanges getNonFlushedChanges() throws HibernateException
-   {
-      return ((SessionImplementor) delegate).getNonFlushedChanges();
-   }
-
-   public void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges) throws HibernateException
-   {
-      ((SessionImplementor) delegate).applyNonFlushedChanges(nonFlushedChanges);
-   }
-
-   public TransactionCoordinator getTransactionCoordinator()
-   {
-      return ((SessionImplementor) delegate).getTransactionCoordinator();
-   }
-
-   public LoadQueryInfluencers getLoadQueryInfluencers()
-   {
-      return ((SessionImplementor) delegate).getLoadQueryInfluencers();
-   }
-
-   public <T> T execute(Callback<T> callback)
-   {
-      return ((SessionImplementor) delegate).execute(callback);
-   }
-
-   public SharedSessionBuilder sessionWithOptions()
-   {
-      return ((EventSource) delegate).sessionWithOptions();
-   }
-
-   public Object load(Class theClass, Serializable id, LockOptions lockOptions) throws HibernateException
-   {
-      return ((EventSource) delegate).load(theClass, id, lockOptions);
-   }
-
-   public Object load(String entityName, Serializable id, LockOptions lockOptions) throws HibernateException
-   {
-      return ((EventSource) delegate).load(entityName, id, lockOptions);
-   }
-
-   public LockRequest buildLockRequest(LockOptions lockOptions)
-   {
-      return ((EventSource) delegate).buildLockRequest(lockOptions);
-   }
-
-   public void refresh(String entityName, Object object) throws HibernateException
-   {
-      ((EventSource) delegate).refresh(entityName, object);      
-   }
-
-   public void refresh(Object object, LockOptions lockOptions) throws HibernateException
-   {
-      ((EventSource) delegate).refresh(object, lockOptions);      
-   }
-
-   public void refresh(String entityName, Object object, LockOptions lockOptions) throws HibernateException
-   {
-      ((EventSource) delegate).refresh(entityName, object, lockOptions);      
-   }
-
-   public Object get(Class clazz, Serializable id, LockOptions lockOptions) throws HibernateException
-   {
-      return ((EventSource) delegate).get(clazz, id, lockOptions);
-   }
-
-   public Object get(String entityName, Serializable id, LockOptions lockOptions) throws HibernateException
-   {
-      return ((EventSource) delegate).get(entityName, id, lockOptions);
-   }
-
-   public <T> T doReturningWork(ReturningWork<T> work) throws HibernateException
-   {
-      return ((EventSource) delegate).doReturningWork(work);
-   }
-
-   public TypeHelper getTypeHelper()
-   {
-      return ((EventSource) delegate).getTypeHelper();
-   }
-
-   public LobHelper getLobHelper()
-   {
-      return ((EventSource) delegate).getLobHelper();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionProxy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionProxy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionProxy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam.persistence;
-
-import org.hibernate.Session;
-import org.hibernate.engine.spi.SessionImplementor;
-import org.hibernate.event.spi.EventSource;
-
-/**
- * Marker interface that signifies a proxy is using the
- * HibernateSessionInvocationHandler. Also here for backwards compatibility with
- * previous HibernateSessionProxy.
- * 
- * @author Gavin King
- * @author Emmanuel Bernard
- * @author Mike Youngstrom
- * 
- */
-public interface HibernateSessionProxy extends Session, SessionImplementor, EventSource
-{
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-package org.jboss.seam.persistence;
-
-import static org.jboss.seam.ComponentType.STATEFUL_SESSION_BEAN;
-import static org.jboss.seam.ComponentType.STATELESS_SESSION_BEAN;
-
-import org.hibernate.Session;
-import org.jboss.seam.Component.BijectedAttribute;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.annotations.intercept.PostActivate;
-import org.jboss.seam.annotations.intercept.PostConstruct;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.util.Reflections;
-
-/**
- * Proxy the Hibernate Session if injected using @PersistenceContext
- * 
- * @author Pete Muir
- *
- */
-
- at Interceptor(stateless=true)
-public class HibernateSessionProxyInterceptor extends AbstractInterceptor
-{
-
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext ic) throws Exception
-   {
-      return ic.proceed();
-   }
-   
-   @PostActivate
-   public void postActivate(InvocationContext invocation) throws Exception
-   {
-      //just in case the container does some special handling of PC serialization
-      proxyPersistenceContexts(invocation.getTarget());
-      invocation.proceed();
-   }
-   
-   @PostConstruct
-   public void postConstruct(InvocationContext invocation) throws Exception
-   {
-      proxyPersistenceContexts(invocation.getTarget());
-      invocation.proceed();
-   }
-   
-   
-   private void proxyPersistenceContexts(Object bean)
-   {
-      //wrap any @PersistenceContext attributes in our proxy
-      for ( BijectedAttribute ba: getComponent().getPersistenceContextAttributes() )
-      {
-         Object object = ba.get(bean);
-         if ( ! ( object instanceof HibernateSessionProxy) && object instanceof Session)
-         {
-            ba.set( bean, HibernatePersistenceProvider.proxySession( (Session) object ) );
-         }
-      }
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return (getComponent().getType()==STATEFUL_SESSION_BEAN || getComponent().getType()==STATELESS_SESSION_BEAN) && Reflections.isClassAvailable("org.hibernate.Session");
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedEntityInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedEntityInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedEntityInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,80 +0,0 @@
-package org.jboss.seam.persistence;
-
-import static org.jboss.seam.ScopeType.CONVERSATION;
-
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.core.BijectionInterceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.transaction.Transaction;
-
-/**
- * Swizzles entity references around each invocation, maintaining referential
- * integrity even across passivation of the stateful bean or Seam-managed
- * extended persistence context, and allowing for more efficient replication.
- * 
- * @author Gavin King
- * @author Pete Muir
- * 
- */
- at Interceptor(around = BijectionInterceptor.class)
-public class ManagedEntityInterceptor extends AbstractInterceptor
-{
-
-   private static LogProvider log = Logging.getLogProvider(ManagedEntityInterceptor.class);
-   
-   private static ManagedEntityWrapper managedEntityWrapper = new ManagedEntityWrapper();
-
-   private boolean reentrant;
-   
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext ctx) throws Exception
-   {
-      if (reentrant)
-      {
-         return ctx.proceed();
-      }
-      else
-      {
-         reentrant = true;
-         log.trace("Attempting to activate " + getComponent().getName() + " component");
-         managedEntityWrapper.deserialize(ctx.getTarget(), getComponent());
-         log.debug("Activated " + getComponent().getName() + " component");
-         try
-         {
-            return ctx.proceed();
-         }
-         finally
-         {
-            if (!isTransactionRolledBackOrMarkedRollback())
-            {
-               log.trace("Attempting to passivate " + getComponent().getName() + " component");
-               managedEntityWrapper.wrap(ctx.getTarget(), getComponent());
-               reentrant = false;
-               log.debug("Passivated " + getComponent().getName() + " component");
-            }
-         }
-      }
-   }
-
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().getScope() == CONVERSATION;
-   }
-
-   private static boolean isTransactionRolledBackOrMarkedRollback()
-   {
-      try
-      {
-         return Transaction.instance().isRolledBackOrMarkedRollback();
-      }
-      catch (Exception e)
-      {
-         return false;
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedEntityWrapper.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedEntityWrapper.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedEntityWrapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,253 +0,0 @@
-package org.jboss.seam.persistence;
-
-import static org.jboss.seam.util.JSF.DATA_MODEL;
-import static org.jboss.seam.util.JSF.getWrappedData;
-import static org.jboss.seam.util.JSF.setWrappedData;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Reflections;
-
-/**
- * @author Gavin King
- * @author Pete Muir
- * @author Norman Richards
- * @author Dan Allen
- */
-public class ManagedEntityWrapper
-{
-
-   private static LogProvider log = Logging.getLogProvider(ManagedEntityWrapper.class);
-   
-   public void wrap(Object target, Component component) throws Exception
-   {
-      if ( !touchedContextsExist() )
-      {
-         log.trace("No touched persistence contexts. Therefore, there are no entities in this conversation whose identities need to be preserved.");
-         return;
-      }
-      
-      String oldCid = switchToConversationContextOfComponent(component);
-      Class beanClass = target.getClass();
-      for (; beanClass!=Object.class; beanClass=beanClass.getSuperclass())
-      {
-         log.trace("Examining fields on " + beanClass);
-         for ( Field field: beanClass.getDeclaredFields() )
-         {
-            if ( !ignore(field) )
-            {
-               Object value = getFieldValue(target, field);
-               if (value!=null)
-               {
-                  Object dataModel = null;
-                  if ( DATA_MODEL.isInstance(value) )
-                  {
-                     dataModel = value;
-                     value = getWrappedData(dataModel);
-                  }
-                  if ( containsReferenceToEntityInstance(value) )
-                  {
-                     log.trace("Attempting to save wrapper for " + field + " (" + value + ")");
-                     saveWrapper(target, component, field, dataModel, value);
-                  }
-                  else
-                  {
-                     log.trace("Clearing wrapper for " + field + " (" + value + ") as it isn't a entity reference");
-                     clearWrapper(component, field);
-                  }
-               }
-               else
-               {
-                  log.trace("Clearing wrapper for " + field + " as it is null");
-                  clearWrapper(component, field);
-               }
-            }
-            else
-            {
-               log.trace("Ignoring field " + field + " as it is static, transient or annotated with @In");
-            }
-         }
-      }
-      restorePreviousConversationContextIfNecessary(oldCid);
-   }
-
-   public void deserialize(Object controllerBean, Component component) throws Exception
-   {
-      if ( !touchedContextsExist() )
-      {
-         log.trace("No touched persistence contexts. Therefore, there are no entities in this conversation whose identities need to be restored.");
-         return;
-      }
-      
-      Class beanClass = controllerBean.getClass();
-      for (; beanClass!=Object.class; beanClass=beanClass.getSuperclass())
-      {
-         log.trace("Examining fields on " + beanClass);
-         for ( Field field: beanClass.getDeclaredFields() )
-         {
-            if ( !ignore(field) )
-            {
-               Object value = getFieldValue(controllerBean, field);
-               Object dataModel = null;
-               if (value!=null && DATA_MODEL.isInstance(value) )
-               {
-                  dataModel = value;
-               }
-               log.trace("Attempting to restore wrapper for " + field + " (" + value + ")");
-               //TODO: be more selective
-               getFromWrapper(controllerBean, component, field, dataModel);
-            }
-            else
-            {
-               log.trace("Ignoring field " + field + " as it is static, transient or annotated with @In");
-            }
-         }
-      }
-   }
-
-   private boolean containsReferenceToEntityInstance(Object value)
-   {
-      if (value == null)
-      {
-         return false;
-      }
-      else if (value instanceof Collection)
-      {
-         // Do a lazy man's generic check by scanning the collection until an entity is found (nested objects not considered).
-         for (Iterator iter = ((Collection) value).iterator(); iter.hasNext();)
-         {
-            Object v = iter.next();
-            if (v != null && Seam.getEntityClass(v.getClass()) != null)
-            {
-               return true;
-            }
-         }
-         return false;
-      }
-      else if (value instanceof Map)
-      {
-         // Do a lazy man's generic check by scanning the collection until an entity is found (nested objects not considered).
-         for (Iterator iter = ((Map) value).entrySet().iterator(); iter.hasNext();)
-         {
-            Entry e = (Entry) iter.next();
-            if ((e.getKey() != null && Seam.getEntityClass(e.getKey().getClass()) != null) ||
-                  (e.getValue() != null && Seam.getEntityClass(e.getValue().getClass()) != null))
-            {
-               return true;
-            }
-         }
-         return false;
-      }
-      else if (Seam.getEntityClass(value.getClass()) != null)
-      {
-         return true;
-      }
-      
-      return false;
-   }
-
-   private Object getFieldValue(Object bean, Field field) throws Exception
-   {
-      if ( !field.isAccessible() ) field.setAccessible(true);
-      Object value = Reflections.get(field, bean);
-      return value;
-   }
-
-   private boolean ignore(Field field)
-   {
-      return Modifier.isTransient( field.getModifiers() ) || 
-            Modifier.isStatic( field.getModifiers() )
-            || field.isAnnotationPresent(In.class);
-   }
-
-   private boolean touchedContextsExist()
-   {
-       PersistenceContexts touchedContexts = PersistenceContexts.instance();
-       return touchedContexts!=null && touchedContexts.getTouchedContexts().size()>0;
-   }
-
-   private String getFieldId(Component component, Field field)
-   {
-      return component.getName() + '.' + field.getName();
-   }
-
-   private void saveWrapper(Object bean, Component component, Field field, Object dataModel, Object value) throws Exception
-   {
-      Contexts.getConversationContext().set( getFieldId(component, field), value );
-      if (dataModel==null)
-      {
-         Reflections.set(field, bean, null);
-      }
-      else
-      {
-         // JBSEAM-1814, JBPAPP-1616 Clearing the wrapped data is simply unnecessary. Either we leave it alone, or we set the field to null.
-         //setWrappedData(dataModel, null);
-      }
-   }
-
-   private void clearWrapper(Component component, Field field) throws Exception
-   {
-      Contexts.getConversationContext().remove( getFieldId(component, field) );
-   }
-
-   private void getFromWrapper(Object bean, Component component, Field field, Object dataModel) throws Exception
-   {
-      Object value =Contexts.getConversationContext().get( getFieldId(component, field) );
-      if (value!=null)
-      {
-         if (dataModel==null)
-         {
-            Reflections.set(field, bean, value);
-         }
-         else
-         {
-            setWrappedData(dataModel, value);
-         }
-      }
-   }
-   
-   /**
-    * Changes the thread's current conversation context to the one that holds a reference to this
-    * component. This is necessary if a nested conversation is making a call to a component in
-    * a parent conversation.
-    */
-   private String switchToConversationContextOfComponent(Component component)
-   {
-      Manager manager = Manager.instance();
-      if (manager.isNestedConversation())
-      {
-         String currentCid = manager.getCurrentConversationId();
-         String residentCid = manager.getCurrentConversationEntry().findPositionInConversationStack(component);
-         if (!currentCid.equals(residentCid))
-         {
-            Contexts.getConversationContext().flush();
-            Manager.instance().switchConversation(residentCid, false);
-            return currentCid;
-         }
-      }
-      
-      return null;
-   }
-   
-   private void restorePreviousConversationContextIfNecessary(String oldCid)
-   {
-      if (oldCid != null)
-      {
-         Contexts.getConversationContext().flush();
-         Manager.instance().switchConversation(oldCid, false);
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedHibernateSession.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedHibernateSession.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedHibernateSession.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,325 +0,0 @@
-//$Id: ManagedHibernateSession.java 9081 2008-09-22 03:02:30Z dan.j.allen $
-package org.jboss.seam.persistence;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import javax.naming.NamingException;
-import javax.servlet.http.HttpSessionActivationListener;
-import javax.servlet.http.HttpSessionEvent;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-import org.hibernate.FlushMode;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Mutable;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.transaction.UserTransaction;
-import org.jboss.seam.util.Naming;
-
-/**
- * A Seam component that manages a conversation-scoped extended
- * persistence context that can be shared by arbitrary other
- * components.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.CONVERSATION)
- at BypassInterceptors
-public class ManagedHibernateSession 
-   implements Serializable, HttpSessionActivationListener, Mutable, PersistenceContextManager, Synchronization
-{
-   
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 3130309555079841107L;
-
-   private static final LogProvider log = Logging.getLogProvider(ManagedHibernateSession.class);
-   
-   private Session session;
-   private String sessionFactoryJndiName;
-   private String componentName;
-   private ValueExpression<SessionFactory> sessionFactory;
-   private List<Filter> filters = new ArrayList<Filter>(0);
-   
-   private transient boolean synchronizationRegistered;
-   private transient boolean destroyed;
-   
-   public boolean clearDirty()
-   {
-      return true;
-   }
-
-   @Create
-   public void create(Component component)
-   {
-      this.componentName = component.getName();
-      if (sessionFactoryJndiName==null)
-      {
-         sessionFactoryJndiName = "java:/" + componentName;
-      }
-            
-      PersistenceContexts.instance().touch(componentName);
-   }
-
-   private void initSession() throws Exception
-   {
-      session = getSessionFactoryFromJndiOrValueBinding().openSession();
-      setSessionFlushMode( PersistenceContexts.instance().getFlushMode() );
-      session = HibernatePersistenceProvider.proxySession(session);
-      
-      for (Filter f: filters)
-      {
-         if ( f.isFilterEnabled() )
-         {
-            enableFilter(f);
-         }
-      }
-
-      if ( log.isDebugEnabled() )
-      {
-         log.debug("created seam managed session for session factory: "+ sessionFactoryJndiName);
-      }
-   }
-
-   private void enableFilter(Filter f)
-   {
-      org.hibernate.Filter filter = session.enableFilter( f.getName() );
-      for ( Map.Entry<String, ValueExpression> me: f.getParameters().entrySet() )
-      {
-	     Object filterValue = me.getValue().getValue();
-		 if ( filterValue instanceof Collection ) {
-		    filter.setParameterList(me.getKey(), (Collection) filterValue);
-		 } else {
-			filter.setParameter(me.getKey(), filterValue);
-		}
-      }
-      filter.validate();
-   }
-   
-   @Unwrap
-   public Session getSession() throws Exception
-   {
-      if (session==null) initSession();
-      
-      if ( !synchronizationRegistered && !Lifecycle.isDestroying() )
-      {
-         joinTransaction();
-      }
-      
-      return session;
-   }
-
-   private void joinTransaction() throws SystemException
-   {
-      UserTransaction transaction = Transaction.instance();
-      if ( transaction.isActive() )
-      {
-         session.isOpen();
-         try
-         {
-            transaction.registerSynchronization(this);
-         }
-         catch (Exception e)
-         {
-            session.getTransaction().registerSynchronization(this);
-         }
-         synchronizationRegistered = true;
-      }
-   }
-   
-   //we can't use @PrePassivate because it is intercept NEVER
-   public void sessionWillPassivate(HttpSessionEvent event)
-   {
-      if (synchronizationRegistered)
-      {
-         throw new IllegalStateException("cannot passivate persistence context with active transaction");
-      }
-      if ( session!=null && session.isOpen() && !session.isDirty() )
-      {
-         session.close();
-         session = null;
-      }
-   }
-   
-   //we can't use @PostActivate because it is intercept NEVER
-   public void sessionDidActivate(HttpSessionEvent event) {}
-   
-   @Destroy
-   public void destroy()
-   {
-      destroyed = true;
-      if ( !synchronizationRegistered )
-      {
-         //in requests that come through SeamPhaseListener,
-         //there can be multiple transactions per request,
-         //but they are all completed by the time contexts
-         //are destroyed
-         //so wait until the end of the request to close
-         //the session
-         //on the other hand, if we are still waiting for
-         //the transaction to commit, leave it open
-         close();
-      }
-      PersistenceContexts.instance().untouch(componentName);
-   }
-
-   public void afterCompletion(int status)
-   {
-      synchronizationRegistered = false;
-      //if ( !Contexts.isConversationContextActive() )
-      if (destroyed)
-      {
-         //in calls to MDBs and remote calls to SBs, the 
-         //transaction doesn't commit until after contexts
-         //are destroyed, so wait until the transaction
-         //completes before closing the session
-         //on the other hand, if we still have an active
-         //conversation context, leave it open
-         close();
-      }
-   }
-   
-   public void beforeCompletion() {}
-   
-   private void close()
-   {
-      boolean transactionActive = false;
-      try
-      {
-         transactionActive = Transaction.instance().isActive();
-      }
-      catch (SystemException se)
-      {
-         log.debug("could not get transaction status while destroying persistence context");
-      }
-      
-      if ( transactionActive )
-      {
-         throw new IllegalStateException("attempting to destroy the persistence context while an active transaction exists (try installing <transaction:ejb-transaction/>)");
-      }
-      
-      if ( log.isDebugEnabled() )
-      {
-         log.debug("destroying seam managed session for session factory: " + sessionFactoryJndiName);
-      }
-      if (session!=null && session.isOpen())
-      {
-         session.close();
-      }
-   }
-   
-   private SessionFactory getSessionFactoryFromJndiOrValueBinding()
-   {
-      SessionFactory result = null;
-      //first try to find it via the value binding
-      if (sessionFactory!=null)
-      {
-         result = sessionFactory.getValue();
-      }
-      //if its not there, try JNDI
-      if (result==null)
-      {
-         try
-         {
-            result = (SessionFactory) Naming.getInitialContext().lookup(sessionFactoryJndiName);
-         }
-         catch (NamingException ne)
-         {
-            throw new IllegalArgumentException("SessionFactory not found in JNDI: " + sessionFactoryJndiName, ne);
-         }
-      }
-      return result;
-   }
-   
-   public String getComponentName() {
-      return componentName;
-   }
-   
-   public void changeFlushMode(FlushModeType flushMode)
-   {
-      if (session!=null && session.isOpen())
-      {
-         setSessionFlushMode(flushMode);
-      }
-   }
-
-   protected void setSessionFlushMode(FlushModeType flushMode)
-   {
-      switch (flushMode)
-      {
-         case AUTO:
-            session.setFlushMode(FlushMode.AUTO);
-            break;
-         case MANUAL:
-            session.setFlushMode(FlushMode.MANUAL);
-            break;
-         case COMMIT:
-            session.setFlushMode(FlushMode.COMMIT);
-            break;
-      }
-   }
-   
-   /**
-    * The JNDI name of the Hibernate SessionFactory, if it is
-    * to be obtained from JNDI
-    */
-   public String getSessionFactoryJndiName()
-   {
-      return sessionFactoryJndiName;
-   }
-
-   public void setSessionFactoryJndiName(String sessionFactoryName)
-   {
-      this.sessionFactoryJndiName = sessionFactoryName;
-   }
-
-   /**
-    * A value binding expression that returns a SessionFactory,
-    * if it is to be obtained as a Seam component reference
-    */
-   public void setSessionFactory(ValueExpression<SessionFactory> sessionFactory)
-   {
-      this.sessionFactory = sessionFactory;
-   }
-
-   public ValueExpression<SessionFactory> getSessionFactory()
-   {
-      return sessionFactory;
-   }
-
-   /**
-    * Hibernate filters to enable automatically
-    */
-   public List<Filter> getFilters()
-   {
-      return filters;
-   }
-
-   public void setFilters(List<Filter> filters)
-   {
-      this.filters = filters;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "ManagedHibernateSession(" + sessionFactoryJndiName + ")";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,342 +0,0 @@
-//$Id: ManagedPersistenceContext.java 11990 2010-01-25 23:55:21Z manaRH $
-package org.jboss.seam.persistence;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.naming.NamingException;
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.servlet.http.HttpSessionActivationListener;
-import javax.servlet.http.HttpSessionEvent;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Mutable;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.transaction.UserTransaction;
-import org.jboss.seam.util.Naming;
-
-/**
- * A Seam component that manages a conversation-scoped extended
- * persistence context that can be shared by arbitrary other
- * components.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.CONVERSATION)
- at BypassInterceptors
- at Install(false)
-public class ManagedPersistenceContext 
-   implements Serializable, HttpSessionActivationListener, Mutable, PersistenceContextManager, Synchronization
-{
-   private static final long serialVersionUID = -4972387440275848126L;
-   private static final LogProvider log = Logging.getLogProvider(ManagedPersistenceContext.class);
-   
-   private transient EntityManager entityManager;
-   private String persistenceUnitJndiName;
-   private String componentName;
-   private ValueExpression<EntityManagerFactory> entityManagerFactory;
-   private List<Filter> filters = new ArrayList<Filter>(0);
-   
-   private transient boolean synchronizationRegistered;
-   private transient boolean destroyed;
-  
-   public boolean clearDirty()
-   {
-      return true;
-   }
-   
-   @Create
-   public void create(Component component)
-   {
-      this.componentName = component.getName();
-      if (persistenceUnitJndiName==null)
-      {
-         persistenceUnitJndiName = "java:/" + componentName;
-      }
-      
-      PersistenceContexts.instance().touch(componentName);      
-   }
-   
-   private void initEntityManager()
-   {
-      entityManager = getEntityManagerFactoryFromJndiOrValueBinding().createEntityManager();
-      PersistenceProvider persistenceProvider = PersistenceProvider.instance();
-      entityManager = persistenceProvider.proxyEntityManager(entityManager);
-      setEntityManagerFlushMode( PersistenceContexts.instance().getFlushMode() );
-
-      for (Filter f: filters)
-      {
-         if ( f.isFilterEnabled() )
-         {
-            persistenceProvider.enableFilter(f, entityManager);
-         }
-      }
-
-      if ( log.isDebugEnabled() )
-      {
-         if (entityManagerFactory==null)
-         {
-            log.debug("created seam managed persistence context for persistence unit: "+ persistenceUnitJndiName);
-         }
-         else 
-         {
-            log.debug("created seam managed persistence context from EntityManagerFactory");
-         }
-      }
-   }
-   
-   @Unwrap
-   public EntityManager getEntityManager() throws NamingException, SystemException
-   {
-      if (entityManager==null) initEntityManager();
-      
-      if ( !synchronizationRegistered && !Lifecycle.isDestroying() )
-      {
-         joinTransaction();
-      }
-      
-      return entityManager;
-   }
-
-   private void joinTransaction() throws SystemException
-   {
-      UserTransaction transaction = Transaction.instance();
-      if ( transaction.isActive() )
-      {
-         transaction.enlist(entityManager);
-         try
-         {
-            transaction.registerSynchronization(this);
-            synchronizationRegistered = true;
-         }
-         catch (Exception e)
-         {
-            synchronizationRegistered = PersistenceProvider.instance().registerSynchronization(this, entityManager);
-         }
-      }
-   }
-   
-   /**
-    * If a transaction is active, fail the passivation. The field holding the
-    * managed EntityManager is marked as transient so that it is not serialized
-    * (it can't be). The transient keyword was choosen because we don't want to
-    * forcefully close and nullify the EntityManager on every request because
-    * then we have to keep hitting the database to load the entities back into
-    * the persistence context. The only downside is that we cannot clean up
-    * on the old node before the session hops, but it turns out not to matter.
-    * 
-    * Note that we must use the method on the
-    * {@link HttpSessionActivationListener} interface rather than
-    * <code>@PrePassivate</code> since interceptors are disabled on this component.
-    */
-   public void sessionWillPassivate(HttpSessionEvent event)
-   {
-      if (synchronizationRegistered)
-      {
-         throw new IllegalStateException("cannot passivate persistence context with active transaction");
-      }
-   }
-   
-   /**
-    * Note that we must use the method on the {@link HttpSessionActivationListener}
-    * interface rather than @PostActivate since interceptors are disabled
-    * on this component.
-    */
-   public void sessionDidActivate(HttpSessionEvent event) {}
-   
-   @Destroy
-   public void destroy()
-   {
-      destroyed = true;
-      if ( !synchronizationRegistered )
-      {
-         //in requests that come through SeamPhaseListener,
-         //there can be multiple transactions per request,
-         //but they are all completed by the time contexts
-         //are destroyed
-         //so wait until the end of the request to close
-         //the session
-         //on the other hand, if we are still waiting for
-         //the transaction to commit, leave it open
-         close();
-      }
-      PersistenceContexts.instance().untouch(componentName);
-   }
-
-   public void afterCompletion(int status)
-   {
-      synchronizationRegistered = false;
-      //if ( !Contexts.isConversationContextActive() )
-      if (destroyed)
-      {
-         //in calls to MDBs and remote calls to SBs, the 
-         //transaction doesn't commit until after contexts
-         //are destroyed, so wait until the transaction
-         //completes before closing the session
-         //on the other hand, if we still have an active
-         //conversation context, leave it open
-         close();
-      }
-   }
-   
-   public void beforeCompletion() {}
-   
-   private void close()
-   {
-      if (Contexts.isEventContextActive()) 
-      {
-
-         boolean transactionActive = false;
-         
-         try
-         {
-            UserTransaction tx = Transaction.instance();
-            try 
-            {
-               transactionActive = tx.isActive();
-            }
-            catch (SystemException se)
-            {
-               log.debug("could not get transaction status while destroying persistence context");
-            }
-         }
-         catch (Exception e)
-         {
-            // WebSphere throws a javax.naming.ConfigurationException when Transaction.instance() is called during HTTP Session expiration 
-            // and there is no JNDI lookup possible. See details there: JBSEAM-4332
-            log.warn("could not get transaction while destroying persistence context. (called during session expiration ?)");
-         }
-         
-         if ( transactionActive )
-         {
-            throw new IllegalStateException("attempting to destroy the persistence context while an active transaction exists (try installing <transaction:ejb-transaction/>)");
-         }
-      }
-      
-      if ( log.isDebugEnabled() )
-      {
-         log.debug("destroying seam managed persistence context for persistence unit: " + persistenceUnitJndiName);
-      }
-      
-      if (entityManager!=null && entityManager.isOpen())
-      {
-         entityManager.close();
-      }
-   }
-   
-   public EntityManagerFactory getEntityManagerFactoryFromJndiOrValueBinding()
-   {
-      EntityManagerFactory result = null;
-      //first try to find it via the value binding
-      if (entityManagerFactory!=null)
-      {
-         result = entityManagerFactory.getValue();
-      }
-      //if its not there, try JNDI
-      if (result==null)
-      {
-         try
-         {
-            result = (EntityManagerFactory) Naming.getInitialContext().lookup(persistenceUnitJndiName);
-         }
-         catch (NamingException ne)
-         {
-            throw new IllegalArgumentException("EntityManagerFactory not found in JNDI : " + persistenceUnitJndiName, ne);
-         }
-      }
-      return result;
-   }
-   
-   /**
-    * A value binding expression that returns an EntityManagerFactory,
-    * for use of JPA outside of Java EE 5 / Embeddable EJB3.
-    */
-   public ValueExpression<EntityManagerFactory> getEntityManagerFactory()
-   {
-      return entityManagerFactory;
-   }
-   
-   public void setEntityManagerFactory(ValueExpression<EntityManagerFactory> entityManagerFactory)
-   {
-      this.entityManagerFactory = entityManagerFactory;
-   }
-   
-   /**
-    * The JNDI name of the EntityManagerFactory, for 
-    * use of JPA in Java EE 5 / Embeddable EJB3.
-    */
-   public String getPersistenceUnitJndiName()
-   {
-      return persistenceUnitJndiName;
-   }
-   
-   public void setPersistenceUnitJndiName(String persistenceUnitName)
-   {
-      this.persistenceUnitJndiName = persistenceUnitName;
-   }
-   
-   public String getComponentName() 
-   {
-      return componentName;
-   }
-   
-   /**
-    * Hibernate filters to enable automatically
-    */
-   public List<Filter> getFilters()
-   {
-      return filters;
-   }
-   
-   public void setFilters(List<Filter> filters)
-   {
-      this.filters = filters;
-   }
-   
-   public void changeFlushMode(FlushModeType flushMode)
-   {
-      if (entityManager!=null && entityManager.isOpen())
-      {
-         setEntityManagerFlushMode(flushMode);
-      }
-   }
-   
-   protected void setEntityManagerFlushMode(FlushModeType flushMode)
-   {
-      switch (flushMode)
-      {
-         case AUTO:
-            entityManager.setFlushMode(javax.persistence.FlushModeType.AUTO);
-            break;
-         case COMMIT:
-            entityManager.setFlushMode(javax.persistence.FlushModeType.COMMIT);
-            break;
-         case MANUAL:
-            PersistenceProvider.instance().setFlushModeManual(entityManager);
-            break;
-      }
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "ManagedPersistenceContext(" + persistenceUnitJndiName + ")";
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceContextManager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceContextManager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceContextManager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,15 +0,0 @@
-package org.jboss.seam.persistence;
-
-import org.jboss.seam.annotations.FlushModeType;
-
-/**
- * Support for changing flushmodes for an existing
- * persistence context.
- * 
- * @author Gavin King
- *
- */
-public interface PersistenceContextManager
-{
-   public void changeFlushMode(FlushModeType flushMode);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceContexts.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceContexts.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceContexts.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,148 +0,0 @@
-package org.jboss.seam.persistence;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.FlushModeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.AbstractMutable;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Maintains the set of persistence contexts that have been touched in a
- * conversation. Also controls the flush mode used by the persistence contexts
- * during the render phase.
- * 
- * @author Gavin King
- */
- at Name("org.jboss.seam.persistence.persistenceContexts")
- at Scope(ScopeType.CONVERSATION)
- at BypassInterceptors
- at Install(precedence=BUILT_IN)
-public class PersistenceContexts extends AbstractMutable implements Serializable
-{
-   private static final long serialVersionUID = -4897350516435283182L;
-   private static final LogProvider log = Logging.getLogProvider(PersistenceContexts.class);
-   private Set<String> set = new HashSet<String>();
-   private FlushModeType flushMode;
-   // the real flush mode is a backup of the flush mode when doing a temporary switch (such as during render)
-   private FlushModeType realFlushMode;
- 
-   @Create
-   public void create()
-   {
-      FlushModeType defaultFlushMode = Manager.instance().getDefaultFlushMode(); 
-      if (defaultFlushMode != null)
-      {
-         flushMode = defaultFlushMode;
-      }
-      else
-      {
-         flushMode = FlushModeType.AUTO;
-      }
-   }
-   
-   public FlushModeType getFlushMode()
-   {
-      return flushMode;
-   }
-   
-   public Set<String> getTouchedContexts()
-   {
-      return Collections.unmodifiableSet(set);
-   }
-   
-   public void touch(String context)
-   {
-      if ( set.add(context) ) setDirty();
-   }
-   
-   public void untouch(String context)
-   {
-      if ( set.remove(context) ) setDirty();
-   }
-   
-   public static PersistenceContexts instance()
-   {
-      if ( Contexts.isConversationContextActive() )
-      {
-         return (PersistenceContexts) Component.getInstance(PersistenceContexts.class);
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   public void changeFlushMode(FlushModeType flushMode)
-   {
-      changeFlushMode(flushMode, false);   
-   }
-
-   public void changeFlushMode(FlushModeType flushMode, boolean temporary)
-   {
-      if (temporary) {
-         realFlushMode = this.flushMode;
-      }
-      this.flushMode = flushMode;
-      changeFlushModes();
-   }
-
-   /**
-    * Restore the previous flush mode if the current flush mode is marked 
-    * as temporary.
-    */
-   public void restoreFlushMode() {
-      if (realFlushMode != null && realFlushMode != flushMode) {
-         flushMode = realFlushMode;
-         realFlushMode = null;
-         changeFlushModes();
-      }
-   }
-
-   private void changeFlushModes()
-   {
-      for (String name: set)
-      {
-         PersistenceContextManager pcm = (PersistenceContextManager) Contexts.getConversationContext().get(name);
-         if (pcm!=null)
-         {
-            try
-            {
-               pcm.changeFlushMode(flushMode);
-            }
-            catch (UnsupportedOperationException uoe)
-            {
-               // we won't be nasty and throw and exception, but we'll log a warning to the developer
-               log.warn(uoe.getMessage());
-            }
-         }
-      }
-   }
-   
-   public void beforeRender()
-   {
-      // some JPA providers may not support MANUAL flushing
-      // defer the decision to the provider manager component
-      PersistenceProvider.instance().setRenderFlushMode();
-   }
-   
-   public void afterRender()
-   {
-      restoreFlushMode();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceProvider.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/PersistenceProvider.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,281 +0,0 @@
-package org.jboss.seam.persistence;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.persistence.EntityManager;
-import javax.persistence.OptimisticLockException;
-import javax.transaction.Synchronization;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Entity;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.intercept.PostConstruct;
-
-/**
- * Abstraction layer for persistence providers (JPA implementations). This class
- * provides a working base implementation that can be optimized for performance
- * and non-standardized features by extending and overriding the methods.
- * 
- * The methods on this class are a great todo list for the next rev of the JPA
- * spec ;-)
- * 
- * @author Gavin King
- * @author Pete Muir
- * 
- */
- at Name("org.jboss.seam.persistence.persistenceProvider")
- at Scope(ScopeType.STATELESS)
- at BypassInterceptors
- at Install(precedence = BUILT_IN, classDependencies = "javax.persistence.EntityManager")
-public class PersistenceProvider
-{
-   public enum Feature
-   {
-      /**
-       * Identifies whether this JPA provider supports using a wildcard as the
-       * subject of a count query.
-       * 
-       * <p>
-       * Here's a count query that uses a wildcard as the subject.
-       * </p>
-       * 
-       * <pre>
-       * select count(*) from Vehicle v
-       * </pre>
-       * <p>
-       * Per the JPA 1.0 spec, using a wildcard as a subject of a count query is
-       * not permitted. Instead, the subject must be the entity or the alias, as
-       * in this count query:
-       * </p>
-       * 
-       * <pre>
-       * select count(v) from Vehicle v
-       * </pre>
-       * <p>
-       * Hibernate supports the wildcard syntax as an vendor extension.
-       * Furthermore, Hibernate produces an invalid SQL query when using the
-       * compliant subject if the entity has a composite primary key. Therefore,
-       * we prefer to use the wildcard syntax if it is supported.
-       * </p>
-       */
-      WILDCARD_AS_COUNT_QUERY_SUBJECT
-   }
-   
-   protected Set<Feature> featureSet = new HashSet<Feature>();
-   
-   @PostConstruct
-   // @Create method not called on stateless components
-   public void init()
-   {
-   }
-   
-   /**
-    * Indicate whether this JPA provider supports the feature defined by the
-    * provided Feature enum value.
-    */
-   public boolean supportsFeature(Feature feature)
-   {
-      return featureSet.contains(feature);
-   }
-   
-   /**
-    * Set the flush mode to manual-only flushing. Called when an atomic
-    * persistence context is required.
-    */
-   public void setFlushModeManual(EntityManager entityManager)
-   {
-      throw new UnsupportedOperationException("Use of FlushMode.MANUAL requires Hibernate as the persistence provider. Please use Hibernate, a custom persistenceProvider, or remove the MANUAL flush mode setting.");
-   }
-   
-   /**
-    * <p>
-    * Set the FlushMode the persistence contexts should use during rendering by
-    * calling {@link PersistenceContexts#changeFlushMode(FlushModeType, true)}.
-    * The actual changing of the flush mode is handled by the
-    * {@link PersistenceContexts} instance. The boolean argument should be true
-    * to indicate that this is a temporary change and that the old flush mode
-    * should be restored after render.
-    * </p>
-    * <p>
-    * Ideally, this should be MANUAL since changes should never flush to the
-    * database while in render response and the cost of a dirty check can be
-    * avoided. However, since the MANUAL mode is not officially part of the JPA
-    * specification, the default implementation will perform no operation.
-    * </p>
-    */
-   public void setRenderFlushMode()
-   {
-      // no-op in default implementation
-   }
-   
-   /**
-    * Does the persistence context have unflushed changes? If it does not,
-    * persistence context replication can be optimized.
-    * 
-    * @return true to indicate that there are unflushed changes
-    */
-   public boolean isDirty(EntityManager entityManager)
-   {
-      return true; // best we can do!
-   }
-   
-   /**
-    * Get the value of the entity identifier attribute.
-    * 
-    * @param bean
-    *           a managed entity instance
-    */
-   public Object getId(Object bean, EntityManager entityManager)
-   {
-      return Entity.forBean(bean).getIdentifier(bean);
-   }
-   
-   /**
-    * Get the name of the entity
-    * 
-    * @param bean
-    * @param entityManager
-    * 
-    * @throws IllegalArgumentException
-    *            if the passed object is not an entity
-    */
-   public String getName(Object bean, EntityManager entityManager) throws IllegalArgumentException
-   {
-      return Entity.forBean(bean).getName();
-   }
-   
-   /**
-    * Get the value of the entity version attribute.
-    * 
-    * @param bean
-    *           a managed entity instance
-    */
-   public Object getVersion(Object bean, EntityManager entityManager)
-   {
-      return Entity.forBean(bean).getVersion(bean);
-   }
-   
-   public void checkVersion(Object bean, EntityManager entityManager, Object oldVersion, Object version)
-   {
-      boolean equal;
-      if (oldVersion instanceof Date)
-      {
-         equal = ((Date) oldVersion).getTime() == ((Date) version).getTime();
-      }
-      else
-      {
-         equal = oldVersion.equals(version);
-      }
-      if (!equal)
-      {
-         throw new OptimisticLockException("Current database version number does not match passivated version number");
-      }
-   }
-   
-   /**
-    * Enable a Filter. This is here just especially for Hibernate, since we well
-    * know that other products don't have such cool features.
-    */
-   public void enableFilter(Filter filter, EntityManager entityManager)
-   {
-      throw new UnsupportedOperationException("Use of filters requires Hibernate as the persistence provider. Please use Hibernate or remove the filters configuration.");
-   }
-   
-   /**
-    * Register a Synchronization with the current transaction.
-    */
-   public boolean registerSynchronization(Synchronization sync, EntityManager entityManager)
-   {
-      return false; // best we can do!
-   }
-   
-   public static PersistenceProvider instance()
-   {
-      return (PersistenceProvider) Component.getInstance(PersistenceProvider.class, ScopeType.STATELESS);
-   }
-   
-   /**
-    * Wrap the delegate before returning it to the application
-    */
-   public Object proxyDelegate(Object delegate)
-   {
-      return delegate;
-   }
-   
-   /**
-    * Wrap the entityManager before returning it to the application
-    */
-   public EntityManager proxyEntityManager(EntityManager entityManager)
-   {
-      return (EntityManager) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
-            new Class[] { EntityManagerProxy.class },
-            new EntityManagerInvocationHandler(entityManager));
-   }
-   
-   /**
-    * Returns the class of an entity bean instance
-    * 
-    * @param bean
-    *           The entity bean instance
-    * @return The class of the entity bean
-    */
-   public Class getBeanClass(Object bean)
-   {
-      return Entity.forBean(bean).getBeanClass();
-   }
-   
-   public Method getPostLoadMethod(Object bean, EntityManager entityManager)
-   {
-      return Entity.forBean(bean).getPostLoadMethod();
-   }
-   
-   public Method getPrePersistMethod(Object bean, EntityManager entityManager)
-   {
-      return Entity.forBean(bean).getPrePersistMethod();
-   }
-   
-   public Method getPreUpdateMethod(Object bean, EntityManager entityManager)
-   {
-      return Entity.forBean(bean).getPreUpdateMethod();
-   }
-   
-   public Method getPreRemoveMethod(Object bean, EntityManager entityManager)
-   {
-      return Entity.forBean(bean).getPreRemoveMethod();
-   }
-   
-   @Deprecated
-   public Method getPreRemoveMethod(Class beanClass)
-   {
-      return Entity.forClass(beanClass).getPreRemoveMethod();
-   }
-   
-   @Deprecated
-   public Method getPostLoadMethod(Class beanClass)
-   {
-      return Entity.forClass(beanClass).getPostLoadMethod();
-   }
-   
-   @Deprecated
-   public Method getPrePersistMethod(Class beanClass)
-   {
-      return Entity.forClass(beanClass).getPrePersistMethod();
-   }
-   
-   @Deprecated
-   public Method getPreUpdateMethod(Class beanClass)
-   {
-      return Entity.forClass(beanClass).getPreUpdateMethod();
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/QueryParser.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/QueryParser.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/QueryParser.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-package org.jboss.seam.persistence;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.jboss.seam.core.Expressions.ValueExpression;
-
-import org.jboss.seam.core.Expressions;
-
-public class QueryParser
-{
-   private List<ValueExpression> parameterValueBindings = new ArrayList<ValueExpression>();
-   private StringBuilder ejbqlBuilder;
-   
-   public static String getParameterName(int loc)
-   {
-      return "el" + (loc+1);
-   }
-   
-   public String getEjbql()
-   {
-      return ejbqlBuilder.toString();
-   }
-   
-   public List<ValueExpression> getParameterValueBindings()
-   {
-      return parameterValueBindings;
-   }
-   
-   public QueryParser(String ejbql)
-   {
-      this(ejbql, 0);
-   }
-   
-   public QueryParser(String ejbql, int startingParameterNumber)
-   {
-       StringTokenizer tokens = new StringTokenizer(ejbql, "#}", true);
-       ejbqlBuilder = new StringBuilder(ejbql.length());
-       while (tokens.hasMoreTokens()) {
-           String token = tokens.nextToken();
-           if ("#".equals(token) && tokens.hasMoreTokens()) {
-               String expressionToken = tokens.nextToken();
-
-               if (!expressionToken.startsWith("{") || !tokens.hasMoreTokens()) {
-                   ejbqlBuilder.append(token).append(expressionToken);
-               } else {
-                   String expression = token + expressionToken + tokens.nextToken();
-                   ejbqlBuilder.append(':').append( getParameterName( startingParameterNumber + parameterValueBindings.size() ) );
-                   parameterValueBindings.add( Expressions.instance().createValueExpression(expression) );
-               }    
-           } else {
-               ejbqlBuilder.append(token);
-           }
-       }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/persistence/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,7 +0,0 @@
-/**
- * Seam components for working with JPA or Hibernate3.
- */
- at Namespace(value="http://jboss.com/products/seam/persistence", prefix="org.jboss.seam.persistence")
-package org.jboss.seam.persistence;
-
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/AuthorizationException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/AuthorizationException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/AuthorizationException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,17 +0,0 @@
-package org.jboss.seam.security;
-
-import javax.ejb.ApplicationException;
-
-/**
- * Thrown when an authenticated user has insufficient rights to carry out an action.
- * 
- * @author Shane Bryzak
- */
- at ApplicationException(rollback=true)
-public class AuthorizationException extends RuntimeException
-{ 
-   public AuthorizationException(String message)
-   {
-      super(message);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Configuration.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Configuration.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Configuration.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,75 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.HashMap;
-
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.security.jaas.SeamLoginModule;
-
-/**
- * Factory for the JAAS Configuration used by Seam Security.
- * 
- * @author Shane Bryzak
- *
- */
- at Name("org.jboss.seam.security.configurationFactory")
- at BypassInterceptors
- at Scope(ScopeType.STATELESS)
- at Install(precedence = BUILT_IN)
-public class Configuration
-{
-   static final String DEFAULT_JAAS_CONFIG_NAME = "default";   
-
-   protected javax.security.auth.login.Configuration createConfiguration()
-   {
-      return new javax.security.auth.login.Configuration()
-      {
-         private AppConfigurationEntry[] aces = { createAppConfigurationEntry() };
-         
-         @Override
-         public AppConfigurationEntry[] getAppConfigurationEntry(String name)
-         {
-            return DEFAULT_JAAS_CONFIG_NAME.equals(name) ? aces : null;
-         }
-         
-         @Override
-         public void refresh() {}
-      };
-   }
-
-   protected AppConfigurationEntry createAppConfigurationEntry()
-   {
-      return new AppConfigurationEntry( 
-            SeamLoginModule.class.getName(), 
-            LoginModuleControlFlag.REQUIRED, 
-            new HashMap<String,String>() 
-         );
-   }
-   
-   @Factory(value="org.jboss.seam.security.configuration", autoCreate=true, scope=APPLICATION)
-   public javax.security.auth.login.Configuration getConfiguration()
-   {
-      return createConfiguration();
-   }
-
-   public static javax.security.auth.login.Configuration instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application scope");
-      }
-      return (javax.security.auth.login.Configuration) Component.getInstance("org.jboss.seam.security.configuration");
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Credentials.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Credentials.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Credentials.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,139 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.ScopeType.SESSION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-import java.io.Serializable;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
- at Name("org.jboss.seam.security.credentials")
- at Scope(SESSION)
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
-public class Credentials implements Serializable
-{
-   public static final String EVENT_INIT_CREDENTIALS = "org.jboss.seam.security.initCredentials";
-   public static final String EVENT_CREDENTIALS_UPDATED = "org.jboss.seam.security.credentialsUpdated";
-   
-   private static final LogProvider log = Logging.getLogProvider(Credentials.class);
-   
-   private String username;
-   private String password;
-   
-   private boolean invalid = false;
-   
-   private boolean initialized;
-   
-   public boolean isInitialized()
-   {
-      return initialized;
-   }
-   
-   public void setInitialized(boolean initialized)
-   {
-      this.initialized = initialized;
-   }
-   
-   public String getUsername()
-   {
-      if (!isInitialized() && Events.exists())
-      {
-         setInitialized(true);
-         Events.instance().raiseEvent(EVENT_INIT_CREDENTIALS, this);
-      }
-      
-      return username;
-   }
-   
-   public void setUsername(String username)
-   {
-      if (this.username != username && (this.username == null || !this.username.equals(username)))
-      {
-         this.username = username;
-         invalid = false;
-         if (Events.exists()) Events.instance().raiseEvent(EVENT_CREDENTIALS_UPDATED);
-      }
-   }
-   
-   public String getPassword()
-   {
-      return password;
-   }
-   
-   public void setPassword(String password)
-   {
-      if (this.password != password && (this.password == null || !this.password.equals(password)))
-      {
-         this.password = password;
-         invalid = false;
-         if (Events.exists()) Events.instance().raiseEvent(EVENT_CREDENTIALS_UPDATED);
-      } 
-   }
-   
-   public boolean isSet()
-   {
-      return getUsername() != null && password != null;      
-   }
-   
-   public boolean isInvalid()
-   {
-      return invalid;
-   }
-   
-   public void invalidate()
-   {
-      invalid = true;
-   }
-   
-   public void clear()
-   {
-      username = null;
-      password = null;
-   }
-   
-   
-   /**
-    * Creates a callback handler that can handle a standard username/password
-    * callback, using the username and password properties.
-    */
-   public CallbackHandler createCallbackHandler()
-   {
-      return new CallbackHandler() 
-      {
-         public void handle(Callback[] callbacks) 
-            throws IOException, UnsupportedCallbackException 
-         {
-            for (int i=0; i < callbacks.length; i++)
-            {
-               if (callbacks[i] instanceof NameCallback)
-               {
-                  ( (NameCallback) callbacks[i] ).setName(getUsername());
-               }
-               else if (callbacks[i] instanceof PasswordCallback)
-               {
-                  ( (PasswordCallback) callbacks[i] ).setPassword( getPassword() != null ? 
-                           getPassword().toCharArray() : null );
-               }
-               else
-               {
-                  log.warn("Unsupported callback " + callbacks[i]);
-               }
-            }
-         }
-      };
-   }   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntityAction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntityAction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntityAction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,23 +0,0 @@
-package org.jboss.seam.security;
-
-/**
- * Actions that may be performed upon entities
- * in JPA or Hibernate.
- * 
- * @author Shane Bryzak
- * 
- */
-public enum EntityAction { 
-   
-   READ, 
-   INSERT, 
-   UPDATE, 
-   DELETE;
-   
-   @Override
-   public String toString()
-   {
-      return super.name().toLowerCase();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntityPermissionChecker.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntityPermissionChecker.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntityPermissionChecker.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,124 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.lang.reflect.Method;
-
-import javax.persistence.EntityManager;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.security.Restrict;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.persistence.PersistenceProvider;
-import org.jboss.seam.util.Strings;
-
-/**
- * Entity permission checks
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.entityPermissionChecker")
- at Scope(APPLICATION)
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
- at Startup
-public class EntityPermissionChecker
-{
-   private String entityManagerName = "entityManager";
-   
-   private EntityManager getEntityManager()
-   {
-      return (EntityManager) Component.getInstance(entityManagerName);
-   }
-   
-   public String getEntityManagerName()
-   {
-      return entityManagerName;
-   }
-   
-   public void setEntityManagerName(String name)
-   {
-      this.entityManagerName = name;
-   } 
-   
-   public static EntityPermissionChecker instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application context");
-      }
-
-      EntityPermissionChecker instance = (EntityPermissionChecker) Component.getInstance(
-            EntityPermissionChecker.class, ScopeType.APPLICATION);
-
-      if (instance == null)
-      {
-         throw new IllegalStateException("No EntityPermissionChecker could be created");
-      }
-
-      return instance;      
-   }
-   
-   public void checkEntityPermission(Object entity, EntityAction action)
-   {      
-      if (!Identity.isSecurityEnabled()) return;
-      
-      if (!Contexts.isSessionContextActive()) return;
-      
-      Identity identity = Identity.instance();
-      
-      identity.tryLogin();
-      
-      PersistenceProvider provider = PersistenceProvider.instance(); 
-      Class beanClass = provider.getBeanClass(entity);
-      
-      if (beanClass != null)
-      {        
-         Method m = null;
-         switch (action)
-         {
-            case READ:
-               m = provider.getPostLoadMethod(entity, getEntityManager());
-               break;
-            case INSERT:
-               m = provider.getPrePersistMethod(entity, getEntityManager());
-               break;
-            case UPDATE:
-               m = provider.getPreUpdateMethod(entity, getEntityManager());
-               break;
-            case DELETE:
-               m = provider.getPreRemoveMethod(entity, getEntityManager());
-         }
-         
-         Restrict restrict = null;
-         
-         if (m != null && m.isAnnotationPresent(Restrict.class))
-         {
-            restrict = m.getAnnotation(Restrict.class);
-         }
-         else if (entity.getClass().isAnnotationPresent(Restrict.class))
-         {
-            restrict = entity.getClass().getAnnotation(Restrict.class);
-         }
-
-         if (restrict != null)
-         {
-            if (Strings.isEmpty(restrict.value()))
-            {
-               identity.checkPermission(entity, action.toString());
-            }
-            else
-            {
-               identity.checkRestriction(restrict.value());
-            }
-         }
-      }
-   }  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntitySecurityListener.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntitySecurityListener.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/EntitySecurityListener.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,44 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.security.EntityAction.DELETE;
-import static org.jboss.seam.security.EntityAction.INSERT;
-import static org.jboss.seam.security.EntityAction.READ;
-import static org.jboss.seam.security.EntityAction.UPDATE;
-
-import javax.persistence.PostLoad;
-import javax.persistence.PrePersist;
-import javax.persistence.PreRemove;
-import javax.persistence.PreUpdate;
-
-
-/**
- * Facilitates security checks for entity beans.
- * 
- * @author Shane Bryzak
- */
-public class EntitySecurityListener
-{
-   @PostLoad
-   public void postLoad(Object entity)
-   {
-      EntityPermissionChecker.instance().checkEntityPermission(entity, READ);
-   }
-   
-   @PrePersist
-   public void prePersist(Object entity)
-   { 
-      EntityPermissionChecker.instance().checkEntityPermission(entity, INSERT);
-   }
-   
-   @PreUpdate
-   public void preUpdate(Object entity)
-   {
-      EntityPermissionChecker.instance().checkEntityPermission(entity, UPDATE);
-   }
-   
-   @PreRemove
-   public void preRemove(Object entity)
-   {
-      EntityPermissionChecker.instance().checkEntityPermission(entity, DELETE);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/FacesSecurityEvents.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/FacesSecurityEvents.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/FacesSecurityEvents.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,106 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.security.auth.login.LoginException;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.international.StatusMessage.Severity;
-
-/**
- * Produces FacesMessages in response of certain security events, and helps to decouple the
- * Identity component from JSF.
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.facesSecurityEvents")
- at Scope(APPLICATION)
- at Install(precedence = BUILT_IN, classDependencies = "javax.faces.context.FacesContext")
- at BypassInterceptors
- at Startup
-public class FacesSecurityEvents 
-{  
-   @Observer(Identity.EVENT_POST_AUTHENTICATE)
-   public void postAuthenticate(Identity identity)
-   {         
-      //org.jboss.security.saml.SSOManager.processManualLoginNotification(
-            //ServletContexts.instance().getRequest(), identity.getPrincipal().getName());
-   }
-   
-   @Observer(Identity.EVENT_LOGIN_FAILED)
-   public void addLoginFailedMessage(LoginException ex)
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault(
-               getLoginFailedMessageSeverity(), 
-               getLoginFailedMessageKey(), 
-               getLoginFailedMessage(), 
-               ex);
-   }
-
-   public String getLoginFailedMessage()
-   {
-      return "Login failed";
-   }
-
-   public Severity getLoginFailedMessageSeverity()
-   {
-      return Severity.INFO;
-   }
-
-   public String getLoginFailedMessageKey()
-   {
-      return "org.jboss.seam.loginFailed";
-   }
-
-   @Observer(Identity.EVENT_LOGIN_SUCCESSFUL)
-   public void addLoginSuccessfulMessage()
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault(
-               getLoginSuccessfulMessageSeverity(), 
-               getLoginSuccessfulMessageKey(), 
-               getLoginSuccessfulMessage(), 
-               Identity.instance().getCredentials().getUsername());
-   }
-   
-   @Observer(Identity.EVENT_NOT_LOGGED_IN)
-   public void addNotLoggedInMessage()
-   {      
-      StatusMessages.instance().addFromResourceBundleOrDefault( 
-            Severity.WARN, 
-            "org.jboss.seam.NotLoggedIn", 
-            "Please log in first" 
-         );      
-   }
-
-   public Severity getLoginSuccessfulMessageSeverity()
-   {
-      return Severity.INFO;
-   }
-
-   public String getLoginSuccessfulMessage()
-   {
-      return "Welcome, #0";
-   }
-
-   public String getLoginSuccessfulMessageKey()
-   {
-      return "org.jboss.seam.loginSuccessful";
-   }   
-   
-   @Observer(Identity.EVENT_ALREADY_LOGGED_IN)
-   public void addAlreadyLoggedInMessage()
-   {
-      StatusMessages.instance().addFromResourceBundleOrDefault (
-         Severity.WARN,
-         "org.jboss.seam.AlreadyLoggedIn",
-         "You are already logged in, please log out first if you wish to log in again"
-      );
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/HibernateSecurityInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/HibernateSecurityInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/HibernateSecurityInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,100 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.security.EntityAction.DELETE;
-import static org.jboss.seam.security.EntityAction.INSERT;
-import static org.jboss.seam.security.EntityAction.READ;
-import static org.jboss.seam.security.EntityAction.UPDATE;
-
-import java.io.Serializable;
-
-import org.hibernate.EmptyInterceptor;
-import org.hibernate.Interceptor;
-import org.hibernate.type.Type;
-import org.jboss.seam.Entity.NotEntityException;
-
-/**
- * Facilitates security checks for Hibernate entities
- * 
- * @author Shane Bryzak
- *
- */
-public class HibernateSecurityInterceptor extends EmptyInterceptor
-{
-   private Interceptor wrappedInterceptor;
-   
-   public HibernateSecurityInterceptor(Interceptor wrappedInterceptor)
-   {
-      this.wrappedInterceptor = wrappedInterceptor;
-   }
-   
-   @Override
-   public boolean onLoad(Object entity, Serializable id, Object[] state,
-                      String[] propertyNames, Type[] types)
-   {
-      try
-      {
-         EntityPermissionChecker.instance().checkEntityPermission(entity, READ);
-      }
-      catch (NotEntityException e) 
-      {
-         // Not a JPA entity
-      }
-      
-      return wrappedInterceptor != null ? 
-               wrappedInterceptor.onLoad(entity, id, state, propertyNames, types) : 
-               false;
-   }
-   
-   @Override
-   public void onDelete(Object entity, Serializable id, Object[] state, 
-                        String[] propertyNames, Type[] types)
-   {
-      try
-      {
-         EntityPermissionChecker.instance().checkEntityPermission(entity, DELETE);
-      }
-      catch (NotEntityException e) 
-      {
-         // Not a JPA entity
-      }
-      
-      if (wrappedInterceptor != null)
-         wrappedInterceptor.onDelete(entity, id, state, propertyNames, types);
-   }
-   
-   @Override
-   public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState,
-                   Object[] previousState, String[] propertyNames, Type[] types)
-   {
-      try
-      {
-         EntityPermissionChecker.instance().checkEntityPermission(entity, UPDATE);
-      }
-      catch (NotEntityException e) 
-      {
-         // Not a JPA entity
-      }
-      
-      return wrappedInterceptor != null ? 
-               wrappedInterceptor.onFlushDirty(entity, id, currentState, 
-                        previousState, propertyNames, types) : false;
-   }
-   
-   @Override
-   public boolean onSave(Object entity, Serializable id, Object[] state,
-                      String[] propertyNames, Type[] types)
-   {
-      try
-      {
-         EntityPermissionChecker.instance().checkEntityPermission(entity, INSERT);
-      }
-      catch (NotEntityException e) 
-      {
-         // Not a JPA entity
-      }
-      
-      return wrappedInterceptor != null ? 
-               wrappedInterceptor.onSave(entity, id, state, propertyNames, types) : 
-               false;
-   }       
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Identity.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Identity.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Identity.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,752 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.ScopeType.SESSION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.security.Principal;
-import java.security.acl.Group;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.List;
-
-import javax.security.auth.Subject;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.MethodExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.permission.PermissionMapper;
-import org.jboss.seam.web.Session;
-
-/**
- * API for authorization and authentication via Seam security. This base 
- * implementation supports role-based authorization only. Subclasses may add 
- * more sophisticated permissioning mechanisms.
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.identity")
- at Scope(SESSION)
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
- at Startup
-public class Identity implements Serializable
-{  
-   private static final long serialVersionUID = 3751659008033189259L;
-   
-   // Event keys
-   public static final String EVENT_LOGIN_SUCCESSFUL = "org.jboss.seam.security.loginSuccessful";
-   public static final String EVENT_LOGIN_FAILED = "org.jboss.seam.security.loginFailed";
-   public static final String EVENT_NOT_LOGGED_IN = "org.jboss.seam.security.notLoggedIn";
-   public static final String EVENT_NOT_AUTHORIZED = "org.jboss.seam.security.notAuthorized";
-   public static final String EVENT_PRE_AUTHENTICATE = "org.jboss.seam.security.preAuthenticate";
-   public static final String EVENT_POST_AUTHENTICATE = "org.jboss.seam.security.postAuthenticate";
-   public static final String EVENT_LOGGED_OUT = "org.jboss.seam.security.loggedOut";
-   public static final String EVENT_ALREADY_LOGGED_IN = "org.jboss.seam.security.alreadyLoggedIn";
-   public static final String EVENT_QUIET_LOGIN = "org.jboss.seam.security.quietLogin";
-   
-   protected static boolean securityEnabled = true;
-   
-   public static final String ROLES_GROUP = "Roles";
-   
-   // Context variables
-   private static final String LOGIN_TRIED = "org.jboss.seam.security.loginTried";
-   private static final String SILENT_LOGIN = "org.jboss.seam.security.silentLogin";
-   
-   private static final LogProvider log = Logging.getLogProvider(Identity.class);
-   
-   private Credentials credentials;
-   
-   private MethodExpression authenticateMethod;
-
-   private Principal principal;   
-   private Subject subject;
-   
-   private RememberMe rememberMe;
-   
-   private transient ThreadLocal<Boolean> systemOp;
-   
-   private String jaasConfigName = null;
-   
-   private List<String> preAuthenticationRoles = new ArrayList<String>();
-   
-   private PermissionMapper permissionMapper;
-   
-   /**
-    * Flag that indicates we are in the process of authenticating
-    */
-   private boolean authenticating = false;
-         
-   @Create
-   public void create()
-   {     
-      subject = new Subject();
-      
-      if (Contexts.isApplicationContextActive())
-      {
-         permissionMapper = (PermissionMapper) Component.getInstance(PermissionMapper.class);                 
-      }    
-      
-      if (Contexts.isSessionContextActive())
-      {
-         rememberMe = (RememberMe) Component.getInstance(RememberMe.class, true);      
-         credentials = (Credentials) Component.getInstance(Credentials.class);         
-      }
-      
-      if (credentials == null)
-      {
-         // Must have credentials for unit tests
-         credentials = new Credentials();
-      }
-   }
-   
-   public static boolean isSecurityEnabled()
-   {
-      return securityEnabled;
-   }
-   
-   public static void setSecurityEnabled(boolean enabled)
-   {
-      securityEnabled = enabled;
-   }
-
-   public static Identity instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-
-      Identity instance = (Identity) Component.getInstance(Identity.class, ScopeType.SESSION);
-
-      if (instance == null)
-      {
-         throw new IllegalStateException("No Identity could be created");
-      }
-
-      return instance;
-   }
-   
-   /**
-    * Simple check that returns true if the user is logged in, without attempting to authenticate
-    * 
-    * @return true if the user is logged in
-    */
-   public boolean isLoggedIn()
-   {           
-      // If there is a principal set, then the user is logged in.
-      return getPrincipal() != null;
-   }
-   
-   /**
-    * Will attempt to authenticate quietly if the user's credentials are set and they haven't
-    * authenticated already.  A quiet authentication doesn't throw any exceptions if authentication
-    * fails.
-    * 
-    * @return true if the user is logged in, false otherwise
-    */
-   public boolean tryLogin()
-   {
-      if (!authenticating && getPrincipal() == null && credentials.isSet() &&
-            Contexts.isEventContextActive() &&
-            !Contexts.getEventContext().isSet(LOGIN_TRIED))
-        {
-           Contexts.getEventContext().set(LOGIN_TRIED, true);
-           quietLogin();
-        }     
-        
-        return isLoggedIn();      
-   }
-   
-   @Deprecated
-   public boolean isLoggedIn(boolean attemptLogin)
-   {
-      return attemptLogin ? tryLogin() : isLoggedIn();
-   }
-
-
-    public void acceptExternallyAuthenticatedPrincipal(Principal principal) {
-        getSubject().getPrincipals().add(principal);
-        this.principal = principal;
-    }
-
-   public Principal getPrincipal()
-   {
-      return principal;
-   }
-   
-   public Subject getSubject()
-   {
-      return subject;
-   }
-      
-   /**
-    * Performs an authorization check, based on the specified security expression.
-    * 
-    * @param expr The security expression to evaluate
-    * @throws NotLoggedInException Thrown if the authorization check fails and 
-    * the user is not authenticated
-    * @throws AuthorizationException Thrown if the authorization check fails and
-    * the user is authenticated
-    */
-   public void checkRestriction(String expr)
-   {      
-      if (!securityEnabled) return;
-      
-      if ( !evaluateExpression(expr) )
-      {
-         if ( !isLoggedIn() )
-         {           
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
-            log.debug(String.format(
-               "Error evaluating expression [%s] - User not logged in", expr));
-            throw new NotLoggedInException();
-         }
-         else
-         {
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_AUTHORIZED);
-            throw new AuthorizationException(String.format(
-               "Authorization check failed for expression [%s]", expr));
-         }
-      }
-   }
-
-   /**
-    * Attempts to authenticate the user.  This method is distinct to the 
-    * authenticate() method in that it raises events in response to whether
-    * authentication is successful or not.  The following events may be raised
-    * by calling login():
-    * 
-    * org.jboss.seam.security.loginSuccessful - raised when authentication is successful
-    * org.jboss.seam.security.loginFailed - raised when authentication fails
-    * org.jboss.seam.security.alreadyLoggedIn - raised if the user is already authenticated
-    * 
-    * @return String returns "loggedIn" if user is authenticated, or null if not.
-    */
-   public String login()
-   {
-      try
-      {            
-         if (isLoggedIn())
-         {
-            // If authentication has already occurred during this request via a silent login,
-            // and login() is explicitly called then we still want to raise the LOGIN_SUCCESSFUL event,
-            // and then return.
-            if (Contexts.isEventContextActive() && Contexts.getEventContext().isSet(SILENT_LOGIN))
-            {
-               if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGIN_SUCCESSFUL);
-               return "loggedIn";            
-            }            
-            
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_ALREADY_LOGGED_IN);
-            return "loggedIn";           
-         }
-         
-         authenticate();
-         
-         if (!isLoggedIn())
-         {
-            throw new LoginException();
-         }
-         
-         if ( log.isDebugEnabled() )
-         {
-            log.debug("Login successful for: " + getCredentials().getUsername());
-         }
-
-         if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGIN_SUCCESSFUL);
-         return "loggedIn";
-      }
-      catch (LoginException ex)
-      {
-         credentials.invalidate();
-         
-         if ( log.isDebugEnabled() )
-         {
-             log.debug("Login failed for: " + getCredentials().getUsername(), ex);
-         }
-         if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGIN_FAILED, ex);
-      }
-      
-      return null;      
-   }
-   
-   /**
-    * Attempts a quiet login, suppressing any login exceptions and not creating
-    * any faces messages. This method is intended to be used primarily as an 
-    * internal API call, however has been made public for convenience.
-    */
-   public void quietLogin()
-   {
-      try
-      {
-         if (Events.exists()) Events.instance().raiseEvent(EVENT_QUIET_LOGIN);         
-          
-         // Ensure that we haven't been authenticated as a result of the EVENT_QUIET_LOGIN event
-         if (!isLoggedIn())
-         {
-            if (credentials.isSet()) 
-            {
-               authenticate();
-               if (isLoggedIn() && Contexts.isEventContextActive())
-               {
-                  Contexts.getEventContext().set(SILENT_LOGIN, true);
-               }
-            }
-         }
-      }
-      catch (LoginException ex) 
-      { 
-         credentials.invalidate();
-      }
-   }
-   
-
-
-   /**
-    * 
-    * @throws LoginException
-    */
-   public synchronized void authenticate() 
-      throws LoginException
-   {
-      // If we're already authenticated, then don't authenticate again
-      if (!isLoggedIn() && !credentials.isInvalid())
-      {
-         principal = null;
-         subject = new Subject();
-         authenticate( getLoginContext() );
-      }      
-   }
-
-    
-   protected void authenticate(LoginContext loginContext) 
-      throws LoginException
-   {
-      try
-      {
-         authenticating = true;
-         preAuthenticate();
-         loginContext.login();
-         postAuthenticate();
-      }
-      finally
-      {
-         // Set password to null whether authentication is successful or not
-         credentials.setPassword(null);    
-         authenticating = false;
-      }
-   }
-   
-   /**
-    * Clears any roles added by calling addRole() while not authenticated.  
-    * This method may be overridden by a subclass if different 
-    * pre-authentication logic should occur.
-    */
-   protected void preAuthenticate()
-   {     
-      preAuthenticationRoles.clear();      
-      if (Events.exists()) Events.instance().raiseEvent(EVENT_PRE_AUTHENTICATE);
-   }   
-   
-   /**
-    * Extracts the principal from the subject, and populates the roles of the
-    * authenticated user.  This method may be overridden by a subclass if
-    * different post-authentication logic should occur.
-    */
-   protected void postAuthenticate()
-   {
-      // Populate the working memory with the user's principals
-      for ( Principal p : getSubject().getPrincipals() )
-      {         
-         if ( !(p instanceof Group))
-         {
-            if (principal == null) 
-            {
-               principal = p;
-               break;
-            }            
-         }         
-      }      
-      
-      if (!preAuthenticationRoles.isEmpty() && isLoggedIn())
-      {
-         for (String role : preAuthenticationRoles)
-         {
-            addRole(role);
-         }
-         preAuthenticationRoles.clear();
-      }
-
-      credentials.setPassword(null);
-      
-      if (Events.exists()) Events.instance().raiseEvent(EVENT_POST_AUTHENTICATE, this);      
-   }
-   
-   /**
-    * Resets all security state and credentials
-    */
-   public void unAuthenticate()
-   {      
-      principal = null;
-      subject = new Subject();
-      
-      credentials.clear();
-   }
-
-   protected LoginContext getLoginContext() throws LoginException
-   {
-      if (getJaasConfigName() != null)
-      {
-         return new LoginContext(getJaasConfigName(), getSubject(), 
-                  credentials.createCallbackHandler());
-      }
-      
-      return new LoginContext(Configuration.DEFAULT_JAAS_CONFIG_NAME, getSubject(), 
-            credentials.createCallbackHandler(), Configuration.instance());
-   }
-   
-   public void logout()
-   {
-      if (isLoggedIn())
-      {
-         unAuthenticate();
-         Session.instance().invalidate();
-         if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGGED_OUT);
-      }
-   }
-
-   /**
-    * Checks if the authenticated user is a member of the specified role.
-    * 
-    * @param role String The name of the role to check
-    * @return boolean True if the user is a member of the specified role
-    */
-   public boolean hasRole(String role)
-   {
-      if (!securityEnabled) return true;
-      if (systemOp != null && Boolean.TRUE.equals(systemOp.get())) return true;
-      
-      tryLogin();
-      
-      for ( Group sg : getSubject().getPrincipals(Group.class) )      
-      {
-         if ( ROLES_GROUP.equals( sg.getName() ) )
-         {
-            return sg.isMember( new Role(role) );
-         }
-      }
-      return false;
-   }
-   
-   /**
-    * Adds a role to the authenticated user.  If the user is not logged in,
-    * the role will be added to a list of roles that will be granted to the
-    * user upon successful authentication, but only during the authentication
-    * process.
-    * 
-    * @param role The name of the role to add
-    */
-   public boolean addRole(String role)
-   {
-      if (role == null || "".equals(role)) return false;
-      
-      if (!isLoggedIn())
-      {
-         preAuthenticationRoles.add(role);
-         return false;
-      }
-      else
-      {
-         for ( Group sg : getSubject().getPrincipals(Group.class) )      
-         {
-            if ( ROLES_GROUP.equals( sg.getName() ) )
-            {
-               return sg.addMember(new Role(role));
-            }
-         }
-                  
-         SimpleGroup roleGroup = new SimpleGroup(ROLES_GROUP);
-         roleGroup.addMember(new Role(role));
-         getSubject().getPrincipals().add(roleGroup);
-         return true;
-      }
-   }
-
-   /**
-    * Removes a role from the authenticated user
-    * 
-    * @param role The name of the role to remove
-    */
-   public void removeRole(String role)
-   {     
-      for ( Group sg : getSubject().getPrincipals(Group.class) )      
-      {
-         if ( ROLES_GROUP.equals( sg.getName() ) )
-         {
-            Enumeration e = sg.members();
-            while (e.hasMoreElements())
-            {
-               Principal member = (Principal) e.nextElement();
-               if (member.getName().equals(role))
-               {
-                  sg.removeMember(member);
-                  break;
-               }
-            }
-
-         }
-      }      
-   }   
-   
-   /**
-    * Checks that the current authenticated user is a member of
-    * the specified role.
-    * 
-    * @param role String The name of the role to check
-    * @throws AuthorizationException if the authenticated user is not a member of the role
-    */
-   public void checkRole(String role)
-   {
-      tryLogin();
-      
-      if ( !hasRole(role) )
-      {
-         if ( !isLoggedIn() )
-         {           
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
-            throw new NotLoggedInException();
-         }
-         else
-         {
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_AUTHORIZED);
-            throw new AuthorizationException(String.format(
-                  "Authorization check failed for role [%s]", role));
-         }
-      }
-   }
-
-   /**
-    * Checks that the current authenticated user has permission for
-    * the specified name and action
-    * 
-    * @param name String The permission name
-    * @param action String The permission action
-    * @param arg Object Optional object parameter used to make a permission decision
-    * @throws AuthorizationException if the user does not have the specified permission
-    */
-   public void checkPermission(String name, String action, Object...arg)
-   {
-      if (systemOp != null && Boolean.TRUE.equals(systemOp.get())) return; 
-      
-      tryLogin();
-      
-      if ( !hasPermission(name, action, arg) )
-      {
-         if ( !isLoggedIn() )
-         {
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
-            throw new NotLoggedInException();
-         }
-         else
-         {
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_AUTHORIZED);
-            throw new AuthorizationException(String.format(
-                  "Authorization check failed for permission [%s,%s]", name, action));
-         }
-      }
-   }
-   
-   public void checkPermission(Object target, String action)
-   {
-      if (systemOp != null && Boolean.TRUE.equals(systemOp.get())) return;
-      
-      tryLogin();
-      
-      if ( !hasPermission(target, action) )
-      {
-         if ( !isLoggedIn() )
-         {
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
-            throw new NotLoggedInException();            
-         }
-         else
-         {
-            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_AUTHORIZED);
-            throw new AuthorizationException(String.format(
-                  "Authorization check failed for permission[%s,%s]", target, action));
-         }
-      }
-   }
-
-   /**
-    * Performs a permission check for the specified name and action
-    * 
-    * @param name String The permission name
-    * @param action String The permission action
-    * @param arg Object Optional object parameter used to make a permission decision
-    * @return boolean True if the user has the specified permission
-    */
-   public boolean hasPermission(String name, String action, Object...arg)
-   {      
-      if (!securityEnabled) return true;
-      if (systemOp != null && Boolean.TRUE.equals(systemOp.get())) return true;   
-      if (permissionMapper == null) return false;
-         
-      if (arg != null)
-      {
-         return permissionMapper.resolvePermission(arg[0], action);
-      }
-      else
-      {
-         return permissionMapper.resolvePermission(name, action);
-      }
-   }   
-   
-   public void filterByPermission(Collection collection, String action)
-   {
-      permissionMapper.filterByPermission(collection, action);  
-   }
-   
-   public boolean hasPermission(Object target, String action)
-   {
-      if (!securityEnabled) return true;
-      if (systemOp != null && Boolean.TRUE.equals(systemOp.get())) return true;     
-      if (permissionMapper == null) return false;
-      if (target == null) return false;
-      
-      return permissionMapper.resolvePermission(target, action);
-   }
-   
-   /**
-    * Evaluates the specified security expression, which must return a boolean
-    * value.
-    * 
-    * @param expr String The expression to evaluate
-    * @return boolean The result of the expression evaluation
-    */
-   protected boolean evaluateExpression(String expr) 
-   {         
-      return Expressions.instance().createValueExpression(expr, Boolean.class).getValue();
-   }   
-   
-   /**
-    * @see org.jboss.seam.security.Credentials#getUsername()
-    */
-   @Deprecated
-   public String getUsername()
-   {
-      return credentials.getUsername();
-   }
-
-   /**
-    * @see org.jboss.seam.security.Credentials#setUsername(String)
-    */
-   @Deprecated
-   public void setUsername(String username)
-   {  
-      credentials.setUsername(username);
-   }
-
-   /**
-    * @see org.jboss.seam.security.Credentials#getPassword()
-    */
-   @Deprecated
-   public String getPassword()
-   {
-      return credentials.getPassword();
-   }
-   
-   /**
-    * @see org.jboss.seam.security.Credentials#setPassword(String)
-    */   
-   @Deprecated
-   public void setPassword(String password)
-   {
-      credentials.setPassword(password);
-   }   
-   
-   /**
-    * @see org.jboss.seam.security.RememberMe#isEnabled()
-    */
-   @Deprecated
-   public boolean isRememberMe()
-   {
-      return rememberMe != null ? rememberMe.isEnabled() : false;
-   }
-   
-   /**
-    * @see org.jboss.seam.security.RememberMe#setEnabled(boolean)
-    */
-   @Deprecated
-   public void setRememberMe(boolean remember)
-   {
-      if (rememberMe != null) rememberMe.setEnabled(remember);
-   }   
-   
-   public Credentials getCredentials()
-   {
-      return credentials;
-   }   
-   
-   public MethodExpression getAuthenticateMethod()
-   {
-      return authenticateMethod;
-   }
-   
-   public void setAuthenticateMethod(MethodExpression authMethod)
-   {
-      this.authenticateMethod = authMethod;
-   }
-   
-   public String getJaasConfigName()
-   {
-      return jaasConfigName;
-   }
-   
-   public void setJaasConfigName(String jaasConfigName)
-   {
-      this.jaasConfigName = jaasConfigName;
-   }
-   
-   synchronized void runAs(RunAsOperation operation)
-   {
-      Principal savedPrincipal = getPrincipal();
-      Subject savedSubject = getSubject();
-      
-      try
-      {
-         principal = operation.getPrincipal();
-         subject = operation.getSubject();
-         
-         if (systemOp == null)
-         {
-            systemOp = new ThreadLocal<Boolean>();
-         }
-         
-         systemOp.set(operation.isSystemOperation());
-         
-         operation.execute();
-      }
-      finally
-      {
-         systemOp.set(false);
-         principal = savedPrincipal;
-         subject = savedSubject;
-      }
-   } 
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/JpaTokenStore.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/JpaTokenStore.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/JpaTokenStore.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,165 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-
-import javax.persistence.EntityManager;
-import javax.persistence.NoResultException;
-import javax.persistence.Query;
-
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.security.TokenUsername;
-import org.jboss.seam.annotations.security.TokenValue;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.security.management.IdentityManagementException;
-import org.jboss.seam.util.AnnotatedBeanProperty;
-
-/**
- * A TokenStore implementation, stores tokens inside a database table.
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.tokenStore")
- at Install(precedence = BUILT_IN, value=false) 
- at Scope(APPLICATION)
- at BypassInterceptors
-public class JpaTokenStore implements TokenStore, Serializable
-{
-   private Class tokenClass;
-   
-   private ValueExpression<EntityManager> entityManager;    
-   
-   private AnnotatedBeanProperty<TokenUsername> tokenUsernameProperty;
-   private AnnotatedBeanProperty<TokenValue> tokenValueProperty;
-   
-   @Create
-   public void create()
-   {
-      if (entityManager == null)
-      {
-         entityManager = Expressions.instance().createValueExpression("#{entityManager}", EntityManager.class);
-      }       
-      
-      tokenUsernameProperty = new AnnotatedBeanProperty<TokenUsername>(tokenClass, TokenUsername.class);
-      tokenValueProperty = new AnnotatedBeanProperty<TokenValue>(tokenClass, TokenValue.class);
-      
-      if (!tokenUsernameProperty.isSet()) 
-      {
-         throw new IllegalStateException("Invalid tokenClass " + tokenClass.getName() + 
-               " - required annotation @TokenUsername not found on any Field or Method.");
-      }
-      
-      if (!tokenValueProperty.isSet()) 
-      {
-         throw new IllegalStateException("Invalid tokenClass " + tokenClass.getName() + 
-               " - required annotation @TokenValue not found on any Field or Method.");
-      }       
-   }
-   
-   public void createToken(String username, String value)
-   {
-      if (tokenClass == null)
-      {
-         throw new IllegalStateException("Could not create token, tokenClass not set");
-      }   
-      
-      try
-      {
-         Object token = tokenClass.newInstance();
-         
-         tokenUsernameProperty.setValue(token, username);
-         tokenValueProperty.setValue(token, value);
-         
-         lookupEntityManager().persist(token);
-      }
-      catch (Exception ex)
-      {
-         if (ex instanceof IdentityManagementException)
-         {
-            throw (IdentityManagementException) ex;
-         }
-         else
-         {
-            throw new IdentityManagementException("Could not create account", ex);
-         }
-      }       
-   }
-   
-   public boolean validateToken(String username, String value)
-   {
-      return lookupToken(username, value) != null;
-   }
-   
-   public void invalidateToken(String username, String value)
-   {
-      Object token = lookupToken(username, value);
-      if (token != null)
-      {
-         lookupEntityManager().remove(token);
-      }
-   }
-   
-   public void invalidateAll(String username)
-   {
-      Query query = lookupEntityManager().createQuery(
-         "select t from " + tokenClass.getName() + " t where " + tokenUsernameProperty.getName() +
-         " = :username")
-         .setParameter("username", username);
-      
-      for (Object token : query.getResultList())
-      {
-         lookupEntityManager().remove(token);
-      }      
-   }
-   
-   public Object lookupToken(String username, String value)       
-   {
-      try
-      {
-         Object token = lookupEntityManager().createQuery(
-            "select t from " + tokenClass.getName() + " t where " + tokenUsernameProperty.getName() +
-            " = :username and " + tokenValueProperty.getName() + " = :value")
-            .setParameter("username", username)
-            .setParameter("value", value)
-            .getSingleResult();
-         
-         return token;
-      }
-      catch (NoResultException ex)
-      {
-         return null;        
-      }      
-   }   
-   
-   public Class getTokenClass()
-   {
-      return tokenClass;
-   }
-   
-   public void setTokenClass(Class tokenClass)
-   {
-      this.tokenClass = tokenClass;
-   }
-   
-   private EntityManager lookupEntityManager()
-   {
-      return entityManager.getValue();
-   }
-   
-   public ValueExpression getEntityManager()
-   {
-      return entityManager;
-   }
-   
-   public void setEntityManager(ValueExpression expression)
-   {
-      this.entityManager = expression;
-   }    
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/NotLoggedInException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/NotLoggedInException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/NotLoggedInException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,11 +0,0 @@
-package org.jboss.seam.security;
-
-import javax.ejb.ApplicationException;
-
-/**
- * Thrown when an unauthenticated user attempts to execute a restricted action. 
- * 
- * @author Shane Bryzak
- */
- at ApplicationException(rollback=true)
-public class NotLoggedInException extends RuntimeException {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/RememberMe.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/RememberMe.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/RememberMe.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,410 +0,0 @@
-package org.jboss.seam.security;
-
-import static org.jboss.seam.ScopeType.SESSION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.rmi.server.UID;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import javax.faces.context.FacesContext;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.faces.Selector;
-import org.jboss.seam.security.management.IdentityManager;
-import org.jboss.seam.util.Base64;
-
-/**
- * Remember-me functionality is provided by this class, in two different flavours.  The first mode
- * provides username-only persistence, and is considered to be secure as the user (or their browser)
- * is still required to provide a password.  The second mode provides an auto-login feature, however
- * is NOT considered to be secure and is vulnerable to XSS attacks compromising the user's account.
- * 
- * Use the auto-login mode with caution!
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.rememberMe")
- at Scope(SESSION)
- at Install(precedence = BUILT_IN, classDependencies = "javax.faces.context.FacesContext")
- at BypassInterceptors
-public class RememberMe implements Serializable
-{
-   class UsernameSelector extends Selector
-   {
-      @Override
-      public String getCookieName()
-      {
-         return "org.jboss.seam.security.username";
-      }       
-      
-      @Override
-      public void setDirty()
-      {
-         super.setDirty();
-      }
-      
-      @Override
-      public String getCookieValue()
-      {
-         return super.getCookieValue();
-      }
-      
-      @Override
-      public void clearCookieValue()
-      {
-         super.clearCookieValue();
-      }
-      
-      @Override
-      public void setCookieValueIfEnabled(String value)
-      {
-         super.setCookieValueIfEnabled(value);
-      }
-   }
-   
-   class TokenSelector extends UsernameSelector
-   {
-      @Override
-      public String getCookieName()
-      {
-         return "org.jboss.seam.security.authtoken";
-      }
-   }
-   
-   private class DecodedToken
-   {
-      private String username;
-      private String value;
-      
-      public DecodedToken(String cookieValue)
-      {
-         if (cookieValue != null)
-         {
-            try
-            {
-               String decoded = new String(Base64.decode(cookieValue));         
-               username = decoded.substring(0, decoded.indexOf(':'));
-               value = decoded.substring(decoded.indexOf(':') + 1);
-            }
-            catch (Exception ex)
-            {
-               // swallow
-            }
-         }
-      }
-      
-      public String getUsername()
-      {
-         return username;
-      }
-      
-      public String getValue()
-      {
-         return value;
-      }
-   }
-      
-   private UsernameSelector usernameSelector;
-   
-   private TokenSelector tokenSelector;   
-   private TokenStore tokenStore;
-      
-   private boolean enabled;
-
-   private int cookieMaxAge = Selector.DEFAULT_MAX_AGE;
-   
-   private boolean autoLoggedIn;
-   
-   private Random random = new Random(System.currentTimeMillis());
-   
-   public enum Mode { disabled, usernameOnly, autoLogin}
-   
-   private Mode mode = Mode.usernameOnly;
-   
-   public Mode getMode()
-   {
-      return mode;
-   }
-   
-   public void setMode(Mode mode)
-   {
-      this.mode = mode;
-   }
-   
-   public boolean isEnabled()
-   {
-      return enabled;
-   }
-   
-   public void setEnabled(boolean enabled)
-   {
-      if (this.enabled != enabled)
-      {
-         this.enabled = enabled;
-         // selector is null during component initialization (setup handled in @Create method)
-         if (usernameSelector != null && mode.equals(Mode.usernameOnly))
-         {
-            usernameSelector.setCookieEnabled(enabled);
-            usernameSelector.setDirty();
-         }
-         // selector is null during component initialization (setup handled in @Create method)
-         else if (tokenSelector != null && mode.equals(Mode.autoLogin))
-         {
-            tokenSelector.setCookieEnabled(enabled);
-            tokenSelector.setDirty();
-         }
-      }      
-   }
-
-   public int getCookieMaxAge() {
-       return cookieMaxAge;
-   }
-
-   public void setCookieMaxAge(int cookieMaxAge) {
-       this.cookieMaxAge = cookieMaxAge;
-   }
-   
-   public TokenStore getTokenStore()
-   {
-      return tokenStore;
-   }
-   
-   public void setTokenStore(TokenStore tokenStore)
-   {
-      this.tokenStore = tokenStore;
-   }
-   
-   @Create
-   public void create()
-   {
-      if (mode.equals(Mode.usernameOnly))
-      {      
-         usernameSelector = new UsernameSelector();
-         usernameSelector.setCookieEnabled(enabled);
-      }
-      else if (mode.equals(Mode.autoLogin))
-      {
-         tokenSelector = new TokenSelector();
-         tokenSelector.setCookieEnabled(enabled);
-
-         // Default to JpaTokenStore
-         if (tokenStore == null)
-         {
-            tokenStore = (TokenStore) Component.getInstance(JpaTokenStore.class, true);
-         }         
-      }
-   }
-   
-   protected String generateTokenValue()
-   {
-      StringBuilder sb = new StringBuilder();
-      sb.append(new UID().toString());
-      sb.append(":");
-      sb.append(random.nextLong());
-      return sb.toString();
-   }
-   
-   protected String encodeToken(String username, String value)
-   {
-      StringBuilder sb = new StringBuilder();
-      sb.append(username);
-      sb.append(":");
-      sb.append(value);
-      return Base64.encodeBytes(sb.toString().getBytes(), Base64.DONT_BREAK_LINES);      
-   }
-   
-   public String getCookiePath()
-   {
-      FacesContext ctx = FacesContext.getCurrentInstance();
-      return ctx != null ? ctx.getExternalContext().getRequestContextPath() : null;
-   }
-   
-   @Observer(Credentials.EVENT_INIT_CREDENTIALS)
-   public void initCredentials(Credentials credentials)
-   {     
-      String cookiePath = getCookiePath();
-      
-      if (mode.equals(Mode.usernameOnly))
-      {         
-         if (cookiePath != null)
-         {
-            usernameSelector.setCookiePath(cookiePath);
-         }
-         
-         String username = usernameSelector.getCookieValue();
-         if (username!=null)
-         {
-            setEnabled(true);
-            credentials.setUsername(username);
-         }
-               
-         usernameSelector.setDirty();
-      }
-      else if (mode.equals(Mode.autoLogin))
-      {
-         if (cookiePath != null)
-         {
-            tokenSelector.setCookiePath(cookiePath);
-         }
-         
-         String token = tokenSelector.getCookieValue();
-         if (token != null)
-         {
-            setEnabled(true);
-            
-            DecodedToken decoded = new DecodedToken(token);
-
-            if (tokenStore.validateToken(decoded.getUsername(), decoded.getValue()))
-            {
-               credentials.setUsername(decoded.getUsername());
-               credentials.setPassword(decoded.getValue());               
-            }
-            else
-            {
-               // Have we been compromised? Just in case, invalidate all authentication tokens
-               tokenStore.invalidateAll(decoded.getUsername());
-            }
-         }
-      }
-   }
-   
-   /**
-    * I hate these hacks... 
-    */
-   private class BoolWrapper 
-   {
-      boolean value;
-   }
-   
-   @Observer(Identity.EVENT_QUIET_LOGIN)
-   public void quietLogin()
-   {
-      final Identity identity = Identity.instance();
-      
-      if (mode.equals(Mode.autoLogin) && isEnabled())
-      {
-         final String username = identity.getCredentials().getUsername();    
-         final BoolWrapper userEnabled = new BoolWrapper();
-         final List<String> roles = new ArrayList<String>();
-         
-         // Double check our credentials again
-         if (tokenStore.validateToken(username, identity.getCredentials().getPassword()))
-         {            
-            new RunAsOperation(true) {
-               @Override
-               public void execute()
-               {        
-                  if (IdentityManager.instance().isUserEnabled(username))
-                  {
-                     userEnabled.value = true;
-
-                     for (String role : IdentityManager.instance().getImpliedRoles(username))
-                     {
-                        roles.add(role);
-                     }
-                  }
-               }
-            }.run();
-            
-            if (userEnabled.value)
-            {
-               identity.unAuthenticate();
-               identity.preAuthenticate();
-               
-               // populate the roles
-               for (String role : roles)
-               {
-                  identity.addRole(role);
-               }
-   
-               // Set the principal
-               identity.getSubject().getPrincipals().add(new SimplePrincipal(username));
-               identity.postAuthenticate();
-            
-               autoLoggedIn = true;
-            }
-         }            
-      }
-   }
-   
-   @Observer(Identity.EVENT_LOGGED_OUT)
-   public void loggedOut()
-   {
-      if (mode.equals(Mode.autoLogin))
-      {
-         tokenSelector.clearCookieValue();
-      }
-   }
-   
-   @Observer(Identity.EVENT_POST_AUTHENTICATE)
-   public void postAuthenticate(Identity identity)
-   {
-      if (mode.equals(Mode.usernameOnly))
-      {
-         // Password is set to null during authentication, so we set dirty
-         usernameSelector.setDirty();
-               
-         if ( !enabled )
-         {
-            usernameSelector.clearCookieValue();
-         }
-         else
-         {
-            usernameSelector.setCookieMaxAge(cookieMaxAge);
-            usernameSelector.setCookieValueIfEnabled( Identity.instance().getCredentials().getUsername() );
-         }
-      }
-      else if (mode.equals(Mode.autoLogin))
-      {
-         tokenSelector.setDirty();
-         
-         DecodedToken decoded = new DecodedToken(tokenSelector.getCookieValue());
-         
-         // Invalidate the current token (if it exists) whether enabled or not
-         if (decoded.getUsername() != null)
-         {
-            tokenStore.invalidateToken(decoded.getUsername(), decoded.getValue());
-         }
-         
-         if ( !enabled ) 
-         {
-            tokenSelector.clearCookieValue();         
-         }
-         else
-         {
-            String value = generateTokenValue();
-            tokenStore.createToken(identity.getPrincipal().getName(), value);
-            tokenSelector.setCookieEnabled(enabled);
-            tokenSelector.setCookieMaxAge(cookieMaxAge);
-            tokenSelector.setCookieValueIfEnabled(encodeToken(identity.getPrincipal().getName(), value));            
-         }
-      }
-   }        
-   
-   @Observer(Credentials.EVENT_CREDENTIALS_UPDATED)
-   public void credentialsUpdated()
-   {
-      if (mode.equals(Mode.usernameOnly)) 
-      {
-         usernameSelector.setDirty();
-      }      
-   }      
-   
-   /**
-    * A flag that an application can use to protect sensitive operations if the user has been
-    * auto-authenticated. 
-    */
-   public boolean isAutoLoggedIn()
-   {
-      return autoLoggedIn;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Role.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Role.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/Role.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,28 +0,0 @@
-package org.jboss.seam.security;
-
-/**
- * Represents a user role.  A conditional role is a special type of role that is assigned to a user
- * based on the contextual state of a permission check.
- *  
- * @author Shane Bryzak
- */
-public class Role extends SimplePrincipal
-{   
-   private boolean conditional;
-   
-   public Role(String name)
-   {
-      super(name);
-   }   
-   
-   public Role(String name, boolean conditional)
-   {
-      this(name);
-      this.conditional = conditional;
-   }
-   
-   public boolean isConditional()
-   {
-      return conditional;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/RunAsOperation.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/RunAsOperation.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/RunAsOperation.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,77 +0,0 @@
-package org.jboss.seam.security;
-
-import java.security.Principal;
-import java.security.acl.Group;
-
-import javax.security.auth.Subject;
-
-/**
- * Defines a security operation that can be executed within a particular 
- * security context.
- * 
- * @author Shane Bryzak
- */
-public abstract class RunAsOperation
-{
-   private Principal principal;
-   private Subject subject;
-   
-   private boolean systemOp = false;
-      
-   public RunAsOperation()
-   {
-      principal = new SimplePrincipal(null);  
-      subject = new Subject();
-   }
-   
-   /**
-    * A system operation allows any security checks to pass
-    * 
-    * @param systemOp
-    */
-   public RunAsOperation(boolean systemOp)
-   {      
-      this();
-      this.systemOp = systemOp;
-   }
-   
-   public abstract void execute();
-   
-   public Principal getPrincipal()
-   {
-      return principal;
-   }
-   
-   public Subject getSubject()
-   {
-      return subject;
-   }
-   
-   public RunAsOperation addRole(String role)
-   {
-      for ( Group sg : getSubject().getPrincipals(Group.class) )      
-      {
-         if ( Identity.ROLES_GROUP.equals( sg.getName() ) )
-         {
-            sg.addMember(new SimplePrincipal(role));
-            break;
-         }
-      }
-               
-      SimpleGroup roleGroup = new SimpleGroup(Identity.ROLES_GROUP);
-      roleGroup.addMember(new SimplePrincipal(role));
-      getSubject().getPrincipals().add(roleGroup); 
-      
-      return this;
-   }
-   
-   public boolean isSystemOperation()
-   {
-      return systemOp;
-   }
-   
-   public void run()
-   {      
-      Identity.instance().runAs(this);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SecurityFunctions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SecurityFunctions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SecurityFunctions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.security;
-
-/**
- * Delegating wrapper for EL security functions.
- * 
- * @author Shane Bryzak
- */
-public class SecurityFunctions
-{
-   public static boolean hasRole(String name)
-   {
-      return Identity.instance().hasRole(name);
-   }
-   
-   public static boolean hasPermission(String name, String action, Object arg)
-   {
-      if (arg != null)
-      {
-         return Identity.instance().hasPermission(name, action, arg);
-      }
-      else
-      {
-         return Identity.instance().hasPermission(name, action);
-      }
-   }
-   
-   public static boolean hasPermission(Object target, String action)
-   {
-      return Identity.instance().hasPermission(target, action);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SecurityInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SecurityInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SecurityInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,299 +0,0 @@
-package org.jboss.seam.security;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.annotations.security.PermissionCheck;
-import org.jboss.seam.annotations.security.Restrict;
-import org.jboss.seam.annotations.security.RoleCheck;
-import org.jboss.seam.async.AsynchronousInterceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.util.Strings;
-
-/**
- * Provides authorization services for component invocations.
- * 
- * @author Shane Bryzak
- */
- at Interceptor(type=InterceptorType.CLIENT, 
-         around=AsynchronousInterceptor.class)
-public class SecurityInterceptor extends AbstractInterceptor implements Serializable
-{
-   private static final long serialVersionUID = -6567750187000766925L;
-   
-   /**
-    * You may encounter a JVM bug where the field initializer is not evaluated for a transient field after deserialization.
-    * @see "http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6252102"
-    */
-   private transient volatile Map<Method,Restriction> restrictions = new HashMap<Method,Restriction>();
-   
-   private class Restriction
-   {
-      private String expression;
-      
-      private String permissionTarget;
-      private String permissionAction;
-      
-      private Map<String, Object> methodRestrictions;
-      private Map<Integer,Set<String>> paramRestrictions;
-      private Set<String> roleRestrictions;
-            
-      public void setExpression(String expression)
-      {
-         this.expression = expression;
-      }
-      
-      public void setPermissionTarget(String target)
-      {
-         this.permissionTarget = target;
-      }
-      
-      public void setPermissionAction(String action)
-      {
-         this.permissionAction = action;
-      }
-      
-      public void addMethodRestriction(Object target, String action)
-      {
-         if (methodRestrictions == null)
-         {
-            methodRestrictions = new HashMap<String, Object>();
-         }
-         
-         methodRestrictions.put(action, target);
-      }
-      
-      public void addRoleRestriction(String role)
-      {
-         if (roleRestrictions == null)
-         {
-            roleRestrictions = new HashSet<String>();
-         }
-         
-         roleRestrictions.add(role);
-      }
-      
-      public void addParameterRestriction(int index, String action)
-      {
-         Set<String> actions = null;
-         
-         if (paramRestrictions == null)
-         {
-            paramRestrictions = new HashMap<Integer,Set<String>>();
-         }
-         
-         if (!paramRestrictions.containsKey(index))
-         {
-            actions = new HashSet<String>();
-            paramRestrictions.put(index, actions);
-         }
-         else
-         {
-            actions = paramRestrictions.get(index);
-         }
-         
-         actions.add(action);
-      }
-      
-      public void check(Object[] parameters)
-      {
-         if (Identity.isSecurityEnabled())
-         {
-            if (expression != null)
-            {
-               Identity.instance().checkRestriction(expression);
-            }
-            
-            if (methodRestrictions != null)
-            {
-               for (String action : methodRestrictions.keySet())
-               {
-                  Identity.instance().checkPermission(methodRestrictions.get(action), action);
-               }
-            }
-            
-            if (paramRestrictions != null)
-            {
-               for (Integer idx : paramRestrictions.keySet())
-               {
-                  Set<String> actions = paramRestrictions.get(idx);
-                  for (String action : actions) 
-                  {
-                     Identity.instance().checkPermission(parameters[idx], action);
-                  }
-               }
-            }
-            
-            if (roleRestrictions != null)
-            {
-               for (String role : roleRestrictions)
-               {
-                  Identity.instance().checkRole(role);
-               }
-            }
-            
-            if (permissionTarget != null && permissionAction != null)
-            {
-               Identity.instance().checkPermission(permissionTarget, permissionAction);
-            }
-         }
-      }
-   }
-
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception
-   {
-      Method interfaceMethod = invocation.getMethod();
-      
-      if (!"hashCode".equals(interfaceMethod.getName()))
-      {
-         Restriction restriction = getRestriction(interfaceMethod);      
-         if ( restriction != null ) restriction.check(invocation.getParameters());
-      }
-
-      return invocation.proceed();
-   }
-
-   private Restriction getRestriction(Method interfaceMethod) throws Exception
-   {
-      // see field declaration as to why this is done
-      if (restrictions == null)
-      {
-         synchronized(this)
-         {
-            restrictions = new HashMap<Method, Restriction>();
-         }
-      }
-      
-      if (!restrictions.containsKey(interfaceMethod))
-      {
-         synchronized(restrictions)
-         {
-            // FIXME this logic should be abstracted rather than sitting in the middle of this interceptor
-            if (!restrictions.containsKey(interfaceMethod))
-            {  
-               Restriction restriction = null;
-               
-               Method method = getComponent().getBeanClass().getMethod( 
-                     interfaceMethod.getName(), interfaceMethod.getParameterTypes() );      
-               
-               Restrict restrict = null;
-               
-               if ( method.isAnnotationPresent(Restrict.class) )
-               {
-                  restrict = method.getAnnotation(Restrict.class);
-               }
-               else if ( getComponent().getBeanClass().isAnnotationPresent(Restrict.class) )
-               {
-                  if ( !getComponent().isLifecycleMethod(method) )
-                  {
-                     restrict = getComponent().getBeanClass().getAnnotation(Restrict.class); 
-                  }
-               }
-               
-               if (restrict != null)
-               {
-                  if (restriction == null) restriction = new Restriction();
-                  
-                  if ( Strings.isEmpty(restrict.value()) )
-                  {
-                     restriction.setPermissionTarget(getComponent().getName());
-                     restriction.setPermissionAction(method.getName());
-                  }
-                  else
-                  {
-                     restriction.setExpression(restrict.value());
-                  }
-               }
-               
-               for (Annotation annotation : method.getDeclaringClass().getAnnotations())
-               {
-                  if (annotation.annotationType().isAnnotationPresent(RoleCheck.class))
-                  {
-                     if (restriction == null) restriction = new Restriction();
-                     restriction.addRoleRestriction(annotation.annotationType().getSimpleName().toLowerCase());
-                  }
-               }
-               
-               for (Annotation annotation : method.getAnnotations())
-               {
-                  if (annotation.annotationType().isAnnotationPresent(PermissionCheck.class))
-                  {
-                     PermissionCheck permissionCheck = annotation.annotationType().getAnnotation(
-                           PermissionCheck.class);
-                     
-                     Method valueMethod = null;
-                     for (Method m : annotation.annotationType().getDeclaredMethods())
-                     {
-                        valueMethod = m;
-                        break;
-                     }
-                     
-                     if (valueMethod != null)
-                     {                        
-                        if (restriction == null) restriction = new Restriction();
-                        Object target = valueMethod.invoke(annotation);
-                        if (!target.equals(void.class))
-                        {
-                           restriction.addMethodRestriction(target, 
-                                 getPermissionAction(permissionCheck, annotation));
-                        }
-                     }
-                  }
-                  if (annotation.annotationType().isAnnotationPresent(RoleCheck.class))
-                  {
-                     if (restriction == null) restriction = new Restriction();
-                     restriction.addRoleRestriction(annotation.annotationType().getSimpleName().toLowerCase());
-                  }
-               }               
-               
-               for (int i = 0; i < method.getParameterAnnotations().length; i++)
-               {
-                  Annotation[] annotations = method.getParameterAnnotations()[i]; 
-                  for (Annotation annotation : annotations)
-                  {
-                     if (annotation.annotationType().isAnnotationPresent(PermissionCheck.class))
-                     {                        
-                        PermissionCheck permissionCheck = annotation.annotationType().getAnnotation(
-                              PermissionCheck.class);
-                        if (restriction == null) restriction = new Restriction();
-                        restriction.addParameterRestriction(i, 
-                              getPermissionAction(permissionCheck, annotation));                        
-                     }
-                  }
-               }                             
-               
-               restrictions.put(interfaceMethod, restriction);
-               return restriction;
-            }
-         }
-      }
-      return restrictions.get(interfaceMethod);      
-   }
-   
-   private String getPermissionAction(PermissionCheck check, Annotation annotation)
-   {
-      if (!"".equals(check.value()))
-      {
-         return check.value();
-      }
-      else
-      {
-         return annotation.annotationType().getSimpleName().toLowerCase();
-      }
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().isSecure() && !getComponent().beanClassHasAnnotation("javax.jws.WebService");
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SimpleGroup.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SimpleGroup.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SimpleGroup.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,93 +0,0 @@
-package org.jboss.seam.security;
-
-import java.io.Serializable;
-import java.security.Principal;
-import java.security.acl.Group;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Implementation of the Group interface, used for holding roles etc.
- * 
- * @author Shane Bryzak
- */
-public class SimpleGroup implements Group, Serializable
-{
-   private static final long serialVersionUID = 5766373925836425908L;
-
-   /**
-    * The name of the group
-    */
-   private String name;
-
-   /**
-    * The members of this group
-    */
-   private Set<Principal> members = new HashSet<Principal>();
-
-   public SimpleGroup(String name)
-   {
-      this.name = name;
-   }
-
-   public boolean addMember(Principal user)
-   {
-      return members.add(user);
-   }
-
-   public boolean isMember(Principal member)
-   {
-      if ( members.contains(member) )
-      {
-         return true;
-      }
-      else
-      {
-         for (Principal m : members)
-         {
-            if (m instanceof Group && ((Group) m).isMember(member))
-            {
-               return true;
-            }
-         }
-      }
-      return false;
-   }
-
-   public Enumeration<? extends Principal> members()
-   {
-      return Collections.enumeration(members);
-   }
-
-   public boolean removeMember(Principal user)
-   {
-      return members.remove(user);
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   @Override
-   public boolean equals(Object obj)
-   {
-      if (obj instanceof SimpleGroup)
-      {
-         SimpleGroup other = (SimpleGroup) obj;
-         return other.name.equals(name);
-      }
-      else
-      {
-         return false;
-      }
-   }
-
-   @Override
-   public int hashCode()
-   {
-      return name.hashCode();
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SimplePrincipal.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SimplePrincipal.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/SimplePrincipal.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,54 +0,0 @@
-package org.jboss.seam.security;
-
-import java.io.Serializable;
-import java.security.Principal;
-
-/**
- * Simple implementation of the Principal interface, supporting a named user.
- * 
- * @author Shane Bryzak
- */
-public class SimplePrincipal implements Principal, Serializable
-{
-   private static final long serialVersionUID = 5609375932836425908L;   
-   
-   private String name;
-   
-   public SimplePrincipal(String name)
-   {
-      this.name = name;
-   }
-   
-   public String getName()
-   {
-      return name;
-   }
-
-   @Override
-   public boolean equals(Object obj)
-   {
-      if (obj instanceof Principal)
-      {
-         Principal other = (Principal) obj;
-         return name == null ?
-                  other.getName() == null :
-                  name.equals( other.getName() );
-      }
-      else
-      {
-         return false;
-      }
-   }
-
-   @Override
-   public int hashCode()
-   {
-      return name != null ? name.hashCode() : super.hashCode();
-   }
-
-   @Override
-   public String toString()
-   {
-      return name;
-   }   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/TokenStore.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/TokenStore.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/TokenStore.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,15 +0,0 @@
-package org.jboss.seam.security;
-
-/**
- * A store containing user authentication tokens.  Used in conjunction with the RememberMe
- * component to auto-login users that present a valid cookie-based token.
- * 
- * @author Shane Bryzak
- */
-public interface TokenStore
-{
-   void createToken(String username, String value);
-   boolean validateToken(String username, String value);
-   void invalidateToken(String username, String value);
-   void invalidateAll(String username);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/BinTools.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/BinTools.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/BinTools.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,122 +0,0 @@
-package org.jboss.seam.security.crypto;
-
-/**
- * Copied from Matthias Gartner's PKCS#5 implementation - see
- * http://rtner.de/software/PBKDF2.html
- * 
- * <p>
- * Free auxiliary functions. Copyright (c) 2007 Matthias G&auml;rtner
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * </p>
- * <p>
- * For Details, see <a
- * href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
- * >http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
- * </p>
- * 
- * @author Matthias G&auml;rtner
- * @version 1.0
- */
-public class BinTools
-{
-   public static final String hex = "0123456789ABCDEF";
-   
-   /**
-    * Simple binary-to-hexadecimal conversion.
-    * 
-    * @param b
-    *           Input bytes. May be <code>null</code>.
-    * @return Hexadecimal representation of b. Uppercase A-F, two characters per
-    *         byte. Empty string on <code>null</code> input.
-    */
-   public static String bin2hex(final byte[] b)
-   {
-      if (b == null)
-      {
-         return "";
-      }
-      StringBuffer sb = new StringBuffer(2 * b.length);
-      for (int i = 0; i < b.length; i++)
-      {
-         int v = (256 + b[i]) % 256;
-         sb.append(hex.charAt((v / 16) & 15));
-         sb.append(hex.charAt((v % 16) & 15));
-      }
-      return sb.toString();
-   }
-   
-   /**
-    * Convert hex string to array of bytes.
-    * 
-    * @param s
-    *           String containing hexadecimal digits. May be <code>null</code>.
-    *           On odd length leading zero will be assumed.
-    * @return Array on bytes, non-<code>null</code>.
-    * @throws IllegalArgumentException
-    *            when string contains non-hex character
-    */
-   public static byte[] hex2bin(final String s)
-   {
-      String m = s;
-      if (s == null)
-      {
-         // Allow empty input string.
-         m = "";
-      }
-      else if (s.length() % 2 != 0)
-      {
-         // Assume leading zero for odd string length
-         m = "0" + s;
-      }
-      byte r[] = new byte[m.length() / 2];
-      for (int i = 0, n = 0; i < m.length(); n++)
-      {
-         char h = m.charAt(i++);
-         char l = m.charAt(i++);
-         r[n] = (byte) (hex2bin(h) * 16 + hex2bin(l));
-      }
-      return r;
-   }
-   
-   /**
-    * Convert hex digit to numerical value.
-    * 
-    * @param c
-    *           0-9, a-f, A-F allowd.
-    * @return 0-15
-    * @throws IllegalArgumentException
-    *            on non-hex character
-    */
-   public static int hex2bin(char c)
-   {
-      if (c >= '0' && c <= '9')
-      {
-         return (c - '0');
-      }
-      if (c >= 'A' && c <= 'F')
-      {
-         return (c - 'A' + 10);
-      }
-      if (c >= 'a' && c <= 'f')
-      {
-         return (c - 'a' + 10);
-      }
-      throw new IllegalArgumentException("Input string may only contain hex digits, but found '" + c + "'");
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/MacBasedPRF.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/MacBasedPRF.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/MacBasedPRF.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,114 +0,0 @@
-package org.jboss.seam.security.crypto;
-
-import java.security.InvalidKeyException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
-
-/**
- * Copied from Matthias Gartner's PKCS#5 implementation - see
- * http://rtner.de/software/PBKDF2.html
- * 
- * Default PRF implementation based on standard javax.crypt.Mac mechanisms.
- * 
- * <hr />
- * <p>
- * A free Java implementation of Password Based Key Derivation Function 2 as
- * defined by RFC 2898. Copyright (c) 2007 Matthias G&auml;rtner
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * </p>
- * <p>
- * For Details, see <a
- * href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
- * </p>
- * 
- * @author Matthias G&auml;rtner
- * @version 1.0
- */
-public class MacBasedPRF implements PRF
-{
-    protected Mac mac;
-
-    protected int hLen;
-
-    protected String macAlgorithm;
-
-    /**
-     * Create Mac-based Pseudo Random Function.
-     * 
-     * @param macAlgorithm
-     *            Mac algorithm to use, i.e. HMacSHA1 or HMacMD5.
-     */
-    public MacBasedPRF(String macAlgorithm)
-    {
-        this.macAlgorithm = macAlgorithm;
-        try
-        {
-            mac = Mac.getInstance(macAlgorithm);
-            hLen = mac.getMacLength();
-        }
-        catch (NoSuchAlgorithmException e)
-        {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public MacBasedPRF(String macAlgorithm, String provider)
-    {
-        this.macAlgorithm = macAlgorithm;
-        try
-        {
-            mac = Mac.getInstance(macAlgorithm, provider);
-            hLen = mac.getMacLength();
-        }
-        catch (NoSuchAlgorithmException e)
-        {
-            throw new RuntimeException(e);
-        }
-        catch (NoSuchProviderException e)
-        {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public byte[] doFinal(byte[] M)
-    {
-        byte[] r = mac.doFinal(M);
-        return r;
-    }
-
-    public int getHLen()
-    {
-        return hLen;
-    }
-
-    public void init(byte[] P)
-    {
-        try
-        {
-            mac.init(new SecretKeySpec(P, macAlgorithm));
-        }
-        catch (InvalidKeyException e)
-        {
-            throw new RuntimeException(e);
-        }
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,102 +0,0 @@
-package org.jboss.seam.security.crypto;
-
-/**
- * Copied from Matthias Gartner's PKCS#5 implementation - see
- * http://rtner.de/software/PBKDF2.html.
- * 
- * <p>
- * A free Java implementation of Password Based Key Derivation Function 2 as
- * defined by RFC 2898. Copyright (c) 2007 Matthias G&auml;rtner
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * </p>
- * <p>
- * For Details, see <a
- * href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
- * >http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
- * </p>
- * 
- * @author Matthias G&auml;rtner
- * @version 1.0
- */
-public interface PBKDF2
-{
-   /**
-    * Convert String-based input to internal byte array, then invoke PBKDF2.
-    * Desired key length defaults to Pseudo Random Function block size.
-    * 
-    * @param inputPassword
-    *           Candidate password to compute the derived key for.
-    * @return internal byte array
-    */
-   public abstract byte[] deriveKey(String inputPassword);
-   
-   /**
-    * Convert String-based input to internal byte array, then invoke PBKDF2.
-    * 
-    * @param inputPassword
-    *           Candidate password to compute the derived key for.
-    * @param dkLen
-    *           Specify desired key length
-    * @return internal byte array
-    */
-   public abstract byte[] deriveKey(String inputPassword, int dkLen);
-   
-   /**
-    * Convert String-based input to internal byte arrays, then invoke PBKDF2 and
-    * verify result against the reference data that is supplied in the
-    * PBKDF2Parameters.
-    * 
-    * @param inputPassword
-    *           Candidate password to compute the derived key for.
-    * @return <code>true</code> password match; <code>false</code> incorrect
-    *         password
-    */
-   public abstract boolean verifyKey(String inputPassword);
-   
-   /**
-    * Allow reading of configured parameters.
-    * 
-    * @return Currently set parameters.
-    */
-   public abstract PBKDF2Parameters getParameters();
-   
-   /**
-    * Allow setting of configured parameters.
-    * 
-    * @param parameters
-    */
-   public abstract void setParameters(PBKDF2Parameters parameters);
-   
-   /**
-    * Get currently set Pseudo Random Function.
-    * 
-    * @return Currently set Pseudo Random Function
-    */
-   public abstract PRF getPseudoRandomFunction();
-   
-   /**
-    * Set the Pseudo Random Function to use. Note that deriveKeys/getPRF does
-    * init this object using the supplied candidate password. If this is
-    * undesired, one has to override getPRF.
-    * 
-    * @param prf
-    *           Pseudo Random Function to set.
-    */
-   public abstract void setPseudoRandomFunction(PRF prf);
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Engine.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Engine.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Engine.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,337 +0,0 @@
-package org.jboss.seam.security.crypto;
-
-import java.io.UnsupportedEncodingException;
-
-/**
- * Copied from Matthias Gartner's PKCS#5 implementation - see
- * http://rtner.de/software/PBKDF2.html
- * 
- * <p>
- * Request for Comments: 2898 PKCS #5: Password-Based Cryptography Specification
- * <p>
- * Version 2.0
- * 
- * <p>
- * PBKDF2 (P, S, c, dkLen)
- * 
- * <p>
- * Options:
- * <ul>
- * <li>PRF underlying pseudorandom function (hLen denotes the length in octets
- * of the pseudorandom function output). PRF is pluggable.</li>
- * </ul>
- * 
- * <p>
- * Input:
- * <ul>
- * <li>P password, an octet string</li>
- * <li>S salt, an octet string</li>
- * <li>c iteration count, a positive integer</li>
- * <li>dkLen intended length in octets of the derived key, a positive integer,
- * at most (2^32 - 1) * hLen</li>
- * </ul>
- * 
- * <p>
- * Output:
- * <ul>
- * <li>DK derived key, a dkLen-octet string</li>
- * </ul>
- * 
- * <hr />
- * <p>
- * A free Java implementation of Password Based Key Derivation Function 2 as
- * defined by RFC 2898. Copyright (c) 2007 Matthias G&auml;rtner
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * </p>
- * <p>
- * For Details, see <a
- * href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
- * >http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
- * </p>
- * 
- * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898</a>
- * @author Matthias G&auml;rtner
- * @version 1.0
- */
-public class PBKDF2Engine implements PBKDF2
-{
-   protected PBKDF2Parameters parameters;
-   
-   protected PRF prf;
-   
-   /**
-    * Constructor for PBKDF2 implementation object. PBKDF2 parameters must be
-    * passed later.
-    */
-   public PBKDF2Engine()
-   {
-      this.parameters = null;
-      prf = null;
-   }
-   
-   /**
-    * Constructor for PBKDF2 implementation object. PBKDF2 parameters are passed
-    * so that this implementation knows iteration count, method to use and
-    * String encoding.
-    * 
-    * @param parameters
-    *           Data holder for iteration count, method to use et cetera.
-    */
-   public PBKDF2Engine(PBKDF2Parameters parameters)
-   {
-      this.parameters = parameters;
-      prf = null;
-   }
-   
-   /**
-    * Constructor for PBKDF2 implementation object. PBKDF2 parameters are passed
-    * so that this implementation knows iteration count, method to use and
-    * String encoding.
-    * 
-    * @param parameters
-    *           Data holder for iteration count, method to use et cetera.
-    * @param prf
-    *           Supply customer Pseudo Random Function.
-    */
-   public PBKDF2Engine(PBKDF2Parameters parameters, PRF prf)
-   {
-      this.parameters = parameters;
-      this.prf = prf;
-   }
-   
-   public byte[] deriveKey(String inputPassword)
-   {
-      return deriveKey(inputPassword, 0);
-   }
-   
-   public byte[] deriveKey(String inputPassword, int dkLen)
-   {
-      byte[] r = null;
-      byte P[] = null;
-      String charset = parameters.getHashCharset();
-      if (inputPassword == null)
-      {
-         inputPassword = "";
-      }
-      try
-      {
-         if (charset == null)
-         {
-            P = inputPassword.getBytes();
-         }
-         else
-         {
-            P = inputPassword.getBytes(charset);
-         }
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         throw new RuntimeException(e);
-      }
-      assertPRF(P);
-      if (dkLen == 0)
-      {
-         dkLen = prf.getHLen();
-      }
-      r = PBKDF2(prf, parameters.getSalt(), parameters.getIterationCount(), dkLen);
-      return r;
-   }
-   
-   public boolean verifyKey(String inputPassword)
-   {
-      byte[] referenceKey = getParameters().getDerivedKey();
-      if (referenceKey == null || referenceKey.length == 0)
-      {
-         return false;
-      }
-      byte[] inputKey = deriveKey(inputPassword, referenceKey.length);
-      
-      if (inputKey == null || inputKey.length != referenceKey.length)
-      {
-         return false;
-      }
-      for (int i = 0; i < inputKey.length; i++)
-      {
-         if (inputKey[i] != referenceKey[i])
-         {
-            return false;
-         }
-      }
-      return true;
-   }
-   
-   /**
-    * Factory method. Default implementation is (H)MAC-based. To be overridden
-    * in derived classes.
-    * 
-    * @param P
-    *           User-supplied candidate password as array of bytes.
-    */
-   protected void assertPRF(byte[] P)
-   {
-      if (prf == null)
-      {
-         prf = new MacBasedPRF(parameters.getHashAlgorithm());
-      }
-      prf.init(P);
-   }
-   
-   public PRF getPseudoRandomFunction()
-   {
-      return prf;
-   }
-   
-   /**
-    * Core Password Based Key Derivation Function 2.
-    * 
-    * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2</a>
-    * @param prf
-    *           Pseudo Random Function (i.e. HmacSHA1)
-    * @param S
-    *           Salt as array of bytes. <code>null</code> means no salt.
-    * @param c
-    *           Iteration count (see RFC 2898 4.2)
-    * @param dkLen
-    *           desired length of derived key.
-    * @return internal byte array
-    */
-   protected byte[] PBKDF2(PRF prf, byte[] S, int c, int dkLen)
-   {
-      if (S == null)
-      {
-         S = new byte[0];
-      }
-      int hLen = prf.getHLen();
-      int l = ceil(dkLen, hLen);
-      int r = dkLen - (l - 1) * hLen;
-      byte T[] = new byte[l * hLen];
-      int ti_offset = 0;
-      for (int i = 1; i <= l; i++)
-      {
-         _F(T, ti_offset, prf, S, c, i);
-         ti_offset += hLen;
-      }
-      if (r < hLen)
-      {
-         // Incomplete last block
-         byte DK[] = new byte[dkLen];
-         System.arraycopy(T, 0, DK, 0, dkLen);
-         return DK;
-      }
-      return T;
-   }
-   
-   /**
-    * Integer division with ceiling function.
-    * 
-    * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step 2.</a>
-    * @param a
-    * @param b
-    * @return ceil(a/b)
-    */
-   protected int ceil(int a, int b)
-   {
-      int m = 0;
-      if (a % b > 0)
-      {
-         m = 1;
-      }
-      return a / b + m;
-   }
-   
-   /**
-    * Function F.
-    * 
-    * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step 3.</a>
-    * @param dest
-    *           Destination byte buffer
-    * @param offset
-    *           Offset into destination byte buffer
-    * @param prf
-    *           Pseudo Random Function
-    * @param S
-    *           Salt as array of bytes
-    * @param c
-    *           Iteration count
-    * @param blockIndex
-    */
-   protected void _F(byte[] dest, int offset, PRF prf, byte[] S, int c, int blockIndex)
-   {
-      int hLen = prf.getHLen();
-      byte U_r[] = new byte[hLen];
-      
-      // U0 = S || INT (i);
-      byte U_i[] = new byte[S.length + 4];
-      System.arraycopy(S, 0, U_i, 0, S.length);
-      INT(U_i, S.length, blockIndex);
-      
-      for (int i = 0; i < c; i++)
-      {
-         U_i = prf.doFinal(U_i);
-         xor(U_r, U_i);
-      }
-      System.arraycopy(U_r, 0, dest, offset, hLen);
-   }
-   
-   /**
-    * Block-Xor. Xor source bytes into destination byte buffer. Destination
-    * buffer must be same length or less than source buffer.
-    * 
-    * @param dest
-    * @param src
-    */
-   protected void xor(byte[] dest, byte[] src)
-   {
-      for (int i = 0; i < dest.length; i++)
-      {
-         dest[i] ^= src[i];
-      }
-   }
-   
-   /**
-    * Four-octet encoding of the integer i, most significant octet first.
-    * 
-    * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step 3.</a>
-    * @param dest
-    * @param offset
-    * @param i
-    */
-   protected void INT(byte[] dest, int offset, int i)
-   {
-      dest[offset + 0] = (byte) (i / (256 * 256 * 256));
-      dest[offset + 1] = (byte) (i / (256 * 256));
-      dest[offset + 2] = (byte) (i / (256));
-      dest[offset + 3] = (byte) (i);
-   }
-   
-   public PBKDF2Parameters getParameters()
-   {
-      return parameters;
-   }
-   
-   public void setParameters(PBKDF2Parameters parameters)
-   {
-      this.parameters = parameters;
-   }
-   
-   public void setPseudoRandomFunction(PRF prf)
-   {
-      this.prf = prf;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Formatter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Formatter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Formatter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,57 +0,0 @@
-package org.jboss.seam.security.crypto;
-
-/**
- * Copied from Matthias Gartner's PKCS#5 implementation - see
- * http://rtner.de/software/PBKDF2.html
- * 
- * <p>
- * A free Java implementation of Password Based Key Derivation Function 2 as
- * defined by RFC 2898. Copyright (c) 2007 Matthias G&auml;rtner
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * </p>
- * <p>
- * For Details, see <a
- * href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
- * </p>
- * 
- * @author Matthias G&auml;rtner
- * @version 1.0
- */
-public interface PBKDF2Formatter
-{
-    /**
-     * Convert parameters to String.
-     * 
-     * @param p
-     *            Parameters object to output.
-     * @return String representation
-     */
-    public abstract String toString(PBKDF2Parameters p);
-
-    /**
-     * Convert String to parameters. Depending on actual implementation, it may
-     * be required to set further fields externally.
-     * 
-     * @param s
-     *            String representation of parameters to decode.
-     * @return <code>false</code> syntax OK, <code>true</code> some syntax
-     *         issue.
-     */
-    public abstract boolean fromString(PBKDF2Parameters p, String s);
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2HexFormatter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2HexFormatter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2HexFormatter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,68 +0,0 @@
-package org.jboss.seam.security.crypto;
-
-/**
- * Copied from Matthias Gartner's PKCS#5 implementation - see
- * http://rtner.de/software/PBKDF2.html
- * 
- * <p>
- * A free Java implementation of Password Based Key Derivation Function 2 as
- * defined by RFC 2898. Copyright (c) 2007 Matthias G&auml;rtner
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * </p>
- * <p>
- * For Details, see <a
- * href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
- * </p>
- * 
- * @author Matthias G&auml;rtner
- * @version 1.0
- */
-public class PBKDF2HexFormatter implements PBKDF2Formatter
-{
-    public boolean fromString(PBKDF2Parameters p, String s)
-    {
-        if (p == null || s == null)
-        {
-            return true;
-        }
-
-        String[] p123 = s.split(":");
-        if (p123 == null || p123.length != 3)
-        {
-            return true;
-        }
-
-        byte salt[] = BinTools.hex2bin(p123[0]);
-        int iterationCount = Integer.parseInt(p123[1]);
-        byte bDK[] = BinTools.hex2bin(p123[2]);
-
-        p.setSalt(salt);
-        p.setIterationCount(iterationCount);
-        p.setDerivedKey(bDK);
-        return false;
-    }
-
-    public String toString(PBKDF2Parameters p)
-    {
-        String s = BinTools.bin2hex(p.getSalt()) + ":"
-                + String.valueOf(p.getIterationCount()) + ":"
-                + BinTools.bin2hex(p.getDerivedKey());
-        return s;
-    }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Parameters.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Parameters.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PBKDF2Parameters.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,165 +0,0 @@
-package org.jboss.seam.security.crypto;
-
-/**
- * Copied from Matthias Gartner's PKCS#5 implementation - see
- * http://rtner.de/software/PBKDF2.html
- * 
- * <p>
- * Parameter data holder for PBKDF2 configuration.
- * </p>
- * 
- * <hr />
- * <p>
- * A free Java implementation of Password Based Key Derivation Function 2 as
- * defined by RFC 2898. Copyright (c) 2007 Matthias G&auml;rtner
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * </p>
- * <p>
- * For Details, see <a
- * href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
- * >http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
- * </p>
- * 
- * @author Matthias G&auml;rtner
- * @version 1.0
- */
-public class PBKDF2Parameters
-{
-   protected byte[] salt;
-   
-   protected int iterationCount;
-   
-   protected String hashAlgorithm;
-   
-   protected String hashCharset;
-   
-   /**
-    * The derived key is actually only a convenience to store a reference
-    * derived key. It is not used during computation.
-    */
-   protected byte[] derivedKey;
-   
-   /**
-    * Constructor. Defaults to <code>null</code> for byte arrays, UTF-8 as
-    * character set and 1000 for iteration count.
-    * 
-    */
-   public PBKDF2Parameters()
-   {
-      this.hashAlgorithm = null;
-      this.hashCharset = "UTF-8";
-      this.salt = null;
-      this.iterationCount = 1000;
-      this.derivedKey = null;
-   }
-   
-   /**
-    * Constructor.
-    * 
-    * @param hashAlgorithm
-    *           for example HMacSHA1 or HMacMD5
-    * @param hashCharset
-    *           for example UTF-8
-    * @param salt
-    *           Salt as byte array, may be <code>null</code> (not recommended)
-    * @param iterationCount
-    *           Number of iterations to execute. Recommended value 1000.
-    */
-   public PBKDF2Parameters(String hashAlgorithm, String hashCharset, byte[] salt, int iterationCount)
-   {
-      this.hashAlgorithm = hashAlgorithm;
-      this.hashCharset = hashCharset;
-      this.salt = salt;
-      this.iterationCount = iterationCount;
-      this.derivedKey = null;
-   }
-   
-   /**
-    * Constructor.
-    * 
-    * @param hashAlgorithm
-    *           for example HMacSHA1 or HMacMD5
-    * @param hashCharset
-    *           for example UTF-8
-    * @param salt
-    *           Salt as byte array, may be <code>null</code> (not recommended)
-    * @param iterationCount
-    *           Number of iterations to execute. Recommended value 1000.
-    * @param derivedKey
-    *           Convenience data holder, not used during computation.
-    */
-   public PBKDF2Parameters(String hashAlgorithm, String hashCharset, byte[] salt, int iterationCount, byte[] derivedKey)
-   {
-      this.hashAlgorithm = hashAlgorithm;
-      this.hashCharset = hashCharset;
-      this.salt = salt;
-      this.iterationCount = iterationCount;
-      this.derivedKey = derivedKey;
-   }
-   
-   public int getIterationCount()
-   {
-      return iterationCount;
-   }
-   
-   public void setIterationCount(int iterationCount)
-   {
-      this.iterationCount = iterationCount;
-   }
-   
-   public byte[] getSalt()
-   {
-      return salt;
-   }
-   
-   public void setSalt(byte[] salt)
-   {
-      this.salt = salt;
-   }
-   
-   public byte[] getDerivedKey()
-   {
-      return derivedKey;
-   }
-   
-   public void setDerivedKey(byte[] derivedKey)
-   {
-      this.derivedKey = derivedKey;
-   }
-   
-   public String getHashAlgorithm()
-   {
-      return hashAlgorithm;
-   }
-   
-   public void setHashAlgorithm(String hashAlgorithm)
-   {
-      this.hashAlgorithm = hashAlgorithm;
-   }
-   
-   public String getHashCharset()
-   {
-      return hashCharset;
-   }
-   
-   public void setHashCharset(String hashCharset)
-   {
-      this.hashCharset = hashCharset;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PRF.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PRF.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/crypto/PRF.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,64 +0,0 @@
-package org.jboss.seam.security.crypto;
-
-/**
- * Copied from Matthias Gartner's PKCS#5 implementation - see
- * http://rtner.de/software/PBKDF2.html
- * 
- * <p>
- * A free Java implementation of Password Based Key Derivation Function 2 as
- * defined by RFC 2898. Copyright (c) 2007 Matthias G&auml;rtner
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * This library 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.
- * </p>
- * <p>
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- * </p>
- * <p>
- * For Details, see <a
- * href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
- * >http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
- * </p>
- * 
- * @author Matthias G&auml;rtner
- * @version 1.0
- */
-public interface PRF
-{
-   /**
-    * Initialize this instance with the user-supplied password.
-    * 
-    * @param P
-    *           The password supplied as array of bytes. It is the caller's task
-    *           to convert String passwords to bytes as appropriate.
-    */
-   public void init(byte[] P);
-   
-   /**
-    * Pseudo Random Function
-    * 
-    * @param M
-    *           Input data/message etc. Together with any data supplied during
-    *           initilization.
-    * @return Random bytes of hLen length.
-    */
-   public byte[] doFinal(byte[] M);
-   
-   /**
-    * Query block size of underlying algorithm/mechanism.
-    * 
-    * @return block size
-    */
-   public int getHLen();
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestAuthenticator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestAuthenticator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestAuthenticator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-package org.jboss.seam.security.digest;
-
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.security.Identity;
-
-/**
- * This class provides methods for performing Digest (RFC 2617) authentication
- * and is intended to be extended by a concrete Authenticator implementation. 
- *  
- * @author Shane Bryzak
- */
-public abstract class DigestAuthenticator
-{
-   @SuppressWarnings("deprecation")
-   protected boolean validatePassword(String password)
-   {
-      Context ctx = Contexts.getSessionContext();
-      
-      DigestRequest digestRequest = (DigestRequest) ctx.get(DigestRequest.DIGEST_REQUEST);
-      if (digestRequest == null)
-      {
-         throw new IllegalStateException("No digest request found in session scope");
-      }
-      
-      // Remove the digest request from the session now
-      ctx.remove(DigestRequest.DIGEST_REQUEST);
-      
-      // Calculate the expected digest
-      String serverDigestMd5 = DigestUtils.generateDigest(
-               digestRequest.isPasswordAlreadyEncoded(), 
-               Identity.instance().getUsername(), digestRequest.getRealm(), 
-               password, digestRequest.getHttpMethod(), 
-               digestRequest.getUri(), digestRequest.getQop(), 
-               digestRequest.getNonce(), digestRequest.getNonceCount(), 
-               digestRequest.getClientNonce());
-
-      return serverDigestMd5.equals(digestRequest.getClientDigest());
-   }  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestRequest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestRequest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestRequest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,216 +0,0 @@
-package org.jboss.seam.security.digest;
-
-import org.jboss.seam.util.Base64;
-
-public class DigestRequest
-{
-   public static final String DIGEST_REQUEST = "org.jboss.seam.security.digestRequest";   
-   
-   private boolean passwordAlreadyEncoded;
-   private String systemRealm;
-   private String realm;
-   private String key;
-   private String password;
-   private String uri;
-   
-   /**
-    * quality of protection, defined by RFC 2617
-    */
-   private String qop;
-   private String nonce;
-   private String nonceCount;
-   private String clientNonce;
-   private String httpMethod;
-   
-   /**
-    * The digest that the client responds with
-    */
-   private String clientDigest;
-   
-   public String getClientNonce()
-   {
-      return clientNonce;
-   }
-   
-   public void setClientNonce(String clientNonce)
-   {
-      this.clientNonce = clientNonce;
-   }
-   
-   public String getNonce()
-   {
-      return nonce;
-   }
-   
-   public void setNonce(String nonce)
-   {
-      this.nonce = nonce;
-   }
-   
-   public String getNonceCount()
-   {
-      return nonceCount;
-   }
-   
-   public void setNonceCount(String nonceCount)
-   {
-      this.nonceCount = nonceCount;
-   }
-   
-   public String getPassword()
-   {
-      return password;
-   }
-   
-   public void setPassword(String password)
-   {
-      this.password = password;
-   }
-   
-   public boolean isPasswordAlreadyEncoded()
-   {
-      return passwordAlreadyEncoded;
-   }
-   
-   public void setPasswordAlreadyEncoded(boolean passwordAlreadyEncoded)
-   {
-      this.passwordAlreadyEncoded = passwordAlreadyEncoded;
-   }
-   
-   public String getQop()
-   {
-      return qop;
-   }
-   
-   public void setQop(String qop)
-   {
-      this.qop = qop;
-   }
-   
-   public String getRealm()
-   {
-      return realm;
-   }
-   
-   public String getSystemRealm()
-   {
-      return systemRealm;
-   }
-   
-   public void setSystemRealm(String systemRealm)
-   {
-      this.systemRealm = systemRealm;
-   }
-   
-   public void setRealm(String realm)
-   {
-      this.realm = realm;
-   }
-   
-   public String getKey()
-   {
-      return key;
-   }
-   
-   public void setKey(String key)
-   {
-      this.key = key;
-   }
-   
-   public String getUri()
-   {
-      return uri;
-   }
-   
-   public void setUri(String uri)
-   {
-      this.uri = uri;
-   } 
-   
-   public String getHttpMethod()
-   {
-      return httpMethod;
-   }
-   
-   public void setHttpMethod(String httpMethod)
-   {
-      this.httpMethod = httpMethod;
-   }
-   
-   public String getClientDigest()
-   {
-      return clientDigest;
-   }
-   
-   public void setClientDigest(String clientDigest)
-   {
-      this.clientDigest = clientDigest;
-   }
-   
-   public void validate()
-      throws DigestValidationException
-   {
-      // Check all required parameters were supplied (ie RFC 2069)
-      if (realm == null) throw new DigestValidationException("Mandatory field 'realm' not specified");
-      if (nonce == null) throw new DigestValidationException("Mandatory field 'nonce' not specified");
-      if (uri == null) throw new DigestValidationException("Mandatory field 'uri' not specified");
-      if (clientDigest == null) throw new DigestValidationException("Mandatory field 'response' not specified");
-      
-      // Check all required parameters for an "auth" qop were supplied (ie RFC 2617)
-      if ("auth".equals(qop)) 
-      {
-         if (nonceCount == null) 
-         {
-            throw new DigestValidationException("Mandatory field 'nc' not specified");
-         }
-         
-         if (clientNonce == null) 
-         {
-            throw new DigestValidationException("Mandatory field 'cnonce' not specified");
-         }
-      }         
-      
-
-      String nonceAsText = new String(Base64.decode(nonce));               
-      
-      String[] nonceTokens = nonceAsText.split(":");
-      if (nonceTokens.length != 2) 
-      {
-         throw new DigestValidationException("Nonce should provide two tokens - nonce received: " + nonce);
-      }
-      
-      // Check realm name equals what we expected
-      if (!systemRealm.equals(realm)) 
-      {
-         throw new DigestValidationException("Realm name [" + realm + 
-                  "] does not match system realm name [" + systemRealm + "]");
-      }            
-      
-      long nonceExpiry = 0;      
-      try 
-      {
-         nonceExpiry = new Long(nonceTokens[0]).longValue();
-      } 
-      catch (NumberFormatException nfe) 
-      {
-         throw new DigestValidationException("First nonce token should be numeric, but was: " + nonceTokens[0]);
-      }
-      
-
-      // To get this far, the digest must have been valid
-      // Check the nonce has not expired
-      // We do this last so we can direct the user agent its nonce is stale
-      // but the request was otherwise appearing to be valid
-      if (nonceExpiry < System.currentTimeMillis()) 
-      {
-         throw new DigestValidationException("Nonce has expired", true);
-      }        
-      
-      String expectedNonceSignature = DigestUtils.md5Hex(nonceExpiry + ":" + key);
-      
-      if (!expectedNonceSignature.equals(nonceTokens[1])) 
-      {
-         throw new DigestValidationException("Nonce token invalid: " + nonceAsText);
-      }       
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestUtils.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestUtils.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestUtils.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,74 +0,0 @@
-package org.jboss.seam.security.digest;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-import org.jboss.seam.util.Hex;
-
-/**
- * Digest-related utility methods, adapted from Acegi and Apache Commons.
- *  
- * @author Shane Bryzak
- */
-public class DigestUtils
-{   
-   public static String generateDigest(boolean passwordAlreadyEncoded, String username,
-            String realm, String password, String httpMethod, String uri, String qop, String nonce,
-            String nc, String cnonce) throws IllegalArgumentException
-   {
-      String a1Md5 = null;
-      String a2 = httpMethod + ":" + uri;
-      String a2Md5 = new String(DigestUtils.md5Hex(a2));
-
-      if (passwordAlreadyEncoded)
-      {
-         a1Md5 = password;
-      }
-      else
-      {
-         a1Md5 = encodePasswordInA1Format(username, realm, password);
-      }
-
-      String digest;
-
-      if (qop == null)
-      {
-         // as per RFC 2069 compliant clients (also reaffirmed by RFC 2617)
-         digest = a1Md5 + ":" + nonce + ":" + a2Md5;
-      }
-      else if ("auth".equals(qop))
-      {
-         // As per RFC 2617 compliant clients
-         digest = a1Md5 + ":" + nonce + ":" + nc + ":" + cnonce + ":" + qop + ":" + a2Md5;
-      }
-      else
-      {
-         throw new IllegalArgumentException("This method does not support a qop: '" + qop + "'");
-      }
-
-      String digestMd5 = new String(DigestUtils.md5Hex(digest));
-
-      return digestMd5;
-   }
-
-   public static String encodePasswordInA1Format(String username, String realm, String password)
-   {
-      String a1 = username + ":" + realm + ":" + password;
-      String a1Md5 = new String(DigestUtils.md5Hex(a1));
-
-      return a1Md5;
-   } 
-   
-   public static String md5Hex(String value)
-   {
-      try
-      {
-         MessageDigest md = MessageDigest.getInstance("MD5");
-         return new String(Hex.encodeHex(md.digest(value.getBytes())));
-      }
-      catch (NoSuchAlgorithmException ex)
-      {
-         throw new RuntimeException("Invalid algorithm");
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestValidationException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestValidationException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/digest/DigestValidationException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-package org.jboss.seam.security.digest;
-
-/**
- * Thrown when a DigestRequest fails validation.
- * 
- * @author Shane Bryzak
- */
-public class DigestValidationException extends Exception
-{
-   private boolean nonceExpired = false;
-   
-   public DigestValidationException(String message)
-   {
-      super(message);
-   }
-   
-   public DigestValidationException(String message, boolean nonceExpired)
-   {
-      super(message);
-      this.nonceExpired = nonceExpired;
-   }
-   
-   public boolean isNonceExpired()
-   {
-      return nonceExpired;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,161 +0,0 @@
-package org.jboss.seam.security.jaas;
-
-import static org.jboss.seam.security.Identity.ROLES_GROUP;
-
-import java.security.acl.Group;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
-
-import org.jboss.seam.core.Expressions.MethodExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.SimpleGroup;
-import org.jboss.seam.security.SimplePrincipal;
-import org.jboss.seam.security.management.IdentityManager;
-
-/**
- * Performs authentication using a Seam component
- * 
- * @author Shane Bryzak
- */
-public class SeamLoginModule implements LoginModule
-{   
-   private static final LogProvider log = Logging.getLogProvider(SeamLoginModule.class);   
-   
-   protected Set<String> roles = new HashSet<String>();
-   
-   protected Subject subject;
-   protected Map<String,?> options;
-   protected CallbackHandler callbackHandler;
-   
-   protected String username;
-   
-   public boolean abort() throws LoginException
-   {
-      return true;
-   }
-
-   public boolean commit() throws LoginException
-   {        
-      subject.getPrincipals().add(new SimplePrincipal(username));
-      
-      Group roleGroup = null;
-      
-      for ( Group g : subject.getPrincipals(Group.class) )      
-      {
-         if ( ROLES_GROUP.equalsIgnoreCase( g.getName() ) )
-         {
-            roleGroup = g;
-            break;
-         }
-      }
-
-      if (roleGroup == null) roleGroup = new SimpleGroup(ROLES_GROUP);
-
-      for (String role : roles)
-      {
-         roleGroup.addMember(new SimplePrincipal(role));
-      }
-      
-      subject.getPrincipals().add(roleGroup);
-      
-      return true;
-   }
-
-   public void initialize(Subject subject, CallbackHandler callbackHandler,
-         Map<String, ?> sharedState, Map<String, ?> options)
-   {
-      this.subject = subject;
-      this.options = options;
-      this.callbackHandler = callbackHandler;
-   }
-
-   public boolean login() 
-      throws LoginException
-   {
-      try
-      {
-         NameCallback cbName = new NameCallback("Enter username");
-         PasswordCallback cbPassword = new PasswordCallback("Enter password", false);
-   
-         // Get the username and password from the callback handler
-         callbackHandler.handle(new Callback[] { cbName, cbPassword });
-         username = cbName.getName();
-      }
-      catch (Exception ex)
-      {
-         log.warn("Error logging in", ex);
-         LoginException le = new LoginException(ex.getMessage());
-         le.initCause(ex);
-         throw le;
-      }
-      
-      // If an authentication method has been specified, use that to authenticate
-      MethodExpression mb = Identity.instance().getAuthenticateMethod();
-      if (mb != null)
-      {
-         try
-         {
-           return (Boolean) mb.invoke();      
-         }
-         catch (Exception ex)
-         {
-            log.warn("Error invoking login method", ex);            
-            LoginException le = new LoginException(ex.getMessage());
-            le.initCause(ex);            
-            throw le;
-         }
-      }
-      
-      // Otherwise if identity management is enabled, use it.
-      IdentityManager identityManager = IdentityManager.instance();
-      if (identityManager != null && identityManager.isEnabled())
-      {
-         Identity identity = Identity.instance();
-         
-         try
-         {
-            boolean success = identityManager.authenticate(username, identity.getCredentials().getPassword());
-            
-            if (success)
-            {
-               for (String role : identityManager.getImpliedRoles(username))
-               {
-                  identity.addRole(role);
-               }
-            }
-            
-            return success;
-         }
-         catch (Exception ex)
-         {
-            log.warn("Error invoking login method");
-            LoginException le = new LoginException(ex.getMessage());
-            le.initCause(ex);
-            throw le;
-         }
-      }
-      else
-      {
-         log.error("No authentication method defined - " +
-               "please define authenticate-method for <security:identity/> in components.xml");
-         throw new LoginException("No authentication method defined");
-      }
-
-   }
-
-   public boolean logout() throws LoginException
-   {
-      return true;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityManagementException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityManagementException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityManagementException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam.security.management;
-
-/**
- * Thrown when an exception is encountered during account creation. 
- *  
- * @author Shane Bryzak
- */
-public class IdentityManagementException extends RuntimeException
-{
-   public IdentityManagementException(String message)
-   {
-      super(message);
-   }
-   
-   public IdentityManagementException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityManager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityManager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityManager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,299 +0,0 @@
-package org.jboss.seam.security.management;
-
-import static org.jboss.seam.ScopeType.EVENT;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.security.Principal;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.util.Strings;
-
-/**
- * Identity Management API, deals with user name/password-based identity management.
- * 
- * @author Shane Bryzak
- */
- at Scope(EVENT)
- at Name("org.jboss.seam.security.identityManager")
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
-public class IdentityManager implements Serializable
-{
-   public static final String USER_PERMISSION_NAME = "seam.user";
-   public static final String ROLE_PERMISSION_NAME = "seam.role";
-   
-   public static final String PERMISSION_CREATE = "create";
-   public static final String PERMISSION_READ = "read";
-   public static final String PERMISSION_UPDATE = "update";
-   public static final String PERMISSION_DELETE = "delete";
-   
-   private static final LogProvider log = Logging.getLogProvider(IdentityManager.class);   
-   
-   private IdentityStore identityStore;
-   private IdentityStore roleIdentityStore;
-   
-   @Create
-   public void create()
-   {
-      initIdentityStore();
-   }
-   
-   protected void initIdentityStore()
-   {    
-      // Default to JpaIdentityStore
-      if (identityStore == null)
-      {
-         identityStore = (IdentityStore) Component.getInstance(JpaIdentityStore.class, true);
-      }
-      
-      if (roleIdentityStore == null && identityStore != null)
-      {
-         roleIdentityStore = identityStore;
-      }            
-      
-      if (identityStore == null || roleIdentityStore == null)
-      {
-         log.warn("no identity store available - please configure an identityStore if identity " +
-               "management is required.");
-      }
-   }  
-   
-   public static IdentityManager instance()
-   {
-      if ( !Contexts.isEventContextActive() )
-      {
-         throw new IllegalStateException("No active event context");
-      }
-
-      IdentityManager instance = (IdentityManager) Component.getInstance(
-            IdentityManager.class, EVENT);
-
-      if (instance == null)
-      {
-         throw new IllegalStateException("No IdentityManager could be created");
-      }
-
-      return instance;
-   }
-   
-   public boolean createUser(String name, String password)
-   {
-      return createUser(name, password, null, null);
-   }
-
-   public boolean createUser(String name, String password, String firstname, String lastname)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_CREATE);
-      return identityStore.createUser(name, password, firstname, lastname); 
-   }   
-   
-   public boolean deleteUser(String name)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_DELETE);
-      return identityStore.deleteUser(name);
-   }
-   
-   public boolean enableUser(String name)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
-      return identityStore.enableUser(name);
-   }
-   
-   public boolean disableUser(String name)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
-      return identityStore.disableUser(name);
-   }
-   
-   public boolean changePassword(String name, String password)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
-      return identityStore.changePassword(name, password);
-   }
-   
-   public boolean isUserEnabled(String name)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_READ);
-      return identityStore.isUserEnabled(name);
-   }
-   
-   public boolean grantRole(String name, String role)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
-      return roleIdentityStore.grantRole(name, role);
-   }
-   
-   public boolean revokeRole(String name, String role)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
-      return roleIdentityStore.revokeRole(name, role);
-   }
-   
-   public boolean createRole(String role)
-   {
-      Identity.instance().checkPermission(ROLE_PERMISSION_NAME, PERMISSION_CREATE);
-      return roleIdentityStore.createRole(role);
-   }
-   
-   public boolean deleteRole(String role)
-   {
-      Identity.instance().checkPermission(ROLE_PERMISSION_NAME, PERMISSION_DELETE);
-      return roleIdentityStore.deleteRole(role);
-   }
-   
-   public boolean addRoleToGroup(String role, String group)
-   {
-      Identity.instance().checkPermission(ROLE_PERMISSION_NAME, PERMISSION_UPDATE);
-      return roleIdentityStore.addRoleToGroup(role, group);
-   }
-   
-   public boolean removeRoleFromGroup(String role, String group)
-   {
-      Identity.instance().checkPermission(ROLE_PERMISSION_NAME, PERMISSION_UPDATE);
-      return roleIdentityStore.removeRoleFromGroup(role, group);      
-   }
-   
-   public boolean userExists(String name)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_READ);
-      return identityStore.userExists(name);
-   }
-   
-   public boolean roleExists(String name)
-   {
-      return roleIdentityStore.roleExists(name);      
-   }
-   
-   public List<String> listUsers()
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_READ);
-      List<String> users = identityStore.listUsers();      
-      
-      Collections.sort(users, new Comparator<String>() {
-         public int compare(String value1, String value2) {
-            return value1.compareTo(value2);
-         }
-      });
-      
-      return users;
-   }
-   
-   public List<String> listUsers(String filter)
-   {
-      Identity.instance().checkPermission(USER_PERMISSION_NAME, PERMISSION_READ);
-      List<String> users = identityStore.listUsers(filter);
-      
-      Collections.sort(users, new Comparator<String>() {
-         public int compare(String value1, String value2) {
-            return value1.compareTo(value2);
-         }
-      });
-      
-      return users;      
-   }
-   
-   public List<String> listRoles()
-   {      
-      Identity.instance().checkPermission(ROLE_PERMISSION_NAME, PERMISSION_READ);
-      List<String> roles = roleIdentityStore.listRoles();
-      
-      Collections.sort(roles, new Comparator<String>() {
-         public int compare(String value1, String value2) {
-            return value1.compareTo(value2);
-         }
-      });
-      
-      return roles;      
-   }
-   
-   public List<String> listGrantableRoles()
-   {
-      List<String> roles = roleIdentityStore.listGrantableRoles();
-      
-      Collections.sort(roles, new Comparator<String>() {
-         public int compare(String value1, String value2) {
-            return value1.compareTo(value2);
-         }
-      });
-      
-      return roles; 
-   }
-   
-   /**
-    * Returns a list of the roles that are explicitly granted to the specified user;
-    * 
-    * @param name The user for which to return a list of roles
-    * @return List containing the names of the granted roles
-    */
-   public List<String> getGrantedRoles(String name)
-   {
-      return roleIdentityStore.getGrantedRoles(name);
-   }
-   
-   /**
-    * Returns a list of roles that are either explicitly or indirectly granted to the specified user. 
-    * 
-    * @param name The user for which to return the list of roles
-    * @return List containing the names of the implied roles
-    */
-   public List<String> getImpliedRoles(String name)
-   {
-      return roleIdentityStore.getImpliedRoles(name);
-   }
-   
-   public List<Principal> listMembers(String role)
-   {
-      Identity.instance().checkPermission(ROLE_PERMISSION_NAME, PERMISSION_READ);      
-      return roleIdentityStore.listMembers(role);
-   }
-   
-   public List<String> getRoleGroups(String name)
-   {
-      return roleIdentityStore.getRoleGroups(name);
-   }
-   
-   public boolean authenticate(String username, String password)
-   {
-      if (Strings.isEmpty(username)) return false;      
-      return identityStore.authenticate(username, password);
-   }
-   
-   public IdentityStore getIdentityStore()
-   {
-      return identityStore;
-   }
-   
-   public void setIdentityStore(IdentityStore identityStore)
-   {
-      this.identityStore = identityStore;
-   }
-   
-   public IdentityStore getRoleIdentityStore()
-   {
-      return roleIdentityStore;
-   }
-   
-   public void setRoleIdentityStore(IdentityStore roleIdentityStore)
-   {
-      this.roleIdentityStore = roleIdentityStore;
-   }
-   
-   public boolean isEnabled()
-   {
-      return identityStore != null && roleIdentityStore != null;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityStore.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityStore.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/IdentityStore.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,225 +0,0 @@
-package org.jboss.seam.security.management;
-
-import java.security.Principal;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * The identity store does the actual work of persisting user accounts in a
- * database, LDAP directory, etc.  
- * 
- * @author Shane Bryzak
- */
-public interface IdentityStore
-{     
-   public enum Feature { createUser, deleteUser, enableUser, disableUser, changePassword, 
-      createRole, deleteRole, grantRole, revokeRole }
-   
-   /**
-    * Represents a set of optional features that an IdentityStore implementation might support.
-    */
-   public class FeatureSet 
-   {                             
-      private Set<Feature> features;
-
-      public FeatureSet()
-      {
-         this(null);
-      }
-      
-      public FeatureSet(Set<Feature> features)
-      {
-         if (features != null)
-         {
-            this.features = features;
-         }
-         else
-         {
-            this.features = new HashSet<Feature>();
-         }
-      }
-      
-      public Set<Feature> getFeatures()
-      {
-         return features;
-      }
-      
-      public boolean supports(Feature feature)
-      {
-         return features.contains(feature);
-      }
-      
-      public void addFeature(Feature feature)
-      {
-         features.add(feature);
-      }
-      
-      public void removeFeature(Feature feature)
-      {
-         features.remove(feature);
-      }
-      
-      public void enableAll()
-      {
-         for (Feature f : Feature.values()) addFeature(f);
-      }
-   }
-
-   /**
-    * Returns true if the IdentityStore implementation supports the specified feature.
-    * 
-    */
-   boolean supportsFeature(Feature feature);
-
-   /**
-    * Creates a new user with the specified username and password.
-    * @return true if the user was successfully created.
-    */
-   boolean createUser(String username, String password);
-   
-   /**
-    * Creates a new user with the specified username, password, first name and last name.
-    * 
-    * @return true if the user was successfully created.
-    */
-   boolean createUser(String username, String password, String firstname, String lastname);
-   
-   /**
-    * Deletes the user with the specified username.
-    * @return true if the user was successfully deleted.
-    */
-   boolean deleteUser(String name);   
-   
-   /**
-    * Enables the user with the specified username.  Enabled users are able to authenticate.
-    * @return true if the specified user was successfully enabled.
-    */
-   boolean enableUser(String name);
-   
-   /**
-    * Disables the user with the specified username.  Disabled users are unable to authenticate.
-    * @return true if the specified user was successfully disabled.
-    */
-   boolean disableUser(String name);   
-   
-   /**
-    * Returns true if the specified user is enabled.
-    */
-   boolean isUserEnabled(String name);
-   
-   /**
-    * Changes the password of the specified user to the specified password.
-    * @return true if the user's password was successfully changed.
-    */
-   boolean changePassword(String name, String password);   
-   
-   /**
-    * Returns true if the specified user exists.
-    */
-   boolean userExists(String name);
-
-   /**
-    * Creates a new role with the specified role name.
-    * @return true if the role was created successfully.
-    */
-   boolean createRole(String role);
-   
-   /**
-    * Grants the specified role to the specified user.
-    * 
-    * @param name The name of the user
-    * @param role The name of the role to grant to the user.
-    * @return true if the role was successfully granted.
-    */
-   boolean grantRole(String name, String role);
-   
-   /**
-    * Revokes the specified role from the specified user.
-    * 
-    * @param name The name of the user
-    * @param role The name of the role to grant to the user.
-    * @return true if the role was successfully revoked.
-    */
-   boolean revokeRole(String name, String role);
-   
-   /**
-    * Deletes the specified role.
-    * @return true if the role was successfully deleted.
-    */
-   boolean deleteRole(String role);
-   
-   /**
-    * Returns true if the specified role exists.
-    */
-   boolean roleExists(String name);
-   
-   /**
-    * Adds the specified role as a member of the specified group.
-    * 
-    * @param role The name of the role to add as a member
-    * @param group The name of the group that the specified role will be added to.
-    * @return true if the role was successfully added to the group.
-    */
-   boolean addRoleToGroup(String role, String group);
-   
-   /**
-    * Removes the specified role from the specified group.
-    * 
-    * @param role The name of the role to remove from the group.
-    * @param group The group from which to remove the role.
-    * @return true if the role was successfully removed from the group.
-    */
-   boolean removeRoleFromGroup(String role, String group);   
-
-   /**
-    * Returns a list of all users.
-    */
-   List<String> listUsers();
-   
-   /**
-    * Returns a list of all users containing the specified filter text within their username.
-
-    */
-   List<String> listUsers(String filter);
-   
-   /**
-    * Returns a list of all the roles.
-    */
-   List<String> listRoles();
-   
-   /**
-    * Returns a list of roles that can be granted (i.e, excluding conditional roles)
-    */
-   List<String> listGrantableRoles();
-
-   /**
-    * Returns a list of all the roles explicitly granted to the specified user.
-    */
-   List<String> getGrantedRoles(String name);
-   
-   /**
-    * Returns a list of all roles that the specified user is a member of.  This list may contain
-    * roles that may not have been explicitly granted to the user, which are indirectly implied
-    * due to group memberships.
-
-    */
-   List<String> getImpliedRoles(String name);
-   
-   /**
-    * Returns a list of all the groups that the specified role is a member of.
-    */
-   List<String> getRoleGroups(String name);
-   
-   /**
-    * Lists the members of the specified role.
-    */
-   List<Principal> listMembers(String role);
-
-   /**
-    * Authenticates the specified user, using the specified password.
-    * 
-    * @return true if authentication is successful.
-    */
-   boolean authenticate(String username, String password);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1067 +0,0 @@
-package org.jboss.seam.security.management;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.security.GeneralSecurityException;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.persistence.EntityManager;
-import javax.persistence.NoResultException;
-
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.security.management.PasswordSalt;
-import org.jboss.seam.annotations.security.management.RoleConditional;
-import org.jboss.seam.annotations.security.management.RoleGroups;
-import org.jboss.seam.annotations.security.management.RoleName;
-import org.jboss.seam.annotations.security.management.UserEnabled;
-import org.jboss.seam.annotations.security.management.UserFirstName;
-import org.jboss.seam.annotations.security.management.UserLastName;
-import org.jboss.seam.annotations.security.management.UserPassword;
-import org.jboss.seam.annotations.security.management.UserPrincipal;
-import org.jboss.seam.annotations.security.management.UserRoles;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.Role;
-import org.jboss.seam.security.SimplePrincipal;
-import org.jboss.seam.security.crypto.BinTools;
-import org.jboss.seam.util.AnnotatedBeanProperty;
-import org.jboss.seam.util.TypedBeanProperty;
-
-/**
- * The default identity store implementation, uses JPA as its persistence mechanism.
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.identityStore")
- at Install(precedence = BUILT_IN, value=false) 
- at Scope(APPLICATION)
- at BypassInterceptors
-public class JpaIdentityStore implements IdentityStore, Serializable
-{  
-
-   private static final long serialVersionUID = -3627993296654916436L;
-
-   public static final String AUTHENTICATED_USER = "org.jboss.seam.security.management.authenticatedUser";
-   
-   public static final String EVENT_USER_CREATED = "org.jboss.seam.security.management.userCreated";
-   public static final String EVENT_PRE_PERSIST_USER = "org.jboss.seam.security.management.prePersistUser";
-   public static final String EVENT_USER_AUTHENTICATED = "org.jboss.seam.security.management.userAuthenticated";
-   
-   public static final String EVENT_PRE_PERSIST_USER_ROLE = "org.jboss.seam.security.management.prePersistUserRole";
-   
-   private static final LogProvider log = Logging.getLogProvider(JpaIdentityStore.class);    
-   
-   protected FeatureSet featureSet;
-   
-   private ValueExpression<EntityManager> entityManager;  
-   
-   private Class userClass;
-   private Class roleClass;   
-   private Class xrefClass;
-   private TypedBeanProperty xrefUserProperty;
-   private TypedBeanProperty xrefRoleProperty;
-   
-   private AnnotatedBeanProperty<UserPrincipal> userPrincipalProperty;
-   private AnnotatedBeanProperty<UserPassword> userPasswordProperty;
-   private AnnotatedBeanProperty<PasswordSalt> passwordSaltProperty;
-   private AnnotatedBeanProperty<UserRoles> userRolesProperty;
-   private AnnotatedBeanProperty<UserEnabled> userEnabledProperty;
-   private AnnotatedBeanProperty<UserFirstName> userFirstNameProperty;
-   private AnnotatedBeanProperty<UserLastName> userLastNameProperty;   
-   private AnnotatedBeanProperty<RoleName> roleNameProperty;
-   private AnnotatedBeanProperty<RoleGroups> roleGroupsProperty;
-   private AnnotatedBeanProperty<RoleConditional> roleConditionalProperty;
-   
-   public Set<Feature> getFeatures()
-   {
-      return featureSet.getFeatures();
-   }
-   
-   public void setFeatures(Set<Feature> features)
-   {
-      featureSet = new FeatureSet(features);
-   }
-   
-   public boolean supportsFeature(Feature feature)
-   {
-      return featureSet.supports(feature);
-   }
-   
-   @Create
-   public void init()
-   {                  
-      if (featureSet == null)
-      {
-         featureSet = new FeatureSet();
-         featureSet.enableAll();
-      }      
-      
-      if (entityManager == null)
-      {
-         entityManager = Expressions.instance().createValueExpression("#{entityManager}", EntityManager.class);
-      }      
-      
-      if (userClass == null)
-      {
-         log.error("Error in JpaIdentityStore configuration - userClass must be configured.");
-         return;
-      }    
-      
-      initProperties();   
-   }
-   
-   private void initProperties()
-   {
-      userPrincipalProperty = new AnnotatedBeanProperty(userClass, UserPrincipal.class);
-      userPasswordProperty = new AnnotatedBeanProperty(userClass, UserPassword.class);
-      passwordSaltProperty = new AnnotatedBeanProperty(userClass, PasswordSalt.class);
-      userRolesProperty = new AnnotatedBeanProperty(userClass, UserRoles.class);
-      userEnabledProperty = new AnnotatedBeanProperty(userClass, UserEnabled.class);
-      userFirstNameProperty = new AnnotatedBeanProperty(userClass, UserFirstName.class);
-      userLastNameProperty = new AnnotatedBeanProperty(userClass, UserLastName.class);
-             
-      if (!userPrincipalProperty.isSet()) 
-      {
-         throw new IdentityManagementException("Invalid userClass " + userClass.getName() + 
-               " - required annotation @UserPrincipal not found on any Field or Method.");
-      }
-      
-      if (!userRolesProperty.isSet())
-      {
-         throw new IdentityManagementException("Invalid userClass " + userClass.getName() + 
-         " - required annotation @UserRoles not found on any Field or Method.");         
-      }      
-      
-      if (roleClass != null)
-      {         
-         roleNameProperty = new AnnotatedBeanProperty(roleClass, RoleName.class);
-         roleGroupsProperty = new AnnotatedBeanProperty(roleClass, RoleGroups.class);
-         roleConditionalProperty = new AnnotatedBeanProperty(roleClass, RoleConditional.class);
-         
-         if (!roleNameProperty.isSet())
-         {
-            throw new IdentityManagementException("Invalid roleClass " + roleClass.getName() + 
-            " - required annotation @RoleName not found on any Field or Method.");         
-         }         
-                 
-         Type type = userRolesProperty.getPropertyType();
-         if (type instanceof ParameterizedType && 
-               Collection.class.isAssignableFrom((Class) ((ParameterizedType) type).getRawType()))
-         {
-            Type genType = Object.class;
-
-            for (Type t : ((ParameterizedType) type).getActualTypeArguments())
-            {
-               genType = t;
-               break;
-            }                 
-         
-            // If the @UserRoles property isn't a collection of <roleClass>, then assume the relationship
-            // is going through a cross-reference table            
-            if (!genType.equals(roleClass))
-            {
-               xrefClass = (Class) genType;
-               xrefUserProperty = new TypedBeanProperty(xrefClass, userClass);
-               xrefRoleProperty = new TypedBeanProperty(xrefClass, roleClass);
-               
-               if (!xrefUserProperty.isSet())
-               {
-                  throw new IdentityManagementException("Error configuring JpaIdentityStore - it looks like " +
-                        "you're using a cross-reference table, however the user property cannot be determined.");
-               }
-               
-               if (!xrefRoleProperty.isSet())
-               {
-                  throw new IdentityManagementException("Error configuring JpaIdentityStore - it looks like " +
-                  "you're using a cross-reference table, however the role property cannot be determined.");                  
-               }
-            }
-         }
-      }
-   }
-   
-   public boolean createUser(String username, String password, String firstname, String lastname)
-   {
-      try
-      {
-         if (userClass == null)
-         {
-            throw new IdentityManagementException("Could not create account, userClass not set");
-         }
-         
-         if (userExists(username))
-         {
-            throw new IdentityManagementException("Could not create account, already exists");
-         }
-         
-         Object user = userClass.newInstance();
-
-         userPrincipalProperty.setValue(user, username);
-
-         if (userFirstNameProperty.isSet()) userFirstNameProperty.setValue(user, firstname);         
-         if (userLastNameProperty.isSet()) userLastNameProperty.setValue(user, lastname);
-         
-         if (password == null)
-         {
-            if (userEnabledProperty.isSet()) userEnabledProperty.setValue(user, false);
-         }
-         else
-         {  
-            setUserPassword(user, password);
-            if (userEnabledProperty.isSet()) userEnabledProperty.setValue(user, true);
-         }
-         
-         if (Events.exists()) Events.instance().raiseEvent(EVENT_PRE_PERSIST_USER, user);
-         
-         persistEntity(user);
-         
-         if (Events.exists()) Events.instance().raiseEvent(EVENT_USER_CREATED, user);
-         
-         return true;
-      }
-      catch (Exception ex)
-      {
-         if (ex instanceof IdentityManagementException)
-         {
-            throw (IdentityManagementException) ex;
-         }
-         else
-         {
-            throw new IdentityManagementException("Could not create account", ex);
-         }
-      }      
-   }
-   
-   protected void setUserPassword(Object user, String password)
-   {
-      if (passwordSaltProperty.isSet())
-      {
-         byte[] salt = generateUserSalt(user);               
-         passwordSaltProperty.setValue(user, BinTools.bin2hex(salt));
-         userPasswordProperty.setValue(user, generatePasswordHash(password, salt));
-      }
-      else
-      {
-         userPasswordProperty.setValue(user, generatePasswordHash(password, getUserAccountSalt(user)));
-      }
-   }
-   
-   /**
-    * @deprecated Use JpaIdentityStore.generateRandomSalt(Object) instead
-    */
-   @Deprecated
-   protected String getUserAccountSalt(Object user)
-   {      
-      // By default, we'll use the user's username as the password salt
-      return userPrincipalProperty.getValue(user).toString();
-   }
-   
-   /**
-    * Generates a 64 bit random salt value
-    */
-   public byte[] generateUserSalt(Object user)
-   {
-      return PasswordHash.instance().generateRandomSalt();
-   }
-   
-   public boolean createUser(String username, String password)
-   {
-      return createUser(username, password, null, null);
-   }
-   
-   public boolean deleteUser(String name)
-   {
-      Object user = lookupUser(name);
-      if (user == null) 
-      {
-         throw new NoSuchUserException("Could not delete, user '" + name + "' does not exist");
-      }
-      
-      removeEntity(user);
-      return true;
-   }
-   
-   public boolean grantRole(String username, String role)
-   {
-      if (roleClass == null) return false;
-      
-      Object user = lookupUser(username);
-      if (user == null)
-      {
-         if (userPasswordProperty.isSet())
-         {
-            // If no userPasswordProperty is set, it means that authentication is being performed
-            // by another identity store and this one is just managing roles
-            throw new NoSuchUserException("Could not grant role, no such user '" + username + "'");
-         }
-         else
-         {
-            // We need to create a new user object
-            if (createUser(username, null))
-            {
-               user = lookupUser(username);
-            }
-            else
-            {
-               throw new IdentityManagementException(
-                     "Could not grant role - user does not exist and an attempt to create the user failed.");
-            }
-         }
-      }
-      
-      Object roleToGrant = lookupRole(role);
-      if (roleToGrant == null)
-      {
-         throw new NoSuchRoleException("Could not grant role, role '" + role + "' does not exist");
-      }
-      
-      Collection userRoles = (Collection) userRolesProperty.getValue(user); 
-      if (userRoles == null)
-      {
-         Type propType = userRolesProperty.getPropertyType();
-         Class collectionType;
-         
-         if (propType instanceof Class && Collection.class.isAssignableFrom((Class) propType))
-         {
-            collectionType = (Class) propType;
-         }
-         else if (propType instanceof ParameterizedType &&
-                  Collection.class.isAssignableFrom((Class) ((ParameterizedType) propType).getRawType()))
-         {
-            collectionType = (Class) ((ParameterizedType) propType).getRawType();
-         }
-         else
-         {
-            throw new IllegalStateException("Could not determine collection type for user roles.");
-         }
-         
-         // This should either be a Set, or a List...
-         if (Set.class.isAssignableFrom(collectionType))
-         {
-            userRoles = new HashSet();
-         }
-         else if (List.class.isAssignableFrom(collectionType))
-         {
-            userRoles = new ArrayList();
-         }
-         
-         userRolesProperty.setValue(user, userRoles);
-      }
-      else if (((Collection) userRolesProperty.getValue(user)).contains(roleToGrant))
-      {
-         return false;
-      }
-
-      if (xrefClass == null)
-      {
-         // If this is a Many-To-Many relationship, simply add the role 
-         ((Collection) userRolesProperty.getValue(user)).add(roleToGrant);
-      }
-      else
-      {
-         // Otherwise we need to insert a cross-reference entity instance
-         try
-         {
-            Object xref = xrefClass.newInstance();            
-            xrefUserProperty.setValue(xref, user);
-            xrefRoleProperty.setValue(xref, roleToGrant);
-            
-            Events.instance().raiseEvent(EVENT_PRE_PERSIST_USER_ROLE, xref);
-            
-            ((Collection) userRolesProperty.getValue(user)).add(mergeEntity(xref));
-         }
-         catch (Exception ex)
-         {
-            throw new IdentityManagementException("Error creating cross-reference role record.", ex);
-         }
-      }
-      
-      return true;
-   }   
-   
-   public boolean revokeRole(String username, String role)
-   {
-      Object user = lookupUser(username);
-      if (user == null)
-      {
-         throw new NoSuchUserException("Could not revoke role, no such user '" + username + "'");
-      }
-      
-      Object roleToRevoke = lookupRole(role);
-      if (roleToRevoke == null)
-      {
-         throw new NoSuchRoleException("Could not revoke role, role '" + role + "' does not exist");
-      }      
-             
-      boolean success = false;
-      
-      if (xrefClass == null)
-      {
-         success = ((Collection) userRolesProperty.getValue(user)).remove(roleToRevoke);
-      }
-      else
-      {
-         Collection roles = ((Collection) userRolesProperty.getValue(user));
-
-         for (Object xref : roles)
-         {
-            if (xrefRoleProperty.getValue(xref).equals(roleToRevoke))
-            {
-               success = roles.remove(xref);
-               break;
-            }
-         }
-      }
-
-      return success;
-   }
-   
-   public boolean addRoleToGroup(String role, String group)
-   {
-      if (!roleGroupsProperty.isSet()) return false;      
-      
-      Object targetRole = lookupRole(role);
-      if (targetRole == null)
-      {
-         throw new NoSuchUserException("Could not add role to group, no such role '" + role + "'");
-      }
-      
-      Object targetGroup = lookupRole(group);
-      if (targetGroup == null)
-      {
-         throw new NoSuchRoleException("Could not grant role, group '" + group + "' does not exist");
-      }
-      
-      Collection roleGroups = (Collection) roleGroupsProperty.getValue(targetRole); 
-      if (roleGroups == null)
-      {
-         // This should either be a Set, or a List...
-         Class rawType = null;
-         if (roleGroupsProperty.getPropertyType() instanceof ParameterizedType)
-         {
-            rawType = (Class) ((ParameterizedType) roleGroupsProperty.getPropertyType()).getRawType();
-         }
-         else
-         {
-            return false;
-         }                   
-          
-         if (Set.class.isAssignableFrom(rawType))
-         {
-            roleGroups = new HashSet();
-         }
-         else if (List.class.isAssignableFrom(rawType))
-         {
-            roleGroups = new ArrayList();
-         }
-         
-         roleGroupsProperty.setValue(targetRole, roleGroups);
-      }
-      else if (((Collection) roleGroupsProperty.getValue(targetRole)).contains(targetGroup))
-      {
-         return false;
-      }
-
-      ((Collection) roleGroupsProperty.getValue(targetRole)).add(targetGroup);
-      
-      return true;
-   }
-
-   public boolean removeRoleFromGroup(String role, String group)
-   {
-      if (!roleGroupsProperty.isSet()) return false;
-      
-      Object roleToRemove = lookupRole(role);
-      if (role == null)
-      {
-         throw new NoSuchUserException("Could not remove role from group, no such role '" + role + "'");
-      }
-      
-      Object targetGroup = lookupRole(group);
-      if (targetGroup == null)
-      {
-         throw new NoSuchRoleException("Could not remove role from group, no such group '" + group + "'");
-      }      
-       
-      boolean success = ((Collection) roleGroupsProperty.getValue(roleToRemove)).remove(targetGroup);
-      return success;
-   }      
-   
-   public boolean createRole(String role)
-   {
-      try
-      {
-         if (roleClass == null)
-         {
-            throw new IdentityManagementException("Could not create role, roleClass not set");
-         }
-         
-         if (roleExists(role))
-         {
-            throw new IdentityManagementException("Could not create role, already exists");
-         }
-         
-         Object instance = roleClass.newInstance();         
-         roleNameProperty.setValue(instance, role);         
-         persistEntity(instance);
-         
-         return true;
-      }
-      catch (Exception ex)
-      {
-         if (ex instanceof IdentityManagementException)
-         {
-            throw (IdentityManagementException) ex;
-         }
-         else
-         {
-            throw new IdentityManagementException("Could not create role", ex);
-         }
-      }      
-   }
-   
-   public boolean deleteRole(String role)
-   {      
-      Object roleToDelete = lookupRole(role);
-      if (roleToDelete == null)
-      {
-         throw new NoSuchRoleException("Could not delete role, role '" + role + "' does not exist");
-      }        
-      
-      if (xrefClass != null)
-      {
-         lookupEntityManager().createQuery("delete " + xrefClass.getName() + " where role = :role")
-         .setParameter("role", roleToDelete)
-         .executeUpdate();
-      }
-      else
-      {
-         List<String> users = listUserMembers(role);
-         for (String user : users)
-         {
-            revokeRole(user, role);
-         }
-      }
-      
-      List<String> roles = listRoleMembers(role);
-      for (String r : roles)
-      {
-         removeRoleFromGroup(r, role);
-      }
-            
-      removeEntity(roleToDelete);
-      return true;
-   }
-   
-   public boolean enableUser(String name)
-   {
-      if (!userEnabledProperty.isSet())
-      {
-         log.debug("Can not enable user, no @UserEnabled property configured in userClass " + userClass.getName());
-         return false;
-      }
-      
-      Object user = lookupUser(name);
-      if (user == null)
-      {
-         throw new NoSuchUserException("Could not enable user, user '" + name + "' does not exist");
-      }
-      
-      // Can't enable an already-enabled user, return false
-      if (((Boolean) userEnabledProperty.getValue(user)) == true)
-      {
-         return false;
-      }
-      
-      userEnabledProperty.setValue(user, true);   
-      return true;
-   }
-   
-   public boolean disableUser(String name)
-   {
-      if (!userEnabledProperty.isSet())
-      {
-         log.debug("Can not disable user, no @UserEnabled property configured in userClass " + userClass.getName());
-         return false;
-      }
-      
-      Object user = lookupUser(name);
-      if (user == null)
-      {
-         throw new NoSuchUserException("Could not disable user, user '" + name + "' does not exist");
-      }
-      
-      // Can't disable an already-disabled user, return false
-      if (((Boolean) userEnabledProperty.getValue(user)) == false)
-      {
-         return false;
-      }          
-      
-      userEnabledProperty.setValue(user, false);     
-      return true;
-   }
-   
-   public boolean changePassword(String username, String password)
-   {
-      Object user = lookupUser(username);
-      if (user == null)
-      {
-         throw new NoSuchUserException("Could not change password, user '" + username + "' does not exist");
-      }
-      
-      setUserPassword(user, password);
-      
-      return true;
-   }
-   
-   public boolean userExists(String name)
-   {
-      return lookupUser(name) != null;
-   }
-   
-   public boolean roleExists(String name)
-   {
-      return lookupRole(name) != null;
-   }
-   
-   public boolean isUserEnabled(String name)
-   {
-      Object user = lookupUser(name);
-      return user != null && (!userEnabledProperty.isSet() || (((Boolean) userEnabledProperty.getValue(user))) == true);
-   }
-   
-   public List<String> getGrantedRoles(String name)
-   {
-      Object user = lookupUser(name);
-      if (user == null)
-      {
-         throw new NoSuchUserException("No such user '" + name + "'");      
-      }
-
-      List<String> roles = new ArrayList<String>();
-      
-      Collection userRoles = (Collection) userRolesProperty.getValue(user);
-      if (userRoles != null)
-      {
-         for (Object role : userRoles)
-         {
-            if (xrefClass == null)
-            {
-               roles.add((String) roleNameProperty.getValue(role));
-            }
-            else
-            {
-               Object xref = roleNameProperty.getValue(role);
-               Object userRole = xrefRoleProperty.getValue(xref);
-               roles.add((String) roleNameProperty.getValue(userRole));
-            }
-         }
-      }
-      
-      return roles;     
-   }
-   
-   public List<String> getRoleGroups(String name)
-   {
-      Object role = lookupRole(name);
-      if (role == null)
-      {
-         throw new NoSuchUserException("No such role '" + name + "'");
-      }
-
-      List<String> groups = new ArrayList<String>();
-      
-      if (roleGroupsProperty.isSet())
-      {
-         Collection roleGroups = (Collection) roleGroupsProperty.getValue(role);
-         if (roleGroups != null)
-         {
-            for (Object group : roleGroups)
-            {
-               groups.add((String) roleNameProperty.getValue(group));
-            }
-         }
-      }
-      
-      return groups;      
-   }
-   
-   public List<String> getImpliedRoles(String name)
-   {
-      Object user = lookupUser(name);
-      if (user == null) 
-      {
-         throw new NoSuchUserException("No such user '" + name + "'"); 
-      }
-
-      Set<String> roles = new HashSet<String>();
-      Collection userRoles = (Collection) userRolesProperty.getValue(user);
-      if (userRoles != null)
-      {
-         for (Object role : userRoles)
-         {
-            addRoleAndMemberships((String) roleNameProperty.getValue(role), roles);
-         }
-      }
-      
-      return new ArrayList<String>(roles);
-   }
-   
-   private void addRoleAndMemberships(String role, Set<String> roles)
-   {
-      if (roles.add(role))
-      {      
-         Object instance = lookupRole(role);
-         
-         if (roleGroupsProperty.isSet())
-         {
-            Collection groups = (Collection) roleGroupsProperty.getValue(instance);
-            
-            if (groups != null)
-            {
-               for (Object group : groups)
-               {
-                  addRoleAndMemberships((String) roleNameProperty.getValue(group), roles);
-               }
-            }
-         }
-      }
-   }
-   
-   public String generatePasswordHash(String password, byte[] salt)
-   {
-      if (passwordSaltProperty.isSet())
-      {
-         try
-         {
-            return PasswordHash.instance().createPasswordKey(password.toCharArray(), salt, 
-                  userPasswordProperty.getAnnotation().iterations());
-         }
-         catch (GeneralSecurityException ex)
-         {
-            throw new IdentityManagementException("Exception generating password hash", ex);
-         }
-      }
-      else
-      {
-         return generatePasswordHash(password, new String(salt));
-      }
-   }
-   
-   /**
-    * 
-    * @deprecated Use JpaIdentityStore.generatePasswordHash(String, byte[]) instead
-    */
-   @Deprecated
-   protected String generatePasswordHash(String password, String salt)
-   {    
-      String algorithm = userPasswordProperty.getAnnotation().hash();
-      
-      if (algorithm == null || "".equals(algorithm))
-      {
-         if (salt == null || "".equals(salt))
-         {
-            return PasswordHash.instance().generateHash(password);
-         }
-         else
-         {
-            return PasswordHash.instance().generateSaltedHash(password, salt);
-         }
-      }
-      else if ("none".equalsIgnoreCase(algorithm))
-      {
-         return password;
-      }      
-      else
-      {
-         if (salt == null || "".equals(salt))
-         {
-            return PasswordHash.instance().generateHash(password, algorithm);
-         }
-         else
-         {
-            return PasswordHash.instance().generateSaltedHash(password, salt, algorithm);
-         }
-      }
-   }
-   
-   public boolean authenticate(String username, String password)
-   {
-      Object user = lookupUser(username);          
-      if (user == null || (userEnabledProperty.isSet() && ((Boolean) userEnabledProperty.getValue(user) == false)))
-      {
-         return false;
-      }
-      
-      String passwordHash = null;
-      
-      if (passwordSaltProperty.isSet())
-      {
-         String encodedSalt = (String) passwordSaltProperty.getValue(user);
-         if (encodedSalt == null)
-         {
-            throw new IdentityManagementException("A @PasswordSalt property was found on entity " + user + 
-                  ", but it contains no value");
-         }
-         
-         passwordHash = generatePasswordHash(password, BinTools.hex2bin(encodedSalt));
-      }
-      else
-      {
-         passwordHash = generatePasswordHash(password, getUserAccountSalt(user));   
-      }
-      
-       
-      boolean success = passwordHash.equals(userPasswordProperty.getValue(user));
-            
-      if (success && Events.exists())
-      {
-         if (Contexts.isEventContextActive())
-         {
-            Contexts.getEventContext().set(AUTHENTICATED_USER, user);
-         }
-         
-         Events.instance().raiseEvent(EVENT_USER_AUTHENTICATED, user);
-      }
-      
-      return success;
-   }
-   
-   @Observer(Identity.EVENT_POST_AUTHENTICATE)
-   public void setUserAccountForSession()
-   {
-      if (Contexts.isEventContextActive() && Contexts.isSessionContextActive())
-      {
-         Contexts.getSessionContext().set(AUTHENTICATED_USER, 
-               Contexts.getEventContext().get(AUTHENTICATED_USER));
-      }
-   }
-   
-   public Object lookupUser(String username)       
-   {
-      try
-      {
-         Object user = lookupEntityManager().createQuery(
-            "select u from " + userClass.getName() + " u where " + userPrincipalProperty.getName() +
-            " = :username")
-            .setParameter("username", username)
-            .getSingleResult();
-         
-         return user;
-      }
-      catch (NoResultException ex)
-      {
-         return null;        
-      }      
-   }
-   
-   public String getUserName(Object user)
-   {
-      return (String) userPrincipalProperty.getValue(user);
-   }
-   
-   public String getRoleName(Object role)
-   {
-      return (String) roleNameProperty.getValue(role);
-   }
-   
-   public boolean isRoleConditional(String role)
-   {      
-      return roleConditionalProperty.isSet() ? (Boolean) roleConditionalProperty.getValue(
-            lookupRole(role)) : false;
-   }
-   
-   public Object lookupRole(String role)       
-   {
-      try
-      {
-         Object value = lookupEntityManager().createQuery(
-            "select r from " + roleClass.getName() + " r where " + roleNameProperty.getName() +
-            " = :role")
-            .setParameter("role", role)
-            .getSingleResult();
-         
-         return value;
-      }
-      catch (NoResultException ex)
-      {
-         return null;        
-      }
-   }   
-   
-   public List<String> listUsers()
-   {
-      return lookupEntityManager().createQuery(
-            "select u." + userPrincipalProperty.getName() + " from " + userClass.getName() + " u")
-            .getResultList();      
-   }
-   
-   public List<String> listUsers(String filter)
-   {
-      return lookupEntityManager().createQuery(
-            "select u." + userPrincipalProperty.getName() + " from " + userClass.getName() + 
-            " u where lower(" + userPrincipalProperty.getName() + ") like :username")
-            .setParameter("username", "%" + (filter != null ? filter.toLowerCase() : "") + 
-                  "%")
-            .getResultList();
-   }
-
-   public List<String> listRoles()
-   {     
-      return lookupEntityManager().createQuery(
-            "select r." + roleNameProperty.getName() + " from " + roleClass.getName() + " r").getResultList();
-   }
-   
-   public List<Principal> listMembers(String role)
-   {
-      List<Principal> members = new ArrayList<Principal>();
-      
-      for (String user : listUserMembers(role))
-      {
-         members.add(new SimplePrincipal(user));
-      }
-      
-      for (String roleName : listRoleMembers(role))
-      {
-         members.add(new Role(roleName));
-      }
-      
-      return members;
-   }
-   
-   private List<String> listUserMembers(String role)
-   {      
-      Object roleEntity = lookupRole(role);
-
-      if (xrefClass == null)
-      {      
-         return lookupEntityManager().createQuery("select u." + userPrincipalProperty.getName() + 
-               " from " + userClass.getName() + " u where :role member of u." + userRolesProperty.getName())
-               .setParameter("role", roleEntity)
-               .getResultList();
-      }
-      else
-      {
-         List xrefs = lookupEntityManager().createQuery("select x from " + xrefClass.getName() + " x where x." +
-               xrefRoleProperty.getName() + " = :role")
-               .setParameter("role", roleEntity)
-               .getResultList();
-
-         List<String> members = new ArrayList<String>();
-         
-         for (Object xref : xrefs)
-         {
-            Object user = xrefUserProperty.getValue(xref);
-            members.add(userPrincipalProperty.getValue(user).toString());
-         }
-         
-         return members;
-      }
-     
-   }
-   
-   private List<String> listRoleMembers(String role)
-   {                
-      
-      if (roleGroupsProperty.isSet())
-      {
-         Object roleEntity = lookupRole(role);                  
-         
-         return lookupEntityManager().createQuery("select r." + roleNameProperty.getName() +
-               " from " + roleClass.getName() + " r where :role member of r." + roleGroupsProperty.getName())
-               .setParameter("role", roleEntity)
-               .getResultList();
-      }
-      
-      return new ArrayList<String>();
-   }
-   
-   public List<String> listGrantableRoles()
-   {
-      StringBuilder roleQuery = new StringBuilder();
-      
-      roleQuery.append("select r.");
-      roleQuery.append(roleNameProperty.getName());
-      roleQuery.append(" from ");
-      roleQuery.append(roleClass.getName());
-      roleQuery.append(" r");
-      
-      if (roleConditionalProperty.isSet())
-      {
-         roleQuery.append(" where r.");
-         roleQuery.append(roleConditionalProperty.getName());
-         roleQuery.append(" = false");
-      }
-      
-      return lookupEntityManager().createQuery(roleQuery.toString()).getResultList();
-   }
-   
-   protected void persistEntity(Object entity)
-   {
-      lookupEntityManager().persist(entity);
-   }
-   
-   protected Object mergeEntity(Object entity)
-   {
-      return lookupEntityManager().merge(entity);
-   }
-   
-   protected void removeEntity(Object entity)
-   {
-      lookupEntityManager().remove(entity);
-   }
-   
-   public Class getUserClass()
-   {
-      return userClass;
-   }
-   
-   public void setUserClass(Class userClass)
-   {
-      this.userClass = userClass;
-   }   
-   
-   public Class getRoleClass()
-   {
-      return roleClass;
-   }
-   
-   public void setRoleClass(Class roleClass)
-   {
-      this.roleClass = roleClass;
-   }
-   
-   private EntityManager lookupEntityManager()
-   {
-      return entityManager.getValue();
-   }
-   
-   public ValueExpression getEntityManager()
-   {
-      return entityManager;
-   }
-   
-   public void setEntityManager(ValueExpression expression)
-   {
-      this.entityManager = expression;
-   }      
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/LdapIdentityStore.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/LdapIdentityStore.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/LdapIdentityStore.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1285 +0,0 @@
-package org.jboss.seam.security.management;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.naming.ldap.InitialLdapContext;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * An IdentityStore implementation that integrates with a directory service.
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.identityStore")
- at Install(precedence = BUILT_IN, value=false) 
- at Scope(APPLICATION)
- at BypassInterceptors
-public class LdapIdentityStore implements IdentityStore, Serializable
-{
-   // constants for LDAP syntax 1.3.6.1.4.1.1466.115.121.1.7 (boolean)
-   private static final String LDAP_BOOLEAN_TRUE = "TRUE";
-   private static final String LDAP_BOOLEAN_FALSE = "FALSE";
-   
-   private static final LogProvider log = Logging.getLogProvider(LdapIdentityStore.class);   
-   
-   protected FeatureSet featureSet = new FeatureSet();
-   
-   private String serverAddress = "localhost";
-   
-   private int serverPort = 389;
-   
-   private String userContextDN = "ou=Person,dc=acme,dc=com";
-      
-   private String userDNPrefix = "uid=";
-   
-   private String userDNSuffix = ",ou=Person,dc=acme,dc=com";
-   
-   private String roleContextDN = "ou=Role,dc=acme,dc=com";   
-   
-   private String roleDNPrefix = "cn=";
-   
-   private String roleDNSuffix = ",ou=Roles,dc=acme,dc=com";
-   
-   private String bindDN = "cn=Manager,dc=acme,dc=com";
-   
-   private String bindCredentials = "secret";
-   
-   private String userRoleAttribute = "roles";
-   
-   private boolean roleAttributeIsDN = true;
-   
-   private String userNameAttribute = "uid";
-   
-   private String userPasswordAttribute = "userPassword";
-   
-   private String firstNameAttribute = null;
-   
-   private String lastNameAttribute = "sn";
-   
-   private String fullNameAttribute = "cn";
-   
-   private String enabledAttribute = null;
-   
-   private String roleNameAttribute = "cn";
-   
-   private String objectClassAttribute = "objectClass";
-   
-   private String[] roleObjectClasses = { "organizationalRole" };
-   
-   private String[] userObjectClasses = { "person", "uidObject" };
-   
-   private String securityAuthenticationType = "simple";
-   
-   private int searchScope = SearchControls.SUBTREE_SCOPE;
-   
-   /**
-    * Time limit for LDAP searches, in milliseconds
-    */
-   private int searchTimeLimit = 10000;
-      
-   public String getServerAddress()
-   {
-      return serverAddress;
-   }
-   
-   public void setServerAddress(String serverAddress)
-   {
-      this.serverAddress = serverAddress;
-   }
-   
-   public int getServerPort()
-   {
-      return serverPort;
-   }
-   
-   public void setServerPort(int serverPort)
-   {
-      this.serverPort = serverPort;
-   }
-   
-   public String getUserContextDN()
-   {
-      return userContextDN;
-   }
-   
-   public void setUserContextDN(String userContextDN)
-   {
-      this.userContextDN = userContextDN;
-   }
-   
-   public String getRoleContextDN()
-   {
-      return roleContextDN;
-   }
-   
-   public void setRoleContextDN(String roleContextDN)
-   {
-      this.roleContextDN = roleContextDN;
-   }
-   
-   public String getUserDNPrefix()
-   {
-      return userDNPrefix;
-   }
-   
-   public void setUserDNPrefix(String value)
-   {
-      this.userDNPrefix = value;
-   }
-   
-   public String getUserDNSuffix()
-   {
-      return userDNSuffix;
-   }
-   
-   public void setUserDNSuffix(String value)
-   {
-      this.userDNSuffix = value;
-   }
-
-   public String getRoleDNPrefix()
-   {
-      return roleDNPrefix;
-   }
-   
-   public void setRoleDNPrefix(String value)
-   {
-      this.roleDNPrefix = value;
-   }
-   
-   public String getRoleDNSuffix()
-   {
-      return roleDNSuffix;
-   }
-   
-   public void setRoleDNSuffix(String value)
-   {
-      this.roleDNSuffix = value;
-   }
-   
-   public String getBindDN()
-   {
-      return bindDN;
-   }
-   
-   public void setBindDN(String bindDN)
-   {
-      this.bindDN = bindDN;
-   }
-   
-   public String getBindCredentials()
-   {
-      return bindCredentials;
-   }
-   
-   public void setBindCredentials(String bindCredentials)
-   {
-      this.bindCredentials = bindCredentials;
-   }
-   
-   public String getUserRoleAttribute()
-   {
-      return userRoleAttribute;
-   }
-   
-   public void setUserRoleAttribute(String userRoleAttribute)
-   {
-      this.userRoleAttribute = userRoleAttribute;
-   }
-   
-   public boolean getRoleAttributeIsDN()
-   {
-      return roleAttributeIsDN;
-   }
-   
-   public void setRoleAttributeIsDN(boolean value)
-   {
-      this.roleAttributeIsDN = value;
-   }
-   
-   public String getRoleNameAttribute()
-   {
-      return roleNameAttribute;
-   }
-   
-   public void setRoleNameAttribute(String roleNameAttribute)
-   {
-      this.roleNameAttribute = roleNameAttribute;
-   }
-   
-   public String getUserNameAttribute()
-   {
-      return userNameAttribute;
-   }
-   
-   public void setUserNameAttribute(String userNameAttribute)
-   {
-      this.userNameAttribute = userNameAttribute;
-   }
-   
-   public String getUserPasswordAttribute()
-   {
-      return userPasswordAttribute;
-   }
-   
-   public void setUserPasswordAttribute(String userPasswordAttribute)
-   {
-      this.userPasswordAttribute = userPasswordAttribute;
-   }
-   
-   public String getFirstNameAttribute()
-   {
-      return firstNameAttribute;
-   }
-   
-   public void setFirstNameAttribute(String firstNameAttribute)
-   {
-      this.firstNameAttribute = firstNameAttribute;
-   }
-   
-   public String getLastNameAttribute()
-   {
-      return lastNameAttribute;
-   }
-   
-   public void setLastNameAttribute(String lastNameAttribute)
-   {
-      this.lastNameAttribute = lastNameAttribute;
-   }
-   
-   public String getFullNameAttribute()
-   {
-      return fullNameAttribute;
-   }
-   
-   public void setFullNameAttribute(String fullNameAttribute)
-   {
-      this.fullNameAttribute = fullNameAttribute;
-   }
-   
-   public String getEnabledAttribute()
-   {
-      return enabledAttribute;
-   }
-   
-   public void setEnabledAttribute(String enabledAttribute)
-   {
-      this.enabledAttribute = enabledAttribute;
-   }
-   
-   public String getObjectClassAttribute()
-   {
-      return objectClassAttribute;
-   }
-   
-   public void setObjectClassAttribute(String objectClassAttribute)
-   {
-      this.objectClassAttribute = objectClassAttribute;
-   }
-   
-   public String[] getRoleObjectClasses()
-   {
-      return roleObjectClasses;
-   }
-   
-   public void setRoleObjectClass(String[] roleObjectClasses)
-   {
-      this.roleObjectClasses = roleObjectClasses;
-   }
-   
-   public String[] getUserObjectClasses()
-   {
-      return userObjectClasses;
-   }
-   
-   public void setUserObjectClasses(String[] userObjectClasses)
-   {
-      this.userObjectClasses = userObjectClasses;
-   }
-   
-   public int getSearchTimeLimit()
-   {
-      return searchTimeLimit;
-   }
-   
-   public void setSearchTimeLimit(int searchTimeLimit)
-   {
-      this.searchTimeLimit = searchTimeLimit;
-   }
-   
-   public String getSecurityAuthenticationType()
-   {
-      return securityAuthenticationType;
-   }
-   
-   public void setSecurityAuthenticationType(String value)
-   {
-      this.securityAuthenticationType = value;
-   }
-   
-   public String getSearchScope()
-   {
-      switch (searchScope)
-      {
-         case SearchControls.OBJECT_SCOPE: return "OBJECT_SCOPE";
-         case SearchControls.ONELEVEL_SCOPE : return "ONELEVEL_SCOPE";
-         case SearchControls.SUBTREE_SCOPE : return "SUBTREE_SCOPE";
-         default: return "UNKNOWN";
-      }
-   }
-   
-   public void setSearchScope(String value)
-   {
-      if ("OBJECT_SCOPE".equals(value))
-      {
-         searchScope = SearchControls.OBJECT_SCOPE;
-      }
-      else if ("ONELEVEL_SCOPE".equals(value))
-      {
-         searchScope = SearchControls.ONELEVEL_SCOPE;
-      }
-      else
-      {
-         searchScope = SearchControls.SUBTREE_SCOPE;
-         if (!"SUBTREE_SCOPE".equals(value))
-         {
-            log.warn("Invalid search scope specified (" + value + ") - search scope set to SUBTREE_SCOPE");
-         }
-      }
-   }
-   
-   public Set<Feature> getFeatures()
-   {
-      return featureSet.getFeatures();
-   }
-   
-   public void setFeatures(Set<Feature> features)
-   {
-      featureSet = new FeatureSet(features);
-   }
-   
-   public boolean supportsFeature(Feature feature)
-   {
-      return featureSet.supports(feature);
-   }
-   
-   protected final InitialLdapContext initialiseContext()
-      throws NamingException
-   {
-      return initialiseContext(getBindDN(), getBindCredentials());
-   }
-   
-   protected final InitialLdapContext initialiseContext(String principal, String credentials)
-      throws NamingException
-   {
-      Properties env = new Properties();
-
-      env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
-      env.setProperty(Context.SECURITY_AUTHENTICATION, securityAuthenticationType);
-      
-      String providerUrl = String.format("ldap://%s:%d", getServerAddress(), getServerPort());
-      env.setProperty(Context.PROVIDER_URL, providerUrl);
-      
-      env.setProperty(Context.SECURITY_PRINCIPAL, principal);
-      env.setProperty(Context.SECURITY_CREDENTIALS, credentials);      
-      
-      InitialLdapContext ctx = new InitialLdapContext(env, null);
-      return ctx;
-   } 
-   
-   protected String getUserDN(String username)
-   {
-      return String.format("%s%s%s", getUserDNPrefix(), username, getUserDNSuffix());
-   }
-   
-   protected String getRoleDN(String role)
-   {
-      return String.format("%s%s%s", getRoleDNPrefix(), role, getRoleDNSuffix());
-   }
-      
-   public boolean authenticate(String username, String password) 
-   {      
-      final String securityPrincipal = getUserDN(username);
-      
-      InitialLdapContext ctx = null;
-      try
-      {
-         ctx = initialiseContext(securityPrincipal, password);
-         
-         if (getEnabledAttribute() != null)
-         {
-            Attributes attribs = ctx.getAttributes(securityPrincipal, new String[] { getEnabledAttribute() });
-            Attribute enabledAttrib = attribs.get( getEnabledAttribute() );
-            if (enabledAttrib != null)
-            {
-               for (int r = 0; r < enabledAttrib.size(); r++)
-               {
-                  Object value = enabledAttrib.get(r);
-                  if (LDAP_BOOLEAN_TRUE.equals(value)) return true;
-               }
-            }           
-            return false;
-         }
-                           
-         return true;         
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Authentication error", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }      
-   }
-
-   public boolean changePassword(String name, String password) 
-   {
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();
-         
-         BasicAttribute passwordAttrib = new BasicAttribute(getUserPasswordAttribute(), password);
-         ModificationItem mod = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, passwordAttrib);
-         ctx.modifyAttributes(getUserDN(name), new ModificationItem[] { mod });        
-         
-         return true;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to change password", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }        
-   }
-
-   public boolean createRole(String role) 
-   {
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();
-         
-         Attributes roleAttribs = new BasicAttributes();
-         
-         BasicAttribute roleClass = new BasicAttribute(getObjectClassAttribute());
-         for (String objectClass : getRoleObjectClasses())
-         {
-            roleClass.add(objectClass);
-         }
-         
-         roleAttribs.put(roleClass);
-         roleAttribs.put(new BasicAttribute(getRoleNameAttribute(), role));
-         
-         String roleDN = getRoleDN(role);          
-         ctx.createSubcontext(roleDN, roleAttribs);
-         
-         return true;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to create role", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }      
-   }
-   
-   public boolean createUser(String username, String password, String firstname, String lastname)
-   {
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();
-         
-         Attributes userAttribs = new BasicAttributes();
-         
-         BasicAttribute userClass = new BasicAttribute(getObjectClassAttribute());
-         for (String objectClass : getUserObjectClasses())
-         {
-            userClass.add(objectClass);
-         }
-         
-         userAttribs.put(userClass);
-         userAttribs.put(new BasicAttribute(getUserNameAttribute(), username));
-         userAttribs.put(new BasicAttribute(getUserPasswordAttribute(), password));
-         
-         if (getFirstNameAttribute() != null && firstname != null)
-         {
-            userAttribs.put(new BasicAttribute(getFirstNameAttribute(), firstname));
-         }
-         
-         if (getLastNameAttribute() != null && lastname != null)
-         {
-            userAttribs.put(new BasicAttribute(getLastNameAttribute(), lastname));
-         }
-         
-         if (getFullNameAttribute() != null && firstname != null && lastname != null)
-         {
-            userAttribs.put(new BasicAttribute(getFullNameAttribute(), firstname + " " + lastname));
-         }
-         
-         if (getEnabledAttribute() != null)
-         {
-            userAttribs.put(new BasicAttribute(getEnabledAttribute(), LDAP_BOOLEAN_TRUE));
-         }
-         
-         String userDN = String.format("%s=%s,%s", getUserNameAttribute(), username, getUserContextDN() );          
-         ctx.createSubcontext(userDN, userAttribs);
-         
-         return true;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to create user", ex);
-      }      
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }      
-   }
-
-   public boolean createUser(String username, String password) 
-   {
-      return createUser(username, password, null, null);
-   }
-
-   public boolean deleteRole(String role) 
-   {
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();
-                 
-         // Delete the role entry itself
-         String roleDN = String.format("%s=%s,%s", getRoleNameAttribute(), role, getRoleContextDN() );          
-         ctx.destroySubcontext(roleDN);         
-         
-         // Then delete all user attributes that point to this role
-         int searchScope = SearchControls.SUBTREE_SCOPE;
-         int searchTimeLimit = 10000;
-         
-         String[] roleAttr = { getUserRoleAttribute() };
-                           
-         SearchControls controls = new SearchControls();
-         controls.setSearchScope(searchScope);
-         controls.setReturningAttributes(roleAttr);
-         controls.setTimeLimit(searchTimeLimit);
-         
-         StringBuilder roleFilter = new StringBuilder();
-         Object[] filterArgs = new Object[getUserObjectClasses().length + 1];
-         filterArgs[0] = roleDN;
-         
-         roleFilter.append("(&(");
-         roleFilter.append(getUserRoleAttribute());
-         roleFilter.append("={0})");
-         
-         for (int i = 0; i < getUserObjectClasses().length; i++)
-         {
-            roleFilter.append("(");
-            roleFilter.append(getObjectClassAttribute());
-            roleFilter.append("={");
-            roleFilter.append(i + 1);
-            roleFilter.append("})");
-            filterArgs[i + 1] = getUserObjectClasses()[i];
-         }
-         
-         roleFilter.append(")");
-                  
-         NamingEnumeration answer = ctx.search(getUserContextDN(), roleFilter.toString(), filterArgs, controls);
-         while (answer.hasMore())
-         {
-            SearchResult sr = (SearchResult) answer.next();
-            Attributes attrs = sr.getAttributes();
-            Attribute user = attrs.get( getUserRoleAttribute() );
-            user.remove(roleDN);            
-            ctx.modifyAttributes(sr.getNameInNamespace(), new ModificationItem[] {
-               new ModificationItem(DirContext.REPLACE_ATTRIBUTE, user)});
-         }
-         answer.close();         
-         
-         return true;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to delete role", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }      
-   }
-   
-   public boolean roleExists(String role) 
-   {      
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();              
-         
-         int searchScope = SearchControls.SUBTREE_SCOPE;
-         int searchTimeLimit = 10000;
-         
-         String[] roleAttr = { getRoleNameAttribute() };
-                           
-         SearchControls controls = new SearchControls();
-         controls.setSearchScope(searchScope);
-         controls.setReturningAttributes(roleAttr);
-         controls.setTimeLimit(searchTimeLimit);
-         
-         String roleFilter = "(&(" + getObjectClassAttribute() + "={0})(" + getRoleNameAttribute() + "={1}))";
-         Object[] filterArgs = { getRoleObjectClasses(), role};
-         
-         NamingEnumeration answer = ctx.search(getRoleContextDN(), roleFilter, filterArgs, controls);
-         while (answer.hasMore())
-         {
-            SearchResult sr = (SearchResult) answer.next();
-            Attributes attrs = sr.getAttributes();
-            Attribute user = attrs.get( getRoleNameAttribute() );
-            
-            for (int i = 0; i < user.size(); i++)
-            {
-               Object value = user.get(i);
-               if (role.equals(value)) return true;
-            }            
-         }
-         answer.close();
-
-         return false;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Error getting roles", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }
-   }   
-
-   public boolean deleteUser(String name) 
-   {
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();
-                 
-         String userDN = getUserDN(name);          
-         ctx.destroySubcontext(userDN);         
-         return true;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to delete user", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }      
-   }
-   
-   public boolean isUserEnabled(String name) 
-   {
-      if (getEnabledAttribute() == null) return true;      
-
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();
-         
-         String userDN = getUserDN(name);          
-         Attributes attribs = ctx.getAttributes(userDN, new String[] { getEnabledAttribute() });
-         Attribute enabledAttrib = attribs.get( getEnabledAttribute() );
-         if (enabledAttrib != null)
-         {
-            for (int r = 0; r < enabledAttrib.size(); r++)
-            {
-               Object value = enabledAttrib.get(r);
-               if (LDAP_BOOLEAN_TRUE.equals(value)) return true;
-            }
-         }         
-
-         return false;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to delete user", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }      
-   }   
-
-   public boolean disableUser(String name) 
-   {
-      if (getEnabledAttribute() == null) return false;
-      
-      InitialLdapContext ctx = null;
-      try
-      {
-         ctx = initialiseContext();
-         
-         String userDN = getUserDN(name);          
-         BasicAttribute enabledAttrib = new BasicAttribute(getEnabledAttribute(), LDAP_BOOLEAN_FALSE);
-         ModificationItem mod = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, enabledAttrib);
-         
-         ctx.modifyAttributes(userDN, new ModificationItem[] { mod });
-         return true;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to disable user", ex);
-      }      
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }
-   }
-
-   public boolean enableUser(String name) 
-   {
-      if (getEnabledAttribute() == null) return false;
-      
-      InitialLdapContext ctx = null;
-      try
-      {
-         ctx = initialiseContext();
-         
-         String userDN = getUserDN(name);          
-         BasicAttribute enabledAttrib = new BasicAttribute(getEnabledAttribute(), LDAP_BOOLEAN_TRUE);
-         ModificationItem mod = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, enabledAttrib);
-         
-         ctx.modifyAttributes(userDN, new ModificationItem[] { mod });
-         return true;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to disable user", ex);
-      }      
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }
-   }
-
-   public List<String> getGrantedRoles(String name) 
-   {
-      Set<String> userRoles = new HashSet<String>();
-      
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();
-                  
-         String userFilter = "(" + getUserNameAttribute() + "={0})";         
-         String[] roleAttr = { getUserRoleAttribute() };
-                  
-         SearchControls controls = new SearchControls();
-         controls.setSearchScope(searchScope);
-         controls.setReturningAttributes(roleAttr);
-         controls.setTimeLimit(getSearchTimeLimit());
-         Object[] filterArgs = {name};
-         
-         NamingEnumeration answer = ctx.search(getUserContextDN(), userFilter, filterArgs, controls);
-         while (answer.hasMore())
-         {
-            SearchResult sr = (SearchResult) answer.next();
-            Attributes attrs = sr.getAttributes();
-            Attribute roles = attrs.get( getUserRoleAttribute() );
-            if (roles != null)
-            {
-               for (int r = 0; r < roles.size(); r++)
-               {
-                  Object value = roles.get(r);
-                  String roleName = null;
-                  if (getRoleAttributeIsDN() == true)
-                  {
-                     String roleDN = value.toString();
-                     String[] returnAttribute = {getRoleNameAttribute()};
-                     try
-                     {
-                        Attributes result2 = ctx.getAttributes(roleDN, returnAttribute);
-                        Attribute roles2 = result2.get(getRoleNameAttribute());
-                        if( roles2 != null )
-                        {
-                           for(int m = 0; m < roles2.size(); m ++)
-                           {
-                              roleName = (String) roles2.get(m);
-                              userRoles.add(roleName);
-                           }
-                        }
-                     }
-                     catch (NamingException ex)
-                     {
-                        throw new IdentityManagementException("Failed to query roles", ex);
-                     }
-                  }
-                  else
-                  {
-                     // The role attribute value is the role name
-                     roleName = value.toString();
-                     userRoles.add(roleName);
-                  }
-               }
-            }
-         }
-         answer.close();                     
-         
-         return new ArrayList<String>(userRoles);         
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Error getting roles", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }
-   }
-
-   public List<String> getImpliedRoles(String name) 
-   {
-      return getGrantedRoles(name);
-   }
-
-   public boolean grantRole(String name, String role) 
-   {      
-      InitialLdapContext ctx = null;
-      try
-      {
-         ctx = initialiseContext();
-         
-         String userDN = getUserDN(name);
-                  
-         BasicAttribute roleAttrib = new BasicAttribute(getUserRoleAttribute(), 
-               getRoleAttributeIsDN() ? getRoleDN(role) : role);
-         ModificationItem mod = new ModificationItem(DirContext.ADD_ATTRIBUTE, roleAttrib);
-         
-         ctx.modifyAttributes(userDN, new ModificationItem[] { mod });
-         return true;
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to grant role", ex);
-      }      
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }
-   }
-   
-   public boolean revokeRole(String name, String role) 
-   {      
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();   
-         String userDN = getUserDN(name);
-         
-         Attributes roleAttribs = ctx.getAttributes(userDN, new String[] { getUserRoleAttribute() });
-         Attribute roleAttrib = roleAttribs.get( getUserRoleAttribute() );
-         if (roleAttrib != null)
-         {   
-            boolean modified = false;            
-            for (int i = roleAttrib.size() - 1; i >= 0; i--)
-            {               
-               if (getRoleAttributeIsDN())
-               {
-                  Attributes attribs = ctx.getAttributes((String) roleAttrib.get(i), 
-                        new String[] { getRoleNameAttribute() });
-                  Attribute roleNameAttrib = attribs.get( getRoleNameAttribute() );
-                  for (int j = 0; j < roleNameAttrib.size(); j++)
-                  {
-                     if (role.equals(roleNameAttrib.get(j))) 
-                     {
-                        modified = true;
-                        roleAttrib.remove(i);
-                     }
-                  }
-               }
-               else if (role.equals(roleAttrib.get(i)))
-               {
-                  modified = true;
-                  roleAttrib.remove(i);
-               }
-            }
-            
-            if (modified)
-            {
-               ModificationItem mod = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, roleAttrib);
-               ctx.modifyAttributes(userDN, new ModificationItem[] { mod });
-            }            
-         }
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Failed to grant role", ex);
-      }      
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }      
-      
-      return false;
-   }   
-
-   public List<String> listRoles() 
-   {
-      List<String> roles = new ArrayList<String>();
-      
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();                       
-         
-         String[] roleAttr = { getRoleNameAttribute() };
-                           
-         SearchControls controls = new SearchControls();
-         controls.setSearchScope(searchScope);
-         controls.setReturningAttributes(roleAttr);
-         controls.setTimeLimit(getSearchTimeLimit());
-         
-         StringBuilder roleFilter = new StringBuilder();
-         
-         Object[] filterArgs = new Object[getRoleObjectClasses().length];
-         for (int i = 0; i < getRoleObjectClasses().length; i++)
-         {
-            roleFilter.append("(");
-            roleFilter.append(getObjectClassAttribute());
-            roleFilter.append("={");
-            roleFilter.append(i);
-            roleFilter.append("})");
-            filterArgs[i] = getRoleObjectClasses()[i];
-         }         
-         
-         NamingEnumeration answer = ctx.search( getRoleContextDN(), roleFilter.toString(), 
-               filterArgs, controls);
-         while (answer.hasMore())
-         {
-            SearchResult sr = (SearchResult) answer.next();
-            Attributes attrs = sr.getAttributes();
-            Attribute user = attrs.get( getRoleNameAttribute() );
-            
-            for (int i = 0; i < user.size(); i++)
-            {
-               Object value = user.get(i);
-               roles.add(value.toString());
-            }            
-         }
-         answer.close();
-         return roles;         
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Error getting roles", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }
-   }
-   
-
-   public List<String> listGrantableRoles()
-   {
-      // TODO should we support conditional roles with LDAP?
-      return listRoles();
-   }   
-
-   public List<String> listUsers() 
-   {
-      return listUsers(null);
-   }
-
-   public List<String> listUsers(String filter) 
-   {
-      List<String> users = new ArrayList<String>();
-      
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();              
-       
-         String[] userAttr = {getUserNameAttribute()};
-                           
-         SearchControls controls = new SearchControls();
-         controls.setSearchScope(searchScope);
-         controls.setReturningAttributes(userAttr);
-         controls.setTimeLimit(getSearchTimeLimit());
-                  
-         StringBuilder userFilter = new StringBuilder("(&");
-         
-         Object[] filterArgs = new Object[getUserObjectClasses().length];
-         for (int i = 0; i < getUserObjectClasses().length; i++)
-         {
-            userFilter.append("(");
-            userFilter.append(getObjectClassAttribute());
-            userFilter.append("={");
-            userFilter.append(i);
-            userFilter.append("})");
-            filterArgs[i] = getUserObjectClasses()[i];
-         }            
-         
-         userFilter.append(")");
-         
-         NamingEnumeration answer = ctx.search(getUserContextDN(), userFilter.toString(), filterArgs, controls);
-         while (answer.hasMore())
-         {
-            SearchResult sr = (SearchResult) answer.next();
-            Attributes attrs = sr.getAttributes();
-            Attribute user = attrs.get(getUserNameAttribute());
-            
-            for (int i = 0; i < user.size(); i++)
-            {
-               Object value = user.get(i);
-               
-               if (filter != null)
-               {
-                  if (value.toString().toLowerCase().contains(filter.toLowerCase()))
-                  {
-                     users.add(value.toString());
-                  }
-               }
-               else
-               {               
-                  users.add(value.toString());
-               }
-            }            
-         }
-         answer.close();
-         return users;         
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Error getting users", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }
-   }
-
-   public boolean userExists(String name) 
-   {
-      InitialLdapContext ctx = null;      
-      try
-      {
-         ctx = initialiseContext();              
-       
-         String[] userAttr = {getUserNameAttribute()};
-                           
-         SearchControls controls = new SearchControls();
-         controls.setSearchScope(searchScope);
-         controls.setReturningAttributes(userAttr);
-         controls.setTimeLimit(getSearchTimeLimit());
-                  
-         StringBuilder userFilter = new StringBuilder();
-         
-         Object[] filterArgs = new Object[getUserObjectClasses().length];
-         for (int i = 0; i < getUserObjectClasses().length; i++)
-         {
-            userFilter.append("(");
-            userFilter.append(getObjectClassAttribute());
-            userFilter.append("={");
-            userFilter.append(i);
-            userFilter.append("})");
-            filterArgs[i] = getUserObjectClasses()[i];
-         }            
-         
-         NamingEnumeration answer = ctx.search(getUserContextDN(), userFilter.toString(), filterArgs, controls);
-         while (answer.hasMore())
-         {
-            SearchResult sr = (SearchResult) answer.next();
-            Attributes attrs = sr.getAttributes();
-            Attribute user = attrs.get(getUserNameAttribute());
-            
-            for (int i = 0; i < user.size(); i++)
-            {
-               Object value = user.get(i);
-               if (name.equals(value))
-               {
-                  answer.close();
-                  return true;
-               }
-            }            
-         }
-         answer.close();
-         return false;         
-      }
-      catch (NamingException ex)
-      {
-         throw new IdentityManagementException("Error getting users", ex);
-      }
-      finally
-      {
-         if (ctx != null) 
-         {
-            try
-            {
-               ctx.close();
-            }
-            catch (NamingException ex) {}
-         }
-      }
-   }
-
-   public List<String> getRoleGroups(String name)
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-   
-   public List<Principal> listMembers(String role)
-   {
-      // TODO implement
-      return null;
-   }
-
-   public boolean addRoleToGroup(String role, String group)
-   {
-      // TODO Auto-generated method stub
-      return false;
-   }
-
-   public boolean removeRoleFromGroup(String role, String group)
-   {
-      // TODO Auto-generated method stub
-      return false;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/NoSuchRoleException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/NoSuchRoleException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/NoSuchRoleException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam.security.management;
-
-/**
- * Thrown when an operation is performed on a non-existent role.
- *  
- * @author Shane Bryzak
- */
-public class NoSuchRoleException extends RuntimeException
-{
-   public NoSuchRoleException(String message)
-   {
-      super(message);
-   }
-   
-   public NoSuchRoleException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/NoSuchUserException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/NoSuchUserException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/NoSuchUserException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam.security.management;
-
-/**
- * Thrown when an operation is attempted on a non-existent user.  
- * 
- * @author Shane Bryzak
- */
-public class NoSuchUserException extends RuntimeException
-{
-   public NoSuchUserException(String message)
-   {
-      super(message);
-   }
-   
-   public NoSuchUserException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/PasswordHash.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/PasswordHash.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/PasswordHash.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,154 +0,0 @@
-package org.jboss.seam.security.management;
-
-import static org.jboss.seam.ScopeType.STATELESS;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.security.GeneralSecurityException;
-import java.security.MessageDigest;
-import java.security.SecureRandom;
-
-import javax.crypto.SecretKey;
-import javax.crypto.SecretKeyFactory;
-import javax.crypto.spec.PBEKeySpec;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.security.crypto.BinTools;
-import org.jboss.seam.security.crypto.PBKDF2;
-import org.jboss.seam.security.crypto.PBKDF2Engine;
-import org.jboss.seam.security.crypto.PBKDF2Parameters;
-import org.jboss.seam.util.Base64;
-
-/**
- * Password hashing utility functions
- *  
- * @author Shane Bryzak
- */
- at Scope(STATELESS)
- at Name("org.jboss.seam.security.passwordHash")
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
-public class PasswordHash
-{
-   public static final String ALGORITHM_MD5 = "MD5";
-   public static final String ALGORITHM_SHA = "SHA";
-        
-   private static final String DEFAULT_ALGORITHM = ALGORITHM_MD5;
-   
-   /*
-    * If specified, use the JCE instead of the built in algorithm
-    */
-   private String hashAlgorithm = null;
-
-   /*
-    *  default password salt length, in bytes
-    */
-   private int saltLength = 8; 
-      
-   @Deprecated
-   public String generateHash(String password)
-   {
-      return generateHash(password, DEFAULT_ALGORITHM);
-   }
-   
-   @Deprecated
-   public String generateHash(String password, String algorithm)
-   {
-      return generateSaltedHash(password, null, algorithm);
-   }
-   
-   @Deprecated
-   public String generateSaltedHash(String password, String saltPhrase)
-   {
-      return generateSaltedHash(password, saltPhrase, DEFAULT_ALGORITHM);
-   }
-   
-   /**
-    * @deprecated Use PasswordHash.createPasswordKey() instead
-    */
-   @Deprecated
-   public String generateSaltedHash(String password, String saltPhrase, String algorithm)
-   {
-      try {        
-         MessageDigest md = MessageDigest.getInstance(algorithm);
-                  
-         if (saltPhrase != null)
-         {
-            md.update(saltPhrase.getBytes());
-            byte[] salt = md.digest();
-            
-            md.reset();
-            md.update(password.getBytes());
-            md.update(salt);
-         }
-         else
-         {
-            md.update(password.getBytes());
-         }
-         
-         byte[] raw = md.digest();
-         return Base64.encodeBytes(raw);
-     } 
-     catch (Exception e) {
-         throw new RuntimeException(e);        
-     } 
-   }
-   
-   public byte[] generateRandomSalt()
-   {      
-      byte[] salt = new byte[saltLength];
-      new SecureRandom().nextBytes(salt);
-      return salt;      
-   }
-   
-   /**
-    * 
-    */
-   public String createPasswordKey(char[] password, byte[] salt, int iterations) 
-      throws GeneralSecurityException 
-   {
-      if (hashAlgorithm != null)
-      {
-         PBEKeySpec passwordKeySpec = new PBEKeySpec(password, salt, iterations, 256);
-         SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance(hashAlgorithm);
-         SecretKey passwordKey = secretKeyFactory.generateSecret(passwordKeySpec);
-         passwordKeySpec.clearPassword();
-         return BinTools.bin2hex(passwordKey.getEncoded());
-      }
-      else
-      {
-         PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA1", "ISO-8859-1", salt, iterations);
-         PBKDF2 pbkdf2 = new PBKDF2Engine(params);
-         return BinTools.bin2hex(pbkdf2.deriveKey(new String(password)));
-      }
-   }
-   
-   public static PasswordHash instance()
-   {
-      return (PasswordHash) Component.getInstance(PasswordHash.class, ScopeType.STATELESS);
-   }
-   
-   public String getHashAlgorithm()
-   {
-      return hashAlgorithm;
-   }
-   
-   public void setHashAlgorithm(String hashAlgorithm)
-   {
-      this.hashAlgorithm = hashAlgorithm;
-   }
-   
-   public int getSaltLength()
-   {
-      return saltLength;
-   }
-   
-   public void setSaltLength(int saltLength)
-   {
-      this.saltLength = saltLength;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/RoleAction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/RoleAction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/RoleAction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,124 +0,0 @@
-package org.jboss.seam.security.management.action;
-
-import static org.jboss.seam.ScopeType.CONVERSATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.security.management.IdentityManager;
-
- at Name("org.jboss.seam.security.management.roleAction")
- at Scope(CONVERSATION)
- at Install(precedence = BUILT_IN)
-public class RoleAction implements Serializable
-{
-   private String originalRole;
-   private String role;
-   private List<String> groups;
-   
-   @In IdentityManager identityManager;
-   
-   @Begin
-   public void createRole()
-   {
-      groups = new ArrayList<String>();
-   }
-   
-   @Begin
-   public void editRole(String role)
-   {
-      this.originalRole = role;
-      this.role = role;
-      groups = identityManager.getRoleGroups(role);
-   }
-      
-   public String save()
-   {
-      if (role != null && originalRole != null && !role.equals(originalRole))
-      {
-         identityManager.deleteRole(originalRole);
-      }
-      
-      if (identityManager.roleExists(role))
-      {
-         return saveExistingRole();
-      }
-      else
-      {
-         return saveNewRole();
-      }
-   }
-   
-   private String saveNewRole()
-   {      
-      boolean success = identityManager.createRole(role);
-      
-      if (success)
-      {
-         for (String r : groups)
-         {
-            identityManager.addRoleToGroup(role, r);
-         }
-         
-         Conversation.instance().end();
-      }
-      
-      return "success";      
-   }
-   
-   private String saveExistingRole()
-   {
-      List<String> grantedRoles = identityManager.getRoleGroups(role);
-      
-      if (grantedRoles != null)
-      {
-         for (String r : grantedRoles)
-         {
-            if (!groups.contains(r)) identityManager.removeRoleFromGroup(role, r);
-         }
-      }
-      
-      for (String r : groups)
-      {
-         if (grantedRoles == null || !grantedRoles.contains(r)) identityManager.addRoleToGroup(role, r);
-      }
-               
-      Conversation.instance().end();
-      return "success";
-   }
-   
-   public String getRole()
-   {
-      return role;
-   }
-   
-   public List<String> getAssignableRoles()
-   {
-      List<String> roles = identityManager.listGrantableRoles();
-      roles.remove(role);
-      return roles;
-   }
-   
-   public void setRole(String role)
-   {
-      this.role = role;
-   }
-
-   public List<String> getGroups()
-   {
-      return groups;
-   }
-   
-   public void setGroups(List<String> groups)
-   {
-      this.groups = groups;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/RoleSearch.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/RoleSearch.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/RoleSearch.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,55 +0,0 @@
-package org.jboss.seam.security.management.action;
-
-import static org.jboss.seam.ScopeType.SESSION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.datamodel.DataModel;
-import org.jboss.seam.annotations.datamodel.DataModelSelection;
-import org.jboss.seam.security.management.IdentityManager;
-
- at Name("org.jboss.seam.security.management.roleSearch")
- at Scope(SESSION)
- at Install(precedence = BUILT_IN)
-public class RoleSearch implements Serializable
-{
-   @DataModel
-   List<String> roles;
-   
-   @DataModelSelection
-   String selectedRole;
-   
-   @In IdentityManager identityManager;
-   
-   public void loadRoles()
-   {
-      roles = identityManager.listRoles();     
-   }
-   
-   public String getRoleGroups(String role)
-   {
-      List<String> roles = identityManager.getRoleGroups(role);
-      
-      if (roles == null) return "";
-      
-      StringBuilder sb = new StringBuilder();
-      
-      for (String r : roles)
-      {
-         sb.append((sb.length() > 0 ? ", " : "") + r); 
-      }
-      
-      return sb.toString();      
-   }
-   
-   public String getSelectedRole()
-   {
-      return selectedRole;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/UserAction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/UserAction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/UserAction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,215 +0,0 @@
-package org.jboss.seam.security.management.action;
-
-import static org.jboss.seam.ScopeType.CONVERSATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.security.management.IdentityManager;
-
-/**
- * A conversation-scoped component for creating and managing user accounts
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.management.userAction")
- at Scope(CONVERSATION)
- at Install(precedence = BUILT_IN)
-public class UserAction implements Serializable
-{
-   private String firstname;
-   private String lastname;
-   private String username;
-   private String password;
-   private String confirm;
-   private List<String> roles;
-   private boolean enabled;
-   
-   private boolean newUserFlag;   
-   
-   @In IdentityManager identityManager;
-      
-   @Begin
-   public void createUser()
-   {
-      roles = new ArrayList<String>();
-      newUserFlag = true;
-   }
-   
-   @Begin
-   public void editUser(String username)
-   {      
-      this.username = username;
-      roles = identityManager.getGrantedRoles(username);
-      enabled = identityManager.isUserEnabled(username);
-      newUserFlag = false;
-   }
-      
-   public String save()
-   {
-      if (newUserFlag)
-      {
-         return saveNewUser();
-      }
-      else
-      {
-         return saveExistingUser();
-      }
-   }
-   
-   private String saveNewUser()
-   {      
-      if (password == null || !password.equals(confirm))
-      {
-         StatusMessages.instance().addToControl("password", "Passwords do not match");
-         return "failure";
-      }
-      
-      boolean success = identityManager.createUser(username, password, firstname, lastname);
-      
-      if (success)
-      {
-         for (String role : roles)
-         {
-            identityManager.grantRole(username, role);
-         }
-         
-         if (!enabled)
-         {
-            identityManager.disableUser(username);   
-         }
-         
-         Conversation.instance().end();
-         
-         return "success";
-      }
-      
-      return "failure";      
-   }
-   
-   private String saveExistingUser()
-   {
-      // Check if a new password has been entered
-      if (password != null && !"".equals(password))
-      {
-         if (!password.equals(confirm))
-         {
-            StatusMessages.instance().addToControl("password", "Passwords do not match");
-            return "failure";
-         }
-         else
-         {
-            identityManager.changePassword(username, password);
-         }
-      }
-      
-      List<String> grantedRoles = identityManager.getGrantedRoles(username);
-      
-      if (grantedRoles != null)
-      {
-         for (String role : grantedRoles)
-         {
-            if (!roles.contains(role)) identityManager.revokeRole(username, role);
-         }
-      }
-      
-      for (String role : roles)
-      {
-         if (grantedRoles == null || !grantedRoles.contains(role)) 
-         {
-            identityManager.grantRole(username, role);
-         }
-      }
-      
-      if (enabled)
-      {
-         identityManager.enableUser(username);
-      }
-      else
-      {
-         identityManager.disableUser(username);
-      }
-         
-      Conversation.instance().end();
-      return "success";
-   }
-   
-   public String getFirstname()
-   {
-      return firstname;
-   }
-   
-   public void setFirstname(String firstname)
-   {
-      this.firstname = firstname;
-   }
-   
-   public String getLastname()
-   {
-      return lastname;
-   }
-   
-   public void setLastname(String lastname)
-   {
-      this.lastname = lastname;
-   }
-   
-   public String getUsername()
-   {
-      return username;
-   }
-   
-   public void setUsername(String username)
-   {
-      this.username = username;
-   }
-   
-   public String getPassword()
-   {
-      return password;
-   }
-   
-   public void setPassword(String password)
-   {
-      this.password = password;
-   }
-   
-   public String getConfirm()
-   {
-      return confirm;
-   }
-   
-   public void setConfirm(String confirm)
-   {
-      this.confirm = confirm;
-   }
-   
-   public List<String> getRoles()
-   {
-      return roles;
-   }
-   
-   public void setRoles(List<String> roles)
-   {
-      this.roles = roles;
-   }
-   
-   public boolean isEnabled()
-   {
-      return enabled;
-   }
-   
-   public void setEnabled(boolean enabled)
-   {
-      this.enabled = enabled;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/UserSearch.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/UserSearch.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/action/UserSearch.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,57 +0,0 @@
-package org.jboss.seam.security.management.action;
-
-import static org.jboss.seam.ScopeType.SESSION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.datamodel.DataModel;
-import org.jboss.seam.annotations.datamodel.DataModelSelection;
-import org.jboss.seam.security.management.IdentityManager;
-
- at Name("org.jboss.seam.security.management.userSearch")
- at Scope(SESSION)
- at Install(precedence = BUILT_IN)
-public class UserSearch implements Serializable
-{
-   private static final long serialVersionUID = 8592034786339372510L;
-
-   @DataModel
-   List<String> users;
-   
-   @DataModelSelection
-   String selectedUser;
-   
-   @In IdentityManager identityManager;
-   
-   public void loadUsers()
-   {
-      users = identityManager.listUsers();     
-   }
-   
-   public String getUserRoles(String username)
-   {
-      List<String> roles = identityManager.getGrantedRoles(username);
-      
-      if (roles == null) return "";
-      
-      StringBuilder sb = new StringBuilder();
-      
-      for (String role : roles)
-      {
-         sb.append((sb.length() > 0 ? ", " : "") + role); 
-      }
-      
-      return sb.toString();      
-   }
-   
-   public String getSelectedUser()
-   {
-      return selectedUser;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/management/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,11 +0,0 @@
-/**
- * Seam Identity Management
- * 
- * @see org.jboss.seam.security.management.IdentityManager
- */
- at Namespace(value="http://jboss.com/products/seam/security", prefix="org.jboss.seam.security")
- at AutoCreate
-package org.jboss.seam.security.management;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenId.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenId.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenId.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,215 +0,0 @@
-package org.jboss.seam.security.openid;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.log.*;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.faces.Redirect;
-import org.jboss.seam.security.Identity;
-import org.openid4java.OpenIDException;
-import org.openid4java.consumer.ConsumerException;
-import org.openid4java.consumer.ConsumerManager;
-import org.openid4java.consumer.VerificationResult;
-import org.openid4java.discovery.DiscoveryInformation;
-import org.openid4java.discovery.Identifier;
-import org.openid4java.message.AuthRequest;
-import org.openid4java.message.ParameterList;
-import org.openid4java.message.ax.FetchRequest;
-
- at Name("org.jboss.seam.security.openid.openid")
- at Install(precedence=Install.BUILT_IN, classDependencies="org.openid4java.consumer.ConsumerManager")
- at Scope(ScopeType.SESSION)
-public class OpenId 
-    implements Serializable
-{
-    private transient LogProvider log = Logging.getLogProvider(OpenId.class);
-
-    String id;
-    String validatedId;
-
-    ConsumerManager manager;
-    DiscoveryInformation discovered;
-
-    @Create
-    public void init()
-        throws ConsumerException
-    {
-        manager = new ConsumerManager();
-        discovered = null;
-        id = null;
-        validatedId = null;
-    }
-
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    
-    public String returnToUrl()  {
-        FacesContext context = FacesContext.getCurrentInstance();
-        HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();
-
-        try {   
-            URL returnToUrl;            
-            if (request.getServerPort()==80) {
-               returnToUrl = new URL("http",   
-                     request.getServerName(), 
-                     context.getApplication().getViewHandler().getActionURL(context, "/openid.xhtml"));
-            } else {
-               returnToUrl = new URL("http",   
-                     request.getServerName(), 
-                     request.getServerPort(),
-                     context.getApplication().getViewHandler().getActionURL(context, "/openid.xhtml"));
-               
-            }
-            return returnToUrl.toExternalForm();
-        } catch (MalformedURLException e) {
-            throw new RuntimeException(e);
-        }
-    }
-    
-    public void login() throws IOException {
-        validatedId = null;
-        String returnToUrl = returnToUrl();
-
-        String url = authRequest(id, returnToUrl);
-
-        if (url != null) {
-            Redirect redirect = Redirect.instance();
-            redirect.captureCurrentView();
-
-            FacesManager.instance().redirectToExternalURL(url);
-        }
-    }
-
-    // --- placing the authentication request ---
-    @SuppressWarnings("unchecked")
-    protected String authRequest(String userSuppliedString, String returnToUrl)
-        throws IOException
-    {
-        try {
-            // perform discovery on the user-supplied identifier
-            List discoveries = manager.discover(userSuppliedString);
-            
-            // attempt to associate with the OpenID provider
-            // and retrieve one service endpoint for authentication
-            discovered = manager.associate(discoveries);
-            
-            //// store the discovery information in the user's session
-            // httpReq.getSession().setAttribute("openid-disc", discovered);
-
-            // obtain a AuthRequest message to be sent to the OpenID provider
-            AuthRequest authReq = manager.authenticate(discovered, returnToUrl);
-
-            // Attribute Exchange example: fetching the 'email' attribute
-            FetchRequest fetch = FetchRequest.createFetchRequest();
-            fetch.addAttribute("email",
-                               "http://schema.openid.net/contact/email",   // type URI
-                               true);                                      // required
-            
-            // attach the extension to the authentication request
-            authReq.addExtension(fetch);
-
-            return authReq.getDestinationUrl(true);
-        } catch (OpenIDException e)  {
-	    log.warn(e);
-        }
-        
-        return null;
-    }
-
-    public void verify() 
-    {       
-        ExternalContext    context = javax.faces.context.FacesContext.getCurrentInstance().getExternalContext();
-        HttpServletRequest request = (HttpServletRequest) context.getRequest();
-        
-        validatedId = verifyResponse(request);
-    }
-
-
-    public boolean loginImmediately() {
-        if (validatedId !=null) {
-            Identity.instance().acceptExternallyAuthenticatedPrincipal((new OpenIdPrincipal(validatedId)));
-            return true;
-        } 
-
-        return false;
-    }
-
-    public boolean isValid() {
-        return validatedId != null;
-    }
-
-    public String getValidatedId() {
-        return validatedId;
-    }
-
-    @SuppressWarnings("unchecked")
-    public String verifyResponse(HttpServletRequest httpReq)
-    {
-        try {
-            // extract the parameters from the authentication response
-            // (which comes in as a HTTP request from the OpenID provider)
-            ParameterList response =
-                new ParameterList(httpReq.getParameterMap());
-          
-            // extract the receiving URL from the HTTP request
-            StringBuffer receivingURL = httpReq.getRequestURL();
-            String queryString = httpReq.getQueryString();
-            if (queryString != null && queryString.length() > 0)
-                receivingURL.append("?").append(httpReq.getQueryString());
-            
-            
-            // verify the response; ConsumerManager needs to be the same
-            // (static) instance used to place the authentication request
-            VerificationResult verification = manager.verify(receivingURL.toString(),
-                                                             response, discovered);
-            
-            // examine the verification result and extract the verified identifier
-            Identifier verified = verification.getVerifiedId();
-            if (verified != null) {
-//                AuthSuccess authSuccess =
-//                    (AuthSuccess) verification.getAuthResponse();
-                
-//                if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
-//                    FetchResponse fetchResp = (FetchResponse) authSuccess
-//                        .getExtension(AxMessage.OPENID_NS_AX);
-//                    
-//                    List emails = fetchResp.getAttributeValues("email");
-//                    String email = (String) emails.get(0);
-//                }
-                
-                return verified.getIdentifier();
-            }
-        } catch (OpenIDException e) {
-            // present error to the user
-        }
-        
-        return null;
-    }
-
-    public void logout() 
-        throws ConsumerException
-    {
-        init();
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenIdPhaseListener.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenIdPhaseListener.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenIdPhaseListener.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,81 +0,0 @@
-package org.jboss.seam.security.openid;
-
-
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.log.*;
-
- at SuppressWarnings("serial")
-public class OpenIdPhaseListener 
-    implements PhaseListener
-{
-    private transient LogProvider log = Logging.getLogProvider(OpenIdPhaseListener.class);
-
-    @SuppressWarnings("unchecked")
-    public void beforePhase(PhaseEvent event)
-    {
-        String viewId = Pages.getCurrentViewId();
-
-        if (viewId==null || !viewId.startsWith("/openid.")) {
-            return;
-        }
-        
-        OpenId open = (OpenId) Component.getInstance(OpenId.class);
-        if (open.getId() == null) {
-            try {
-                sendXRDS();
-            } catch (IOException e) {
-		log.warn(e);
-            }
-            return;
-        }
-
-        OpenId openid = (OpenId) Component.getInstance(OpenId.class);
-        
-        openid.verify();
-        
-        Pages.handleOutcome(event.getFacesContext(), null, "/openid.xhtml");
-    }
-
-
-
-    public void sendXRDS()
-        throws IOException
-    {
-        FacesContext        context    = FacesContext.getCurrentInstance();
-        ExternalContext     extContext = context.getExternalContext();
-        HttpServletResponse response   = (HttpServletResponse) extContext.getResponse();
-
-        response.setContentType("application/xrds+xml");
-        PrintWriter out = response.getWriter();
-
-        // XXX ENCODE THE URL!
-        OpenId open = (OpenId) Component.getInstance(OpenId.class);
-
-        out.println("<XRDS xmlns=\"xri://$xrd*($v*2.0)\"><XRD><Service>" +
-                    "<Type>http://specs.openid.net/auth/2.0/return_to</Type><URI>" +
-                    open.returnToUrl() + "</URI></Service></XRD></XRDS>");
-
-        context.responseComplete();
-    }
-
-
-    public void afterPhase(PhaseEvent event) {
-    }
-
-    public PhaseId getPhaseId() 
-    {
-        return PhaseId.RENDER_RESPONSE;
-    }
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenIdPrincipal.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenIdPrincipal.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/openid/OpenIdPrincipal.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,11 +0,0 @@
-package org.jboss.seam.security.openid;
-
-import org.jboss.seam.security.SimplePrincipal;
-
-public class OpenIdPrincipal 
-    extends SimplePrincipal
-{
-    public OpenIdPrincipal(String name) {
-        super(name);
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,12 +0,0 @@
-/**
- * Seam Security
- * 
- * @see org.jboss.seam.security.Identity
- * @see org.jboss.seam.annotations.security.Restrict
- */
- at Namespace(value="http://jboss.com/products/seam/security", prefix="org.jboss.seam.security")
- at AutoCreate
-package org.jboss.seam.security;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/ClassIdentifierStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/ClassIdentifierStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/ClassIdentifierStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.security.permission.Identifier;
-
-/**
- * An Identifier strategy for class-based permission checks
- * 
- * @author Shane Bryzak
- */
-public class ClassIdentifierStrategy implements IdentifierStrategy, Serializable
-{
-   private static final long serialVersionUID = 3338883246522630571L;
-   
-   private Map<Class<?>,String> identifierNames = new ConcurrentHashMap<Class<?>,String>();   
-   
-   public boolean canIdentify(Class<?> targetClass)
-   {
-      return Class.class.equals(targetClass);
-   }
-
-   public String getIdentifier(Object target)
-   {
-      if (!(target instanceof Class))
-      {
-         throw new IllegalArgumentException("Target [" + target + "] must be instance of Class");
-      }
-      
-      return getIdentifierName((Class<?>) target);
-   }
-   
-   private String getIdentifierName(Class<?> cls)
-   {
-      if (!identifierNames.containsKey(cls))
-      {   
-         String name = null;
-         
-         if (cls.isAnnotationPresent(Identifier.class))
-         {
-            Identifier identifier = (Identifier) cls.getAnnotation(Identifier.class);
-            if (identifier.name() != null && !"".equals(identifier.name().trim()))
-            {
-               name = identifier.name();
-            }
-         }
-         
-         if (name == null)
-         {
-            name = Seam.getComponentName(cls);
-         }
-         
-         if (name == null)
-         {
-            name = cls.getName().substring(cls.getName().lastIndexOf('.') + 1);
-         }
-         
-         identifierNames.put(cls, name);
-         return name;
-      }
-      
-      return identifierNames.get(cls);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/EntityIdentifierStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/EntityIdentifierStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/EntityIdentifierStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,102 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.persistence.Entity;
-import javax.persistence.EntityManager;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.security.permission.Identifier;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.persistence.PersistenceProvider;
-import org.jboss.seam.util.Strings;
-
-/**
- * An Identifier strategy for entity-based permission checks
- * 
- * @author Shane Bryzak
- */
-public class EntityIdentifierStrategy implements IdentifierStrategy, Serializable
-{
-
-   private static final long serialVersionUID = 12456789L;
-
-   private transient ValueExpression<EntityManager> entityManager;   
-   
-   private transient PersistenceProvider persistenceProvider;
-   
-   private Map<Class <?>,String> identifierNames = new ConcurrentHashMap<Class <?>,String>();
-
-   public void init()
-   {
-      if (persistenceProvider == null)
-      {
-         persistenceProvider = (PersistenceProvider) Component.getInstance(PersistenceProvider.class, true);
-      }
-
-      if (entityManager == null)
-      {
-         entityManager = Expressions.instance().createValueExpression("#{entityManager}", EntityManager.class);
-      }
-
-   }
-
-   public EntityIdentifierStrategy()
-   {
-      init();   
-   }
-   
-   public boolean canIdentify(Class<?> targetClass)
-   {
-      return targetClass.isAnnotationPresent(Entity.class);
-   }
-
-   public String getIdentifier(Object target)
-   {
-      if(persistenceProvider == null) init();
-      Object persProviderId = persistenceProvider.getId(target, lookupEntityManager()).toString();
-       return String.format("%s:%s", getIdentifierName(target.getClass()),  persProviderId);
-   }
-   
-   private String getIdentifierName(Class<? extends Object> cls)
-   {
-      if (!identifierNames.containsKey(cls))
-      {   
-         String name = null;
-         
-         if (cls.isAnnotationPresent(Identifier.class))
-         {
-            Identifier identifier = cls.getAnnotation(Identifier.class);
-            if ( !Strings.isEmpty(identifier.name()) )
-            {
-               name = identifier.name();
-            }
-         }
-         
-         if (name == null)
-         {
-            name = Seam.getComponentName(cls);
-         }
-         
-         if (name == null)
-         {
-            name = cls.getName().substring(cls.getName().lastIndexOf('.') + 1);
-         }
-         
-         identifierNames.put(cls, name);
-         return name;
-      }
-      
-      return identifierNames.get(cls);
-   }
-
-   private EntityManager lookupEntityManager()
-   {
-      if(entityManager == null) init();
-      return entityManager.getValue();
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/IdentifierPolicy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/IdentifierPolicy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/IdentifierPolicy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,101 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.security.permission.Identifier;
-
-/**
- * A policy for the generation of object "identifiers" - unique Strings that identify a specific
- * instance of an object.  A policy can consist of numerous identifier strategies, each with the
- * ability to generate identifiers for specific classes of objects. 
- *  
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.identifierPolicy")
- at Scope(APPLICATION)
- at BypassInterceptors
- at Install(precedence = Install.BUILT_IN)
-public class IdentifierPolicy implements Serializable
-{
-
-   private static final long serialVersionUID = 684295244567560969L;
-
-   private Map<Class <?>,IdentifierStrategy> strategies = new ConcurrentHashMap<Class<?>,IdentifierStrategy>();
-   
-   private Set<IdentifierStrategy> registeredStrategies = new HashSet<IdentifierStrategy>();
-   
-   @Create
-   public void create()
-   {
-      if (registeredStrategies.isEmpty())
-      {
-         registeredStrategies.add(new EntityIdentifierStrategy());
-         registeredStrategies.add(new ClassIdentifierStrategy());
-      }
-   }
-   
-   public String getIdentifier(Object target)
-   {
-      if (target instanceof String)
-      {
-         return (String) target;
-      }
-      
-      IdentifierStrategy strategy = strategies.get(target.getClass());
-      
-      if (strategy == null)
-      {
-         if (target.getClass().isAnnotationPresent(Identifier.class))
-         {
-            Class<? extends IdentifierStrategy> strategyClass = 
-               target.getClass().getAnnotation(Identifier.class).value();
-            
-            if (strategyClass != IdentifierStrategy.class)
-            {
-               try
-               {
-                  strategy = strategyClass.newInstance();
-                  strategies.put(target.getClass(), strategy);
-               }
-               catch (Exception ex)
-               {
-                  throw new RuntimeException("Error instantiating IdentifierStrategy for object " + target, ex);
-               }
-            }
-         }
-
-         for (IdentifierStrategy s : registeredStrategies)
-         {
-            if (s.canIdentify(target.getClass()))
-            {
-               strategy = s;
-               strategies.put(target.getClass(), strategy);
-               break;
-            }
-         }
-      }
-      
-      return strategy != null ? strategy.getIdentifier(target) : null;
-   }
-   
-   public Set<IdentifierStrategy> getRegisteredStrategies()
-   {
-      return registeredStrategies;
-   }
-   
-   public void setRegisteredStrategies(Set<IdentifierStrategy> registeredStrategies)
-   {
-      this.registeredStrategies = registeredStrategies;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/IdentifierStrategy.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/IdentifierStrategy.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/IdentifierStrategy.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,12 +0,0 @@
-package org.jboss.seam.security.permission;
-
-/**
- * Strategy for generating permission target identifiers.
- *  
- * @author Shane Bryzak
- */
-public interface IdentifierStrategy
-{
-   boolean canIdentify(Class<?> targetClass);
-   String getIdentifier(Object target);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,823 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.security.permission.PermissionAction;
-import org.jboss.seam.annotations.security.permission.PermissionDiscriminator;
-import org.jboss.seam.annotations.security.permission.PermissionRole;
-import org.jboss.seam.annotations.security.permission.PermissionTarget;
-import org.jboss.seam.annotations.security.permission.PermissionUser;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.Role;
-import org.jboss.seam.security.SimplePrincipal;
-import org.jboss.seam.security.management.IdentityManager;
-import org.jboss.seam.security.management.IdentityStore;
-import org.jboss.seam.security.management.JpaIdentityStore;
-import org.jboss.seam.security.permission.PermissionMetadata.ActionSet;
-import org.jboss.seam.util.AnnotatedBeanProperty;
-
-/**
- * A permission store implementation that uses JPA as its persistence mechanism.
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.jpaPermissionStore")
- at Install(precedence = BUILT_IN, value=false) 
- at Scope(APPLICATION)
- at BypassInterceptors
-public class JpaPermissionStore implements PermissionStore, Serializable
-{
-   private static final LogProvider log = Logging.getLogProvider(JpaPermissionStore.class);
-   
-   private enum Discrimination { user, role, either }
-   
-   private ValueExpression<EntityManager> entityManager;
-   
-   private Class userPermissionClass;
-   private Class rolePermissionClass;
-      
-   private AnnotatedBeanProperty<PermissionUser> userProperty;
-   private AnnotatedBeanProperty<PermissionRole> roleProperty;
-   
-   private AnnotatedBeanProperty<PermissionTarget> targetProperty;
-   private AnnotatedBeanProperty<PermissionAction> actionProperty;   
-   private AnnotatedBeanProperty<PermissionDiscriminator> discriminatorProperty;
-   
-   private AnnotatedBeanProperty<PermissionTarget> roleTargetProperty;
-   private AnnotatedBeanProperty<PermissionAction> roleActionProperty;
-   
-   private Map<Integer,String> queryCache = new HashMap<Integer,String>();
-   
-   private IdentifierPolicy identifierPolicy;
-   
-   private PermissionMetadata metadata;
-
-   @Create
-   public void init()
-   {
-      metadata = new PermissionMetadata();
-      
-      // TODO see if we can scan for this automatically      
-      if (userPermissionClass == null)
-      {
-         log.debug("No permissionClass set, JpaPermissionStore will be unavailable.");
-         return;
-      }   
-      
-      if (entityManager == null)
-      {
-         entityManager = Expressions.instance().createValueExpression("#{entityManager}", 
-               EntityManager.class);
-      }       
-      
-      initProperties();
-      
-      identifierPolicy = (IdentifierPolicy) Component.getInstance(IdentifierPolicy.class, true);
-   }   
-   
-   protected void initProperties()
-   {
-      userProperty = new AnnotatedBeanProperty<PermissionUser>(userPermissionClass, PermissionUser.class);
-      targetProperty = new AnnotatedBeanProperty<PermissionTarget>(userPermissionClass, PermissionTarget.class);
-      actionProperty = new AnnotatedBeanProperty<PermissionAction>(userPermissionClass, PermissionAction.class);
-      
-      if (rolePermissionClass != null)
-      {
-         roleProperty = new AnnotatedBeanProperty<PermissionRole>(rolePermissionClass, PermissionRole.class);
-         if (roleProperty.isSet())
-         {
-            roleTargetProperty = new AnnotatedBeanProperty<PermissionTarget>(rolePermissionClass, 
-                  PermissionTarget.class);
-            roleActionProperty = new AnnotatedBeanProperty<PermissionAction>(rolePermissionClass, 
-                  PermissionAction.class);
-         }
-      }
-      else
-      {
-         roleProperty = new AnnotatedBeanProperty<PermissionRole>(userPermissionClass, PermissionRole.class);
-         if (roleProperty.isSet())
-         {
-            discriminatorProperty = new AnnotatedBeanProperty<PermissionDiscriminator>(userPermissionClass, 
-                  PermissionDiscriminator.class);
-         }
-      }
-      
-      if (!userProperty.isSet()) 
-      {
-         throw new RuntimeException("Invalid userPermissionClass " + userPermissionClass.getName() + 
-               " - required annotation @PermissionUser not found on any Field or Method.");
-      }
-
-      if (rolePermissionClass != null)
-      {
-         if (!roleProperty.isSet())
-         {
-            throw new RuntimeException("Invalid rolePermissionClass " + rolePermissionClass.getName() +
-                  " - required annotation @PermissionRole not found on any Field or Method.");
-         }
-         
-         if (!roleTargetProperty.isSet())
-         {
-            throw new RuntimeException("Invalid rolePermissionClass " + rolePermissionClass.getName() +
-                  " - required annotation @PermissionTarget not found on any Field or Method.");
-         }
-         
-         if (!roleActionProperty.isSet())
-         {
-            throw new RuntimeException("Invalid rolePermissionClass " + rolePermissionClass.getName() +
-                  " - required annotation @PermissionAction not found on any Field or Method.");
-         }
-      }
-      else if (!discriminatorProperty.isSet())
-      {
-         throw new RuntimeException("Invalid userPermissionClass " + userPermissionClass.getName() +
-               " - no rolePermissionClass set and @PermissionDiscriminator annotation not found on " +
-               "any Field or Method");
-      }
-   }   
-   
-   /**
-    * Creates a Query that returns a list of permission records for the specified parameters. 
-    * 
-    * @param target The target of the permission, may be null
-    * @param targets A set of permission targets, may be null
-    * @param recipient The permission recipient, may be null
-    * @param discrimination A discrimination (either user, role or both), required
-    * @return Query The query generated for the provided parameters
-    */
-   protected Query createPermissionQuery(Object target, Set targets, Principal recipient, Discrimination discrimination)
-   {
-      if (target != null && targets != null)
-      {
-         throw new IllegalArgumentException("Cannot specify both target and targets");
-      }
-      
-      int queryKey = (target != null) ? 1 : 0;
-      queryKey |= (targets != null) ? 2 : 0;
-      queryKey |= (recipient != null) ? 4 : 0;
-      queryKey |= (discrimination.equals(Discrimination.user) ? 8 : 0);
-      queryKey |= (discrimination.equals(Discrimination.role) ? 16 : 0);
-      queryKey |= (discrimination.equals(Discrimination.either) ? 32 : 0);
-      
-      boolean isRole = discrimination.equals(Discrimination.role);
-      boolean useRoleTable = isRole && rolePermissionClass != null; 
-      
-      if (!queryCache.containsKey(queryKey))
-      {  
-         boolean conditionsAdded = false;
-         
-         StringBuilder q = new StringBuilder();
-         q.append("select p from ");
-         q.append(useRoleTable ? rolePermissionClass.getName() : userPermissionClass.getName());
-         q.append(" p");
-         
-         if (target != null)
-         {
-            q.append(" where p.");
-            q.append(useRoleTable ? roleTargetProperty.getName() : targetProperty.getName());
-            q.append(" = :target");
-            conditionsAdded = true;
-         }
-         
-         if (targets != null)
-         {
-            q.append(" where p.");
-            q.append(useRoleTable ? roleTargetProperty.getName() : targetProperty.getName());
-            q.append(" in (:targets)");
-            conditionsAdded = true;
-         }
-         
-         if (recipient != null)
-         {
-            q.append(conditionsAdded ? " and p." : " where p.");
-            q.append(isRole ? roleProperty.getName() : userProperty.getName());
-            q.append(" = :recipient");
-            conditionsAdded = true;
-         }
-         
-         // If there is no discrimination, then don't add such a condition to the query
-         if (!discrimination.equals(Discrimination.either) && discriminatorProperty != null)
-         {
-            q.append(conditionsAdded ? " and p." : " where p.");
-            q.append(discriminatorProperty.getName());
-            q.append(" = :discriminator");
-            conditionsAdded = true;
-         }
-         
-         queryCache.put(queryKey, q.toString());
-      }
-      
-      Query query = lookupEntityManager().createQuery(queryCache.get(queryKey));
-      
-      if (target != null) query.setParameter("target", identifierPolicy.getIdentifier(target));
-      
-      if (targets != null)
-      {
-         Set<String> identifiers = new HashSet<String>();
-         for (Object t : targets)
-         {
-            identifiers.add(identifierPolicy.getIdentifier(t));
-         }
-         query.setParameter("targets", identifiers);
-      }
-      
-      
-      if (recipient != null) query.setParameter("recipient", resolvePrincipalEntity(recipient));
-      
-      if (!discrimination.equals(Discrimination.either) && discriminatorProperty != null) 
-      {
-         query.setParameter("discriminator", getDiscriminatorValue(
-               discrimination.equals(Discrimination.role)));
-      }
-      
-      return query;
-   }
-   
-   public boolean grantPermission(Permission permission)
-   {
-      return updatePermissionActions(permission.getTarget(), permission.getRecipient(), 
-            new String[] {permission.getAction()}, true);
-   }
-   
-   public boolean revokePermission(Permission permission)
-   {
-      return updatePermissionActions(permission.getTarget(), permission.getRecipient(),
-            new String[] { permission.getAction() }, false);
-   }   
-      
-   /**
-    * This is where the bulk of the actual work happens. 
-    * 
-    * @param target The target object to update permissions for
-    * @param recipient The recipient to update permissions for
-    * @param actions The actions that will be updated
-    * @param set true if the specified actions are to be granted, false if they are to be revoked
-    * @return true if the operation is successful
-    */
-   protected boolean updatePermissionActions(Object target, Principal recipient, String[] actions,
-         boolean set)
-   {
-      boolean recipientIsRole = recipient instanceof Role;
-      
-      try
-      {
-         if (recipientIsRole)
-         {
-            if (rolePermissionClass != null)
-            {
-               List permissions = createPermissionQuery(target, null, recipient, Discrimination.role).getResultList();
-
-               if (permissions.isEmpty())
-               {
-                  if (!set) return true;
-                  
-                  ActionSet actionSet = metadata.createActionSet(target.getClass(), null);
-                  for (String action : actions)
-                  {
-                     actionSet.add(action);
-                  }
-                  
-                  Object instance = rolePermissionClass.newInstance();
-                  roleTargetProperty.setValue(instance, identifierPolicy.getIdentifier(target));
-                  roleActionProperty.setValue(instance, actionSet.toString());
-                  roleProperty.setValue(instance, resolvePrincipalEntity(recipient));
-                  lookupEntityManager().persist(instance);
-                  return true;
-               }
-                              
-               Object instance = permissions.get(0);
-               
-               ActionSet actionSet = metadata.createActionSet(target.getClass(), 
-                     roleActionProperty.getValue(instance).toString());
-               
-               for (String action : actions)
-               {
-                  if (set)
-                  {
-                     actionSet.add(action);
-                  }
-                  else
-                  {
-                     actionSet.remove(action);
-                  }
-               }
-               
-               if (permissions.size() > 1)
-               {
-                  // This is where it gets a little messy.. if there is more than one permission
-                  // record, then we need to consolidate them all into just the first one
-                  for (Object p : permissions)
-                  {
-                     actionSet.addMembers(roleActionProperty.getValue(p).toString());
-                     if (!p.equals(instance))
-                     {
-                        lookupEntityManager().remove(p);
-                     }
-                  }                  
-               }
-                  
-               if (!actionSet.isEmpty())
-               {
-                  roleActionProperty.setValue(instance, actionSet.toString());
-                  lookupEntityManager().merge(instance);
-               }
-               else
-               {
-                  // No actions remaining in set, so just remove the record
-                  lookupEntityManager().remove(instance);
-               }
-               
-               return true;
-            }
-            
-            if (!discriminatorProperty.isSet())
-            {
-               throw new RuntimeException("Could not grant permission, rolePermissionClass not set");   
-            }
-         }
-         
-         if (userPermissionClass == null)
-         {
-            throw new RuntimeException("Could not grant permission, userPermissionClass not set");
-         }
-                         
-         List permissions = createPermissionQuery(target, null, recipient, recipientIsRole ? 
-               Discrimination.role : Discrimination.user).getResultList();
-
-         if (permissions.isEmpty())
-         {
-            if (!set) return true;
-            
-            ActionSet actionSet = metadata.createActionSet(target.getClass(), null);
-            for (String action : actions)
-            {
-               actionSet.add(action);
-            }
-            
-            Object instance = userPermissionClass.newInstance();
-            targetProperty.setValue(instance, identifierPolicy.getIdentifier(target));
-            actionProperty.setValue(instance, actionSet.toString());
-            
-            if (recipientIsRole)
-            {
-               roleProperty.setValue(instance, resolvePrincipalEntity(recipient));
-            }
-            else
-            {
-               userProperty.setValue(instance, resolvePrincipalEntity(recipient));
-            }
-                       
-            if (discriminatorProperty.isSet())
-            {
-               PermissionDiscriminator discriminator = discriminatorProperty.getAnnotation();
-               discriminatorProperty.setValue(instance, recipientIsRole ? discriminator.roleValue() :
-                  discriminator.userValue());
-            }
-            
-            lookupEntityManager().persist(instance);
-            return true;
-         }
-                        
-         Object instance = permissions.get(0);
-         
-         ActionSet actionSet = metadata.createActionSet(target.getClass(), 
-               actionProperty.getValue(instance).toString());
-         
-         for (String action : actions)
-         {
-            if (set)
-            {
-               actionSet.add(action);
-            }
-            else
-            {
-               actionSet.remove(action);
-            }
-         }
-         
-         if (permissions.size() > 1)
-         {
-            // Same as with roles, consolidate the records if there is more than one
-            for (Object p : permissions)
-            {
-               actionSet.addMembers(actionProperty.getValue(p).toString());
-               if (!p.equals(instance))
-               {
-                  lookupEntityManager().remove(p);
-               }
-            }                  
-         }
-            
-         if (!actionSet.isEmpty())
-         {
-            actionProperty.setValue(instance, actionSet.toString());
-            lookupEntityManager().merge(instance);
-         }
-         else
-         {
-            // No actions remaining in set, so just remove the record
-            lookupEntityManager().remove(instance);
-         }
-         
-         return true;                  
-      }
-      catch (Exception ex)
-      {
-         throw new RuntimeException("Could not grant permission", ex);
-      }    
-   }
-   
-   public boolean grantPermissions(List<Permission> permissions)
-   {
-      // Target/Recipient/Action map
-      Map<Object,Map<Principal,List<Permission>>> groupedPermissions = groupPermissions(permissions);
-      
-      for (Object target : groupedPermissions.keySet())
-      {
-         Map<Principal,List<Permission>> recipientPermissions = groupedPermissions.get(target);
-                  
-         for (Principal recipient : recipientPermissions.keySet())
-         {
-            List<Permission> ps = recipientPermissions.get(recipient);
-            String[] actions = new String[ps.size()];
-            for (int i = 0; i < ps.size(); i++) actions[i] = ps.get(i).getAction();
-            updatePermissionActions(target, recipient, actions, true);
-         }
-      }
-      
-      return true;
-   }
-   
-   public boolean revokePermissions(List<Permission> permissions)
-   {
-      // Target/Recipient/Action map
-      Map<Object,Map<Principal,List<Permission>>> groupedPermissions = groupPermissions(permissions);
-      
-      for (Object target : groupedPermissions.keySet())
-      {
-         Map<Principal,List<Permission>> recipientPermissions = groupedPermissions.get(target);
-                  
-         for (Principal recipient : recipientPermissions.keySet())
-         {
-            List<Permission> ps = recipientPermissions.get(recipient);
-            String[] actions = new String[ps.size()];
-            for (int i = 0; i < ps.size(); i++) actions[i] = ps.get(i).getAction();
-            updatePermissionActions(target, recipient, actions, false);
-         }
-      }
-      
-      return true;
-   }  
-   
-   /**
-    * Groups a list of arbitrary permissions into a more easily-consumed structure
-    * 
-    * @param permissions The list of permissions to group
-    * @return 
-    */
-   private Map<Object,Map<Principal,List<Permission>>> groupPermissions(List<Permission> permissions)
-   {
-      // Target/Recipient/Action map
-      Map<Object,Map<Principal,List<Permission>>> groupedPermissions = new HashMap<Object,Map<Principal,List<Permission>>>();
-      
-      for (Permission permission : permissions)
-      {
-         if (!groupedPermissions.containsKey(permission.getTarget()))
-         {
-            groupedPermissions.put(permission.getTarget(), new HashMap<Principal,List<Permission>>());
-         }
-         
-         Map<Principal,List<Permission>> recipientPermissions = groupedPermissions.get(permission.getTarget());
-         if (!recipientPermissions.containsKey(permission.getRecipient()))
-         {
-            List<Permission> perms = new ArrayList<Permission>();
-            perms.add(permission);
-            recipientPermissions.put(permission.getRecipient(), perms);
-         }
-         else
-         {
-            recipientPermissions.get(permission.getRecipient()).add(permission);
-         }
-      }
-
-      return groupedPermissions;
-   }
-   
-   private String getDiscriminatorValue(boolean isRole)
-   {
-      PermissionDiscriminator discriminator = discriminatorProperty.getAnnotation();
-      return isRole ? discriminator.roleValue() : discriminator.userValue();      
-   }
-
-   /**
-    * If the user or role properties in the entity class refer to other entities, then this method
-    * uses the JpaIdentityStore (if available) to lookup that user or role entity.  Otherwise it
-    * simply returns the name of the recipient. 
-    * 
-    * @param recipient
-    * @return The entity or name representing the permission recipient
-    */
-   protected Object resolvePrincipalEntity(Principal recipient)
-   {
-      boolean recipientIsRole = recipient instanceof Role;
-         
-      JpaIdentityStore identityStore = (JpaIdentityStore) Component.getInstance(JpaIdentityStore.class, true);
-      
-      if (identityStore != null)
-      {
-         if (recipientIsRole && roleProperty.isSet() && roleProperty.getPropertyType().equals(identityStore.getRoleClass()))
-         {
-            return identityStore.lookupRole(recipient.getName());
-         }
-         else if (userProperty.getPropertyType().equals(identityStore.getUserClass()))
-         {
-            return identityStore.lookupUser(recipient.getName());
-         }
-      }      
-      
-      return recipient.getName();
-   }
-   
-   protected Principal resolvePrincipal(Object principal, boolean isUser)
-   {
-      IdentityStore ids = IdentityManager.instance().getRoleIdentityStore();
-      JpaIdentityStore identityStore = null;
-      
-      if (ids instanceof JpaIdentityStore) identityStore = (JpaIdentityStore) ids;
-      
-      if (principal instanceof String)
-      {        
-         return isUser ? new SimplePrincipal((String) principal) : new Role((String) principal, 
-               identityStore == null ? false : identityStore.isRoleConditional((String) principal));
-      }      
-      
-      if (identityStore != null)
-      {
-         if (isUser && identityStore.getUserClass().isAssignableFrom(principal.getClass()))
-         {
-            return new SimplePrincipal(identityStore.getUserName(principal));
-         }
-         
-         if (!isUser && identityStore.getRoleClass().isAssignableFrom(principal.getClass()))
-         {
-            String name = identityStore.getRoleName(principal);
-            return new Role(name, identityStore.isRoleConditional(name));
-         }
-      }
-      
-      throw new IllegalArgumentException("Cannot resolve principal name for principal " + principal); 
-   }
-
-   /**
-    * Returns a list of all user and role permissions for the specified action for all specified target objects
-    */
-   public List<Permission> listPermissions(Set<Object> targets, String action)
-   {
-      // TODO limit the number of targets passed at a single time to 25
-      return listPermissions(null, targets, action);
-   }
-   
-   /**
-    * Returns a list of all user and role permissions for a specific permission target and action.
-    */
-   public List<Permission> listPermissions(Object target, String action) 
-   {
-      return listPermissions(target, null, action);
-   }
-   
-   protected List<Permission> listPermissions(Object target, Set<Object> targets, String action)
-   {
-      if (target != null && targets != null)
-      {
-         throw new IllegalArgumentException("Cannot specify both target and targets");
-      }
-      
-      List<Permission> permissions = new ArrayList<Permission>();
-      
-      if (targets != null && targets.isEmpty()) return permissions;
-      
-      // First query for user permissions
-      Query permissionQuery = targets != null ?
-            createPermissionQuery(null, targets, null, Discrimination.either) :
-            createPermissionQuery(target, null, null, Discrimination.either);
-            
-      List userPermissions = permissionQuery.getResultList();
-      
-      Map<String,Principal> principalCache = new HashMap<String,Principal>();
-      
-      boolean useDiscriminator = rolePermissionClass == null && discriminatorProperty.isSet();
-      
-      Map<String,Object> identifierCache = null;
-      
-      if (targets != null)
-      {
-         identifierCache = new HashMap<String,Object>();
-         
-         for (Object t : targets)
-         {
-            identifierCache.put(identifierPolicy.getIdentifier(t), t);
-         }
-      }
-      
-      for (Object permission : userPermissions)
-      {
-         ActionSet actionSet = null;
-         
-         if (targets != null)
-         {            
-            target = identifierCache.get(targetProperty.getValue(permission));
-            if (target != null)
-            {
-               actionSet = metadata.createActionSet(target.getClass(), 
-                  actionProperty.getValue(permission).toString());
-            }
-         }
-         else
-         {
-            actionSet = metadata.createActionSet(target.getClass(),
-                  actionProperty.getValue(permission).toString()); 
-         }
-         
-         if (target != null && (action == null || (actionSet != null && actionSet.contains(action))))
-         {         
-            boolean isUser = true;
-            
-            if (useDiscriminator && 
-               discriminatorProperty.getAnnotation().roleValue().equals(
-                     discriminatorProperty.getValue(permission)))
-            {
-               isUser = false;
-            }
-
-            Principal principal = lookupPrincipal(principalCache, permission, isUser);
-            
-            if (action != null)
-            {
-               permissions.add(new Permission(target, action, principal));
-            }
-            else
-            {            
-               for (String a : actionSet.members())
-               {
-                  permissions.add(new Permission(target, a, principal));
-               }
-            }
-         }
-      }
-      
-      // If we have a separate class for role permissions, then query them now
-      if (rolePermissionClass != null)
-      {
-         permissionQuery = targets != null ?
-               createPermissionQuery(null, targets, null, Discrimination.role) :
-               createPermissionQuery(target, null, null, Discrimination.role);        
-         List rolePermissions = permissionQuery.getResultList();
-         
-         for (Object permission : rolePermissions)
-         {            
-            ActionSet actionSet = null;
-            
-            if (targets != null)
-            {            
-               target = identifierCache.get(roleTargetProperty.getValue(permission));
-               if (target != null)
-               {
-                  actionSet = metadata.createActionSet(target.getClass(), 
-                     roleActionProperty.getValue(permission).toString());
-               }
-            }
-            else
-            {
-               actionSet = metadata.createActionSet(target.getClass(),
-                     roleActionProperty.getValue(permission).toString()); 
-            }            
-                       
-            if (target != null && (action == null || (actionSet != null && actionSet.contains(action))))
-            {            
-               Principal principal = lookupPrincipal(principalCache, permission, false);
-               
-               if (action != null)
-               {
-                  permissions.add(new Permission(target, action, principal));
-               }
-               else
-               {            
-                  for (String a : actionSet.members())
-                  {
-                     permissions.add(new Permission(target, a, principal));
-                  }
-               }               
-            }
-         }
-      }
-      
-      return permissions;
-   }
-   
-   private Principal lookupPrincipal(Map<String,Principal> cache, Object permission, boolean isUser)
-   {
-      Principal principal = resolvePrincipal(isUser ? userProperty.getValue(permission) :
-         roleProperty.getValue(permission), isUser);
-      
-      String key = (isUser ? "u:" : "r:") + principal.getName();
-      
-      if (!cache.containsKey(key))
-      {
-         cache.put(key, principal);
-      }
-      else
-      {
-         principal = cache.get(key);
-      }      
-      
-      return principal;
-   }
-
-   public List<Permission> listPermissions(Object target) 
-   {
-      return listPermissions(target, null);
-   }
-   
-   public List<String> listAvailableActions(Object target)
-   {
-      return metadata.listAllowableActions(target.getClass());
-   }
-
-   private EntityManager lookupEntityManager()
-   {
-      return entityManager.getValue();
-   }
-   
-   public ValueExpression getEntityManager()
-   {
-      return entityManager;
-   }
-   
-   public void setEntityManager(ValueExpression expression)
-   {
-      this.entityManager = expression;
-   } 
-   
-   public Class getUserPermissionClass()
-   {
-      return userPermissionClass;
-   }
-   
-   public void setUserPermissionClass(Class userPermissionClass)
-   {
-      this.userPermissionClass = userPermissionClass;
-   }
-   
-   public Class getRolePermissionClass()
-   {
-      return rolePermissionClass;
-   }
-   
-   public void setRolePermissionClass(Class rolePermissionClass)
-   {
-      this.rolePermissionClass = rolePermissionClass;
-   }
-   
-   public void clearPermissions(Object target)
-   {
-      EntityManager em = lookupEntityManager();
-      String identifier = identifierPolicy.getIdentifier(target);
-      
-      em.createQuery(
-            "delete from " + userPermissionClass.getName() + " p where p." +
-            targetProperty.getName() + " = :target")
-            .setParameter("target", identifier)
-            .executeUpdate();
-      
-      if (rolePermissionClass != null)
-      {
-         em.createQuery(
-               "delete from " + rolePermissionClass.getName() + " p where p." +
-               roleTargetProperty.getName() + " = :target")
-               .setParameter("target", identifier)
-               .executeUpdate();
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/Permission.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/Permission.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/Permission.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,38 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import java.io.Serializable;
-import java.security.Principal;
-
-/**
- * Represents a single permission for a particular target, action and recipient combination.
- *  
- * @author Shane Bryzak
- */
-public class Permission implements Serializable
-{
-   private Object target;
-   private String action;
-   private Principal recipient;
-   
-   public Permission(Object target, String action, Principal recipient)
-   {
-      this.target = target;
-      this.action = action;
-      this.recipient = recipient;
-   }
-   
-   public Object getTarget()
-   {
-      return target;
-   }
-   
-   public String getAction()
-   {
-      return action;
-   }
-   
-   public Principal getRecipient()
-   {
-      return recipient;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionCheck.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionCheck.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionCheck.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,86 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Used to assert permission requirements into a WorkingMemory when evaluating
- * a @Restrict expression.  The consequence of the rule is responsible for
- * granting the permission.
- *
- * @author Shane Bryzak
- */
-public class PermissionCheck
-{
-   private Object target;
-
-   @Deprecated
-   private String name;
-
-   private String action;
-   private boolean granted;
-   private Set<String> requirements;
-   
-   public PermissionCheck(Object target, String action)
-   {
-      if (target instanceof String)
-      {
-         this.name = (String) target;
-      }
-      
-      this.target = target;
-      this.action = action;
-      granted = false;
-   }
-   
-   public Object getTarget()
-   {
-      return target;
-   }   
-
-   @Deprecated
-   public String getName() 
-   {
-      return name;
-   }
-
-   public String getAction() 
-   {
-      return action;
-   }
-   
-   public void require(String requirement)
-   {
-      if (requirements == null)
-      {
-         requirements = new HashSet<String>();
-      }
-      
-      requirements.add(requirement);
-   }
-
-   public void grant() 
-   {
-      this.granted = true;
-   }
-
-   public void revoke() 
-   {
-      this.granted = false;
-   }
-
-   public boolean isGranted() 
-   {
-      return granted;
-   }
-   
-   public boolean hasRequirements()
-   {
-      return requirements != null && requirements.size() > 0;
-   }
-   
-   public Set<String> getRequirements()
-   {
-      return requirements;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionManager.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionManager.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionManager.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,142 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.Identity;
-
-/**
- * Permission management component, used to grant or revoke permissions on specific objects or of
- * specific permission types to particular users or roles.
- * 
- * @author Shane Bryzak
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.security.permissionManager")
- at Install(precedence = BUILT_IN)
-public class PermissionManager implements Serializable
-{
-   public static final String PERMISSION_STORE_COMPONENT_NAME = "org.jboss.seam.security.jpaPermissionStore";
-   
-   public static final String PERMISSION_PERMISSION_NAME = "seam.permission";
-   
-   public static final String PERMISSION_READ = "seam.read-permissions";
-   public static final String PERMISSION_GRANT = "seam.grant-permission";
-   public static final String PERMISSION_REVOKE = "seam.revoke-permission";   
-   
-   private static final LogProvider log = Logging.getLogProvider(PermissionManager.class);
-   
-   private PermissionStore permissionStore;
-   
-   @Create
-   public void create()
-   {
-      if (permissionStore == null)
-      {
-         permissionStore = (PermissionStore) Component.getInstance(PERMISSION_STORE_COMPONENT_NAME, true);
-      }         
-      
-      if (permissionStore == null)
-      {
-         log.warn("no permission store available - please install a PermissionStore with the name '" +
-               PERMISSION_STORE_COMPONENT_NAME + "' if permission management is required.");
-      }
-   } 
-   
-   public static PermissionManager instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application context");
-      }
-
-      PermissionManager instance = (PermissionManager) Component.getInstance(
-            PermissionManager.class, ScopeType.APPLICATION);
-
-      if (instance == null)
-      {
-         throw new IllegalStateException("No PermissionManager could be created");
-      }
-
-      return instance;
-   }
-   
-   public PermissionStore getPermissionStore()
-   {
-      return permissionStore;
-   }
-   
-   public void setPermissionStore(PermissionStore permissionStore)
-   {
-      this.permissionStore = permissionStore;
-   }
-   
-   public List<Permission> listPermissions(Object target, String action)
-   {
-      if (target == null) return null;      
-      Identity.instance().checkPermission(target, PERMISSION_READ);
-      return permissionStore.listPermissions(target, action);
-   }
-   
-   public List<Permission> listPermissions(Object target)
-   {
-      if (target == null) return null;
-      Identity.instance().checkPermission(target, PERMISSION_READ);
-      return permissionStore.listPermissions(target);
-   }
-   
-   public boolean grantPermission(Permission permission)
-   {
-      Identity.instance().checkPermission(permission.getTarget(), PERMISSION_GRANT);
-      return permissionStore.grantPermission(permission);
-   }
-   
-   public boolean grantPermissions(List<Permission> permissions)
-   {
-      for (Permission permission : permissions)
-      {
-         Identity.instance().checkPermission(permission.getTarget(), PERMISSION_GRANT);
-      }
-      return permissionStore.grantPermissions(permissions);
-   }
-   
-   public boolean revokePermission(Permission permission)
-   {
-      Identity.instance().checkPermission(permission.getTarget(), PERMISSION_REVOKE);
-      return permissionStore.revokePermission(permission);
-   }
-   
-   public boolean revokePermissions(List<Permission> permissions)
-   {
-      for (Permission permission : permissions)
-      {
-         Identity.instance().checkPermission(permission.getTarget(), PERMISSION_REVOKE);
-      }
-      return permissionStore.revokePermissions(permissions);
-   }
-   
-   public List<String> listAvailableActions(Object target)
-   {
-      return permissionStore.listAvailableActions(target);
-   }
-   
-   public void clearPermissions(Object target)
-   {
-      if (permissionStore != null)
-      {
-         permissionStore.clearPermissions(target);
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionMapper.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionMapper.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionMapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,189 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Init;
-
-/**
- * Maps permission checks to resolver chains
- * 
- * @author Shane Bryzak
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.security.permissionMapper")
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
- at Startup
-public class PermissionMapper implements Serializable
-{
-   public static final String DEFAULT_RESOLVER_CHAIN_CREATED = "org.jboss.seam.security.defaultResolverChainCreated";
-   
-   private Map<Class,Map<String,String>> resolverChains = new HashMap<Class,Map<String,String>>();
-   
-   private String defaultResolverChain;
-   
-   private static final String DEFAULT_RESOLVER_CHAIN = "org.jboss.seam.security.defaultResolverChain";
-   
-   private ResolverChain getResolverChain(Object target, String action)
-   {
-      Class targetClass = null;
-      
-      if (target instanceof Class)
-      {
-         targetClass = (Class) target;
-      }
-      else
-      {
-         // TODO target may be a component name, or an object, or a view name (or arbitrary name) -
-         // we need to deal with all of these possibilities
-      }
-      
-      if (targetClass != null)
-      {
-         Map<String,String> chains = resolverChains.get(target);
-         if (chains != null && chains.containsKey(action))
-         {
-            return (ResolverChain) Component.getInstance(chains.get(action), true);
-         }
-      }      
-      
-      if (defaultResolverChain != null && !"".equals(defaultResolverChain))
-      {
-         return (ResolverChain) Component.getInstance(defaultResolverChain, true);   
-      }
-      
-      return createDefaultResolverChain();
-   }   
-   
-   public boolean resolvePermission(Object target, String action)
-   {
-      ResolverChain chain = getResolverChain(target, action);
-      for (PermissionResolver resolver : chain.getResolvers())
-      {
-         if (resolver.hasPermission(target, action))
-         {
-            return true;
-         }
-      }
-      
-      return false;
-   }   
-   
-   public void filterByPermission(Collection collection, String action)
-   {
-      boolean homogenous = true;
-      
-      Class targetClass = null;
-      for (Object target : collection)
-      {
-         if (targetClass == null) targetClass = target.getClass();
-         if (!targetClass.equals(target.getClass()))
-         {
-            homogenous = false;
-            break;
-         }
-      }
-           
-      if (homogenous)
-      {
-         Set<Object> denied = new HashSet<Object>(collection);   
-         ResolverChain chain = getResolverChain(targetClass, action);
-         for (PermissionResolver resolver : chain.getResolvers())
-         {
-            resolver.filterSetByAction(denied, action);
-         }
-         
-         for (Object target : denied)
-         {
-            collection.remove(target);
-         }     
-      }
-      else
-      {
-         Map<Class,Set<Object>> deniedByClass = new HashMap<Class,Set<Object>>();
-         for (Object obj : collection)
-         {
-            if (!deniedByClass.containsKey(obj.getClass()))
-            {
-               Set<Object> denied = new HashSet<Object>();
-               denied.add(obj);
-               deniedByClass.put(obj.getClass(), denied);
-            }
-            else
-            {
-               deniedByClass.get(obj.getClass()).add(obj);
-            }
-         }
-         
-         for (Class cls : deniedByClass.keySet())
-         {
-            Set<Object> denied = deniedByClass.get(cls);
-            ResolverChain chain = getResolverChain(cls, action);
-            for (PermissionResolver resolver : chain.getResolvers())
-            {
-               resolver.filterSetByAction(denied, action);
-            }
-            
-            for (Object target : denied)
-            {
-               collection.remove(target);
-            }
-         }
-      }
-   }
-   
-   private ResolverChain createDefaultResolverChain()
-   {
-      ResolverChain chain = (ResolverChain) Contexts.getSessionContext().get(DEFAULT_RESOLVER_CHAIN);
-      
-      if (chain == null)
-      {
-         chain = new ResolverChain();
-         
-         for (String resolverName : Init.instance().getPermissionResolvers())
-         {
-            chain.getResolvers().add((PermissionResolver) Component.getInstance(resolverName, true)); 
-         }
-         
-         Contexts.getSessionContext().set(DEFAULT_RESOLVER_CHAIN, chain);
-         if (Events.exists()) Events.instance().raiseEvent(DEFAULT_RESOLVER_CHAIN_CREATED, chain);
-      }
-      
-      return chain;
-   }
-
-   public static PermissionMapper instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application context");
-      }
-   
-      PermissionMapper instance = (PermissionMapper) Component.getInstance(
-            PermissionMapper.class, ScopeType.APPLICATION);
-   
-      if (instance == null)
-      {
-         throw new IllegalStateException("No PermissionMapper could be created");
-      }
-   
-      return instance;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionMetadata.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionMetadata.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionMetadata.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,203 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.seam.annotations.security.permission.Permissions;
-
-/**
- * Permission actions can either be persisted as a comma-separated list of values, or as a
- * bit-masked numerical value where certain bits represent specific actions for that class. This
- * is a helper class that handles the conversion automatically and presents a unified API for 
- * dealing with these persistent actions.  
- *  
- * @author Shane Bryzak
- */
-public class PermissionMetadata implements Serializable
-{
-   private static final long serialVersionUID = 7407543457388705950L;
-   private Map<Class<?>,Boolean> usesActionMask = new HashMap<Class<?>,Boolean>();
-   private Map<Class<?>,Map<String,Long>> classActions = new HashMap<Class<?>,Map<String,Long>>();
-   
-   private synchronized void initClassActions(Class<?> cls)
-   {
-      if (!classActions.containsKey(cls))
-      {
-         Map<String,Long> actions = new HashMap<String,Long>();
-         
-         boolean useMask = false;
-         
-         Permissions p = (Permissions) cls.getAnnotation(Permissions.class);
-         if (p != null)
-         {
-            org.jboss.seam.annotations.security.permission.Permission[] permissions = p.value();
-            if (permissions != null)
-            {
-               for (org.jboss.seam.annotations.security.permission.Permission permission : permissions)
-               {
-                  actions.put(permission.action(), permission.mask());
-                  
-                  if (permission.mask() != 0)
-                  {
-                     useMask = true;
-                  }
-               }
-            }            
-         }
-         
-         // Validate that all actions have a proper mask
-         if (useMask)
-         {
-            Set<Long> masks = new HashSet<Long>();
-            
-            for (String action : actions.keySet())
-            {
-               Long mask = actions.get(action);
-               if (masks.contains(mask))
-               {
-                  throw new IllegalArgumentException("Class " + cls.getName() + 
-                        " defines a duplicate mask for permission action [" + action + "]");
-               }
-                              
-               if (mask == 0)
-               {
-                  throw new IllegalArgumentException("Class " + cls.getName() +
-                        " must define a valid mask value for action [" + action + "]");
-               }
-               
-               if ((mask & (mask - 1)) != 0)
-               {
-                  throw new IllegalArgumentException("Class " + cls.getName() +
-                        " must define a mask value that is a power of 2 for action [" + action + "]");
-               }
-               
-               masks.add(mask);               
-            }
-         }
-
-         usesActionMask.put(cls, useMask);
-         classActions.put(cls, actions);
-      }
-   }
-   
-   protected class ActionSet
-   {
-      private Set<String> members = new HashSet<String>();
-      private Class<?> targetClass;
-      
-      public ActionSet(Class<?> targetClass, String members)
-      {
-         this.targetClass = targetClass;
-         addMembers(members);
-      }
-      
-      public void addMembers(String members)
-      {
-         if (members == null) return;
-         
-         if (usesActionMask.get(targetClass))
-         {
-            // bit mask-based actions
-            long vals = Long.valueOf(members);
-            
-            Map<String,Long> actions = classActions.get(targetClass);
-            for (String action : actions.keySet())
-            {
-               long mask = actions.get(action).longValue();
-               if ((vals & mask) != 0)
-               {
-                  this.members.add(action);
-               }
-            }            
-         }
-         else
-         {
-            // comma-separated string based actions
-            String[] actions = members.split(",");
-            for (String action : actions)
-            {
-               this.members.add(action);
-            }
-         }         
-      }
-      
-      public boolean contains(String action)
-      {
-         return members.contains(action);
-      }
-      
-      public ActionSet add(String action)
-      {
-         members.add(action);
-         return this;
-      }
-      
-      public ActionSet remove(String action)
-      {
-         members.remove(action);
-         return this;
-      }
-      
-      public Set<String> members()
-      {
-         return members;
-      }
-      
-      public boolean isEmpty()
-      {
-         return members.isEmpty();
-      }
-      
-      @Override
-      public String toString()
-      {        
-         if (usesActionMask.get(targetClass))
-         {
-            Map<String,Long> actions = classActions.get(targetClass);
-            long mask = 0;
-            
-            for (String member : members)
-            {
-               mask |= actions.get(member).longValue();
-            }
-            
-            return "" + mask;
-         }
-         else
-         {
-            StringBuilder sb = new StringBuilder();
-            for (String member : members)
-            {
-               if (sb.length() > 0) sb.append(',');
-               sb.append(member);
-            }
-            return sb.toString();            
-         }
-      }
-   }
-   
-   public ActionSet createActionSet(Class<?> targetClass, String members)
-   {      
-      if (!classActions.containsKey(targetClass)) initClassActions(targetClass);
-      
-      return new ActionSet(targetClass, members);
-   }
-   
-   public List<String> listAllowableActions(Class<?> targetClass)
-   {
-      if (!classActions.containsKey(targetClass)) initClassActions(targetClass);
-      
-      List<String> actions = new ArrayList<String>();
-      for (String action : classActions.get(targetClass).keySet())
-      {
-         actions.add(action);
-      }
-      
-      return actions;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionResolver.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionResolver.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionResolver.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,14 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import java.util.Set;
-
-/**
- * Implementations of this interface perform permission checks using a variety of methods.
- *  
- * @author Shane Bryzak
- */
-public interface PermissionResolver
-{
-   boolean hasPermission(Object target, String action);
-   void filterSetByAction(Set<Object> targets, String action);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionStore.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionStore.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PermissionStore.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * Permission store interface.
- * 
- * @author Shane Bryzak
- */
-public interface PermissionStore
-{
-   List<Permission> listPermissions(Object target);
-   List<Permission> listPermissions(Object target, String action);
-   List<Permission> listPermissions(Set<Object> targets, String action);
-   boolean grantPermission(Permission permission);
-   boolean grantPermissions(List<Permission> permissions);
-   boolean revokePermission(Permission permission);
-   boolean revokePermissions(List<Permission> permissions);
-   List<String> listAvailableActions(Object target);
-   void clearPermissions(Object target);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,161 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.Role;
-import org.jboss.seam.security.SimplePrincipal;
-
-/**
- * Resolves dynamically-assigned permissions, mapped to a user or a role, and kept in persistent 
- * storage, such as a relational database.
- * 
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.persistentPermissionResolver")
- at Scope(APPLICATION)
- at BypassInterceptors
- at Install(precedence=BUILT_IN)
- at Startup
-public class PersistentPermissionResolver implements PermissionResolver, Serializable
-{      
-   private PermissionStore permissionStore;
-   
-   private static final LogProvider log = Logging.getLogProvider(PersistentPermissionResolver.class);   
-   
-   @Create
-   public void create()
-   {
-      initPermissionStore();
-   }
-   
-   protected void initPermissionStore()
-   {
-      if (permissionStore == null)
-      {
-         permissionStore = (PermissionStore) Component.getInstance(JpaPermissionStore.class, true);
-      }           
-      
-      if (permissionStore == null)
-      {
-         log.warn("no permission store available - please install a PermissionStore with the name '" +
-               Seam.getComponentName(JpaPermissionStore.class) + "' if persistent permissions are required.");
-      }
-   }     
-   
-   public PermissionStore getPermissionStore()
-   {
-      return permissionStore;
-   }
-   
-   public void setPermissionStore(PermissionStore permissionStore)
-   {
-      this.permissionStore = permissionStore;
-   }
-   
-   public boolean hasPermission(Object target, String action)
-   {      
-      if (permissionStore == null) return false;
-      
-      Identity identity = Identity.instance();
-      
-      if (!identity.isLoggedIn()) return false;      
-      
-      List<Permission> permissions = permissionStore.listPermissions(target, action);
-      
-      String username = identity.getPrincipal() != null ? identity.getPrincipal().getName() : null;
-      
-      for (Permission permission : permissions)
-      {
-         if (username != null && permission.getRecipient() instanceof SimplePrincipal &&
-               username.equals(permission.getRecipient().getName()))
-         {
-            return true;
-         }
-         
-         if (permission.getRecipient() instanceof Role)
-         {
-            Role role = (Role) permission.getRecipient();
-            
-            if (role.isConditional())
-            {
-               RuleBasedPermissionResolver resolver = RuleBasedPermissionResolver.instance();
-               if (resolver.checkConditionalRole(role.getName(), target, action)) return true;               
-            }
-            else if (identity.hasRole(role.getName()))
-            {
-               return true;
-            }
-         }
-      }      
-      
-      return false;
-   }
-   
-   public void filterSetByAction(Set<Object> targets, String action)
-   {
-      if (permissionStore == null) return;
-      
-      Identity identity = Identity.instance();
-      if (!identity.isLoggedIn()) return;
-      
-      List<Permission> permissions = permissionStore.listPermissions(targets, action);
-      
-      String username = identity.getPrincipal().getName();
-      
-      Iterator iter = targets.iterator();
-      while (iter.hasNext())
-      {
-         Object target = iter.next();
-         
-         for (Permission permission : permissions)
-         {
-            if (permission.getTarget().equals(target))
-            {
-               if (permission.getRecipient() instanceof SimplePrincipal &&
-                     username.equals(permission.getRecipient().getName()))
-               {
-                  iter.remove();
-                  break;
-               }
-               
-               if (permission.getRecipient() instanceof Role)
-               {
-                  Role role = (Role) permission.getRecipient();
-                  
-                  if (role.isConditional())
-                  {
-                     RuleBasedPermissionResolver resolver = RuleBasedPermissionResolver.instance();
-                     if (resolver.checkConditionalRole(role.getName(), target, action))
-                     {
-                        iter.remove();
-                        break;
-                     }
-                  }
-                  else if (identity.hasRole(role.getName()))
-                  {
-                     iter.remove();
-                     break;
-                  }
-               }               
-            }
-         }
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/ResolverChain.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/ResolverChain.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/ResolverChain.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,33 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import static org.jboss.seam.ScopeType.SESSION;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * A chain of permission resolvers.  Specific permission checks are generally mapped to a 
- * particular ResolverChain for resolution. 
- * 
- * @author Shane Bryzak
- */
- at Scope(SESSION)
- at BypassInterceptors
-public class ResolverChain implements Serializable
-{
-   private List<PermissionResolver> resolvers = new ArrayList<PermissionResolver>();
-   
-   public List<PermissionResolver> getResolvers()
-   {
-      return resolvers;
-   }
-   
-   public void setResolvers(List<PermissionResolver> resolvers)
-   {
-      this.resolvers = resolvers;
-   }   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/RoleCheck.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/RoleCheck.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/RoleCheck.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,39 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import java.io.Serializable;
-
-/**
- * Used when performing rule-based conditional role checks
- * 
- * @author Shane Bryzak
- */
-public class RoleCheck implements Serializable
-{
-   private String name;
-   private boolean granted;
-   
-   public RoleCheck(String name)
-   {
-      this.name = name;
-   }
-   
-   public boolean isGranted()
-   {
-      return granted;
-   }
-   
-   public void grant()
-   {
-      this.granted = true;
-   }
-   
-   public void revoke()
-   {
-      this.granted = false;
-   }
-   
-   public String getName()
-   {
-      return name;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,329 +0,0 @@
-package org.jboss.seam.security.permission;
-
-import static org.jboss.seam.ScopeType.SESSION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.security.Principal;
-import java.security.acl.Group;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.drools.FactHandle;
-import org.drools.RuleBase;
-import org.drools.StatefulSession;
-import org.drools.ClassObjectFilter;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.drools.SeamGlobalResolver;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.Role;
-import org.jboss.seam.security.management.JpaIdentityStore;
-
-/**
- * A permission resolver that uses a Drools rule base to perform permission checks
- *  
- * @author Shane Bryzak
- */
- at Name("org.jboss.seam.security.ruleBasedPermissionResolver")
- at Scope(SESSION)
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="org.drools.WorkingMemory")
- at Startup
-public class RuleBasedPermissionResolver implements PermissionResolver, Serializable
-{      
-   public static final String RULES_COMPONENT_NAME = "securityRules";   
-   
-   private static final LogProvider log = Logging.getLogProvider(RuleBasedPermissionResolver.class);
-   
-   private StatefulSession securityContext;
-   
-   private RuleBase securityRules;  
-   
-   @Create
-   public boolean create()
-   {
-      initSecurityContext();
-      return getSecurityContext() != null;
-   }
-   
-   protected void initSecurityContext()
-   {
-      if (getSecurityRules() == null)
-      {
-         setSecurityRules((RuleBase) Component.getInstance(RULES_COMPONENT_NAME, true));
-      }
-      
-      if (getSecurityRules() != null)
-      {
-         setSecurityContext(getSecurityRules().newStatefulSession(false));
-         getSecurityContext().setGlobalResolver(new SeamGlobalResolver(getSecurityContext().getGlobalResolver()));
-      }
-      
-      if (getSecurityContext() == null)
-      {
-         log.debug("no security rule base available - please install a RuleBase with the name '" +
-                  RULES_COMPONENT_NAME + "' if permission checks are required.");
-      }
-   }
-   
-   /**
-    * Performs a permission check for the specified name and action
-    * 
-    * @param target Object The target of the permission check
-    * @param action String The action to be performed on the target
-    * @return boolean True if the user has the specified permission
-    */
-   public boolean hasPermission(Object target, String action)
-   {           
-      StatefulSession securityContext = getSecurityContext();
-      
-      if (securityContext == null) return false;      
-      
-      List<FactHandle> handles = new ArrayList<FactHandle>();  
-
-      PermissionCheck check;
-      
-      synchronized( securityContext )
-      {
-         if (!(target instanceof String) && !(target instanceof Class))
-         {
-            handles.add( securityContext.insert(target) );
-         }
-         else if (target instanceof Class)
-         {
-            String componentName = Seam.getComponentName((Class) target);
-            target = componentName != null ? componentName : ((Class) target).getName();
-         }
-         
-         check = new PermissionCheck(target, action);         
-         
-         try
-         {
-            synchronizeContext();
-            
-            handles.add( securityContext.insert(check) );
-   
-            securityContext.fireAllRules();
-         }
-         finally
-         {
-            for (FactHandle handle : handles)
-            {
-               securityContext.retract(handle);
-            }
-         }
-      }
-      
-      return check.isGranted();
-   }
-   
-   public void filterSetByAction(Set<Object> targets, String action)
-   {
-      Iterator iter = targets.iterator();
-      while (iter.hasNext())
-      {
-         Object target = iter.next();
-         if (hasPermission(target, action)) iter.remove();
-      }
-   }
-   
-   public boolean checkConditionalRole(String roleName, Object target, String action)
-   {      
-      StatefulSession securityContext = getSecurityContext();
-      if (securityContext == null) return false;
-      
-      RoleCheck roleCheck = new RoleCheck(roleName);
-      
-      List<FactHandle> handles = new ArrayList<FactHandle>();
-      PermissionCheck check = new PermissionCheck(target, action);
-      
-      synchronized( securityContext )
-      {
-         if (!(target instanceof String) && !(target instanceof Class))
-         {
-            handles.add( securityContext.insert(target) );
-         }
-         else if (target instanceof Class)
-         {
-            String componentName = Seam.getComponentName((Class) target);
-            target = componentName != null ? componentName : ((Class) target).getName();
-         }
-         
-         try
-         {
-            handles.add( securityContext.insert(check));
-            
-            // Check if there are any additional requirements
-            securityContext.fireAllRules();
-            if (check.hasRequirements())
-            {
-               for (String requirement : check.getRequirements())
-               {
-                  Object value = Contexts.lookupInStatefulContexts(requirement);
-                  if (value != null)
-                  {
-                     handles.add (securityContext.insert(value));
-                  }
-               }               
-            }
-            
-            synchronizeContext();
-
-            handles.add( securityContext.insert(roleCheck));
-            handles.add( securityContext.insert(check));
-            
-            securityContext.fireAllRules();
-         }
-         finally
-         {
-            for (FactHandle handle : handles)
-            {
-               securityContext.retract(handle);
-            }
-         }
-      }
-      
-      return roleCheck.isGranted();
-   }
-   
-   @SuppressWarnings("unchecked")  
-   @Observer(Identity.EVENT_LOGGED_OUT)
-   public void unAuthenticate()
-   {
-      if (getSecurityContext() != null)
-      {
-         getSecurityContext().dispose();      
-         setSecurityContext(null);
-      }
-      initSecurityContext();
-   }
-   
-   /**
-    *  Synchronises the state of the security context with that of the subject
-    */
-   private void synchronizeContext()
-   {
-      Identity identity = Identity.instance();
-      
-      if (getSecurityContext() != null)
-      {
-         getSecurityContext().insert(identity.getPrincipal());
-         
-         for ( Group sg : identity.getSubject().getPrincipals(Group.class) )      
-         {
-            if ( Identity.ROLES_GROUP.equals( sg.getName() ) )
-            {
-               Enumeration e = sg.members();
-               while (e.hasMoreElements())
-               {
-                  Principal role = (Principal) e.nextElement();
-   
-                  boolean found = false;
-                  Iterator<Role> iter = (Iterator<Role>) getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class)); 
-                  while (iter.hasNext()) 
-                  {
-                     Role r = iter.next();
-                     if (r.getName().equals(role.getName()))
-                     {
-                        found = true;
-                        break;
-                     }
-                  }
-                  
-                  if (!found)
-                  {
-                     getSecurityContext().insert(new Role(role.getName()));
-                  }
-                  
-               }
-            }
-         }    
-         
-         Iterator<Role> iter = (Iterator<Role>) getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class)); 
-         while (iter.hasNext()) 
-         {
-            Role r = iter.next();
-            if (!identity.hasRole(r.getName()))
-            {
-               FactHandle fh = getSecurityContext().getFactHandle(r);
-               getSecurityContext().retract(fh);
-            }
-         }
-      }
-   }
-   
-   
-   public StatefulSession getSecurityContext()
-   {
-      return securityContext;
-   }
-   
-   public void setSecurityContext(StatefulSession securityContext)
-   {
-      this.securityContext = securityContext;
-   }
-   
-
-   public RuleBase getSecurityRules()
-   {
-      return securityRules;
-   }
-
-   public void setSecurityRules(RuleBase securityRules)
-   {
-      this.securityRules = securityRules;
-   }       
-   
-   public static RuleBasedPermissionResolver instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-
-      RuleBasedPermissionResolver instance = (RuleBasedPermissionResolver) Component.getInstance(
-            RuleBasedPermissionResolver.class, ScopeType.SESSION);
-
-      if (instance == null)
-      {
-         throw new IllegalStateException("No RuleBasedPermissionResolver could be created");
-      }
-
-      return instance;
-   }
-   
-   /**
-    * Post-authentication event observer
-    */
-   @Observer(Identity.EVENT_POST_AUTHENTICATE)
-   public void setUserAccountInSecurityContext()
-   {
-      if (getSecurityContext() != null)
-      {         
-         getSecurityContext().insert(Identity.instance().getPrincipal());
-
-         // If we were authenticated with the JpaIdentityStore, then insert the authenticated
-         // UserAccount into the security context.         
-         if (Contexts.isEventContextActive() && Contexts.isSessionContextActive() &&
-               Contexts.getEventContext().isSet(JpaIdentityStore.AUTHENTICATED_USER))
-         {
-            getSecurityContext().insert(Contexts.getEventContext().get(JpaIdentityStore.AUTHENTICATED_USER));
-         }
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/action/PermissionSearch.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/action/PermissionSearch.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/action/PermissionSearch.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,107 +0,0 @@
-package org.jboss.seam.security.permission.action;
-
-import static org.jboss.seam.ScopeType.CONVERSATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.datamodel.DataModel;
-import org.jboss.seam.annotations.datamodel.DataModelSelection;
-import org.jboss.seam.security.management.IdentityManager;
-import org.jboss.seam.security.permission.Permission;
-import org.jboss.seam.security.permission.PermissionManager;
-
- at Scope(CONVERSATION)
- at Name("org.jboss.seam.security.permission.permissionSearch")
- at Install(precedence = BUILT_IN)
-public class PermissionSearch implements Serializable
-{
-   private Map<Principal,List<Permission>> groupedPermissions = new HashMap<Principal,List<Permission>>();
-   
-   @DataModel
-   List<Principal> recipients;
-   
-   @DataModelSelection
-   Principal selectedRecipient;
-   
-   @In IdentityManager identityManager;
-   
-   @In PermissionManager permissionManager;
-   
-   private Object target;
-   
-   @Begin
-   public void search(Object target)
-   {
-      this.target = target;      
-   }
-   
-   public void refresh()
-   {
-      List<Permission> permissions = permissionManager.listPermissions(target);      
-      groupedPermissions.clear();
-      
-      for (Permission permission : permissions)
-      {
-         List<Permission> recipientPermissions = null;
-         
-         if (!groupedPermissions.containsKey(permission.getRecipient()))
-         {
-            recipientPermissions = new ArrayList<Permission>();
-            groupedPermissions.put(permission.getRecipient(), recipientPermissions);
-         }
-         else
-         {
-            recipientPermissions = groupedPermissions.get(permission.getRecipient());
-         }
-         
-         recipientPermissions.add(permission);         
-      }
-      
-      recipients = new ArrayList<Principal>(groupedPermissions.keySet());
-   }
-   
-   public String getActions(Principal recipient)
-   {
-      StringBuilder sb = new StringBuilder();
-      
-      for (Permission permission : groupedPermissions.get(recipient))
-      {
-         if (sb.length() > 0) sb.append(", ");
-         sb.append(permission.getAction());
-      }
-      
-      return sb.toString();
-   }
-   
-   public Object getTarget()
-   {
-      return target;
-   }
-   
-   public void revokeSelected()
-   {
-      permissionManager.revokePermissions(getSelectedPermissions());
-      refresh();
-   }
-   
-   public Principal getSelectedRecipient()
-   {
-      return selectedRecipient;
-   }
-   
-   public List<Permission> getSelectedPermissions()
-   {
-      return groupedPermissions.get(selectedRecipient);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/security/permission/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,11 +0,0 @@
-/**
- * Seam Security Permissions
- * 
- * @see org.jboss.seam.security.permission.PermissionManager
- */
- at Namespace(value="http://jboss.com/products/seam/security", prefix="org.jboss.seam.security")
- at AutoCreate
-package org.jboss.seam.security.permission;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ContextualHttpServletRequest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ContextualHttpServletRequest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ContextualHttpServletRequest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,175 +0,0 @@
-package org.jboss.seam.servlet;
-
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.core.ConversationPropagation;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.web.ServletContexts;
-
-/**
- * Perform work in a full set of Seam contexts
- * 
- * @author Gavin King
- * @author Marek Novotny
- *
- */
-public abstract class ContextualHttpServletRequest
-{
-   private static final LogProvider log = Logging.getLogProvider(ContextualHttpServletRequest.class);
-
-   private final HttpServletRequest request;
-   
-   private static ThreadLocal<AtomicInteger> count = new ThreadLocal<AtomicInteger>();
-     
-   public ContextualHttpServletRequest(HttpServletRequest request)
-   {
-      this.request = request;      
-   }
-   
-   public abstract void process() throws Exception;
-   
-   public void run() throws ServletException, IOException
-   {      
-      log.debug("beginning request"); 
-           
-      // Force creation of the session
-      if (request.getSession(false) == null)
-      {
-         request.getSession(true);
-      }
-      
-      // Begin request and Seam life cycle only if it is not nested
-      // ContextualHttpServletRequest
-      if (getCounterValue() == 0)
-      {         
-         ServletLifecycle.beginRequest(request);
-         ServletContexts.instance().setRequest(request);         
-         restoreConversationId();
-         Manager.instance().restoreConversation();
-         ServletLifecycle.resumeConversation(request);
-         handleConversationPropagation();
-      }
-      
-      try
-      {
-         incrementCounterValue();
-         
-         process();                 
-
-         decrementCounterValue();
-         
-         // End request only if it is not nested ContextualHttpServletRequest
-         if (getCounterValue() == 0)
-         {
-            //TODO: conversation timeout
-            Manager.instance().endRequest( new ServletRequestSessionMap(request)  );
-            ServletLifecycle.endRequest(request);
-         }
-      }
-      catch (IOException ioe)
-      {
-         removeCounter();
-         Lifecycle.endRequest();
-         log.debug("ended request due to exception");
-         throw ioe;
-      }
-      catch (ServletException se)
-      {
-         removeCounter();
-         Lifecycle.endRequest();
-         log.debug("ended request due to exception");
-         throw se;
-      }
-      catch (Exception e)
-      {
-         removeCounter();
-         Lifecycle.endRequest();
-         log.debug("ended request due to exception");
-         throw new ServletException(e);
-      }
-      finally
-      {
-         log.debug("ended request");
-      }
-   }
-
-   protected void handleConversationPropagation()
-   {
-      Manager.instance().handleConversationPropagation( request.getParameterMap() );
-   }
-
-   protected void restoreConversationId()
-   {
-      ConversationPropagation.instance().restoreConversationId( request.getParameterMap() );
-   }
-   
-   /*
-    * Getter for ThreadLocal counter value
-    */
-   private int getCounterValue()
-   {
-      AtomicInteger i = count.get();
-      if (i == null || i.intValue() < 0)
-      {
-         log.trace("Getting 0" );
-         return 0;
-      }
-      else
-      {
-         log.trace("Getting " + i.intValue());
-         return i.intValue();
-      }
-   }
-   
-   /*
-    * Increments ThreadLocal counter value 
-    */
-   private void incrementCounterValue()
-   {
-      AtomicInteger i = count.get();
-      if (i == null || i.intValue() < 0)
-      {
-         i = new AtomicInteger(0);
-         count.set(i);
-      }
-      i.incrementAndGet();
-      log.trace("Incrementing to " + count.get());
-   }
-   
-   /*
-    *  Decrements ThreadLocal counter value
-    */
-   private void decrementCounterValue()
-   {
-      AtomicInteger i = count.get();
-      if (i == null)
-      {
-         log.trace("OOps, something removed counter befor end of request!");
-         // we should never get here...
-         throw new IllegalStateException("Counter for nested ContextualHttpServletRequest was removed before it should be!");
-      }
-      if (i.intValue() > 0)
-      {
-         i.decrementAndGet();
-         log.trace("Decrementing to " + count.get());
-      }
-   }
-   
-   /*
-    * Removes ThreadLocal counter
-    */
-   private void removeCounter() 
-   {
-      log.trace("Removing ThreadLocal counter");
-      count.remove();
-   } 
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ResourceServlet.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ResourceServlet.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ResourceServlet.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,10 +0,0 @@
-package org.jboss.seam.servlet;
-
-/**
- * @author Shane Bryzak
- * @deprecated use SeamResourceServlet
- */
-public class ResourceServlet extends SeamResourceServlet
-{
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamCharacterEncodingFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamCharacterEncodingFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamCharacterEncodingFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,29 +0,0 @@
-package org.jboss.seam.servlet;
-
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-
-import org.jboss.seam.web.CharacterEncodingFilter;
-
-/**
- * A servlet filter that lets you set the character encoding of 
- * submitted data. There are two init parameters: "encoding" and
- * "overrideClient".
- * 
- * @deprecated use CharacterEncodingFilter
- * @author Gavin King
- * 
- */
-public class SeamCharacterEncodingFilter extends CharacterEncodingFilter
-{
-   
-   @Override
-   public void init(FilterConfig config) throws ServletException 
-   {
-      super.init(config);
-      setEncoding( config.getInitParameter("encoding") );
-      setOverrideClient( Boolean.parseBoolean( config.getInitParameter("overrideClient") ) );
-   }
-   
-
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamExceptionFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamExceptionFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamExceptionFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.servlet;
-
-import org.jboss.seam.web.ExceptionFilter;
-
-/**
- * As a last line of defence, rollback uncommitted transactions 
- * at the very end of the request.
- * 
- * @deprecated use ExceptionFilter
- * @author Gavin King
- */
-public class SeamExceptionFilter extends ExceptionFilter
-{
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,185 +0,0 @@
-package org.jboss.seam.servlet;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.SortItem;
-import org.jboss.seam.util.Sorter;
-import org.jboss.seam.web.AbstractFilter;
-
-/**
- * A servlet filter that orchestrates the stack of Seam
- * component filters, and controls ordering. Filter
- * ordering is specified via the @Filter annotation.
- * Filters may optionally extend AbstractFilter.
- * 
- * @see org.jboss.seam.annotations.web.Filter
- * @see AbstractFilter
- * 
- * @author Shane Bryzak
- * @author Pete Muir
- *
- */
-public class SeamFilter implements Filter
-{
-   private static final LogProvider log = Logging.getLogProvider(SeamFilter.class);   
-   
-   private List<Filter> filters;
-   
-   private class FilterChainImpl implements FilterChain
-   {  
-      private FilterChain chain;
-      private int index;
-           
-      private FilterChainImpl(FilterChain chain)
-      {
-         this.chain = chain;
-         index = -1;
-      }
-      
-      public void doFilter(ServletRequest request, ServletResponse response)
-          throws IOException, ServletException
-      {
-         if ( ++index < filters.size() )
-         {
-            Filter filter = filters.get(index);
-            
-            if (filter instanceof AbstractFilter)
-            {
-               AbstractFilter bf = (AbstractFilter) filter;
-               if ( bf.isMappedToCurrentRequestPath(request) )
-               {
-                  filter.doFilter(request, response, this);
-               }
-               else
-               {
-                  this.doFilter(request, response);
-               }
-            }            
-            else
-            {
-               filter.doFilter(request, response, this);
-            }
-         }
-         else
-         {
-            chain.doFilter(request, response);
-         }
-      }
-   }
-
-   public void init(FilterConfig filterConfig) throws ServletException 
-   {
-      Lifecycle.setupApplication(new ServletApplicationMap(filterConfig.getServletContext()));
-      try
-      {
-         filters = getSortedFilters();
-         for ( Filter filter : filters )
-         {
-            log.info( "Initializing filter: " + Component.getComponentName(filter.getClass()));
-            filter.init(filterConfig);
-         }
-      }
-      finally
-      {
-         Lifecycle.cleanupApplication();
-      }
-   }
-
-   private List<Filter> getSortedFilters()
-   {
-      //retrieve the Filter instances from the application context
-      Map<String, SortItem<Filter>> sortItemsMap = new HashMap<String, SortItem<Filter>>();
-      List<SortItem<Filter>> sortItems = new ArrayList<SortItem<Filter>>();
-      
-      for (String filterName : Init.instance().getInstalledFilters())
-      {
-         Filter filter = (Filter) Component.getInstance(filterName, ScopeType.APPLICATION);
-         boolean disabled = false;
-         if (filter instanceof AbstractFilter)
-         {
-             disabled = ((AbstractFilter) filter).isDisabled();
-         }
-         if (!disabled)
-         {
-             SortItem<Filter> si = new SortItem<Filter>(filter);         
-             sortItemsMap.put(filterName, si);
-             sortItems.add(si);
-         }
-      }
-
-      //create sort items
-      for (SortItem<Filter> sortItem : sortItems)
-      {
-         org.jboss.seam.annotations.web.Filter filterAnn = getFilterAnnotation(sortItem.getObj().getClass());
-         if ( filterAnn != null )
-         {
-            for (String s : Arrays.asList( filterAnn.around() ) )
-            {
-               SortItem<Filter> aroundSortItem = sortItemsMap.get(s);
-               if (sortItem!=null && aroundSortItem != null) sortItem.getAround().add( aroundSortItem );
-            }
-            for (String s : Arrays.asList( filterAnn.within() ) )
-            {
-               SortItem<Filter> withinSortItem = sortItemsMap.get(s);
-               if (sortItem!=null && withinSortItem != null) sortItem.getWithin().add( withinSortItem );
-            }
-         }
-      }
-
-      // Do the sort
-      Sorter<Filter> sList = new Sorter<Filter>();
-      sortItems = sList.sort(sortItems);
-      List<Filter> sorted = new ArrayList<Filter>();
-      for (SortItem<Filter> si: sortItems) sorted.add( si.getObj() );
-      return sorted;
-   }
-   
-   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
-       throws IOException, ServletException
-   {
-      new FilterChainImpl(chain).doFilter(request, response);
-   }
-   
-   public void destroy() 
-   {
-      for (Filter filter: filters)
-      {
-         filter.destroy();
-      }
-   }
-   
-   private org.jboss.seam.annotations.web.Filter getFilterAnnotation(Class<?> clazz)
-   {
-      while (!Object.class.equals(clazz))
-      {
-         if (clazz.isAnnotationPresent(org.jboss.seam.annotations.web.Filter.class))
-         {
-            return clazz.getAnnotation(org.jboss.seam.annotations.web.Filter.class);
-         }
-         else
-         {
-            clazz = clazz.getSuperclass();
-         }
-      }
-      return null;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamListener.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamListener.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamListener.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.servlet;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.init.Initialization;
-import org.jboss.seam.jmx.JBossClusterMonitor;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Drives certain Seam functionality such as initialization and cleanup
- * of application and session contexts from the web application lifecycle.
- * 
- * @author Gavin King
- */
-public class SeamListener implements ServletContextListener, HttpSessionListener
-{
-   private static final LogProvider log = Logging.getLogProvider(ServletContextListener.class);
-   
-   public void contextInitialized(ServletContextEvent event) 
-   {
-      log.info( "Welcome to Seam " + Seam.getVersion() );
-      event.getServletContext().setAttribute( Seam.VERSION, Seam.getVersion() );
-      ServletLifecycle.beginApplication( event.getServletContext() );
-      new Initialization( event.getServletContext() ).create().init();
-   }
-   
-   public void contextDestroyed(ServletContextEvent event) 
-   {
-      ServletLifecycle.endApplication(event.getServletContext());
-   }
-   
-   public void sessionCreated(HttpSessionEvent event) 
-   {
-      ServletLifecycle.beginSession( event.getSession() );
-   }
-   
-   public void sessionDestroyed(HttpSessionEvent event) 
-   {
-      JBossClusterMonitor monitor = JBossClusterMonitor.getInstance(event.getSession().getServletContext());
-      if (monitor != null && monitor.failover())
-      {
-         // If application is unfarmed or all nodes shutdown simultaneously, cluster cache may still fail to retrieve SFSBs to destroy
-         log.debug("Detected fail-over, not destroying session context");
-      }
-      else
-      {
-         ServletLifecycle.endSession( event.getSession() );
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamRedirectFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamRedirectFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamRedirectFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,14 +0,0 @@
-package org.jboss.seam.servlet;
-
-import org.jboss.seam.web.RedirectFilter;
-
-/**
- * Propagates the conversation context across a browser redirect
- * 
- * @deprecated use RedirectFilter
- * @author Gavin King
- */
-public class SeamRedirectFilter extends RedirectFilter 
-{
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamResourceServlet.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamResourceServlet.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamResourceServlet.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,93 +0,0 @@
-package org.jboss.seam.servlet;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.web.AbstractResource;
-
-/**
- * Routes all types of HTTP requests to implementors of AbstractResource.
- * <p>
- * This servlet is optional in a Seam application but required for certain features, such as
- * <tt>&lt;s:graphicImage/&gt;</tt>, RichFaces resources, and REST integration. It is typically
- * mapped in <tt>web.xml</tt> with the <tt>/seam/resource</tt> URL pattern.
- * </p>
- * 
- * @author Shane Bryzak
- */
-public class SeamResourceServlet extends HttpServlet
-{  
-   private ServletContext context;
-
-   private Map<String, AbstractResource> providers = new HashMap<String, AbstractResource>();
-
-   @Override
-   public void init(ServletConfig config) throws ServletException
-   {
-      super.init(config);
-      context = config.getServletContext();
-      loadResourceProviders();
-   }
-
-   protected void loadResourceProviders()
-   {
-      try
-      {
-         Lifecycle.setupApplication(new ServletApplicationMap(context));
-
-         for (String name : Init.instance().getResourceProviders())
-         {         
-            AbstractResource provider = (AbstractResource) Component.getInstance(name, true);
-            if (provider != null)
-            {
-               provider.setServletContext(context);
-               providers.put( provider.getResourcePath(), provider );
-            }
-         }
-      }
-      finally
-      {
-         Lifecycle.cleanupApplication();
-      }
-   }
-
-   @Override
-   public void service(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException
-   {
-      String prefix = request.getContextPath() + request.getServletPath();
-
-      if (request.getRequestURI().startsWith(prefix))
-      {
-         String path = request.getRequestURI().replaceFirst(prefix, "");
-         int index = path.indexOf('/', 1);
-         if (index != -1) path = path.substring(0, index);
-
-         AbstractResource provider = providers.get(path);
-         if (provider != null)
-         {
-            provider.getResource(request, response);            
-         }
-         else
-         {
-            response.sendError(HttpServletResponse.SC_NOT_FOUND);
-         }
-      }
-      else
-      {
-         response.sendError(HttpServletResponse.SC_NOT_FOUND);
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamServletFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamServletFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/SeamServletFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,14 +0,0 @@
-package org.jboss.seam.servlet;
-
-import org.jboss.seam.web.ContextFilter;
-
-/**
- * Manages the Seam contexts associated with a request to any servlet.
- * 
- * @deprecated use ContextFilter
- * @author Gavin King
- */
-public class SeamServletFilter extends ContextFilter 
-{
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletApplicationMap.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletApplicationMap.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletApplicationMap.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.servlet;
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.ServletContext;
-
-/**
- * Abstracts the servlet API specific application context
- * as a Map.
- * 
- * @author Gavin King
- */
-public class ServletApplicationMap implements Map<String, Object>
-{
-   private ServletContext servletContext;
-
-   public ServletApplicationMap(ServletContext servletContext)
-   {
-      this.servletContext = servletContext;
-   }
-
-   public void clear()
-   {
-      throw new UnsupportedOperationException(); 
-   }
-
-   public boolean containsKey(Object key)
-   {
-      return servletContext.getAttribute( (String) key )!=null;
-   }
-
-   public boolean containsValue(Object value)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Set<java.util.Map.Entry<String, Object>> entrySet()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object get(Object key)
-   {
-      return servletContext.getAttribute( (String) key );
-   }
-
-   public boolean isEmpty()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Set<String> keySet()
-   {
-      Set<String> keys = new HashSet<String>();
-      Enumeration<String> names = servletContext.getAttributeNames();
-      while ( names.hasMoreElements() )
-      {
-         keys.add( names.nextElement() );
-      }
-      return keys;
-   }
-
-   public Object put(String key, Object value)
-   {
-      Object result = servletContext.getAttribute(key);
-      servletContext.setAttribute(key, value);
-      return result;
-   }
-
-   public void putAll(Map<? extends String, ? extends Object> t)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object remove(Object key)
-   {
-      Object result = servletContext.getAttribute( (String) key );
-      servletContext.removeAttribute( (String) key );
-      return result;
-   }
-
-   public int size()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Collection<Object> values()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletRequestMap.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletRequestMap.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletRequestMap.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.servlet;
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.ServletRequest;
-
-/**
- * Abstracts the servlet API specific request context
- * as a Map.
- * 
- * @author Gavin King
- */
-public class ServletRequestMap implements Map<String, Object>
-{
-   
-   private ServletRequest request;
-
-   public ServletRequestMap(ServletRequest request)
-   {
-      this.request = request;
-   }
-
-   public void clear()
-   {
-      throw new UnsupportedOperationException(); 
-   }
-
-   public boolean containsKey(Object key)
-   {
-      return request.getAttribute( (String) key )!=null;
-   }
-
-   public boolean containsValue(Object value)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Set<java.util.Map.Entry<String, Object>> entrySet()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object get(Object key)
-   {
-      return request.getAttribute( (String) key );
-   }
-
-   public boolean isEmpty()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Set<String> keySet()
-   {
-      Set<String> keys = new HashSet<String>();
-      Enumeration<String> names = request.getAttributeNames();
-      while ( names.hasMoreElements() )
-      {
-         keys.add( names.nextElement() );
-      }
-      return keys;
-   }
-
-   public Object put(String key, Object value)
-   {
-      Object result = request.getAttribute(key);
-      request.setAttribute(key, value);
-      return result;
-   }
-
-   public void putAll(Map<? extends String, ? extends Object> t)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object remove(Object key)
-   {
-      Object result = request.getAttribute( (String) key );
-      request.removeAttribute( (String) key );
-      return result;
-   }
-
-   public int size()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Collection<Object> values()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletRequestSessionMap.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletRequestSessionMap.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletRequestSessionMap.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.servlet;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-/**
- * Abstracts the servlet API specific session context
- * as a Map. Actual sessions are created lazily.
- * 
- * @author Gavin King
- */
-public class ServletRequestSessionMap implements Map<String, Object>
-{
-   private HttpServletRequest request;
-
-   public ServletRequestSessionMap(HttpServletRequest request)
-   {
-      this.request = request;
-   }
-
-   public void clear()
-   {
-      throw new UnsupportedOperationException(); 
-   }
-
-   public boolean containsKey(Object key)
-   {
-      HttpSession session = request.getSession(false);
-      return session==null ? false : session.getAttribute( (String) key )!=null;
-   }
-
-   public boolean containsValue(Object value)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Set<java.util.Map.Entry<String, Object>> entrySet()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object get(Object key)
-   {
-      HttpSession session = request.getSession(false);
-      return session==null ? null : session.getAttribute( (String) key );
-   }
-
-   public boolean isEmpty()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Set<String> keySet()
-   {
-      HttpSession session = request.getSession(false);
-      if (session==null)
-      {
-         return Collections.EMPTY_SET;
-      }
-      else
-      {
-         Set<String> keys = new HashSet<String>();
-         Enumeration<String> names = session.getAttributeNames();
-         while ( names.hasMoreElements() )
-         {
-            keys.add( names.nextElement() );
-         }
-         return keys;
-      }
-   }
-
-   public Object put(String key, Object value)
-   {
-      HttpSession session = request.getSession(true);
-      Object result = session.getAttribute(key);
-      session.setAttribute(key, value);
-      return result;
-   }
-
-   public void putAll(Map<? extends String, ? extends Object> t)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object remove(Object key)
-   {
-      HttpSession session = request.getSession(false);
-      if (session==null)
-      {
-         return null;
-      }
-      else
-      {
-         Object result = session.getAttribute( (String) key );
-         session.removeAttribute( (String) key );
-         return result;
-      }
-   }
-
-   public int size()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Collection<Object> values()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletSessionMap.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletSessionMap.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/ServletSessionMap.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.servlet;
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpSession;
-
-/**
- * Abstracts the servlet API specific application context
- * as a Map.
- * 
- * @author Gavin King
- */
-public class ServletSessionMap implements Map<String, Object>
-{
-   private HttpSession session;
-
-   public ServletSessionMap(HttpSession session)
-   {
-      this.session = session;
-   }
-
-   public void clear()
-   {
-      throw new UnsupportedOperationException(); 
-   }
-
-   public boolean containsKey(Object key)
-   {
-      return session.getAttribute( (String) key )!=null;
-   }
-
-   public boolean containsValue(Object value)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Set<java.util.Map.Entry<String, Object>> entrySet()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object get(Object key)
-   {
-      return session.getAttribute( (String) key );
-   }
-
-   public boolean isEmpty()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Set<String> keySet()
-   {
-      Set<String> keys = new HashSet<String>();
-      Enumeration<String> names = session.getAttributeNames();
-      while ( names.hasMoreElements() )
-      {
-         keys.add( names.nextElement() );
-      }
-      return keys;
-   }
-
-   public Object put(String key, Object value)
-   {
-      Object result = session.getAttribute(key);
-      session.setAttribute(key, value);
-      return result;
-   }
-
-   public void putAll(Map<? extends String, ? extends Object> t)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Object remove(Object key)
-   {
-      Object result = session.getAttribute( (String) key );
-      session.removeAttribute( (String) key );
-      return result;
-   }
-
-   public int size()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public Collection<Object> values()
-   {
-      throw new UnsupportedOperationException();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/servlet/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,4 +0,0 @@
-/**
- * Integration with the servlet API.
- */
-package org.jboss.seam.servlet;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/Theme.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/Theme.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/Theme.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,103 +0,0 @@
-package org.jboss.seam.theme;
-
-import static org.jboss.seam.ScopeType.EVENT;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.*;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.Interpolator;
-
-/**
- * Factory for a Map of resources that may be used for skinning the user
- * interface.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at BypassInterceptors
- at Name("org.jboss.seam.theme.themeFactory")
- at Install(precedence = BUILT_IN)
-public class Theme {
-
-    protected Map<String, String> createMap() {
-        final java.util.ResourceBundle bundle = ThemeSelector.instance().getThemeResourceBundle();
-
-        if (bundle == null) {
-            return null;
-        }
-
-        return new AbstractMap<String, String>() {
-            @Override
-            public String get(Object key) {
-                if (key instanceof String) {
-                    String resourceKey = (String) key;
-
-                    String resource;
-                    try {
-                        resource = bundle.getString(resourceKey);
-                    } catch (MissingResourceException mre) {
-                        return resourceKey;
-                    }
-                    if (resource == null) {
-                        return resourceKey;
-                    } else {
-                        return Interpolator.instance().interpolate(resource);
-                    }
-                } else {
-                    return null;
-                }
-            }
-
-            @Override
-            public Set<Map.Entry<String, String>> entrySet() {
-                Set<Map.Entry<String, String>> entrySet = new HashSet<Map.Entry<String, String>>();
-                
-                Enumeration<String> keys = bundle.getKeys();
-
-                while (keys.hasMoreElements()) {                
-                    final String key = keys.nextElement();
-                    
-                    entrySet.add(new Map.Entry<String, String>() {
-                        
-                        public String getKey() {
-                            return key;
-                        }
-
-                        public String getValue() {
-                            return get(key);
-                        }
-
-                        public String setValue(String arg0) {
-                            throw new UnsupportedOperationException("not implemented");
-                        }
-                    });
-                }
-                   
-                return entrySet;
-            }
-
-        };
-
-    }
-
-    /**
-     * Create a Map in the event scope. When the theme is changed, ThemeSelector
-     * is responsible for removing the Map from the event context.
-     * 
-     */
-    @Factory(value = "org.jboss.seam.theme.theme", autoCreate = true, scope = EVENT)
-    public java.util.Map getTheme() {
-        return createMap();
-    }
-
-    public static java.util.Map instance() {
-        return (java.util.Map) Component.getInstance("org.jboss.seam.theme.theme", true);
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/ThemeSelector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/ThemeSelector.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/ThemeSelector.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,203 +0,0 @@
-package org.jboss.seam.theme;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.event.ValueChangeEvent;
-import javax.faces.model.SelectItem;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.faces.Selector;
-import org.jboss.seam.core.Locale;
-import org.jboss.seam.international.Messages;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.util.IteratorEnumeration;
-
-/**
- * Selects the current user's theme
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.SESSION)
- at Name("org.jboss.seam.theme.themeSelector")
- at BypassInterceptors
- at Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
-public class ThemeSelector extends Selector
-{
-   private static final long serialVersionUID = 3920407140011388341L;
-
-   private static final LogProvider log = Logging.getLogProvider(ThemeSelector.class);
-   
-   private String theme;
-   private String[] availableThemes;
-   
-   @Create
-   public void initDefaultTheme()
-   {
-      String themeName = getCookieValueIfEnabled();
-      if ( themeName!=null && Arrays.asList(availableThemes).contains(themeName) ) 
-      {
-         setTheme(themeName);
-      }
-      
-      if (theme==null)
-      {
-         if (availableThemes==null || availableThemes.length==0)
-         {
-            throw new IllegalStateException("no themes defined");
-         }
-         theme = availableThemes[0];
-      }
-   }
-   
-   @Override
-   protected String getCookieName()
-   {
-      return "org.jboss.seam.core.Theme";
-   }
-   
-   /**
-    * Recreate the JSF view, using the new theme, and raise the 
-    * org.jboss.seam.themeSelected event
-    *
-    */
-   public void select()
-   {
-      Contexts.removeFromAllContexts("org.jboss.seam.theme.theme");
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      String viewId = Pages.getViewId(facesContext);
-      UIViewRoot viewRoot = facesContext.getApplication().getViewHandler().createView(facesContext, viewId);
-      facesContext.setViewRoot(viewRoot);
-      
-      setCookieValueIfEnabled( getTheme() );
-
-      if ( Events.exists() ) 
-      {
-          Events.instance().raiseEvent( "org.jboss.seam.themeSelected", getTheme() );
-      }
-   }
-
-   public void select(ValueChangeEvent event) 
-   {
-      selectTheme( (String) event.getNewValue() );
-   }
-   
-   public void selectTheme(String themeName)
-   {
-      setTheme(themeName);
-      select();
-   }
-   
-   /**
-    * Get a selectable list of available themes for display in the UI
-    */
-   public List<SelectItem> getThemes()
-   {
-      List<SelectItem> selectItems = new ArrayList<SelectItem>(availableThemes.length);
-      for ( String name: availableThemes )
-      {
-         selectItems.add( new SelectItem( name, getLocalizedThemeName(name) ) );
-      }
-      return selectItems;
-   }
-
-   /**
-    * Get the name of the current theme
-    */
-   public String getTheme()
-   {
-      return theme;
-   }
-
-   public void setTheme(String themeName)
-   {
-      setDirty(this.theme, themeName);
-      this.theme = themeName;
-   }
-
-   public void setAvailableThemes(String[] themeNames)
-   {
-      setDirty(this.availableThemes, themeNames);
-      this.availableThemes = themeNames;
-   }
-   
-   /**
-    * Get the resource bundle for the theme
-    */
-   public ResourceBundle getThemeResourceBundle()
-   {
-      try
-      {
-         java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle( 
-               theme, 
-               Locale.instance(), 
-               Thread.currentThread().getContextClassLoader() 
-            );
-         log.trace("loaded resource bundle: " + theme);
-         return bundle;
-      }
-      catch (MissingResourceException mre)
-      {
-         log.debug("resource bundle missing: " + theme);
-         return new ResourceBundle()
-         {
-            @Override
-            public Enumeration<String> getKeys()
-            {
-               return new IteratorEnumeration( Collections.EMPTY_LIST.iterator() );
-            }
-            @Override
-            protected Object handleGetObject(String key)
-            {
-               return null;
-            }
-         };
-      }
-   }
-
-   /**
-    * Get the localized name of the named theme, by looking for
-    * org.jboss.seam.theme.&lt;name&gt; in the Seam resource
-    * bundle
-    */
-   public String getLocalizedThemeName(String name) 
-   {
-       String key = "org.jboss.seam.theme." + name;
-       String localizedName = Messages.instance().get(key);
-       return key.equals(localizedName) ? name : localizedName;
-   }
-   
-   public static ThemeSelector instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-      return (ThemeSelector) Component.getInstance(ThemeSelector.class, ScopeType.SESSION);
-   }
-
-   public String[] getAvailableThemes()
-   {
-      return availableThemes;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/theme/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,10 +0,0 @@
-/**
- * Support for themes in JSF applications.
- * You know you want it.
- */
- at Namespace(value="http://jboss.com/products/seam/theme", prefix="org.jboss.seam.theme")
- at AutoCreate
-package org.jboss.seam.theme;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/AbstractUserTransaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/AbstractUserTransaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/AbstractUserTransaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,82 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static javax.transaction.Status.STATUS_ACTIVE;
-import static javax.transaction.Status.STATUS_MARKED_ROLLBACK;
-import static javax.transaction.Status.STATUS_ROLLEDBACK;
-import static javax.transaction.Status.STATUS_COMMITTED;
-import static javax.transaction.Status.STATUS_NO_TRANSACTION;
-
-import javax.persistence.EntityManager;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-
-/**
- * Base implementation of UserTransaction
- * 
- * @author Gavin King
- * 
- */
-public abstract class AbstractUserTransaction implements UserTransaction
-{
-   
-   public boolean isActive() throws SystemException
-   {
-      return getStatus() == STATUS_ACTIVE;
-   }
-
-   public boolean isActiveOrMarkedRollback() throws SystemException
-   {
-      int status = getStatus();
-      return status == STATUS_ACTIVE || status == STATUS_MARKED_ROLLBACK;
-   }
-
-   public boolean isRolledBackOrMarkedRollback() throws SystemException
-   {
-      int status = getStatus();
-      return status == STATUS_ROLLEDBACK || status == STATUS_MARKED_ROLLBACK;
-   }
-
-   public boolean isMarkedRollback() throws SystemException
-   {
-      return getStatus() == STATUS_MARKED_ROLLBACK;
-   }
-
-   public boolean isNoTransaction() throws SystemException
-   {
-      return getStatus() == STATUS_NO_TRANSACTION;
-   }
-
-   public boolean isRolledBack() throws SystemException
-   {
-      return getStatus() == STATUS_ROLLEDBACK;
-   }
-
-   public boolean isCommitted() throws SystemException
-   {
-      return getStatus() == STATUS_COMMITTED;
-   }
-   
-   public boolean isConversationContextRequired()
-   {
-      return false;
-   }
-   
-   public abstract void registerSynchronization(Synchronization sync);
-   
-   public void enlist(EntityManager entityManager) throws SystemException
-   {
-      if ( isActiveOrMarkedRollback() )
-      {
-         entityManager.joinTransaction();
-      }
-   }
-   
-   public static Synchronizations getSynchronizations()
-   {
-      return (Synchronizations) Component.getInstance("org.jboss.seam.transaction.synchronizations", ScopeType.EVENT);
-   }
-      
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/CMTTransaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/CMTTransaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/CMTTransaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,126 +0,0 @@
-package org.jboss.seam.transaction;
-
-import javax.ejb.EJBContext;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
-
-/**
- * Wraps EJBContext transaction management in a
- * UserTransaction interface. Note that container managed
- * transactions cannot be controlled by the application,
- * so begin(), commit() and rollback() are disallowed in
- * a CMT.
- * 
- * @author Mike Youngstrom
- * @author Gavin King
- * 
- */
-public class CMTTransaction extends AbstractUserTransaction
-{
-   
-   private final EJBContext ejbContext;
-
-   public CMTTransaction(EJBContext ejbContext)
-   {
-      this.ejbContext = ejbContext;
-      if (ejbContext==null)
-      {
-         throw new IllegalArgumentException("null EJBContext");
-      }
-   }
-
-   public void begin() throws NotSupportedException, SystemException
-   {
-      ejbContext.getUserTransaction().begin();
-      getSynchronizations().afterTransactionBegin();
-   }
-
-   public void commit() throws RollbackException, HeuristicMixedException,
-            HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
-   {
-      UserTransaction userTransaction = ejbContext.getUserTransaction();
-      boolean success = false;
-      Synchronizations synchronizations = getSynchronizations();
-      synchronizations.beforeTransactionCommit();
-      try
-      {
-         userTransaction.commit();
-         success = true;
-      }
-      finally
-      {
-         synchronizations.afterTransactionCommit(success);
-      }
-   }
-
-   public void rollback() throws IllegalStateException, SecurityException, SystemException
-   {
-      UserTransaction userTransaction = ejbContext.getUserTransaction();
-      try
-      {
-         userTransaction.rollback();
-      }
-      finally
-      {
-         getSynchronizations().afterTransactionRollback();
-      }
-   }
-
-   public int getStatus() throws SystemException
-   {
-      try
-      {
-         //TODO: not correct for SUPPORTS or NEVER!
-         if ( !ejbContext.getRollbackOnly() )
-         {
-            return Status.STATUS_ACTIVE;
-         }
-         else
-         {
-            return Status.STATUS_MARKED_ROLLBACK;
-         }
-      }
-      catch (IllegalStateException ise)
-      {
-         try
-         {
-            return ejbContext.getUserTransaction().getStatus();
-         }
-         catch (IllegalStateException is)
-         {
-            return Status.STATUS_NO_TRANSACTION;
-         }
-      }
-   }
-
-   public void setRollbackOnly() throws IllegalStateException, SystemException
-   {
-      ejbContext.setRollbackOnly();
-   }
-
-   public void setTransactionTimeout(int timeout) throws SystemException
-   {
-      ejbContext.getUserTransaction().setTransactionTimeout(timeout);
-   }
-   
-   @Override
-   public void registerSynchronization(Synchronization sync)
-   {
-      Synchronizations synchronizations = getSynchronizations();
-      if ( synchronizations.isAwareOfContainerTransactions() )
-      {
-         synchronizations.registerSynchronization(sync);
-      }
-      else
-      {
-         throw new UnsupportedOperationException("cannot register synchronization with container transaction, use <transaction:ejb-transaction/>");
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EjbSynchronizations.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EjbSynchronizations.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EjbSynchronizations.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,117 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import java.rmi.RemoteException;
-import java.util.LinkedList;
-
-import javax.ejb.EJBException;
-import javax.ejb.Remove;
-import javax.ejb.SessionSynchronization;
-import javax.ejb.Stateful;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.transaction.Synchronization;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Receives JTA transaction completion notifications from 
- * the EJB container, and passes them on to the registered
- * Synchronizations. This implementation
- * is fully aware of container managed transactions and is 
- * able to register Synchronizations for the container 
- * transaction.
- * 
- * @author Gavin King
- *
- */
- at Stateful
- at Name("org.jboss.seam.transaction.synchronizations")
- at Scope(ScopeType.EVENT)
- at Install(precedence=FRAMEWORK, dependencies="org.jboss.seam.transaction.ejbTransaction")
- at BypassInterceptors
- at TransactionAttribute(TransactionAttributeType.REQUIRED)
-public class EjbSynchronizations implements LocalEjbSynchronizations, SessionSynchronization
-{
-   private static final LogProvider log = Logging.getLogProvider(EjbSynchronizations.class);
-   
-   //maintain two lists to work around a bug in JBoss EJB3 where a new SessionSynchronization
-   //gets registered each time the bean is called
-   protected LinkedList<SynchronizationRegistry> synchronizations = new LinkedList<SynchronizationRegistry>();
-   protected LinkedList<SynchronizationRegistry> committing = new LinkedList<SynchronizationRegistry>();
-   
-   public void afterBegin()
-   {
-      log.debug("afterBegin");
-      synchronizations.addLast( new SynchronizationRegistry() );
-   }
-   
-   public void beforeCompletion() throws EJBException, RemoteException
-   {
-      log.debug("beforeCompletion");
-      SynchronizationRegistry sync = synchronizations.removeLast();
-      sync.beforeTransactionCompletion();
-      committing.addLast(sync);
-   }
-   
-   public void afterCompletion(boolean success) throws EJBException, RemoteException
-   {
-      log.debug("afterCompletion");
-      if ( committing.isEmpty() )
-      {
-         if (success)
-         {
-            throw new IllegalStateException("beforeCompletion was never called");
-         }
-         else
-         {
-            synchronizations.removeLast().afterTransactionCompletion(false);
-         }
-      }
-      else
-      {
-         committing.removeFirst().afterTransactionCompletion(success);
-      }
-   }
-   
-   public boolean isAwareOfContainerTransactions()
-   {
-      return true;
-   }
-   
-   public void afterTransactionBegin()
-   {
-      //noop, let JTA notify us
-   }
-   
-   public void afterTransactionCommit(boolean success)
-   {
-      //noop, let JTA notify us
-   }
-   
-   public void afterTransactionRollback()
-   {
-      //noop, let JTA notify us
-   }
-   
-   public void beforeTransactionCommit()
-   {
-      //noop, let JTA notify us
-   }
-   
-   public void registerSynchronization(Synchronization sync)
-   {
-      synchronizations.getLast().registerSynchronization(sync);
-   }
-   
-   @Remove
-   public void destroy() {}
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EjbTransaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EjbTransaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EjbTransaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Dummy component that lets us install the
- * EjbSynchronizations via the tag
- * transaction:ejb-transaction
- *
- * @see EjbSynchronizations
- * @author Gavin King
- * 
- */
- at Name("org.jboss.seam.transaction.ejbTransaction")
- at Scope(ScopeType.STATELESS)
- at Install(precedence=BUILT_IN, value=false)
- at BypassInterceptors
-public class EjbTransaction {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EntityTransaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EntityTransaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/EntityTransaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,230 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import javax.persistence.EntityManager;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.persistence.PersistenceProvider;
-
-/**
- * Support for the JPA EntityTransaction API.
- * 
- * Adapts JPA transaction management to a Seam UserTransaction 
- * interface.For use in non-JTA-capable environments.
- * 
- * @author Gavin King
- * 
- */
- at Name("org.jboss.seam.transaction.transaction")
- at Scope(ScopeType.EVENT)
- at Install(value=false, precedence=FRAMEWORK)
- at BypassInterceptors
-public class EntityTransaction extends AbstractUserTransaction
-{
-   private static final LogProvider log = Logging.getLogProvider(EntityTransaction.class);
-   
-   private ValueExpression<EntityManager> entityManager;
-   private EntityManager currentEntityManager;
-   
-   @Create
-   public void validate()
-   {
-      if (entityManager==null)
-      {
-         entityManager = Expressions.instance().createValueExpression("#{entityManager}", EntityManager.class);
-      }
-   }
-   
-   private javax.persistence.EntityTransaction getDelegate()
-   {
-      if (currentEntityManager==null)
-      {
-         //should never occur
-         throw new IllegalStateException("entity manager is null");
-      }
-      return currentEntityManager.getTransaction();
-   }
-
-   private void initEntityManager()
-   {
-      currentEntityManager = entityManager.getValue();
-      if (currentEntityManager==null)
-      {
-         throw new IllegalStateException("entity manager was null: " + entityManager.getExpressionString());
-      }
-   }
-
-   public void begin() throws NotSupportedException, SystemException
-   {
-      log.debug("beginning JPA resource-local transaction");
-      //TODO: translate exceptions that occur into the correct JTA exception
-      assertNotActive();
-      initEntityManager();
-      try
-      {
-         getDelegate().begin();
-         getSynchronizations().afterTransactionBegin();
-      }
-      catch (RuntimeException re)
-      {
-         clearEntityManager();
-         throw re;
-      }
-   }
-
-   public void commit() throws RollbackException, HeuristicMixedException,
-            HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
-   {
-      log.debug("committing JPA resource-local transaction");
-      assertActive();
-      javax.persistence.EntityTransaction delegate = getDelegate();
-      clearEntityManager();
-      boolean success = false;
-      try
-      {
-         if ( delegate.getRollbackOnly() )
-         {
-            delegate.rollback();
-            throw new RollbackException();
-         }
-         else
-         {
-            getSynchronizations().beforeTransactionCommit();
-            delegate.commit();
-            success = true;
-         }
-      }
-      finally
-      {
-         getSynchronizations().afterTransactionCommit(success);
-      }
-   }
-
-   public void rollback() throws IllegalStateException, SecurityException, SystemException
-   {
-      log.debug("rolling back JPA resource-local transaction");
-      //TODO: translate exceptions that occur into the correct JTA exception
-      assertActive();
-      javax.persistence.EntityTransaction delegate = getDelegate();
-      clearEntityManager();
-      try
-      {
-         delegate.rollback();
-      }
-      finally
-      {
-         getSynchronizations().afterTransactionRollback();
-      }
-   }
-
-   public void setRollbackOnly() throws IllegalStateException, SystemException
-   {
-      log.debug("marking JPA resource-local transaction for rollback");
-      assertActive();
-      getDelegate().setRollbackOnly();
-   }
-
-   public int getStatus() throws SystemException
-   {
-      if ( isEntityManagerSet() && getDelegate().getRollbackOnly() )
-      {
-         return Status.STATUS_MARKED_ROLLBACK;
-      }
-      else if ( isEntityManagerSet() && getDelegate().isActive() )
-      {
-         return Status.STATUS_ACTIVE;
-      }
-      else
-      {
-         return Status.STATUS_NO_TRANSACTION;
-      }
-   }
-
-   public void setTransactionTimeout(int timeout) throws SystemException
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   private boolean isEntityManagerSet()
-   {
-      return currentEntityManager!=null;
-   }
-   
-   private void clearEntityManager()
-   {
-      currentEntityManager = null;
-   }
-
-   private void assertActive()
-   {
-      if ( !isEntityManagerSet() )
-      {
-         throw new IllegalStateException("transaction is not active");
-      }
-   }
-
-   private void assertNotActive() throws NotSupportedException
-   {
-      if ( isEntityManagerSet() )
-      {
-         throw new NotSupportedException("transaction is already active");
-      }
-   }
-   
-   @Override
-   public void registerSynchronization(Synchronization sync)
-   {
-      if ( log.isDebugEnabled() )
-      {
-         log.debug("registering synchronization: " + sync);
-      }
-      assertActive();
-      //try to register the synchronization directly with the
-      //persistence provider, but if this fails, just hold
-      //on to it myself
-      if ( !PersistenceProvider.instance().registerSynchronization(sync, currentEntityManager) )
-      {
-         getSynchronizations().registerSynchronization(sync);
-      }
-   }
-
-   @Override
-   public boolean isConversationContextRequired()
-   {
-      return true;
-   }
-
-   public ValueExpression<EntityManager> getEntityManager()
-   {
-      return entityManager;
-   }
-
-   public void setEntityManager(ValueExpression<EntityManager> entityManager)
-   {
-      this.entityManager = entityManager;
-   }
-   
-   @Override
-   public void enlist(EntityManager entityManager)
-   {
-      //no-op
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/FacesTransactionEvents.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/FacesTransactionEvents.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/FacesTransactionEvents.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,66 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.international.StatusMessage.Severity;
-
-/**
- * Produces StatusMessages for JSF in response of certain transaction events.
- * These events can be observed by support classes for other UI frameworks
- * to produce similar messages.
- * 
- * @author Dan Allen
- */
- at Name("org.jboss.seam.transaction.facesTransactionEvents")
- at Scope(APPLICATION)
- at Install(precedence = BUILT_IN, classDependencies = "javax.faces.context.FacesContext")
- at BypassInterceptors
- at Startup
-public class FacesTransactionEvents 
-{  
-   private boolean transactionFailedMessageEnabled = true;
-   
-   @Observer(Transaction.TRANSACTION_FAILED)
-   public void addTransactionFailedMessage(int status)
-   {
-      if (transactionFailedMessageEnabled) {
-         StatusMessages.instance().addFromResourceBundleOrDefault(
-                  getTransactionFailedMessageSeverity(), 
-                  getTransactionFailedMessageKey(), 
-                  getTransactionFailedMessage());
-      }
-   }
-
-   public String getTransactionFailedMessage()
-   {
-      return "Transaction failed";
-   }
-
-   public Severity getTransactionFailedMessageSeverity()
-   {
-      return Severity.WARN;
-   }
-
-   public String getTransactionFailedMessageKey()
-   {
-      return "org.jboss.seam.TransactionFailed";
-   }
-
-   public boolean isTransactionFailedMessageEnabled()
-   {
-      return transactionFailedMessageEnabled;
-   }
-
-   public void setTransactionFailedMessageEnabled(boolean enabled)
-   {
-      this.transactionFailedMessageEnabled = enabled;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/HibernateTransaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/HibernateTransaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/HibernateTransaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,212 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import javax.persistence.EntityManager;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Expressions.ValueExpression;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Support for the Hibernate Transaction API.
- * 
- * Adapts Hibernate transaction management to a Seam UserTransaction 
- * interface. For use in non-JTA-capable environments.
- * 
- * @author Gavin King
- * 
- */
- at Name("org.jboss.seam.transaction.transaction")
- at Scope(ScopeType.EVENT)
- at Install(value=false, precedence=FRAMEWORK)
- at BypassInterceptors
-public class HibernateTransaction extends AbstractUserTransaction
-{
-   private static final LogProvider log = Logging.getLogProvider(HibernateTransaction.class);
-
-   private ValueExpression<Session> session;
-   private Session currentSession;
-   private boolean rollbackOnly; //Hibernate Transaction doesn't have a "rollback only" state
-   
-   @Create
-   public void validate()
-   {
-      if (session==null)
-      {
-         session = Expressions.instance().createValueExpression("#{session}", Session.class);
-      }
-   }
-   
-   private org.hibernate.Transaction getDelegate()
-   {
-      if (currentSession==null)
-      {
-         //should never occur
-         throw new IllegalStateException("session is null");
-      }
-      return currentSession.getTransaction();
-   }
-
-   private void initSession()
-   {
-      currentSession = session.getValue();
-      if (currentSession==null)
-      {
-         throw new IllegalStateException("session was null: " + session.getExpressionString());
-      }
-   }
-
-   public void begin() throws NotSupportedException, SystemException
-   {
-      log.debug("beginning Hibernate transaction");
-      assertNotActive();
-      initSession();
-      try
-      {
-         getDelegate().begin();
-      }
-      catch (RuntimeException re)
-      {
-         clearSession();
-         throw re;
-      }
-   }
-
-   public void commit() throws RollbackException, HeuristicMixedException,
-            HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
-   {
-      log.debug("committing Hibernate transaction");
-      //TODO: translate exceptions that occur into the correct JTA exception
-      assertActive();
-      Transaction delegate = getDelegate();
-      clearSession();
-      if (rollbackOnly)
-      {
-         rollbackOnly = false;
-         delegate.rollback();
-         throw new RollbackException();
-      }
-      else
-      {
-         delegate.commit();
-      }
-   }
-
-   public void rollback() throws IllegalStateException, SecurityException, SystemException
-   {
-      log.debug("rolling back Hibernate transaction");
-      //TODO: translate exceptions that occur into the correct JTA exception
-      assertActive();
-      Transaction delegate = getDelegate();
-      clearSession();
-      rollbackOnly = false;
-      delegate.rollback();
-   }
-
-   public void setRollbackOnly() throws IllegalStateException, SystemException
-   {
-      log.debug("marking Hibernate transaction for rollback");
-      assertActive();
-      rollbackOnly = true;
-   }
-
-   public int getStatus() throws SystemException
-   {
-      if (rollbackOnly)
-      {
-         return Status.STATUS_MARKED_ROLLBACK;
-      }
-      else if ( isSessionSet() && getDelegate().isActive() )
-      {
-         return Status.STATUS_ACTIVE;
-      }
-      else
-      {
-         return Status.STATUS_NO_TRANSACTION;
-      }
-   }
-
-   public void setTransactionTimeout(int timeout) throws SystemException
-   {
-      assertActive();
-      getDelegate().setTimeout(timeout);
-   }
-   
-   private boolean isSessionSet()
-   {
-      return currentSession!=null;
-   }
-   
-   private void clearSession()
-   {
-      currentSession = null;
-   }
-
-   private void assertActive()
-   {
-      if ( !isSessionSet() )
-      {
-         throw new IllegalStateException("transaction is not active");
-      }
-   }
-
-   private void assertNotActive() throws NotSupportedException
-   {
-      //TODO: translate exceptions that occur into the correct JTA exception
-      if ( isSessionSet() )
-      {
-         throw new NotSupportedException("transaction is already active");
-      }
-   }
-   
-   @Override
-   public void registerSynchronization(Synchronization sync)
-   {
-      if ( log.isDebugEnabled() )
-      {
-         log.debug("registering synchronization: " + sync);
-      }
-      assertActive();
-      getDelegate().registerSynchronization(sync);
-   }
-   
-   @Override
-   public void enlist(EntityManager entityManager) throws SystemException
-   {
-      throw new UnsupportedOperationException("JPA EntityManager should not be used with Hibernate Transaction API");
-   }
-   
-   @Override
-   public boolean isConversationContextRequired()
-   {
-      return true;
-   }
-
-   public ValueExpression<Session> getSession()
-   {
-      return session;
-   }
-
-   public void setSession(ValueExpression<Session> entityManager)
-   {
-      this.session = entityManager;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/LocalEjbSynchronizations.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/LocalEjbSynchronizations.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/LocalEjbSynchronizations.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,15 +0,0 @@
-package org.jboss.seam.transaction;
-
-import javax.ejb.Local;
-
-/**
- * Local interface for EjbTransaction
- * 
- * @author Gavin King
- *
- */
- at Local
-public interface LocalEjbSynchronizations extends Synchronizations
-{
-   public void destroy();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/NoTransaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/NoTransaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/NoTransaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,77 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import javax.persistence.EntityManager;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * When no kind of transaction management exists.
- * 
- * @author Mike Youngstrom
- * @author Gavin King
- * 
- */
- at Name("org.jboss.seam.transaction.transaction")
- at Scope(ScopeType.EVENT)
- at Install(value = false, precedence = FRAMEWORK)
- at BypassInterceptors
-public class NoTransaction extends AbstractUserTransaction
-{
-   
-   public void begin() throws NotSupportedException, SystemException
-   {
-      throw new UnsupportedOperationException("no transaction");
-   }
-
-   public void commit() throws RollbackException, HeuristicMixedException,
-            HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
-   {
-      throw new UnsupportedOperationException("no transaction");
-   }
-
-   public int getStatus() throws SystemException
-   {
-      return Status.STATUS_NO_TRANSACTION;
-   }
-
-   public void rollback() throws IllegalStateException, SecurityException, SystemException
-   {
-      throw new UnsupportedOperationException("no transaction");
-   }
-
-   public void setRollbackOnly() throws IllegalStateException, SystemException
-   {
-      throw new UnsupportedOperationException("no transaction");
-   }
-
-   public void setTransactionTimeout(int timeout) throws SystemException
-   {
-      throw new UnsupportedOperationException("no transaction");
-   }
-   
-   @Override
-   public void registerSynchronization(Synchronization sync)
-   {
-      throw new UnsupportedOperationException("no transaction");
-   }
-   
-   @Override
-   public void enlist(EntityManager entityManager) throws SystemException
-   {
-      //no-op
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/RollbackInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/RollbackInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/RollbackInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,50 +0,0 @@
-//$Id: RollbackInterceptor.java 8626 2008-08-07 19:50:09Z pete.muir at jboss.org $
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.ComponentType.JAVA_BEAN;
-import static org.jboss.seam.util.Work.isRollbackRequired;
-
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-
-/**
- * Automatically sets the current transaction to rollback 
- * only when an exception is thrown.
- * 
- * @author Gavin King
- */
- at Interceptor(stateless=true)
-public class RollbackInterceptor extends AbstractInterceptor 
-{
-   private static final long serialVersionUID = 5551801508325093417L;
-   
-   @AroundInvoke
-   public Object aroundInvoke(InvocationContext invocation) throws Exception 
-   {
-      try
-      {
-         return invocation.proceed();
-      }
-      catch (Exception e)
-      {
-         if ( isRollbackRequired(e, getComponent().getType() == JAVA_BEAN) )
-         {
-            try
-            {
-               Transaction.instance().setRollbackOnly();
-            }
-            catch (Exception te) {} //swallow
-         }
-         throw e;
-      }
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      // Just here for consistency
-      return true;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/SeSynchronizations.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/SeSynchronizations.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/SeSynchronizations.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,65 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.Stack;
-
-import javax.transaction.Synchronization;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * This implementation does not have access to the JTA TransactionManager, so it
- * is not fully aware of container managed transaction lifecycle, and is not
- * able to register Synchronizations with a container managed transaction.
- * 
- * @author Gavin King
- * 
- */
- at Name("org.jboss.seam.transaction.synchronizations")
- at Scope(ScopeType.EVENT)
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
-public class SeSynchronizations implements Synchronizations {
-    protected Stack<SynchronizationRegistry> synchronizations = new Stack<SynchronizationRegistry>();
-
-    
-    public void afterTransactionBegin() {        
-        synchronizations.push(new SynchronizationRegistry());
-    }
-
-    public void afterTransactionCommit(boolean success) {        
-        if (!synchronizations.isEmpty()) {
-            synchronizations.pop().afterTransactionCompletion(success);
-        }
-    }
-
-    public void afterTransactionRollback() {
-        if (!synchronizations.isEmpty()) {
-            synchronizations.pop().afterTransactionCompletion(false);
-        }
-    }
-
-    public void beforeTransactionCommit() {
-        if (!synchronizations.isEmpty()) {
-            synchronizations.peek().beforeTransactionCompletion();
-        }
-    }
-
-    public void registerSynchronization(Synchronization sync) {
-        if (synchronizations.isEmpty()) {
-            throw new IllegalStateException("Transaction begin not detected, try installing transaction:ejb-transaction in components.xml");
-        } else {
-            synchronizations.peek().registerSynchronization(sync);
-        }
-    }
-
-    public boolean isAwareOfContainerTransactions() {
-        return false;
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/SynchronizationRegistry.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/SynchronizationRegistry.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/SynchronizationRegistry.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,71 +0,0 @@
-package org.jboss.seam.transaction;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-
-import org.jboss.seam.core.Events;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * A list of Synchronizations to be invoked before and after transaction
- * completion. This class is used when we can't register a synchronization
- * directly with JTA.
- * 
- * @author Gavin King
- *
- */
-class SynchronizationRegistry
-{
-   private static final LogProvider log = Logging.getLogProvider(SynchronizationRegistry.class);
-
-   private List<Synchronization> synchronizations = new ArrayList<Synchronization>();
-
-   void registerSynchronization(Synchronization sync)
-   {
-      synchronizations.add(sync);
-   }
-   
-   void afterTransactionCompletion(boolean success)
-   {
-      if ( Events.exists() ) 
-      {
-         Events.instance().raiseEvent("org.jboss.seam.afterTransactionCompletion", success);
-      }
-      for (Synchronization sync: synchronizations)
-      {
-         try
-         {
-            sync.afterCompletion(success ? Status.STATUS_COMMITTED : Status.STATUS_ROLLEDBACK);
-         }
-         catch (Exception e)
-         {
-            log.error("Exception processing transaction Synchronization after completion", e);
-         }
-      }
-      synchronizations.clear();
-   }
-
-   void beforeTransactionCompletion()
-   {
-      if ( Events.exists() )
-      {
-         Events.instance().raiseEvent("org.jboss.seam.beforeTransactionCompletion");
-      }
-      for (Synchronization sync: synchronizations)
-      {
-         try
-         {
-            sync.beforeCompletion();
-         }
-         catch (Exception e)
-         {
-            log.error("Exception processing transaction Synchronization before completion", e);
-         }
-      }
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/Synchronizations.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/Synchronizations.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/Synchronizations.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam.transaction;
-
-import javax.transaction.Synchronization;
-
-/**
- * Interface for registering transaction synchronizations
- * 
- * @author Gavin King
- *
- */
-public interface Synchronizations
-{
-   public void afterTransactionBegin();
-   public void afterTransactionCommit(boolean success);
-   public void afterTransactionRollback();
-   public void beforeTransactionCommit();
-   public void registerSynchronization(Synchronization sync);
-   public boolean isAwareOfContainerTransactions();
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/Transaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/Transaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/Transaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,106 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.util.EJB;
-import org.jboss.seam.util.Naming;
-
-/**
- * Supports injection of a Seam UserTransaction object that
- * wraps the current JTA transaction or EJB container managed
- * transaction.
- * 
- * @author Mike Youngstrom
- * @author Gavin King
- * 
- */
- at Name("org.jboss.seam.transaction.transaction")
- at Scope(ScopeType.EVENT)
- at Install(precedence=BUILT_IN)
- at BypassInterceptors
-public class Transaction
-{
-   // Event keys
-   public static final String TRANSACTION_FAILED = "org.jboss.seam.transaction.transactionFailed";
-
-   public static UserTransaction instance()
-   {
-      return (UserTransaction) Component.getInstance(Transaction.class, ScopeType.EVENT);
-   }
-   
-   @Unwrap
-   public UserTransaction getTransaction() throws NamingException
-   {
-      try
-      {
-         return createUTTransaction();
-      }
-      catch (NameNotFoundException nnfe)
-      {
-         try
-         {
-            return createCMTTransaction();
-         }
-         catch (NameNotFoundException nnfe2)
-         {
-            return createNoTransaction();
-         }
-      }
-   }
-
-   protected UserTransaction createNoTransaction()
-   {
-      return new NoTransaction();
-   }
-
-   protected UserTransaction createCMTTransaction() throws NamingException
-   {
-      return new CMTTransaction( EJB.getEJBContext() );
-   }
-
-   protected UserTransaction createUTTransaction() throws NamingException
-   {
-      return new UTTransaction( getUserTransaction() );
-   }
-
-   protected javax.transaction.UserTransaction getUserTransaction() throws NamingException
-   {
-      InitialContext context = Naming.getInitialContext();
-      try
-      {
-         return (javax.transaction.UserTransaction) context.lookup("java:comp/UserTransaction");
-      }
-      catch (NameNotFoundException nnfe)
-      {
-         try
-         {
-            //Embedded JBoss has no java:comp/UserTransaction
-            javax.transaction.UserTransaction ut = (javax.transaction.UserTransaction) context.lookup("UserTransaction");
-            ut.getStatus(); //for glassfish, which can return an unusable UT
-            return ut;
-         }
-         catch (NamingException nnfe2) {
-             // Try the other JBoss location in JBoss AS7
-             return (UserTransaction) context.lookup("java:jboss/UserTransaction");
-         }
-         catch (Exception e)
-         {
-            throw nnfe;
-         }
-      }
-   }
-   
-   
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/TransactionInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/TransactionInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/TransactionInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,128 +0,0 @@
-package org.jboss.seam.transaction;
-
-import static org.jboss.seam.ComponentType.JAVA_BEAN;
-
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.seam.annotations.TransactionPropagationType;
-import org.jboss.seam.annotations.Transactional;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.bpm.BusinessProcessInterceptor;
-import org.jboss.seam.core.BijectionInterceptor;
-import org.jboss.seam.core.ConversationInterceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.util.Work;
-
-/**
- * Implements transaction propagation rules for Seam JavaBean components.
- * 
- * @author Gavin King
- * @author Shane Bryzak
- */
- at Interceptor(stateless=false,
-             around={RollbackInterceptor.class, BusinessProcessInterceptor.class, 
-                     ConversationInterceptor.class, BijectionInterceptor.class})
-public class TransactionInterceptor extends AbstractInterceptor
-{
-   private static final long serialVersionUID = -4364203056333738988L;
-   
-   transient
-   private Map<AnnotatedElement,TransactionMetadata> transactionMetadata = new HashMap<AnnotatedElement, TransactionMetadata>();
-
-   private class TransactionMetadata
-   {
-      private boolean annotationPresent;
-      TransactionPropagationType propType;
-      
-      public TransactionMetadata(AnnotatedElement element)
-      {
-         annotationPresent = element.isAnnotationPresent(Transactional.class);
-         
-         if (annotationPresent)
-         {
-            propType = element.getAnnotation(Transactional.class).value();
-         }
-      }
-      
-      public boolean isAnnotationPresent()
-      {
-         return annotationPresent;
-      }
-      
-      public boolean isNewTransactionRequired(boolean transactionActive)
-      {
-         return propType != null && propType.isNewTransactionRequired(transactionActive);
-      }
-   }
-   
-   private TransactionMetadata lookupTransactionMetadata(AnnotatedElement element) {
-        if (transactionMetadata == null) {
-            transactionMetadata = new HashMap<AnnotatedElement, TransactionMetadata>();
-        }
-        
-        TransactionMetadata metadata = transactionMetadata.get(element);
-
-        if (metadata == null) {
-            metadata = loadMetadata(element);
-        }
-
-        return metadata;
-    }
-   
-   private synchronized TransactionMetadata loadMetadata(AnnotatedElement element) {
-        if (!transactionMetadata.containsKey(element)) {
-            TransactionMetadata metadata = new TransactionMetadata(element);
-            transactionMetadata.put(element, metadata);
-            return metadata;
-        }
-
-        return transactionMetadata.get(element);
-    }
-   
-   
-   @AroundInvoke
-   public Object aroundInvoke(final InvocationContext invocation) throws Exception
-   {
-      return new Work()
-      {
-         
-         @Override
-         protected Object work() throws Exception
-         {
-            return invocation.proceed();
-         }
-         
-         @Override
-         protected boolean isNewTransactionRequired(boolean transactionActive)
-         {
-            return isNewTransactionRequired( invocation.getMethod(), getComponent().getBeanClass(), transactionActive );
-         }
-         
-         private boolean isNewTransactionRequired(Method method, Class beanClass, boolean transactionActive)
-         {
-            TransactionMetadata metadata = lookupTransactionMetadata(method);
-            if (metadata.isAnnotationPresent())
-            {
-               return metadata.isNewTransactionRequired(transactionActive);
-            }
-            else
-            {
-               metadata = lookupTransactionMetadata(beanClass);
-               return metadata.isNewTransactionRequired(transactionActive);
-            }
-         }
-         
-      }.workInTransaction();      
-   }
-   
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().getType()==JAVA_BEAN && getComponent().beanClassHasAnnotation(Transactional.class);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/UTTransaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/UTTransaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/UTTransaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,95 +0,0 @@
-package org.jboss.seam.transaction;
-
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * Wraps JTA transaction management in a Seam UserTransaction 
- * interface.
- * 
- * @author Mike Youngstrom
- * @author Gavin King
- * 
- */
-public class UTTransaction extends AbstractUserTransaction
-{
-   private static final LogProvider log = Logging.getLogProvider(UTTransaction.class);
-   
-   private final javax.transaction.UserTransaction delegate;
-
-   UTTransaction(javax.transaction.UserTransaction delegate)
-   {
-      this.delegate = delegate;
-      if (delegate==null)
-      {
-         throw new IllegalArgumentException("null UserTransaction");
-      }
-   }
-   
-   public void begin() throws NotSupportedException, SystemException
-   {
-      log.debug("beginning JTA transaction");
-      delegate.begin();
-      getSynchronizations().afterTransactionBegin();
-   }
-
-   public void commit() throws RollbackException, HeuristicMixedException,
-            HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
-   {
-      log.debug("committing JTA transaction");
-      boolean success = false;
-      Synchronizations synchronizations = getSynchronizations();
-      synchronizations.beforeTransactionCommit();
-      try
-      {
-         delegate.commit();
-         success = true;
-      }
-      finally
-      {
-         synchronizations.afterTransactionCommit(success);
-      }
-   }
-
-   public void rollback() throws IllegalStateException, SecurityException, SystemException
-   {
-      log.debug("rolling back JTA transaction");
-      try
-      {
-         delegate.rollback();
-      }
-      finally
-      {
-         getSynchronizations().afterTransactionRollback();
-      }
-   }
-
-   public int getStatus() throws SystemException
-   {
-      return delegate.getStatus();
-   }
-
-   public void setRollbackOnly() throws IllegalStateException, SystemException
-   {
-      delegate.setRollbackOnly();
-   }
-
-   public void setTransactionTimeout(int timeout) throws SystemException
-   {
-      delegate.setTransactionTimeout(timeout);
-   }
-
-   @Override
-   public void registerSynchronization(Synchronization sync)
-   {
-      getSynchronizations().registerSynchronization(sync);
-   }
-  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/UserTransaction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/UserTransaction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/UserTransaction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,29 +0,0 @@
-package org.jboss.seam.transaction;
-
-import javax.persistence.EntityManager;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-
-/**
- * Extends the standard UserTransaction interface with a couple 
- * of helpful methods.
- * 
- * @author Gavin King
- * 
- */
-public interface UserTransaction extends javax.transaction.UserTransaction
-{
-   
-   public boolean isActive() throws SystemException;
-   public boolean isActiveOrMarkedRollback() throws SystemException;
-   public boolean isRolledBackOrMarkedRollback() throws SystemException;
-   public boolean isMarkedRollback() throws SystemException;
-   public boolean isNoTransaction() throws SystemException;
-   public boolean isRolledBack() throws SystemException;
-   public boolean isCommitted() throws SystemException;
- 
-   public boolean isConversationContextRequired();
-   public abstract void registerSynchronization(Synchronization sync);
-
-   public void enlist(EntityManager entityManager) throws SystemException;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/transaction/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-/**
- * Abstracts all possible transaction management APIs behind a 
- * JTA-compatible interface. Unfortunately, many 
- * otherwise-perfectly-intelligent-looking Java developers like 
- * to invent their own transaction management APIs when they get 
- * bored, even though JTA is well-known to be more than good
- * enough. For example, one of the co-authors of this class was 
- * present at the creation of not one but two "alternative" 
- * transaction APIs (org.hibernate.Transaction and 
- * javax.persistence.EntityTransaction), and is more 
- * embarrassed by this than by any other of his many professional
- * blunders.
- * 
- * @see org.jboss.seam.transaction.Transaction
- * @see org.jboss.seam.transaction.UserTransaction
- */
- at Namespace(value="http://jboss.com/products/seam/transaction", prefix="org.jboss.seam.transaction")
-package org.jboss.seam.transaction;
-
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/AnnotatedBeanProperty.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/AnnotatedBeanProperty.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/AnnotatedBeanProperty.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,177 +0,0 @@
-package org.jboss.seam.util;
-
-import java.beans.Introspector;
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-
-/**
- * A convenience class for working with an annotated property (either a field or method) of
- * a JavaBean class.
- *  
- * @author Shane Bryzak
- */
-public class AnnotatedBeanProperty<T extends Annotation> implements Serializable
-{
-   private static final long serialVersionUID = 2508430507136805635L;
-   private  transient Field propertyField;
-   private transient  Method propertyGetter;
-   private transient Method propertySetter;
-   private String name;
-   private Type propertyType;
-   private T annotation;
-   
-   private boolean isFieldProperty;
-   private boolean set = false;
-   
-   private Class<?> cls;
-   private Class<? extends Annotation> annotationClass;
-   
-   public AnnotatedBeanProperty(Class<?> cls, Class<? extends Annotation> annotationClass)
-   {      
-      this.cls = cls;
-      this.annotationClass = annotationClass;
-       init();
-   }    
-   
-   private void init()
-   {
-         // First check declared fields
-         for (Field f : cls.getDeclaredFields())
-         {
-            if (f.isAnnotationPresent(annotationClass)) 
-            {
-               setupFieldProperty(f);
-               this.annotation = (T) f.getAnnotation(annotationClass);            
-               set = true;
-               return;
-            }
-      }      
-      
-      // Then check public fields, in case it's inherited
-      for (Field f : cls.getFields())
-      {
-         if (f.isAnnotationPresent(annotationClass)) 
-         {
-            this.annotation = (T) f.getAnnotation(annotationClass);
-            setupFieldProperty(f);
-            set = true;
-            return;
-         }
-      }
-      
-      // Then check public methods (we ignore private methods)
-      for (Method m : cls.getMethods())
-      {
-         if (m.isAnnotationPresent(annotationClass))
-         {
-            this.annotation = (T) m.getAnnotation(annotationClass);
-            String methodName = m.getName();
-            
-            if ( m.getName().startsWith("get") )
-            {
-               this.name = Introspector.decapitalize( m.getName().substring(3) );
-            }
-            else if ( methodName.startsWith("is") )
-            {
-               this.name = Introspector.decapitalize( m.getName().substring(2) );
-            }            
-            
-            if (this.name != null)
-            {
-               this.propertyGetter = Reflections.getGetterMethod(cls, this.name);
-               this.propertySetter = Reflections.getSetterMethod(cls, this.name);
-               this.propertyType = this.propertyGetter.getGenericReturnType();
-               isFieldProperty = false;               
-               set = true;
-            }
-            else
-            {
-               throw new IllegalStateException("Invalid accessor method, must start with 'get' or 'is'.  " +
-                     "Method: " + m + " in class: " + cls);
-            }
-         }
-      }      
-   }
-
-     public Field getPropertyField() 
-     { 
-        if (propertyField == null)
-        {
-           init();
-        }
-        return propertyField; 
-     }
-
-     public Method getPropertyGetter() 
-     { 
-        if (propertyGetter == null)
-        {
-           init();
-        }
-        return propertyGetter; 
-     }
-
-     public Method getPropertySetter() 
-     { 
-        if (propertySetter == null) 
-        {
-           init();
-        }
-        return propertySetter; 
-     }
-
-   private void setupFieldProperty(Field propertyField)
-   {
-      this.propertyField = propertyField;
-      isFieldProperty = true;
-      this.name = propertyField.getName();
-      this.propertyType = propertyField.getGenericType();
-   }
-
-   public void setValue(Object bean, Object value)
-   {
-      if (isFieldProperty)
-      {
-         Reflections.setAndWrap(getPropertyField(), bean, value);         
-      }
-      else
-      {
-         Reflections.invokeAndWrap(getPropertySetter(), bean, value);
-      }
-   }
-   
-   public Object getValue(Object bean)
-   {
-      if (isFieldProperty)
-      {
-         return Reflections.getAndWrap(getPropertyField(), bean);  
-      }
-      else
-      {
-         return Reflections.invokeAndWrap(getPropertyGetter(), bean);
-      }
-   }
-   
-   public String getName()
-   {
-      return name;
-   }
-   
-   public T getAnnotation()
-   {
-      return (T) annotation;
-   }
-   
-   public Type getPropertyType()
-   {
-      return propertyType;
-   }
-   
-   public boolean isSet()
-   {
-      return set;
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Base64.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Base64.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Base64.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1771 +0,0 @@
-package org.jboss.seam.util;
-
-/**
- * <p>Encodes and decodes to and from Base64 notation.</p>
- * <p>Homepage: <a href="http://iharder.net/base64">http://iharder.net/base64</a>.</p>
- *
- * <p>
- * Change Log:
- * </p>
- * <ul>
- *  <li>v2.2.1 - Fixed bug using URL_SAFE and ORDERED encodings. Fixed bug
- *   when using very small files (~< 40 bytes).</li>
- *  <li>v2.2 - Added some helper methods for encoding/decoding directly from
- *   one file to the next. Also added a main() method to support command line
- *   encoding/decoding from one file to the next. Also added these Base64 dialects:
- *   <ol>
- *   <li>The default is RFC3548 format.</li>
- *   <li>Calling Base64.setFormat(Base64.BASE64_FORMAT.URLSAFE_FORMAT) generates
- *   URL and file name friendly format as described in Section 4 of RFC3548.
- *   http://www.faqs.org/rfcs/rfc3548.html</li>
- *   <li>Calling Base64.setFormat(Base64.BASE64_FORMAT.ORDERED_FORMAT) generates
- *   URL and file name friendly format that preserves lexical ordering as described
- *   in http://www.faqs.org/qa/rfcc-1940.html</li>
- *   </ol>
- *   Special thanks to Jim Kellerman at <a href="http://www.powerset.com/">http://www.powerset.com/</a>
- *   for contributing the new Base64 dialects.
- *  </li>
- * 
- *  <li>v2.1 - Cleaned up javadoc comments and unused variables and methods. Added
- *   some convenience methods for reading and writing to and from files.</li>
- *  <li>v2.0.2 - Now specifies UTF-8 encoding in places where the code fails on systems
- *   with other encodings (like EBCDIC).</li>
- *  <li>v2.0.1 - Fixed an error when decoding a single byte, that is, when the
- *   encoded data was a single byte.</li>
- *  <li>v2.0 - I got rid of methods that used booleans to set options. 
- *   Now everything is more consolidated and cleaner. The code now detects
- *   when data that's being decoded is gzip-compressed and will decompress it
- *   automatically. Generally things are cleaner. You'll probably have to
- *   change some method calls that you were making to support the new
- *   options format (<tt>int</tt>s that you "OR" together).</li>
- *  <li>v1.5.1 - Fixed bug when decompressing and decoding to a             
- *   byte[] using <tt>decode( String s, boolean gzipCompressed )</tt>.      
- *   Added the ability to "suspend" encoding in the Output Stream so        
- *   you can turn on and off the encoding if you need to embed base64       
- *   data in an otherwise "normal" stream (like an XML file).</li>  
- *  <li>v1.5 - Output stream pases on flush() command but doesn't do anything itself.
- *      This helps when using GZIP streams.
- *      Added the ability to GZip-compress objects before encoding them.</li>
- *  <li>v1.4 - Added helper methods to read/write files.</li>
- *  <li>v1.3.6 - Fixed OutputStream.flush() so that 'position' is reset.</li>
- *  <li>v1.3.5 - Added flag to turn on and off line breaks. Fixed bug in input stream
- *      where last buffer being read, if not completely full, was not returned.</li>
- *  <li>v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time.</li>
- *  <li>v1.3.3 - Fixed I/O streams which were totally messed up.</li>
- * </ul>
- *
- * <p>
- * I am placing this code in the Public Domain. Do with it as you will.
- * This software comes with no guarantees or warranties but with
- * plenty of well-wishing instead!
- * Please visit <a href="http://iharder.net/base64">http://iharder.net/base64</a>
- * periodically to check for updates or to contribute improvements.
- * </p>
- *
- * @author Robert Harder
- * @author rob at iharder.net
- * @version 2.2.1
- */
-public class Base64
-{
-    
-/* ********  P U B L I C   F I E L D S  ******** */   
-    
-    
-    /** No options specified. Value is zero. */
-    public final static int NO_OPTIONS = 0;
-    
-    /** Specify encoding. */
-    public final static int ENCODE = 1;
-    
-    
-    /** Specify decoding. */
-    public final static int DECODE = 0;
-    
-    
-    /** Specify that data should be gzip-compressed. */
-    public final static int GZIP = 2;
-    
-    
-    /** Don't break lines when encoding (violates strict Base64 specification) */
-    public final static int DONT_BREAK_LINES = 8;
-   
-   /** 
-    * Encode using Base64-like encoding that is URL- and Filename-safe as described
-    * in Section 4 of RFC3548: 
-    * <a href="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>.
-    * It is important to note that data encoded this way is <em>not</em> officially valid Base64, 
-    * or at the very least should not be called Base64 without also specifying that is
-    * was encoded using the URL- and Filename-safe dialect.
-    */
-    public final static int URL_SAFE = 16;
-    
-    
-    /**
-     * Encode using the special "ordered" dialect of Base64 described here:
-     * <a href="http://www.faqs.org/qa/rfcc-1940.html">http://www.faqs.org/qa/rfcc-1940.html</a>.
-     */
-    public final static int ORDERED = 32;
-    
-    
-/* ********  P R I V A T E   F I E L D S  ******** */  
-    
-    
-    /** Maximum line length (76) of Base64 output. */
-    private final static int MAX_LINE_LENGTH = 76;
-    
-    
-    /** The equals sign (=) as a byte. */
-    private final static byte EQUALS_SIGN = (byte)'=';
-    
-    
-    /** The new line character (\n) as a byte. */
-    private final static byte NEW_LINE = (byte)'\n';
-    
-    
-    /** Preferred encoding. */
-    private final static String PREFERRED_ENCODING = "UTF-8";
-    
-   
-    // I think I end up not using the BAD_ENCODING indicator.
-    //private final static byte BAD_ENCODING    = -9; // Indicates error in encoding
-    private final static byte WHITE_SPACE_ENC = -5; // Indicates white space in encoding
-    private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding
-   
-   
-/* ********  S T A N D A R D   B A S E 6 4   A L P H A B E T  ******** */  
-    
-    /** The 64 valid Base64 values. */
-    //private final static byte[] ALPHABET;
-   /* Host platform me be something funny like EBCDIC, so we hardcode these values. */
-   private final static byte[] _STANDARD_ALPHABET =
-    {
-        (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
-        (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
-        (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', 
-        (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
-        (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
-        (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',
-        (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', 
-        (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z',
-        (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', 
-        (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'
-    };
-   
-    
-    /** 
-     * Translates a Base64 value to either its 6-bit reconstruction value
-     * or a negative number indicating some other meaning.
-     **/
-    private final static byte[] _STANDARD_DECODABET =
-    {   
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,                 // Decimal  0 -  8
-        -5,-5,                                      // Whitespace: Tab and Linefeed
-        -9,-9,                                      // Decimal 11 - 12
-        -5,                                         // Whitespace: Carriage Return
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 14 - 26
-        -9,-9,-9,-9,-9,                             // Decimal 27 - 31
-        -5,                                         // Whitespace: Space
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,              // Decimal 33 - 42
-        62,                                         // Plus sign at decimal 43
-        -9,-9,-9,                                   // Decimal 44 - 46
-        63,                                         // Slash at decimal 47
-        52,53,54,55,56,57,58,59,60,61,              // Numbers zero through nine
-        -9,-9,-9,                                   // Decimal 58 - 60
-        -1,                                         // Equals sign at decimal 61
-        -9,-9,-9,                                      // Decimal 62 - 64
-        0,1,2,3,4,5,6,7,8,9,10,11,12,13,            // Letters 'A' through 'N'
-        14,15,16,17,18,19,20,21,22,23,24,25,        // Letters 'O' through 'Z'
-        -9,-9,-9,-9,-9,-9,                          // Decimal 91 - 96
-        26,27,28,29,30,31,32,33,34,35,36,37,38,     // Letters 'a' through 'm'
-        39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
-        -9,-9,-9,-9                                 // Decimal 123 - 126
-        /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 127 - 139
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 */
-    };
-   
-   
-/* ********  U R L   S A F E   B A S E 6 4   A L P H A B E T  ******** */
-   
-   /**
-    * Used in the URL- and Filename-safe dialect described in Section 4 of RFC3548: 
-    * <a href="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>.
-    * Notice that the last two bytes become "hyphen" and "underscore" instead of "plus" and "slash."
-    */
-    private final static byte[] _URL_SAFE_ALPHABET =
-    {
-      (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
-      (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
-      (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', 
-      (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
-      (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
-      (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',
-      (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', 
-      (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z',
-      (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', 
-      (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'-', (byte)'_'
-    };
-   
-   /**
-    * Used in decoding URL- and Filename-safe dialects of Base64.
-    */
-    private final static byte[] _URL_SAFE_DECODABET =
-    {   
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,                 // Decimal  0 -  8
-      -5,-5,                                      // Whitespace: Tab and Linefeed
-      -9,-9,                                      // Decimal 11 - 12
-      -5,                                         // Whitespace: Carriage Return
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 14 - 26
-      -9,-9,-9,-9,-9,                             // Decimal 27 - 31
-      -5,                                         // Whitespace: Space
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,              // Decimal 33 - 42
-      -9,                                         // Plus sign at decimal 43
-      -9,                                         // Decimal 44
-      62,                                         // Minus sign at decimal 45
-      -9,                                         // Decimal 46
-      -9,                                         // Slash at decimal 47
-      52,53,54,55,56,57,58,59,60,61,              // Numbers zero through nine
-      -9,-9,-9,                                   // Decimal 58 - 60
-      -1,                                         // Equals sign at decimal 61
-      -9,-9,-9,                                   // Decimal 62 - 64
-      0,1,2,3,4,5,6,7,8,9,10,11,12,13,            // Letters 'A' through 'N'
-      14,15,16,17,18,19,20,21,22,23,24,25,        // Letters 'O' through 'Z'
-      -9,-9,-9,-9,                                // Decimal 91 - 94
-      63,                                         // Underscore at decimal 95
-      -9,                                         // Decimal 96
-      26,27,28,29,30,31,32,33,34,35,36,37,38,     // Letters 'a' through 'm'
-      39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
-      -9,-9,-9,-9                                 // Decimal 123 - 126
-      /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 127 - 139
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 */
-    };
-
-
-
-/* ********  O R D E R E D   B A S E 6 4   A L P H A B E T  ******** */
-
-   /**
-    * I don't get the point of this technique, but it is described here:
-    * <a href="http://www.faqs.org/qa/rfcc-1940.html">http://www.faqs.org/qa/rfcc-1940.html</a>.
-    */
-    private final static byte[] _ORDERED_ALPHABET =
-    {
-      (byte)'-',
-      (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4',
-      (byte)'5', (byte)'6', (byte)'7', (byte)'8', (byte)'9',
-      (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
-      (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
-      (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U',
-      (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
-      (byte)'_',
-      (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
-      (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',
-      (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u',
-      (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z'
-    };
-   
-   /**
-    * Used in decoding the "ordered" dialect of Base64.
-    */
-    private final static byte[] _ORDERED_DECODABET =
-    {   
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,                 // Decimal  0 -  8
-      -5,-5,                                      // Whitespace: Tab and Linefeed
-      -9,-9,                                      // Decimal 11 - 12
-      -5,                                         // Whitespace: Carriage Return
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 14 - 26
-      -9,-9,-9,-9,-9,                             // Decimal 27 - 31
-      -5,                                         // Whitespace: Space
-      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,              // Decimal 33 - 42
-      -9,                                         // Plus sign at decimal 43
-      -9,                                         // Decimal 44
-      0,                                          // Minus sign at decimal 45
-      -9,                                         // Decimal 46
-      -9,                                         // Slash at decimal 47
-      1,2,3,4,5,6,7,8,9,10,                       // Numbers zero through nine
-      -9,-9,-9,                                   // Decimal 58 - 60
-      -1,                                         // Equals sign at decimal 61
-      -9,-9,-9,                                   // Decimal 62 - 64
-      11,12,13,14,15,16,17,18,19,20,21,22,23,     // Letters 'A' through 'M'
-      24,25,26,27,28,29,30,31,32,33,34,35,36,     // Letters 'N' through 'Z'
-      -9,-9,-9,-9,                                // Decimal 91 - 94
-      37,                                         // Underscore at decimal 95
-      -9,                                         // Decimal 96
-      38,39,40,41,42,43,44,45,46,47,48,49,50,     // Letters 'a' through 'm'
-      51,52,53,54,55,56,57,58,59,60,61,62,63,     // Letters 'n' through 'z'
-      -9,-9,-9,-9                                 // Decimal 123 - 126
-      /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 127 - 139
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
-        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 */
-    };
-
-   
-/* ********  D E T E R M I N E   W H I C H   A L H A B E T  ******** */
-
-
-   /**
-    * Returns one of the _SOMETHING_ALPHABET byte arrays depending on
-    * the options specified.
-    * It's possible, though silly, to specify ORDERED and URLSAFE
-    * in which case one of them will be picked, though there is
-    * no guarantee as to which one will be picked.
-    */
-   private final static byte[] getAlphabet( int options )
-   {
-      if( (options & URL_SAFE) == URL_SAFE ) return _URL_SAFE_ALPHABET;
-      else if( (options & ORDERED) == ORDERED ) return _ORDERED_ALPHABET;
-      else return _STANDARD_ALPHABET;
-      
-   }  // end getAlphabet
-   
-   
-   /**
-    * Returns one of the _SOMETHING_DECODABET byte arrays depending on
-    * the options specified.
-    * It's possible, though silly, to specify ORDERED and URL_SAFE
-    * in which case one of them will be picked, though there is
-    * no guarantee as to which one will be picked.
-    */
-   private final static byte[] getDecodabet( int options )
-   {
-      if( (options & URL_SAFE) == URL_SAFE ) return _URL_SAFE_DECODABET;
-      else if( (options & ORDERED) == ORDERED ) return _ORDERED_DECODABET;
-      else return _STANDARD_DECODABET;
-      
-   }  // end getAlphabet
-        
-
-    
-    /** Defeats instantiation. */
-    private Base64(){}
-    
-
-    /**
-     * Encodes or decodes two files from the command line;
-     * <strong>feel free to delete this method (in fact you probably should)
-     * if you're embedding this code into a larger program.</strong>
-     */
-    public final static void main( String[] args )
-    {
-        if( args.length < 3 ){
-            usage("Not enough arguments.");
-        }   // end if: args.length < 3
-        else {
-            String flag = args[0];
-            String infile = args[1];
-            String outfile = args[2];
-            if( flag.equals( "-e" ) ){
-                Base64.encodeFileToFile( infile, outfile );
-            }   // end if: encode
-            else if( flag.equals( "-d" ) ) {
-                Base64.decodeFileToFile( infile, outfile );
-            }   // end else if: decode    
-            else {
-                usage( "Unknown flag: " + flag );
-            }   // end else    
-        }   // end else
-    }   // end main
-
-    /**
-     * Prints command line usage.
-     *
-     * @param msg A message to include with usage info.
-     */
-    private final static void usage( String msg )
-    {
-        System.err.println( msg );
-        System.err.println( "Usage: java Base64 -e|-d inputfile outputfile" );
-    }   // end usage
-    
-    
-/* ********  E N C O D I N G   M E T H O D S  ******** */    
-    
-    
-    /**
-     * Encodes up to the first three bytes of array <var>threeBytes</var>
-     * and returns a four-byte array in Base64 notation.
-     * The actual number of significant bytes in your array is
-     * given by <var>numSigBytes</var>.
-     * The array <var>threeBytes</var> needs only be as big as
-     * <var>numSigBytes</var>.
-     * Code can reuse a byte array by passing a four-byte array as <var>b4</var>.
-     *
-     * @param b4 A reusable byte array to reduce array instantiation
-     * @param threeBytes the array to convert
-     * @param numSigBytes the number of significant bytes in your array
-     * @return four byte array in Base64 notation.
-     * @since 1.5.1
-     */
-    private static byte[] encode3to4( byte[] b4, byte[] threeBytes, int numSigBytes, int options )
-    {
-        encode3to4( threeBytes, 0, numSigBytes, b4, 0, options );
-        return b4;
-    }   // end encode3to4
-
-    
-    /**
-     * <p>Encodes up to three bytes of the array <var>source</var>
-     * and writes the resulting four Base64 bytes to <var>destination</var>.
-     * The source and destination arrays can be manipulated
-     * anywhere along their length by specifying 
-     * <var>srcOffset</var> and <var>destOffset</var>.
-     * This method does not check to make sure your arrays
-     * are large enough to accomodate <var>srcOffset</var> + 3 for
-     * the <var>source</var> array or <var>destOffset</var> + 4 for
-     * the <var>destination</var> array.
-     * The actual number of significant bytes in your array is
-     * given by <var>numSigBytes</var>.</p>
-    * <p>This is the lowest level of the encoding methods with
-    * all possible parameters.</p>
-     *
-     * @param source the array to convert
-     * @param srcOffset the index where conversion begins
-     * @param numSigBytes the number of significant bytes in your array
-     * @param destination the array to hold the conversion
-     * @param destOffset the index where output will be put
-     * @return the <var>destination</var> array
-     * @since 1.3
-     */
-    private static byte[] encode3to4( 
-     byte[] source, int srcOffset, int numSigBytes,
-     byte[] destination, int destOffset, int options )
-    {
-      byte[] ALPHABET = getAlphabet( options ); 
-   
-        //           1         2         3  
-        // 01234567890123456789012345678901 Bit position
-        // --------000000001111111122222222 Array position from threeBytes
-        // --------|    ||    ||    ||    | Six bit groups to index ALPHABET
-        //          >>18  >>12  >> 6  >> 0  Right shift necessary
-        //                0x3f  0x3f  0x3f  Additional AND
-        
-        // Create buffer with zero-padding if there are only one or two
-        // significant bytes passed in the array.
-        // We have to shift left 24 in order to flush out the 1's that appear
-        // when Java treats a value as negative that is cast from a byte to an int.
-        int inBuff =   ( numSigBytes > 0 ? ((source[ srcOffset     ] << 24) >>>  8) : 0 )
-                     | ( numSigBytes > 1 ? ((source[ srcOffset + 1 ] << 24) >>> 16) : 0 )
-                     | ( numSigBytes > 2 ? ((source[ srcOffset + 2 ] << 24) >>> 24) : 0 );
-
-        switch( numSigBytes )
-        {
-            case 3:
-                destination[ destOffset     ] = ALPHABET[ (inBuff >>> 18)        ];
-                destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ];
-                destination[ destOffset + 2 ] = ALPHABET[ (inBuff >>>  6) & 0x3f ];
-                destination[ destOffset + 3 ] = ALPHABET[ (inBuff       ) & 0x3f ];
-                return destination;
-                
-            case 2:
-                destination[ destOffset     ] = ALPHABET[ (inBuff >>> 18)        ];
-                destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ];
-                destination[ destOffset + 2 ] = ALPHABET[ (inBuff >>>  6) & 0x3f ];
-                destination[ destOffset + 3 ] = EQUALS_SIGN;
-                return destination;
-                
-            case 1:
-                destination[ destOffset     ] = ALPHABET[ (inBuff >>> 18)        ];
-                destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ];
-                destination[ destOffset + 2 ] = EQUALS_SIGN;
-                destination[ destOffset + 3 ] = EQUALS_SIGN;
-                return destination;
-                
-            default:
-                return destination;
-        }   // end switch
-    }   // end encode3to4
-    
-    
-    
-    /**
-     * Serializes an object and returns the Base64-encoded
-     * version of that serialized object. If the object
-     * cannot be serialized or there is another error,
-     * the method will return <tt>null</tt>.
-     * The object is not GZip-compressed before being encoded.
-     *
-     * @param serializableObject The object to encode
-     * @return The Base64-encoded object
-     * @since 1.4
-     */
-    public static String encodeObject( java.io.Serializable serializableObject )
-    {
-        return encodeObject( serializableObject, NO_OPTIONS );
-    }   // end encodeObject
-    
-
-
-    /**
-     * Serializes an object and returns the Base64-encoded
-     * version of that serialized object. If the object
-     * cannot be serialized or there is another error,
-     * the method will return <tt>null</tt>.
-     * <p>
-     * Valid options:<pre>
-     *   GZIP: gzip-compresses object before encoding it.
-     *   DONT_BREAK_LINES: don't break lines at 76 characters
-     *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-     * </pre>
-     * <p>
-     * Example: <code>encodeObject( myObj, Base64.GZIP )</code> or
-     * <p>
-     * Example: <code>encodeObject( myObj, Base64.GZIP | Base64.DONT_BREAK_LINES )</code>
-     *
-     * @param serializableObject The object to encode
-     * @param options Specified options
-     * @return The Base64-encoded object
-     * @see Base64#GZIP
-     * @see Base64#DONT_BREAK_LINES
-     * @since 2.0
-     */
-    public static String encodeObject( java.io.Serializable serializableObject, int options )
-    {
-        // Streams
-        java.io.ByteArrayOutputStream  baos  = null; 
-        java.io.OutputStream           b64os = null; 
-        java.io.ObjectOutputStream     oos   = null; 
-        java.util.zip.GZIPOutputStream gzos  = null;
-        
-        // Isolate options
-        int gzip           = (options & GZIP);
-        //int dontBreakLines = (options & DONT_BREAK_LINES);
-        
-        try
-        {
-            // ObjectOutputStream -> (GZIP) -> Base64 -> ByteArrayOutputStream
-            baos  = new java.io.ByteArrayOutputStream();
-            b64os = new Base64.OutputStream( baos, ENCODE | options );
-    
-            // GZip?
-            if( gzip == GZIP )
-            {
-                gzos = new java.util.zip.GZIPOutputStream( b64os );
-                oos  = new java.io.ObjectOutputStream( gzos );
-            }   // end if: gzip
-            else
-                oos   = new java.io.ObjectOutputStream( b64os );
-            
-            oos.writeObject( serializableObject );
-        }   // end try
-        catch( java.io.IOException e )
-        {
-            e.printStackTrace();
-            return null;
-        }   // end catch
-        finally
-        {
-            try{ oos.close();   } catch( Exception e ){}
-            try{ gzos.close();  } catch( Exception e ){}
-            try{ b64os.close(); } catch( Exception e ){}
-            try{ baos.close();  } catch( Exception e ){}
-        }   // end finally
-        
-        // Return value according to relevant encoding.
-        try 
-        {
-            return new String( baos.toByteArray(), PREFERRED_ENCODING );
-        }   // end try
-        catch (java.io.UnsupportedEncodingException uue)
-        {
-            return new String( baos.toByteArray() );
-        }   // end catch
-        
-    }   // end encode
-    
-    
-
-    /**
-     * Encodes a byte array into Base64 notation.
-     * Does not GZip-compress data.
-     *
-     * @param source The data to convert
-     * @since 1.4
-     */
-    public static String encodeBytes( byte[] source )
-    {
-        return encodeBytes( source, 0, source.length, NO_OPTIONS );
-    }   // end encodeBytes
-    
-
-
-    /**
-     * Encodes a byte array into Base64 notation.
-     * <p>
-     * Valid options:<pre>
-     *   GZIP: gzip-compresses object before encoding it.
-     *   DONT_BREAK_LINES: don't break lines at 76 characters
-     *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-     * </pre>
-     * <p>
-     * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or
-     * <p>
-     * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code>
-     *
-     *
-     * @param source The data to convert
-     * @param options Specified options
-     * @see Base64#GZIP
-     * @see Base64#DONT_BREAK_LINES
-     * @since 2.0
-     */
-    public static String encodeBytes( byte[] source, int options )
-    {   
-        return encodeBytes( source, 0, source.length, options );
-    }   // end encodeBytes
-    
-    
-    /**
-     * Encodes a byte array into Base64 notation.
-     * Does not GZip-compress data.
-     *
-     * @param source The data to convert
-     * @param off Offset in array where conversion should begin
-     * @param len Length of data to convert
-     * @since 1.4
-     */
-    public static String encodeBytes( byte[] source, int off, int len )
-    {
-        return encodeBytes( source, off, len, NO_OPTIONS );
-    }   // end encodeBytes
-    
-    
-
-    /**
-     * Encodes a byte array into Base64 notation.
-     * <p>
-     * Valid options:<pre>
-     *   GZIP: gzip-compresses object before encoding it.
-     *   DONT_BREAK_LINES: don't break lines at 76 characters
-     *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-     * </pre>
-     * <p>
-     * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or
-     * <p>
-     * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code>
-     *
-     *
-     * @param source The data to convert
-     * @param off Offset in array where conversion should begin
-     * @param len Length of data to convert
-     * @param options Specified options, alphabet type is pulled from this (standard, url-safe, ordered)
-     * @see Base64#GZIP
-     * @see Base64#DONT_BREAK_LINES
-     * @since 2.0
-     */
-    public static String encodeBytes( byte[] source, int off, int len, int options )
-    {
-        // Isolate options
-        int dontBreakLines = ( options & DONT_BREAK_LINES );
-        int gzip           = ( options & GZIP   );
-        
-        // Compress?
-        if( gzip == GZIP )
-        {
-            java.io.ByteArrayOutputStream  baos  = null;
-            java.util.zip.GZIPOutputStream gzos  = null;
-            Base64.OutputStream            b64os = null;
-            
-    
-            try
-            {
-                // GZip -> Base64 -> ByteArray
-                baos = new java.io.ByteArrayOutputStream();
-                b64os = new Base64.OutputStream( baos, ENCODE | options );
-                gzos  = new java.util.zip.GZIPOutputStream( b64os ); 
-            
-                gzos.write( source, off, len );
-                gzos.close();
-            }   // end try
-            catch( java.io.IOException e )
-            {
-                e.printStackTrace();
-                return null;
-            }   // end catch
-            finally
-            {
-                try{ gzos.close();  } catch( Exception e ){}
-                try{ b64os.close(); } catch( Exception e ){}
-                try{ baos.close();  } catch( Exception e ){}
-            }   // end finally
-
-            // Return value according to relevant encoding.
-            try
-            {
-                return new String( baos.toByteArray(), PREFERRED_ENCODING );
-            }   // end try
-            catch (java.io.UnsupportedEncodingException uue)
-            {
-                return new String( baos.toByteArray() );
-            }   // end catch
-        }   // end if: compress
-        
-        // Else, don't compress. Better not to use streams at all then.
-        else
-        {
-            // Convert option to boolean in way that code likes it.
-            boolean breakLines = dontBreakLines == 0;
-            
-            int    len43   = len * 4 / 3;
-            byte[] outBuff = new byte[   ( len43 )                      // Main 4:3
-                                       + ( (len % 3) > 0 ? 4 : 0 )      // Account for padding
-                                       + (breakLines ? ( len43 / MAX_LINE_LENGTH ) : 0) ]; // New lines      
-            int d = 0;
-            int e = 0;
-            int len2 = len - 2;
-            int lineLength = 0;
-            for( ; d < len2; d+=3, e+=4 )
-            {
-                encode3to4( source, d+off, 3, outBuff, e, options );
-
-                lineLength += 4;
-                if( breakLines && lineLength == MAX_LINE_LENGTH )
-                {   
-                    outBuff[e+4] = NEW_LINE;
-                    e++;
-                    lineLength = 0;
-                }   // end if: end of line
-            }   // en dfor: each piece of array
-
-            if( d < len )
-            {
-                encode3to4( source, d+off, len - d, outBuff, e, options );
-                e += 4;
-            }   // end if: some padding needed
-
-            
-            // Return value according to relevant encoding.
-            try
-            {
-                return new String( outBuff, 0, e, PREFERRED_ENCODING );
-            }   // end try
-            catch (java.io.UnsupportedEncodingException uue)
-            {
-                return new String( outBuff, 0, e );
-            }   // end catch
-            
-        }   // end else: don't compress
-        
-    }   // end encodeBytes
-    
-
-    
-    
-    
-/* ********  D E C O D I N G   M E T H O D S  ******** */
-    
-    
-    /**
-     * Decodes four bytes from array <var>source</var>
-     * and writes the resulting bytes (up to three of them)
-     * to <var>destination</var>.
-     * The source and destination arrays can be manipulated
-     * anywhere along their length by specifying 
-     * <var>srcOffset</var> and <var>destOffset</var>.
-     * This method does not check to make sure your arrays
-     * are large enough to accomodate <var>srcOffset</var> + 4 for
-     * the <var>source</var> array or <var>destOffset</var> + 3 for
-     * the <var>destination</var> array.
-     * This method returns the actual number of bytes that 
-     * were converted from the Base64 encoding.
-    * <p>This is the lowest level of the decoding methods with
-    * all possible parameters.</p>
-     * 
-     *
-     * @param source the array to convert
-     * @param srcOffset the index where conversion begins
-     * @param destination the array to hold the conversion
-     * @param destOffset the index where output will be put
-    * @param options alphabet type is pulled from this (standard, url-safe, ordered)
-     * @return the number of decoded bytes converted
-     * @since 1.3
-     */
-    private static int decode4to3( byte[] source, int srcOffset, byte[] destination, int destOffset, int options )
-    {
-      byte[] DECODABET = getDecodabet( options ); 
-   
-        // Example: Dk==
-        if( source[ srcOffset + 2] == EQUALS_SIGN )
-        {
-            // Two ways to do the same thing. Don't know which way I like best.
-            //int outBuff =   ( ( DECODABET[ source[ srcOffset    ] ] << 24 ) >>>  6 )
-            //              | ( ( DECODABET[ source[ srcOffset + 1] ] << 24 ) >>> 12 );
-            int outBuff =   ( ( DECODABET[ source[ srcOffset    ] ] & 0xFF ) << 18 )
-                          | ( ( DECODABET[ source[ srcOffset + 1] ] & 0xFF ) << 12 );
-            
-            destination[ destOffset ] = (byte)( outBuff >>> 16 );
-            return 1;
-        }
-        
-        // Example: DkL=
-        else if( source[ srcOffset + 3 ] == EQUALS_SIGN )
-        {
-            // Two ways to do the same thing. Don't know which way I like best.
-            //int outBuff =   ( ( DECODABET[ source[ srcOffset     ] ] << 24 ) >>>  6 )
-            //              | ( ( DECODABET[ source[ srcOffset + 1 ] ] << 24 ) >>> 12 )
-            //              | ( ( DECODABET[ source[ srcOffset + 2 ] ] << 24 ) >>> 18 );
-            int outBuff =   ( ( DECODABET[ source[ srcOffset     ] ] & 0xFF ) << 18 )
-                          | ( ( DECODABET[ source[ srcOffset + 1 ] ] & 0xFF ) << 12 )
-                          | ( ( DECODABET[ source[ srcOffset + 2 ] ] & 0xFF ) <<  6 );
-            
-            destination[ destOffset     ] = (byte)( outBuff >>> 16 );
-            destination[ destOffset + 1 ] = (byte)( outBuff >>>  8 );
-            return 2;
-        }
-        
-        // Example: DkLE
-        else
-        {
-            try{
-            // Two ways to do the same thing. Don't know which way I like best.
-            //int outBuff =   ( ( DECODABET[ source[ srcOffset     ] ] << 24 ) >>>  6 )
-            //              | ( ( DECODABET[ source[ srcOffset + 1 ] ] << 24 ) >>> 12 )
-            //              | ( ( DECODABET[ source[ srcOffset + 2 ] ] << 24 ) >>> 18 )
-            //              | ( ( DECODABET[ source[ srcOffset + 3 ] ] << 24 ) >>> 24 );
-            int outBuff =   ( ( DECODABET[ source[ srcOffset     ] ] & 0xFF ) << 18 )
-                          | ( ( DECODABET[ source[ srcOffset + 1 ] ] & 0xFF ) << 12 )
-                          | ( ( DECODABET[ source[ srcOffset + 2 ] ] & 0xFF ) <<  6)
-                          | ( ( DECODABET[ source[ srcOffset + 3 ] ] & 0xFF )      );
-
-            
-            destination[ destOffset     ] = (byte)( outBuff >> 16 );
-            destination[ destOffset + 1 ] = (byte)( outBuff >>  8 );
-            destination[ destOffset + 2 ] = (byte)( outBuff       );
-
-            return 3;
-            }catch( Exception e){
-//                System.out.println(""+source[srcOffset]+ ": " + ( DECODABET[ source[ srcOffset     ] ]  ) );
-//                System.out.println(""+source[srcOffset+1]+  ": " + ( DECODABET[ source[ srcOffset + 1 ] ]  ) );
-//                System.out.println(""+source[srcOffset+2]+  ": " + ( DECODABET[ source[ srcOffset + 2 ] ]  ) );
-//                System.out.println(""+source[srcOffset+3]+  ": " + ( DECODABET[ source[ srcOffset + 3 ] ]  ) );
-                return -1;
-            }   // end catch
-        }
-    }   // end decodeToBytes
-    
-    
-    
-    
-    /**
-     * Very low-level access to decoding ASCII characters in
-     * the form of a byte array. Does not support automatically
-     * gunzipping or any other "fancy" features.
-     *
-     * @param source The Base64 encoded data
-     * @param off    The offset of where to begin decoding
-     * @param len    The length of characters to decode
-     * @return decoded data
-     * @since 1.3
-     */
-    public static byte[] decode( byte[] source, int off, int len, int options )
-    {
-      byte[] DECODABET = getDecodabet( options );
-   
-        int    len34   = len * 3 / 4;
-        byte[] outBuff = new byte[ len34 ]; // Upper limit on size of output
-        int    outBuffPosn = 0;
-        
-        byte[] b4        = new byte[4];
-        int    b4Posn    = 0;
-        int    i         = 0;
-        byte   sbiCrop   = 0;
-        byte   sbiDecode = 0;
-        for( i = off; i < off+len; i++ )
-        {
-            sbiCrop = (byte)(source[i] & 0x7f); // Only the low seven bits
-            sbiDecode = DECODABET[ sbiCrop ];
-            
-            if( sbiDecode >= WHITE_SPACE_ENC ) // White space, Equals sign or better
-            {
-                if( sbiDecode >= EQUALS_SIGN_ENC )
-                {
-                    b4[ b4Posn++ ] = sbiCrop;
-                    if( b4Posn > 3 )
-                    {
-                        outBuffPosn += decode4to3( b4, 0, outBuff, outBuffPosn, options );
-                        b4Posn = 0;
-                        
-                        // If that was the equals sign, break out of 'for' loop
-                        if( sbiCrop == EQUALS_SIGN )
-                            break;
-                    }   // end if: quartet built
-                    
-                }   // end if: equals sign or better
-                
-            }   // end if: white space, equals sign or better
-            else
-            {
-                System.err.println( "Bad Base64 input character at " + i + ": " + source[i] + "(decimal)" );
-                return null;
-            }   // end else: 
-        }   // each input character
-                                   
-        byte[] out = new byte[ outBuffPosn ];
-        System.arraycopy( outBuff, 0, out, 0, outBuffPosn ); 
-        return out;
-    }   // end decode
-    
-    
-   
-   
-    /**
-     * Decodes data from Base64 notation, automatically
-     * detecting gzip-compressed data and decompressing it.
-     *
-     * @param s the string to decode
-     * @return the decoded data
-     * @since 1.4
-     */
-    public static byte[] decode( String s )
-   {
-      return decode( s, NO_OPTIONS );
-   }
-    
-    
-    /**
-     * Decodes data from Base64 notation, automatically
-     * detecting gzip-compressed data and decompressing it.
-     *
-     * @param s the string to decode
-    * @param options encode options such as URL_SAFE
-     * @return the decoded data
-     * @since 1.4
-     */
-    public static byte[] decode( String s, int options )
-    {   
-        byte[] bytes;
-        try
-        {
-            bytes = s.getBytes( PREFERRED_ENCODING );
-        }   // end try
-        catch( java.io.UnsupportedEncodingException uee )
-        {
-            bytes = s.getBytes();
-        }   // end catch
-      //</change>
-        
-        // Decode
-        bytes = decode( bytes, 0, bytes.length, options );
-        
-        
-        // Check to see if it's gzip-compressed
-        // GZIP Magic Two-Byte Number: 0x8b1f (35615)
-        if( bytes != null && bytes.length >= 4 )
-        {
-            
-            int head = (bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);       
-            if( java.util.zip.GZIPInputStream.GZIP_MAGIC == head ) 
-            {
-                java.io.ByteArrayInputStream  bais = null;
-                java.util.zip.GZIPInputStream gzis = null;
-                java.io.ByteArrayOutputStream baos = null;
-                byte[] buffer = new byte[2048];
-                int    length = 0;
-
-                try
-                {
-                    baos = new java.io.ByteArrayOutputStream();
-                    bais = new java.io.ByteArrayInputStream( bytes );
-                    gzis = new java.util.zip.GZIPInputStream( bais );
-
-                    while( ( length = gzis.read( buffer ) ) >= 0 )
-                    {
-                        baos.write(buffer,0,length);
-                    }   // end while: reading input
-
-                    // No error? Get new bytes.
-                    bytes = baos.toByteArray();
-
-                }   // end try
-                catch( java.io.IOException e )
-                {
-                    // Just return originally-decoded bytes
-                }   // end catch
-                finally
-                {
-                    try{ baos.close(); } catch( Exception e ){}
-                    try{ gzis.close(); } catch( Exception e ){}
-                    try{ bais.close(); } catch( Exception e ){}
-                }   // end finally
-
-            }   // end if: gzipped
-        }   // end if: bytes.length >= 2
-        
-        return bytes;
-    }   // end decode
-
-
-    
-
-    /**
-     * Attempts to decode Base64 data and deserialize a Java
-     * Object within. Returns <tt>null</tt> if there was an error.
-     *
-     * @param encodedObject The Base64 data to decode
-     * @return The decoded and deserialized object
-     * @since 1.5
-     */
-    public static Object decodeToObject( String encodedObject )
-    {
-        // Decode and gunzip if necessary
-        byte[] objBytes = decode( encodedObject );
-        
-        java.io.ByteArrayInputStream  bais = null;
-        java.io.ObjectInputStream     ois  = null;
-        Object obj = null;
-        
-        try
-        {
-            bais = new java.io.ByteArrayInputStream( objBytes );
-            ois  = new java.io.ObjectInputStream( bais );
-        
-            obj = ois.readObject();
-        }   // end try
-        catch( java.io.IOException e )
-        {
-            e.printStackTrace();
-            obj = null;
-        }   // end catch
-        catch( java.lang.ClassNotFoundException e )
-        {
-            e.printStackTrace();
-            obj = null;
-        }   // end catch
-        finally
-        {
-            try{ bais.close(); } catch( Exception e ){}
-            try{ ois.close();  } catch( Exception e ){}
-        }   // end finally
-        
-        return obj;
-    }   // end decodeObject
-    
-    
-    
-    /**
-     * Convenience method for encoding data to a file.
-     *
-     * @param dataToEncode byte array of data to encode in base64 form
-     * @param filename Filename for saving encoded data
-     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise
-     *
-     * @since 2.1
-     */
-    public static boolean encodeToFile( byte[] dataToEncode, String filename )
-    {
-        boolean success = false;
-        Base64.OutputStream bos = null;
-        try
-        {
-            bos = new Base64.OutputStream( 
-                      new java.io.FileOutputStream( filename ), Base64.ENCODE );
-            bos.write( dataToEncode );
-            success = true;
-        }   // end try
-        catch( java.io.IOException e )
-        {
-            
-            success = false;
-        }   // end catch: IOException
-        finally
-        {
-            try{ bos.close(); } catch( Exception e ){}
-        }   // end finally
-        
-        return success;
-    }   // end encodeToFile
-    
-    
-    /**
-     * Convenience method for decoding data to a file.
-     *
-     * @param dataToDecode Base64-encoded data as a string
-     * @param filename Filename for saving decoded data
-     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise
-     *
-     * @since 2.1
-     */
-    public static boolean decodeToFile( String dataToDecode, String filename )
-    {
-        boolean success = false;
-        Base64.OutputStream bos = null;
-        try
-        {
-                bos = new Base64.OutputStream( 
-                          new java.io.FileOutputStream( filename ), Base64.DECODE );
-                bos.write( dataToDecode.getBytes( PREFERRED_ENCODING ) );
-                success = true;
-        }   // end try
-        catch( java.io.IOException e )
-        {
-            success = false;
-        }   // end catch: IOException
-        finally
-        {
-                try{ bos.close(); } catch( Exception e ){}
-        }   // end finally
-        
-        return success;
-    }   // end decodeToFile
-    
-    
-    
-    
-    /**
-     * Convenience method for reading a base64-encoded
-     * file and decoding it.
-     *
-     * @param filename Filename for reading encoded data
-     * @return decoded byte array or null if unsuccessful
-     *
-     * @since 2.1
-     */
-    public static byte[] decodeFromFile( String filename )
-    {
-        byte[] decodedData = null;
-        Base64.InputStream bis = null;
-        try
-        {
-            // Set up some useful variables
-            java.io.File file = new java.io.File( filename );
-            byte[] buffer = null;
-            int length   = 0;
-            int numBytes = 0;
-            
-            // Check for size of file
-            if( file.length() > Integer.MAX_VALUE )
-            {
-                System.err.println( "File is too big for this convenience method (" + file.length() + " bytes)." );
-                return null;
-            }   // end if: file too big for int index
-            buffer = new byte[ (int)file.length() ];
-            
-            // Open a stream
-            bis = new Base64.InputStream( 
-                      new java.io.BufferedInputStream( 
-                      new java.io.FileInputStream( file ) ), Base64.DECODE );
-            
-            // Read until done
-            while( ( numBytes = bis.read( buffer, length, 4096 ) ) >= 0 )
-                length += numBytes;
-            
-            // Save in a variable to return
-            decodedData = new byte[ length ];
-            System.arraycopy( buffer, 0, decodedData, 0, length );
-            
-        }   // end try
-        catch( java.io.IOException e )
-        {
-            System.err.println( "Error decoding from file " + filename );
-        }   // end catch: IOException
-        finally
-        {
-            try{ bis.close(); } catch( Exception e) {}
-        }   // end finally
-        
-        return decodedData;
-    }   // end decodeFromFile
-    
-    
-    
-    /**
-     * Convenience method for reading a binary file
-     * and base64-encoding it.
-     *
-     * @param filename Filename for reading binary data
-     * @return base64-encoded string or null if unsuccessful
-     *
-     * @since 2.1
-     */
-    public static String encodeFromFile( String filename )
-    {
-        String encodedData = null;
-        Base64.InputStream bis = null;
-        try
-        {
-            // Set up some useful variables
-            java.io.File file = new java.io.File( filename );
-            byte[] buffer = new byte[ Math.max((int)(file.length() * 1.4),40) ]; // Need max() for math on small files (v2.2.1)
-            int length   = 0;
-            int numBytes = 0;
-            
-            // Open a stream
-            bis = new Base64.InputStream( 
-                      new java.io.BufferedInputStream( 
-                      new java.io.FileInputStream( file ) ), Base64.ENCODE );
-            
-            // Read until done
-            while( ( numBytes = bis.read( buffer, length, 4096 ) ) >= 0 )
-                length += numBytes;
-            
-            // Save in a variable to return
-            encodedData = new String( buffer, 0, length, Base64.PREFERRED_ENCODING );
-                
-        }   // end try
-        catch( java.io.IOException e )
-        {
-            System.err.println( "Error encoding from file " + filename );
-        }   // end catch: IOException
-        finally
-        {
-            try{ bis.close(); } catch( Exception e) {}
-        }   // end finally
-        
-        return encodedData;
-        }   // end encodeFromFile
-    
-    /**
-     * Reads <tt>infile</tt> and encodes it to <tt>outfile</tt>.
-     *
-     * @param infile Input file
-     * @param outfile Output file
-     * @since 2.2
-     */
-    public static void encodeFileToFile( String infile, String outfile )
-    {
-        String encoded = Base64.encodeFromFile( infile );
-        java.io.OutputStream out = null;
-        try{
-            out = new java.io.BufferedOutputStream(
-                  new java.io.FileOutputStream( outfile ) );
-            out.write( encoded.getBytes("US-ASCII") ); // Strict, 7-bit output.
-        }   // end try
-        catch( java.io.IOException ex ) {
-            ex.printStackTrace();
-        }   // end catch
-        finally {
-            try { out.close(); }
-            catch( Exception ex ){}
-        }   // end finally    
-    }   // end encodeFileToFile
-
-
-    /**
-     * Reads <tt>infile</tt> and decodes it to <tt>outfile</tt>.
-     *
-     * @param infile Input file
-     * @param outfile Output file
-     * @since 2.2
-     */
-    public static void decodeFileToFile( String infile, String outfile )
-    {
-        byte[] decoded = Base64.decodeFromFile( infile );
-        java.io.OutputStream out = null;
-        try{
-            out = new java.io.BufferedOutputStream(
-                  new java.io.FileOutputStream( outfile ) );
-            out.write( decoded );
-        }   // end try
-        catch( java.io.IOException ex ) {
-            ex.printStackTrace();
-        }   // end catch
-        finally {
-            try { out.close(); }
-            catch( Exception ex ){}
-        }   // end finally    
-    }   // end decodeFileToFile
-    
-    
-    /* ********  I N N E R   C L A S S   I N P U T S T R E A M  ******** */
-    
-    
-    
-    /**
-     * A {@link Base64.InputStream} will read data from another
-     * <tt>java.io.InputStream</tt>, given in the constructor,
-     * and encode/decode to/from Base64 notation on the fly.
-     *
-     * @see Base64
-     * @since 1.3
-     */
-    public static class InputStream extends java.io.FilterInputStream
-    {
-        private boolean encode;         // Encoding or decoding
-        private int     position;       // Current position in the buffer
-        private byte[]  buffer;         // Small buffer holding converted data
-        private int     bufferLength;   // Length of buffer (3 or 4)
-        private int     numSigBytes;    // Number of meaningful bytes in the buffer
-        private int     lineLength;
-        private boolean breakLines;     // Break lines at less than 80 characters
-      private int     options;        // Record options used to create the stream.
-      //private byte[]  alphabet;      // Local copies to avoid extra method calls
-      private byte[]  decodabet;    // Local copies to avoid extra method calls
-        
-        
-        /**
-         * Constructs a {@link Base64.InputStream} in DECODE mode.
-         *
-         * @param in the <tt>java.io.InputStream</tt> from which to read data.
-         * @since 1.3
-         */
-        public InputStream( java.io.InputStream in )
-        {   
-            this( in, DECODE );
-        }   // end constructor
-        
-        
-        /**
-         * Constructs a {@link Base64.InputStream} in
-         * either ENCODE or DECODE mode.
-         * <p>
-         * Valid options:<pre>
-         *   ENCODE or DECODE: Encode or Decode as data is read.
-         *   DONT_BREAK_LINES: don't break lines at 76 characters
-         *     (only meaningful when encoding)
-         *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-         * </pre>
-         * <p>
-         * Example: <code>new Base64.InputStream( in, Base64.DECODE )</code>
-         *
-         *
-         * @param in the <tt>java.io.InputStream</tt> from which to read data.
-         * @param options Specified options
-         * @see Base64#ENCODE
-         * @see Base64#DECODE
-         * @see Base64#DONT_BREAK_LINES
-         * @since 2.0
-         */
-        public InputStream( java.io.InputStream in, int options )
-        {   
-            super( in );
-            this.breakLines   = (options & DONT_BREAK_LINES) != DONT_BREAK_LINES;
-            this.encode       = (options & ENCODE) == ENCODE;
-            this.bufferLength = encode ? 4 : 3;
-            this.buffer       = new byte[ bufferLength ];
-            this.position     = -1;
-            this.lineLength   = 0;
-         this.options      = options; // Record for later, mostly to determine which alphabet to use
-         //this.alphabet     = getAlphabet(options);
-         this.decodabet    = getDecodabet(options);
-        }   // end constructor
-        
-        /**
-         * Reads enough of the input stream to convert
-         * to/from Base64 and returns the next byte.
-         *
-         * @return next byte
-         * @since 1.3
-         */
-        @Override
-        public int read() throws java.io.IOException 
-        { 
-            // Do we need to get data?
-            if( position < 0 )
-            {
-                if( encode )
-                {
-                    byte[] b3 = new byte[3];
-                    int numBinaryBytes = 0;
-                    for( int i = 0; i < 3; i++ )
-                    {
-                        try
-                        { 
-                            int b = in.read();
-                            
-                            // If end of stream, b is -1.
-                            if( b >= 0 )
-                            {
-                                b3[i] = (byte)b;
-                                numBinaryBytes++;
-                            }   // end if: not end of stream
-                            
-                        }   // end try: read
-                        catch( java.io.IOException e )
-                        {   
-                            // Only a problem if we got no data at all.
-                            if( i == 0 )
-                                throw e;
-                            
-                        }   // end catch
-                    }   // end for: each needed input byte
-                    
-                    if( numBinaryBytes > 0 )
-                    {
-                        encode3to4( b3, 0, numBinaryBytes, buffer, 0, options );
-                        position = 0;
-                        numSigBytes = 4;
-                    }   // end if: got data
-                    else
-                    {
-                        return -1;
-                    }   // end else
-                }   // end if: encoding
-                
-                // Else decoding
-                else
-                {
-                    byte[] b4 = new byte[4];
-                    int i = 0;
-                    for( i = 0; i < 4; i++ )
-                    {
-                        // Read four "meaningful" bytes:
-                        int b = 0;
-                        do{ b = in.read(); }
-                        while( b >= 0 && decodabet[ b & 0x7f ] <= WHITE_SPACE_ENC );
-                        
-                        if( b < 0 )
-                            break; // Reads a -1 if end of stream
-                        
-                        b4[i] = (byte)b;
-                    }   // end for: each needed input byte
-                    
-                    if( i == 4 )
-                    {
-                        numSigBytes = decode4to3( b4, 0, buffer, 0, options );
-                        position = 0;
-                    }   // end if: got four characters
-                    else if( i == 0 ){
-                        return -1;
-                    }   // end else if: also padded correctly
-                    else
-                    {
-                        // Must have broken out from above.
-                        throw new java.io.IOException( "Improperly padded Base64 input." );
-                    }   // end 
-                    
-                }   // end else: decode
-            }   // end else: get data
-            
-            // Got data?
-            if( position >= 0 )
-            {
-                // End of relevant data?
-                if( /*!encode &&*/ position >= numSigBytes )
-                    return -1;
-                
-                if( encode && breakLines && lineLength >= MAX_LINE_LENGTH )
-                {
-                    lineLength = 0;
-                    return '\n';
-                }   // end if
-                else
-                {
-                    lineLength++;   // This isn't important when decoding
-                                    // but throwing an extra "if" seems
-                                    // just as wasteful.
-                    
-                    int b = buffer[ position++ ];
-
-                    if( position >= bufferLength )
-                        position = -1;
-
-                    return b & 0xFF; // This is how you "cast" a byte that's
-                                     // intended to be unsigned.
-                }   // end else
-            }   // end if: position >= 0
-            
-            // Else error
-            else
-            {   
-                // When JDK1.4 is more accepted, use an assertion here.
-                throw new java.io.IOException( "Error in Base64 code reading stream." );
-            }   // end else
-        }   // end read
-        
-        
-        /**
-         * Calls {@link #read()} repeatedly until the end of stream
-         * is reached or <var>len</var> bytes are read.
-         * Returns number of bytes read into array or -1 if
-         * end of stream is encountered.
-         *
-         * @param dest array to hold values
-         * @param off offset for array
-         * @param len max number of bytes to read into array
-         * @return bytes read into array or -1 if end of stream is encountered.
-         * @since 1.3
-         */
-        @Override
-        public int read( byte[] dest, int off, int len ) throws java.io.IOException
-        {
-            int i;
-            int b;
-            for( i = 0; i < len; i++ )
-            {
-                b = read();
-                
-                //if( b < 0 && i == 0 )
-                //    return -1;
-                
-                if( b >= 0 )
-                    dest[off + i] = (byte)b;
-                else if( i == 0 )
-                    return -1;
-                else
-                    break; // Out of 'for' loop
-            }   // end for: each byte read
-            return i;
-        }   // end read
-        
-    }   // end inner class InputStream
-    
-    
-    
-    
-    
-    
-    /* ********  I N N E R   C L A S S   O U T P U T S T R E A M  ******** */
-    
-    
-    
-    /**
-     * A {@link Base64.OutputStream} will write data to another
-     * <tt>java.io.OutputStream</tt>, given in the constructor,
-     * and encode/decode to/from Base64 notation on the fly.
-     *
-     * @see Base64
-     * @since 1.3
-     */
-    public static class OutputStream extends java.io.FilterOutputStream
-    {
-        private boolean encode;
-        private int     position;
-        private byte[]  buffer;
-        private int     bufferLength;
-        private int     lineLength;
-        private boolean breakLines;
-        private byte[]  b4; // Scratch used in a few places
-        private boolean suspendEncoding;
-      private int options; // Record for later
-      //private byte[]  alphabet;      // Local copies to avoid extra method calls
-      private byte[]  decodabet;    // Local copies to avoid extra method calls
-        
-        /**
-         * Constructs a {@link Base64.OutputStream} in ENCODE mode.
-         *
-         * @param out the <tt>java.io.OutputStream</tt> to which data will be written.
-         * @since 1.3
-         */
-        public OutputStream( java.io.OutputStream out )
-        {   
-            this( out, ENCODE );
-        }   // end constructor
-        
-        
-        /**
-         * Constructs a {@link Base64.OutputStream} in
-         * either ENCODE or DECODE mode.
-         * <p>
-         * Valid options:<pre>
-         *   ENCODE or DECODE: Encode or Decode as data is read.
-         *   DONT_BREAK_LINES: don't break lines at 76 characters
-         *     (only meaningful when encoding)
-         *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-         * </pre>
-         * <p>
-         * Example: <code>new Base64.OutputStream( out, Base64.ENCODE )</code>
-         *
-         * @param out the <tt>java.io.OutputStream</tt> to which data will be written.
-         * @param options Specified options.
-         * @see Base64#ENCODE
-         * @see Base64#DECODE
-         * @see Base64#DONT_BREAK_LINES
-         * @since 1.3
-         */
-        public OutputStream( java.io.OutputStream out, int options )
-        {   
-            super( out );
-            this.breakLines   = (options & DONT_BREAK_LINES) != DONT_BREAK_LINES;
-            this.encode       = (options & ENCODE) == ENCODE;
-            this.bufferLength = encode ? 3 : 4;
-            this.buffer       = new byte[ bufferLength ];
-            this.position     = 0;
-            this.lineLength   = 0;
-            this.suspendEncoding = false;
-            this.b4           = new byte[4];
-         this.options      = options;
-         //this.alphabet     = getAlphabet(options);
-         this.decodabet    = getDecodabet(options);
-        }   // end constructor
-        
-        
-        /**
-         * Writes the byte to the output stream after
-         * converting to/from Base64 notation.
-         * When encoding, bytes are buffered three
-         * at a time before the output stream actually
-         * gets a write() call.
-         * When decoding, bytes are buffered four
-         * at a time.
-         *
-         * @param theByte the byte to write
-         * @since 1.3
-         */
-        @Override
-        public void write(int theByte) throws java.io.IOException
-        {
-            // Encoding suspended?
-            if( suspendEncoding )
-            {
-                super.out.write( theByte );
-                return;
-            }   // end if: supsended
-            
-            // Encode?
-            if( encode )
-            {
-                buffer[ position++ ] = (byte)theByte;
-                if( position >= bufferLength )  // Enough to encode.
-                {
-                    out.write( encode3to4( b4, buffer, bufferLength, options ) );
-
-                    lineLength += 4;
-                    if( breakLines && lineLength >= MAX_LINE_LENGTH )
-                    {
-                        out.write( NEW_LINE );
-                        lineLength = 0;
-                    }   // end if: end of line
-
-                    position = 0;
-                }   // end if: enough to output
-            }   // end if: encoding
-
-            // Else, Decoding
-            else
-            {
-                // Meaningful Base64 character?
-                if( decodabet[ theByte & 0x7f ] > WHITE_SPACE_ENC )
-                {
-                    buffer[ position++ ] = (byte)theByte;
-                    if( position >= bufferLength )  // Enough to output.
-                    {
-                        int len = Base64.decode4to3( buffer, 0, b4, 0, options );
-                        out.write( b4, 0, len );
-                        //out.write( Base64.decode4to3( buffer ) );
-                        position = 0;
-                    }   // end if: enough to output
-                }   // end if: meaningful base64 character
-                else if( decodabet[ theByte & 0x7f ] != WHITE_SPACE_ENC )
-                {
-                    throw new java.io.IOException( "Invalid character in Base64 data." );
-                }   // end else: not white space either
-            }   // end else: decoding
-        }   // end write
-        
-        
-        
-        /**
-         * Calls {@link #write(int)} repeatedly until <var>len</var> 
-         * bytes are written.
-         *
-         * @param theBytes array from which to read bytes
-         * @param off offset for array
-         * @param len max number of bytes to read into array
-         * @since 1.3
-         */
-        @Override
-        public void write( byte[] theBytes, int off, int len ) throws java.io.IOException
-        {
-            // Encoding suspended?
-            if( suspendEncoding )
-            {
-                super.out.write( theBytes, off, len );
-                return;
-            }   // end if: supsended
-            
-            for( int i = 0; i < len; i++ )
-            {
-                write( theBytes[ off + i ] );
-            }   // end for: each byte written
-            
-        }   // end write
-        
-        
-        
-        /**
-         * Method added by PHIL. [Thanks, PHIL. -Rob]
-         * This pads the buffer without closing the stream.
-         */
-        public void flushBase64() throws java.io.IOException 
-        {
-            if( position > 0 )
-            {
-                if( encode )
-                {
-                    out.write( encode3to4( b4, buffer, position, options ) );
-                    position = 0;
-                }   // end if: encoding
-                else
-                {
-                    throw new java.io.IOException( "Base64 input not properly padded." );
-                }   // end else: decoding
-            }   // end if: buffer partially full
-
-        }   // end flush
-
-        
-        /** 
-         * Flushes and closes (I think, in the superclass) the stream. 
-         *
-         * @since 1.3
-         */
-        @Override
-        public void close() throws java.io.IOException
-        {
-            // 1. Ensure that pending characters are written
-            flushBase64();
-
-            // 2. Actually close the stream
-            // Base class both flushes and closes.
-            super.close();
-            
-            buffer = null;
-            out    = null;
-        }   // end close
-        
-        
-        
-        /**
-         * Suspends encoding of the stream.
-         * May be helpful if you need to embed a piece of
-         * base640-encoded data in a stream.
-         *
-         * @since 1.5.1
-         */
-        public void suspendEncoding() throws java.io.IOException 
-        {
-            flushBase64();
-            this.suspendEncoding = true;
-        }   // end suspendEncoding
-        
-        
-        /**
-         * Resumes encoding of the stream.
-         * May be helpful if you need to embed a piece of
-         * base640-encoded data in a stream.
-         *
-         * @since 1.5.1
-         */
-        public void resumeEncoding()
-        {
-            this.suspendEncoding = false;
-        }   // end resumeEncoding
-        
-        
-        
-    }   // end inner class OutputStream
-    
-    
-}   // end class Base64

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Conversions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Conversions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Conversions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,465 +0,0 @@
-package org.jboss.seam.util;
-import java.io.Serializable;
-import java.lang.reflect.Array;
-import java.lang.reflect.Type;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
- at SuppressWarnings("serial")
-public class Conversions
-{
-   private static final String EXPRESSION_MARKER = "#{";
-   private static final char EXPRESSION_ESCAPE_CHAR = '\\';
-   
-   private static Map<Class, Converter> converters = new HashMap<Class, Converter>() {{
-      put(String.class, new StringConverter());
-      put(Boolean.class, new BooleanConverter());
-      put(boolean.class, new BooleanConverter());
-      put(Integer.class, new IntegerConverter());
-      put(int.class, new IntegerConverter());
-      put(Long.class, new LongConverter());
-      put(long.class, new LongConverter());
-      put(Float.class, new FloatConverter());
-      put(float.class, new FloatConverter());
-      put(Double.class, new DoubleConverter());
-      put(double.class, new DoubleConverter());
-      put(Character.class, new CharacterConverter());
-      put(char.class, new CharacterConverter());
-      put(String[].class, new StringArrayConverter());
-      put(Set.class, new SetConverter());
-      put(List.class, new ListConverter());
-      put(Map.class, new MapConverter());
-      put(Properties.class, new PropertiesConverter());
-      //put(Date.class, new DateTimeConverter());
-      //put(Short.class, new ShortConverter());
-      //put(Byte.class, new ByteConverter());
-      put(Enum.class, new EnumConverter());
-      put(BigInteger.class, new BigIntegerConverter());
-      put(BigDecimal.class, new BigDecimalConverter());
-      put(Class.class, new ClassConverter());
-   }};
-   
-   public static <Y> void putConverter(Class<Y> type, Converter<Y> converter)
-   {
-      converters.put(type, converter);
-   }
-   
-   public static <Y> Converter<Y> getConverter(Class<Y> clazz)
-   {
-      Converter<Y> converter = converters.get(clazz);
-      if (converter == null && clazz != null && clazz.isEnum())
-      {
-          converter = converters.get(Enum.class);
-      }
-
-      if (converter==null)
-      {
-          throw new IllegalArgumentException("No converter for type: " + clazz.getName());
-      }
-      return converter;
-   }
-   
-   public static interface Converter<Z>
-   {
-      public Z toObject(PropertyValue value, Type type); 
-   }
-   
-   public static class BooleanConverter implements Converter<Boolean>
-   {
-      public Boolean toObject(PropertyValue value, Type type)
-      {
-         return Boolean.valueOf( value.getSingleValue() );
-      }
-   }
-   
-   public static class IntegerConverter implements Converter<Integer>
-   {
-      public Integer toObject(PropertyValue value, Type type)
-      {
-         return Integer.valueOf( value.getSingleValue() );
-      }
-   }
-   
-   public static class LongConverter implements Converter<Long>
-   {
-      public Long toObject(PropertyValue value, Type type)
-      {
-         return Long.valueOf( value.getSingleValue() );
-      }
-   }
-   
-   public static class FloatConverter implements Converter<Float>
-   {
-      public Float toObject(PropertyValue value, Type type)
-      {
-         return Float.valueOf( value.getSingleValue() );
-      }
-   }
-   
-   public static class DoubleConverter implements Converter<Double>
-   {
-      public Double toObject(PropertyValue value, Type type)
-      {
-         return Double.valueOf( value.getSingleValue() );
-      }
-   }
-   
-   public static class CharacterConverter implements Converter<Character>
-   {
-      public Character toObject(PropertyValue value, Type type)
-      {
-         return value.getSingleValue().charAt(0);
-      }
-   }
-   
-   public static class StringConverter implements Converter<String>
-   {
-      public String toObject(PropertyValue value, Type type)
-      {
-         return  value.getSingleValue() ;
-      }
-   }
-   public static class BigDecimalConverter implements Converter<BigDecimal>
-   {
-      public BigDecimal toObject(PropertyValue value, Type type)
-      {
-         return new BigDecimal(value.getSingleValue());
-      }
-   }
-   public static class BigIntegerConverter implements Converter<BigInteger>
-   {
-      public BigInteger toObject(PropertyValue value, Type type)
-      {
-         return new BigInteger(value.getSingleValue());
-      }
-   }
-
-   public static class EnumConverter implements Converter<Enum<?>>
-   {
-      public Enum<?> toObject(PropertyValue value, Type type)
-      {
-         return Enum.valueOf((Class<Enum>) type, value.getSingleValue());
-      }
-   }
-
-   public static class StringArrayConverter implements Converter<String[]>
-   {
-      public String[] toObject(PropertyValue values, Type type)
-      {
-         return values.getMultiValues();
-      }
-   }
-   
-   public static class ArrayConverter implements Converter
-   {
-      public Object toObject(PropertyValue values, Type type)
-      {
-         String[] strings = values.getMultiValues();
-         Class elementType = ( (Class) type ).getComponentType();
-         Object objects = Array.newInstance( elementType, strings.length );
-         Converter elementConverter = converters.get(elementType);
-         for (int i=0; i<strings.length; i++)
-         {
-            Object element = elementConverter.toObject( new FlatPropertyValue(strings[i]), elementType );
-            Array.set( objects, i, element );
-         }
-         return objects;
-      }
-   }
-   
-   public static class SetConverter implements Converter<Set>
-   {
-      public Set toObject(PropertyValue values, Type type)
-      {
-         String[] strings = values.getMultiValues();
-         Class elementType = Reflections.getCollectionElementType(type);
-         Set set = new HashSet(strings.length);
-         Converter elementConverter = converters.get(elementType);
-         for (int i=0; i<strings.length; i++)
-         {
-            Object element = elementConverter.toObject( new FlatPropertyValue(strings[i]), elementType );
-            set.add(element);
-         }
-         return set;
-      }
-   }
-   
-   public static class ListConverter implements Converter<List>
-   {
-      public List toObject(PropertyValue values, Type type)
-      {
-         String[] strings = values.getMultiValues();
-         Class elementType = Reflections.getCollectionElementType(type);
-         List list = new ArrayList(strings.length);
-         Converter elementConverter = converters.get(elementType);
-         for (int i=0; i<strings.length; i++)
-         {
-            list.add( getElementValue( elementType, elementConverter, strings[i] ) );
-         }
-         return list;
-      }
-
-   }
-   
-   private static Object getElementValue(Class elementType, Converter elementConverter, String string)
-   {
-      PropertyValue propertyValue = new FlatPropertyValue(string);
-      if ( propertyValue.isExpression() )
-      {
-         throw new IllegalArgumentException("No expressions allowed here");
-      }
-      if (elementConverter==null)
-      {
-         throw new IllegalArgumentException("No converter for element type: " + elementType.getName());
-      }
-      return elementConverter.toObject(propertyValue, elementType);
-   }
-   
-   public static class MapConverter implements Converter<Map>
-   {
-      public Map toObject(PropertyValue values, Type type)
-      {
-         Map<String, String> keyedValues = values.getKeyedValues();
-         Class elementType = Reflections.getCollectionElementType(type);
-         Map map = new HashMap( keyedValues.size() );
-         Converter elementConverter = converters.get(elementType);
-         for ( Map.Entry<String, String> me: keyedValues.entrySet() )
-         {
-            map.put( me.getKey(), getElementValue( elementType, elementConverter, me.getValue() ) );
-         }
-         return map;
-      }
-   }
-   
-   public static class PropertiesConverter implements Converter<Properties>
-   {
-      public Properties toObject(PropertyValue values, Type type)
-      {
-         Map<String, String> keyedValues = values.getKeyedValues();
-         Properties map = new Properties();
-         Converter elementConverter = converters.get(String.class);
-         for ( Map.Entry<String, String> me: keyedValues.entrySet() )
-         {
-            String key = me.getKey();
-            Object element = elementConverter.toObject( new FlatPropertyValue( me.getValue() ), String.class );
-            map.put(key, element);
-         }
-         return map;
-      }
-   }
-   
-   public static class ClassConverter implements Converter<Class>
-   {
-      public Class toObject(PropertyValue value, Type type)
-      {
-         try
-         {
-            return Reflections.classForName( value.getSingleValue() );
-         }
-         catch (ClassNotFoundException cnfe)
-         {
-            throw new IllegalArgumentException(cnfe);
-         }
-      }
-   }
-  
-   public static interface PropertyValue extends Serializable
-   {
-      Map<String, String> getKeyedValues();
-      String[] getMultiValues();
-      String getSingleValue();
-      boolean isExpression();
-      boolean isMultiValued();
-      boolean isAssociativeValued();
-      Class getType();
-   }
-   
-   public static class FlatPropertyValue implements PropertyValue
-   {
-      
-      private String string;
-      public FlatPropertyValue(String string)
-      {
-         if (string==null)
-         {
-            throw new IllegalArgumentException("null value");
-         }
-         this.string = string;
-      }
-      public String[] getMultiValues()
-      {
-         return Strings.split(string, ", \r\n\f\t");
-      }
-      public String getSingleValue()
-      {
-         return string;
-      }
-      
-      public boolean isExpression()
-      {
-         boolean containsExpr = false;
-         int idx = string.indexOf(EXPRESSION_MARKER);
-         if (idx == 0) {
-             containsExpr = true;
-         }
-         else {
-             while (idx != -1) {
-                 if (string.charAt(idx - 1) == EXPRESSION_ESCAPE_CHAR) {
-                     idx = string.indexOf(EXPRESSION_MARKER, idx + 2);
-                 }
-                 else {
-                     containsExpr = true;
-                     break;
-                 }
-             }
-         }
-         return containsExpr;
-      }
-      
-      public boolean isMultiValued()
-      {
-         return false;
-      }
-      
-      public boolean isAssociativeValued()
-      {
-         return false;
-      }
-      
-      public Map<String, String> getKeyedValues()
-      {
-         throw new UnsupportedOperationException("not a keyed property value");
-      }
-      
-      @Override
-      public String toString()
-      {
-         return string;
-      }
-      
-      public Class getType()
-      {
-         return null;
-      }
-      
-   }
-   
-   public static class MultiPropertyValue implements PropertyValue
-   {     
-      private String[] strings;
-      
-      private Class type;
-      
-      public MultiPropertyValue(String[] strings, Class type)
-      {
-         if (strings==null) throw new IllegalArgumentException();
-         this.strings = strings;
-         this.type = type;
-      }
-      
-      public String[] getMultiValues()
-      {
-         return strings;
-      }
-      
-      public String getSingleValue()
-      {
-         throw new UnsupportedOperationException("not a flat property value");
-      }
-      
-      public Map<String, String> getKeyedValues()
-      {
-         throw new UnsupportedOperationException("not a keyed property value");
-      }
-      
-      public boolean isMultiValued()
-      {
-         return true;
-      }
-      
-      public boolean isAssociativeValued()
-      {
-         return false;
-      }
-      
-      public boolean isExpression()
-      {
-         return false;
-      }
-      
-      @Override
-      public String toString()
-      {
-         return Strings.toString( ", ", (Object[]) strings );
-      }
-      
-      public Class getType()
-      {
-         return type;
-      }
-   }
-   
-   public static class AssociativePropertyValue implements PropertyValue
-   {      
-      private Map<String, String> keyedValues;
-      
-      private Class type;
-      
-      public AssociativePropertyValue(Map<String, String> keyedValues, Class type)
-      {
-         if (keyedValues==null) throw new IllegalArgumentException();
-         this.keyedValues = keyedValues;
-         this.type = type;
-      }
-      
-      public String[] getMultiValues()
-      {
-         throw new UnsupportedOperationException("not a multi-valued property value");
-      }
-      
-      public String getSingleValue()
-      {
-         throw new UnsupportedOperationException("not a flat property value");
-      }
-      
-      public Map<String, String> getKeyedValues()
-      {
-         return keyedValues;
-      }
-      
-      public boolean isExpression()
-      {
-         return false;
-      }
-      
-      public boolean isMultiValued()
-      {
-         return false;
-      }
-      
-      public boolean isAssociativeValued()
-      {
-         return true;
-      }
-      
-      @Override
-      public String toString()
-      {
-         return keyedValues.toString();
-      }
-      
-      
-      public Class getType()
-      {
-         return type;
-      }
-      
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/DTDEntityResolver.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/DTDEntityResolver.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/DTDEntityResolver.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,91 +0,0 @@
-//$Id: DTDEntityResolver.java 10936 2009-05-21 19:27:34Z norman.richards at jboss.com $
-//Contributed by Markus Meissner
-package org.jboss.seam.util;
-
-import java.io.InputStream;
-import java.io.Serializable;
-
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-/**
- * An {@link EntityResolver} implementation which attempts to resolve
- * various systemId URLs to local classpath lookups<ol>
- * <li>Any systemId URL beginning with <tt>http://jboss.com/products/seam/</tt> is
- * searched for as a classpath resource in the classloader which loaded the
- * Seam classes.</li>
- * <li>Any systemId URL using <tt>classpath</tt> as the scheme (i.e. starting
- * with <tt>classpath://</tt> is searched for as a classpath resource using first
- * the current thread context classloader and then the classloader which loaded
- * the Seam classes.
- * </ol>
- * <p/>
- * Any entity references which cannot be resolved in relation to the above
- * rules result in returning null, which should force the SAX reader to
- * handle the entity reference in its default manner.
- */
-public class DTDEntityResolver implements EntityResolver, Serializable 
-{
-
-    private static final long serialVersionUID = -4553926061006790714L;
-
-    private static final LogProvider log = Logging.getLogProvider(DTDEntityResolver.class);
-
-    private static final String SEAM_NAMESPACE = "http://jboss.com/products/seam/";
-    private static final String USER_NAMESPACE = "classpath://";
-
-    public InputSource resolveEntity(String publicId, String systemId) 
-    {
-        if (systemId != null) {
-            log.trace("trying to resolve system-id [" + systemId + "]");
-            if (systemId.startsWith(SEAM_NAMESPACE)) {
-                log.trace("recognized Seam namespace; attempting to resolve on classpath under org/jboss/seam/");
-                String path = "org/jboss/seam/" + systemId.substring(SEAM_NAMESPACE.length());
-                
-                InputStream dtdStream = resolveInSeamNamespace(path);
-                if (dtdStream == null)  {
-                    log.warn("unable to locate [" + systemId + "] on classpath");
-                } else {
-                    log.debug("located [" + systemId + "] in classpath");
-                    InputSource source = new InputSource(dtdStream);
-                    source.setPublicId(publicId);
-                    source.setSystemId(systemId);
-                    return source;
-                }
-            } else if (systemId.startsWith(USER_NAMESPACE)) {
-                log.trace("recognized local namespace; attempting to resolve on classpath");
-                String path = systemId.substring(USER_NAMESPACE.length());
-                
-                InputStream stream = resolveInLocalNamespace(path);
-                if (stream == null) {
-                    log.warn("unable to locate [" + systemId + "] on classpath");                
-                } else {
-                    log.debug("located [" + systemId + "] in classpath");
-                    InputSource source = new InputSource(stream);
-                    source.setPublicId(publicId);
-                    source.setSystemId(systemId);
-                    return source;
-                }
-            }
-        }
-        // use default behavior
-        return null;
-    }
-
-    protected InputStream resolveInSeamNamespace(String path) 
-    {
-        return this.getClass().getClassLoader().getResourceAsStream(path);
-    }
-
-    protected InputStream resolveInLocalNamespace(String path) 
-    {
-        try  {
-            return Resources.getResourceAsStream(path, ServletLifecycle.getServletContext());
-        } catch (Throwable t) {
-            return null;
-        }
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/DelegatingInvocationHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/DelegatingInvocationHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/DelegatingInvocationHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,102 +0,0 @@
-package org.jboss.seam.util;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-
-/**
- * An InvocationHandler implementation that delegates method invocations to a specified object,
- * optionally allowing the method to be overridden locally. 
- * 
- * @author Shane Bryzak
- */
-public class DelegatingInvocationHandler<T> implements InvocationHandler
-{   
-   private static Log log = Logging.getLog(DelegatingInvocationHandler.class);     
-   
-   private class MethodTarget
-   {
-      public Method method;
-      public Object target;
-      
-      public MethodTarget(Object target, Method method)
-      {
-         this.target = target;
-         this.method = method;
-      }
-   }   
-   
-   private Map<Method,MethodTarget> methodCache = new HashMap<Method,MethodTarget>();
-   private T delegate;
-   
-   public DelegatingInvocationHandler(T delegate)
-   {
-      this.delegate = delegate;
-   }
-   
-   public T getDelegate()
-   {
-      return delegate;
-   }
-   
-   public Object invoke(Object proxy, Method method, Object[] args)
-         throws Throwable
-   {  
-      MethodTarget target = methodCache.get(method);      
-      
-      if (target == null && !methodCache.containsKey(method))
-      {
-         synchronized(methodCache)
-         {
-            if (!methodCache.containsKey(method))
-            {
-               try
-               {
-                  target = new MethodTarget(this, getClass().getMethod(method.getName(), method.getParameterTypes()));                  
-               }
-               catch (NoSuchMethodException ex)
-               {
-                  // Swallow this, we'll try to find a matching method on the delegate
-               }
-               
-               if (target == null)
-               {
-                  try
-                  {
-                     target = new MethodTarget(delegate, delegate.getClass().getMethod(method.getName(), method.getParameterTypes()));
-                  }
-                  catch (NoSuchMethodException ex)
-                  {
-                     // Swallow this, put a null entry in methodCache
-                  }
-               }
-               
-               methodCache.put(method, target);
-            }
-            else
-            {
-               target = methodCache.get(method);               
-            }
-         }                  
-      }
-      
-      if (target == null)
-      {
-         throw new IllegalStateException("Proxied session does not implement method " + method.getName() +
-               " with args [" + (args == null ? null : Arrays.asList(args)) + "]");
-      }
-      
-      if (log.isTraceEnabled())
-      {
-         log.trace("Delegating method " + method.getName() + " with args " + 
-                 (args == null ? null : Arrays.asList(args)));
-      }
-      
-      return target.method.invoke(target.target, args);      
-   }  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EJB.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EJB.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EJB.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,103 +0,0 @@
-package org.jboss.seam.util;
-
-import java.lang.annotation.Annotation;
-
-import javax.ejb.EJBContext;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
-
-public class EJB
-{
-   public static String ejbContextName = "java:comp.ejb3/EJBContext";
-   public static final String STANDARD_EJB_CONTEXT_NAME = "java:comp/EJBContext";
-
-   public @interface Dummy {}
-   
-   public static final Class<Annotation> STATELESS;
-   public static final Class<Annotation> STATEFUL;
-   public static final Class<Annotation> MESSAGE_DRIVEN;
-   public static final Class<Annotation> PRE_PASSIVATE;
-   public static final Class<Annotation> POST_ACTIVATE;
-   public static final Class<Annotation> PRE_DESTROY;
-   public static final Class<Annotation> POST_CONSTRUCT;
-   public static final Class<Annotation> REMOTE;
-   public static final Class<Annotation> REMOVE;
-   public static final Class<Annotation> LOCAL;
-   public static final Class<Annotation> APPLICATION_EXCEPTION;
-   public static final Class<Annotation> PERSISTENCE_CONTEXT;
-   public static final Class<Annotation> INTERCEPTORS;
-   public static final Class<Annotation> AROUND_INVOKE;
-   public static final Class<Annotation> EJB_EXCEPTION;
-   public static final boolean INVOCATION_CONTEXT_AVAILABLE;
-   
-   private static Class classForName(String name)
-   {
-      try
-      {
-         return Reflections.classForName(name);
-      }
-      catch (ClassNotFoundException cnfe)
-      {
-         return Dummy.class;
-      }
-   }
-   
-   static 
-   {
-      STATELESS = classForName("javax.ejb.Stateless");
-      STATEFUL = classForName("javax.ejb.Stateful");
-      MESSAGE_DRIVEN = classForName("javax.ejb.MessageDriven");
-      APPLICATION_EXCEPTION = classForName("javax.ejb.ApplicationException");
-      PERSISTENCE_CONTEXT = classForName("javax.persistence.PersistenceContext");
-      REMOVE = classForName("javax.ejb.Remove");
-      REMOTE = classForName("javax.ejb.Remote");
-      LOCAL = classForName("javax.ejb.Local");
-      PRE_PASSIVATE = classForName("javax.ejb.PrePassivate");
-      POST_ACTIVATE = classForName("javax.ejb.PostActivate");
-      PRE_DESTROY = classForName("javax.annotation.PreDestroy");
-      POST_CONSTRUCT = classForName("javax.annotation.PostConstruct");
-      INTERCEPTORS = classForName("javax.interceptor.Interceptors");
-      AROUND_INVOKE = classForName("javax.interceptor.AroundInvoke");
-      EJB_EXCEPTION = classForName("javax.ejb.EJBException");
-      INVOCATION_CONTEXT_AVAILABLE = !classForName("javax.interceptor.InvocationContext").equals(Dummy.class);
-   }
-   
-   public static String name(Annotation annotation)
-   {
-      return (String) Reflections.invokeAndWrap( Reflections.getMethod(annotation, "name"), annotation );
-   }
-
-   public static Class[] value(Annotation annotation)
-   {
-      return (Class[]) Reflections.invokeAndWrap( Reflections.getMethod(annotation, "value"), annotation );
-   }
-   
-   public static boolean rollback(Annotation annotation)
-   {
-      return (Boolean) Reflections.invokeAndWrap( Reflections.getMethod(annotation, "rollback"), annotation );
-   }
-
-   public static EJBContext getEJBContext() throws NamingException
-   {
-      try
-      {
-         return (EJBContext) Naming.getInitialContext().lookup(ejbContextName);
-      }
-      catch (NameNotFoundException nnfe)
-      {
-         return (EJBContext) Naming.getInitialContext().lookup(STANDARD_EJB_CONTEXT_NAME);
-      }
-   }
-
-   protected static String getEjbContextName()
-   {
-      return ejbContextName;
-   }
-
-   protected static void setEjbContextName(String ejbContextName)
-   {
-      EJB.ejbContextName = ejbContextName;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EnumerationEnumeration.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EnumerationEnumeration.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EnumerationEnumeration.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,69 +0,0 @@
-package org.jboss.seam.util;
-
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-
-public class EnumerationEnumeration<T> implements Enumeration<T>
-{
-   private Enumeration<T>[] enumerations;
-   private int loc = 0;
-
-   public EnumerationEnumeration(Enumeration<T>[] enumerations)
-   {
-      this.enumerations = enumerations;
-   }
-
-   public boolean hasMoreElements()
-   {
-      for (int i = loc; i < enumerations.length; i++)
-      {
-         if (enumerations[i].hasMoreElements())
-         {
-            return true;
-         }
-      }
-      return false;
-   }
-
-   public T nextElement()
-   {
-      while ( isCurrentEnumerationAvailable() )
-      {
-         if ( currentHasMoreElements() )
-         {
-            return currentNextElement();
-         }
-         else
-         {
-            nextEnumeration();
-         }
-      }
-      throw new NoSuchElementException();
-   }
-
-   private void nextEnumeration()
-   {
-      loc++;
-   }
-
-   /*private boolean isNextEnumerationAvailable()
-   {
-      return loc < enumerations.length-1;
-   }*/
-
-   private boolean isCurrentEnumerationAvailable()
-   {
-      return loc < enumerations.length;
-   }
-
-   private T currentNextElement()
-   {
-      return enumerations[loc].nextElement();
-   }
-
-   private boolean currentHasMoreElements()
-   {
-      return enumerations[loc].hasMoreElements();
-   }
-    
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EnumerationIterator.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EnumerationIterator.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/EnumerationIterator.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-package org.jboss.seam.util;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-public class EnumerationIterator<T> implements Iterator<T>
-{
-   private Enumeration e;
-
-   public EnumerationIterator(Enumeration e)
-   {
-      this.e = e;
-   }
-
-   public boolean hasNext()
-   {
-      return e.hasMoreElements();
-   }
-
-   public T next()
-   {
-      return (T) e.nextElement();
-   }
-
-   public void remove()
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Exceptions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Exceptions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Exceptions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,33 +0,0 @@
-package org.jboss.seam.util;
-
-import javax.servlet.ServletException;
-
-public class Exceptions
-{
-
-   public static Exception getCause(Exception exception)
-   {
-      Throwable cause = null;
-      try
-      {
-         if ( EJB.EJB_EXCEPTION.isInstance(exception) )
-         {
-            cause = (Throwable) Reflections.getGetterMethod(EJB.EJB_EXCEPTION, "causedByException").invoke(exception);
-         }
-         else if (exception instanceof ServletException)
-         {
-            cause = ( (ServletException) exception ).getRootCause();
-         }
-         else
-         {
-            cause = exception.getCause();
-         }
-      }
-      catch (Exception x)
-      {
-         return null;
-      }
-      return cause==exception || !(cause instanceof Exception) ? null : (Exception) cause;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Faces.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Faces.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Faces.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,16 +0,0 @@
-package org.jboss.seam.util;
-
-import javax.faces.FacesException;
-import javax.faces.application.ViewHandler;
-import javax.faces.context.FacesContext;
-
-public class Faces
-{
-
-   public static String getDefaultSuffix(FacesContext context) throws FacesException 
-   {
-      String viewSuffix = context.getExternalContext().getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
-      return (viewSuffix != null) ? viewSuffix : ViewHandler.DEFAULT_SUFFIX;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/FacesResources.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/FacesResources.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/FacesResources.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,59 +0,0 @@
-package org.jboss.seam.util;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.faces.context.ExternalContext;
-
-public class FacesResources 
-{
-
-   public static InputStream getResourceAsStream(String resource, ExternalContext context) 
-   {
-      String stripped = resource.startsWith("/") ? 
-            resource.substring(1) : resource;
-   
-      InputStream stream = null; 
-
-      try
-      {
-         if (context!=null)
-         {
-            stream = context.getResourceAsStream(resource);
-         }
-      }
-      catch (Exception e) {}
-      
-      if (stream==null)
-      {
-         stream = Resources.getResourceAsStream(resource, stripped);
-      }
-      
-      return stream;
-   }
-
-   public static URL getResource(String resource, ExternalContext context) 
-   {
-      String stripped = resource.startsWith("/") ? 
-               resource.substring(1) : resource;
-      
-         URL url = null; 
-
-         try
-         {
-            if (context!=null)
-            {
-               url = context.getResource(resource);
-            }
-         }
-         catch (Exception e) {}
-         
-         if (url==null)
-         {
-            url = Resources.getResource(resource, stripped);
-         }
-         
-         return url;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Hex.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Hex.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Hex.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,187 +0,0 @@
-package org.jboss.seam.util;
-
-/**
- * Hex encoder and decoder, ripped off from commons-codec.  DecoderException and
- * EncoderException have been replaced by RuntimeException
- * 
- * @author Apache Software Foundation
- */
-public class Hex
-{
-
-   /** 
-    * Used building output as Hex 
-    */
-   private static final char[] DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a',
-            'b', 'c', 'd', 'e', 'f' };
-
-   /**
-    * Converts an array of characters representing hexidecimal values into an
-    * array of bytes of those same values. The returned array will be half the
-    * length of the passed array, as it takes two characters to represent any
-    * given byte. An exception is thrown if the passed char array has an odd
-    * number of elements.
-    * 
-    * @param data An array of characters containing hexidecimal digits
-    * @return A byte array containing binary data decoded from
-    *         the supplied char array.
-    * @throws RuntimeException Thrown if an odd number or illegal of characters 
-    *         is supplied
-    */
-   public static byte[] decodeHex(char[] data) throws RuntimeException
-   {
-
-      int len = data.length;
-
-      if ((len & 0x01) != 0)
-      {
-         throw new RuntimeException("Odd number of characters.");
-      }
-
-      byte[] out = new byte[len >> 1];
-
-      // two characters form the hex value.
-      for (int i = 0, j = 0; j < len; i++)
-      {
-         int f = toDigit(data[j], j) << 4;
-         j++;
-         f = f | toDigit(data[j], j);
-         j++;
-         out[i] = (byte) (f & 0xFF);
-      }
-
-      return out;
-   }
-
-   /**
-    * Converts a hexadecimal character to an integer.
-    *  
-    * @param ch A character to convert to an integer digit
-    * @param index The index of the character in the source
-    * @return An integer
-    * @throws RuntimeException Thrown if ch is an illegal hex character
-    */
-   protected static int toDigit(char ch, int index) throws RuntimeException
-   {
-      int digit = Character.digit(ch, 16);
-      if (digit == -1)
-      {
-         throw new RuntimeException("Illegal hexadecimal charcter " + ch + " at index " + index);
-      }
-      return digit;
-   }
-
-   /**
-    * Converts an array of bytes into an array of characters representing the hexidecimal values of each byte in order.
-    * The returned array will be double the length of the passed array, as it takes two characters to represent any
-    * given byte.
-    * 
-    * @param data
-    *                  a byte[] to convert to Hex characters
-    * @return A char[] containing hexidecimal characters
-    */
-   public static char[] encodeHex(byte[] data)
-   {
-
-      int l = data.length;
-
-      char[] out = new char[l << 1];
-
-      // two characters form the hex value.
-      for (int i = 0, j = 0; i < l; i++)
-      {
-         out[j++] = DIGITS[(0xF0 & data[i]) >>> 4];
-         out[j++] = DIGITS[0x0F & data[i]];
-      }
-
-      return out;
-   }
-
-   /**
-    * Converts an array of character bytes representing hexidecimal values into an
-    * array of bytes of those same values. The returned array will be half the
-    * length of the passed array, as it takes two characters to represent any
-    * given byte. An exception is thrown if the passed char array has an odd
-    * number of elements.
-    * 
-    * @param array An array of character bytes containing hexidecimal digits
-    * @return A byte array containing binary data decoded from
-    *         the supplied byte array (representing characters).
-    * @throws RuntimeException Thrown if an odd number of characters is supplied
-    *                   to this function
-    * @see #decodeHex(char[])
-    */
-   public byte[] decode(byte[] array) throws RuntimeException
-   {
-      return decodeHex(new String(array).toCharArray());
-   }
-
-   /**
-    * Converts a String or an array of character bytes representing hexidecimal values into an
-    * array of bytes of those same values. The returned array will be half the
-    * length of the passed String or array, as it takes two characters to represent any
-    * given byte. An exception is thrown if the passed char array has an odd
-    * number of elements.
-    * 
-    * @param object A String or, an array of character bytes containing hexidecimal digits
-    * @return A byte array containing binary data decoded from
-    *         the supplied byte array (representing characters).
-    * @throws RuntimeException Thrown if an odd number of characters is supplied
-    *                   to this function or the object is not a String or char[]
-    * @see #decodeHex(char[])
-    */
-   public Object decode(Object object) throws RuntimeException
-   {
-      try
-      {
-         char[] charArray = object instanceof String ? ((String) object).toCharArray()
-                  : (char[]) object;
-         return decodeHex(charArray);
-      }
-      catch (ClassCastException e)
-      {
-         throw new RuntimeException(e.getMessage());
-      }
-   }
-
-   /**
-    * Converts an array of bytes into an array of bytes for the characters representing the
-    * hexidecimal values of each byte in order. The returned array will be
-    * double the length of the passed array, as it takes two characters to
-    * represent any given byte.
-    *
-    * @param array a byte[] to convert to Hex characters
-    * @return A byte[] containing the bytes of the hexidecimal characters
-    * @see #encodeHex(byte[])
-    */
-   public byte[] encode(byte[] array)
-   {
-      return new String(encodeHex(array)).getBytes();
-   }
-
-   /**
-    * Converts a String or an array of bytes into an array of characters representing the
-    * hexidecimal values of each byte in order. The returned array will be
-    * double the length of the passed String or array, as it takes two characters to
-    * represent any given byte.
-    *
-    * @param object a String, or byte[] to convert to Hex characters
-    * @return A char[] containing hexidecimal characters
-    * @throws RuntimeException Thrown if the given object is not a String or byte[]
-    * @see #encodeHex(byte[])
-    */
-   public Object encode(Object object) throws RuntimeException
-   {
-      try
-      {
-         byte[] byteArray = object instanceof String ? ((String) object).getBytes()
-                  : (byte[]) object;
-         return encodeHex(byteArray);
-      }
-      catch (ClassCastException e)
-      {
-         throw new RuntimeException(e.getMessage());
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Id.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Id.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Id.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,12 +0,0 @@
-//$Id: Id.java 6840 2007-11-28 19:14:03Z nrichards $
-package org.jboss.seam.util;
-
-import org.jboss.seam.core.ConversationIdGenerator;
-
-public class Id
-{
-    @Deprecated
-    public static String nextId() {
-        return ConversationIdGenerator.instance().getNextId();
-    }  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/IteratorEnumeration.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/IteratorEnumeration.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/IteratorEnumeration.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,27 +0,0 @@
-//$Id: IteratorEnumeration.java 5629 2007-06-29 00:41:37Z gavin $
-package org.jboss.seam.util;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-public class IteratorEnumeration implements Enumeration
-{
-   
-   private Iterator iterator;
-   
-   public IteratorEnumeration(Iterator iterator)
-   {
-      this.iterator = iterator;
-   }
-
-   public boolean hasMoreElements()
-   {
-      return iterator.hasNext();
-   }
-
-   public Object nextElement()
-   {
-      return iterator.next();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/JSF.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/JSF.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/JSF.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,93 +0,0 @@
-package org.jboss.seam.util;
-
-import java.lang.reflect.Method;
-
-public class JSF
-{
-   public static final Class PHASE_ID;
-   public static final Class FACES_EVENT;
-   public static final Class DATA_MODEL;
-   public static final Class VALIDATOR_EXCEPTION;
-   public static final Class CONVERTER_EXCEPTION;
-   public static final Method GET_WRAPPED_DATA;
-   public static final Method SET_WRAPPED_DATA;
-   public static final Method GET_ROW_COUNT;
-   
-   public static final Object RESTORE_VIEW;
-   public static final Object UPDATE_MODEL_VALUES;
-   public static final Object INVOKE_APPLICATION;
-   public static final Object RENDER_RESPONSE;
-   
-   static class Dummy {}
-   
-   static
-   {
-      PHASE_ID = classForName("javax.faces.event.PhaseId");
-      FACES_EVENT = classForName("javax.faces.event.FacesEvent");
-      DATA_MODEL = classForName("javax.faces.model.DataModel");
-      VALIDATOR_EXCEPTION = classForName("javax.faces.validator.ValidatorException");
-      CONVERTER_EXCEPTION = classForName("javax.faces.convert.ConverterException");
-      GET_WRAPPED_DATA = methodForName(DATA_MODEL, "getWrappedData");
-      SET_WRAPPED_DATA = methodForName(DATA_MODEL, "setWrappedData", Object.class);
-      GET_ROW_COUNT = methodForName(DATA_MODEL, "getRowCount");
-      
-      RESTORE_VIEW = constantValueForName(PHASE_ID, "RESTORE_VIEW");
-      UPDATE_MODEL_VALUES = constantValueForName(PHASE_ID, "UPDATE_MODEL_VALUES");
-      INVOKE_APPLICATION = constantValueForName(PHASE_ID, "INVOKE_APPLICATION");
-      RENDER_RESPONSE = constantValueForName(PHASE_ID, "RENDER_RESPONSE");
-   }
-
-   private static Class classForName(String name)
-   {
-      try
-      {
-         return Reflections.classForName(name);
-      }
-      catch (ClassNotFoundException cnfe)
-      {
-         return Dummy.class;
-      }
-   }
-   
-   private static Method methodForName(Class clazz, String name, Class... paramTypes)
-   {
-      if (clazz.equals(Dummy.class)) return null;
-      try
-      {
-         return clazz.getDeclaredMethod(name, paramTypes);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   private static Object constantValueForName(Class clazz, String name)
-   {
-      if (clazz.equals(Dummy.class)) return null;
-      try
-      {
-         return clazz.getField(name).get(null);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   public static int getRowCount(Object dataModel)
-   {
-      return (Integer) Reflections.invokeAndWrap(GET_ROW_COUNT, dataModel);
-   }
-   
-   public static Object getWrappedData(Object dataModel)
-   {
-      return Reflections.invokeAndWrap(GET_WRAPPED_DATA, dataModel);
-   }
-   
-   public static Object setWrappedData(Object dataModel, Object data)
-   {
-      return Reflections.invokeAndWrap(SET_WRAPPED_DATA, dataModel, data);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Naming.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Naming.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Naming.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.util;
-
-import java.util.Hashtable;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-public final class Naming 
-{
-    private static final LogProvider log = Logging.getLogProvider(Naming.class);
-    private static Hashtable initialContextProperties;
-    
-    private static InitialContext initialContext;
-
-    public static InitialContext getInitialContext(Hashtable<String, String> props) throws NamingException 
-    {
-        if (props==null)
-        {
-            throw new IllegalStateException("JNDI properties not initialized, Seam was not started correctly");
-        }
-
-        if (log.isDebugEnabled())
-        {
-            log.debug("JNDI InitialContext properties:" + props);
-        }
-        
-        try {
-            return props.size()==0 ?
-                    new InitialContext() :
-                    new InitialContext(props);
-        }
-        catch (NamingException e) {
-            log.debug("Could not obtain initial context");
-            throw e;
-        }
-        
-    }
-    
-    public static InitialContext getInitialContext() throws NamingException 
-    {
-       if (initialContext == null) initInitialContext(); 
-          
-       return initialContext;
-    }
-    
-    private static synchronized void initInitialContext() throws NamingException
-    {
-       if (initialContext == null)
-       {
-          initialContext = getInitialContext(initialContextProperties);
-       }
-    }
-
-    private Naming() {}
-    
-    public static void setInitialContextProperties(Hashtable initialContextProperties) 
-    {
-       Naming.initialContextProperties = initialContextProperties;
-       initialContext = null;
-    }
-
-    public static Hashtable getInitialContextProperties() 
-    {
-       return initialContextProperties;
-    }
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/ProxyFactory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/ProxyFactory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/ProxyFactory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1132 +0,0 @@
-package org.jboss.seam.util;
-
-/* Derived from javassist MethodProxy.java to create a ProxyFactory that does not generate 
- * FINAL methods.  It is a cut & paste due methods on the javassist version largely 
- * being static and private, and thus completely non-extensible.
- */
-
-/*
- * Javassist, a Java-bytecode translator toolkit.
- * Copyright (C) 1999-2007 Shigeru Chiba. All Rights Reserved.
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License.  Alternatively, the contents of this file may be used under
- * the terms of the GNU Lesser General Public License Version 2.1 or later.
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- */
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Member;
-import java.lang.reflect.Modifier;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
-import java.util.HashMap;
-import java.util.WeakHashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.lang.ref.WeakReference;
-
-import javassist.CannotCompileException;
-import javassist.bytecode.*;
-import javassist.util.proxy.FactoryHelper;
-import javassist.util.proxy.MethodFilter;
-import javassist.util.proxy.MethodHandler;
-import javassist.util.proxy.ProxyObject;
-import javassist.util.proxy.RuntimeSupport;
-
-/*
- * This class is implemented only with the lower-level API of Javassist.
- * This design decision is for maximizing performance.
- */
-
-/**
- * Factory of dynamic proxy classes.
- *
- * <p>This factory generates a class that extends the given super class and implements
- * the given interfaces.  The calls of the methods inherited from the super class are
- * forwarded and then <code>invoke()</code> is called on the method handler
- * associated with the generated class.  The calls of the methods from the interfaces
- * are also forwarded to the method handler.
- *
- * <p>For example, if the following code is executed,
- * 
- * <ul><pre>
- * ProxyFactory f = new ProxyFactory();
- * f.setSuperclass(Foo.class);
- * MethodHandler mi = new MethodHandler() {
- *     public Object invoke(Object self, Method m, Method proceed,
- *                          Object[] args) throws Throwable {
- *         System.out.println("Name: " + m.getName());
- *         return proceed.invoke(self, args);  // execute the original method.
- *     }
- * };
- * f.setFilter(new MethodFilter() {
- *     public boolean isHandled(Method m) {
- *         // ignore finalize()
- *         return !m.getName().equals("finalize");
- *     }
- * });
- * Class c = f.createClass();
- * Foo foo = (Foo)c.newInstance();
- * ((ProxyObject)foo).setHandler(mi);
- * </pre></ul>
- *
- * <p>Then, the following method call will be forwarded to MethodHandler
- * <code>mi</code> and prints a message before executing the originally called method
- * <code>bar()</code> in <code>Foo</code>.
- *
- * <ul><pre>
- * foo.bar();
- * </pre></ul>
- *
- * <p>The last three lines of the code shown above can be replaced with a call to
- * the helper method <code>create</code>, which generates a proxy class, instantiates
- * it, and sets the method handler of the instance:
- *
- * <ul><pre>
- *     :
- * Foo foo = (Foo)f.create(new Class[0], new Object[0], mi);
- * </pre></ul>
- *
- * <p>To change the method handler during runtime,
- * execute the following code:
- *
- * <ul><pre>
- * MethodHandler mi2 = ... ;    // another handler
- * ((ProxyObject)foo).setHandler(mi2);
- * </pre></ul>
- *
- * <p>You can also specify the default method handler:
- *
- * <ul><pre>
- * ProxyFactory f2 = new ProxyFactory();
- * f2.setSuperclass(Foo.class);
- * f2.setHandler(mi);            // set the default handler
- * Class c2 = f2.createClass();
- * </pre></ul>
- *
- * <p>The default handler is implicitly attached to an instance of the generated class
- * <code>c2</code>.   Calling <code>setHandler</code> on the instance is not necessary
- * unless another method handler must be attached to the instance. 
- *
- * <p>The following code is an example of method handler.  It does not execute
- * anything except invoking the original method:
- *
- * <ul><pre>
- * class SimpleHandler implements MethodHandler {
- *     public Object invoke(Object self, Method m,
- *                          Method proceed, Object[] args) throws Exception {
- *         return proceed.invoke(self, args);
- *     }
- * }
- * </pre></ul>
- *
- * <p>A proxy object generated by <code>ProxyFactory</code> is serializable
- * if its super class or interfaces implement a <code>java.io.Serializable</code>.
- * However, a serialized proxy object will not be compatible with future releases.
- * The serialization support should be used for short-term storage or RMI.
- *
- * @see MethodHandler
- * @since 3.1
- */
-public class ProxyFactory {
-    private Class superClass;
-    private Class[] interfaces;
-    private MethodFilter methodFilter;
-    private MethodHandler handler;
-    private Class thisClass;
-
-    /**
-     * If the value of this variable is not null, the class file of
-     * the generated proxy class is written under the directory specified
-     * by this variable.  For example, if the value is 
-     * <code>"."</code>, then the class file is written under the current
-     * directory.  This method is for debugging.
-     *
-     * <p>The default value is null.
-     */
-    public String writeDirectory;
-
-    private static final Class OBJECT_TYPE = Object.class;
-
-    private static final String HOLDER = "_methods_";
-    private static final String HOLDER_TYPE = "[Ljava/lang/reflect/Method;";
-    private static final String METHOD_FILTER_FIELD = "_method_filter";
-    private static final String HANDLER = "handler";
-    private static final String NULL_INTERCEPTOR_HOLDER = "javassist.util.proxy.RuntimeSupport";
-    private static final String DEFAULT_INTERCEPTOR = "default_interceptor";
-    private static final String HANDLER_TYPE
-        = 'L' + MethodHandler.class.getName().replace('.', '/') + ';';
-    private static final String HANDLER_SETTER = "setHandler";
-    private static final String HANDLER_SETTER_TYPE = "(" + HANDLER_TYPE + ")V";
-
-    /**
-     * If true, a generated proxy class is cached and it will be reused
-     * when generating the proxy class with the same properties is requested.
-     * The default value is true.
-     *
-     * @since 3.4
-     */
-    public static boolean useCache = true; 
-
-    private static WeakHashMap proxyCache = new WeakHashMap();
-
-    static class CacheKey {
-        String classes;
-        MethodFilter filter;
-        private int hash;
-        WeakReference proxyClass;
-        MethodHandler handler;
-
-        public CacheKey(Class superClass, Class[] interfaces,
-                        MethodFilter f, MethodHandler h)
-        {
-            classes = getKey(superClass, interfaces);
-            hash = classes.hashCode();
-            filter = f;
-            handler = h;
-            proxyClass = null;
-        }
-
-      @Override
-      public int hashCode() { return hash; }
-
-      @Override
-      public boolean equals(Object obj) {
-            if (obj instanceof CacheKey) {
-                CacheKey target = (CacheKey)obj;
-                return target.filter == filter && target.handler == handler
-                       && target.classes.equals(classes);
-            }
-            else
-                return false;
-        }
-
-        static String getKey(Class superClass, Class[] interfaces) {
-            StringBuffer sbuf = new StringBuffer();
-            if (superClass != null)
-                sbuf.append(superClass.getName());
-            sbuf.append(':');
-            if (interfaces != null) {
-                int len = interfaces.length;
-                for (int i = 0; i < len; i++)
-                    sbuf.append(interfaces[i].getName()).append(',');
-            }
-
-            return sbuf.toString();
-        }
-    }
-
-    /**
-     * Constructs a factory of proxy class.
-     */
-    public ProxyFactory() {
-        superClass = null;
-        interfaces = null;
-        methodFilter = null;
-        handler = null;
-        thisClass = null;
-        writeDirectory = null;
-    }
-
-    /**
-     * Sets the super class of a proxy class.
-     */
-    public void setSuperclass(Class clazz) {
-        superClass = clazz;
-    }
-
-    /**
-     * Obtains the super class set by <code>setSuperclass()</code>.
-     *
-     * @since 3.4
-     */
-    public Class getSuperclass() { return superClass; }
-
-    /**
-     * Sets the interfaces of a proxy class.
-     */
-    public void setInterfaces(Class[] ifs) {
-        interfaces = ifs;
-    }
-
-    /**
-     * Obtains the interfaces set by <code>setInterfaces</code>.
-     *
-     * @since 3.4
-     */
-    public Class[] getInterfaces() { return interfaces; }
-
-    /**
-     * Sets a filter that selects the methods that will be controlled by a handler.
-     */
-    public void setFilter(MethodFilter mf) {
-        methodFilter = mf;
-    }
-
-    /**
-     * Generates a proxy class.
-     */
-    public Class createClass() {
-        if (thisClass == null) {
-            ClassLoader cl = getClassLoader();
-            synchronized (proxyCache) {
-                if (useCache)
-                    createClass2(cl);
-                else 
-                    createClass3(cl);
-            }
-        }
-
-        return thisClass;
-    }
-
-    private void createClass2(ClassLoader cl) {
-        CacheKey key = new CacheKey(superClass, interfaces, methodFilter, handler);
-        /*
-         * Excessive concurrency causes a large memory footprint and slows the
-         * execution speed down (with JDK 1.5).  Thus, we use a jumbo lock for
-         * reducing concrrency.
-         */
-        // synchronized (proxyCache) {
-            HashMap cacheForTheLoader = (HashMap)proxyCache.get(cl);
-            if (cacheForTheLoader == null) {
-                cacheForTheLoader = new HashMap();
-                proxyCache.put(cl, cacheForTheLoader);
-                cacheForTheLoader.put(key, key);
-            }
-            else {
-                CacheKey found = (CacheKey)cacheForTheLoader.get(key);
-                if (found == null)
-                    cacheForTheLoader.put(key, key);
-                else {
-                    key = found;
-                    Class c = isValidEntry(key);    // no need to synchronize
-                    if (c != null) {
-                        thisClass = c;
-                        return;
-                    }
-                }
-            }
-        // }
-
-        // synchronized (key) {
-            Class c = isValidEntry(key);
-            if (c == null) {
-                createClass3(cl);
-                key.proxyClass = new WeakReference(thisClass);
-            }
-            else
-                thisClass = c; 
-        // }
-    }
-
-    private Class isValidEntry(CacheKey key) {
-        WeakReference ref = key.proxyClass;
-        if (ref != null) {
-            Class c = (Class)ref.get();
-            if(c != null)
-                return c;
-        }
-
-        return null;
-    }
-
-    private void createClass3(ClassLoader cl) {
-        try {
-            ClassFile cf = make();
-            if (writeDirectory != null)
-                FactoryHelper.writeFile(cf, writeDirectory);
-
-            thisClass = FactoryHelper.toClass(cf, cl, getDomain());
-            setField(DEFAULT_INTERCEPTOR, handler);
-            setField(METHOD_FILTER_FIELD, methodFilter);
-        }
-        catch (CannotCompileException e) {
-            throw new RuntimeException(e.getMessage(), e);
-        }
-
-    }
-
-    private void setField(String fieldName, Object value) {
-        if (thisClass != null && value != null)
-            try {
-                Field f = thisClass.getField(fieldName);
-                // SEAM CHANGE
-                setAccessible(f, true);
-                f.set(null, value);
-                // SEAM CHANGE
-                setAccessible(f, false);
-            }
-            catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-    }
-
-    static MethodFilter getFilter(Class clazz) {
-        return (MethodFilter)getField(clazz, METHOD_FILTER_FIELD);
-    }
-
-    static MethodHandler getHandler(Class clazz) {
-        return (MethodHandler)getField(clazz, DEFAULT_INTERCEPTOR);
-    }
-
-    private static Object getField(Class clazz, String fieldName) {
-        try {
-            Field f = clazz.getField(fieldName);
-            f.setAccessible(true);
-            Object value = f.get(null);
-            f.setAccessible(false);
-            return value;
-        }
-        catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * A provider of class loaders.
-     *
-     * @see #classLoaderProvider
-     * @since 3.4
-     */
-    public static interface ClassLoaderProvider {
-        /**
-         * Returns a class loader.
-         *
-         * @param pf    a proxy factory that is going to obtain a class loader.
-         */
-        public ClassLoader get(ProxyFactory pf);
-    }
-
-    /**
-     * A provider used by <code>createClass()</code> for obtaining
-     * a class loader.
-     * <code>get()</code> on this <code>ClassLoaderProvider</code> object
-     * is called to obtain a class loader.
-     *
-     * <p>The value of this field can be updated for changing the default
-     * implementation.
-     *
-     * <p>Example:
-     * <ul><pre>
-     * ProxyFactory.classLoaderProvider = new ProxyFactory.ClassLoaderProvider() {
-     *     public ClassLoader get(ProxyFactory pf) {
-     *         return Thread.currentThread().getContextClassLoader();
-     *     }
-     * };
-     * </pre></ul>
-     *
-     * @since 3.4
-     */
-    public static ClassLoaderProvider classLoaderProvider
-        = new ClassLoaderProvider() {
-              public ClassLoader get(ProxyFactory pf) {
-                  return pf.getClassLoader0();
-              }
-          };
-
-    protected ClassLoader getClassLoader() {
-        return classLoaderProvider.get(this);
-    }
-
-    protected ClassLoader getClassLoader0() {
-        ClassLoader loader = null;
-        if (superClass != null && !superClass.getName().equals("java.lang.Object"))
-            loader = superClass.getClassLoader();
-        else if (interfaces != null && interfaces.length > 0)
-            loader = interfaces[0].getClassLoader();
- 
-        if (loader == null) {
-            loader = getClass().getClassLoader();
-            // In case javassist is in the endorsed dir
-            if (loader == null) {
-                loader = Thread.currentThread().getContextClassLoader();
-                if (loader == null)
-                    loader = ClassLoader.getSystemClassLoader();
-            }
-        }
-
-        return loader;
-    }
-
-    protected ProtectionDomain getDomain() {
-        Class clazz;
-        if (superClass != null && !superClass.getName().equals("java.lang.Object"))
-            clazz = superClass;
-        else if (interfaces != null && interfaces.length > 0)
-            clazz = interfaces[0];
-        else
-            clazz = this.getClass();
-
-        return clazz.getProtectionDomain();
-    }
-
-    /**
-     * Creates a proxy class and returns an instance of that class.
-     *
-     * @param paramTypes    parameter types for a constructor.
-     * @param args          arguments passed to a constructor.
-     * @param mh            the method handler for the proxy class.
-     * @since 3.4
-     */
-    public Object create(Class[] paramTypes, Object[] args, MethodHandler mh)
-        throws NoSuchMethodException, IllegalArgumentException,
-               InstantiationException, IllegalAccessException, InvocationTargetException
-    {
-        Object obj = create(paramTypes, args);
-        ((ProxyObject)obj).setHandler(mh);
-        return obj;
-    }
-
-    /**
-     * Creates a proxy class and returns an instance of that class.
-     *
-     * @param paramTypes    parameter types for a constructor.
-     * @param args          arguments passed to a constructor.
-     */
-    public Object create(Class[] paramTypes, Object[] args)
-        throws NoSuchMethodException, IllegalArgumentException,
-               InstantiationException, IllegalAccessException, InvocationTargetException
-    {
-        Class c = createClass();
-        Constructor cons = c.getConstructor(paramTypes);
-        return cons.newInstance(args);
-    }
-
-    /**
-     * Sets the default invocation handler.  This invocation handler is shared
-     * among all the instances of a proxy class unless another is explicitly
-     * specified.
-     */
-    public void setHandler(MethodHandler mi) {
-        handler = mi;
-        setField(DEFAULT_INTERCEPTOR, handler);
-    }
-
-    private static int counter = 0;
-
-    private static synchronized String makeProxyName(String classname) {
-        // SEAM CHANGE
-        return classname + "_$$_javassist_seam_" + counter++;
-    }
-
-    private ClassFile make() throws CannotCompileException {
-        String superName, classname;
-        if (interfaces == null)
-            interfaces = new Class[0];
-
-        if (superClass == null) {
-            superClass = OBJECT_TYPE;
-            superName = superClass.getName();
-            classname = interfaces.length == 0 ? superName
-                                               : interfaces[0].getName(); 
-        }
-        else {
-            superName = superClass.getName();
-            classname = superName;
-        }
-
-        if (Modifier.isFinal(superClass.getModifiers()))
-            throw new CannotCompileException(superName + " is final");
-
-        classname = makeProxyName(classname);
-        if (classname.startsWith("java."))
-            classname = "org.javassist.tmp." + classname;
-
-        ClassFile cf = new ClassFile(false, classname, superName);
-        cf.setAccessFlags(AccessFlag.PUBLIC);
-        setInterfaces(cf, interfaces);
-        ConstPool pool = cf.getConstPool();
-        FieldInfo finfo = new FieldInfo(pool, DEFAULT_INTERCEPTOR, HANDLER_TYPE);
-        finfo.setAccessFlags(AccessFlag.PUBLIC | AccessFlag.STATIC);
-        cf.addField(finfo);
-
-        FieldInfo finfo2 = new FieldInfo(pool, HANDLER, HANDLER_TYPE);
-        finfo2.setAccessFlags(AccessFlag.PRIVATE);
-        cf.addField(finfo2);
-
-        FieldInfo finfo3 = new FieldInfo(pool, METHOD_FILTER_FIELD,
-                                            "Ljavassist/util/proxy/MethodFilter;");
-        finfo3.setAccessFlags(AccessFlag.PUBLIC | AccessFlag.STATIC);
-        cf.addField(finfo3);
-
-        HashMap allMethods = getMethods(superClass, interfaces);
-        //int size = allMethods.size();
-        makeConstructors(classname, cf, pool, classname);
-        int s = overrideMethods(cf, pool, classname, allMethods);
-        addMethodsHolder(cf, pool, classname, s);
-        addSetter(classname, cf, pool);
-
-        try {
-            cf.addMethod(makeWriteReplace(pool));
-        }
-        catch (DuplicateMemberException e) {
-            // writeReplace() is already declared in the super class/interfaces.
-        }
-
-        thisClass = null;          
-        return cf;
-    }
-
-    private static void setInterfaces(ClassFile cf, Class[] interfaces) {
-        String setterIntf = ProxyObject.class.getName();
-        String[] list;
-        if (interfaces == null || interfaces.length == 0)
-            list = new String[] { setterIntf };
-        else {
-            list = new String[interfaces.length + 1];
-            for (int i = 0; i < interfaces.length; i++)
-                list[i] = interfaces[i].getName();
-
-            list[interfaces.length] = setterIntf;
-        }
-
-        cf.setInterfaces(list);
-    }
-
-    private static void addMethodsHolder(ClassFile cf, ConstPool cp,
-                                         String classname, int size)
-        throws CannotCompileException
-    {
-        FieldInfo finfo = new FieldInfo(cp, HOLDER, HOLDER_TYPE);
-        finfo.setAccessFlags(AccessFlag.PRIVATE | AccessFlag.STATIC);
-        cf.addField(finfo);
-        MethodInfo minfo = new MethodInfo(cp, "<clinit>", "()V");
-        minfo.setAccessFlags(AccessFlag.STATIC);
-        Bytecode code = new Bytecode(cp, 0, 0);
-        code.addIconst(size * 2);
-        code.addAnewarray("java.lang.reflect.Method");
-        code.addPutstatic(classname, HOLDER, HOLDER_TYPE);
-        code.addOpcode(Bytecode.RETURN);
-        minfo.setCodeAttribute(code.toCodeAttribute());
-        cf.addMethod(minfo);
-    }
-
-    private static void addSetter(String classname, ClassFile cf, ConstPool cp)
-        throws CannotCompileException
-    {
-        MethodInfo minfo = new MethodInfo(cp, HANDLER_SETTER,
-                                          HANDLER_SETTER_TYPE);
-        minfo.setAccessFlags(AccessFlag.PUBLIC);
-        Bytecode code = new Bytecode(cp, 2, 2);
-        code.addAload(0);
-        code.addAload(1);
-        code.addPutfield(classname, HANDLER, HANDLER_TYPE);
-        code.addOpcode(Bytecode.RETURN);
-        minfo.setCodeAttribute(code.toCodeAttribute());
-        cf.addMethod(minfo);
-    }
-
-    private int overrideMethods(ClassFile cf, ConstPool cp, String className,
-                                HashMap allMethods)
-        throws CannotCompileException
-    {
-        String prefix = makeUniqueName("_d", allMethods);
-        Set entries = allMethods.entrySet();
-        Iterator it = entries.iterator();
-        int index = 0;
-        while (it.hasNext()) {
-            Map.Entry e = (Map.Entry)it.next();
-            String key = (String)e.getKey();
-            Method meth = (Method)e.getValue();
-            int mod = meth.getModifiers();
-            if (!Modifier.isFinal(mod) && !Modifier.isStatic(mod)
-                    && isVisible(mod, className, meth))
-                if (methodFilter == null || methodFilter.isHandled(meth))
-                    override(className, meth, prefix, index++,
-                             keyToDesc(key), cf, cp);
-        }
-
-        return index;
-    }
-
-    private void override(String thisClassname, Method meth, String prefix,
-                          int index, String desc, ClassFile cf, ConstPool cp)
-        throws CannotCompileException
-    {
-        Class declClass = meth.getDeclaringClass();
-        String delegatorName = prefix + index + meth.getName();
-        if (Modifier.isAbstract(meth.getModifiers()))
-            delegatorName = null;
-        else {
-            MethodInfo delegator
-                = makeDelegator(meth, desc, cp, declClass, delegatorName);
-            // delegator is not a bridge method.  See Sec. 15.12.4.5 of JLS 3rd Ed.
-            delegator.setAccessFlags(delegator.getAccessFlags() & ~AccessFlag.BRIDGE);
-            cf.addMethod(delegator);
-        }
-
-        MethodInfo forwarder
-            = makeForwarder(thisClassname, meth, desc, cp, declClass,
-                            delegatorName, index);
-        cf.addMethod(forwarder);
-    }
-
-    private void makeConstructors(String thisClassName, ClassFile cf,
-            ConstPool cp, String classname) throws CannotCompileException
-    {
-        // SEAM CHANGE 
-        Constructor[] cons = getDeclaredConstructors(superClass);
-        for (int i = 0; i < cons.length; i++) {
-            Constructor c = cons[i];
-            int mod = c.getModifiers();
-            if (!Modifier.isFinal(mod) && !Modifier.isPrivate(mod)
-                    && isVisible(mod, classname, c)) {
-                MethodInfo m = makeConstructor(thisClassName, c, cp, superClass);
-                cf.addMethod(m);
-            }
-        }
-    }
-
-    private static String makeUniqueName(String name, HashMap hash) {
-        Set keys = hash.keySet();
-        if (makeUniqueName0(name, keys.iterator()))
-            return name;
-
-        for (int i = 100; i < 999; i++) {
-            String s = name + i;
-            if (makeUniqueName0(s, keys.iterator()))
-                return s;
-        }
-
-        throw new RuntimeException("cannot make a unique method name");
-    }
-
-    private static boolean makeUniqueName0(String name, Iterator it) {
-        while (it.hasNext()) {
-            String key = (String)it.next();
-            if (key.startsWith(name))
-                return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Returns true if the method is visible from the class.
-     *
-     * @param mod       the modifiers of the method. 
-     */
-    private static boolean isVisible(int mod, String from, Member meth) {
-        if ((mod & Modifier.PRIVATE) != 0)
-            return false;
-        else if ((mod & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0)
-            return true;
-        else {
-            String p = getPackageName(from);
-            String q = getPackageName(meth.getDeclaringClass().getName());
-            if (p == null)
-                return q == null;
-            else
-                return p.equals(q);
-        }
-    }
-
-    private static String getPackageName(String name) {
-        int i = name.lastIndexOf('.');
-        if (i < 0)
-            return null;
-        else
-            return name.substring(0, i);
-    }
-
-    private static HashMap getMethods(Class superClass, Class[] interfaceTypes) {
-        HashMap hash = new HashMap();
-        for (int i = 0; i < interfaceTypes.length; i++)
-            getMethods(hash, interfaceTypes[i]);
-
-        getMethods(hash, superClass);
-        return hash;
-    }
-
-    private static void getMethods(HashMap hash, Class clazz) {
-        Class[] ifs = clazz.getInterfaces();
-        for (int i = 0; i < ifs.length; i++)
-            getMethods(hash, ifs[i]);
-
-        Class parent = clazz.getSuperclass();
-        if (parent != null)
-            getMethods(hash, parent);
-
-        // SEAM CHANGE
-        Method[] methods = getDeclaredMethods(clazz);
-        for (int i = 0; i < methods.length; i++)
-            if (!Modifier.isPrivate(methods[i].getModifiers())) {
-                Method m = methods[i];
-                String key = m.getName() + ':' + RuntimeSupport.makeDescriptor(m);
-                hash.put(key, methods[i]);
-            }
-    }
-
-    private static String keyToDesc(String key) {
-        return key.substring(key.indexOf(':') + 1);
-    }
-
-    private static MethodInfo makeConstructor(String thisClassName, Constructor cons,
-                                              ConstPool cp, Class superClass) {
-        String desc = RuntimeSupport.makeDescriptor(cons.getParameterTypes(),
-                                                    Void.TYPE);
-        MethodInfo minfo = new MethodInfo(cp, "<init>", desc);
-        minfo.setAccessFlags(Modifier.PUBLIC);      // cons.getModifiers() & ~Modifier.NATIVE
-        setThrows(minfo, cp, cons.getExceptionTypes());
-        Bytecode code = new Bytecode(cp, 0, 0);
-
-        code.addAload(0);
-        code.addGetstatic(thisClassName, DEFAULT_INTERCEPTOR, HANDLER_TYPE);
-        code.addPutfield(thisClassName, HANDLER, HANDLER_TYPE);
-        code.addGetstatic(thisClassName, DEFAULT_INTERCEPTOR, HANDLER_TYPE);
-        code.addOpcode(Opcode.IFNONNULL);
-        code.addIndex(10);
-        code.addAload(0);
-        code.addGetstatic(NULL_INTERCEPTOR_HOLDER, DEFAULT_INTERCEPTOR, HANDLER_TYPE);
-        code.addPutfield(thisClassName, HANDLER, HANDLER_TYPE);
-        int pc = code.currentPc();
-
-        code.addAload(0);
-        int s = addLoadParameters(code, cons.getParameterTypes(), 1);
-        code.addInvokespecial(superClass.getName(), "<init>", desc);
-        code.addOpcode(Opcode.RETURN);
-        code.setMaxLocals(s + 1);
-        CodeAttribute ca = code.toCodeAttribute();
-        minfo.setCodeAttribute(ca);
-
-        StackMapTable.Writer writer = new StackMapTable.Writer(32);
-        writer.sameFrame(pc);
-        ca.setAttribute(writer.toStackMapTable(cp));
-        return minfo;
-    }
-
-    private static MethodInfo makeDelegator(Method meth, String desc,
-                ConstPool cp, Class declClass, String delegatorName) {
-        MethodInfo delegator = new MethodInfo(cp, delegatorName, desc);
-        // SEAM CHANGE: remove FINAL
-        delegator.setAccessFlags(Modifier.PUBLIC
-                | (meth.getModifiers() & ~(Modifier.PRIVATE
-                                           | Modifier.PROTECTED
-                                           | Modifier.ABSTRACT
-                                           | Modifier.NATIVE
-                                           | Modifier.SYNCHRONIZED)));
-        setThrows(delegator, cp, meth);
-        Bytecode code = new Bytecode(cp, 0, 0);
-        code.addAload(0);
-        int s = addLoadParameters(code, meth.getParameterTypes(), 1);
-        code.addInvokespecial(declClass.getName(), meth.getName(), desc);
-        addReturn(code, meth.getReturnType());
-        code.setMaxLocals(++s);
-        delegator.setCodeAttribute(code.toCodeAttribute());
-        return delegator;
-    }
-
-    /**
-     * @param delegatorName     null if the original method is abstract.
-     */
-    private static MethodInfo makeForwarder(String thisClassName,
-                    Method meth, String desc, ConstPool cp,
-                    Class declClass, String delegatorName, int index) {
-        MethodInfo forwarder = new MethodInfo(cp, meth.getName(), desc);
-        // SEAM CHANGE: remove FINAL
-        forwarder.setAccessFlags((meth.getModifiers() & ~(Modifier.ABSTRACT
-                                               | Modifier.NATIVE
-                                               | Modifier.SYNCHRONIZED)));
-        setThrows(forwarder, cp, meth);
-        int args = Descriptor.paramSize(desc);
-        Bytecode code = new Bytecode(cp, 0, args + 2);
-        /*
-         * if (methods[index * 2] == null) {
-         *   methods[index * 2]
-         *     = RuntimeSupport.findMethod(this, <overridden name>, <desc>);
-         *   methods[index * 2 + 1]
-         *     = RuntimeSupport.findMethod(this, <delegator name>, <desc>);
-         *     or = null // the original method is abstract.
-         * }
-         * return ($r)handler.invoke(this, methods[index * 2],
-         *                methods[index * 2 + 1], $args);
-         */
-        int origIndex = index * 2;
-        int delIndex = index * 2 + 1;
-        int arrayVar = args + 1;
-        code.addGetstatic(thisClassName, HOLDER, HOLDER_TYPE);
-        code.addAstore(arrayVar);
-        code.addAload(arrayVar);
-        
-        callFind2Methods(code, meth.getName(), delegatorName, origIndex, desc, arrayVar);
-        /*
-        code.addIconst(origIndex);
-        code.addOpcode(Opcode.AALOAD);
-        code.addOpcode(Opcode.IFNONNULL);
-        int pc = code.currentPc();
-        code.addIndex(0);
-
-        callFindMethod(code, "findSuperMethod", arrayVar, origIndex, meth.getName(), desc);
-        callFindMethod(code, "findMethod", arrayVar, delIndex, delegatorName, desc);
-
-        int pc2 = code.currentPc();
-        code.write16bit(pc, pc2 - pc + 1);*/
-        code.addAload(0);
-        code.addGetfield(thisClassName, HANDLER, HANDLER_TYPE);
-        code.addAload(0);
-
-        code.addAload(arrayVar);
-        code.addIconst(origIndex);
-        code.addOpcode(Opcode.AALOAD);
-
-        code.addAload(arrayVar);
-        code.addIconst(delIndex);
-        code.addOpcode(Opcode.AALOAD);
-
-        makeParameterList(code, meth.getParameterTypes());
-        code.addInvokeinterface(MethodHandler.class.getName(), "invoke",
-            "(Ljava/lang/Object;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;",
-            5);
-        Class retType = meth.getReturnType();
-        addUnwrapper(code, retType);
-        addReturn(code, retType);
-
-        CodeAttribute ca = code.toCodeAttribute();
-        forwarder.setCodeAttribute(ca);
-        /*StackMapTable.Writer writer = new StackMapTable.Writer(32);
-        writer.appendFrame(pc2, new int[] { StackMapTable.OBJECT },
-                           new int[] { cp.addClassInfo(HOLDER_TYPE) });
-        ca.setAttribute(writer.toStackMapTable(cp));*/
-        return forwarder;
-    }
-
-    private static void setThrows(MethodInfo minfo, ConstPool cp, Method orig) {
-        Class[] exceptions = orig.getExceptionTypes();
-        setThrows(minfo, cp, exceptions);
-    }
-
-    private static void setThrows(MethodInfo minfo, ConstPool cp,
-                                  Class[] exceptions) {
-        if (exceptions.length == 0)
-            return;
-
-        String[] list = new String[exceptions.length];
-        for (int i = 0; i < exceptions.length; i++)
-            list[i] = exceptions[i].getName();
-
-        ExceptionsAttribute ea = new ExceptionsAttribute(cp);
-        ea.setExceptions(list);
-        minfo.setExceptionsAttribute(ea);
-    }
-
-    private static int addLoadParameters(Bytecode code, Class[] params,
-                                         int offset) {
-        int stacksize = 0;
-        int n = params.length;
-        for (int i = 0; i < n; ++i)
-            stacksize += addLoad(code, stacksize + offset, params[i]);
-
-        return stacksize;
-    }
-
-    private static int addLoad(Bytecode code, int n, Class type) {
-        if (type.isPrimitive()) {
-            if (type == Long.TYPE) {
-                code.addLload(n);
-                return 2;
-            }
-            else if (type == Float.TYPE)
-                code.addFload(n);
-            else if (type == Double.TYPE) {
-                code.addDload(n);
-                return 2;
-            }
-            else
-                code.addIload(n);
-        }
-        else
-            code.addAload(n);
-
-        return 1;
-    }
-
-    private static int addReturn(Bytecode code, Class type) {
-        if (type.isPrimitive()) {
-            if (type == Long.TYPE) {
-                code.addOpcode(Opcode.LRETURN);
-                return 2;
-            }
-            else if (type == Float.TYPE)
-                code.addOpcode(Opcode.FRETURN);
-            else if (type == Double.TYPE) {
-                code.addOpcode(Opcode.DRETURN);
-                return 2;
-            }
-            else if (type == Void.TYPE) {
-                code.addOpcode(Opcode.RETURN);
-                return 0;
-            }
-            else
-                code.addOpcode(Opcode.IRETURN);
-        }
-        else
-            code.addOpcode(Opcode.ARETURN);
-
-        return 1;
-    }
-
-    private static void makeParameterList(Bytecode code, Class[] params) {
-        int regno = 1;
-        int n = params.length;
-        code.addIconst(n);
-        code.addAnewarray("java/lang/Object");
-        for (int i = 0; i < n; i++) {
-            code.addOpcode(Opcode.DUP);
-            code.addIconst(i);
-            Class type = params[i];
-            if (type.isPrimitive())
-                regno = makeWrapper(code, type, regno);
-            else {
-                code.addAload(regno);
-                regno++;
-            }
-
-            code.addOpcode(Opcode.AASTORE);
-        }
-    }
-
-    private static void callFind2Methods(Bytecode code, String superMethod, String thisMethod,
-          int index, String desc, int arrayVar) 
-    {
-      String findClass = RuntimeSupport.class.getName();
-      String findDesc = "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/reflect/Method;)V";
-      code.addAload(0);
-      code.addLdc(superMethod);
-      if (thisMethod == null)
-      {
-         code.addOpcode(Opcode.ACONST_NULL);
-      }
-      else
-      {
-         code.addLdc(thisMethod);
-      }
-      code.addIconst(index);
-      code.addLdc(desc);
-      code.addAload(arrayVar);
-      code.addInvokestatic(findClass, "find2Methods", findDesc);
-   }
-
-    private static int makeWrapper(Bytecode code, Class type, int regno) {
-        int index = FactoryHelper.typeIndex(type);
-        String wrapper = FactoryHelper.wrapperTypes[index]; 
-        code.addNew(wrapper);
-        code.addOpcode(Opcode.DUP);
-        addLoad(code, regno, type);
-        code.addInvokespecial(wrapper, "<init>",
-                              FactoryHelper.wrapperDesc[index]);
-        return regno + FactoryHelper.dataSize[index];
-    }
-
-    /**
-     * @param methodName        might be null.
-     */
-    private static void callFindMethod(Bytecode code, String findMethod,
-            int arrayVar, int index, String methodName, String desc) {
-        String findClass = RuntimeSupport.class.getName();
-        String findDesc
-            = "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/reflect/Method;";
-
-        code.addAload(arrayVar);
-        code.addIconst(index);
-        if (methodName == null)
-            code.addOpcode(Opcode.ACONST_NULL);
-        else {
-            code.addAload(0);
-            code.addLdc(methodName);
-            code.addLdc(desc);
-            code.addInvokestatic(findClass, findMethod, findDesc);
-        }
-
-        code.addOpcode(Opcode.AASTORE);
-    }
-
-    private static void addUnwrapper(Bytecode code, Class type) {
-        if (type.isPrimitive()) {
-            if (type == Void.TYPE)
-                code.addOpcode(Opcode.POP);
-            else {
-                int index = FactoryHelper.typeIndex(type);
-                String wrapper = FactoryHelper.wrapperTypes[index];
-                code.addCheckcast(wrapper);
-                code.addInvokevirtual(wrapper,
-                                      FactoryHelper.unwarpMethods[index],
-                                      FactoryHelper.unwrapDesc[index]);
-            }
-        }
-        else
-            code.addCheckcast(type.getName());
-    }
-
-    private static MethodInfo makeWriteReplace(ConstPool cp) {
-        MethodInfo minfo = new MethodInfo(cp, "writeReplace", "()Ljava/lang/Object;");
-        String[] list = new String[1];
-        list[0] = "java.io.ObjectStreamException";
-        ExceptionsAttribute ea = new ExceptionsAttribute(cp);
-        ea.setExceptions(list);
-        minfo.setExceptionsAttribute(ea);
-        Bytecode code = new Bytecode(cp, 0, 1);
-        code.addAload(0);
-        code.addInvokestatic("javassist.util.proxy.RuntimeSupport",
-                             "makeSerializedProxy",
-                             "(Ljava/lang/Object;)Ljavassist/util/proxy/SerializedProxy;");
-        code.addOpcode(Opcode.ARETURN);
-        minfo.setCodeAttribute(code.toCodeAttribute());
-        return minfo;
-    }
-    
-    // SEAM: from SecurityActions
-    static void setAccessible(final AccessibleObject ao,
-            final boolean accessible) {
-        if (System.getSecurityManager() == null) {
-            ao.setAccessible(accessible);
-        } else {
-            AccessController.doPrivileged(new PrivilegedAction() {
-                public Object run() {
-                    ao.setAccessible(accessible);
-                    return null;
-                }
-            });
-        }
-    }
-    
-    // SEAM: from SecurityActions
-    static Method[] getDeclaredMethods(final Class clazz) {
-        if (System.getSecurityManager() == null) {
-            return clazz.getDeclaredMethods();
-        } else {
-            return (Method[]) AccessController
-                    .doPrivileged(new PrivilegedAction() {
-                        public Object run() {
-                            return clazz.getDeclaredMethods();
-                        }
-                    });
-        }
-    }
-    
-    // SEAM: from SecurityActions
-    static Constructor[] getDeclaredConstructors(final Class clazz) {
-        if (System.getSecurityManager() == null) {
-            return clazz.getDeclaredConstructors();
-        } else {
-            return (Constructor[]) AccessController
-                    .doPrivileged(new PrivilegedAction() {
-                        public Object run() {
-                            return clazz.getDeclaredConstructors();
-                        }
-                    });
-        }
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/RandomStringUtils.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/RandomStringUtils.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/RandomStringUtils.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,325 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.seam.util;
-
-import java.util.Random;
-/**
- * <p>Operations for random <code>String</code>s.</p>
- * <p>Currently <em>private high surrogate</em> characters are ignored. 
- * These are unicode characters that fall between the values 56192 (db80)
- * and 56319 (dbff) as we don't know how to handle them. 
- * High and low surrogates are correctly dealt with - that is if a 
- * high surrogate is randomly chosen, 55296 (d800) to 56191 (db7f) 
- * then it is followed by a low surrogate. If a low surrogate is chosen, 
- * 56320 (dc00) to 57343 (dfff) then it is placed after a randomly 
- * chosen high surrogate. </p>
- *
- * @author <a href="mailto:steven at caswell.name">Steven Caswell</a>
- * @author Stephen Colebourne
- * @author Gary Gregory
- * @author Phil Steitz
- * @since 1.0
- * @version $Id: RandomStringUtils.java 6103 2007-09-01 21:39:01Z pmuir $
- */
-public class RandomStringUtils {
-
-    /**
-     * <p>Random object used by random method. This has to be not local
-     * to the random method so as to not return the same value in the 
-     * same millisecond.</p>
-     */
-    private static final Random RANDOM = new Random();
-
-    /**
-     * <p><code>RandomStringUtils</code> instances should NOT be constructed in
-     * standard programming. Instead, the class should be used as
-     * <code>RandomStringUtils.random(5);</code>.</p>
-     *
-     * <p>This constructor is public to permit tools that require a JavaBean instance
-     * to operate.</p>
-     */
-    public RandomStringUtils() {
-      super();
-    }
-
-    // Random
-    //-----------------------------------------------------------------------
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of all characters.</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String random(int count) {
-        return random(count, false, false);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of characters whose
-     * ASCII value is between <code>32</code> and <code>126</code> (inclusive).</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String randomAscii(int count) {
-        return random(count, 32, 127, false, false);
-    }
-    
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of alphabetic
-     * characters.</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String randomAlphabetic(int count) {
-        return random(count, true, false);
-    }
-    
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of alpha-numeric
-     * characters.</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String randomAlphanumeric(int count) {
-        return random(count, true, true);
-    }
-    
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of numeric
-     * characters.</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String randomNumeric(int count) {
-        return random(count, false, true);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of alpha-numeric
-     * characters as indicated by the arguments.</p>
-     *
-     * @param count  the length of random string to create
-     * @param letters  if <code>true</code>, generated string will include
-     *  alphabetic characters
-     * @param numbers  if <code>true</code>, generated string will include
-     *  numeric characters
-     * @return the random string
-     */
-    public static String random(int count, boolean letters, boolean numbers) {
-        return random(count, 0, 0, letters, numbers);
-    }
-    
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of alpha-numeric
-     * characters as indicated by the arguments.</p>
-     *
-     * @param count  the length of random string to create
-     * @param start  the position in set of chars to start at
-     * @param end  the position in set of chars to end before
-     * @param letters  if <code>true</code>, generated string will include
-     *  alphabetic characters
-     * @param numbers  if <code>true</code>, generated string will include
-     *  numeric characters
-     * @return the random string
-     */
-    public static String random(int count, int start, int end, boolean letters, boolean numbers) {
-        return random(count, start, end, letters, numbers, null, RANDOM);
-    }
-
-    /**
-     * <p>Creates a random string based on a variety of options, using
-     * default source of randomness.</p>
-     *
-     * <p>This method has exactly the same semantics as
-     * {@link #random(int,int,int,boolean,boolean,char[],Random)}, but
-     * instead of using an externally supplied source of randomness, it uses
-     * the internal static {@link Random} instance.</p>
-     *
-     * @param count  the length of random string to create
-     * @param start  the position in set of chars to start at
-     * @param end  the position in set of chars to end before
-     * @param letters  only allow letters?
-     * @param numbers  only allow numbers?
-     * @param chars  the set of chars to choose randoms from.
-     *  If <code>null</code>, then it will use the set of all chars.
-     * @return the random string
-     * @throws ArrayIndexOutOfBoundsException if there are not
-     *  <code>(end - start) + 1</code> characters in the set array.
-     */
-    public static String random(int count, int start, int end, boolean letters, boolean numbers, char[] chars) {
-        return random(count, start, end, letters, numbers, chars, RANDOM);
-    }
-
-    /**
-     * <p>Creates a random string based on a variety of options, using
-     * supplied source of randomness.</p>
-     *
-     * <p>If start and end are both <code>0</code>, start and end are set
-     * to <code>' '</code> and <code>'z'</code>, the ASCII printable
-     * characters, will be used, unless letters and numbers are both
-     * <code>false</code>, in which case, start and end are set to
-     * <code>0</code> and <code>Integer.MAX_VALUE</code>.
-     *
-     * <p>If set is not <code>null</code>, characters between start and
-     * end are chosen.</p>
-     *
-     * <p>This method accepts a user-supplied {@link Random}
-     * instance to use as a source of randomness. By seeding a single 
-     * {@link Random} instance with a fixed seed and using it for each call,
-     * the same random sequence of strings can be generated repeatedly
-     * and predictably.</p>
-     *
-     * @param count  the length of random string to create
-     * @param start  the position in set of chars to start at
-     * @param end  the position in set of chars to end before
-     * @param letters  only allow letters?
-     * @param numbers  only allow numbers?
-     * @param chars  the set of chars to choose randoms from.
-     *  If <code>null</code>, then it will use the set of all chars.
-     * @param random  a source of randomness.
-     * @return the random string
-     * @throws ArrayIndexOutOfBoundsException if there are not
-     *  <code>(end - start) + 1</code> characters in the set array.
-     * @throws IllegalArgumentException if <code>count</code> &lt; 0.
-     * @since 2.0
-     */
-    public static String random(int count, int start, int end, boolean letters, boolean numbers,
-                                char[] chars, Random random) {
-        if (count == 0) {
-            return "";
-        } else if (count < 0) {
-            throw new IllegalArgumentException("Requested random string length " + count + " is less than 0.");
-        }
-        if ((start == 0) && (end == 0)) {
-            end = 'z' + 1;
-            start = ' ';
-            if (!letters && !numbers) {
-                start = 0;
-                end = Integer.MAX_VALUE;
-            }
-        }
-
-        char[] buffer = new char[count];
-        int gap = end - start;
-
-        while (count-- != 0) {
-            char ch;
-            if (chars == null) {
-                ch = (char) (random.nextInt(gap) + start);
-            } else {
-                ch = chars[random.nextInt(gap) + start];
-            }
-            if ((letters && Character.isLetter(ch))
-                || (numbers && Character.isDigit(ch))
-                || (!letters && !numbers)) 
-            {
-                if(ch >= 56320 && ch <= 57343) {
-                    if(count == 0) {
-                        count++;
-                    } else {
-                        // low surrogate, insert high surrogate after putting it in
-                        buffer[count] = ch;
-                        count--;
-                        buffer[count] = (char) (55296 + random.nextInt(128));
-                    }
-                } else if(ch >= 55296 && ch <= 56191) {
-                    if(count == 0) {
-                        count++;
-                    } else {
-                        // high surrogate, insert low surrogate before putting it in
-                        buffer[count] = (char) (56320 + random.nextInt(128));
-                        count--;
-                        buffer[count] = ch;
-                    }
-                } else if(ch >= 56192 && ch <= 56319) {
-                    // private high surrogate, no effing clue, so skip it
-                    count++;
-                } else {
-                    buffer[count] = ch;
-                }
-            } else {
-                count++;
-            }
-        }
-        return new String(buffer);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of characters
-     * specified.</p>
-     *
-     * @param count  the length of random string to create
-     * @param chars  the String containing the set of characters to use,
-     *  may be null
-     * @return the random string
-     * @throws IllegalArgumentException if <code>count</code> &lt; 0.
-     */
-    public static String random(int count, String chars) {
-        if (chars == null) {
-            return random(count, 0, 0, false, false, null, RANDOM);
-        }
-        return random(count, chars.toCharArray());
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of characters specified.</p>
-     *
-     * @param count  the length of random string to create
-     * @param chars  the character array containing the set of characters to use,
-     *  may be null
-     * @return the random string
-     * @throws IllegalArgumentException if <code>count</code> &lt; 0.
-     */
-    public static String random(int count, char[] chars) {
-        if (chars == null) {
-            return random(count, 0, 0, false, false, null, RANDOM);
-        }
-        return random(count, 0, chars.length, false, false, chars, RANDOM);
-    }
-    
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Reflections.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Reflections.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Reflections.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,402 +0,0 @@
-//$Id: Reflections.java 9572 2008-11-15 22:33:10Z shane.bryzak at jboss.com $
-package org.jboss.seam.util;
-
-import java.beans.Introspector;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
-
-public class Reflections
-{
-   
-   public static Object invoke(Method method, Object target, Object... args) throws Exception
-   {
-      try
-      {
-         return method.invoke( target, args );
-      }
-      catch (IllegalArgumentException iae)
-      {
-         String message = "Could not invoke method by reflection: " + toString(method);
-         if (args!=null && args.length>0) 
-         {
-            message += " with parameters: (" + Strings.toClassNameString(", ", args) + ')';
-         }
-         message += " on: " + target.getClass().getName();
-         throw new IllegalArgumentException(message, iae);
-      }
-      catch (InvocationTargetException ite)
-      {
-         if ( ite.getCause() instanceof Exception )
-         {
-            throw (Exception) ite.getCause();
-         }
-         else
-         {
-            throw ite;
-         }
-      }
-   }
-   
-   public static Object get(Field field, Object target) throws Exception
-   {
-      boolean accessible = field.isAccessible();
-      try
-      {
-         field.setAccessible(true);
-         return field.get(target);
-      }
-      catch (IllegalArgumentException iae)
-      {
-         String message = "Could not get field value by reflection: " + toString(field) + 
-            " on: " + target.getClass().getName();
-         throw new IllegalArgumentException(message, iae);
-      }
-      finally
-      {
-         field.setAccessible(accessible);
-      }
-   }
-   
-   public static void set(Field field, Object target, Object value) throws Exception
-   {
-      try
-      {
-         field.set(target, value);
-      }
-      catch (IllegalArgumentException iae)
-      {
-         // target may be null if field is static so use field.getDeclaringClass() instead
-         String message = "Could not set field value by reflection: " + toString(field) +
-            " on: " + field.getDeclaringClass().getName();
-         if (value==null)
-         {
-            message += " with null value";
-         }
-         else
-         {
-            message += " with value: " + value.getClass();
-         }
-         throw new IllegalArgumentException(message, iae);
-      }
-   }
-   
-   public static Object getAndWrap(Field field, Object target)
-   {
-      boolean accessible = field.isAccessible();
-      try
-      {
-         field.setAccessible(true);
-         return get(field, target);
-      }
-      catch (Exception e)
-      {
-         if (e instanceof RuntimeException)
-         {
-            throw (RuntimeException) e;
-         }
-         else
-         {
-            throw new IllegalArgumentException("exception setting: " + field.getName(), e);
-         }
-      }
-      finally
-      {
-         field.setAccessible(accessible);
-      }
-   }
-   
-   public static void setAndWrap(Field field, Object target, Object value)
-   {
-      boolean accessible = field.isAccessible();
-      try
-      {
-         field.setAccessible(true);
-         set(field, target, value);
-      }
-      catch (Exception e)
-      {
-         if (e instanceof RuntimeException)
-         {
-            throw (RuntimeException) e;
-         }
-         else
-         {
-            throw new IllegalArgumentException("exception setting: " + field.getName(), e);
-         }
-      }
-      finally
-      {
-         field.setAccessible(accessible);
-      }
-   }
-   
-   public static Object invokeAndWrap(Method method, Object target, Object... args)
-   {
-      try
-      {
-         return invoke(method, target, args);
-      }
-      catch (Exception e)
-      {
-         if (e instanceof RuntimeException)
-         {
-            throw (RuntimeException) e;
-         }
-         else
-         {
-            throw new RuntimeException("exception invoking: " + method.getName(), e);
-         }
-      }
-   }
-   
-   public static String toString(Method method)
-   {
-      return Strings.unqualify( method.getDeclaringClass().getName() ) + 
-            '.' + 
-            method.getName() + 
-            '(' + 
-            Strings.toString( ", ", method.getParameterTypes() ) + 
-            ')';
-   }
-   
-   public static String toString(Member member)
-   {
-      return Strings.unqualify( member.getDeclaringClass().getName() ) + 
-            '.' + 
-            member.getName();
-   }
-   
-   public static Class classForName(String name) throws ClassNotFoundException
-   {
-      try 
-      {
-         return Thread.currentThread().getContextClassLoader().loadClass(name);
-      }
-      catch (Exception e)
-      {
-         return Class.forName(name);
-      }
-   }
-   
-   /**
-    * Return's true if the class can be loaded using Reflections.classForName()
-    */
-   public static boolean isClassAvailable(String name)
-   {
-      try 
-      {
-         classForName(name);
-      }
-      catch (ClassNotFoundException e) {
-         return false;
-      }
-      return true;
-   }
-
-   public static Class getCollectionElementType(Type collectionType)
-   {
-      if ( !(collectionType instanceof ParameterizedType) )
-      {
-         throw new IllegalArgumentException("collection type not parameterized");
-      }
-      Type[] typeArguments = ( (ParameterizedType) collectionType ).getActualTypeArguments();
-      if (typeArguments.length==0)
-      {
-         throw new IllegalArgumentException("no type arguments for collection type");
-      }
-      Type typeArgument = typeArguments.length==1 ? typeArguments[0] : typeArguments[1]; //handle Maps
-      if (typeArgument instanceof ParameterizedType)
-      {
-         typeArgument = ((ParameterizedType) typeArgument).getRawType();
-      }
-      if ( !(typeArgument instanceof Class) )
-      {
-         throw new IllegalArgumentException("type argument not a class");
-      }
-      return (Class) typeArgument;
-   }
-   
-   public static Class getMapKeyType(Type collectionType)
-   {
-      if ( !(collectionType instanceof ParameterizedType) )
-      {
-         throw new IllegalArgumentException("collection type not parameterized");
-      }
-      Type[] typeArguments = ( (ParameterizedType) collectionType ).getActualTypeArguments();
-      if (typeArguments.length==0)
-      {
-         throw new IllegalArgumentException("no type arguments for collection type");
-      }
-      Type typeArgument = typeArguments[0];
-      if ( !(typeArgument instanceof Class) )
-      {
-         throw new IllegalArgumentException("type argument not a class");
-      }
-      return (Class) typeArgument;
-   }
-   
-   public static Method getSetterMethod(Class clazz, String name)
-   {
-      Method[] methods = clazz.getMethods();
-      for (Method method: methods)
-      {
-         String methodName = method.getName();
-         if ( methodName.startsWith("set") && method.getParameterTypes().length==1 )
-         {
-            if ( Introspector.decapitalize( methodName.substring(3) ).equals(name) )
-            {
-               return method;
-            }
-         }
-      }
-      throw new IllegalArgumentException("no such setter method: " + clazz.getName() + '.' + name);
-   }
-   
-   public static Method getGetterMethod(Class clazz, String name)
-   {
-      Method[] methods = clazz.getMethods();
-      for (Method method: methods)
-      {
-         String methodName = method.getName();
-         if ( method.getParameterTypes().length==0 )
-         {
-            if ( methodName.startsWith("get") )
-            {
-               if ( Introspector.decapitalize( methodName.substring(3) ).equals(name) )
-               {
-                  return method;
-               }
-            }
-            else if ( methodName.startsWith("is") )
-            {
-               if ( Introspector.decapitalize( methodName.substring(2) ).equals(name) )
-               {
-                  return method;
-               }
-            }
-         }
-      }
-      throw new IllegalArgumentException("no such getter method: " + clazz.getName() + '.' + name);
-   }
-   
-   /**
-    * Get all the getter methods annotated with the given annotation. Returns an empty list if
-    * none are found
-    */
-   public static List<Method> getGetterMethods(Class clazz, Class annotation) 
-   {
-      List<Method> methods = new ArrayList<Method>();
-      for (Method method : clazz.getMethods())
-      {
-         if (method.isAnnotationPresent(annotation))
-         {
-            methods.add(method);
-         }
-      }
-      return methods;
-   }
-   
-   public static Field getField(Class clazz, String name)
-   {
-      for ( Class superClass = clazz; superClass!=Object.class; superClass=superClass.getSuperclass() )
-      {
-         try
-         {
-            return superClass.getDeclaredField(name);
-         }
-         catch (NoSuchFieldException nsfe) {}
-      }
-      throw new IllegalArgumentException("no such field: " + clazz.getName() + '.' + name);
-   }
-   
-   /**
-    * Get all the fields which are annotated with the given annotation. Returns an empty list
-    * if none are found
-    */
-   public static List<Field> getFields(Class clazz, Class annotation)
-   {
-      List<Field> fields = new ArrayList<Field>();
-      for (Class superClass = clazz; superClass!=Object.class; superClass=superClass.getSuperclass())
-      {
-         for (Field field : superClass.getDeclaredFields())
-         {
-            if (field.isAnnotationPresent(annotation))
-            {
-               fields.add(field);
-            }
-         }
-      }
-      return fields;
-   }
-
-   public static Method getMethod(Annotation annotation, String name)
-   {
-      try
-      {
-         return annotation.annotationType().getMethod(name);
-      }
-      catch (NoSuchMethodException nsme)
-      {
-         return null;
-      }
-   }
-   
-   public static Method getMethod(Class clazz, String name)
-   {
-      for ( Class superClass = clazz; superClass!=Object.class; superClass=superClass.getSuperclass() )
-      {
-         try
-         {
-            return superClass.getDeclaredMethod(name);
-         }
-         catch (NoSuchMethodException nsme) {}
-      }
-      throw new IllegalArgumentException("no such method: " + clazz.getName() + '.' + name);
-   }
-   
-   /**
-    * Check to see if clazz is an instance of name
-    */
-   public static boolean isInstanceOf(Class clazz, String name)
-   {
-      if (name == null)
-      {
-         throw new IllegalArgumentException("name cannot be null");
-      }
-      for (Class c = clazz; c != Object.class; c = c.getSuperclass())
-      {
-         if (instanceOf(c, name))
-         {
-            return true;
-         }
-      }
-      return false;
-   }
-   
-   private static boolean instanceOf(Class clazz, String name)
-   {  
-      if (name.equals(clazz.getName()))
-      {
-         return true;
-      }
-      else
-      {
-         boolean found = false;
-         Class[] interfaces = clazz.getInterfaces();
-         for (int i = 0; i < interfaces.length && !found; i++)
-         {
-            found = instanceOf(interfaces[i], name);
-         }
-         return found;
-      }
-      
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Resources.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Resources.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Resources.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,190 +0,0 @@
-package org.jboss.seam.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-public class Resources 
-{
-    private static final LogProvider log = Logging.getLogProvider(Resources.class);
-
-   public static InputStream getResourceAsStream(String resource, ServletContext servletContext) 
-   {
-      String stripped = resource.startsWith("/") ? 
-            resource.substring(1) : resource;
-   
-      InputStream stream = null; 
-
-      if (servletContext!=null) {
-         try {
-            stream = servletContext.getResourceAsStream(resource);
-            if (stream!=null) {
-                log.debug("Loaded resource from servlet context: " + resource);
-            }
-         } catch (Exception e) {       
-             //
-         }
-      }
-      
-      if (stream==null) {
-         stream = getResourceAsStream(resource, stripped);
-      }
-      
-      return stream;
-   }
-
-   public static URL getResource(String resource, ServletContext servletContext) 
-   {
-      if (!resource.startsWith("/"))
-      {
-         resource = "/" + resource;
-      }
-      
-      String stripped = resource.startsWith("/") ? 
-            resource.substring(1) : resource;
-   
-      URL url  = null; 
-
-      if (servletContext!=null)
-      {
-         try {
-            url = servletContext.getResource(resource);
-            log.debug("Loaded resource from servlet context: " + url);
-         } catch (Exception e) {
-             //
-         }
-      }
-      
-      if (url==null)
-      {
-        url = getResource(resource, stripped);
-      }
-      
-      return url;
-   }
-   
-   static InputStream getResourceAsStream(String resource, String stripped)
-   {
-      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-      InputStream stream = null;
-      if (classLoader!=null) {
-         stream = classLoader.getResourceAsStream(stripped);
-         if (stream !=null) {
-             log.debug("Loaded resource from context classloader: " + stripped);
-         }
-      }
-      
-      if (stream == null) {
-         stream = Seam.class.getResourceAsStream(resource);
-         if (stream !=null) {
-             log.debug("Loaded resource from Seam classloader: " + resource);
-         }
-      }
-      
-      if (stream == null) {
-         stream = Seam.class.getClassLoader().getResourceAsStream(stripped);
-         if (stream!=null) {
-             log.debug("Loaded resource from Seam classloader: " + stripped);
-         }
-      }
-      
-      return stream;
-   }
-   
-   static URL getResource(String resource, String stripped)
-   {
-       ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-       URL url = null;
-       if (classLoader!=null) {
-           url = classLoader.getResource(stripped);
-           if (url!=null) {
-               log.debug("Loaded resource from context classloader: " + url);
-           }
-       }
-
-       if (url == null) {
-           url = Seam.class.getResource(resource);
-           if (url!=null) {
-               log.debug("Loaded resource from Seam classloader: " + url);
-           }
-       }
-
-       if (url == null) {
-           url = Seam.class.getClassLoader().getResource(stripped);
-           if (url!=null) {
-               log.debug("Loaded resource from Seam classloader: " + url);
-           }           
-       }
-       
-       return url;
-   }
-
-   public static void closeStream(InputStream inputStream) {
-       if (inputStream == null) {
-           return;
-       }
-       
-       try {
-           inputStream.close();
-       } catch (IOException e) {
-          // 
-       }       
-   }
-   
-   public static void closeReader(java.io.Reader reader) {
-      if (reader == null) {
-          return;
-      }
-      
-      try {
-          reader.close();
-      } catch (IOException e) {
-         // 
-      }       
-  }
-   
-   public static File getRealFile(ServletContext servletContext, String path)
-   {
-      String realPath = servletContext.getRealPath(path);
-      if (realPath==null) //WebLogic!
-      {
-         try 
-         {
-            URL resourcePath = servletContext.getResource(path);
-            if ((resourcePath != null) && (resourcePath.getProtocol().equals("file"))) 
-            {
-               realPath = resourcePath.getPath();
-            }
-            else
-            {
-               log.warn("Unable to determine real path from servlet context for \"" + path + "\" path does not exist.");
-            }
-         }
-         catch (MalformedURLException e) 
-         {
-            log.warn("Unable to determine real path from servlet context for : " + path);
-            log.debug("Caused by MalformedURLException", e);
-         }
-
-      }
-      
-      if (realPath != null)
-      {
-         File file = new File(realPath);
-         if (file.exists())
-         {
-            return file;
-         }
-      }
-      return null;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/SortItem.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/SortItem.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/SortItem.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,40 +0,0 @@
-package org.jboss.seam.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class SortItem<T> {
-
-    private T obj;
-    private List<SortItem> around = new ArrayList<SortItem>();
-    private List<SortItem> within = new ArrayList<SortItem>();
-
-    public SortItem(T obj) {
-        this.obj = obj;
-    }
-
-    public T getObj() {
-        return obj;
-    }
-
-    public void addAround(SortItem item) {
-        if (item != null) {
-            around.add(item);
-        }
-    }
-    
-    public void addWithin(SortItem item) {
-        if (item != null) {
-            within.add(item);
-        }
-    }
-    
-    public List<SortItem> getAround() {
-        return around;
-    }
-
-    public List<SortItem> getWithin() {
-        return within;
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Sorter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Sorter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Sorter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,60 +0,0 @@
-package org.jboss.seam.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Sorter<T> {
-
-    private List<SortItem<T>> list = null; // new ArrayList();
-
-    public List<SortItem<T>> sort(List<SortItem<T>> lst) {
-
-        this.list = lst;
-        List<SortItem<T>> res = new ArrayList<SortItem<T>>();
-        SortItem<T> inmost = null;
-
-        do {
-            inmost = getInmost();
-            if (inmost != null) {
-                res.add(inmost);
-                remove(inmost);
-            }
-        } while (!list.isEmpty() && inmost != null);
-
-        if (!list.isEmpty()) {
-            throw new IllegalArgumentException("Can not sort list:" + list);
-        }
-
-        return res;
-    }
-
-    private void remove(SortItem<T> item) {
-        list.remove(item);
-        for (SortItem<T> o : list) {
-            o.getWithin().remove(item);
-        }
-    }
-
-    private SortItem<T> getInmost() {
-        SortItem<T> res = null;
-        for (SortItem<T> o : list) {
-            if (o.getWithin().isEmpty() && nobodyWantsAround(o)) {
-                res = o;
-                break;
-            }
-        }
-        return res;
-    }
-
-    private boolean nobodyWantsAround(SortItem<T> item) {
-        boolean res = true;
-        for (SortItem<T> o : list) {
-            if (o.getAround().contains(item)) {
-                res = false;
-                break;
-            }
-        }
-        return res;
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Strings.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Strings.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Strings.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,156 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.util;
-
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.StringTokenizer;
-
-/**
- * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- */
-public class Strings
-{
-   
-   public static String unqualify(String name)
-   {
-      return unqualify(name, '.');
-   }
-   
-   public static String unqualify(String name, char sep)
-   {
-      return name.substring( name.lastIndexOf(sep)+1, name.length() );
-   }
-   
-   public static boolean isEmpty(String string)
-   {
-      int len;
-      if (string == null || (len = string.length()) == 0)
-      {
-         return true;
-      }
-      
-      for (int i = 0; i < len; i++)
-      {
-         if ((Character.isWhitespace(string.charAt(i)) == false))
-         {
-            return false;
-         }
-      }
-      return true;
-   }
-   
-   public static String nullIfEmpty(String string)
-   {
-      return isEmpty(string) ? null : string;
-   }
-   
-   public static String emptyIfNull(String string)
-   {
-      return string == null ? "" : string;
-   }
-
-   public static String toString(Object component)
-   {
-      try {
-         PropertyDescriptor[] props = Introspector.getBeanInfo( component.getClass() )
-               .getPropertyDescriptors();
-         StringBuilder builder = new StringBuilder();
-         for (PropertyDescriptor descriptor : props)
-         {
-            builder.append( descriptor.getName() )
-               .append('=')
-               .append( descriptor.getReadMethod().invoke(component) )
-               .append("; ");
-         }
-         return builder.toString();
-      }
-      catch (Exception e) {
-         return "";
-      }
-   }
-
-   public static String[] split(String strings, String delims)
-   {
-      if (strings==null)
-      {
-         return new String[0];
-      }
-      else
-      {      
-         StringTokenizer tokens = new StringTokenizer(strings, delims);
-         String[] result = new String[ tokens.countTokens() ];
-         int i=0;
-         while ( tokens.hasMoreTokens() )
-         {
-            result[i++] = tokens.nextToken();
-         }
-         return result;
-      }
-   }
-   
-   public static String toString(Object... objects)
-   {
-      return toString(" ", objects);
-   }
-   
-   public static String toString(String sep, Object... objects)
-   {
-      if (objects.length==0) return "";
-      StringBuilder builder = new StringBuilder();
-      for (Object object: objects)
-      {
-         builder.append(sep).append(object);
-      }
-      return builder.substring(sep.length());
-   }
-   
-   public static String toClassNameString(String sep, Object... objects)
-   {
-      if (objects.length==0) return "";
-      StringBuilder builder = new StringBuilder();
-      for (Object object: objects)
-      {
-         builder.append(sep);
-         if (object==null)
-         {
-            builder.append("null");
-         }
-         else
-         {
-            builder.append( object.getClass().getName() );
-         }
-      }
-      return builder.substring(sep.length());
-   }
-   
-   public static String toString(String sep, Class... classes)
-   {
-      if (classes.length==0) return "";
-      StringBuilder builder = new StringBuilder();
-      for (Class clazz: classes)
-      {
-         builder.append(sep).append( clazz.getName() );
-      }
-      return builder.substring(sep.length());
-   }
-   
-   public static String toString(InputStream in) throws IOException {
-      final StringBuilder out = new StringBuilder();
-      final byte[] b = new byte[4096];
-      for ( int n; (n = in.read(b)) != -1; ) 
-      {
-         out.append(new String(b, 0, n));
-      }
-      return out.toString();
-  }
-
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/TypedBeanProperty.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/TypedBeanProperty.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/TypedBeanProperty.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,114 +0,0 @@
-package org.jboss.seam.util;
-
-import java.beans.Introspector;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-public class TypedBeanProperty
-{
-   private Field propertyField;
-   private Method propertyGetter;
-   private Method propertySetter;
-   
-   private String name;
-   
-   private boolean isFieldProperty;
-   private boolean set = false;
-   
-   public TypedBeanProperty(Class<?> cls, Class type)
-   {      
-      // First check declared fields
-      for (Field f : cls.getDeclaredFields())
-      {
-         if (f.getGenericType().equals(type)) 
-         {
-            setupFieldProperty(f);           
-            set = true;
-            return;
-         }
-      }      
-      
-      // Then check public fields, in case it's inherited
-      for (Field f : cls.getFields())
-      {
-         if (f.getGenericType().equals(type)) 
-         {
-            setupFieldProperty(f);
-            set = true;
-            return;
-         }
-      }
-      
-      // Then check public methods (we ignore private methods)
-      for (Method m : cls.getMethods())
-      {
-         if (m.getGenericReturnType().equals(type))
-         {
-            String methodName = m.getName();
-            
-            if ( m.getName().startsWith("get") )
-            {
-               this.name = Introspector.decapitalize( m.getName().substring(3) );
-            }
-            else if ( methodName.startsWith("is") )
-            {
-               this.name = Introspector.decapitalize( m.getName().substring(2) );
-            }            
-            
-            if (this.name != null)
-            {
-               this.propertyGetter = Reflections.getGetterMethod(cls, this.name);
-               this.propertySetter = Reflections.getSetterMethod(cls, this.name);
-               isFieldProperty = false;               
-               set = true;
-            }
-            else
-            {
-               throw new IllegalStateException("Invalid accessor method, must start with 'get' or 'is'.  " +
-                     "Method: " + m + " in class: " + cls);
-            }
-         }
-      }      
-   }
-   
-   private void setupFieldProperty(Field propertyField)
-   {
-      this.propertyField = propertyField;
-      isFieldProperty = true;
-      this.name = propertyField.getName();
-   }   
-   
-   public void setValue(Object bean, Object value)
-   {
-      if (isFieldProperty)
-      {
-         Reflections.setAndWrap(propertyField, bean, value);         
-      }
-      else
-      {
-         Reflections.invokeAndWrap(propertySetter, bean, value);
-      }
-   }
-   
-   public Object getValue(Object bean)
-   {
-      if (isFieldProperty)
-      {
-         return Reflections.getAndWrap(propertyField, bean);  
-      }
-      else
-      {
-         return Reflections.invokeAndWrap(propertyGetter, bean);
-      }
-   }   
-   
-   public String getName()
-   {
-      return name;
-   }
-   
-   public boolean isSet()
-   {
-      return set;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Work.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Work.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/Work.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,115 +0,0 @@
-package org.jboss.seam.util;
-
-import static org.jboss.seam.util.EJB.APPLICATION_EXCEPTION;
-import static org.jboss.seam.util.EJB.rollback;
-
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
-
-import org.jboss.seam.annotations.ApplicationException;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.transaction.Transaction;
-
-/**
- * Performs work in a JTA transaction.
- * 
- * @author Gavin King
- */
-public abstract class Work<T>
-{
-   private static final LogProvider log = Logging.getLogProvider(Work.class);
-   
-   protected abstract T work() throws Exception;
-   
-   protected boolean isNewTransactionRequired(boolean transactionActive)
-   {
-      return !transactionActive;
-   }
-   
-   public final T workInTransaction() throws Exception
-   {      
-      org.jboss.seam.transaction.UserTransaction transaction = null;
-      boolean transactionActive = false;
-      boolean newTransactionRequired = false;
-      UserTransaction userTransaction = null;
-      
-      try {
-          transaction = Transaction.instance();
-      
-          transactionActive =  transaction.isActiveOrMarkedRollback()
-              || transaction.isRolledBack(); //TODO: temp workaround, what should we really do in this case??
-          newTransactionRequired = isNewTransactionRequired(transactionActive);          
-          userTransaction = newTransactionRequired ? transaction : null;
-      } catch (IllegalStateException e) {
-         // for shutdown case, when we can't get the tx object because the event context is gone
-         // but we should still check if a tx is required and fail accordingly if it is
-         newTransactionRequired = isNewTransactionRequired(false);
-         if (newTransactionRequired) {
-            throw e;
-         }
-      }
-      
-      try
-      {
-         if (newTransactionRequired) 
-         {
-            log.debug("beginning transaction");
-            userTransaction.begin();
-         }
-
-         T result = work();
-         if (newTransactionRequired) 
-         {
-            if (transaction.isMarkedRollback())
-            {
-               log.debug("rolling back transaction");
-               userTransaction.rollback(); 
-            }
-            else
-            {
-               log.debug("committing transaction");
-               userTransaction.commit();
-            }
-         }
-         return result;
-      }
-      catch (Exception e)
-      {
-         if (newTransactionRequired && userTransaction.getStatus() != Status.STATUS_NO_TRANSACTION )
-         {
-            if(isRollbackRequired(e, true))
-            {
-               log.debug("rolling back transaction");
-               userTransaction.rollback();
-            }
-            else
-            {
-               log.debug("committing transaction after ApplicationException(rollback=false):" + e.getMessage());
-               userTransaction.commit();
-            }
-         }
-         throw e;
-      }
-      
-   }
-   
-   public static boolean isRollbackRequired(Exception e, boolean isJavaBean)
-   {
-      Class<? extends Exception> clazz = e.getClass();
-      return ( isSystemException(e, isJavaBean, clazz) ) || 
-            ( isJavaBean && clazz.isAnnotationPresent(APPLICATION_EXCEPTION) && rollback( clazz.getAnnotation(APPLICATION_EXCEPTION) ) ) ||
-            ( clazz.isAnnotationPresent(ApplicationException.class) && clazz.getAnnotation(ApplicationException.class).rollback() );
-   }
-
-   private static boolean isSystemException(Exception e, boolean isJavaBean, Class<? extends Exception> clazz)
-   {
-      return isJavaBean && 
-            (e instanceof RuntimeException) && 
-            !clazz.isAnnotationPresent(APPLICATION_EXCEPTION) && 
-            !clazz.isAnnotationPresent(ApplicationException.class) &&
-            //TODO: this is hackish, maybe just turn off RollackInterceptor for @Converter/@Validator components
-            !JSF.VALIDATOR_EXCEPTION.isInstance(e) &&
-            !JSF.CONVERTER_EXCEPTION.isInstance(e);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/XML.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/XML.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/XML.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,68 +0,0 @@
-package org.jboss.seam.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.UnknownHostException;
-
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public class XML
-{
-    public static Element getRootElement(InputStream stream) throws DocumentException
-    {
-        try {
-            SAXReader saxReader = new SAXReader();
-            saxReader.setEntityResolver(new DTDEntityResolver());
-            saxReader.setMergeAdjacentText(true);
-            return saxReader.read(stream).getRootElement();
-        } catch (DocumentException e) {
-            Throwable nested = e.getNestedException();
-            if (nested!= null) {
-                if (nested instanceof FileNotFoundException) {
-                    throw new RuntimeException("Can't find schema/DTD reference: " +
-                            nested.getMessage(), e);
-                } else if (nested instanceof UnknownHostException) {
-                    throw new RuntimeException("Cannot connect to host from schema/DTD reference: " + 
-                            nested.getMessage() + 
-                            " - check that your schema/DTD reference is current", e);
-                }
-            }
-            throw e;
-        }
-    }
-
-    
-   /**
-    * Parses an XML document safely, as to not resolve any external DTDs
-    */
-   public static Element getRootElementSafely(InputStream stream) 
-       throws DocumentException
-   {
-       SAXReader saxReader = new SAXReader();
-       saxReader.setEntityResolver(new NullEntityResolver());
-       saxReader.setMergeAdjacentText(true);
-       return saxReader.read(stream).getRootElement();       
-   }
-   
-   
-   public static class NullEntityResolver 
-       implements EntityResolver 
-   {
-       private static final byte[] empty = new byte[0];
-
-       public InputSource resolveEntity(String systemId, String publicId) 
-           throws SAXException, 
-                  IOException 
-       {
-           return new InputSource(new ByteArrayInputStream(empty));
-       }
-
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/util/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-/**
- * Utils - you knew they were here somewhere.
- * Now where did I put that String splitter...?
- */
-package org.jboss.seam.util;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AbstractFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AbstractFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AbstractFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,173 +0,0 @@
-package org.jboss.seam.web;
-
-import java.util.regex.Pattern;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * Abstract superclass for Seam components that act as servlet filters. Note
- * that since a filter is potentially called outside of a set of Seam contexts,
- * it is not a true Seam component. 
- * 
- * However, we are able to reuse the functionality for component scanning, 
- * installation and configuration for filters. All filters must specify
- * the @Filter annotation to be included by Seam's master filter.
- * 
- * @see org.jboss.seam.annotations.web.Filter
- * @author Shane Bryzak
- *
- */
-public abstract class AbstractFilter implements Filter
-{
-   private ServletContext servletContext;
-
-   private String urlPattern;
-   
-   private String regexUrlPattern;
-   
-   private Pattern pattern;
-   
-   private boolean disabled;
-
-   public void init(FilterConfig filterConfig) throws ServletException
-   {
-      servletContext = filterConfig.getServletContext();
-   }
-   
-   protected ServletContext getServletContext()
-   {
-      return servletContext;
-   }
-   
-   public String getUrlPattern()
-   {
-      return urlPattern;
-   }
-   
-   public void setUrlPattern(String urlPattern)
-   {
-      this.urlPattern = urlPattern;
-   }
-   
-   public String getRegexUrlPattern()
-   {
-      return this.regexUrlPattern;
-   }
-   
-   public void setRegexUrlPattern(String regexUrlPattern)
-   {
-      this.regexUrlPattern = regexUrlPattern;
-      pattern = null;
-   }
-   
-   private Pattern getPattern()
-   {
-      if (pattern == null && getRegexUrlPattern() != null)
-      {
-         pattern = Pattern.compile(getRegexUrlPattern());
-      }
-      return pattern;
-   }
-   
-   public boolean isDisabled() 
-   {
-      return disabled;
-   }
-   
-   public void setDisabled(boolean disabled) 
-   {
-      this.disabled = disabled;
-   }
-   
-   /**
-    * Pattern matching code, adapted from Tomcat. This method checks to see if
-    * the specified path matches the specified pattern.
-    * 
-    * @param request ServletRequest The request containing the path
-    * @return boolean True if the path matches the pattern, false otherwise
-    */
-   public boolean isMappedToCurrentRequestPath(ServletRequest request)
-   {
-      if (!(request instanceof HttpServletRequest))
-      {
-         return true;
-      }
-
-      HttpServletRequest httpRequest = (HttpServletRequest)request;
-      String path = httpRequest.getRequestURI().replaceFirst(httpRequest.getContextPath(), "");      
-      String urlPattern = getUrlPattern();
-      Pattern regexPattern = getPattern();
-      if (urlPattern != null)
-      {
-         return matchesTomcatPattern(path, urlPattern);
-      }
-      else if (regexPattern != null)
-      {
-         return matchesRegexPattern(path, regexPattern);
-      }
-      else
-      {
-         return true;
-      }
-   }
-   
-   private static boolean matchesRegexPattern(String path, Pattern pattern)
-   {
-      return pattern.matcher(path).matches();
-   }
-
-   private static boolean matchesTomcatPattern(String path, String pattern)
-   {
-      
-      if (pattern==null) return true;
-
-      if (path == null || "".equals(path)) path = "/";
-      if (pattern == null || "".equals(pattern)) pattern = "/";
-
-      // Check for an exact match
-      if (path.equals(pattern)) return true;
-
-      // Check for path prefix matching
-      if (pattern.startsWith("/") && pattern.endsWith("/*"))
-      {
-         pattern = pattern.substring(0, pattern.length() - 2);
-         if (pattern.length() == 0) return true;
-
-         if (path.endsWith("/")) path = path.substring(0, path.length() - 1);
-
-         while (true)
-         {
-            if (pattern.equals(path)) return true;
-            int slash = path.lastIndexOf('/');
-            if (slash <= 0) break;
-            path = path.substring(0, slash);
-         }
-         return false;
-      }
-
-      // Check for suffix matching
-      if (pattern.startsWith("*."))
-      {
-         int slash = path.lastIndexOf('/');
-         int period = path.lastIndexOf('.');
-         if ((slash >= 0) && (period > slash) && path.endsWith(pattern.substring(1)))
-         {
-            return true;
-         }
-         return false;
-      }
-
-      // Check for universal mapping
-      if (pattern.equals("/")) return true;
-
-      return false;
-   }
-   
-   public void destroy() {}
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AbstractResource.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AbstractResource.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AbstractResource.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,185 +0,0 @@
-package org.jboss.seam.web;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.zip.GZIPOutputStream;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Superclass of Seam components that serve up
- * "resources" to the client via the Seam
- * resource servlet. Note that since a filter is
- * potentially called outside of a set of Seam
- * contexts, it is not a true Seam component.
- * However, we are able to reuse the functionality
- * for component scanning, installation and
- * configuration for filters. All resources
- * must extend this class.
- *
- * @author Shane Bryzak
- *
- */
-public abstract class AbstractResource
-{
-   private ServletContext context;
-
-   protected ServletContext getServletContext()
-   {
-      return context;
-   }
-
-   public void setServletContext(ServletContext context)
-   {
-      this.context = context;
-   }
-
-   public abstract void getResource(HttpServletRequest request, HttpServletResponse response)
-       throws ServletException, IOException;
-
-   public abstract String getResourcePath();
-
-   protected OutputStream selectOutputStream(HttpServletRequest request, HttpServletResponse response)
-         throws IOException
-   {
-
-      String acceptEncoding = request.getHeader("Accept-Encoding");
-      String mimeType = response.getContentType();
-
-      if (isGzipEnabled()
-            && acceptEncoding != null
-            && acceptEncoding.length() > 0
-            && acceptEncoding.indexOf("gzip") > -1
-            && isCompressedMimeType(mimeType))
-      {
-         return new GZIPResponseStream(response);
-      }
-      else
-      {
-         return response.getOutputStream();
-      }
-   }
-
-   protected boolean isCompressedMimeType(String mimeType)
-   {
-      return mimeType.matches("text/.+");
-   }
-
-   protected boolean isGzipEnabled()
-   {
-      return true;
-   }
-
-   /*
-    * Copyright 2004-2008 the original author or authors.
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    *      http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    *
-    * @See org/springframework/js/resource/ResourceServlet.java
-    */
-   private class GZIPResponseStream extends ServletOutputStream
-   {
-
-      private ByteArrayOutputStream byteStream = null;
-
-      private GZIPOutputStream gzipStream = null;
-
-      private boolean closed = false;
-
-      private HttpServletResponse response = null;
-
-      private ServletOutputStream servletStream = null;
-
-      public GZIPResponseStream(HttpServletResponse response) throws IOException
-      {
-         super();
-         closed = false;
-         this.response = response;
-         this.servletStream = response.getOutputStream();
-         byteStream = new ByteArrayOutputStream();
-         gzipStream = new GZIPOutputStream(byteStream);
-      }
-
-      @Override
-      public void close() throws IOException
-      {
-         if (closed)
-         {
-            throw new IOException("This output stream has already been closed");
-         }
-         gzipStream.finish();
-
-         byte[] bytes = byteStream.toByteArray();
-
-         response.setContentLength(bytes.length);
-         response.addHeader("Content-Encoding", "gzip");
-         servletStream.write(bytes);
-         servletStream.flush();
-         servletStream.close();
-         closed = true;
-      }
-
-      @Override
-      public void flush() throws IOException
-      {
-         if (closed)
-         {
-            throw new IOException("Cannot flush a closed output stream");
-         }
-         gzipStream.flush();
-      }
-
-      @Override
-      public void write(int b) throws IOException
-      {
-         if (closed)
-         {
-            throw new IOException("Cannot write to a closed output stream");
-         }
-         gzipStream.write((byte) b);
-      }
-
-      @Override
-      public void write(byte b[]) throws IOException
-      {
-         write(b, 0, b.length);
-      }
-
-      @Override
-      public void write(byte b[], int off, int len) throws IOException
-      {
-         if (closed)
-         {
-            throw new IOException("Cannot write to a closed output stream");
-         }
-         gzipStream.write(b, off, len);
-      }
-
-      @SuppressWarnings("unused")
-      public boolean closed()
-      {
-         return (this.closed);
-      }
-
-      @SuppressWarnings("unused")
-      public void reset()
-      {
-         // noop
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Ajax4jsfFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Ajax4jsfFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Ajax4jsfFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,126 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-
-/**
- * A Seam filter component wrapper for the Ajax4JSF.
- * This class exists to allow the Ajax4JSF filter to
- * be configured in the web: namespace. The subclass
- * does the actual work.
- * 
- * @see org.jboss.seam.ui.filter.Ajax4jsfFilterInstantiator
- * @author Pete Muir
- * 
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.web.ajax4jsfFilter")
- at Install(precedence = BUILT_IN, dependencies="org.jboss.seam.web.ajax4jsfFilterInstantiator")
- at BypassInterceptors
- at Filter
-public class Ajax4jsfFilter extends AbstractFilter
-{
-   
-   private javax.servlet.Filter delegate;
-   
-   private String forceParser;
-   private String enableCache;
-   private String log4jInitFile;
-   
-   public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) throws IOException, ServletException
-   {
-      if (delegate==null)
-      {
-         chain.doFilter(servletRequest, servletResponse);
-      }
-      else
-      {
-         delegate.doFilter(servletRequest, servletResponse, chain);
-      }
-   }
-   
-   @Override
-   public void init(FilterConfig filterConfig) throws ServletException
-   {  
-      super.init(filterConfig);
-      
-      delegate = (javax.servlet.Filter) Component.getInstance("org.jboss.seam.web.ajax4jsfFilterInstantiator", ScopeType.STATELESS);
-      if (delegate!=null)
-      {
-         Map<String, String> parameters = new HashMap<String, String>();
-         if ( getForceParser() != null )
-         {
-            parameters.put( "forceparser", getForceParser() );
-         }
-         if ( getEnableCache() != null )
-         {
-            parameters.put( "enable-cache", getEnableCache() );
-         }
-         if ( getLog4jInitFile() != null )
-         {
-            parameters.put( "log4j-init-file", getLog4jInitFile() );
-         }
-      
-         delegate.init( new FilterConfigWrapper(filterConfig, parameters) );
-      }
-   }
-   
-   public String getEnableCache()
-   {
-      return enableCache;
-   }
-
-   public void setEnableCache(String enableCache)
-   {
-      this.enableCache = enableCache;
-   }
-
-   public String getForceParser()
-   {
-      return forceParser;
-   }
-
-   public void setForceParser(String forceParser)
-   {
-      this.forceParser = forceParser;
-   }
-   
-   public String getForceparser()
-   {
-      return forceParser;
-   }
-   
-   public void setForceparser(String forceParser)
-   {
-      this.forceParser = forceParser;
-   }
-
-   public String getLog4jInitFile()
-   {
-      return log4jInitFile;
-   }
-
-   public void setLog4jInitFile(String log4jInitFile)
-   {
-      this.log4jInitFile = log4jInitFile;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AuthenticationFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AuthenticationFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/AuthenticationFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,331 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.security.auth.login.LoginException;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.security.Credentials;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.NotLoggedInException;
-import org.jboss.seam.security.digest.DigestRequest;
-import org.jboss.seam.security.digest.DigestUtils;
-import org.jboss.seam.security.digest.DigestValidationException;
-import org.jboss.seam.servlet.ContextualHttpServletRequest;
-import org.jboss.seam.util.Base64;
-
-/**
- * Seam Servlet Filter supporting HTTP Basic and Digest authentication. Some code
- * adapted from Acegi.
- *  
- * @author Shane Bryzak
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.web.authenticationFilter")
- at Install(value = false, precedence = BUILT_IN)
- at BypassInterceptors
- at Filter(within = "org.jboss.seam.web.exceptionFilter")
-public class AuthenticationFilter extends AbstractFilter
-{
-   private static final String DEFAULT_REALM = "seamApp";
-   
-   private static final String AUTH_TYPE_BASIC = "basic";
-   private static final String AUTH_TYPE_DIGEST = "digest";
-   
-   @Logger Log log;
-   
-   public enum AuthType {basic, digest}
-   
-   private String realm = DEFAULT_REALM;
-   
-   private String key;
-   private int nonceValiditySeconds = 300;
-   
-   private String authType = AUTH_TYPE_BASIC;
-   
-   public void setRealm(String realm)
-   {
-      this.realm = realm;
-   }
-   
-   public String getRealm()
-   {
-      return realm;
-   }
-   
-   public void setAuthType(String authType)
-   {
-      this.authType = authType;
-   }
-   
-   public String getAuthType()
-   {
-      return authType;
-   }
-   
-   public String getKey()
-   {
-      return key;
-   }
-   
-   public void setKey(String key)
-   {
-      this.key = key;
-   }
-   
-   public int getNonceValiditySeconds()
-   {
-      return nonceValiditySeconds;
-   }
-   
-   public void setNonceValiditySeconds(int value)
-   {
-      this.nonceValiditySeconds = value;
-   }
-   
-   public void doFilter(ServletRequest request, ServletResponse response, final FilterChain chain) 
-      throws IOException, ServletException
-   {
-      if (!(request instanceof HttpServletRequest)) 
-      {
-         throw new ServletException("This filter can only process HttpServletRequest requests");
-      }
-
-      final HttpServletRequest httpRequest = (HttpServletRequest) request;
-      final HttpServletResponse httpResponse = (HttpServletResponse) response;
-
-      // Force session creation
-      httpRequest.getSession();
-      
-      new ContextualHttpServletRequest(httpRequest)
-      {
-         @Override
-         public void process() throws ServletException, IOException, LoginException
-         {      
-            if (AUTH_TYPE_BASIC.equals(authType))
-               processBasicAuth(httpRequest, httpResponse, chain);
-            else if (AUTH_TYPE_DIGEST.equals(authType))
-               processDigestAuth(httpRequest, httpResponse, chain);
-            else
-               throw new ServletException("Invalid authentication type");
-         }
-      }.run();
-   }
-   
-   private void processBasicAuth(HttpServletRequest request, 
-            HttpServletResponse response, FilterChain chain)
-      throws IOException, ServletException
-   {
-      Identity identity = Identity.instance();
-
-      if (identity == null)
-      {
-         throw new ServletException("Identity not found - please ensure that the Identity component is created on startup.");
-      }
-      
-      Credentials credentials = identity.getCredentials();
-      
-      boolean requireAuth = false;
-      
-      String header = request.getHeader("Authorization");
-      if (header != null && header.startsWith("Basic "))
-      {
-         String base64Token = header.substring(6);
-         String token = new String(Base64.decode(base64Token));
-
-         String username = "";
-         String password = "";
-         int delim = token.indexOf(":");
-
-         if (delim != -1) 
-         {
-             username = token.substring(0, delim);
-             password = token.substring(delim + 1);
-         }
-
-         // Only reauthenticate if username doesn't match Identity.username and user isn't authenticated
-         if (!username.equals(credentials.getUsername()) || !identity.isLoggedIn()) 
-         {
-            try
-            {
-               credentials.setPassword(password);
-               authenticate( request, username );
-            }         
-            catch (Exception ex)
-            {
-               log.warn("Error authenticating: " + ex.getMessage());
-               requireAuth = true;
-            }  
-         }
-      }
-      
-      if (!identity.isLoggedIn() && !credentials.isSet())
-      {
-         requireAuth = true;
-      }
-      
-      try
-      {
-         if (!requireAuth)
-         {
-            chain.doFilter(request, response);
-            return;
-         }
-      }
-      catch (NotLoggedInException ex) 
-      {
-         requireAuth = true;
-      }
-      
-      if ((requireAuth && !identity.isLoggedIn()))
-      {
-         response.addHeader("WWW-Authenticate", "Basic realm=\"" + realm + "\"");
-         response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Not authorized");         
-      }               
-   }
-
-   private void processDigestAuth(HttpServletRequest request, 
-            HttpServletResponse response, FilterChain chain)
-      throws IOException, ServletException
-   {
-      Identity identity = Identity.instance();
-      
-      if (identity == null)
-      {
-         throw new ServletException("Identity not found - please ensure that the Identity component is created on startup.");
-      }      
-      
-      Credentials credentials = identity.getCredentials();
-      
-      boolean requireAuth = false;    
-      boolean nonceExpired = false;
-      
-      String header = request.getHeader("Authorization");      
-      if (header != null && header.startsWith("Digest "))
-      {        
-         String section212response = header.substring(7);
-
-         String[] headerEntries = section212response.split(",");
-         Map<String,String> headerMap = new HashMap<String,String>();
-         for (String entry : headerEntries)
-         {
-            String[] vals = split(entry, "=");
-            headerMap.put(vals[0].trim(), vals[1].replace("\"", "").trim());
-         }
-
-         DigestRequest digestRequest = new DigestRequest();
-         digestRequest.setHttpMethod(request.getMethod());
-         digestRequest.setSystemRealm(realm);
-         digestRequest.setRealm(headerMap.get("realm"));         
-         digestRequest.setKey(key);
-         digestRequest.setNonce(headerMap.get("nonce"));
-         digestRequest.setUri(headerMap.get("uri"));
-         digestRequest.setClientDigest(headerMap.get("response"));
-         digestRequest.setQop(headerMap.get("qop"));
-         digestRequest.setNonceCount(headerMap.get("nc"));
-         digestRequest.setClientNonce(headerMap.get("cnonce"));
-                  
-         try
-         {
-            digestRequest.validate();
-            request.getSession().setAttribute(DigestRequest.DIGEST_REQUEST, digestRequest);
-            authenticate( request, headerMap.get("username") );
-         }
-         catch (DigestValidationException ex)
-         {
-            log.warn(String.format("Digest validation failed, header [%s]: %s",
-                     section212response, ex.getMessage()));
-            requireAuth = true;
-            
-            if (ex.isNonceExpired()) nonceExpired = true;
-         }            
-         catch (Exception ex)
-         {
-            log.warn("Error authenticating: " + ex.getMessage());
-            requireAuth = true;
-         }
-      }   
-
-      if (!identity.isLoggedIn() && !credentials.isSet())
-      {
-         requireAuth = true;
-      }
-      
-      try
-      {
-         if (!requireAuth)
-         {
-            chain.doFilter(request, response);
-            return;
-         }
-      }
-      catch (NotLoggedInException ex) 
-      {
-         requireAuth = true;
-      }
-      
-      if ((requireAuth && !identity.isLoggedIn()))
-      {      
-         long expiryTime = System.currentTimeMillis() + (nonceValiditySeconds * 1000);
-         
-         String signatureValue = DigestUtils.md5Hex(expiryTime + ":" + key);
-         String nonceValue = expiryTime + ":" + signatureValue;
-         String nonceValueBase64 = Base64.encodeBytes(nonceValue.getBytes());
-
-         // qop is quality of protection, as defined by RFC 2617.
-         // we do not use opaque due to IE violation of RFC 2617 in not
-         // representing opaque on subsequent requests in same session.
-         String authenticateHeader = "Digest realm=\"" + realm + "\", " + "qop=\"auth\", nonce=\""
-             + nonceValueBase64 + "\"";
-
-         if (nonceExpired) authenticateHeader = authenticateHeader + ", stale=\"true\"";
-
-         response.addHeader("WWW-Authenticate", authenticateHeader);
-         response.sendError(HttpServletResponse.SC_UNAUTHORIZED);      
-      }             
-   }
-   
-   private void authenticate(HttpServletRequest request, final String username)
-      throws ServletException, IOException, LoginException
-   {
-      Identity identity = Identity.instance();
-      identity.getCredentials().setUsername(username);
-      identity.authenticate();
-   }
-   
-   private String[] split(String toSplit, String delimiter) 
-   {
-      if (delimiter.length() != 1) 
-      {
-          throw new IllegalArgumentException("Delimiter can only be one character in length");
-      }
-
-      int offset = toSplit.indexOf(delimiter);
-
-      if (offset < 0) {
-          return null;
-      }
-
-      String beforeDelimiter = toSplit.substring(0, offset);
-      String afterDelimiter = toSplit.substring(offset + 1);
-
-      return new String[] {beforeDelimiter, afterDelimiter};
-  }   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/CacheControlFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/CacheControlFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/CacheControlFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,64 +0,0 @@
-package org.jboss.seam.web;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * Provides automatic addition of cache-control HTTP headers to matching resource responses.
- *
- * @author Christian Bauer
- */
- at Scope(ScopeType.APPLICATION)
- at Name("org.jboss.seam.web.cacheControlFilter")
- at Install(value = false, precedence = Install.BUILT_IN)
- at BypassInterceptors
- at Filter(within = "org.jboss.seam.web.exceptionFilter")
-public class CacheControlFilter extends AbstractFilter
-{
-
-   private static final LogProvider log = Logging.getLogProvider(CacheControlFilter.class);
-
-   private String value;
-
-   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
-         throws IOException, ServletException
-   {
-
-      HttpServletRequest httpRequest = (HttpServletRequest) request;
-
-      if (isMappedToCurrentRequestPath(request))
-      {
-         log.debug("Applying Cache-Control HTTP header for resource '"
-               + httpRequest.getRequestURI() + "': " + getValue());
-
-         HttpServletResponse httpResponse = (HttpServletResponse) response;
-         httpResponse.setHeader("Cache-Control", getValue());
-      }
-
-      chain.doFilter(request, response);
-   }
-
-   public String getValue()
-   {
-      return value;
-   }
-
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/CharacterEncodingFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/CharacterEncodingFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/CharacterEncodingFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,65 +0,0 @@
-package org.jboss.seam.web;
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-/**
- * A servlet filter that lets you set the character encoding of 
- * submitted data. There are two init parameters: "encoding" and
- * "overrideClient".
- * 
- * @author Gavin King
- * 
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.servlet.characterEncodingFilter")
- at Install(value=false, precedence = BUILT_IN)
- at BypassInterceptors
- at Filter(within="org.jboss.seam.web.ajax4jsfFilter")
-public class CharacterEncodingFilter extends AbstractFilter
-{
-   private String encoding;
-   private boolean overrideClient;
-   
-   public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
-         throws ServletException, IOException
-   {
-      if ( encoding!=null && ( overrideClient || request.getCharacterEncoding() == null ) )
-      {
-         request.setCharacterEncoding(encoding);
-      }
-      filterChain.doFilter(request, response);
-   }
-   
-   public String getEncoding()
-   {
-      return encoding;
-   }
-   
-   public void setEncoding(String encoding)
-   {
-      this.encoding = encoding;
-   }
-   
-   public boolean getOverrideClient()
-   {
-      return overrideClient;
-   }
-   
-   public void setOverrideClient(boolean overrideClient)
-   {
-      this.overrideClient = overrideClient;
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ConditionalAbstractResource.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ConditionalAbstractResource.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ConditionalAbstractResource.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,281 +0,0 @@
-package org.jboss.seam.web;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.util.Resources;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.net.URLConnection;
-import java.net.URL;
-import java.lang.management.ManagementFactory;
-
-/**
- * Subclass this resource if you want to be able to send the right response automatically to
- * any conditional <tt>GET</tt> or <tt>HEAD</tt> request. The typically usecase is as follows:
- * <p/>
- * <pre>
- * public class MyResource extends ConditionalAbstractResource {
- *
- *     public void getResource(final HttpServletRequest request, final HttpServletResponse response) {
- *         String resourceVersion = ... // Calculate current state as string
- *         or
- *         byte[] resourceVersion = ... // Calculate current state as bytes
- *
- *         String resourcePath = ... // Get the relative (to servlet) path of the requested resource
- *
- *         if ( !sendConditional(request,
- *                              response,
- *                              createdEntityTag(resourceVersion, false),
- *                              getLastModifiedTimestamp(resourcePath) ) {
- * 
- *             // Send the regular resource representation with 200 OK etc.
- *         }
- *     }
- * }
- * </pre>
- * <p/>
- * Note that the <tt>getLastModifiedTimestamp()</tt> method is only supplied for convenience; it may not
- * return what you expect as the "last modification timestamp" of the given resource. In many cases you'd
- * rather calculate that timestamp yourself.
- * <p/>
- *
- * @author Christian Bauer
- */
-public abstract class ConditionalAbstractResource extends AbstractResource
-{
-
-   public static final String HEADER_LAST_MODIFIED = "Last-Modified";
-   public static final String HEADER_IF_MODIFIED_SINCE = "If-Modified-Since";
-
-   public static final String HEADER_ETAG = "ETag";
-   public static final String HEADER_IF_NONE_MATCH = "If-None-Match";
-
-   private static final LogProvider log = Logging.getLogProvider(ConditionalAbstractResource.class);
-
-   /**
-    * Validates the request headers <tt>If-Modified-Since</tt> and <tt>If-None-Match</tt> to determine
-    * if a <tt>304 NOT MODIFIED</tt> response can be send. If that is the case, this method will automatically
-    * send the response and return <tt>true</tt>. If condition validation fails, it will not change the
-    * response and return <tt>false</tt>.
-    * <p/>
-    * Note that both <tt>entityTag</tt> and <tt>lastModified</tt> arguments can be <tt>null</tt>. The validation
-    * procedure and the outcome depends on what the client requested. If the client requires that both entity tags and
-    * modification timestamps be validated, both arguments must be supplied to the method and they must match, for
-    * a 304 response to be send.
-    * <p/>
-    * In addition to responding with <tt>304 NOT MODIFIED</tt> when conditions match, this method will also, if
-    * arguments are not <tt>null</tt>, send the right entity tag and last modification timestamps with the response,
-    * so that future requests from the client can be made conditional.
-    * <p/>
-    *
-    * @param request         The usual HttpServletRequest for header retrieval.
-    * @param response        The usual HttpServletResponse for header manipulation.
-    * @param entityTag       An entity tag (weak or strong, in doublequotes), typically produced by hashing the content
-    *                        of the resource representation. If <tt>null</tt>, no entity tag will be send and if
-    *                        validation is requested by the client, no match for a NOT MODIFIED response will be possible.
-    * @param lastModified    The timestamp in number of milliseconds since unix epoch when the resource was
-    *                        last modified. If <tt>null</tt>, no last modification timestamp will be send  and if
-    *                        validation is requested by the client, no match for a NOT MODIFIED response will be possible.
-    * @return <tt>true</tt> if a <tt>304 NOT MODIFIED</tt> response status has been set, <tt>false</tt> if requested
-    *         conditions were invalid given the current state of the resource.
-    * @throws IOException If setting the response status failed.
-    */
-   public boolean sendConditional(HttpServletRequest request,
-                                  HttpServletResponse response,
-                                  String entityTag, Long lastModified) throws IOException
-   {
-
-      String noneMatchHeader = request.getHeader(HEADER_IF_NONE_MATCH);
-      Long modifiedSinceHeader = request.getDateHeader(HEADER_IF_MODIFIED_SINCE); // Careful, returns -1 instead of null!
-
-      boolean noneMatchValid = false;
-      if (entityTag != null)
-      {
-
-         if (! (entityTag.startsWith("\"") || entityTag.startsWith("W/\"")) && !entityTag.endsWith("\""))
-         {
-            throw new IllegalArgumentException("Entity tag is not properly formatted (or quoted): " + entityTag);
-         }
-
-         // Always send an entity tag with the response
-         response.setHeader(HEADER_ETAG, entityTag);
-
-         if (noneMatchHeader != null)
-         {
-            noneMatchValid = isNoneMatchConditionValid(noneMatchHeader, entityTag);
-         }
-      }
-
-      boolean modifiedSinceValid = false;
-      if (lastModified != null)
-      {
-
-         // Always send the last modified timestamp with the response
-         response.setDateHeader(HEADER_LAST_MODIFIED, lastModified);
-
-         if (modifiedSinceHeader != -1)
-         {
-            modifiedSinceValid = isModifiedSinceConditionValid(modifiedSinceHeader, lastModified);
-         }
-
-      }
-
-      if (noneMatchHeader != null && modifiedSinceHeader != -1)
-      {
-         log.debug(HEADER_IF_NONE_MATCH + " and " + HEADER_IF_MODIFIED_SINCE + " must match");
-
-         // If both are received, we must not return 304 unless doing so is consistent with both header fields in the request!
-         if (noneMatchValid && modifiedSinceValid)
-         {
-            log.debug(HEADER_IF_NONE_MATCH + " and " + HEADER_IF_MODIFIED_SINCE + " conditions match, sending 304");
-            response.sendError(HttpServletResponse.SC_NOT_MODIFIED);
-            return true;
-         }
-         else
-         {
-            log.debug(HEADER_IF_NONE_MATCH + " and " + HEADER_IF_MODIFIED_SINCE + " conditions do not match, not sending 304");
-            return false;
-         }
-      }
-
-      if (noneMatchHeader != null && noneMatchValid)
-      {
-         log.debug(HEADER_IF_NONE_MATCH + " condition matches, sending 304");
-         response.sendError(HttpServletResponse.SC_NOT_MODIFIED);
-         return true;
-      }
-
-      if (modifiedSinceHeader != -1 && modifiedSinceValid)
-      {
-         log.debug(HEADER_IF_MODIFIED_SINCE + " condition matches, sending 304");
-         response.sendError(HttpServletResponse.SC_NOT_MODIFIED);
-         return true;
-      }
-
-      log.debug("None of the cache conditions match, not sending 304");
-      return false;
-   }
-
-   protected boolean isNoneMatchConditionValid(String noneMatchHeader, String entityTag)
-   {
-      if (noneMatchHeader.trim().equals("*"))
-      {
-         log.debug("Found * conditional request, hence current entity tag matches");
-         return true;
-      }
-      String[] entityTagsArray = noneMatchHeader.trim().split(",");
-      for (String requestTag : entityTagsArray)
-      {
-         if (requestTag.trim().equals(entityTag))
-         {
-            log.debug("Found matching entity tag in request");
-            return true;
-         }
-      }
-      log.debug("Resource has different entity tag than requested");
-      return false;
-   }
-
-   protected boolean isModifiedSinceConditionValid(Long modifiedSinceHeader, Long lastModified)
-   {
-      if (lastModified <= modifiedSinceHeader)
-      {
-         log.debug("Resource has not been modified since requested timestamp");
-         return true;
-      }
-      log.debug("Resource has been modified since requested timestamp");
-      return false;
-   }
-
-   /**
-    * Tries to get last modification timestamp of the resource by obtaining
-    * a <tt>URLConnection</tt> to the file in the filesystem or JAR.
-    *
-    * @param resourcePath The relative (to the servlet) resource path.
-    * @return Either the last modified filestamp or if an error occurs, the JVM system startup timestamp.
-    */
-   protected Long getLastModifiedTimestamp(String resourcePath)
-   {
-      try
-      {
-         // Try to load it from filesystem or JAR through URLConnection
-         URL resourceURL = Resources.getResource(resourcePath, getServletContext());
-         if (resourceURL == null)
-         {
-            // Fall back to startup time of the JVM
-            return ManagementFactory.getRuntimeMXBean().getStartTime();
-         }
-         URLConnection resourceConn = resourceURL.openConnection();
-         return resourceConn.getLastModified();
-      }
-      catch (Exception ex)
-      {
-         // Fall back to startup time of the JVM
-         return ManagementFactory.getRuntimeMXBean().getStartTime();
-      }
-   }
-
-   /**
-    * Generates a (globally) unique identifier of the current state of the resource. The string will be
-    * hashed with MD5 and the hash result is then formatted before it is returned. If <tt>null</tt>,
-    * a <tt>null</tt> will be returned.
-    *
-    * @param hashSource The string source for hashing or the already hashed (strong or weak) entity tag.
-    * @param weak       Set to <tt>true</tt> if you want a weak entity tag.
-    * @return The hashed and formatted entity tag result.
-    */
-   protected String createEntityTag(String hashSource, boolean weak)
-   {
-      if (hashSource == null) return null;
-      return (weak ? "W/\"" : "\"") + hash(hashSource, "UTF-8", "MD5") + "\"";
-   }
-
-   /**
-    * Generates a (globally) unique identifier of the current state of the resource. The bytes will be
-    * hashed with MD5 and the hash result is then formatted before it is returned. If <tt>null</tt>,
-    * a <tt>null</tt> will be returned.
-    *
-    * @param hashSource The string source for hashing.
-    * @param weak       Set to <tt>true</tt> if you want a weak entity tag.
-    * @return The hashed and formatted entity tag result.
-    */
-   protected String createEntityTag(byte[] hashSource, boolean weak)
-   {
-      if (hashSource == null) return null;
-      return (weak ? "W/\"" : "\"") + hash(hashSource, "MD5") + "\"";
-   }
-
-   protected String hash(String text, String charset, String algorithm)
-   {
-      try
-      {
-         return hash(text.getBytes(charset), algorithm);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   protected String hash(byte[] bytes, String algorithm)
-   {
-      try
-      {
-         MessageDigest md = MessageDigest.getInstance(algorithm);
-         md.update(bytes);
-         BigInteger number = new BigInteger(1, md.digest());
-         StringBuffer sb = new StringBuffer("0");
-         sb.append(number.toString(16));
-         return sb.toString();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ContextFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ContextFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ContextFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,46 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-import org.jboss.seam.servlet.ContextualHttpServletRequest;
-
-/**
- * Manages the Seam contexts associated with a request to any servlet.
- * 
- * @author Gavin King
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.web.contextFilter")
- at Install(value=false, precedence = BUILT_IN)
- at BypassInterceptors
- at Filter(within="org.jboss.seam.web.ajax4jsfFilter")
-public class ContextFilter extends AbstractFilter 
-{
- 
-   public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) 
-       throws IOException, ServletException 
-   {
-      new ContextualHttpServletRequest( (HttpServletRequest) request )
-      {
-         @Override
-         public void process() throws ServletException, IOException
-         {
-            chain.doFilter(request, response);
-         }
-      }.run();
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ExceptionFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ExceptionFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ExceptionFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,167 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-
-import javax.faces.component.UIViewRoot;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.ConversationPropagation;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.exception.Exceptions;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.mock.MockApplication;
-import org.jboss.seam.mock.MockExternalContext;
-import org.jboss.seam.mock.MockFacesContext;
-import org.jboss.seam.transaction.Transaction;
-import org.jboss.seam.transaction.UserTransaction;
-
-/**
- * Delegate uncaught exceptions to Seam exception handling.
- * As a last line of defence, rollback uncommitted transactions,
- * and clean up Seam contexts.
- * 
- * @author Gavin King
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.web.exceptionFilter")
- at Install(precedence = BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at BypassInterceptors
- at Filter(within="org.jboss.seam.web.ajax4jsfFilter")
-public class ExceptionFilter extends AbstractFilter
-{
-   
-   private static final LogProvider log = Logging.getLogProvider(ExceptionFilter.class);
-   
-   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 
-         throws IOException, ServletException
-   {
-      try
-      {
-         chain.doFilter(request, response);
-      }
-      catch (Exception e)
-      {
-         log.debug( "handling uncaught exception", e );
-         log.debug( "exception root cause", org.jboss.seam.util.Exceptions.getCause(e) );
-         endWebRequestAfterException( (HttpServletRequest) request, (HttpServletResponse) response, e);
-      }
-   }
-   
-   protected void endWebRequestAfterException(HttpServletRequest request, HttpServletResponse response, Exception e) 
-         throws ServletException, IOException
-   {
-      
-      log.debug("running exception handlers");
-      
-      //if the event context was cleaned up, fish the conversation id 
-      //directly out of the ServletRequest attributes, else get it from
-      //the event context
-      Manager manager = Contexts.isEventContextActive() ?
-              (Manager) Contexts.getEventContext().get(Manager.class) :
-              (Manager) request.getAttribute( Seam.getComponentName(Manager.class) );
-      String conversationId = manager==null ? null : manager.getCurrentConversationId();
-      
-      // Ensure that the call in which the exception occurred was cleaned up - it might not be, and there is no harm in trying
-      Lifecycle.endRequest();
-      
-      //the FacesContext is gone - create a fake one for Redirect and HttpError to call
-      MockFacesContext facesContext = createFacesContext(request, response);
-      facesContext.setCurrent();
-      
-      //Initialize the temporary context objects
-      FacesLifecycle.beginExceptionRecovery( facesContext.getExternalContext() );
-      
-      //If there is an existing long-running conversation on
-      //the failed request, propagate it
-      if (conversationId==null)
-      {
-          Manager.instance().initializeTemporaryConversation();
-      }
-      else
-      {
-          ConversationPropagation.instance().setConversationId(conversationId);
-          Manager.instance().restoreConversation();
-      }
-      
-      //Now do the exception handling
-      try
-      {
-         rollbackTransactionIfNecessary();
-         Exceptions.instance().handle(e);
-      }
-      catch (ServletException se)
-      {
-         throw se;
-      }
-      catch (IOException ioe)
-      {
-         throw ioe;
-      }
-      catch (Exception ehe)
-      {
-         throw new ServletException(ehe);
-      }
-      finally
-      {
-         //Finally, clean up the contexts
-         try 
-         {
-            FacesLifecycle.endRequest( facesContext.getExternalContext() );
-            facesContext.release();
-            log.debug("done running exception handlers");
-         }
-         catch (Exception ere)
-         {
-            log.error("could not destroy contexts", ere);
-         }
-      }
-   }
-   
-   private MockFacesContext createFacesContext(HttpServletRequest request, HttpServletResponse response)
-   {
-      MockFacesContext mockFacesContext = new MockFacesContext( new MockExternalContext(getServletContext(), request, response), new MockApplication() );
-      mockFacesContext.setViewRoot( new UIViewRoot() );
-      return mockFacesContext;
-   }
-   
-   protected void rollbackTransactionIfNecessary()
-   {
-      try 
-      {
-         UserTransaction transaction = Transaction.instance();
-         if ( transaction.isActiveOrMarkedRollback() || transaction.isRolledBack() )
-         {
-            log.debug("killing transaction");
-            transaction.rollback();
-         }
-      }
-      catch (Exception te)
-      {
-         log.error("could not roll back transaction", te);
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/FileUploadException.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/FileUploadException.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/FileUploadException.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.web;
-
-/**
- * Thrown when an exception occurs while uploading a file. 
- *  
- * @author Shane Bryzak
- */
-public class FileUploadException extends RuntimeException
-{   
-   public FileUploadException()
-   {
-      this(null, null);
-   }
-   
-   public FileUploadException(String message)
-   {
-      this(message, null);
-   }
-   
-   public FileUploadException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/FilterConfigWrapper.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/FilterConfigWrapper.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/FilterConfigWrapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-/**
- * 
- */
-package org.jboss.seam.web;
-
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Map;
-
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-
-import org.jboss.seam.util.EnumerationEnumeration;
-
-public class FilterConfigWrapper implements FilterConfig
-{
-   
-   private FilterConfig delegate;
-   private Map<String, String> parameters;
-   
-   public FilterConfigWrapper(FilterConfig filterConfig, Map<String, String> parameters)
-   {
-      delegate = filterConfig;
-      this.parameters = parameters;
-   }
-
-   public String getFilterName()
-   {
-      return delegate.getFilterName();
-   }
-
-   public String getInitParameter(String name)
-   {
-      if ( parameters.containsKey(name) )
-      {
-         return parameters.get(name);
-      }
-      else
-      {
-         return delegate.getInitParameter(name);
-      }
-   }
-
-   public Enumeration getInitParameterNames()
-   {
-      Enumeration[] enumerations = {
-               delegate.getInitParameterNames(), 
-               Collections.enumeration( parameters.keySet() )
-            };
-      return new EnumerationEnumeration(enumerations);
-   }
-
-   public ServletContext getServletContext()
-   {
-      return delegate.getServletContext();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/HotDeployFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/HotDeployFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/HotDeployFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.init.Initialization;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
- at Name("org.jboss.seam.web.hotDeployFilter")
- at Install(debug=true, precedence=BUILT_IN)
- at BypassInterceptors
- at Scope(APPLICATION)
- at Filter
-public class HotDeployFilter extends AbstractFilter
-{
-
-   private static LogProvider log = Logging.getLogProvider(HotDeployFilter.class);
-   
-   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
-            throws IOException, ServletException
-   {
-      if (request instanceof HttpServletRequest)
-      {
-         Init init = (Init) getServletContext().getAttribute(Seam.getComponentName(Init.class));
-         if (init != null)
-         {
-            try
-            {
-               new Initialization(getServletContext()).redeploy((HttpServletRequest) request, init);
-            }
-            catch (InterruptedException e)
-            {
-               log.warn("Unable to redeploy, please try again");
-            }
-         }
-      }
-      chain.doFilter(request, response);
-   }
-
-
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IdentityFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IdentityFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IdentityFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,42 +0,0 @@
-package org.jboss.seam.web;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-
-/**
- * A filter that provides integration between Servlet Security and the Seam
- * identity component. This integration is accomplished by wrapping the
- * HttpServletRequest with an HttpServletRequestWrapper implementation that
- * delegates security-related calls to the Seam identity component.
- *
- * @author Dan Allen
- */
- at Scope(ScopeType.APPLICATION)
- at Name("org.jboss.seam.web.identityFilter")
- at Install(precedence = Install.BUILT_IN, dependencies = "org.jboss.seam.security.identity")
- at BypassInterceptors
- at Filter(within = {"org.jboss.seam.web.multipartFilter"})
-public class IdentityFilter extends AbstractFilter {
-
-   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
-      throws IOException, ServletException {
-      if (!(request instanceof HttpServletRequest)) {
-         throw new ServletException("This filter can only process HttpServletRequest requests");
-      }
-
-      HttpServletRequest httpRequest = (HttpServletRequest) request;
-      chain.doFilter(new IdentityRequestWrapper(httpRequest), response);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IdentityRequestWrapper.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IdentityRequestWrapper.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IdentityRequestWrapper.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,47 +0,0 @@
-package org.jboss.seam.web;
-
-import java.security.Principal;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.security.Identity;
-
-/**
- * An HttpServletRequestWrapper implementation that provides integration
- * between Servlet Security and the Seam identity component.
- *
- * @author Dan Allen
- */
-public class IdentityRequestWrapper extends HttpServletRequestWrapper {
-
-   private Identity identity;
-
-   public IdentityRequestWrapper(HttpServletRequest request) {
-      super(request);
-      identity = (Identity) request.getSession().
-         getAttribute(Seam.getComponentName(Identity.class));
-   }
-
-   @Override
-   public String getRemoteUser() {
-      return getUserPrincipal() != null ? getUserPrincipal().getName() : null;
-   }
-
-   @Override
-   public Principal getUserPrincipal() 
-   {
-      return seamSecurityIsActive() ? identity.getPrincipal() : super.getUserPrincipal();
-   }
-
-   @Override
-   public boolean isUserInRole(String role) {
-      return seamSecurityIsActive() ? identity.hasRole(role) : super.isUserInRole(role);
-   }
-   
-   private boolean seamSecurityIsActive()
-   {
-      return Identity.isSecurityEnabled() && identity != null;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IncomingPattern.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IncomingPattern.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IncomingPattern.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,157 +0,0 @@
-package org.jboss.seam.web;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-
-
-public class IncomingPattern {
-    String view;
-    String pattern;
-    ServletMapping viewMapping;
-
-    java.util.regex.Pattern regexp;
-    List<String> regexpArgs = new ArrayList<String>();
-    
-    public IncomingPattern(ServletMapping viewMapping, String view, String pattern) {
-        this.view = view;
-        this.pattern = pattern;
-        this.viewMapping = viewMapping;
-        
-        parsePattern(pattern);
-    }
-    
-    public Rewrite rewrite(String path) {
-           return new IncomingRewrite(path);
-    }
-
-    public void parsePattern(String value) {
-        StringBuffer expr = new StringBuffer();
-          
-        expr.append("^");
-        while (value.length()>0) {
-            int pos = value.indexOf('{');
-            if (pos == -1) {
-                expr.append(regexpLiteral(value));
-                value = "";
-            } else {
-                int pos2 = value.indexOf('}');
-                if (pos2 == -1) {
-                    throw new IllegalArgumentException("invalid pattern");
-                }
-                expr.append(regexpLiteral(value.substring(0,pos)));
-                String arg = value.substring(pos+1,pos2);
-                expr.append(regexpArg(arg));
-                regexpArgs.add(arg);
-                value = value.substring(pos2+1);
-            }
-        }
-        expr.append("$");
-        
-        regexp = java.util.regex.Pattern.compile(expr.toString());
-    }
-
-    private String regexpArg(String substring) {
-        return "([^/]*)";
-    }
-
-    private String regexpLiteral(String value) {
-        StringBuffer res = new StringBuffer();
-        for (int i=0; i<value.length(); i++) {
-            char c = value.charAt(i);
-            
-            if (Character.isLetterOrDigit(c)) {
-                res.append(c);
-            } else {
-                res.append('\\').append(c);
-            }
-        }
-        return res.toString();
-    }
-    
-    public class IncomingRewrite
-        implements Rewrite
-    {
-        String incoming;
-        String queryArgs;
-
-        Boolean isMatch = null;
-        private List<String> matchedArgs = new ArrayList<String>();
-
-        public IncomingRewrite(String incoming) {
-            int queryPos = incoming.indexOf('?');
-
-            if (queryPos == -1) {
-                this.incoming = incoming;
-                this.queryArgs = "";
-            } else {
-                this.incoming = incoming.substring(0, queryPos);
-                this.queryArgs = incoming.substring(queryPos+1);
-            }
-
-            // don't match trailing slash - it might indicate an empty arg
-            // this.incoming = stripTrailingSlash(this.incoming);
-        }
-
-//        private String stripTrailingSlash(String text) {
-//            if (text.endsWith("/")) {
-//                return stripTrailingSlash(text.substring(0,text.length()-1));
-//            }
-//            return text;
-//        }
-
-        public boolean isMatch() {
-            if (isMatch == null) {
-                isMatch = match();
-            }
-            return isMatch;
-        }
-
-        protected boolean match() {
-            if (incoming==null) {
-                return false;
-            }
-
-            Matcher matcher = regexp.matcher(incoming);
-            if (matcher.find()) {
-                for (int i=0; i<regexpArgs.size(); i++) {
-                    matchedArgs.add(matcher.group(i+1));
-                }
-                return true;
-            }
-            return false;
-        }
-
-        public String rewrite() {
-            StringBuffer result = new StringBuffer();
-            
-            result.append(mappedURL(view));
-
-            boolean first = true;
-
-            if (queryArgs.length()>0) {
-                result.append('?').append(queryArgs);
-                first = false;
-            }
-
-            for (int i=0; i<regexpArgs.size(); i++) {
-                String key   = regexpArgs.get(i);
-                String value = matchedArgs.get(i);
-                
-                if (first) {
-                    result.append('?');
-                    first = false;
-                } else {
-                    result.append('&');
-                }
-                result.append(key).append('=').append(value);
-            }
-
-            return result.toString();
-        }
-    }
-    
-    private String mappedURL(String viewId) {
-        return viewMapping.mapViewIdToURL(viewId);
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IsUserInRole.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IsUserInRole.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/IsUserInRole.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,63 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.AbstractMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Manager component for a map of roles assigned
- * to the current user, as exposed via the JSF
- * ExternalContext.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.web.isUserInRole")
- at Install(precedence=BUILT_IN)
-public class IsUserInRole
-{
-   @Unwrap
-   public Map<String, Boolean> getMap()
-   {
-      return new AbstractMap<String, Boolean>()
-      {
-         @Override
-         public Set<Map.Entry<String, Boolean>> entrySet() {
-            throw new UnsupportedOperationException();
-         }
-
-         @Override
-         public Boolean get(Object key)
-         {
-            if ( !(key instanceof String ) ) return false;
-            String role = (String) key;
-            return isUserInRole(role);
-         }
-         
-      };
-   }
-
-   protected Boolean isUserInRole(String role)
-   {
-      ServletRequest servletRequest = ServletContexts.instance().getRequest();
-      if ( servletRequest != null )
-      {
-         return ( (HttpServletRequest) servletRequest ).isUserInRole(role);
-      }
-      return null;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Locale.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Locale.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Locale.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,35 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import javax.servlet.ServletRequest;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Manager component for the current locale that is
- * aware of the HTTP request locale
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.STATELESS)
- at Name("org.jboss.seam.core.locale")
- at Install(precedence=FRAMEWORK-1)
- at BypassInterceptors
-public class Locale extends org.jboss.seam.core.Locale
-{
-
-   @Unwrap @Override
-   public java.util.Locale getLocale()
-   {
-      ServletContexts servletContexts = ServletContexts.getInstance();
-      ServletRequest request = servletContexts==null ? null : servletContexts.getRequest();
-      return request==null ? super.getLocale() : request.getLocale();
-   }
-   
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/LoggingFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/LoggingFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/LoggingFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,66 +0,0 @@
-package org.jboss.seam.web;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.apache.log4j.MDC;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.Credentials;
-
-/**
- * This filter adds the authenticated user name to the log4j
- * mapped diagnostic context so that it can be included in
- * formatted log output if desired, by adding %X{username}
- * to the pattern.
- * 
- * @author Eric Trautman
- */
- at Scope(ScopeType.APPLICATION)
- at Name("org.jboss.seam.web.loggingFilter")
- at BypassInterceptors
- at Filter(within="org.jboss.seam.web.authenticationFilter")
- at Install(classDependencies="org.apache.log4j.Logger", 
-         dependencies="org.jboss.seam.security.identity",
-         precedence=Install.BUILT_IN)
-public class LoggingFilter extends AbstractFilter 
-{
-   
-   public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
-         throws IOException, ServletException 
-   {
-   
-      HttpSession session = ((HttpServletRequest) servletRequest).getSession(false);
-      if (session!=null)
-      {
-         Object attribute = session.getAttribute("org.jboss.seam.security.identity");
-         if (attribute instanceof Identity) 
-         {
-             Identity identity = (Identity) attribute;
-             Credentials credentials = identity.getCredentials();
-             String username = credentials != null ? credentials.getUsername() : null;
-             if (username != null) 
-             {
-                 MDC.put("username", username);
-             }
-         }
-      }
-      
-      filterChain.doFilter(servletRequest, servletResponse);
-      
-      MDC.remove("username");
-      
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,114 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-
-/**
- * A filter for decoding multipart requests, for
- * use with the file upload control.
- * 
- * @author Shane Bryzak
- *
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.web.multipartFilter")
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
- at Filter(within={"org.jboss.seam.web.ajax4jsfFilter", "org.jboss.seam.web.exceptionFilter"})
-public class MultipartFilter extends AbstractFilter
-{
-   public static final String MULTIPART = "multipart/";
-   
-   /**
-    * Flag indicating whether a temporary file should be used to cache the uploaded file
-    */
-   private boolean createTempFiles = false;
-   
-   /**
-    * The maximum size of a file upload request.  0 means no limit.
-    */
-   private int maxRequestSize = 0; 
-     
-   public boolean getCreateTempFiles()
-   {
-      return createTempFiles;
-   }
-   
-   public void setCreateTempFiles(boolean createTempFiles)
-   {
-      this.createTempFiles = createTempFiles;
-   }
-   
-   public int getMaxRequestSize()
-   {
-      return maxRequestSize;
-   }
-   
-   public void setMaxRequestSize(int maxFileSize)
-   {
-      this.maxRequestSize = maxFileSize;
-   }   
-   
-   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
-            throws IOException, ServletException
-   {
-      if (!(response instanceof HttpServletResponse))
-      {
-         chain.doFilter(request, response);
-         return;
-      }
-
-      HttpServletRequest httpRequest = (HttpServletRequest) request;
-
-      if (isMultipartRequest(httpRequest))
-      {
-         MultipartRequest multipartRequest = new MultipartRequestImpl(httpRequest, createTempFiles, 
-               maxRequestSize); 
-         
-         // Force the request to be parsed now
-         multipartRequest.getParameterNames();
-         
-         chain.doFilter(multipartRequest, response);
-      }
-      else
-      {
-         chain.doFilter(request, response);
-      }
-   }
-   
-   private boolean isMultipartRequest(HttpServletRequest request)
-   {
-      if (!"post".equals(request.getMethod().toLowerCase()))
-      {
-         return false;
-      }
-      
-      String contentType = request.getContentType();
-      if (contentType == null)
-      {
-         return false;
-      }
-      
-      if (contentType.toLowerCase().startsWith(MULTIPART))
-      {
-         return true;
-      }
-      
-      return false;     
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartRequest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartRequest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartRequest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-package org.jboss.seam.web;
-
-import java.io.InputStream;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * Interface that declares multipart-specific API methods, to enable easier mocking of multipart
- * requests.
- *  
- * @author Shane Bryzak
- */
-public interface MultipartRequest extends HttpServletRequest
-{
-   byte[] getFileBytes(String name);
-   InputStream getFileInputStream(String name);
-   String getFileContentType(String name);
-   String getFileName(String name);
-   int getFileSize(String name);
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartRequestImpl.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartRequestImpl.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/MultipartRequestImpl.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,643 +0,0 @@
-package org.jboss.seam.web;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.rmi.server.UID;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-
-/**
- * Request wrapper for supporting multipart requests, used for file uploading.
- * 
- * @author Shane Bryzak
- */
-public class MultipartRequestImpl extends HttpServletRequestWrapper implements MultipartRequest
-{   
-   private static final String PARAM_NAME = "name";
-   private static final String PARAM_FILENAME = "filename";
-   private static final String PARAM_CONTENT_TYPE = "Content-Type";
-   
-   private static final int BUFFER_SIZE = 2048;
-   private static final int CHUNK_SIZE = 512;
-   
-   private boolean createTempFiles;
-   
-   private String encoding = null;
-   
-   private Map<String,Param> parameters = null;
-   
-   private enum ReadState { BOUNDARY, HEADERS, DATA }   
-   
-   private static final byte CR = 0x0d;
-   private static final byte LF = 0x0a;   
-   private static final byte[] CR_LF = {CR,LF};
-         
-   private abstract class Param
-   {
-      private String name;
-      
-      public Param(String name)
-      {
-         this.name = name;
-      }
-      
-      public String getName()
-      {
-         return name;
-      }
-      
-      public abstract void appendData(byte[] data, int start, int length) 
-         throws IOException;
-   }
-   
-   private class ValueParam extends Param
-   {
-      private Object value = null;
-      private ByteArrayOutputStream buf = new ByteArrayOutputStream();      
-      
-      public ValueParam(String name)
-      {
-         super(name);
-      }
-      
-      @Override
-      public void appendData(byte[] data, int start, int length)
-         throws IOException
-      {
-         buf.write(data, start, length);
-      }
-      
-      public void complete()
-         throws UnsupportedEncodingException
-      {
-         String val = encoding == null ? new String(buf.toByteArray()) :
-                                         new String(buf.toByteArray(), encoding);
-         if (value == null)
-         {
-            value = val;
-         }
-         else 
-         {
-            if (!(value instanceof List))
-            {
-               List<String> v = new ArrayList<String>();
-               v.add((String) value);
-               value = v;
-            }
-            
-            ((List) value).add(val);
-         }            
-         buf.reset();
-      }
-      
-      public Object getValue()
-      {
-         return value;
-      }
-   }
-   
-   private class FileParam extends Param
-   {
-      private String filename;
-      private String contentType;
-      private int fileSize;
-           
-      private ByteArrayOutputStream bOut = null;
-      private FileOutputStream fOut = null;
-      private File tempFile = null;
-      
-      public FileParam(String name)
-      {
-         super(name);
-      }      
-      
-      public String getFilename()
-      {
-         return filename;
-      }
-      
-      public void setFilename(String filename)
-      {
-         this.filename = filename;
-      }
-      
-      public String getContentType()
-      {
-         return contentType;
-      }
-      
-      public void setContentType(String contentType)
-      {
-         this.contentType = contentType;
-      }
-      
-      public int getFileSize()
-      {
-         return fileSize;
-      }      
-      
-      public void createTempFile()
-      {
-         try
-         {
-            tempFile = File.createTempFile(new UID().toString().replace(":", "-"), ".upload");
-            tempFile.deleteOnExit();
-            fOut = new FileOutputStream(tempFile);            
-         }
-         catch (IOException ex)
-         {
-            throw new FileUploadException("Could not create temporary file");
-         }
-      }
-      
-      @Override
-      public void appendData(byte[] data, int start, int length)
-         throws IOException
-      {
-         if (fOut != null)
-         {
-            fOut.write(data, start, length);
-            fOut.flush();
-         }
-         else
-         {
-            if (bOut == null) bOut = new ByteArrayOutputStream();
-            bOut.write(data, start, length);
-         }
-         
-         fileSize += length;
-      }
-      
-      public byte[] getData()
-      {
-         if (fOut != null)
-         {
-            try
-            {
-               fOut.close();
-            }
-            catch (IOException ex) {}
-            fOut = null;
-         }
-         
-         if (bOut != null)
-         {
-            return bOut.toByteArray();
-         }
-         else if (tempFile != null)
-         {
-            if (tempFile.exists())
-            {
-               try
-               {
-                  FileInputStream fIn = new FileInputStream(tempFile);
-                  ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-                  byte[] buf = new byte[512];
-                  int read = fIn.read(buf);
-                  while (read != -1)
-                  {
-                     bOut.write(buf, 0, read);
-                     read = fIn.read(buf);
-                  }
-                  bOut.flush();
-
-                  fIn.close();
-                  tempFile.delete();
-                  return bOut.toByteArray();
-               }
-               catch (IOException ex) { /* too bad? */}
-            }
-         }
-        
-        return null;
-      }
-      
-      public InputStream getInputStream()
-      {
-         if (fOut != null)
-         {
-            try
-            {
-               fOut.close();
-            }
-            catch (IOException ex) {}
-            fOut = null;
-         }
-         
-         if (bOut!=null)
-         {
-            return new ByteArrayInputStream(bOut.toByteArray());
-         }
-         else if (tempFile!=null)
-         {
-            try
-            {
-               return new FileInputStream(tempFile) {
-                  @Override
-                  public void close() throws IOException
-                  {
-                     super.close();
-                     tempFile.delete();
-                  }
-               };
-            }
-            catch (FileNotFoundException ex) { }
-         }
-         
-         return null;
-      }
-   }
-   
-   private HttpServletRequest request;
-
-   public MultipartRequestImpl(HttpServletRequest request, boolean createTempFiles,
-            int maxRequestSize)
-   {
-      super(request);
-      this.request = request;
-      this.createTempFiles = createTempFiles;
-      
-      String contentLength = request.getHeader("Content-Length");
-      if (contentLength != null && maxRequestSize > 0 && 
-               Integer.parseInt(contentLength) > maxRequestSize)
-      {
-         throw new FileUploadException("Multipart request is larger than allowed size");
-      }
-   }
-
-   private void parseRequest()
-   {               
-      byte[] boundaryMarker = getBoundaryMarker(request.getContentType());
-      if (boundaryMarker == null)
-      {
-         throw new FileUploadException("The request was rejected because "
-                  + "no multipart boundary was found");
-      }
-      
-      encoding = request.getCharacterEncoding();    
-      
-      parameters = new HashMap<String,Param>();      
-      
-      try
-      {
-         byte[] buffer = new byte[BUFFER_SIZE];         
-         Map<String,String> headers = new HashMap<String,String>();
-         
-         ReadState readState = ReadState.BOUNDARY;
-         
-         InputStream input = request.getInputStream();
-         int read = input.read(buffer);
-         int pos = 0;
-         
-         Param p = null;
-         
-         // This is a fail-safe to prevent infinite loops from occurring in some environments
-         int loopCounter = 20;
-         
-         while (read > 0 && loopCounter > 0)
-         {
-            for (int i = 0; i < read; i++)
-            {
-               switch (readState)
-               {
-                  case BOUNDARY:
-                  {
-                     if (checkSequence(buffer, i, boundaryMarker) && checkSequence(buffer, i + 2, CR_LF))
-                     {
-                        readState = ReadState.HEADERS;
-                        i += 2;
-                        pos = i + 1;
-                     }
-                     break;
-                  }
-                  case HEADERS:
-                  {
-                     if (checkSequence(buffer, i, CR_LF))
-                     {
-                        String param = (encoding == null) ? 
-                                 new String(buffer, pos, i - pos - 1) :
-                                 new String(buffer, pos, i - pos - 1, encoding);                        
-                        parseParams(param, ";", headers);
-                           
-                        if (checkSequence(buffer, i + CR_LF.length, CR_LF))
-                        {
-                           readState = ReadState.DATA;
-                           i += CR_LF.length;
-                           pos = i + 1;
-                           
-                           String paramName = headers.get(PARAM_NAME);
-                           if (paramName != null)
-                           {
-                              if (headers.containsKey(PARAM_FILENAME))
-                              {
-                                 FileParam fp = new FileParam(paramName);
-                                 if (createTempFiles) fp.createTempFile();                                 
-                                 fp.setContentType(headers.get(PARAM_CONTENT_TYPE));
-                                 fp.setFilename(headers.get(PARAM_FILENAME));
-                                 p = fp;                                 
-                              }
-                              else
-                              {
-                                 if (parameters.containsKey(paramName))
-                                 {
-                                    p = parameters.get(paramName);
-                                 }
-                                 else
-                                 {
-                                    p = new ValueParam(paramName);
-                                 }
-                              }
-                              
-                              if (!parameters.containsKey(paramName))
-                              {
-                                 parameters.put(paramName, p);                              
-                              }
-                           }
-                           
-                           headers.clear();
-                        }
-                        else
-                        {
-                           pos = i + 1;
-                        }
-                     }
-                     break;                     
-                  }
-                  case DATA:
-                  {
-                     // If we've encountered another boundary...
-                     if (checkSequence(buffer, i - boundaryMarker.length - CR_LF.length, CR_LF) &&
-                         checkSequence(buffer, i, boundaryMarker))
-                     {
-                        // Write any data before the boundary (that hasn't already been written) to the param
-                        if (pos < i - boundaryMarker.length - CR_LF.length - 1)
-                        {
-                          p.appendData(buffer, pos, i - pos - boundaryMarker.length - CR_LF.length - 1);
-                        }
-                        
-                        if (p instanceof ValueParam) ((ValueParam) p).complete();
-                        
-                        if (checkSequence(buffer, i + CR_LF.length, CR_LF))
-                        {
-                           i += CR_LF.length;
-                           pos = i + 1;
-                        }
-                        else
-                        {
-                           pos = i;
-                        }
-                        
-                        readState = ReadState.HEADERS;
-                     }
-                     // Otherwise write whatever data we have to the param
-                     else if (i > (pos + boundaryMarker.length + CHUNK_SIZE + CR_LF.length))
-                     {
-                        p.appendData(buffer, pos, CHUNK_SIZE);
-                        pos += CHUNK_SIZE;
-                     }
-                     break;                     
-                  }               
-               }
-            }               
-            
-            if (pos < read)
-            {
-               // move the bytes that weren't read to the start of the buffer
-               int bytesNotRead = read - pos;
-               System.arraycopy(buffer, pos, buffer, 0, bytesNotRead);               
-               read = input.read(buffer, bytesNotRead, buffer.length - bytesNotRead);
-               
-               // Decrement loopCounter if no data was readable
-               if (read == 0)
-               {
-                  loopCounter--;
-               }
-               
-               read += bytesNotRead;
-            }
-            else
-            {
-               read = input.read(buffer);
-            }
-            
-            pos = 0;                                    
-         }
-      }
-      catch (IOException ex)
-      {
-         throw new FileUploadException("IO Error parsing multipart request", ex);
-      }
-   }
-   
-   private byte[] getBoundaryMarker(String contentType)
-   {
-      Map<String, Object> params = parseParams(contentType, ";");
-      String boundaryStr = (String) params.get("boundary");
-
-      if (boundaryStr == null) return null;
-
-      try
-      {
-         return boundaryStr.getBytes("ISO-8859-1");
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         return boundaryStr.getBytes();
-      }
-   }   
-   
-   /**
-    * Checks if a specified sequence of bytes ends at a specific position
-    * within a byte array.
-    * 
-    * @param data
-    * @param pos
-    * @param seq
-    * @return boolean indicating if the sequence was found at the specified position
-    */
-   private boolean checkSequence(byte[] data, int pos, byte[] seq)
-   {
-      if (pos - seq.length < -1 || pos >= data.length)
-         return false;
-      
-      for (int i = 0; i < seq.length; i++)
-      {
-         if (data[(pos - seq.length) + i + 1] != seq[i])
-            return false;
-      }
-      
-      return true;
-   }
-
-   private static final Pattern PARAM_VALUE_PATTERN = Pattern
-            .compile("^\\s*([^\\s=]+)\\s*[=:]\\s*(.+)\\s*$");
-
-   private Map parseParams(String paramStr, String separator)
-   {
-      Map<String,String> paramMap = new HashMap<String, String>();
-      parseParams(paramStr, separator, paramMap);
-      return paramMap;
-   }
-   
-   private void parseParams(String paramStr, String separator, Map paramMap)
-   {
-      String[] parts = paramStr.split("[" + separator + "]");
-
-      for (String part : parts)
-      {
-         Matcher m = PARAM_VALUE_PATTERN.matcher(part);
-         if (m.matches())
-         {
-            String key = m.group(1);
-            String value = m.group(2);
-            
-            // Strip double quotes
-            if (value.startsWith("\"") && value.endsWith("\""))
-               value = value.substring(1, value.length() - 1);
-            
-            paramMap.put(key, value);
-         }
-      }    
-   }
-
-   private Param getParam(String name)
-   {
-      if (parameters == null) 
-         parseRequest();
-      return parameters.get(name);
-   }
-
-   @Override
-   public Enumeration getParameterNames()
-   {
-      if (parameters == null) 
-         parseRequest();
-
-      return Collections.enumeration(parameters.keySet());
-   }
-   
-   public byte[] getFileBytes(String name)
-   {
-      Param p = getParam(name);
-      return (p != null && p instanceof FileParam) ? 
-               ((FileParam) p).getData() : null;
-   }
-   
-   public InputStream getFileInputStream(String name)
-   {
-      Param p = getParam(name);
-      return (p != null && p instanceof FileParam) ? 
-               ((FileParam) p).getInputStream() : null;      
-   }
-   
-   public String getFileContentType(String name)
-   {
-      Param p = getParam(name);
-      return (p != null && p instanceof FileParam) ? 
-               ((FileParam) p).getContentType() : null;
-   }
-   
-   public String getFileName(String name)
-   {
-      Param p = getParam(name);    
-      return (p != null && p instanceof FileParam) ? 
-               ((FileParam) p).getFilename() : null;
-   }   
-   
-   public int getFileSize(String name)
-   {
-      Param p = getParam(name);    
-      return (p != null && p instanceof FileParam) ? 
-               ((FileParam) p).getFileSize() : -1;      
-   }
-   
-   @Override
-   public String getParameter(String name)
-   {
-      Param p = getParam(name);
-      if (p != null && p instanceof ValueParam)
-      {
-         ValueParam vp = (ValueParam) p;
-         if (vp.getValue() instanceof String) return (String) vp.getValue();
-      }
-      else if (p != null && p instanceof FileParam)
-      {
-         return "---BINARY DATA---";
-      }      
-      else
-      {
-         return super.getParameter(name);
-      }
-      
-      return null;
-   }
-
-   @Override
-   public String[] getParameterValues(String name)
-   {
-      Param p = getParam(name);
-      if (p != null && p instanceof ValueParam)
-      {
-         ValueParam vp = (ValueParam) p;
-         if (vp.getValue() instanceof List)
-         {
-            List vals = (List) vp.getValue();
-            String[] values = new String[vals.size()];
-            vals.toArray(values);
-            return values;
-         }
-         else
-         {
-            return new String[] {(String) vp.getValue()};
-         }
-      }
-      else
-      {
-         return super.getParameterValues(name);
-      }
-   }
-
-   @Override
-   public Map getParameterMap()
-   {
-      if (parameters == null)
-         parseRequest();
-
-      Map<String,Object> params = new HashMap<String,Object>(super.getParameterMap());
-      
-      for (String name : parameters.keySet())
-      {
-         Param p = parameters.get(name);
-         if (p instanceof ValueParam)
-         {
-            ValueParam vp = (ValueParam) p;
-            if (vp.getValue() instanceof String)
-            {
-               params.put(name, vp.getValue());               
-            }
-            else if (vp.getValue() instanceof List)
-            {
-               params.put(name, getParameterValues(name));
-            }               
-         }
-      }
-      
-      return params;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/OutgoingPattern.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/OutgoingPattern.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/OutgoingPattern.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,134 +0,0 @@
-package org.jboss.seam.web;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class OutgoingPattern {
-    String view;
-    String pattern;
-    ServletMapping viewMapping;
-
-    List<String> parts = new ArrayList<String>();
-
-    public OutgoingPattern(ServletMapping viewMapping, String view, String pattern) {
-        this.view = view;
-        this.pattern = pattern;
-        this.viewMapping = viewMapping;
-
-        parsePattern(pattern);
-    }
-
-    public Rewrite rewrite(String path) {
-        return new OutgoingRewrite(path);
-    }
-
-    private void parsePattern(String value) {       
-        while (value.length()>0) {
-            int pos = value.indexOf('{');
-            if (pos == -1) {
-                parts.add(value);
-                value = "";
-            } else {
-                int pos2 = value.indexOf('}');
-                if (pos2 == -1) {
-                    throw new IllegalArgumentException("invalid pattern");
-                }
-                parts.add(value.substring(0,pos));
-                parts.add(value.substring(pos,pos2+1));
-                value = value.substring(pos2+1);
-            }
-        }
-    }
-
-    public class OutgoingRewrite 
-        implements Rewrite
-    {
-        Boolean isMatch;
-
-        private String base;
-        private List<String> queryArgs     = new ArrayList<String>();
-        private List<String> matchedArgs   = new ArrayList<String>();
-
-        public OutgoingRewrite(String outgoing) {           
-            int queryPos = outgoing.indexOf('?');
-
-            if (queryPos == -1) {
-                this.base = outgoing;
-            } else {
-                this.base = outgoing.substring(0, queryPos);
-                parseArgs(outgoing.substring(queryPos+1));
-            }
-        }
-
-        private void parseArgs(String text) {
-            for (String part: text.split("\\&")) {
-                queryArgs.add(part);
-            }
-        }
-
-        public boolean isMatch() {
-            if (isMatch == null) {
-                isMatch = match();
-            }
-            return isMatch;
-        }
-
-        private boolean match() {
-            if (!viewMapping.isMapped(base,view)) {
-                return false;
-            }
-
-            for (String part: parts) {
-                if (part.startsWith("{") && part.endsWith("}")) {
-                    String name = part.substring(1,part.length()-1);
-                    String value = matchArg(name);
-
-                    if (value == null) {
-                        return false;
-                    }
-
-                    matchedArgs.add(value);
-                }
-            }
-
-            return true;
-        }
-
-        
-
-
-        private String matchArg(String argName) {
-            for (int i=0; i<queryArgs.size(); i++) {
-                String query = queryArgs.get(i);
-                int pos = query.indexOf("=");
-
-                if (query.subSequence(0, pos).equals(argName)) {
-                    queryArgs.remove(i);
-                    return query.substring(pos+1);
-                }
-            }
-            return null;
-        }
-
-        public String rewrite() {
-            StringBuffer res = new StringBuffer();
-
-            int matchedPosition = 0;
-            for (String part: parts) {
-                if (part.startsWith("{")) { 
-                    res.append(matchedArgs.get(matchedPosition++));
-                } else {
-                    res.append(part);
-                }
-            }
-
-            char sep = '?';
-            for (String arg: queryArgs) {
-                res.append(sep).append(arg);
-                sep = '&';
-            }
-
-            return res.toString();
-        }
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Parameters.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Parameters.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Parameters.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,84 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.lang.reflect.Array;
-import java.util.Collections;
-import java.util.Map;
-
-import javax.servlet.ServletRequest;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Access to request parameters.
- * 
- * @author Gavin King
- *
- */
- at Name("org.jboss.seam.web.parameters")
- at BypassInterceptors
- at Scope(ScopeType.STATELESS)
- at Install(precedence=BUILT_IN)
-public class Parameters
-{
-
-   protected Object convertRequestParameter(String requestParameter, Class type)
-   {
-      if ( String.class.equals(type) ) return requestParameter;
-      throw new IllegalArgumentException("No converters available");
-   }
-
-   public Map<String, String[]> getRequestParameters()
-   {
-      ServletContexts servletContexts = ServletContexts.getInstance();
-      if ( servletContexts!=null )
-      {
-         ServletRequest servletRequest = servletContexts.getRequest();
-         if ( servletRequest!=null )
-         {
-            return servletRequest.getParameterMap();
-         }
-      }
-      return Collections.EMPTY_MAP;
-   }
-
-   public Object convertMultiValueRequestParameter(Map<String, String[]> requestParameters, String name, Class<?> type)
-   {
-      String[] array = requestParameters.get(name);
-      if (array==null || array.length==0)
-      {
-         return null;
-      }
-      else
-      {
-         if ( type.isArray() )
-         {
-               int length = Array.getLength(array);
-               Class<?> elementType = type.getComponentType();
-               Object newInstance = Array.newInstance(elementType, length);
-               for ( int i=0; i<length; i++ )
-               {
-                  Object element = convertRequestParameter( (String) Array.get(array, i), elementType );
-                  Array.set( newInstance, i, element );
-               }
-               return newInstance;
-         }
-         else
-         {
-            return convertRequestParameter( array[0], type );
-         }
-      }
-   }
-
-   public static Parameters instance()
-   {
-      return (Parameters) Component.getInstance(Parameters.class, ScopeType.STATELESS);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Pattern.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Pattern.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Pattern.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,52 +0,0 @@
-package org.jboss.seam.web;
-
-public class Pattern 
-{
-    String view;
-    String pattern;
-    ServletMapping viewMapping;
-    
-    IncomingPattern inPattern;
-    OutgoingPattern outPattern;
-
-    public Pattern(String view, String pattern) {
-        this.view = view;
-        this.pattern = pattern;
-    }    
-    
-    // not necessarily available when pattern is created 
-    public void setViewMapping(ServletMapping viewMapping) {
-       this.viewMapping = viewMapping;
-    }
-    
-    protected IncomingPattern inPattern() {
-       if (inPattern == null) {
-          inPattern = new IncomingPattern(viewMapping, view, pattern);
-       }
-       return inPattern;
-    }
-    
-    protected OutgoingPattern outPattern() {
-       if (outPattern == null) {
-          outPattern = new OutgoingPattern(viewMapping, view, pattern);
-       }
-       return outPattern;
-    }
-
-    public Rewrite matchIncoming(String path) {
-        return returnIfMatch(inPattern().rewrite(path));
-    }
-
-    public Rewrite matchOutgoing(String path) {
-        return returnIfMatch(outPattern().rewrite(path));
-    }
-    
-    @Override
-    public String toString() {
-        return "Pattern(" + view + ":" + pattern + ")";
-    }
-
-    private Rewrite returnIfMatch(Rewrite rewrite) {
-        return rewrite.isMatch() ? rewrite : null;
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RedirectFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RedirectFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RedirectFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,127 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-import static org.jboss.seam.core.Manager.REDIRECT_FROM_MANAGER;
-
-import java.io.IOException;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.navigation.Pages;
-
-/**
- * Propagates the conversation context and page parameters across any 
- * browser redirect initiated from a JSF navigation rule defined in 
- * faces-config.xml. Note that this is no longer needed if all
- * navigation rules are defined in pages.xml.
- * 
- * @author Gavin King
- */
- at Scope(APPLICATION)
- at Name("org.jboss.seam.web.redirectFilter")
- at Install(precedence = BUILT_IN, classDependencies="javax.faces.context.FacesContext")
- at BypassInterceptors
- at Filter(within="org.jboss.seam.web.ajax4jsfFilter")
-public class RedirectFilter extends AbstractFilter 
-{
-   public void doFilter(ServletRequest request, ServletResponse response,
-         FilterChain chain) throws IOException, ServletException 
-   {
-      chain.doFilter( request, wrapResponse( (HttpServletResponse) response ) );
-   }
-   
-   private static ServletResponse wrapResponse(HttpServletResponse response) 
-   {
-      return new HttpServletResponseWrapper(response)
-      {
-         @Override
-         public void sendRedirect(String url) throws IOException
-         {
-            if ( FacesContext.getCurrentInstance() != null 
-                  && Contexts.isEventContextActive() 
-                  && !Contexts.getEventContext().isSet(REDIRECT_FROM_MANAGER) )
-            {
-               if ( !url.startsWith("http:") && !url.startsWith("https:") ) //yew!
-               {
-                  String viewId = getViewId(url);
-                  if (viewId!=null)
-                  {
-                     url = Pages.instance().encodePageParameters( FacesContext.getCurrentInstance(), url, viewId );
-                  }
-                  if ( Contexts.isConversationContextActive() )
-                  {
-                     url = FacesManager.instance().appendConversationIdFromRedirectFilter(url, viewId);
-                  }
-               }
-            }
-            super.sendRedirect(url);
-         }
-      };
-   }
-   
-   public static String getViewId(String url)
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      if (facesContext==null)
-      {
-         return null;
-      }
-      else
-      {
-         ExternalContext externalContext = facesContext.getExternalContext();
-         String pathInfo = externalContext.getRequestPathInfo();
-         String servletPath = externalContext.getRequestServletPath();
-         String contextPath = externalContext.getRequestContextPath();
-         return getViewId(url, pathInfo, servletPath, contextPath);
-      }
-   }
-   
-   protected static String getViewId(String url, String pathInfo, String servletPath, String contextPath)
-   {
-      if (pathInfo!=null)
-      {
-         //for /seam/* style servlet mappings
-         return url.substring( contextPath.length() + servletPath.length(), getParamLoc(url) );
-      }
-      else if ( url.startsWith(contextPath) )
-      {
-         //for *.seam style servlet mappings
-         String extension = servletPath.substring( servletPath.lastIndexOf('.') );
-         if ( url.endsWith(extension) || url.contains(extension + '?') )
-         {
-            String suffix = Pages.getSuffix();
-            return url.substring( contextPath.length(), getParamLoc(url) - extension.length() ) + suffix;
-         }
-         else
-         {
-            return null;
-         }
-      }
-      else
-      {
-         return null;
-      }
-   }
-   
-   private static int getParamLoc(String url)
-   {
-      int loc = url.indexOf('?');
-      if (loc<0) loc = url.length();
-      return loc;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Rewrite.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Rewrite.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Rewrite.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-package org.jboss.seam.web;
-
-public interface Rewrite {
-    public boolean isMatch();
-    public String rewrite();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RewriteFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RewriteFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RewriteFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,161 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.servlet.FilterChain;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.annotations.web.Filter;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Page;
-import org.jboss.seam.navigation.Pages;
-
- at Scope(APPLICATION)
- at Name("org.jboss.seam.web.rewriteFilter")
- at Install(precedence=Install.BUILT_IN,value=false)
- at BypassInterceptors
- at Filter(within={"org.jboss.seam.web.multipartFilter","org.jboss.seam.web.authenticationFilter","org.jboss.seam.web.loggingFilter","org.jboss.seam.web.exceptionFilter","org.jboss.seam.web.identityFilter"})
-public class RewriteFilter 
-    extends AbstractFilter
-{
-    private static LogProvider log = Logging.getLogProvider(RewriteFilter.class);
-
-    private String viewMapping;
-    
-    
-    public void doFilter(ServletRequest request, 
-                         ServletResponse response, 
-                         FilterChain chain) 
-        throws IOException, 
-               ServletException 
-    {
-        List<Pattern> allPatterns = getAllPatterns();
-        
-        boolean done = false;
-        
-        if (request instanceof HttpServletRequest && response instanceof HttpServletResponse) {
-            response = new RewritingResponse((HttpServletRequest) request,
-                    (HttpServletResponse)response,
-                    allPatterns);
-            
-            done = process((HttpServletRequest) request, 
-                           (HttpServletResponse) response,
-                            allPatterns);
-        }
-                
-       if (!done) {
-            chain.doFilter(request, response);
-       }
-    }
-    
-    
-    @SuppressWarnings("unchecked")
-    public boolean process(HttpServletRequest request, 
-                        HttpServletResponse response, List<Pattern> patterns)
-        throws IOException, 
-               ServletException 
-    {
-        String fullPath = request.getRequestURI();
-        //log.debug("incoming URL is " + fullPath);
-        //log.debug("known patterns are " + patterns);
-
-        String localPath = strip(fullPath, request.getContextPath());
-       
-        Rewrite rewrite = matchPatterns(localPath, patterns);
-        if (rewrite!=null) {
-            String newPath = rewrite.rewrite();
-            
-            //log.debug("rewritten incoming path is " + newPath);
-            
-            if (!fullPath.equals(request.getContextPath() + newPath)) {
-                RequestDispatcher dispatcher = request.getRequestDispatcher(newPath);
-                
-//                final String wrappedPath = newPath;
-//                HttpServletRequest wrapped = new HttpServletRequestWrapper(request) {
-//                    @Override
-//                    public String getServletPath() {
-//                        return wrappedPath;
-//
-//                    }
-//                };
-//                dispatcher.forward(wrapped, response);
-                dispatcher.forward(request, response);
-                return true;
-            }
-        }
-        
-        return false;
-    }
-
-
-    private Rewrite matchPatterns(String localPath, List<Pattern> patterns) {
-        for (Pattern pattern: patterns) {
-            Rewrite rewrite = pattern.matchIncoming(localPath);
-            if (rewrite!=null && rewrite.isMatch()) {
-                return rewrite;
-            }
-        }
-        return null;
-    }
-
-    private String strip(String fullPath, String contextPath) {
-        if (fullPath.startsWith(contextPath)) {
-            return fullPath.substring(contextPath.length());
-        } else {
-            return fullPath;
-        }
-    }
-    
-    
-    private List<Pattern> getAllPatterns() {
-        List<Pattern> allPatterns = new ArrayList<Pattern>();
-        
-        Pages pages = (Pages) getServletContext().getAttribute(Seam.getComponentName(Pages.class));
-        if (pages != null) {
-            Collection<String> ids = pages.getKnownViewIds();
-
-            for (String id: ids) {
-                 Page page = pages.getPage(id);
-                 allPatterns.addAll(page.getRewritePatterns());
-            }
-        } else {
-            log.warn("Pages is null for incoming request!");
-        }
-        
-        ServletMapping mapping = new ServletMapping(getViewMapping());
-        for (Pattern pattern: allPatterns) {
-            pattern.setViewMapping(mapping);
-        }
-        
-        return allPatterns;
-    }
-
-
-   public String getViewMapping()
-   {
-      return viewMapping == null ? "*.seam" : viewMapping;
-   }
-
-
-   public void setViewMapping(String viewMapping)
-   {
-      this.viewMapping = viewMapping;
-   }
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RewritingResponse.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RewritingResponse.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/RewritingResponse.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,111 +0,0 @@
-package org.jboss.seam.web;
-
-import java.util.Collection;
-
-import java.net.*;
-
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-public class RewritingResponse 
-    extends HttpServletResponseWrapper
-{
-    private static LogProvider log = Logging.getLogProvider(RewritingResponse.class);
-
-    private HttpServletRequest request;
-    private Collection<Pattern> patterns;
-
-    public RewritingResponse(HttpServletRequest request, 
-            HttpServletResponse response, 
-            Collection<Pattern> patterns) 
-    {
-        super(response);
-
-        this.request  = request;
-        this.patterns = patterns;   
-    }   
-
-    @Override
-    public String encodeRedirectUrl(String url) {
-        return encodeRedirectURL(url);
-    }
-
-    @Override
-    public String encodeUrl(String url) {
-        return encodeURL(url);
-    }
-
-    
-    @Override
-    public String encodeRedirectURL(String url) {
-        String result = rewriteURL(url);
-        log.debug("encodeRedirectURL " + url + " -> " + result);
-        return wrappedEncodeRedirectURL(result);
-    }
-
-    private String wrappedEncodeRedirectURL(String result) {
-        ServletResponse response = getResponse();
-        if (response instanceof HttpServletResponse) {
-            return ((HttpServletResponse)response).encodeRedirectURL(result);            
-        }
-        return result;
-    }
-
-    @Override
-    public String encodeURL(String url) {        
-        String result = super.encodeUrl(rewriteURL(url));
-        log.debug("encodeURL " + url + " -> " + result);
-        return wrappedEncodeURL(result);
-    }
-    
-    private String wrappedEncodeURL(String result) {
-        ServletResponse response = getResponse();
-        if (response instanceof HttpServletResponse) {
-            return ((HttpServletResponse)response).encodeRedirectURL(result);            
-        }
-        return result;
-    }
-
-    public boolean isLocalURL(URL url) {
-        return url.getHost().equals(request.getServerName());
-    }
-    
-    public String rewritePath(String originalPath) {
-        String contextPath = request.getContextPath();
-
-        String path = originalPath.startsWith(contextPath) ? 
-                      originalPath.substring(contextPath.length()) : originalPath;
-                      
-        for (Pattern pattern: patterns) {
-            Rewrite rewrite = pattern.matchOutgoing(path);
-            if (rewrite != null) {
-                return request.getContextPath() + rewrite.rewrite();
-            }
-        }
-
-        return originalPath;
-    }
-
-    public String rewriteURL(String originalUrl) {        
-        if (originalUrl.startsWith("http://") || originalUrl.startsWith("https://")) {
-            try {
-                URL url = new URL(originalUrl);
-
-                if (isLocalURL(url)) {
-                    URL newUrl = new URL(url, rewritePath(url.getFile()));
-                    return newUrl.toExternalForm(); 
-                }
-            } catch (MalformedURLException e) {
-                // ignore - we simply don't care.  we could log this at info/debug level.
-            }
-        }
-
-        return rewritePath(originalUrl);
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/SeamFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/SeamFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/SeamFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,10 +0,0 @@
-package org.jboss.seam.web;
-
-/**
- * 
- * @deprecated use org.jboss.seam.servlet.SeamFilter
- * 
- * @author Shane Bryzak
- *
- */
-public class SeamFilter extends org.jboss.seam.servlet.SeamFilter {}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ServletContexts.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ServletContexts.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ServletContexts.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.web;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * A Seam component that binds the HttpServletRequest object
- * to the current thread.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.EVENT)
- at Name("org.jboss.seam.web.servletContexts")
- at BypassInterceptors
- at Install(precedence=BUILT_IN)
-public class ServletContexts 
-{
-   
-   private HttpServletRequest request;
-   
-   public static ServletContexts instance()
-   {
-      if ( !Contexts.isEventContextActive() ) 
-      {
-         throw new IllegalStateException("no event context active");
-      }
-      return (ServletContexts) Component.getInstance(ServletContexts.class, ScopeType.EVENT);
-   }
-   
-   public static ServletContexts getInstance()
-   {
-      return Contexts.isEventContextActive() ? 
-               (ServletContexts) Component.getInstance(ServletContexts.class, ScopeType.EVENT) : null;
-   }
-
-   public HttpServletRequest getRequest()
-   {
-      return request;
-   }
-
-   public void setRequest(HttpServletRequest request)
-   {
-      this.request = request;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ServletMapping.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ServletMapping.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/ServletMapping.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,51 +0,0 @@
-package org.jboss.seam.web;
-
-
-/**
- * functions related to the faces servlet mapping and the translation from viewId to URL and back
- */
-public class ServletMapping {
-    String mapping;
-    
-    public ServletMapping(String mapping) {
-        this.mapping = mapping;
-    }
-    
-
-    public String mapViewIdToURL(String viewId) {
-        if (mapping.endsWith("/*")) {
-            return mapping.substring(0,mapping.length()-2) + viewId;
-        
-        } else if (mapping.startsWith("*.")){
-            int pos = viewId.lastIndexOf(".");
-            if (pos != -1) {
-                return viewId.substring(0, pos) + mapping.substring(1);
-            }
-        }
-        
-        return null;
-    }
-    
-    private String stripExtension(String text) {
-        int pos = text.lastIndexOf('.');
-        return (pos == -1) ? null : text.substring(0,pos);
-    }
-    
-    // this method should really be one that converts the baseURL to the viewId,
-    // but we need default faces extension for that
-    public boolean isMapped(String baseURL, String viewId)
-    {
-        if (mapping.startsWith("*.")) {
-            String baseValue = stripExtension(baseURL);
-            String viewValue = stripExtension(viewId);
-           
-            return baseValue!=null && viewValue!=null && baseValue.equals(viewValue);
-        } else if (mapping.endsWith("/*")) {
-            String prefix = mapping.substring(0,mapping.length()-2) + viewId;
-            return baseURL.equals(prefix);
-        }
-        
-        return false;        
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Session.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Session.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/Session.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,125 +0,0 @@
-package org.jboss.seam.web;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.AbstractMutable;
-
-/**
- * Controls HttpSession invalidation in any
- * servlet or JSF environment. Since Seam
- * keeps internal state in the HttpSession,
- * it is illegal to call HttpSession.invalidate()
- * while Seam contexts are active.
- * 
- * Applications using Seam security should call
- * Identity.logout() instead of calling this
- * component directly.
- * 
- * @author Gavin King
- *
- */
- at Scope(ScopeType.SESSION)
- at Name("org.jboss.seam.web.session")
- at BypassInterceptors
- at Startup
-public class Session extends AbstractMutable
-{
-   private boolean isInvalid;
-   private boolean invalidateOnSchemeChange;
-   private String currentScheme;
-
-   /**
-    * Is HttpSession invalidation scheduled
-    * for the end of this request?
-    */
-   public boolean isInvalid()
-   {
-      return isInvalid;
-   }
-
-   /**
-    * Schedule HttpSession invalidation at the
-    * end of the request.
-    *
-    */
-   public void invalidate()
-   {
-      this.isInvalid = true;
-      setDirty();
-   }
-   
-   /**
-    * Should we invalidate the session due to a change in
-    * the request scheme?
-    * 
-    * @param requestScheme the scheme of the current request
-    * @return true if we should invalidate the session
-    */
-   public boolean isInvalidDueToNewScheme(String requestScheme)
-   {
-      if (invalidateOnSchemeChange)
-      {
-         if ( currentScheme==null )
-         {
-            currentScheme = requestScheme;
-            setDirty();
-            return false;
-         }
-         else if ( !currentScheme.equals(requestScheme) )
-         {
-            currentScheme = requestScheme;
-            setDirty();
-            return true;
-         }
-         else
-         {
-            return false;
-         }
-      }
-      else
-      {
-         return false;
-      }
-   }
-
-   /**
-    * Is session invalidation on scheme change enabled?
-    */
-   public boolean isInvalidateOnSchemeChange()
-   {
-      return invalidateOnSchemeChange;
-   }
-
-   /**
-    * Enable or disable session invalidation on scheme change?
-    */
-   public void setInvalidateOnSchemeChange(boolean invalidateOnSchemeChange)
-   {
-      setDirty();
-      this.invalidateOnSchemeChange = invalidateOnSchemeChange;
-   }
-   
-   public static Session instance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-      return (Session) Component.getInstance(Session.class, ScopeType.SESSION);
-   }
-
-   public static Session getInstance()
-   {
-      if ( !Contexts.isSessionContextActive() )
-      {
-         throw new IllegalStateException("No active session context");
-      }
-      return (Session) Component.getInstance(Session.class, ScopeType.SESSION, false);
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/UserPrincipal.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/UserPrincipal.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/UserPrincipal.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,52 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.security.Principal;
-
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * Manager component for the current user Principal
- * exposed via the JSF ExternalContext.
- * 
- * @author Gavin King
- */
- at Scope(ScopeType.APPLICATION)
- at BypassInterceptors
- at Name("org.jboss.seam.web.userPrincipal")
- at Install(precedence=BUILT_IN)
-public class UserPrincipal
-{
-   @Unwrap
-   public Principal getUserPrincipal()
-   {
-      ServletRequest servletRequest = ServletContexts.instance().getRequest();
-      if ( servletRequest != null )
-      {
-         return ( (HttpServletRequest) servletRequest ).getUserPrincipal();
-      }
-      
-      return null;
-   }
-   
-   public static Principal instance()
-   {
-      if ( !Contexts.isApplicationContextActive() )
-      {
-         throw new IllegalStateException("No active application scope");
-      }
-      return (Principal) Component.getInstance(UserPrincipal.class, ScopeType.APPLICATION);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/WicketFilter.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/WicketFilter.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/WicketFilter.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,179 +0,0 @@
-package org.jboss.seam.web;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.deployment.HotDeploymentStrategy;
-
- at Scope(APPLICATION)
- at Name("org.jboss.seam.web.wicketFilter")
- at Install(precedence = BUILT_IN, dependencies="org.jboss.seam.wicket.web.wicketFilterInstantiator")
- at BypassInterceptors
- at org.jboss.seam.annotations.web.Filter(within="org.jboss.seam.web.hotDeployFilter")
-public class WicketFilter extends AbstractFilter
-{
-   
-   private Filter delegate = null;
-
-   private String applicationClass;
-   
-   private String applicationFactoryClass;
-   
-   private boolean detectPortletContext;
-   
-   private long lastInitTime = 0;
-   
-   private FilterConfig savedConfig;
-   
-   private ClassLoader hotDeployClassLoader;
-   
-   /*
-    * Upon initialization and re-initialization, lookup the hot deployment strategy and grab its classloader, if it exists.
-    */
-   @Observer(value= { "org.jboss.seam.postInitialization","org.jboss.seam.postReInitialization"} )
-   public void postReInitialization() 
-   { 
-      HotDeploymentStrategy strategy = (HotDeploymentStrategy)Contexts.getEventContext().get(HotDeploymentStrategy.NAME);
-      if (strategy != null)
-      {
-         hotDeployClassLoader = strategy.getClassLoader();
-      }
-      else
-      {
-         hotDeployClassLoader = null;
-      }
-   }
-   
-   public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain chain) throws IOException, ServletException
-   {
-      /* If there is no delegate, we are a no-op filter */
-      if (delegate==null)
-      {
-         chain.doFilter(servletRequest, servletResponse);
-      }
-      else
-      {
-           Init init = (Init) getServletContext().getAttribute( Seam.getComponentName(Init.class) );
-               /*
-                * We initialize the delegate on the first actual request and any time the
-                * init timestamp changes, so that the WicketFilter gets reinitialized whenever the
-                * hot deployment classloader detects changes, enabling wicket components to be hot deployed.
-                */
-           if (init != null && lastInitTime != init.getTimestamp())
-               {
-                  delegate.destroy();
-      
-                  Map<String, String> parameters = new HashMap<String, String>();
-                  if ( getApplicationClass() != null )
-                  {
-                     parameters.put( "applicationClassName", getApplicationClass() );
-                  }
-                  if ( getUrlPattern() != null )
-                  {
-                     parameters.put("filterMappingUrlPattern", getUrlPattern());
-                  }
-                 else
-                 {
-                    parameters.put("filterMappingUrlPattern", "/*");
-                 }
-                  
-                  /* Let the seam debug flag control the wicket configuration flag (deployment vs. development) */
-                  parameters.put("configuration",init.isDebug() ? "development" : "deployment");
-                  
-                 if (getApplicationFactoryClass() != null)
-                 {
-                    parameters.put("applicationFactoryClassName", getApplicationFactoryClass());
-                 }
-                 if (isDetectPortletContext())
-                 {
-                    parameters.put("detectPortletContext", "true");
-                 }
-			         
-			         //We have no way of passing the hot deploy classLoader to the delegate filter created by
-			         //WicketFilterInstantiator, because it is unwrapped as a plain filter, which only takes string
-			         //pairs as configuration.  In addition, it is a STATELESS component, so it can't listen for the
-			         //reinitialization events and store the classloader itself.  So we set it as the thread's contextClassLoader,
-			         //and reset that afterwards
-			         
-			         ClassLoader previousClassLoader = Thread.currentThread().getContextClassLoader();
-			         if (hotDeployClassLoader != null)
-			            Thread.currentThread().setContextClassLoader(hotDeployClassLoader);
-			         try { 
-			            delegate.init(new FilterConfigWrapper(savedConfig, parameters));
-			         }
-			         finally { 
-			            if (hotDeployClassLoader != null)
-			               Thread.currentThread().setContextClassLoader(previousClassLoader);
-			         }
-              lastInitTime = init.getTimestamp();
-               }
-               delegate.doFilter(servletRequest, servletResponse, chain);
-            }
-      }
-   
-   @Override
-   public void init(FilterConfig filterConfig) throws ServletException
-   {  
-      super.init(filterConfig);
-      /* Save the configuration so that we can use it to re-initialize the wicket filter at request time, as 
-       * we may need to do it again if changes are hot deployed.  Also, look up the delegate now, as the presence
-       * of the delegate component implies the presence of the wicket classes themselves.
-       */
-      if (delegate == null) {
-         delegate = (javax.servlet.Filter) Component.getInstance("org.jboss.seam.wicket.web.wicketFilterInstantiator", ScopeType.STATELESS);
-         savedConfig = filterConfig;
-      }
-   }
-   
-   public String getApplicationClass()
-   {
-      return applicationClass;
-   }
-   
-   public void setApplicationClass(String applicationClassName)
-   {
-      this.applicationClass = applicationClassName;
-   }
-   
-   public String getApplicationFactoryClass()
-   {
-      return applicationFactoryClass;
-   }
-   
-   public void setApplicationFactoryClass(String applicationFactoryClass)
-   {
-      this.applicationFactoryClass = applicationFactoryClass;
-   }
-   
-   public boolean isDetectPortletContext()
-   {
-      return detectPortletContext;
-   }
-   
-   public void setDetectPortletContext(boolean detectPortletContext)
-   {
-      this.detectPortletContext = detectPortletContext;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/web/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,9 +0,0 @@
-/**
- * Seam components for use in a servlet environment.
- */
- at Namespace(value="http://jboss.com/products/seam/web", prefix="org.jboss.seam.web")
- at AutoCreate
-package org.jboss.seam.web;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Namespace;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/SOAPRequestHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/SOAPRequestHandler.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/SOAPRequestHandler.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,201 +0,0 @@
-package org.jboss.seam.webservice;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPHandler;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.core.ConversationPropagation;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.servlet.ServletRequestSessionMap;
-import org.jboss.seam.web.ServletContexts;
-
-/**
- * A SOAP request handler for controlling Seam's lifecycle and managing
- * conversation propagation.
- * 
- * @author Shane Bryzak
- */
-public class SOAPRequestHandler implements SOAPHandler
-{
-   /**
-    * The QName of the conversation ID element in the SOAP request header
-    */
-   public static final QName CIDQN = new QName("http://www.jboss.org/seam/webservice", "conversationId", "seam");
-   
-   private static final LogProvider log = Logging.getLogProvider(SOAPRequestHandler.class);   
-   
-   private Set<QName> headers = new HashSet<QName>();
-   
-   private String handlerName;
-   
-   /**
-    * Handle inbound and outbound messages
-    * 
-    * @param msgContext The message context
-    * @return boolean true if processing should continue
-    */
-   public boolean handleMessage(MessageContext msgContext)
-   {
-      Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-      if (outbound == null)
-         throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-
-      return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
-   }   
-
-   /**
-    * Inbound message handler. Seam contexts should be initialized here, and
-    * the conversation ID (if present) is extracted from the request.
-    * 
-    * @param messageContext The message context
-    * @return boolean true if processing should continue
-    */
-   public boolean handleInbound(MessageContext messageContext)
-   {
-      try
-      {
-         HttpServletRequest request = (HttpServletRequest) messageContext.get(MessageContext.SERVLET_REQUEST);      
-         ServletLifecycle.beginRequest(request, ServletLifecycle.getServletContext());
-
-         ServletContexts.instance().setRequest(request);
-                 
-         String conversationId = extractConversationId(messageContext);
-         ConversationPropagation.instance().setConversationId( conversationId );
-         Manager.instance().restoreConversation();
-         
-         ServletLifecycle.resumeConversation(request);             
-   
-         return true;
-      }
-      catch (SOAPException ex)
-      {
-         log.error("Error handling inbound SOAP request", ex);
-         return false;
-      }
-   }
-
-   /**
-    * Sets the conversation ID in the outbound SOAP message.
-    * 
-    * @param messageContext The message context
-    * @return boolean true if processing should continue
-    */
-   public boolean handleOutbound(MessageContext messageContext)
-   {
-      try
-      {                
-         HttpServletRequest request = (HttpServletRequest) messageContext.get(MessageContext.SERVLET_REQUEST);
-         
-         String conversationId = Manager.instance().getCurrentConversationId();
-         if (conversationId != null)
-         {
-            SOAPMessageContext smc = (SOAPMessageContext) messageContext;
-            
-            SOAPHeader header = smc.getMessage().getSOAPHeader();
-            if (header != null)
-            {
-               SOAPElement element = header.addChildElement(CIDQN);
-               element.addTextNode(conversationId);
-               smc.getMessage().saveChanges();               
-            }            
-            else
-            {
-               SOAPEnvelope envelope = smc.getMessage().getSOAPPart().getEnvelope();
-               header =  envelope.addHeader();
-               SOAPElement element = header.addChildElement(CIDQN);
-               element.addTextNode(conversationId);
-               smc.getMessage().saveChanges();
-            }
-         }
-         
-         Manager.instance().endRequest( new ServletRequestSessionMap(request) );
-         
-         return true;
-      }
-      catch (SOAPException ex)
-      {
-         log.error("Exception processing outbound message", ex);
-         return false;
-      }
-   }
-   
-   /**
-    * Extracts the conversation ID from an incoming SOAP message
-    * 
-    * @param messageContext
-    * @return The conversation ID, or null if there is no conversation ID set
-    * @throws SOAPException
-    */
-   private String extractConversationId(MessageContext messageContext)
-      throws SOAPException
-   {
-      SOAPMessageContext smc = (SOAPMessageContext) messageContext;
-      SOAPHeader header = smc.getMessage().getSOAPHeader();
-      
-      if (header != null)
-      {
-         Iterator iter = header.getChildElements(CIDQN);
-         if (iter.hasNext())
-         {
-            SOAPElement element = (SOAPElement) iter.next();
-            return element.getFirstChild().getNodeValue();
-         }
-      }
-      
-      return null;
-   }
-   
-   /**
-    * Called just prior to dispatching a message, fault or exception. The 
-    * Seam request lifecycle is ended here
-    */
-   public void close(MessageContext messageContext)
-   {     
-      Lifecycle.endRequest();
-   }
-   
-   public Set<QName> getHeaders()
-   {
-      return headers;
-   }
-
-   public void setHeaders(Set<QName> headers)
-   {
-      this.headers = headers;
-   }   
-   
-   public String getHandlerName()
-   {
-      return handlerName;
-   }
-
-   public void setHandlerName(String handlerName)
-   {
-      this.handlerName = handlerName;
-   }
-
-   public boolean handleFault(MessageContext messagecontext)
-   {
-      return true;
-   }
-   
-   @Override
-   public String toString()
-   {
-      return (handlerName != null ? handlerName : super.toString());
-   }      
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/WSSecurityInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/WSSecurityInterceptor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/WSSecurityInterceptor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,23 +0,0 @@
-package org.jboss.seam.webservice;
-
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.async.AsynchronousInterceptor;
-import org.jboss.seam.security.SecurityInterceptor;
-
-/**
- * Provides authorization services for web service invocations.
- * 
- * @author Shane Bryzak
- */
- at Interceptor(stateless = true, type=InterceptorType.SERVER, 
-         around=AsynchronousInterceptor.class)
-public class WSSecurityInterceptor extends SecurityInterceptor
-{
-   @Override
-   public boolean isInterceptorEnabled()
-   {
-      return getComponent().isSecure() && getComponent().beanClassHasAnnotation("javax.jws.WebService");
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/package-info.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/package-info.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/webservice/package-info.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,6 +0,0 @@
-/**
- * Web Services integration. 'Cos everybody here loves Web Services so much.
- */
-package org.jboss.seam.webservice;
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/javadoc/jdstyle.css
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/javadoc/jdstyle.css	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/javadoc/jdstyle.css	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,117 +0,0 @@
-/* Javadoc style sheet */
-
-/* Define colors, fonts and other style attributes here to override the defaults  */
-
-/* Page background color */
-body { 	font-family: Arial;
-	background-color: white;
-	font-size: 10pt;
- }
-td { 	font-family: Arial;
-	font-size: 10pt;
- }
-/* Table colors */
-.TableHeadingColor     { background: #F4F4F4 }
-.TableSubHeadingColor  { background: #F4F4F4 }
-.TableRowColor         { background: #FFFFFF }
-
-/* Font used in left-hand frame lists */
-.FrameTitleFont   { font-size: normal; font-family: Arial }
-.FrameHeadingFont { font-size: normal; font-family: Arial }
-.FrameItemFont    { font-size: normal; font-family: Arial }
-
-/* Example of smaller, sans-serif font in frames */
-/* .FrameItemFont  { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
-
-/* Navigation bar fonts and colors */
-.NavBarCell1    { background-color:#F4F4F4;}
-.NavBarCell1Rev { background-color:silver;}
-
-.NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#000000;}
-.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
-
-.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-
-A {
-    color: #003399;
-}
-
-A:active {
-    color: #003399;
-}
-
-A:visited {
-    color: #888888;
-}
-
-P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE {
-    color: #000000;
-}
-
-TD, TH, SPAN {
-    color: #000000;
-}
-
-BLOCKQUOTE {
-    margin-right: 0px;
-}
-
-
-/*H1, H2, H3, H4, H5, H6    {
-    color: #000000;
-    font-weight:500;
-    margin-top:10px;
-    padding-top:15px;
-}
-
-H1 { font-size: 150%; }
-H2 { font-size: 140%; }
-H3 { font-size: 110%; font-weight: bold; }
-H4 { font-size: 110%; font-weight: bold;}
-H5 { font-size: 100%; font-style: italic; }
-H6 { font-size: 100%; font-style: italic; }*/
-
-TT {
-font-size: 90%;
-    font-family: "Courier New", Courier, monospace;
-    color: #000000;
-}
-
-PRE {
-font-size: 90%;
-    padding: 5px;
-    border-style: solid;
-    border-width: 1px;
-    border-color: #CCCCCC;
-    background-color: #F4F4F4;
-}
-
-UL, OL, LI {
-    list-style: disc;
-}
-
-HR  {
-    width: 100%;
-    height: 1px;
-    background-color: #CCCCCC;
-    border-width: 0px;
-    padding: 0px;
-    color: #CCCCCC;
-}
-
-.variablelist { 
-    padding-top: 10; 
-    padding-bottom:10; 
-    margin:0;
-}
-
-.itemizedlist, UL { 
-    padding-top: 0; 
-    padding-bottom:0; 
-    margin:0; 
-}
-
-.term { 
-    font-weight:bold;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/components.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/components.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://jboss.com/products/seam/components"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
-
-  <import>org.jboss.seam.core</import>
-  <import>org.jboss.seam.cache</import>
-  <import>org.jboss.seam.transaction</import>
-  <import>org.jboss.seam.framework</import>
-  <import>org.jboss.seam.web</import>
-  <import>org.jboss.seam.faces</import>
-  <import>org.jboss.seam.international</import>
-  <import>org.jboss.seam.theme</import>
-  <import>org.jboss.seam.pageflow</import>
-  <import>org.jboss.seam.bpm</import>
-  <import>org.jboss.seam.jms</import>
-  <import>org.jboss.seam.mail</import>
-  <import>org.jboss.seam.security</import>
-  <import>org.jboss.seam.security.management</import>  
-  <import>org.jboss.seam.security.permission</import>
-  <import>org.jboss.seam.security.openid</import>
-  <import>org.jboss.seam.captcha</import>
-  <import>org.jboss.seam.excel.exporter</import>
-
-  <factory name="org.jboss.seam.web.webSession" auto-create="true" scope="stateless" value="#{org.jboss.seam.web.session}" />
-  
-  <factory name="facesMessages" auto-create="true" scope="stateless" value="#{org.jboss.seam.international.statusMessages}" />
-  
-  <factory name="org.jboss.seam.faces.facesMessages" auto-create="true" scope="stateless" value="#{org.jboss.seam.international.statusMessages}" />
-
-</components>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/faces-config.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/faces-config.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<faces-config version="2.0" 
-              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/web-facesconfig_2_0.xsd">
-
-   <factory>
-      <application-factory>org.jboss.seam.jsf.SeamApplicationFactory</application-factory>
-   </factory>
-
-   <application>
-      <navigation-handler>org.jboss.seam.jsf.SeamNavigationHandler</navigation-handler>
-      <view-handler>org.jboss.seam.jsf.SeamViewHandler</view-handler>
-      <state-manager>org.jboss.seam.jsf.SeamStateManager</state-manager>
-      <el-resolver>org.jboss.seam.el.SeamELResolver</el-resolver>
-      <message-bundle>org.jboss.seam.core.SeamResourceBundle</message-bundle>
-   </application>
-  
-   <lifecycle>
-      <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
-   </lifecycle>
-
-   <lifecycle>
-       <phase-listener>org.jboss.seam.document.DocumentStorePhaseListener</phase-listener>
-   </lifecycle>    
-</faces-config>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/javamail.providers
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/javamail.providers	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/javamail.providers	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,3 +0,0 @@
-# See http://java.sun.com/products/javamail/javadocs/javax/mail/Session.html
-
-protocol=mock; type=transport; class=org.jboss.seam.mock.MockTransport; vendor=JBoss Seam Integration Tests;

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/seam-deployment.properties
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/seam-deployment.properties	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/META-INF/seam-deployment.properties	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,2 +0,0 @@
-org.jboss.seam.deployment.deploymentHandlers=org.jboss.seam.bpm.PageflowDeploymentHandler
-org.jboss.seam.init.duplicateJarsPatterns=^tmp\\d+(\\S*.jar)

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/async-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/async-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/async-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/async" xmlns:async="http://jboss.com/products/seam/async"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="timer-service-dispatcher">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="components:attlist.ejbcomponent"/>
-            <xs:attributeGroup ref="async:attlist.timerServiceDispatcher"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.timerServiceDispatcher" />
-
-    <xs:element name="quartz-dispatcher">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="async:attlist.quartzDispatcher"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.quartzDispatcher"> </xs:attributeGroup>
-
-    <xs:element name="thread-pool-dispatcher">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="async:attlist.threadPoolDispatcher"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.threadPoolDispatcher">
-        <xs:attribute name="thread-pool-size" type="components:int"/>
-    </xs:attributeGroup>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/blacklist.properties
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/blacklist.properties	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/blacklist.properties	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-.getClass(
-.class.
-.addRole(
-.getPassword(
-.removeRole(
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/bpm/jbpm.pageflow.cfg.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/bpm/jbpm.pageflow.cfg.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/bpm/jbpm.pageflow.cfg.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,3 +0,0 @@
-<pageflow-configuration>
-  <jbpm-context />
-</pageflow-configuration>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/bpm-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/bpm-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/bpm-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/bpm" xmlns:bpm="http://jboss.com/products/seam/bpm"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="actor">
-        <xs:annotation>
-            <xs:documentation>The jbpm actor id</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element minOccurs="0" maxOccurs="1" ref="bpm:id"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="bpm:group-actor-ids"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="bpm:attlist.actor"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="id" type="xs:string"/>
-    <xs:element name="group-actor-ids" type="components:multiValuedProperty"/>
-    <xs:attributeGroup name="attlist.actor">
-        <xs:attribute name="group-actor-ids" type="components:string" />
-    </xs:attributeGroup>
-
-    <xs:element name="jbpm">
-        <xs:annotation>
-            <xs:documentation>Configuration for jbpm</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="process-definitions" type="components:multiValuedProperty">
-                    <xs:annotation>
-                        <xs:documentation>A list of jbpm process files</xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="pageflow-definitions" type="components:multiValuedProperty"/>                
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component" />
-            <xs:attributeGroup ref="bpm:attlist.jbpm" />
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.jbpm" /> 
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/cache-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/cache-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/cache-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-   elementFormDefault="qualified"
-   targetNamespace="http://jboss.com/products/seam/cache"
-   xmlns:cache="http://jboss.com/products/seam/cache"
-   xmlns:components="http://jboss.com/products/seam/components"
-   attributeFormDefault="unqualified">
-   <xs:import namespace="http://jboss.com/products/seam/components"
-      schemaLocation="components-2.3.xsd" />
-   
-   <xs:element name="eh-cache-provider">
-      <xs:annotation>
-         <xs:documentation>The EHCache provider</xs:documentation>
-      </xs:annotation>
-      <xs:complexType mixed="true">
-         <xs:attributeGroup ref="components:attlist.component" />
-         <xs:attributeGroup ref="cache:attlist.cacheProvider" />
-      </xs:complexType>
-   </xs:element>
-   
-   <xs:element name="jboss-cache-provider">
-      <xs:annotation>
-         <xs:documentation>The JBoss 1.x Cache provider</xs:documentation>
-      </xs:annotation>
-      <xs:complexType mixed="true">
-         <xs:attributeGroup ref="components:attlist.component" />
-         <xs:attributeGroup ref="cache:attlist.cacheProvider" />
-      </xs:complexType>
-   </xs:element>
-   
-   <xs:element name="jboss-cache2-provider">
-      <xs:annotation>
-         <xs:documentation>The JBoss 2.x cache provider</xs:documentation>
-      </xs:annotation>
-      <xs:complexType mixed="true">
-         <xs:attributeGroup ref="components:attlist.component" />
-         <xs:attributeGroup ref="cache:attlist.cacheProvider" />
-      </xs:complexType>
-   </xs:element>
-
-   <xs:element name="jboss-pojo-cache-provider">
-      <xs:annotation>
-         <xs:documentation>The JBoss 1.x POJOCache provider</xs:documentation>
-      </xs:annotation>
-      <xs:complexType mixed="true">
-         <xs:attributeGroup ref="components:attlist.component" />
-         <xs:attributeGroup ref="cache:attlist.cacheProvider" />
-      </xs:complexType>
-   </xs:element>
-
-   <xs:attributeGroup name="attlist.cacheProvider">
-      <xs:attribute name="default-region" type="components:string" />
-      <xs:attribute name="configuration" type="components:string" />
-   </xs:attributeGroup>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/components-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/components-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/components-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,371 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
-           elementFormDefault="qualified"
-           targetNamespace="http://jboss.com/products/seam/components"
-           xmlns:components="http://jboss.com/products/seam/components">
-    <xs:annotation>
-        <xs:documentation> 
-            The top-level schema for a Seam components.xml. For more information on Seam, see
-            http://www.seamframework.org. 
-        </xs:documentation>
-    </xs:annotation>
-
-    <xs:element name="components">
-        <xs:annotation>
-            <xs:documentation> The components tag is a the root element for a components.xml containing multiples
-                component definitions. </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="components:component"/>
-                <xs:element ref="components:factory"/>
-                <xs:element ref="components:event"/>
-                <xs:element ref="components:import"/>
-                <xs:any namespace="##other" processContents="strict"/>
-            </xs:choice>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="component">
-        <xs:annotation>
-            <xs:documentation> The component tag defines a single Seam component. It may serve as to the root element of
-                a fine-grained *.component.xml file. </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="components:property"/>
-            </xs:sequence>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="components:attlist.ejbcomponent"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="import" type="xs:string">
-        <xs:annotation>
-            <xs:documentation>
-                The import tag declares additional global component namespaces that will be in effect for
-                all components. 
-            </xs:documentation>
-        </xs:annotation>
-    </xs:element>
-
-    <xs:attributeGroup name="attlist.ejbcomponent">
-        <xs:attribute name="jndi-name" type="components:string">
-            <xs:annotation>
-                <xs:documentation> 
-                    The JNDI name used to lookup the component. This value is only used with EJB
-                    components that don't follow the global JNDI pattern. 
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-
-    <xs:attributeGroup name="attlist.component">
-        <xs:attribute name="name" type="components:componentName">
-            <xs:annotation>
-                <xs:documentation>The name of component</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        
-        <xs:attribute name="class" type="components:componentName">
-            <xs:annotation>
-                <xs:documentation>The Java class of the component implementation</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-
-        <xs:attribute name="scope">
-            <xs:annotation>
-                <xs:documentation>The scope of the component</xs:documentation>
-            </xs:annotation>
-            
-            <xs:simpleType>
-                <xs:union memberTypes="components:scopeType components:expressionType"></xs:union>       
-            </xs:simpleType>
-        </xs:attribute>
-
-        <xs:attribute name="precedence" default="20">
-            <xs:annotation>
-                <xs:documentation>
-                    The precedence of the component, expressed as a positive integer.  Higher
-                    precedence components override lower precedence components.  The pre-definied precedence
-                    values are: 
-                    
-                    BUILT_IN = 0, 
-                    FRAMEWORK = 10,
-                    APPLICATION = 20,
-                    DEPLOYMENT = 30,
-                    MOCK = 40
-                </xs:documentation>
-            </xs:annotation>
-            <xs:simpleType>
-                <xs:union memberTypes="xs:nonNegativeInteger components:precedenceType components:expressionType"></xs:union>
-            </xs:simpleType>
-        </xs:attribute>
-        
-        <xs:attribute name="installed" default="true" type="components:boolean">
-            <xs:annotation>
-                <xs:documentation>
-                    The installed value indicates whether or not the component definition should be installed.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        
-        <xs:attribute name="auto-create" default="false" type="components:boolean">
-            <xs:annotation>
-                <xs:documentation>
-                    Indicates whether or not a components instance should be created when
-                    one doesn't exist and when the component is requested using a method that 
-                    would not normally instantiate a new instance.  (such as basic injection)
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        
-        <xs:attribute name="startup" default="false" type="components:boolean">
-            <xs:annotation>
-                <xs:documentation>
-                    Indicates that an instance of the component should be created when the 
-                    the component's controlling scope starts.  This is only used for application and
-                    session scope.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        
-        <xs:attribute name="startupDepends" type="components:string">
-            <xs:annotation>
-                <xs:documentation>
-                    A list of component names that this component depends on and that should be created before
-                    this component is started.
-                </xs:documentation>
-            </xs:annotation></xs:attribute>
-    </xs:attributeGroup>
-    
-    <xs:element name="factory">
-        <xs:annotation>
-            <xs:documentation>
-                Factories are like a component instances except their values are 
-                determined by computing a value or calling a method on another 
-                component.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="components:attlist.factory"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.factory">
-        <xs:attribute name="name" use="required">
-            <xs:annotation>
-                <xs:documentation>The name of the factory component</xs:documentation>
-            </xs:annotation></xs:attribute>
-       
-        <xs:attribute name="method">
-            <xs:annotation>
-                <xs:documentation>
-                     The method binding used to evauluate the factory value.  A factory should have either
-                     a method binding or a value binding, but not both.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        
-        <xs:attribute name="value">
-            <xs:annotation>
-                <xs:documentation>
-                     The value binding used to evauluate the factory value.  A factory should have either
-                     a method binding or a value binding, but not both.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        
-        <xs:attribute name="scope">
-            <xs:annotation>
-                <xs:documentation>The scope of the factory value</xs:documentation>
-            </xs:annotation>
-            
-            <xs:simpleType>
-                <xs:union memberTypes="components:scopeType components:expressionType"></xs:union>       
-            </xs:simpleType>
-        </xs:attribute>
-        
-        <xs:attribute name="auto-create" default="false" type="components:boolean">
-            <xs:annotation>
-                <xs:documentation>
-                    Indicates whether or not the factory value should be created when
-                    one doesn't exist and when the component is requested using a method that 
-                    would not normally instantiate a new instance.  (such as basic injection)
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-    
-    
-    <xs:element name="property">
-        <xs:annotation>
-            <xs:documentation>
-                A generic property.  The body contains the value or values.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="components:key" />
-                <xs:element ref="components:value" />
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.property"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.property">
-        <xs:attribute name="name" use="required" type="components:string">
-            <xs:annotation>
-                <xs:documentation>The property name</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-	<xs:attribute name="type" type="components:string" >
-            <xs:annotation>
-                <xs:documentation>Concrete type to use if the property is multi-valued</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-    
-
-    <xs:element name="key" type="components:string">
-        <xs:annotation>
-            <xs:documentation>For map values, the key for the following value</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    
-    <xs:element name="value" type="components:string">
-        <xs:annotation>
-            <xs:documentation>
-                For list values, the value to be added.
-                For map values, the value for the preceding key
-            </xs:documentation>
-        </xs:annotation>
-    </xs:element>
-
-    <xs:complexType name="multiValuedProperty">
-        <xs:sequence minOccurs="0" maxOccurs="unbounded">
-            <xs:element ref="components:value"/>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="mapProperty">
-        <xs:sequence minOccurs="0" maxOccurs="unbounded">
-            <xs:element ref="components:key"/>
-            <xs:element ref="components:value"/>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:element name="event">
-        <xs:annotation>
-            <xs:documentation>An event handler definition</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="components:action"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.event"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.event">
-        <xs:attribute name="type" use="required" type="components:componentNameType" >
-            <xs:annotation>
-                <xs:documentation>The event type to handle</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-
-    <xs:element name="action">
-        <xs:annotation>
-            <xs:documentation>The action to be taken when the event occurs</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="components:attlist.action"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.action">
-        <xs:attribute name="execute" use="required" type="components:elType">
-            <xs:annotation>
-                <xs:documentation>An EL expression to be invoked when the event is invoked</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-
-    <xs:simpleType name="propertyType">
-        <xs:restriction base="xs:string">
-            <xs:pattern value="@.+@"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="elType">
-        <xs:restriction base="xs:string">
-            <xs:pattern value="\#\{.+\}"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <!-- place holder - need something more expressive -->
-    <xs:simpleType name="componentNameType">
-        <xs:restriction base="xs:string">
-            <xs:minLength value="1" />   
-        </xs:restriction>
-    </xs:simpleType>
-    
-    <xs:simpleType name="expressionType">
-        <xs:union memberTypes="components:elType components:propertyType"/>
-    </xs:simpleType>
-    
-    <xs:simpleType name="boolean">
-        <xs:union memberTypes="xs:boolean components:expressionType"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="string">
-        <xs:union memberTypes="xs:string components:expressionType"/>
-    </xs:simpleType>
-    
-    <xs:simpleType name="int">
-        <xs:union memberTypes="xs:int components:expressionType"/>
-    </xs:simpleType>
-   
-    <xs:simpleType name="componentName">
-        <xs:union memberTypes="components:componentNameType components:expressionType" />
-    </xs:simpleType>
-    
-    <xs:simpleType name="scopeType">
-        <xs:restriction base="xs:token">
-            <xs:enumeration value="stateless"/>
-            <xs:enumeration value="event"/>
-            <xs:enumeration value="page"/>
-            <xs:enumeration value="conversation"/>
-            <xs:enumeration value="session"/>
-            <xs:enumeration value="business_process"/>
-            <xs:enumeration value="application"/>
-            <xs:enumeration value="STATELESS"/>
-            <xs:enumeration value="EVENT"/>
-            <xs:enumeration value="PAGE"/>
-            <xs:enumeration value="CONVERSATION"/>
-            <xs:enumeration value="SESSION"/>
-            <xs:enumeration value="BUSINESS_PROCESS"/>
-            <xs:enumeration value="APPLICATION"/>
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="implementationType">
-        <xs:restriction base="xs:token">
-            <xs:enumeration value="hash"/>
-            <xs:enumeration value="linked"/>
-            <xs:enumeration value="tree"/>
-            <xs:enumeration value="HASH"/>
-            <xs:enumeration value="LINKED"/>
-            <xs:enumeration value="TREE"/>
-        </xs:restriction>
-    </xs:simpleType>
-    <xs:simpleType name="precedenceType">
-        <xs:restriction base="xs:int">
-            <xs:enumeration value="0"/>
-            <xs:enumeration value="10"/>
-            <xs:enumeration value="20"/>
-            <xs:enumeration value="30"/>
-            <xs:enumeration value="40"/>
-        </xs:restriction>
-    </xs:simpleType>
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/core-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/core-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/core-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/core" xmlns:core="http://jboss.com/products/seam/core"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:annotation>
-        <xs:documentation>The core Seam components</xs:documentation>
-    </xs:annotation>
-    
-    <xs:element name="init">
-        <xs:annotation>
-            <xs:documentation>A Seam component that holds Seam configuration settings</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="interceptors" type="components:multiValuedProperty">
-                    <xs:annotation>
-                        <xs:documentation>A list of interceptors that should be enabled for all components. You must specify all built-in interceptors as well as any additional interceptors. Execution order is determined by the around and within attributes on the @Interceptor annotation.
-                        
-These interceptors are enabled by default:
-   org.jboss.seam.core.SynchronizationInterceptor
-   org.jboss.seam.async.AsynchronousInterceptor
-   org.jboss.seam.ejb.RemoveInterceptor
-   org.jboss.seam.persistence.HibernateSessionProxyInterceptor
-   org.jboss.seam.persistence.EntityManagerProxyInterceptor
-   org.jboss.seam.core.MethodContextInterceptor
-   org.jboss.seam.core.EventInterceptor
-   org.jboss.seam.core.ConversationalInterceptor
-   org.jboss.seam.bpm.BusinessProcessInterceptor
-   org.jboss.seam.core.ConversationInterceptor
-   org.jboss.seam.core.BijectionInterceptor
-   org.jboss.seam.transaction.RollbackInterceptor
-   org.jboss.seam.transaction.TransactionInterceptor
-   org.jboss.seam.webservice.WSSecurityInterceptor
-   org.jboss.seam.security.SecurityInterceptor
-   
-The distributable flag appends the ManagedEntityInterceptor to this list (applies only to conversation-scoped components).</xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="core:attlist.init"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.init">
-        <xs:attribute name="debug" type="components:boolean" />
-        <xs:attribute name="distributable" type="components:boolean" />
-        <xs:attribute name="jndi-pattern" type="components:string" />
-        <xs:attribute name="security-enabled" type="components:boolean" />
-        <xs:attribute name="transaction-management-enabled" type="components:boolean"/>
-    </xs:attributeGroup>
-
-    <xs:element name="manager">
-        <xs:annotation>
-            <xs:documentation>The Seam conversation manager</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="core:attlist.manager"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.manager">
-        <xs:attribute name="concurrent-request-timeout" type="components:int"/>
-        <xs:attribute name="conversation-timeout" type="components:int"/>
-        <xs:attribute name="conversation-id-parameter" type="components:string"/>
-        <xs:attribute name="parent-conversation-id-parameter" type="components:string"/>
-        <xs:attribute name="uri-encoding" type="components:string" />
-        <xs:attribute name="default-flush-mode">
-            <xs:simpleType>
-                <xs:restriction base="xs:token">
-                    <xs:enumeration value="MANUAL"/>
-                    <xs:enumeration value="AUTO"/>
-                    <xs:enumeration value="COMMIT"/>
-                </xs:restriction>
-            </xs:simpleType>
-        </xs:attribute>
-    </xs:attributeGroup>
-    
-    <xs:element name="resource-loader">
-        <xs:annotation>
-            <xs:documentation>Access to application resources and resource bundles</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="bundle-names" type="components:multiValuedProperty">
-                    <xs:annotation>
-                        <xs:documentation>A list of resource bundle names</xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="core:attlist.resourceLoader"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.resourceLoader">
-        <xs:attribute name="bundle-names" type="components:string" /> 
-    </xs:attributeGroup>
-
-    <xs:element name="pojo-cache">
-        <xs:annotation>
-            <xs:documentation>Integration with JBoss Cache</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="core:attlist.pojoCache"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.pojoCache">
-        <xs:attribute name="cfg-resource-name" type="components:string" />
-    </xs:attributeGroup>
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/document-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/document-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/document-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
-           xmlns:doc="http://jboss.com/products/seam/document"
-           xmlns:components="http://jboss.com/products/seam/components" 
-           targetNamespace="http://jboss.com/products/seam/document" 
-           elementFormDefault="qualified"
-           attributeFormDefault="unqualified"> 
-
-    <xs:import namespace="http://jboss.com/products/seam/components" 
-               schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="document-store">
-        <xs:annotation>
-            <xs:documentation>
-                 The document store is used to store rendered documents for download on a later request.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="doc:attlist.docstore"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:attributeGroup name="attlist.docstore">
-        <xs:attribute name="error-page" type="components:string">
-            <xs:annotation>
-                <xs:documentation>
-                     When a document had expired or otherwise cannot be loaded, this page is displayed.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        <xs:attribute name="use-extensions" type="components:boolean">
-            <xs:annotation>
-                <xs:documentation>
-                    Controls whether or not the URLs for documents should contain their correct file name
-                    extensions. Using file name extensions requires additional configuration in web.xml.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/drools-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/drools-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/drools-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/drools" xmlns:drools="http://jboss.com/products/seam/drools"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="rule-base">
-        <xs:annotation>
-            <xs:documentation>A drools rule base</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element minOccurs="0" maxOccurs="1" ref="drools:rule-files"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="drools:attlist.RuleBase"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="rule-files" type="components:multiValuedProperty"/>
-    <xs:attributeGroup name="attlist.RuleBase">
-        <xs:attribute name="dsl-file" type="components:string"/>
-        <xs:attribute name="rule-files" type="components:string"/> 
-        <xs:attribute name="consequence-exception-handler" type="components:expressionType"/>       
-    </xs:attributeGroup>
-
-    <xs:element name="rule-agent">
-        <xs:annotation>
-            <xs:documentation>A drools BRMS configuration</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">    		
-    		<xs:attributeGroup ref="components:attlist.component" />
-    		<xs:attributeGroup ref="drools:attlist.RuleAgent" />
-    	</xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.RuleAgent">
-        <xs:attribute name="configuration-file" type="components:string" />
-        <xs:attribute name="config-name" type="components:string" />
-        <xs:attribute name="new-instance" type="components:string" />
-        <xs:attribute name="files" type="components:string" />
-        <xs:attribute name="url" type="components:string" />
-        <xs:attribute name="local-cache-dir" type="components:string" />
-        <xs:attribute name="poll" type="components:string" />        
-    </xs:attributeGroup>
-
-    <xs:element name="managed-working-memory">
-        <xs:annotation>
-            <xs:documentation>A working memory for rules calculations</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-        	<xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element minOccurs="0" maxOccurs="1" ref="drools:event-listeners"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="drools:attlist.ManagedWorkingMemory"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.ManagedWorkingMemory">
-        <xs:attribute name="rule-base" type="components:expressionType"/>
-    </xs:attributeGroup>
-    <xs:element name="event-listeners" type="components:multiValuedProperty"/>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/framework-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/framework-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/framework-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/framework"
-    xmlns:framework="http://jboss.com/products/seam/framework"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="entity-query">
-        <xs:annotation>
-            <xs:documentation>A query controller for JPA queries</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:ejbql"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:order"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:restrictions"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:group-by"/>
-                <xs:element minOccurs="0" maxOccurs="1" name="hints" type="components:mapProperty" />
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="framework:attlist.Query"/>
-            <xs:attributeGroup ref="framework:attlist.entityQuery"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.entityQuery">
-        <xs:attribute name="entity-manager" type="xs:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="hibernate-entity-query">
-        <xs:annotation>
-            <xs:documentation>A query controller for Hibernate queries</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:ejbql"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:order"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:restrictions"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:group-by"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="framework:attlist.Query"/>
-            <xs:attributeGroup ref="framework:attlist.HibernateEntityQuery"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.HibernateEntityQuery">
-        <xs:attribute name="cacheable" type="components:boolean" />
-        <xs:attribute name="cache-region" type="components:string"/>
-        <xs:attribute name="fetch-size" type="components:int"/>
-        <xs:attribute name="session" type="components:string"/>
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.Query">
-        <xs:attribute name="ejbql" type="components:string">
-            <xs:annotation>
-                <xs:documentation>The base query</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        <xs:attribute name="max-results" type="components:int">
-            <xs:annotation>
-                <xs:documentation>The query page size</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        <xs:attribute name="order" type="components:string">
-            <xs:annotation>
-                <xs:documentation>The property to order results by</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        <xs:attribute name="group-by" type="components:string">
-            <xs:annotation>
-                <xs:documentation>The group-by clause</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-    
-    <xs:element name="ejbql" type="components:string">
-        <xs:annotation>
-            <xs:documentation>The base query</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    <xs:element name="order" type="components:string">
-        <xs:annotation>
-            <xs:documentation>The property to order results by</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    <xs:element name="group-by" type="components:string">
-        <xs:annotation>
-            <xs:documentation>The group-by clause</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    
-    <xs:element name="restrictions" type="components:multiValuedProperty">
-        <xs:annotation>
-            <xs:documentation>Query restrictions (the WHERE clause)</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    
-    
-
-    <xs:element name="entity-home">
-        <xs:annotation>
-            <xs:documentation>A home controller for JPA entities</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="id" type="xs:string"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:created-message"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:updated-message"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:deleted-message"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:new-instance"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="framework:attlist.Home"/>
-            <xs:attributeGroup ref="framework:attlist.EntityHome"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.EntityHome">
-        <xs:attribute name="entity-manager" type="components:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="hibernate-entity-home">
-        <xs:annotation>
-            <xs:documentation>A home controller for Hibernate entities</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="id" type="xs:string"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:created-message"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:updated-message"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:deleted-message"/>
-                <xs:element minOccurs="0" maxOccurs="1" ref="framework:new-instance"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="framework:attlist.Home"/>
-            <xs:attributeGroup ref="framework:attlist.HibernateEntityHome"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.HibernateEntityHome">
-        <xs:attribute name="session" type="components:string"/>
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.Home">
-        <xs:attribute name="entity-class" type="components:string"/>
-        <xs:attribute name="new-instance" type="components:expressionType"/>
-        <xs:attribute name="created-message" type="components:string"/>
-        <xs:attribute name="updated-message" type="components:string"/>
-        <xs:attribute name="deleted-message" type="components:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="created-message" type="components:string">
-        <xs:annotation>
-            <xs:documentation>A faces message added when the home controller creates a new instance</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    <xs:element name="updated-message" type="components:string">
-        <xs:annotation>
-            <xs:documentation>A faces message added when the home controller updates an instance</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    <xs:element name="deleted-message" type="components:string">
-        <xs:annotation>
-            <xs:documentation>A faces message added when the home controller deletes an instance</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    <xs:element name="new-instance" type="components:expressionType">
-        <xs:annotation>
-            <xs:documentation>The new instance managed by a home controller</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/international-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/international-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/international-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/international" xmlns:international="http://jboss.com/products/seam/international"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="locale-config">
-        <xs:annotation>
-            <xs:documentation>
-                Locale configuration component. An alternative to configuring
-                the locale in the JSF configuration file.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="1">
-                <xs:element name="supported-locales" type="components:multiValuedProperty"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="international:attlist.localeConfig"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:attributeGroup name="attlist.localeConfig">
-        <xs:attribute name="default-locale" type="components:string"/>
-        <xs:attribute name="supported-locales" type="components:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="locale-selector">
-        <xs:annotation>
-            <xs:documentation>The locale selector component</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="international:attlist.localeSelector"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.localeSelector">
-        <xs:attribute name="locale-string" type="components:string" />
-        <xs:attribute name="cookie-max-age" type="components:int" />
-        <xs:attribute name="cookie-enabled" type="components:boolean" />
-    </xs:attributeGroup>
-
-    <xs:element name="time-zone-selector">
-        <xs:annotation>
-            <xs:documentation>The time zone selector component</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="international:attlist.timeZoneSelector"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.timeZoneSelector">
-        <xs:attribute name="time-zone-id" type="components:string" />
-        <xs:attribute name="cookie-max-age" type="components:int" />
-        <xs:attribute name="cookie-enabled" type="components:boolean" />
-    </xs:attributeGroup>
-
-    <xs:element name="time-zones">
-        <xs:annotation>
-            <xs:documentation>The time zones provider component</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="international:attlist.timeZones"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.timeZones">
-        <xs:attribute name="wrap" type="components:boolean" />
-    </xs:attributeGroup>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/jms-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/jms-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/jms-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/jms" xmlns:jms="http://jboss.com/products/seam/jms"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="topic-connection">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="jms:attlist.TopicConnection"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.TopicConnection">
-        <xs:attribute name="topic-connection-factory-jndi-name" type="components:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="queue-connection">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="jms:attlist.QueueConnection"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.QueueConnection">
-        <xs:attribute name="queue-connection-factory-jndi-name" type="components:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="managed-topic-publisher">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="jms:attlist.ManagedTopicPublisher"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.ManagedTopicPublisher">
-        <xs:attribute name="topic-jndi-name" type="components:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="managed-queue-sender">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="jms:attlist.ManagedQueueSender"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.ManagedQueueSender">
-        <xs:attribute name="queue-jndi-name" type="components:string"/>
-    </xs:attributeGroup>
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/mail-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/mail-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/mail-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/mail"
-    xmlns:mail="http://jboss.com/products/seam/mail"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-    
-    <xs:element name="mail-session">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="components:attlist.component" />
-            <xs:attributeGroup ref="mail:attlist.mailSession" />
-        </xs:complexType>
-    </xs:element>
-   
-    <xs:attributeGroup name="attlist.mailSession">
-        <xs:attribute name="username" type="components:string"/>
-        <xs:attribute name="password" type="components:string"/>
-        <xs:attribute name="host" type="components:string" default="localhost"/>
-        <xs:attribute name="port" type="components:string" />
-        <xs:attribute name="debug" type="components:string" default="false" />
-        <xs:attribute name="ssl" type="components:boolean" default="false" />
-        <xs:attribute name="tls" type="components:boolean" default="true" />
-        <xs:attribute name="session-jndi-name" type="components:string" />
-    </xs:attributeGroup>
-
-    
-    <xs:element name="meldware">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="users" type="components:multiValuedProperty" />        
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component" />
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="meldware-user">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="aliases" type="components:multiValuedProperty" />
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component" />
-            <xs:attributeGroup ref="mail:attlist.meldwareUser" />
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.meldwareUser">
-        <xs:attribute name="username" type="components:string" />
-    	<xs:attribute name="password" type="components:string" />
-    	<xs:attribute name="administrator" type="components:boolean" default="false"/>
-    </xs:attributeGroup>
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/navigation-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/navigation-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/navigation-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/navigation" xmlns:navigation="http://jboss.com/products/seam/navigation"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="pages">
-        <xs:annotation>
-            <xs:documentation>The pages component</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="1">
-                <xs:element name="resources" type="components:multiValuedProperty">
-                    <xs:annotation>
-                        <xs:documentation>
-                            A list of pages configuration files.  Setting this value overrides the 
-                            default /WEB-INF/pages.xml.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="navigation:attlist.pages"/>
-        </xs:complexType>
-    </xs:element>
-   
-    <xs:attributeGroup name="attlist.pages">
-        <xs:attribute name="no-conversation-view-id" type="components:string" />
-        <xs:attribute name="login-view-id" type="components:string" />
-        <xs:attribute name="http-port" type="components:int" />
-        <xs:attribute name="https-port" type="components:int" />
-    </xs:attributeGroup>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/pageflow-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/pageflow-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/pageflow-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,326 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xs:schema xmlns="http://jboss.com/products/seam/pageflow"
-	targetNamespace="http://jboss.com/products/seam/pageflow"
-	xmlns:xs="http://www.w3.org/2001/XMLSchema"
-	elementFormDefault="qualified">
-
-	<!--  PAGEFLOW-DEFINITION -->
-	<!--  ################### -->
-	<xs:element name="pageflow-definition">
-		<xs:complexType>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:group ref="start-node-elements" />
-				<xs:group ref="node-elements" />
-				<xs:group ref="end-node-elements" />
-				<xs:group ref="action-elements" />
-				<xs:element ref="event" />
-				<xs:element ref="exception-handler" />
-			</xs:choice>
-			<xs:attribute name="name" type="xs:string" use="required" />
-			<xs:attribute name="start-page" type="xs:string" />
-		</xs:complexType>
-	</xs:element>
-
-	<!--  NODES -->
-	<!--  ##### -->
-	<xs:element name="start-state">
-		<xs:complexType>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:element ref="transition" />
-				<xs:element ref="event" />
-				<xs:element ref="exception-handler" />
-			</xs:choice>
-			<xs:attribute name="name" type="xs:string" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="end-state">
-		<xs:complexType>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:element ref="event" />
-				<xs:element ref="exception-handler" />
-			</xs:choice>
-			<xs:attribute name="name" type="xs:string" use="required" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="process-state">
-		<xs:complexType>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:element ref="sub-process" />
-				<xs:element ref="transition" />
-				<xs:element ref="event" />
-				<xs:element ref="exception-handler" />
-			</xs:choice>
-			<xs:attribute name="name" type="xs:string" />
-			<xs:attribute name="binding" type="bindingType" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="sub-process">
-		<xs:complexType>
-			<xs:attribute name="name" type="xs:string" use="required" />
-			<xs:attribute name="version" type="xs:integer" />
-			<xs:attribute name="binding" type="bindingType" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="start-page">
-		<xs:complexType>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:group ref="page-elements" />
-			</xs:choice>
-			<xs:attributeGroup ref="page-attributes" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="decision">
-		<xs:complexType>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:element name="handler" type="delegation" />
-				<xs:element ref="event" />
-				<xs:element ref="exception-handler" />
-				<xs:element name="transition">
-					<xs:complexType>
-						<xs:choice minOccurs="0"
-							maxOccurs="unbounded">
-							<xs:element name="condition">
-								<xs:complexType mixed="true">
-									<xs:sequence minOccurs="0"
-										maxOccurs="unbounded">
-										<xs:any processContents="lax"
-											minOccurs="0" maxOccurs="unbounded" />
-									</xs:sequence>
-									<xs:attribute name="expression"
-										type="xs:string" />
-								</xs:complexType>
-							</xs:element>
-							<xs:group ref="action-elements" />
-							<xs:element ref="exception-handler" />
-						</xs:choice>
-						<xs:attribute name="to" type="xs:string"
-							use="required" />
-						<xs:attribute name="name" type="xs:string" />
-					</xs:complexType>
-				</xs:element>
-			</xs:choice>
-			<xs:attribute name="name" type="xs:string" use="required" />
-			<xs:attribute name="expression" type="xs:string" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="page">
-		<xs:complexType>
-			<xs:sequence>
-				<xs:choice minOccurs="0" maxOccurs="1">
-					<xs:element ref="end-conversation" />
-				</xs:choice>
-				<xs:choice minOccurs="0" maxOccurs="1">
-					<xs:element ref="end-task" />
-				</xs:choice>
-				<xs:group ref="page-elements" />
-			</xs:sequence>
-			<xs:attributeGroup ref="page-attributes" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="redirect" />
-	<xs:element name="description" type="xs:string" />
-
-	<xs:element name="end-conversation">
-		<xs:complexType>
-			<xs:attribute name="before-redirect" type="booleanType" />
-			<xs:attribute name="create-process" type="xs:string" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="end-task">
-		<xs:complexType>
-			<xs:attribute name="transition" type="xs:string" />
-		</xs:complexType>
-	</xs:element>
-
-	<!--  TRANSITION -->
-	<!--  ########## -->
-	<xs:element name="transition">
-		<xs:complexType>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:group ref="action-elements" />
-				<xs:element ref="exception-handler" />
-			</xs:choice>
-			<xs:attribute name="to" type="xs:string" use="required" />
-			<xs:attribute name="name" type="xs:string" />
-		</xs:complexType>
-	</xs:element>
-
-	<!-- ACTIONS -->
-	<!-- ####### -->
-	<xs:element name="action">
-		<xs:complexType mixed="true">
-			<xs:sequence>
-				<xs:any processContents="lax" minOccurs="0"
-					maxOccurs="unbounded" />
-			</xs:sequence>
-			<xs:attribute name="class" type="xs:string" />
-			<xs:attribute name="config-type" default="field" type="xs:string" />
-			<xs:attribute name="name" type="xs:string" />
-			<xs:attribute name="ref-name" type="xs:string" />
-			<xs:attribute name="accept-propagated-events"
-				type="booleanType" default="true" />
-			<xs:attribute name="expression" type="xs:string" />
-		</xs:complexType>
-	</xs:element>
-
-	<xs:element name="script">
-		<xs:complexType mixed="true">
-			<xs:sequence>
-				<xs:any processContents="lax" minOccurs="0"
-					maxOccurs="unbounded" />
-			</xs:sequence>
-			<xs:attribute name="name" type="xs:string" />
-			<xs:attribute name="accept-propagated-events"
-				type="booleanType" default="true" />
-		</xs:complexType>
-	</xs:element>
-
-	<!--  EVENT -->
-	<!--  ##### -->
-	<xs:element name="event">
-		<xs:complexType>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:group ref="action-elements" />
-			</xs:choice>
-			<xs:attribute name="type" use="required">
-				<xs:simpleType>
-					<xs:union>
-						<xs:simpleType>
-							<xs:restriction base="xs:string" />
-						</xs:simpleType>
-						<xs:simpleType>
-							<xs:restriction base="xs:string">
-								<xs:enumeration value="node-enter" />
-								<xs:enumeration value="node-leave" />
-								<xs:enumeration value="process-start" />
-								<xs:enumeration value="process-end" />
-								<xs:enumeration value="task-create" />
-								<xs:enumeration value="task-assign" />
-								<xs:enumeration value="task-start" />
-								<xs:enumeration value="task-end" />
-								<xs:enumeration value="before-signal" />
-								<xs:enumeration value="after-signal" />
-							</xs:restriction>
-						</xs:simpleType>
-					</xs:union>
-				</xs:simpleType>
-			</xs:attribute>
-		</xs:complexType>
-	</xs:element>
-
-	<!--  EXCEPTION-HANDLER -->
-	<!--  ################# -->
-	<xs:element name="exception-handler">
-		<xs:complexType>
-			<xs:choice minOccurs="1" maxOccurs="unbounded">
-				<xs:element ref="action" />
-				<xs:element ref="script" />
-			</xs:choice>
-			<xs:attribute name="exception-class" type="xs:string" />
-		</xs:complexType>
-	</xs:element>
-
-	<!-- TYPES AND GROUPS -->
-	<!-- ################ -->
-	<xs:complexType name="delegation" mixed="true">
-		<xs:sequence>
-			<xs:any processContents="lax" minOccurs="0"
-				maxOccurs="unbounded" />
-		</xs:sequence>
-		<xs:attribute name="class" type="xs:string" />
-		<xs:attribute name="config-type" default="field" type="xs:string" />
-	</xs:complexType>
-
-	<xs:simpleType name="configType">
-		<xs:restriction base="xs:string">
-			<xs:enumeration value="field" />
-			<xs:enumeration value="bean" />
-			<xs:enumeration value="constructor" />
-			<xs:enumeration value="configuration-property" />
-		</xs:restriction>
-	</xs:simpleType>
-
-	<xs:simpleType name="booleanType">
-		<xs:restriction base="xs:string">
-			<xs:enumeration value="yes" />
-			<xs:enumeration value="no" />
-			<xs:enumeration value="true" />
-			<xs:enumeration value="false" />
-			<xs:enumeration value="on" />
-			<xs:enumeration value="off" />
-		</xs:restriction>
-	</xs:simpleType>
-
-	<xs:simpleType name="enabledType">
-		<xs:restriction base="xs:string">
-			<xs:enumeration value="enabled" />
-			<xs:enumeration value="disabled" />
-		</xs:restriction>
-	</xs:simpleType>
-
-	<xs:group name="start-node-elements">
-		<xs:choice>
-			<xs:element ref="start-state" />
-			<xs:element ref="start-page" />
-		</xs:choice>
-	</xs:group>
-
-	<xs:group name="node-elements">
-		<xs:choice>
-			<xs:element ref="page" />
-			<xs:element ref="decision" />
-			<xs:element ref="process-state" />
-		</xs:choice>
-	</xs:group>
-	
-	<xs:group name="end-node-elements">
-		<xs:choice>
-			<xs:element ref="end-state" />
-		</xs:choice>
-	</xs:group>
-
-	<xs:group name="action-elements">
-		<xs:choice>
-			<xs:element ref="action" />
-			<xs:element ref="script"/>
-		</xs:choice>
-	</xs:group>
-
-	<xs:group name="page-elements">
-		<xs:sequence>
-            <xs:element ref="description" maxOccurs="1" minOccurs="0"/>
-            <xs:element ref="redirect" maxOccurs="1" minOccurs="0"/>
-			<xs:element ref="event" minOccurs="0" maxOccurs="unbounded"/>
-			<xs:element ref="exception-handler" minOccurs="0" maxOccurs="unbounded"/>
-			<xs:element ref="transition" maxOccurs="unbounded" minOccurs="0"/>
-			<xs:group ref="action-elements" minOccurs="0" maxOccurs="1" />
-		</xs:sequence>
-	</xs:group>
-
-	<xs:attributeGroup name="page-attributes">
-		<xs:attribute name="redirect" type="xs:boolean" />
-		<xs:attribute name="switch" type="enabledType" />
-		<xs:attribute name="no-conversation-view-id" type="xs:string" />
-		<xs:attribute name="timeout" type="xs:int" />
-		<xs:attribute name="back" type="enabledType" />
-		<xs:attribute name="view-id" type="xs:string" use="required" />
-		<xs:attribute name="name" type="xs:string" use="required" />
-	</xs:attributeGroup>
-  
-    <xs:simpleType name="bindingType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="late" />
-            <xs:enumeration value="early" />
-        </xs:restriction>
-    </xs:simpleType>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/pages-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/pages-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/pages-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,643 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
-           elementFormDefault="qualified"
-           targetNamespace="http://jboss.com/products/seam/pages" 
-           xmlns:pages="http://jboss.com/products/seam/pages">
-
-    <xs:annotation>
-        <xs:documentation>About this format ...</xs:documentation>
-    </xs:annotation>
-    
-    <xs:element name="pages">
-        <xs:annotation>
-            <xs:documentation>The root of a pages.xml file</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="pages:conversation"/>
-                <xs:element ref="pages:page"/>
-                <xs:element ref="pages:exception"/>
-            </xs:choice>
-            <xs:attributeGroup ref="pages:attlist.pages"/>
-        </xs:complexType>
-        <xs:key name="conversation-key">
-            <xs:annotation>
-                <xs:documentation><p>You can read this as:</p>
-                  <p>The pages element has a bunch of conversation elements, and for each of those conversation elements, they must have a unique name within this document.</p>
-                </xs:documentation>
-            </xs:annotation>
-            <xs:selector xpath="conversation"/>
-            <xs:field xpath="name"/>
-        </xs:key>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.pages">
-        <xs:attribute name="no-conversation-view-id" type="pages:view-id" />
-        <xs:attribute name="login-view-id" type="pages:view-id"/>
-        <xs:attribute name="http-port" type="xs:unsignedLong"/>
-        <xs:attribute name="https-port" type="xs:unsignedLong"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="exception">
-        <xs:annotation>
-            <xs:documentation>A Seam exception handler</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" ref="pages:end-conversation"/>
-                <xs:choice>
-                    <xs:element ref="pages:http-error"/>
-                    <xs:element ref="pages:redirect"/>
-                </xs:choice>
-            </xs:sequence>
-            <xs:attributeGroup ref="pages:attlist.exception"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.exception">
-        <xs:attribute name="class" type="xs:token"/>
-        <xs:attribute name="log" type="pages:tf-boolean"/>
-        <xs:attribute name="log-level" type="pages:loglevel-values"/>
-        
-        <!-- The logLevel attribute is deprecated and will be removed in the next major version! Please use log-level instead -->
-        <xs:attribute name="logLevel" type="pages:loglevel-values"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="conversation">
-        <xs:annotation>
-            <xs:documentation>Natural conversation configuration</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.conversation"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.conversation">
-        <xs:attribute name="name" use="required" type="xs:token" />
-        <xs:attribute name="parameter-name" use="required" type="xs:token" />
-        <xs:attribute name="parameter-value" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="page">
-        <xs:annotation>
-            <xs:documentation>Configuration for a specific page or set up pages</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="pages:restrict"/>
-                <xs:element ref="pages:description"/>
-                <xs:element ref="pages:param"/>
-                <xs:element ref="pages:header" />
-                <xs:element ref="pages:rewrite" />
-                <xs:element ref="pages:begin-conversation"/>
-                <xs:element ref="pages:end-conversation"/>
-                <xs:element ref="pages:start-task"/>
-                <xs:element ref="pages:begin-task"/>
-                <xs:element ref="pages:end-task"/>
-                <xs:element ref="pages:create-process"/>
-                <xs:element ref="pages:resume-process"/>
-                <xs:element ref="pages:in"/>
-                <xs:element ref="pages:raise-event"/>
-                <xs:element ref="pages:action"/>
-                <xs:element ref="pages:navigation"/>
-            </xs:choice>
-            <xs:attributeGroup ref="pages:attlist.page"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.page">
-        <xs:attribute name="action" type="xs:token" />
-        <xs:attribute name="view-id" type="pages:view-id"/>
-        <xs:attribute name="switch" default="enabled" type="pages:ableness"/>
-        <xs:attribute name="no-conversation-view-id" type="pages:view-id" />
-        <xs:attribute name="conversation-required" default="false" type="pages:tf-boolean"/>
-        <xs:attribute name="login-required" default="false" type="pages:tf-boolean"/>
-        <xs:attribute name="scheme" type="pages:schemes" />
-        <xs:attribute name="timeout" type="xs:unsignedLong" />
-        <xs:attribute name="concurrent-request-timeout" type="xs:unsignedLong" >
-            <xs:annotation>
-                <xs:documentation>
-                    Requests to conversations are serialized by default, and if
-                    a lock cannot be acquired in time, the request will be 
-                    dropped. You can set the timeout on a page-by-page basis 
-                    here.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        <xs:attribute name="bundle" type="xs:token" />
-        <xs:attribute name="conversation" type="xs:token" />
-        <xs:attribute name="expires" type="xs:unsignedLong" /> 
-        <xs:attribute name="validate-model" default="true" type="pages:tf-boolean"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="param">
-        <xs:annotation>
-            <xs:documentation>A page parameter</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.param"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:attributeGroup name="attlist.param">
-        <xs:attribute name="name" type="xs:token" />
-        <xs:attribute name="value" type="xs:token" />
-        <xs:attribute name="converter" type="xs:token" />
-        <xs:attribute name="converterId" type="xs:token" />
-        <xs:attribute name="validator" type="xs:token" />
-        <xs:attribute name="validatorId" type="xs:token" />
-        <xs:attribute name="required" type="pages:tf-boolean"/>
-        <xs:attribute name="validateModel" default="true" type="pages:tf-boolean"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="header">
-        <xs:annotation>
-            <xs:documentation>HTTP headers to be added</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.header"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.header">
-        <xs:attribute name="name" use="required" type="xs:token" />
-        <xs:attribute name="value" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="rewrite">
-        <xs:annotation>
-            <xs:documentation>URL rewriting pattern for this view</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.rewrite"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.rewrite">
-        <xs:attribute name="pattern" use="required" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="action">
-        <xs:annotation>
-            <xs:documentation>Page action</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.action"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.action">
-        <xs:attribute name="if" type="pages:boolean-value-expression" />
-        <xs:attribute name="on-postback" default="true" type="pages:tf-boolean"/>
-        <xs:attribute name="execute" use="required" type="pages:method-expression" />
-    </xs:attributeGroup>
-    
-    <xs:element name="restrict" type="pages:boolean-value-expression" default="true">
-        <xs:annotation>
-            <xs:documentation>Security restrictions</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-    
-    <xs:element name="navigation">
-        <xs:annotation>
-            <xs:documentation>Page navigation</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:choice maxOccurs="2">
-                <xs:sequence>
-                    <xs:choice minOccurs="0">
-                        <xs:element ref="pages:begin-conversation"/>
-                        <xs:element ref="pages:end-conversation"/>
-                        <xs:element ref="pages:start-task"/>
-                        <xs:element ref="pages:begin-task"/>
-                        <xs:element ref="pages:end-task"/>
-                        <xs:element ref="pages:create-process"/>
-                        <xs:element ref="pages:resume-process"/>
-                    </xs:choice>
-                    <xs:element minOccurs="0" maxOccurs="unbounded" ref="pages:out"/>
-                    <xs:element minOccurs="0" ref="pages:raise-event" maxOccurs="1"/>
-                    <xs:choice minOccurs="0">
-                        <xs:element ref="pages:render"/>
-                        <xs:element ref="pages:redirect"/>
-                    </xs:choice>
-                </xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="pages:rule"/>
-            </xs:choice>
-            <xs:attributeGroup ref="pages:attlist.navigation"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.navigation">
-        <xs:attribute name="from-action" type="pages:from-action-expression" />
-        <xs:attribute name="evaluate" type="pages:method-expression" />
-    </xs:attributeGroup>
-    
-    <xs:element name="rule">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:choice minOccurs="0">
-                    <xs:element ref="pages:begin-conversation"/>
-                    <xs:element ref="pages:end-conversation"/>
-                    <xs:element ref="pages:start-task"/>
-                    <xs:element ref="pages:begin-task"/>
-                    <xs:element ref="pages:end-task"/>
-                    <xs:element ref="pages:create-process"/>
-                    <xs:element ref="pages:resume-process"/>
-                </xs:choice>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="pages:out"/>
-                <xs:element minOccurs="0" ref="pages:raise-event"/>
-                <xs:choice minOccurs="0">
-                    <xs:element ref="pages:render"/>
-                    <xs:element ref="pages:redirect"/>
-                </xs:choice>
-            </xs:sequence>
-            <xs:attributeGroup ref="pages:attlist.rule"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.rule">
-        <xs:attribute name="if-outcome" type="pages:outcome-expression" />
-        <xs:attribute name="if" type="pages:boolean-value-expression" />
-    </xs:attributeGroup>
-    
-    <xs:element name="raise-event">
-        <xs:annotation>
-            <xs:documentation>Event to be raised</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.raise-event"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.raise-event">
-        <xs:attribute name="type" use="required" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="begin-conversation">
-        <xs:annotation>
-            <xs:documentation>This page begins a new conversation</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.begin-conversation"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.begin-conversation">
-        <xs:attribute name="join" default="false" type="pages:tf-boolean"/>
-        <xs:attribute name="nested" default="false" type="pages:tf-boolean"/>
-        <xs:attribute name="pageflow" type="xs:token" />
-        <xs:attribute name="flush-mode" type="pages:flush-modes" />
-        <xs:attribute name="if" type="pages:boolean-value-expression" />
-        <xs:attribute name="conversation" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="end-conversation">
-        <xs:annotation>
-            <xs:documentation>This page ends a conversation</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.end-conversation"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.end-conversation">
-        <xs:attribute name="before-redirect" default="false" type="pages:tf-boolean"/>
-        <xs:attribute name="root" default="false" type="pages:tf-boolean"/>
-        <xs:attribute name="if" type="pages:boolean-value-expression" />
-    </xs:attributeGroup>
-    
-    <xs:element name="begin-task">
-        <xs:annotation>
-            <xs:documentation>Begin a BPM task</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.begin-task"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.begin-task">
-        <xs:attribute name="task-id" type="xs:token" />
-        <xs:attribute name="pageflow" type="xs:token" />
-        <xs:attribute name="flush-mode" type="pages:flush-modes" />
-    </xs:attributeGroup>
-    
-    <xs:element name="start-task">
-        <xs:annotation>
-            <xs:documentation>Start a BPM task</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.start-task"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.start-task">
-        <xs:attribute name="task-id" type="xs:token" />
-        <xs:attribute name="pageflow" type="xs:token" />
-        <xs:attribute name="flush-mode" type="pages:flush-modes" />
-    </xs:attributeGroup>
-    
-    <xs:element name="end-task">
-        <xs:annotation>
-            <xs:documentation>Add a BPM task</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.end-task"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.end-task">
-        <xs:attribute name="transition" type="xs:token" />
-        <xs:attribute name="before-redirect" default="false" type="pages:tf-boolean" />
-    </xs:attributeGroup>
-    
-    <xs:element name="create-process">
-        <xs:annotation>
-            <xs:documentation>Create a BPM process</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.create-process"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.create-process">
-        <xs:attribute name="definition" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="resume-process">
-        <xs:annotation>
-            <xs:documentation>Resume a BPM process instance</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.resume-process"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.resume-process">
-        <xs:attribute name="process-id" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="in">
-        <xs:annotation>
-            <xs:documentation>A page input</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.in"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.in">
-        <xs:attribute name="name" use="required" type="xs:token" />
-        <xs:attribute name="scope" type="pages:allowed-scopes" />
-        <xs:attribute name="value" use="required" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="out">
-        <xs:annotation>
-            <xs:documentation>A contextual output for a navigation rule</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="pages:attlist.out"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.out">
-        <xs:attribute name="name" use="required" type="xs:token" />
-        <xs:attribute name="scope" default="CONVERSATION" type="pages:allowed-scopes" />
-        <xs:attribute name="value" use="required" type="xs:token" />
-    </xs:attributeGroup>
-    
-    <xs:element name="render">
-        <xs:annotation>
-            <xs:documentation>Render a view</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" ref="pages:message"/>
-            </xs:sequence>
-            <xs:attributeGroup ref="pages:attlist.render"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.render">
-        <xs:attribute name="view-id" type="pages:view-id-expression" />
-    </xs:attributeGroup>
-    
-    <xs:element name="redirect">
-        <xs:annotation>
-            <xs:documentation>Redirect to another view or URL</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" ref="pages:message"/>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="pages:param"/>
-            </xs:sequence>
-            
-            <xs:attributeGroup ref="pages:attlist.redirect"/>  
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.redirect">
-        <xs:attribute name="view-id" type="pages:view-id-expression" />
-        <xs:attribute name="url" type="pages:url-expression" />
-        <xs:attribute name="include-page-params" type="pages:tf-boolean" />
-    </xs:attributeGroup>
-    
-    <xs:element name="http-error">
-        <xs:annotation>
-            <xs:documentation>Send an HTTP error code</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" ref="pages:message"/>
-            </xs:sequence>
-            <xs:attributeGroup ref="pages:attlist.http-error"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.http-error">
-        <xs:attribute name="error-code" use="required" type="xs:unsignedLong" />
-    </xs:attributeGroup>
-    
-    <xs:element name="message">
-        <xs:annotation>
-            <xs:documentation>Add a message to the faces messages</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:simpleContent>
-                <xs:extension base="xs:string">
-                    <xs:attributeGroup ref="pages:attlist.message"/>
-                </xs:extension>
-            </xs:simpleContent>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.message">
-        <xs:attribute name="for" type="xs:token"/>
-        <xs:attribute name="severity" default="INFO" type="pages:loglevel-values" />
-    </xs:attributeGroup>
-    
-    <xs:element name="description" type="xs:string">
-        <xs:annotation>
-            <xs:documentation>A page description for workflow switching</xs:documentation>
-        </xs:annotation>
-    </xs:element>
-
-    <xs:simpleType name="url">
-        <xs:restriction base="xs:anyURI">
-          <xs:pattern value="http://.*|https://.*"/>
-        </xs:restriction>
-    </xs:simpleType>
-    
-    <xs:simpleType name="url-expression">
-        <xs:union memberTypes="pages:url pages:method-expression"></xs:union>
-    </xs:simpleType>
-
-    <xs:simpleType name="schemes">
-        <xs:restriction base="xs:token">
-            <xs:enumeration value="https"/>
-            <xs:enumeration value="http"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="outcome">
-        <xs:restriction base="xs:string">
-            <xs:pattern value="[^#\{\}]+"/>
-        </xs:restriction>
-    </xs:simpleType>
-    
-    <xs:simpleType name="view-id">
-        <xs:restriction base="xs:string">
-            <xs:pattern value="(/.*)|\*"/>
-        </xs:restriction>
-    </xs:simpleType>
-    
-    <xs:simpleType name="view-id-expression">
-        <xs:union memberTypes="pages:view-id pages:value-expression"></xs:union>
-    </xs:simpleType>
-
-    <xs:simpleType name="outcome-expression">
-        <xs:union memberTypes="pages:outcome pages:value-expression"></xs:union>
-    </xs:simpleType>
-
-    <xs:simpleType name="from-action-expression">
-        <xs:union memberTypes="pages:outcome pages:method-expression"></xs:union>
-    </xs:simpleType>
-
-    <xs:simpleType name="ableness">
-        <xs:restriction base="xs:token">
-            <xs:enumeration value="enabled"/>
-            <xs:enumeration value="disabled"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="tf-boolean">
-        <xs:annotation>
-            <xs:documentation>
-              <p>Allows for the following values:</p>
-              <ul>
-                <li>true</li>
-                <li>false</li>
-              </ul>
-            </xs:documentation>
-        </xs:annotation>
-        <xs:restriction base="xs:boolean">
-            <xs:pattern value="true"/>
-            <xs:pattern value="false"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="allowed-scopes">
-        <xs:restriction base="xs:token">
-           <xs:enumeration value="stateless"/>
-            <xs:enumeration value="event"/>
-            <xs:enumeration value="page"/>
-            <xs:enumeration value="conversation"/>
-            <xs:enumeration value="session"/>
-            <xs:enumeration value="business_process"/>
-            <xs:enumeration value="application"/>
-            <xs:enumeration value="STATELESS"/>
-            <xs:enumeration value="EVENT"/>
-            <xs:enumeration value="PAGE"/>
-            <xs:enumeration value="CONVERSATION"/>
-            <xs:enumeration value="SESSION"/>
-            <xs:enumeration value="BUSINESS_PROCESS"/>
-            <xs:enumeration value="APPLICATION"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="loglevel-values">
-        <xs:restriction base="xs:token">
-            <xs:enumeration value="info"/>
-            <xs:enumeration value="warn"/>
-            <xs:enumeration value="error"/>
-            <xs:enumeration value="fatal"/>
-            <xs:enumeration value="debug"/>
-            <xs:enumeration value="trace"/>
-            <xs:enumeration value="INFO"/>
-            <xs:enumeration value="WARN"/>
-            <xs:enumeration value="ERROR"/>
-            <xs:enumeration value="FATAL"/>
-            <xs:enumeration value="DEBUG"/>
-            <xs:enumeration value="TRACE"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="http-error-codes">
-        <xs:annotation>
-            <xs:documentation><p><b>Note:</b> These do not include the HTTP extensions.</p></xs:documentation>
-        </xs:annotation>
-        <xs:restriction base="xs:token">
-            <xs:enumeration value="100"/>
-            <xs:enumeration value="101"/>
-            <xs:enumeration value="200"/>
-            <xs:enumeration value="201"/>
-            <xs:enumeration value="202"/>
-            <xs:enumeration value="203"/>
-            <xs:enumeration value="204"/>
-            <xs:enumeration value="205"/>
-            <xs:enumeration value="206"/>
-            <xs:enumeration value="300"/>
-            <xs:enumeration value="301"/>
-            <xs:enumeration value="302"/>
-            <xs:enumeration value="303"/>
-            <xs:enumeration value="304"/>
-            <xs:enumeration value="305"/>
-            <xs:enumeration value="306"/>
-            <xs:enumeration value="307"/>
-            <xs:enumeration value="400"/>
-            <xs:enumeration value="401"/>
-            <xs:enumeration value="402"/>
-            <xs:enumeration value="403"/>
-            <xs:enumeration value="404"/>
-            <xs:enumeration value="405"/>
-            <xs:enumeration value="406"/>
-            <xs:enumeration value="407"/>
-            <xs:enumeration value="408"/>
-            <xs:enumeration value="409"/>
-            <xs:enumeration value="410"/>
-            <xs:enumeration value="411"/>
-            <xs:enumeration value="412"/>
-            <xs:enumeration value="413"/>
-            <xs:enumeration value="414"/>
-            <xs:enumeration value="415"/>
-            <xs:enumeration value="416"/>
-            <xs:enumeration value="417"/>
-            <xs:enumeration value="500"/>
-            <xs:enumeration value="501"/>
-            <xs:enumeration value="502"/>
-            <xs:enumeration value="503"/>
-            <xs:enumeration value="504"/>
-            <xs:enumeration value="505"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="flush-modes">
-        <xs:restriction base="xs:token">
-            <xs:enumeration value="manual"/>
-            <xs:enumeration value="auto"/>
-            <xs:enumeration value="commit"/>
-            <xs:enumeration value="MANUAL"/>
-            <xs:enumeration value="AUTO"/>
-            <xs:enumeration value="COMMIT"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="method-expression">
-        <xs:restriction base="xs:token">
-            <xs:pattern value="#\{.*\}"/>
-        </xs:restriction>
-    </xs:simpleType>
-    
-    <xs:simpleType name="value-expression">
-        <xs:restriction base="xs:token">
-            <xs:pattern value="#\{.*\}"/>
-        </xs:restriction>
-    </xs:simpleType>
-    
-    <xs:simpleType name="boolean-value-expression">
-        <xs:restriction base="xs:token">
-            <xs:pattern value="true|false|#\{.*\}"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/persistence-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/persistence-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/persistence-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/persistence" xmlns:persistence="http://jboss.com/products/seam/persistence"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="managed-persistence-context">
-        <xs:complexType mixed="true">
-            <xs:sequence>
-            	<xs:choice minOccurs="0" maxOccurs="unbounded">
-    	            <xs:element ref="persistence:filters"/>
-	                <xs:element ref="persistence:persistence-unit-jndi-name" />
-                </xs:choice>
-            </xs:sequence>
-            <xs:attributeGroup ref="persistence:attlist.ManagedPersistenceContext"/>
-            <xs:attributeGroup ref="components:attlist.component"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.ManagedPersistenceContext">
-        <xs:attribute name="entity-manager-factory" type="components:expressionType"/>
-        <xs:attribute name="persistence-unit-jndi-name" type="components:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="managed-hibernate-session">
-        <xs:complexType mixed="true">
-            <xs:sequence minOccurs="0" maxOccurs="1">
-                <xs:element ref="persistence:filters"/>
-            </xs:sequence>
-            <xs:attributeGroup ref="persistence:attlist.ManagedHibernateSession"/>
-            <xs:attributeGroup ref="components:attlist.component"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.ManagedHibernateSession">
-        <xs:attribute name="session-factory"/>
-        <xs:attribute name="session-factory-jndi-name"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="filters" type="components:multiValuedProperty"/>
-    <xs:element name="persistence-unit-jndi-name" type="components:string" />
-    
-    <xs:element name="hibernate-session-factory">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="mapping-classes" type="components:multiValuedProperty"/>
-                <xs:element name="mapping-files" type="components:multiValuedProperty"/>
-                <xs:element name="mapping-jars" type="components:multiValuedProperty"/>
-                <xs:element name="mapping-packages" type="components:multiValuedProperty"/>
-                <xs:element name="mapping-resources" type="components:multiValuedProperty"/>
-                <xs:element name="naming-strategy" type="components:expressionType"/>
-                <xs:element name="cfg-properties" type="components:mapProperty"/>
-            </xs:choice>
-            <xs:attributeGroup ref="persistence:attlist.HibernateSessionFactory"/>
-            <xs:attributeGroup ref="components:attlist.component"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.HibernateSessionFactory">
-        <xs:attribute name="cfg-resource-name" type="components:string"/>
-    </xs:attributeGroup>
-
-    <xs:element name="entity-manager-factory">
-        <xs:complexType mixed="true">
-            <xs:sequence minOccurs="0" maxOccurs="1">
-                <xs:element name="persistence-unit-properties" type="components:mapProperty"/>
-            </xs:sequence>
-            <xs:attributeGroup ref="persistence:attlist.EntityManagerFactory"/>
-            <xs:attributeGroup ref="components:attlist.component"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.EntityManagerFactory">
-        <xs:attribute name="persistence-unit-name" type="components:string" />
-    </xs:attributeGroup>
-
-    <xs:element name="filter">
-        <xs:complexType mixed="true">
-            <xs:sequence>
-                <xs:element minOccurs="0" name="name" type="components:string"/>
-                <xs:element minOccurs="0" name="parameters" type="components:mapProperty"/>
-            </xs:sequence>
-            <xs:attributeGroup ref="persistence:attlist.filter"/>
-            <xs:attributeGroup ref="components:attlist.component"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.filter">
-        <xs:attribute name="enabled" type="components:boolean" />
-    </xs:attributeGroup>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/remoting-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/remoting-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/remoting-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/remoting" xmlns:remoting="http://jboss.com/products/seam/remoting"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="remoting">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="remoting:attlist.remoting"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.remoting">
-        <xs:attribute name="poll-interval" type="components:int"/>
-        <xs:attribute name="poll-timeout" type="components:int" />
-        <xs:attribute name="debug" type="components:boolean" />
-    </xs:attributeGroup>
-   
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/security-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/security-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/security-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,157 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/security" xmlns:security="http://jboss.com/products/seam/security"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="identity">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.identity"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.identity">
-        <xs:attribute name="authenticate-method" type="components:expressionType"/>
-        <xs:attribute name="remember-me" type="components:boolean"/>
-        <xs:attribute name="jaas-config-name" type="components:string"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="remember-me">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.remember-me"/>
-        </xs:complexType>    
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.remember-me">
-        <xs:attribute name="cookie-max-age" type="components:int"/>
-        <xs:attribute name="enabled" type="components:boolean"/>
-        <xs:attribute name="mode">
-            <xs:simpleType>
-                <xs:restriction base="xs:token">
-                    <xs:enumeration value="disabled"/>
-                    <xs:enumeration value="usernameOnly"/>
-                    <xs:enumeration value="autoLogin"/>
-                </xs:restriction>
-            </xs:simpleType>
-        </xs:attribute>
-    </xs:attributeGroup>
-    
-    <xs:element name="identity-manager">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.identity-manager"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="jpa-identity-store">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.jpa-identity-store"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="jpa-token-store">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.jpa-token-store"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="ldap-identity-store">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.ldap-identity-store"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="permission-manager">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.permission-manager"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="jpa-permission-store">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.jpa-permission-store"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="rule-based-permission-resolver">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.rule-based-permission-resolver"/>        
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="persistent-permission-resolver">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="security:attlist.persistent-permission-resolver"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.identity-manager">
-        <xs:attribute name="identity-store" type="components:expressionType"/>
-        <xs:attribute name="role-identity-store" type="components:expressionType"/>
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.jpa-identity-store">
-        <xs:attribute name="entity-manager" type="components:string"/>
-        <xs:attribute name="user-class" type="components:string" use="required"/>
-        <xs:attribute name="role-class" type="components:string"/>
-        <xs:attribute name="features" type="components:string"/>
-    </xs:attributeGroup>     
-    
-    <xs:attributeGroup name="attlist.jpa-token-store">
-        <xs:attribute name="entity-manager" type="components:string"/>
-        <xs:attribute name="token-class" type="components:string"/>
-    </xs:attributeGroup> 
-    
-    <xs:attributeGroup name="attlist.ldap-identity-store">
-        <xs:attribute name="server-address" type="components:string"/>
-        <xs:attribute name="server-port" type="components:string"/>
-        <xs:attribute name="bind-DN" type="components:string"/>
-        <xs:attribute name="bind-credentials" type="components:string"/>
-        <xs:attribute name="user-DN-prefix" type="components:string"/>
-        <xs:attribute name="user-DN-suffix" type="components:string"/>
-        <xs:attribute name="role-DN-prefix" type="components:string"/>
-        <xs:attribute name="role-DN-suffix" type="components:string"/>
-        <xs:attribute name="user-context-DN" type="components:string"/>
-        <xs:attribute name="role-context-DN" type="components:string"/>
-        <xs:attribute name="user-role-attribute" type="components:string"/>
-        <xs:attribute name="user-name-attribute" type="components:string"/>
-        <xs:attribute name="role-name-attribute" type="components:string"/>
-        <xs:attribute name="role-attribute-is-DN" type="components:boolean"/>
-        <xs:attribute name="user-object-classes" type="components:string"/>
-        <xs:attribute name="role-object-classes" type="components:string"/>
-        <xs:attribute name="enabled-attribute" type="components:string"/>
-        <xs:attribute name="search-scope" type="components:string"/>
-        <xs:attribute name="first-name-attribute" type="components:string"/>
-        <xs:attribute name="last-name-attribute" type="components:string"/>
-        <xs:attribute name="user-password-attribute" type="components:string"/>
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.permission-manager">
-        <xs:attribute name="permission-store" type="components:expressionType"/>
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.jpa-permission-store">
-        <xs:attribute name="entity-manager" type="components:string"/>
-        <xs:attribute name="user-permission-class" type="components:string"/>
-        <xs:attribute name="role-permission-class" type="components:string"/>
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.rule-based-permission-resolver">
-        <xs:attribute name="security-rules" type="components:expressionType"/>
-    </xs:attributeGroup>
-
-    <xs:attributeGroup name="attlist.persistent-permission-resolver">
-        <xs:attribute name="permission-store" type="components:expressionType"/>
-    </xs:attributeGroup>
-            
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/theme-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/theme-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/theme-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/theme" xmlns:theme="http://jboss.com/products/seam/theme"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="theme-selector">
-        <xs:annotation>
-            <xs:documentation>Theme selector component</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="1">
-                <xs:element name="available-themes" type="components:multiValuedProperty"/>
-            </xs:choice>
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="theme:attlist.themeSelector"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.themeSelector">
-        <xs:attribute name="theme" type="components:string"/>
-        <xs:attribute name="available-themes" type="components:string"/>
-        <xs:attribute name="cookie-max-age" type="components:int"/>
-        <xs:attribute name="cookie-enabled" type="components:boolean" />
-    </xs:attributeGroup>
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/transaction-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/transaction-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/transaction-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/transaction" xmlns:transaction="http://jboss.com/products/seam/transaction"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="ejb-transaction">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="components:attlist.ejbcomponent"/>
-            <xs:attributeGroup ref="transaction:attlist.transaction"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.transaction"> </xs:attributeGroup>
-
-    <xs:element name="hibernate-transaction">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="transaction:attlist.HibernateTransaction"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.HibernateTransaction">
-        <xs:attribute name="session" type="components:string" use="required"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="entity-transaction">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="transaction:attlist.EntityTransaction"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.EntityTransaction">
-        <xs:attribute name="entity-manager" type="components:string" use="required"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="no-transaction">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-        </xs:complexType>
-    </xs:element>
-    
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/ui-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/ui-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/ui-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/ui"
-    xmlns:ui="http://jboss.com/products/seam/ui"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-    
-    <xs:element name="jpa-entity-loader">
-      <xs:complexType>
-         <xs:attributeGroup ref="components:attlist.component" />
-         <xs:attribute name="entity-manager" type="xs:string" />
-      </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="hibernate-entity-loader">
-      <xs:complexType>
-         <xs:attributeGroup ref="components:attlist.component" />
-         <xs:attribute name="session" type="xs:string" />
-      </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="entity-converter">
-      <xs:complexType>
-         <xs:attributeGroup ref="components:attlist.component" />
-         <xs:attribute name="entity-loader" type="xs:string" />
-      </xs:complexType>
-    </xs:element>
-
-    <xs:element name="render-stamp-store">
-      <xs:complexType>
-         <xs:attributeGroup ref="components:attlist.component" />
-         <xs:attribute name="max-size" type="xs:int" />
-      </xs:complexType>
-    </xs:element>
-    
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/web-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/web-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/web-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,199 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/web" xmlns:web="http://jboss.com/products/seam/web"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-
-    <xs:element name="hot-deploy-filter">
-        <xs:annotation>
-            <xs:documentation>This filter triggers a scan for hot deployable components and descriptor files on each request. The URL pattern should be set to the same pattern as used by the Faces Servlet. Note that this filter is automatically disabled when Seam debug mode is disabled.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="identity-filter">
-        <xs:annotation>
-            <xs:documentation>This filter provides integration between Servlet Security and the identity component.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="multipart-filter">
-        <xs:annotation>
-            <xs:documentation>
-                Detects multipart form requests and processes them according to the 
-                multipart/form-data specification (RFC-2388).
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-            <xs:attributeGroup ref="web:attlist.multipartFilter"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="redirect-filter">
-        <xs:annotation>
-            <xs:documentation>This filter allows Seam to propagate the conversation context across browser redirects. It intercepts any 
-browser redirects and adds a request parameter that specifies the Seam conversation identifier.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-        </xs:complexType>    
-    </xs:element>    
-    
-    <xs:element name="exception-filter">
-        <xs:annotation>
-            <xs:documentation>This filter provides the exception mapping functionality in pages.xml.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="context-filter">
-        <xs:annotation>
-            <xs:documentation>This filter allows custom servlets to interact with the Seam contexts. It sets up the Seam contexts at the begin- 
-ning of each request, and tears them down at the end of the request.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="wicket-filter">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-            <xs:attributeGroup ref="web:attlist.wicketFilter"/>
-        </xs:complexType>
-    </xs:element>    
-        
-    <xs:element name="character-encoding-filter">
-        <xs:annotation>
-            <xs:documentation>Sets the character encoding of submitted form data.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-            <xs:attribute name="encoding" type="components:string"/>
-            <xs:attribute name="override-client" type="components:boolean"/>
-        </xs:complexType>
-    </xs:element> 
-    
-    <xs:element name="authentication-filter">
-        <xs:annotation>
-            <xs:documentation>Although not recommended for use unless absolutely necessary, Seam provides means for authenticating using 
-either HTTP Basic or HTTP Digest (RFC 2617) methods.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-            <xs:attribute name="realm" type="components:string"/>
-            <xs:attribute name="key" type="components:string"/>
-            <xs:attribute name="nonce-validity-seconds" type="components:int"/>
-            <xs:attribute name="auth-type" type="components:string"/>
-        </xs:complexType>
-    </xs:element>
-        
-    <xs:element name="logging-filter">
-        <xs:annotation>
-            <xs:documentation>This filter adds the authenticated user name to the log4j mapped diagnostic context so that it can be included in 
-formatted log output if desired, by adding %X{username} to the pattern.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-        </xs:complexType>
-    </xs:element>
-       
-    <xs:element name="ajax4jsf-filter">
-        <xs:annotation>
-            <xs:documentation>The ajax4jsf filter for RichFaces</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-            <xs:attributeGroup ref="web:attlist.ajax4jsfFilter"/>
-        </xs:complexType>
-    </xs:element>    
-    
-    <xs:element name="rewrite-filter">
-        <xs:annotation>
-            <xs:documentation>This filter performs URL rewriting.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:rewrite.filter"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.filter">
-        <xs:attribute name="url-pattern" type="components:string"/>
-        <xs:attribute name="regex-url-pattern" type="components:string"/>
-        <xs:attribute name="disabled" type="components:boolean" default="false" />
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.wicketFilter">
-        <xs:attribute name="application-class" type="components:string"/>
-        <xs:attribute name="application-factory-class" type="components:string"/>
-        <xs:attribute name="detect-portlet-context" type="components:boolean" default="false" />
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.multipartFilter">
-        <xs:attribute name="create-temp-files" type="components:boolean" />           
-        <xs:attribute name="max-request-size" type="components:int"/>
-    </xs:attributeGroup>
-    
-    <xs:attributeGroup name="attlist.ajax4jsfFilter">
-        <xs:attribute name="enable-cache" type="components:boolean" />
-        <xs:attribute name="force-parser" type="components:boolean" />
-        <xs:attribute name="log4j-init-file" type="components:string"/>
-    </xs:attributeGroup>
-    
-    <xs:element name="session">
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.session"/>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:attributeGroup name="attlist.session">
-        <xs:attribute name="invalidate-on-scheme-change" type="components:boolean"/>
-    </xs:attributeGroup>   
-    
-    <xs:attributeGroup name="rewrite.filter">
-        <xs:attribute name="view-mapping" type="components:string">
-            <xs:annotation>
-                <xs:documentation>
-                    This is the servlet mapping.  It should be set to the same pattern as used by the
-                    Faces Servlet.  If no value is specified, a pattern of *.seam will be assumed.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-   
-    <xs:element name="cache-control-filter">
-        <xs:annotation>
-            <xs:documentation>Sets the HTTP Cache-Control header</xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attributeGroup ref="components:attlist.component"/>
-            <xs:attributeGroup ref="web:attlist.filter"/>
-            <xs:attribute name="value" type="components:string"/>
-        </xs:complexType>
-    </xs:element>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/wicket-2.3.xsd
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/wicket-2.3.xsd	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/resources/org/jboss/seam/wicket-2.3.xsd	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
-    targetNamespace="http://jboss.com/products/seam/wicket"
-    xmlns:wicket="http://jboss.com/products/seam/wicket"
-    xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
-    
-    <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.3.xsd"/>
-    
-    <xs:element name="web-application">
-        <xs:annotation>
-            <xs:documentation></xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="components:attlist.component" />
-            <xs:attributeGroup ref="wicket:attlist.webApplication" />
-        </xs:complexType>
-    </xs:element>
-   
-    <xs:attributeGroup name="attlist.webApplication">
-        <xs:attribute name="application-class" type="components:string" />
-    </xs:attributeGroup>
-
-</xs:schema>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/META-INF/pagesForPageActionsTest.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/META-INF/pagesForPageActionsTest.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/META-INF/pagesForPageActionsTest.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<pages xmlns="http://jboss.com/products/seam/pages"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://jboss.com/products/seam/pages
-		http://jboss.com/products/seam/pages-2.3.xsd">
-
-	<page view-id="/action-test01a.xhtml">
-		<action execute="#{testActions.nonNullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-	</page>
-
-	<page view-id="/action-test01b.xhtml" action="#{testActions.nonNullActionA}">
-		<description>#{fineDescription}</description>
-		<action execute="#{testActions.nonNullActionB}" />
-	</page>
-	
-	<page view-id="/action-test01*">
-		<description>coarse-description</description>
-		<navigation from-action="#{testActions.nonNullActionA}">
-			<rule if-outcome="outcomeA">
-				<render view-id="/pageA.xhtml" />
-			</rule>
-		</navigation>
-
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<render view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test02.xhtml">
-		<action execute="#{testActions.nonNullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		<action execute="#{testActions.nonNullActionC}" />
-		
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<render view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test03.xhtml">
-		<action execute="#{testActions.nullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		
-		<navigation from-action="#{testActions.nullActionA}">
-			<render view-id="/pageA.xhtml"/>
-		</navigation>
-		
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<render view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test04.xhtml">
-		<action execute="#{testActions.nullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		<action execute="#{testActions.nonNullActionC}" />
-		
-		<navigation>
-			<rule>
-				<render view-id="/action-test04.xhtml"/>
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test05.xhtml">
-		<action execute="#{testActions.nonNullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		
-		<navigation from-action="#{testActions.nonNullActionA}">
-			<rule if-outcome="outcomeA">
-				<redirect view-id="/pageA.xhtml" />
-			</rule>
-		</navigation>
-
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<redirect view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-
-	<page view-id="/action-test06.xhtml">
-		<action execute="#{testActions.nonNullActionA}"/>
-		<action execute="#{testActions.nonNullActionB}" on-postback="false"/>
-	</page>
-	
-	<!-- The next two page nodes (action-test99*) demonstrate the old
-	behavior, where successive actions could trigger navigations on
-	different page nodes because the viewId changes mid-run -->
-	<page view-id="/action-test99a.xhtml">
-		<action execute="#{testActions.nonNullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		
-		<navigation from-action="#{testActions.nonNullActionA}">
-			<rule if-outcome="outcomeA">
-				<render view-id="/action-test99b.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test99b.xhtml">
-		<action execute="#{testActions.nonNullActionC}" />
-
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<render view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/end-conversation-test.xhtml">
-		<end-conversation />
-	</page>
-	
-	<page view-id="/end-root-conversation-test.xhtml">
-		<end-conversation root="true" />
-	</page>
-
-</pages>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/META-INF/seam.properties
===================================================================
Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/AbstractPageTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/AbstractPageTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/AbstractPageTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,91 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.Locale;
-import org.jboss.seam.core.ResourceLoader;
-import org.jboss.seam.mock.MockApplication;
-import org.jboss.seam.mock.MockExternalContext;
-import org.jboss.seam.mock.MockFacesContext;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.util.Conversions;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-
-/**
- * Abstract class that provides the setup and tear-down necessary to initialize the context for performing tests
- * against the Pages component.
- */
-public abstract class AbstractPageTest
-{
-   private static final String TEST_PAGES_DOT_XML = "/META-INF/pagesForPageActionsTest.xml";
-   
-   @BeforeMethod
-   public void setup()
-   {
-      // create main application map
-      Lifecycle.beginApplication(new HashMap<String, Object>());
-
-      // start all the contexts
-      Lifecycle.beginCall();
-
-      // establish the FacesContext
-      new MockFacesContext(new MockExternalContext(), new MockApplication()).setCurrent().createViewRoot();
-      FacesLifecycle.resumePage();
-
-      // install key components
-      installComponents(Contexts.getApplicationContext());
-
-      // initialize pages
-      // the descriptor file locations are set using the property: org.jboss.seam.navigation.pages.resources
-      // this setup of this test sets this property value to: /META-INF/pagesForPageActionsTest.xml
-      Pages.instance();
-
-      // mark the application as started
-      Lifecycle.setupApplication();
-   }
-
-   @AfterMethod
-   public void tearDown()
-   {
-      Lifecycle.endApplication();
-      Lifecycle.cleanupApplication();
-   }
-   
-   protected void installComponents(Context appContext)
-   {
-      Init init = new Init();
-      init.setTransactionManagementEnabled(false);
-      appContext.set(Seam.getComponentName(Init.class), init);
-      Map<String, Conversions.PropertyValue> properties = new HashMap<String, Conversions.PropertyValue>();
-      appContext.set(Component.PROPERTIES, properties);
-      properties.put(Seam.getComponentName(Pages.class) + ".resources", new Conversions.FlatPropertyValue(TEST_PAGES_DOT_XML));
-
-      installComponent(appContext, ResourceLoader.class);
-      installComponent(appContext, Expressions.class);
-      installComponent(appContext, Pages.class);
-      installComponent(appContext, Interpolator.class);
-      installComponent(appContext, Locale.class);
-   }
-
-   /**
-    * Installs a component for use in the current test context.
-    * 
-    * @param appContext
-    * @param clazz
-    */
-   protected void installComponent(Context appContext, Class clazz)
-   {
-      appContext.set(Seam.getComponentName(clazz) + ".component", new Component(clazz));
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Action.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Action.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Action.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,14 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-
- at Name("action")
-public class Action {
-   
-   @In(create=true) String name;
-   
-   public String go() {
-      return "success";
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Bar.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Bar.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Bar.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.test.unit;
-
-import java.io.Serializable;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Conversational;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
-import org.jboss.seam.annotations.Scope;
-
-/**
- * @author <a href="mailto:theute at jboss.org">Thomas Heute </a>
- */
- at Name("bar")
- at Scope(ScopeType.CONVERSATION)
- at Conversational
-public class Bar implements Serializable
-{
-   private static final long serialVersionUID = -5325217160542604204L;
-
-   @In(required=true)
-   Foo otherFoo;
-   
-   @In(create=true)
-   Foo foo;
-   
-   @Out(required=false)
-   String string;
-   
-   @Out(required=false, scope=ScopeType.EVENT)
-   String otherString;
-   
-   @Begin
-   public String begin()
-   {
-      return "begun";
-   }
-   
-   public String foo()
-   {
-      string = "out";
-      otherString = "outAgain";
-      return "foo";
-   }
-   
-   @End
-   public String end()
-   {
-      return "ended";
-   }
-   
-   @Destroy
-   public void destroy(){}
-   @Create
-   public void create(){}
-   
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/BrokenAction.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/BrokenAction.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/BrokenAction.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,15 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-
- at Name("brokenAction")
-public class BrokenAction {
-   
-   @In String name;
-   
-   public String go() {
-      return "success";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ComponentTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ComponentTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ComponentTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,142 +0,0 @@
-//$Id: ComponentTest.java 6435 2007-10-08 18:15:49Z pmuir $
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ComponentType;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.persistence.ManagedHibernateSession;
-import org.jboss.seam.persistence.ManagedPersistenceContext;
-import org.testng.annotations.Test;
-
-public class ComponentTest
-{
-   @Test
-   public void testStaticMethods()
-   {
-      assert Seam.getComponentName(Bar.class).equals("bar");
-      assert Seam.getComponentType(Bar.class)==ComponentType.JAVA_BEAN;
-      assert Seam.getComponentScope(Bar.class)==ScopeType.CONVERSATION;
-      assert Seam.getComponentName(Foo.class).equals("foo");
-      assert Seam.getComponentType(Foo.class)==ComponentType.JAVA_BEAN;
-      assert Seam.getComponentScope(Foo.class)==ScopeType.SESSION;
-      //assert Seam.getBeanClass(Foo.class)==Foo.class;
-      assert Seam.getEjbName(EjbBean.class).equals("EjbBean");
-      assert Seam.getEjbName(Foo.class)==null;
-      assert Seam.isInterceptionEnabled(Foo.class)==true;
-   }
-   
-   @Test
-   public void testComponent()
-   {
-      Component c = new Component(Bar.class);
-      assert c.getName().equals("bar");
-      assert c.getBeanClass()==Bar.class;
-      assert c.getType()==ComponentType.JAVA_BEAN;
-      assert c.getScope()==ScopeType.CONVERSATION;
-      assert c.hasDestroyMethod();
-      assert c.hasCreateMethod();
-      assert c.getCreateMethod().getName().equals("create");
-      assert c.getDestroyMethod().getName().equals("destroy");
-      assert c.getInAttributes().size()==2;
-      assert c.getUnwrapMethod()==null;
-      assert c.getOutAttributes().size()==2;
-      assert c.getRemoveMethods().size()==0;
-      assert c.isInstance( new Bar() );
-
-      c = new Component(Foo.class);
-      assert c.getName().equals("foo");
-      assert c.getBeanClass()==Foo.class;
-      assert c.getType()==ComponentType.JAVA_BEAN;
-      assert c.getScope()==ScopeType.SESSION;
-      assert !c.hasDestroyMethod();
-      assert !c.hasCreateMethod();
-      assert c.getCreateMethod()==null;
-      assert c.getDestroyMethod()==null;
-      assert c.getInAttributes().size()==0;
-      assert c.getUnwrapMethod()==null;
-      assert c.getOutAttributes().size()==0;
-      assert c.getRemoveMethods().size()==1;
-      assert c.isInstance( new Foo() );
-      
-      c = new Component(EjbBean.class);
-      assert c.getName().equals("ejb");
-      assert c.getBeanClass()==EjbBean.class;
-      assert c.getType()==ComponentType.STATEFUL_SESSION_BEAN;
-      assert c.getScope()==ScopeType.EVENT;
-      assert c.hasDestroyMethod();
-      assert !c.hasDefaultRemoveMethod();
-      assert !c.hasCreateMethod();
-      assert c.getCreateMethod()==null;
-      assert c.getDestroyMethod()!=null;
-      assert c.getDefaultRemoveMethod()==null;
-      assert c.getInAttributes().size()==0;
-      assert c.getUnwrapMethod()==null;
-      assert c.getOutAttributes().size()==0;
-      assert c.getRemoveMethods().size()==1;
-      assert c.isInstance( new Ejb() {
-         public void destroy() {}
-         public void foo() {} 
-      } );
-   }
-   
-   public void testBuiltInComponents()
-   {
-      Component c = new Component(Manager.class);
-      assert c.getName().equals("org.jboss.seam.conversationManager");
-      assert c.getBeanClass()==Manager.class;
-      assert c.getType()==ComponentType.JAVA_BEAN;
-      assert c.getScope()==ScopeType.EVENT;
-      assert c.hasDestroyMethod();
-      assert !c.hasCreateMethod();
-      assert c.getCreateMethod()==null;
-      assert c.getDestroyMethod().getName().equals("destroy");
-      assert c.getInAttributes().size()==0;
-      assert c.getUnwrapMethod()==null;
-      assert c.getOutAttributes().size()==0;
-      assert c.getRemoveMethods().size()==0;
-
-      c = new Component(Init.class);
-      assert c.getName().equals("org.jboss.seam.settings");
-      assert c.getBeanClass()==Init.class;
-      assert c.getType()==ComponentType.JAVA_BEAN;
-      assert c.getScope()==ScopeType.APPLICATION;
-      assert !c.hasDestroyMethod();
-      assert !c.hasCreateMethod();
-      assert c.getCreateMethod()==null;
-      assert c.getDestroyMethod()==null;
-      assert c.getInAttributes().size()==0;
-      assert c.getUnwrapMethod()==null;
-      assert c.getOutAttributes().size()==0;
-      assert c.getRemoveMethods().size()==0;
-      c = new Component(ManagedPersistenceContext.class, "pc");
-      assert c.getName().equals("pc");
-      assert c.getBeanClass()==ManagedPersistenceContext.class;
-      assert c.getType()==ComponentType.JAVA_BEAN;
-      assert c.getScope()==ScopeType.CONVERSATION;
-      assert c.hasDestroyMethod();
-      assert c.hasCreateMethod();
-      assert c.getCreateMethod().getName().equals("create");
-      assert c.getDestroyMethod().getName().equals("destroy");
-      assert c.getInAttributes().size()==0;
-      assert c.getUnwrapMethod().getName().equals("getEntityManager");
-      assert c.getOutAttributes().size()==0;
-      assert c.getRemoveMethods().size()==0;
-
-      c = new Component(ManagedHibernateSession.class, "pc");
-      assert c.getName().equals("pc");
-      assert c.getBeanClass()==ManagedHibernateSession.class;
-      assert c.getType()==ComponentType.JAVA_BEAN;
-      assert c.getScope()==ScopeType.CONVERSATION;
-      assert c.hasDestroyMethod();
-      assert c.hasCreateMethod();
-      assert c.getCreateMethod().getName().equals("create");
-      assert c.getDestroyMethod().getName().equals("destroy");
-      assert c.getInAttributes().size()==0;
-      assert c.getUnwrapMethod().getName().equals("getSession");
-      assert c.getOutAttributes().size()==0;
-      assert c.getRemoveMethods().size()==0;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ContextTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ContextTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ContextTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,287 +0,0 @@
-//$Id: ContextTest.java 11208 2009-06-25 14:55:53Z manaRH $
-package org.jboss.seam.test.unit;
-
-import java.util.Map;
-
-import javax.el.ELContext;
-import javax.faces.context.ExternalContext;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Namespace;
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.ApplicationContext;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.EventContext;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.contexts.ServerConversationContext;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.contexts.SessionContext;
-import org.jboss.seam.core.ConversationEntries;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.el.EL;
-import org.jboss.seam.el.SeamELResolver;
-import org.jboss.seam.mock.MockExternalContext;
-import org.jboss.seam.mock.MockHttpServletRequest;
-import org.jboss.seam.mock.MockHttpSession;
-import org.jboss.seam.mock.MockServletContext;
-import org.jboss.seam.servlet.ServletRequestMap;
-import org.jboss.seam.servlet.ServletRequestSessionMap;
-import org.jboss.seam.web.Parameters;
-import org.jboss.seam.web.ServletContexts;
-import org.jboss.seam.web.Session;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-public class ContextTest {
-    private void installComponent(Context appContext, Class clazz) {
-        appContext.set(Seam.getComponentName(clazz) + ".component",
-                new Component(clazz));
-    }
-
-    @Test
-    public void testContextManagement() throws Exception {
-        ELContext elContext = EL.createELContext();
-        SeamELResolver seamVariableResolver = new SeamELResolver();
-        // org.jboss.seam.bpm.SeamVariableResolver jbpmVariableResolver = new
-        // org.jboss.seam.bpm.SeamVariableResolver();
-
-        MockServletContext servletContext = new MockServletContext();
-        ServletLifecycle.beginApplication(servletContext);
-        MockExternalContext externalContext = new MockExternalContext(
-                servletContext);
-        Context appContext = new ApplicationContext(externalContext
-                .getApplicationMap());
-        // appContext.set( Seam.getComponentName(Init.class), new Init() );
-        installComponent(appContext, ConversationEntries.class);
-        installComponent(appContext, Manager.class);
-        installComponent(appContext, Session.class);
-        installComponent(appContext, ServletContexts.class);
-        installComponent(appContext, Parameters.class);
-        appContext.set(Seam.getComponentName(Init.class), new Init());
-
-        installComponent(appContext, Bar.class);
-        installComponent(appContext, Foo.class);
-        appContext.set("otherFoo", new Foo());
-
-        assert !Contexts.isEventContextActive();
-        assert !Contexts.isSessionContextActive();
-        assert !Contexts.isConversationContextActive();
-        assert !Contexts.isApplicationContextActive();
-
-        FacesLifecycle.beginRequest(externalContext);
-
-        assert Contexts.isEventContextActive();
-        assert Contexts.isSessionContextActive();
-        assert !Contexts.isConversationContextActive();
-        assert Contexts.isApplicationContextActive();
-
-        Manager.instance().setCurrentConversationId("3");
-        FacesLifecycle.resumeConversation(externalContext);
-        Manager.instance().setLongRunningConversation(true);
-
-        assert Contexts.isEventContextActive();
-        assert Contexts.isSessionContextActive();
-        assert Contexts.isConversationContextActive();
-        assert Contexts.isApplicationContextActive();
-        assert !Contexts.isPageContextActive();
-
-        assert Contexts.getEventContext() != null;
-        assert Contexts.getSessionContext() != null;
-        assert Contexts.getConversationContext() != null;
-        assert Contexts.getApplicationContext() != null;
-        assert Contexts.getEventContext() instanceof EventContext;
-        assert Contexts.getSessionContext() instanceof SessionContext;
-        assert Contexts.getConversationContext() instanceof ServerConversationContext;
-        assert Contexts.getApplicationContext() instanceof ApplicationContext;
-
-        Contexts.getSessionContext().set("zzz", "bar");
-        Contexts.getApplicationContext().set("zzz", "bar");
-        Contexts.getConversationContext().set("xxx", "yyy");
-
-        Object bar = seamVariableResolver.getValue(elContext, null, "bar");
-        assert bar != null;
-        assert bar instanceof Bar;
-        assert Contexts.getConversationContext().get("bar") == bar;
-        Object foo = Contexts.getSessionContext().get("foo");
-        assert foo != null;
-        assert foo instanceof Foo;
-
-        FacesLifecycle.endRequest(externalContext);
-
-        assert !Contexts.isEventContextActive();
-        assert !Contexts.isSessionContextActive();
-        assert !Contexts.isConversationContextActive();
-        assert !Contexts.isApplicationContextActive();
-        assert ((MockHttpSession) externalContext.getSession(false))
-                .getAttributes().size() == 4;
-        assert ((MockServletContext) externalContext.getContext())
-                .getAttributes().size() == 12;
-
-        FacesLifecycle.beginRequest(externalContext);
-
-        assert Contexts.isEventContextActive();
-        assert Contexts.isSessionContextActive();
-        assert !Contexts.isConversationContextActive();
-        assert Contexts.isApplicationContextActive();
-
-        Manager.instance().setCurrentConversationId("3");
-        FacesLifecycle.resumeConversation(externalContext);
-
-        assert Contexts.isEventContextActive();
-        assert Contexts.isSessionContextActive();
-        assert Contexts.isConversationContextActive();
-        assert Contexts.isApplicationContextActive();
-
-        assert Contexts.getEventContext() != null;
-        assert Contexts.getSessionContext() != null;
-        assert Contexts.getConversationContext() != null;
-        assert Contexts.getApplicationContext() != null;
-        assert Contexts.getEventContext() instanceof EventContext;
-        assert Contexts.getSessionContext() instanceof SessionContext;
-        assert Contexts.getConversationContext() instanceof ServerConversationContext;
-        assert Contexts.getApplicationContext() instanceof ApplicationContext;
-
-        assert Contexts.getSessionContext().get("zzz").equals("bar");
-        assert Contexts.getApplicationContext().get("zzz").equals("bar");
-        assert Contexts.getConversationContext().get("xxx").equals("yyy");
-        assert Contexts.getConversationContext().get("bar") == bar;
-        assert Contexts.getSessionContext().get("foo") == foo;
-
-        assert Contexts.getConversationContext().getNames().length == 2;
-        assert Contexts.getApplicationContext().getNames().length == 12;
-        assert Contexts.getSessionContext().getNames().length == 2;
-
-        assert seamVariableResolver.getValue(elContext, null, "zzz").equals(
-                "bar");
-        assert seamVariableResolver.getValue(elContext, null, "xxx").equals(
-                "yyy");
-        assert seamVariableResolver.getValue(elContext, null, "bar") == bar;
-        assert seamVariableResolver.getValue(elContext, null, "foo") == foo;
-
-        // JBSEAM-3077
-        assert EL.EL_RESOLVER.getValue(elContext, new Namespace("org.jboss.seam.core."), "conversationEntries") instanceof ConversationEntries;
-        try {
-            assert EL.EL_RESOLVER.getValue(elContext, new Namespace("org.jboss.seam."), "caughtException") == null;
-        } catch (Exception e) {
-            Assert.fail("An exception should not be thrown when a qualified name resolves to null", e);
-        }
-
-        /*
-         * assert jbpmVariableResolver.resolveVariable("zzz").equals("bar");
-         * assert jbpmVariableResolver.resolveVariable("xxx").equals("yyy");
-         * assert jbpmVariableResolver.resolveVariable("bar")==bar; assert
-         * jbpmVariableResolver.resolveVariable("foo")==foo;
-         */
-
-        Manager.instance().setLongRunningConversation(false);
-        FacesLifecycle.endRequest(externalContext);
-
-        assert !Contexts.isEventContextActive();
-        assert !Contexts.isSessionContextActive();
-        assert !Contexts.isConversationContextActive();
-        assert !Contexts.isApplicationContextActive();
-        assert ((MockHttpSession) externalContext.getSession(false))
-                .getAttributes().size() == 3; // foo, zzz, org.jboss.seam.core.conversationEntries
-        assert ((MockServletContext) externalContext.getContext())
-                .getAttributes().size() == 12;
-
-        ServletLifecycle.endSession(((HttpServletRequest) externalContext
-                .getRequest()).getSession());
-
-        ServletLifecycle.endApplication();
-
-    }
-
-    @Test
-    public void testContexts() {
-        MockServletContext servletContext = new MockServletContext();
-        ServletLifecycle.beginApplication(servletContext);
-        MockHttpSession session = new MockHttpSession(servletContext);
-        MockHttpServletRequest request = new MockHttpServletRequest(session);
-        final ExternalContext externalContext = new MockExternalContext(
-                servletContext, request);
-        final Map sessionAdaptor = new ServletRequestSessionMap(request);
-        Map requestAdaptor = new ServletRequestMap(request);
-        Context appContext = new ApplicationContext(externalContext
-                .getApplicationMap());
-        installComponent(appContext, ConversationEntries.class);
-        installComponent(appContext, Manager.class);
-        appContext.set(Seam.getComponentName(Init.class), new Init());
-        FacesLifecycle.beginRequest(externalContext);
-        Manager.instance().setLongRunningConversation(true);
-        testContext(new ApplicationContext(externalContext.getApplicationMap()));
-        testContext(new SessionContext(sessionAdaptor));
-        testContext(new EventContext(requestAdaptor));
-        testContext(new ServerConversationContext(sessionAdaptor, "1"));
-        testEquivalence(new ContextCreator() {
-            public Context createContext() {
-                return new ServerConversationContext(sessionAdaptor, "1");
-            }
-        });
-        testEquivalence(new ContextCreator() {
-            public Context createContext() {
-                return new SessionContext(sessionAdaptor);
-            }
-        });
-        testEquivalence(new ContextCreator() {
-            public Context createContext() {
-                return new ApplicationContext(externalContext.getApplicationMap());
-            }
-        });
-        testIsolation(new ServerConversationContext(sessionAdaptor, "1"),
-                new ServerConversationContext(sessionAdaptor, "2"));
-        // testIsolation( new WebSessionContext(externalContext), new
-        // WebSessionContext( new MockExternalContext()) );
-
-        ServletLifecycle.endApplication();
-    }
-    
-    private interface ContextCreator {
-        Context createContext();
-    }
-
-    private void testEquivalence(ContextCreator creator) {
-       //Creates a new context for each action to better simulate these operations
-       //happening in different call contexts.
-        { //Test Adding
-            Context ctx = creator.createContext();
-            ctx.set("foo", "bar");
-            ctx.flush();
-        }
-        { //Is Added?
-            Context ctx = creator.createContext();
-            assert ctx.get("foo").equals("bar");
-        }
-        { // Test Removing
-            Context ctx = creator.createContext();
-            ctx.remove("foo");
-            ctx.flush();
-        }
-        { // Is Removed?
-            Context ctx = creator.createContext();
-            assert !ctx.isSet("foo");
-        }
-    }
-
-    private void testIsolation(Context ctx, Context cty) {
-        ctx.set("foo", "bar");
-        ctx.flush();
-        assert !cty.isSet("foo");
-        cty.set("foo", "bar");
-        ctx.remove("foo");
-        ctx.flush();
-        assert cty.get("foo").equals("bar");
-    }
-
-    private void testContext(Context ctx) {
-        assert !ctx.isSet("foo");
-        ctx.set("foo", "bar");
-        assert ctx.isSet("foo");
-        assert ctx.get("foo").equals("bar");
-        ctx.remove("foo");
-        assert !ctx.isSet("foo");
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CoreTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CoreTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CoreTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-//$Id: CoreTest.java 6849 2007-11-28 23:37:36Z dallen $
-package org.jboss.seam.test.unit;
-
-import java.util.HashMap;
-
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.init.Initialization;
-import org.jboss.seam.mock.MockServletContext;
-import org.testng.annotations.BeforeSuite;
-
-public class CoreTest
-{
-	/**
-	 * The purpose of this test (any why it wraps the suite) is to trigger
-	 * a component scan to ensure that it can execute without errors. That
-	 * allows the other tests to execute knowing that the environment is sane.
-	 */
-	@BeforeSuite
-	public void triggerComponentScan()
-	{
-      Lifecycle.beginApplication(new HashMap<String, Object>());
-      new Initialization(new MockServletContext()).create().init();
-      Lifecycle.endApplication();
-	}
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CyclicBar.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CyclicBar.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CyclicBar.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Factory;
-
- at Name("cyclicBar")
- at Scope(ScopeType.APPLICATION)
-public class CyclicBar
-{
-
-   @In CyclicFoo cyclicFoo;
-   
-   @Factory(value = "cyclicFooBar", autoCreate = true)
-   public String provideCyclicFooBar() throws Exception
-   {
-      return cyclicFoo.getName() + "bar";
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CyclicFoo.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CyclicFoo.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/CyclicFoo.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,24 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
- at Name("cyclicFoo")
- at Scope(ScopeType.APPLICATION)
-public class CyclicFoo
-{
-   @In String cyclicFooBar; //from CyclicBar#provideCyclicFooBar
-   
-   public String getName() throws Exception
-   {
-      return "foo";
-   }
-   
-   public String getFooBar() throws Exception
-   {
-      return cyclicFooBar;
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/DependencyTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/DependencyTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/DependencyTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,237 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.init.ComponentDescriptor;
-import org.jboss.seam.init.DependencyManager;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-public class DependencyTest {
-    @Test
-    public void testNoComponents() 
-    {
-        Assert.assertEquals(0, installSet().size());
-    }
-    
-    @Test
-    public void testNoDependencies() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        
-        Set<ComponentDescriptor> installed = installSet(desc1);
-        Assert.assertEquals(installed.size(), 1);        
-    }
-    
-    
-    @Test
-    public void testNotInstalled() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        desc1.setInstalled(false);
-
-        Assert.assertEquals(installSet(desc1).size(), 0);        
-    }
-    
-    
-    @Test
-    public void testOverride() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        desc1.setPrecedence(Install.APPLICATION);
-        MockDescriptor desc2 = new MockDescriptor("foo", SomeClass.class);
-        desc2.setPrecedence(Install.DEPLOYMENT);
-        MockDescriptor desc3 = new MockDescriptor("foo", SomeClass.class);
-        desc3.setPrecedence(Install.BUILT_IN);      
-                
-        Set<ComponentDescriptor> installed = installSet(desc1, desc2, desc3);
-        Assert.assertEquals(installed.size(), 1);                
-        Assert.assertEquals(installed.iterator().next().getPrecedence(),Install.DEPLOYMENT);              
-    }
-    
-    
-    @Test
-    public void testOverride2() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        desc1.setDependencies(new String[] {"bar"});
-        MockDescriptor desc2 = new MockDescriptor("bar", SomeClass.class);
-        desc2.setPrecedence(Install.FRAMEWORK);
-        MockDescriptor desc3 = new MockDescriptor("bar", SomeOtherClass.class);
-        desc3.setPrecedence(Install.APPLICATION);
-        desc3.setClassDependencies(new String[] {"SomeClassThatDoesntExist"});
-
-                
-        Set<ComponentDescriptor> installed = installSet(desc1, desc2, desc3);        
-        Assert.assertEquals(installed.size(), 2);                
-        Assert.assertTrue(installed.contains(desc1), "contains desc1");
-        Assert.assertTrue(installed.contains(desc2), "contains desc2");
-              
-    }
-    
-    @Test
-    public void testClassDependency() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        desc1.setClassDependencies(new String[] {"SomeClassThatDoesntExist"});
-                   
-        Set<ComponentDescriptor> installed = installSet(desc1);
-        Assert.assertEquals(installed.size(), 0);      
-        
-        desc1.setClassDependencies(new String[] {"SomeClassThatDoesntExist", SomeClass.class.getName()});       
-        installed = installSet(desc1);
-        Assert.assertEquals(installed.size(), 0);                 
-        
-        desc1.setClassDependencies(new String[] {SomeClass.class.getName()});       
-        installed = installSet(desc1);
-        Assert.assertEquals(installed.size(), 1);      
-    }
-    
-    @Test
-    public void testDependency() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        desc1.setDependencies(new String[] {"bar"});
-        MockDescriptor desc2 = new MockDescriptor("bar", SomeClass.class);
-        desc2.setDependencies(new String[] {"baz"});
-        MockDescriptor desc3 = new MockDescriptor("baz", SomeClass.class);
-        
-        Assert.assertEquals(installSet(desc1).size(), 0);    
-        Assert.assertEquals(installSet(desc1,desc2).size(), 0);  
-        Assert.assertEquals(installSet(desc1,desc2,desc3).size(), 3);           
-    }
-    
-    @Test
-    public void testCircularDependency() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        desc1.setDependencies(new String[] {"bar"});
-        MockDescriptor desc2 = new MockDescriptor("bar", SomeClass.class);
-        desc2.setDependencies(new String[] {"foo"});
-                
-        Assert.assertEquals(installSet(desc1).size(), 0);    
-        Assert.assertEquals(installSet(desc2).size(), 0);  
-        Assert.assertEquals(installSet(desc1,desc2).size(), 2);     
-        
-        // just to make sure
-        desc1.setDependencies(new String[] {"foo"});        
-        Assert.assertEquals(installSet(desc1).size(), 1);  
-    }
-    
-    
-    @Test
-    public void testComponentByClassDependency() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        desc1.setGenericDependencies(new Class[] {SomeOtherClass.class});
-        MockDescriptor desc2 = new MockDescriptor("bar", SomeOtherClass.class);
-                
-        Assert.assertEquals(installSet(desc1).size(), 0);        
-        Assert.assertEquals(installSet(desc2).size(), 1);
-        Assert.assertEquals(installSet(desc1,desc2).size(), 2);           
-    }
-    
-    
-    @Test
-    public void testUnmetDueToOverride() {
-        MockDescriptor desc1 = new MockDescriptor("foo", SomeClass.class);
-        desc1.setGenericDependencies(new Class[] {SomeOtherClass.class});
-        MockDescriptor desc2 = new MockDescriptor("bar", SomeOtherClass.class);
-        desc2.setPrecedence(Install.FRAMEWORK);
-        MockDescriptor desc3 = new MockDescriptor("bar", SomeUnrelatedClass.class);        
-        
-        Set<ComponentDescriptor> installed = installSet(desc1,desc2);
-        Assert.assertEquals(installed.size(), 2);
-                
-        installed = installSet(desc1,desc2,desc3);        
-        Assert.assertEquals(installed.size(), 1);
-        Assert.assertEquals(installed.iterator().next().getName(), "bar");
-        Assert.assertEquals(installed.iterator().next().getPrecedence(), Install.APPLICATION);      
-    }
-    // ------------------------------------------------------
-    
-    
-    private Map<String,Set<ComponentDescriptor>> componentSet(ComponentDescriptor... descriptors) {
-        Map<String,Set<ComponentDescriptor>> map = new HashMap<String, Set<ComponentDescriptor>>();
-        
-        for (ComponentDescriptor descriptor: descriptors) {
-            addDependency(map, descriptor);
-        }
-        return map;        
-    }
-    
-    private Set<ComponentDescriptor> installSet(ComponentDescriptor... descriptors) {
-        DependencyManager manager = new DependencyManager(componentSet(descriptors));
-        return manager.installedSet();
-    }
-    
-    private void addDependency(Map<String,Set<ComponentDescriptor>> dependencies, 
-                               ComponentDescriptor descriptor) 
-    {
-        Set<ComponentDescriptor> descriptors = dependencies.get(descriptor.getName());
-        if (descriptors == null) 
-        {
-            descriptors = new TreeSet<ComponentDescriptor>(new ComponentDescriptor.PrecedenceComparator());
-            dependencies.put(descriptor.getName(), descriptors);
-        }
-         
-        descriptors.add(descriptor);
-    }             
-    
-    static class MockDescriptor
-        extends ComponentDescriptor 
-    {        
-        private String[] classDependencies;
-        private String[] dependencies;
-        private Class[] genericDependencies;
-
-        public MockDescriptor(String name, Class<?> componentClass) {
-            super(name, componentClass, ScopeType.SESSION);        
-        }
-
-        public void setInstalled(boolean installed) {
-            this.installed = installed;
-        }
-        
-        public void setPrecedence(int precedence) {
-            this.precedence = precedence;
-        }
-        
-        public void setClassDependencies(String[] classDependencies) {
-            this.classDependencies = classDependencies;
-        }
-
-        @Override
-        public String[] getClassDependencies() {
-            return (classDependencies != null) ?   
-                   classDependencies : super.getClassDependencies();
-        }
-        
-        public void setDependencies(String[] dependencies) {
-            this.dependencies = dependencies;
-        }
-
-        @Override
-        public String[] getDependencies() {
-            return (dependencies != null) ?   
-                    dependencies : super.getDependencies();
-        }
-
-        public void setGenericDependencies(Class[] genericDependencies) {
-            this.genericDependencies = genericDependencies;
-        }
-        
-        @Override
-        public Class[] getGenericDependencies() {
-            return (genericDependencies != null) ?
-                    genericDependencies : super.getGenericDependencies();
-        }       
-    }
-    
-    
-    static class SomeClass {
-    }    
-    
-    static class SomeOtherClass {
-    }    
-    
-    static class SomeUnrelatedClass {        
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Ejb.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Ejb.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Ejb.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,11 +0,0 @@
-//$Id: Ejb.java 6435 2007-10-08 18:15:49Z pmuir $
-package org.jboss.seam.test.unit;
-
-import javax.ejb.Local;
-
- at Local
-public interface Ejb
-{
-   public void foo();
-   public void destroy();
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/EjbBean.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/EjbBean.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/EjbBean.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-//$Id: EjbBean.java 6435 2007-10-08 18:15:49Z pmuir $
-package org.jboss.seam.test.unit;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Destroy;
-import org.jboss.seam.annotations.JndiName;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
- at Stateful
- at Name("ejb")
- at Scope(ScopeType.EVENT)
- at JndiName("x")
-public class EjbBean implements Ejb
-{
-   public void foo() {}
-   @Remove @Destroy
-   public void destroy() {}
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ExpressionsTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ExpressionsTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/ExpressionsTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,132 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import static org.testng.Assert.assertEquals;
-
-import java.beans.FeatureDescriptor;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.el.ELContext;
-import javax.el.ELResolver;
-import javax.el.PropertyNotFoundException;
-import javax.faces.application.Application;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseId;
-
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.faces.FacesExpressions;
-import org.jboss.seam.mock.MockApplication;
-import org.jboss.seam.mock.MockExternalContext;
-import org.jboss.seam.mock.MockFacesContext;
-import org.jboss.seam.mock.MockHttpServletRequest;
-import org.jboss.seam.mock.MockHttpSession;
-import org.testng.annotations.Test;
-
-public class ExpressionsTest
-{
-   /**
-    * Validate that FacesExpressions reports that the FacesContext is activate and
-    * returns the Faces-aware EL context so that a Faces-specific expression can
-    * be resolved through Seam's built-in expression resolver.
-    * @jira JBSEAM-3674
-    */
-   @Test
-   public void testExpressionResolvedInFacesELContext()
-   {
-      Map<String, String> params = new HashMap<String, String>();
-      params.put("foo", "bar");
-      FacesContext facesContext = setupFacesContextToAccessRequestParams(params);
-      String expr = "#{param.foo}";
-      
-      // the control
-      assertEquals(facesContext.getApplication().evaluateExpressionGet(facesContext, expr, Object.class), "bar");
-      
-      // the test
-      FacesLifecycle.setPhaseId(PhaseId.INVOKE_APPLICATION);
-      Expressions expressions = new FacesExpressions();
-      assert expressions.getELContext().getContext(FacesContext.class) != null;
-      assertEquals(expressions.createValueExpression(expr).getValue(), "bar");
-   }
-   
-   protected FacesContext setupFacesContextToAccessRequestParams(Map<String, String> params)
-   {
-      MockHttpServletRequest request = new MockHttpServletRequest(new MockHttpSession());
-      if (params != null)
-      {
-         for (Map.Entry<String, String> param : params.entrySet())
-         {
-            request.getParameterMap().put(param.getKey(), new String[] { param.getValue() });
-         }
-      }
-      ExternalContext extContext = new MockExternalContext(request);
-      Application application = new MockApplication();
-      application.addELResolver(new ImplicitObjectELResolver());
-      FacesContext facesCtx = new MockFacesContext(extContext, application).setCurrent();
-      assert FacesContext.getCurrentInstance() != null;
-      return facesCtx;
-   }
-   
-   /**
-    * This resolver resolves select implicit objects that are available to the EL during a Faces request.
-    * It must be implemented here since it is part of the JSF RI, not the API.
-    */
-   class ImplicitObjectELResolver extends ELResolver
-   {
-      private final String PARAM = "param";
-      
-      private final String[] IMPLICIT_OBJECT_NAMES = new String[] { PARAM };
-      
-      @Override
-      public Class<?> getCommonPropertyType(ELContext ctx, Object base)
-      {
-         return null;
-      }
-
-      @Override
-      public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext ctx, Object base)
-      {
-         return null;
-      }
-
-      @Override
-      public Class<?> getType(ELContext ctx, Object base, Object prop)
-      {
-         return null;
-      }
-
-      @Override
-      public Object getValue(ELContext elCtx, Object base, Object prop)
-      {
-         if (base != null) return null;
-         
-         if (prop == null) throw new PropertyNotFoundException("No such property " + prop);
-
-         int idx = Arrays.binarySearch(IMPLICIT_OBJECT_NAMES, prop);
-         if (idx < 0) return null;
-         
-         FacesContext facesCtx = (FacesContext) elCtx.getContext(FacesContext.class);
-         ExternalContext extCtx = facesCtx.getExternalContext();
-         
-         if (prop.equals(PARAM))
-         {
-            elCtx.setPropertyResolved(true);
-            return extCtx.getRequestParameterMap();
-         }
-
-         throw new IllegalStateException("Programming error: list of possible conditions is incomplete");
-      }
-
-      @Override
-      public boolean isReadOnly(ELContext ctx, Object base, Object prop)
-      {
-         return true;
-      }
-
-      @Override
-      public void setValue(ELContext ctx, Object base, Object prop, Object value) {}
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Factory.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Factory.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Factory.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,18 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
-
- at Name("factory")
-public class Factory 
-{
-   @Out(scope=ScopeType.CONVERSATION, required=true) 
-   String name;
-   
-   @org.jboss.seam.annotations.Factory("name")
-   public void createName()
-   {
-      name="Gavin King";
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Foo.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Foo.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Foo.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,104 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.test.unit;
-
-import java.io.Serializable;
-
-import javax.ejb.Remove;
-import javax.validation.constraints.NotNull;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
-/**
- * @author <a href="mailto:theute at jboss.org">Thomas Heute </a>
- * @version $Revision: 8990 $
- */
- at Name("foo")
- at Scope(ScopeType.SESSION)
-public class Foo implements Serializable
-{
-   private static final long serialVersionUID = -5448030633067107049L;
-   
-   private String value;
-   
-   public String foo() { return "foo"; }
-
-   @Remove
-   public void destroy() {}
-
-   @NotNull
-   public String getValue()
-   {
-      return value;
-   }
-
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-   
-   public String bar()
-   {
-      return "bar";
-   }
-   
-   @Begin
-   public String begin()
-   {
-      return "begun";
-   }
-   @End
-   public String end()
-   {
-      return "ended";
-   }
-   
-   @Begin
-   public String beginNull()
-   {
-      return null;
-   }
-   @End
-   public String endNull()
-   {
-      return null;
-   }
-   
-   @Begin(nested=true)
-   public String beginNested()
-   {
-      return "begunNested";
-   }
-   @End(root=true)
-   public String endRoot()
-   {
-      return "endedRoot";
-   }
-   
-   @Begin
-   public void beginVoid() { }
-   @End
-   public void endVoid() { }
-   
-   @Begin(ifOutcome="success")
-   public String beginIf()
-   {
-      return "success";
-   }
-   @End(ifOutcome="success")
-   public String endIf()
-   {
-      return "success";
-   }
-   
-}
-
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/FooBar.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/FooBar.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/FooBar.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
- at Name("fooBar")
- at Scope(ScopeType.APPLICATION)
-public class FooBar
-{
-   @In Foo foo;
-   
-   public Foo delayedGetFoo(InvocationControl invocationControl)
-   {
-      //System.out.println("enter: " + invocationControl.getName() + " " + foo);
-      invocationControl.init();
-      invocationControl.markStarted();
-      //System.out.println("exit: " + invocationControl.getName() + " " + foo);
-      return foo;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/HomeTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/HomeTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/HomeTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,180 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.lang.reflect.Field;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.framework.EntityHome;
-import org.jboss.seam.framework.HibernateEntityHome;
-import org.jboss.seam.framework.Home;
-import org.jboss.seam.international.StatusMessage;
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.test.unit.entity.SimpleEntity;
-import org.jboss.seam.util.Reflections;
-import org.testng.annotations.Test;
-
-public class HomeTest
-{
-   /**
-    * The only condition under which the getEntityClass() should be able to
-    * resolve the entity correctly is if the entityClass is provided or the Home
-    * implementation extends either EntityHome or HibernateEntityHome and
-    * provides a type parameter in the class definition
-    */
-   @Test
-   public void testReadEntityClassFromTypeParameter()
-   {
-      EntityHome typelessHome = new EntityHome();
-      typelessHome.setEntityClass(SimpleEntity.class);
-      assert typelessHome.getEntityClass() == SimpleEntity.class;
-      
-      assert new SimpleEntityHomeWithType().getEntityClass() == SimpleEntity.class;
-
-      try
-      {
-         Class ec = new SimpleEntityHomeSansType().getEntityClass();
-         assert false : "Not expecting to have resolved a type, but got " + ec;
-      }
-      catch (IllegalArgumentException e)
-      {
-      }
-
-      try
-      {
-         Class ec = new EntityHome<SimpleEntity>().getEntityClass();
-         assert false : "Not expecting to have resolved a type, but got " + ec;
-      }
-      catch (IllegalArgumentException e)
-      {
-      }
-
-      assert new SimpleHibernateEntityHomeWithType().getEntityClass() == SimpleEntity.class;
-
-      try
-      {
-         Class ec = new SimpleHibernateEntityHomeSansType().getEntityClass();
-         assert false : "Not expecting to have resolved a type, but got " + ec;
-      }
-      catch (IllegalArgumentException e)
-      {
-      }
-
-      try
-      {
-         Class ec = new HibernateEntityHome<SimpleEntity>().getEntityClass();
-         assert false : "Not expecting to have resolved a type, but got " + ec;
-      }
-      catch (IllegalArgumentException e)
-      {
-      }
-
-      assert new Home<EntityManager, SimpleEntity>()
-      {
-
-         @Override
-         protected String getEntityName()
-         {
-            return "SimpleEntity";
-         }
-
-         @Override
-         protected String getPersistenceContextName()
-         {
-            return "entityManager";
-         }
-
-      }.getEntityClass() == SimpleEntity.class;
-   }
-   
-   /**
-    * Ensure that the add message methods do not trigger a null pointer
-    * exception if the getEntityClass() method is overridden.
-    */
-   @Test
-   public void testGetEntityClassOverride() {
-      SimpleEntityHomeWithMessageStubs home = new SimpleEntityHomeWithMessageStubs();
-      // emulate @Create method
-      home.create();
-      home.triggerCreatedMessage();
-      List<StatusMessage> registeredMessages = home.getRegisteredMessages();
-      assert registeredMessages.size() == 1;
-   }
-   
-   /**
-    * Ensure that an instance can be created when getEntityClass()
-    * method is overridden.
-    */
-   @Test
-   public void testCreateInstance() {
-      SimpleEntityHomeWithMessageStubs home = new SimpleEntityHomeWithMessageStubs();
-      // emulate @Create method
-      home.create();
-      SimpleEntity entity = home.getInstance();
-      assert entity != null : "Excepting a non-null instance";
-      assert entity.getClass().equals(SimpleEntity.class) : "Expecting entity class to be " + SimpleEntity.class + " but got " + entity.getClass();
-   }
-   
-   public class SimpleEntityHomeSansType extends EntityHome {}
-   
-   public class SimpleEntityHomeWithType extends EntityHome<SimpleEntity> {}
-   
-   public class SimpleHibernateEntityHomeSansType extends HibernateEntityHome {}
-   
-   public class SimpleHibernateEntityHomeWithType extends HibernateEntityHome<SimpleEntity> {}
-   
-   public class SimpleEntityHomeWithMessageStubs extends Home<EntityManager, SimpleEntity> {
-
-      private StatusMessages statusMessages;
-
-      public SimpleEntityHomeWithMessageStubs() {
-         statusMessages = new FacesMessages();
-      }
-      
-      public void triggerCreatedMessage() {
-         createdMessage();
-      }
-      
-      @Override
-      protected void debug(Object object, Object... params)
-      {
-         // ignore
-      }
-      
-      @Override
-      protected StatusMessages getStatusMessages()
-      {
-         return statusMessages;
-      }
-      
-      protected List<StatusMessage> getRegisteredMessages()
-      {
-         Field field = Reflections.getField(statusMessages.getClass(), "messages");
-         if (!field.isAccessible())
-         {
-            field.setAccessible(true);
-         }
-         return (List<StatusMessage>) Reflections.getAndWrap(field, statusMessages);
-      }
-
-      @Override
-      public Class<SimpleEntity> getEntityClass()
-      {
-         return SimpleEntity.class;
-      }
-
-      @Override
-      protected String getEntityName()
-      {
-         return "SimpleEntity";
-      }
-
-      @Override
-      protected String getPersistenceContextName()
-      {
-         return "entityManager";
-      }
-      
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InitializationTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InitializationTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InitializationTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,76 +0,0 @@
-//$Id: InitializationTest.java 9122 2008-09-23 15:47:57Z dan.j.allen $
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.init.Initialization;
-import org.jboss.seam.mock.MockServletContext;
-import org.jboss.seam.test.unit.component.ConfigurableComponent;
-import org.jboss.seam.test.unit.component.MyEntityHome;
-import org.jboss.seam.test.unit.component.PrimaryColor;
-import org.jboss.seam.transaction.NoTransaction;
-import org.jboss.seam.transaction.Transaction;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-public class InitializationTest
-{
-   @Test
-   public void testInitialization()
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      new Initialization(servletContext).create().init();
-
-      assert !servletContext.getAttributes().isEmpty();
-      assert servletContext.getAttributes().containsKey( Seam.getComponentName(Manager.class) + ".component" );
-      assert servletContext.getAttributes().containsKey( Seam.getComponentName(Foo.class) + ".component" );
-      assert !Contexts.isApplicationContextActive();
-      ServletLifecycle.endApplication();
-   }
-
-   /**
-    * Configuration for ConfigurableComponent is defined in ConfigurableComponent.component.xml
-    */
-   @Test
-   public void testEnumPropertyAssignment()
-   {
-       MockServletContext servletContext = new MockServletContext();
-       ServletLifecycle.beginApplication(servletContext);
-       new Initialization( servletContext ).create().init();
-
-       Lifecycle.beginCall();
-
-       ConfigurableComponent component = (ConfigurableComponent) Component.getInstance(ConfigurableComponent.class);
-       assert component != null;
-       assert component.getPrimaryColor().equals(PrimaryColor.RED);
-
-       ServletLifecycle.endApplication();
-   }
-   
-   @Test
-   public void testEntityHomeConfiguration()
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      new Initialization( servletContext ).create().init();
-      Lifecycle.beginCall();
-      Contexts.getEventContext().set(Seam.getComponentName(Transaction.class), new NoTransaction());
-      MyEntityHome myEntityHome = (MyEntityHome) Component.getInstance("myEntityHome");
-      assert myEntityHome != null;
-      // verify that the reference to new-instance remains unparsed
-      Assert.assertEquals(myEntityHome.getNewInstance().getExpressionString(), "#{simpleEntity}");
-      // verify that the message string for the created/updated/deleted message remains unparsed
-      Assert.assertEquals(myEntityHome.getCreatedMessage().getExpressionString(), "You #{'created'} it! Yeah!");
-      // verify that the id is parsed prior to assignment
-      Assert.assertEquals(String.valueOf(myEntityHome.getId()), "11");
-      
-      ServletLifecycle.endApplication();
-   }
-   //TODO: write a test for components.xml
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InterceptorTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InterceptorTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InterceptorTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,1113 +0,0 @@
-//$Id: InterceptorTest.java 9561 2008-11-14 03:26:13Z dan.j.allen $
-package org.jboss.seam.test.unit;
-
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.event.PhaseId;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.CyclicDependencyException;
-import org.jboss.seam.NoConversationException;
-import org.jboss.seam.RequiredException;
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.ApplicationContext;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.core.BijectionInterceptor;
-import org.jboss.seam.core.ConversationEntries;
-import org.jboss.seam.core.ConversationInterceptor;
-import org.jboss.seam.core.ConversationalInterceptor;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.ejb.RemoveInterceptor;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.mock.MockApplication;
-import org.jboss.seam.mock.MockExternalContext;
-import org.jboss.seam.mock.MockFacesContext;
-import org.jboss.seam.mock.MockServletContext;
-import org.jboss.seam.persistence.PersistenceContexts;
-import org.jboss.seam.util.Reflections;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-public class InterceptorTest
-{
-   
-   @Test
-   public void testBijectionInterceptor() throws Exception
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      MockExternalContext externalContext = new MockExternalContext(servletContext);
-      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
-      appContext.set( Seam.getComponentName(Init.class), new Init() );
-      appContext.set( 
-            Seam.getComponentName(ConversationEntries.class) + ".component", 
-            new Component(ConversationEntries.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(Manager.class) + ".component", 
-            new Component(Manager.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(Foo.class) + ".component", 
-            new Component(Foo.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(Factory.class) + ".component", 
-            new Component(Factory.class, appContext) 
-         );
-
-      FacesLifecycle.beginRequest(externalContext);
-      Manager.instance().setCurrentConversationId("1");
-      FacesLifecycle.resumeConversation(externalContext);
-      FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
-      
-      final Bar bar = new Bar();
-      final Foo foo = new Foo();
-      Contexts.getSessionContext().set("otherFoo", foo);
-      
-      BijectionInterceptor bi = new BijectionInterceptor();
-      bi.setComponent( new Component(Bar.class, appContext) );
-      String result = (String) bi.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Object getTarget()
-         {
-            return bar;
-         }
-
-         @Override
-         public Object proceed() throws Exception
-         {
-            assert bar.otherFoo==foo;
-            assert bar.foo!=null;
-            return bar.foo();
-         }
-      });
-      assert "foo".equals(result);
-      assert Contexts.getEventContext().get("otherString").equals("outAgain");
-      assert Contexts.getConversationContext().get("string").equals("out");
-      assert Contexts.getSessionContext().isSet("foo");
-      assert bar.foo==null;
-      assert bar.otherFoo==null;
-      
-      final Method method;
-      try
-      {
-         method = Bar.class.getMethod("foo");
-      }
-      catch (Exception e) 
-      {
-         throw new RuntimeException(e);
-      }
-
-      bi.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Object getTarget()
-         {
-            return bar;
-         }
-
-         @Override
-         public Object proceed() throws Exception
-         {
-            assert bar.otherFoo==foo;
-            assert bar.foo!=null;
-            return bar.foo();
-         }
-         @Override
-         public Method getMethod()
-         {
-            return method;
-         }
-      });
-      assert bar.foo==null;
-      assert bar.otherFoo==null;
-      
-      try 
-      {
-         Contexts.getSessionContext().remove("otherFoo");
-         bi.aroundInvoke( new MockInvocationContext() {
-            @Override
-            public Object getTarget()
-            {
-               return bar;
-            }
-            @Override
-            public Object proceed() throws Exception
-            {
-               assert false;
-               return null;
-            }
-            @Override
-            public Method getMethod()
-            {
-               return method;
-            }
-         });
-         assert false;
-      }
-      catch (Exception e)
-      {
-         assert e instanceof RequiredException;
-      }
-      
-      final Method method2;
-      try
-      {
-         method2 = BrokenAction.class.getMethod("go");
-      }
-      catch (Exception e) 
-      {
-         throw new RuntimeException(e);
-      }
-
-      final BrokenAction brokenAction = new BrokenAction();
-      BijectionInterceptor biba = new BijectionInterceptor();
-      biba.setComponent( new Component(BrokenAction.class, appContext) );
-      try
-      {
-         biba.aroundInvoke( new MockInvocationContext() {
-   
-            @Override
-            public Object getTarget() {
-               return brokenAction;
-            }   
-            @Override
-            public Object proceed() throws Exception {
-               assert false;
-               return null;
-            }
-            
-            @Override
-            public Method getMethod()
-            {
-               return method2;
-            }
-          
-         } );
-         assert false;
-      }
-      catch (Exception e)
-      {
-         assert e instanceof RequiredException;
-      }
-      
-      final Method method3;
-      try
-      {
-         method3 = Action.class.getMethod("go");
-      }
-      catch (Exception e) 
-      {
-         throw new RuntimeException(e);
-      }
-
-      final Action action = new Action();
-      BijectionInterceptor bia = new BijectionInterceptor();
-      bia.setComponent( new Component(Action.class, appContext) );
-      result = (String) bia.aroundInvoke( new MockInvocationContext() {
-
-         @Override
-         public Object getTarget() {
-            return action;
-         }
-
-         @Override
-         public Object proceed() throws Exception {
-            assert "Gavin King".equals(action.name);
-            return action.go();
-         }
-         
-         @Override
-         public Method getMethod()
-         {
-            return method3;
-         }
-       
-      } );
-      assert "success".equals(result);
-      assert Contexts.getConversationContext().get("name").equals("Gavin King");
-
-      ServletLifecycle.endApplication();
-   }
-   
-   /**
-    * A hack for returning an exception from a thread
-    *
-    */
-   private class WrappedException {
-      Exception exception;
-   }
-   
-   /**
-    * This test uses two threads to concurrently invoke the same method on the same component. It uses
-    * latches to control the progress of each thread to ensure that the bijection interceptor is 
-    * correctly injecting/disinjecting the component at the right times.
-    * 
-    * @throws Exception
-    */
-   @Test
-   public void testReentrantBijection() throws Exception
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      final MockExternalContext externalContext = new MockExternalContext(servletContext);
-      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
-      appContext.set( Seam.getComponentName(Init.class), new Init() );
-      appContext.set( Seam.getComponentName(ConversationEntries.class) + ".component", 
-            new Component(ConversationEntries.class, appContext) );
-      appContext.set( Seam.getComponentName(Manager.class) + ".component", 
-            new Component(Manager.class, appContext) );
-      appContext.set( Seam.getComponentName(Foo.class) + ".component", 
-            new Component(Foo.class, appContext) );
-      appContext.set( Seam.getComponentName(FooBar.class) + ".component", 
-            new Component(FooBar.class, appContext) );           
-      
-      final Foo foo = new Foo();
-      final FooBar fooBar = new FooBar();
-      
-      final BijectionInterceptor bi = new BijectionInterceptor();
-      bi.setComponent( new Component(FooBar.class, appContext) );
-      
-      final Method m = FooBar.class.getMethod("delayedGetFoo", InvocationControl.class);
-      
-      final InvocationControl invocationAControl = new InvocationControl("A");
-      final InvocationControl invocationBControl = new InvocationControl("B");
-      final InvocationControl invocationCControl = new InvocationControl("C");
-      
-      final Map<String, Foo> invocationResults = new HashMap<String, Foo>();
-      
-      final InvocationContext invocationA = new MockInvocationContext() {
-         @Override public Object getTarget() { return fooBar; }         
-         @Override public Method getMethod() { return m; }
-         @Override public Object[] getParameters() { return new Object[] { invocationAControl }; }
-         @Override public Object proceed() throws Exception { return Reflections.invoke(getMethod(), getTarget(), getParameters()); }
-      };
-
-      final InvocationContext invocationB = new MockInvocationContext() {
-         @Override public Object getTarget() { return fooBar; }         
-         @Override public Method getMethod() { return m; }
-         @Override public Object[] getParameters() { return new Object[] { invocationBControl }; }
-         @Override public Object proceed() throws Exception { return Reflections.invoke(getMethod(), getTarget(), getParameters()); }
-      };
-      
-      final InvocationContext invocationC = new MockInvocationContext() {
-         @Override public Object getTarget() { return fooBar; }         
-         @Override public Method getMethod() { return m; }
-         @Override public Object[] getParameters() { return new Object[] { invocationCControl }; }
-         @Override public Object proceed() throws Exception { return Reflections.invoke(getMethod(), getTarget(), getParameters()); }
-      };
-      
-      final WrappedException thread1Exception = new WrappedException();
-      final WrappedException thread2Exception = new WrappedException();
-      final WrappedException thread3Exception = new WrappedException();
-                  
-      new Thread(new Runnable() {
-         public void run() {
-            try
-            {
-               FacesLifecycle.beginRequest(externalContext);
-               Manager.instance().setCurrentConversationId("1");
-               FacesLifecycle.resumeConversation(externalContext);
-               FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
-
-               Contexts.getSessionContext().set("foo", foo);
-               Foo result = (Foo) bi.aroundInvoke( invocationA );
-               invocationResults.put("A", result);
-            }
-            catch (Exception ex) 
-            { 
-               thread1Exception.exception = ex;
-            }
-            finally
-            {
-               invocationAControl.markFinished();
-            }
-         }     
-      }).start();    
-      
-      new Thread(new Runnable() {
-         public void run() {
-            try
-            {
-               FacesLifecycle.beginRequest(externalContext);
-               Manager.instance().setCurrentConversationId("1");
-               FacesLifecycle.resumeConversation(externalContext);
-               FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
-               
-               Contexts.getSessionContext().set("foo", foo);               
-               
-               Foo result = (Foo) bi.aroundInvoke( invocationB );
-               invocationResults.put("B", result);
-            }
-            catch (Exception ex) 
-            { 
-               thread2Exception.exception = ex;
-            }
-            finally
-            {
-               invocationBControl.markFinished();
-            }
-         }     
-      }).start();
-      
-      new Thread(new Runnable() {
-         public void run() {
-            try
-            {
-               FacesLifecycle.beginRequest(externalContext);
-               Manager.instance().setCurrentConversationId("1");
-               FacesLifecycle.resumeConversation(externalContext);
-               FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
-               
-               Contexts.getSessionContext().set("foo", foo);               
-               
-               Foo result = (Foo) bi.aroundInvoke( invocationC );
-               invocationResults.put("C", result);
-            }
-            catch (Exception ex) 
-            { 
-               thread3Exception.exception = ex;
-            }
-            finally
-            {
-               invocationCControl.markFinished();
-            }
-         }     
-      }).start();
-      
-      invocationAControl.start();
-      invocationBControl.start();
-      invocationCControl.start();
-      
-      invocationAControl.finish();
-      invocationBControl.finish();
-      invocationCControl.finish();
-      
-      if (thread1Exception.exception != null) throw thread1Exception.exception;
-      if (thread2Exception.exception != null) throw thread2Exception.exception;
-      if (thread3Exception.exception != null) throw thread3Exception.exception;
-
-      Assert.assertEquals(invocationResults.get("A"), foo, "Injected value not accurate at end of method invocation A.");
-      Assert.assertEquals(invocationResults.get("B"), foo, "Injected value not accurate at end of method invocation B.");
-      Assert.assertEquals(invocationResults.get("C"), foo, "Injected value not accurate at end of method invocation C.");
-   }
-   
-   @Test
-   public void testCyclicDependencyThowsException() throws Exception
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      MockExternalContext externalContext = new MockExternalContext(servletContext);
-      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
-      appContext.set( Seam.getComponentName(Init.class), new Init() );
-      appContext.set( 
-            Seam.getComponentName(ConversationEntries.class) + ".component", 
-            new Component(ConversationEntries.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(Manager.class) + ".component", 
-            new Component(Manager.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(CyclicFoo.class) + ".component", 
-            new Component(CyclicFoo.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(CyclicBar.class) + ".component", 
-            new Component(CyclicBar.class, appContext) 
-      );
-
-      FacesLifecycle.beginRequest(externalContext);
-      Manager.instance().setCurrentConversationId("1");
-      FacesLifecycle.resumeConversation(externalContext);
-      FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
-      
-      final CyclicFoo cyclicFoo = new CyclicFoo();
-      final CyclicBar cyclicBar = new CyclicBar();
-      
-      final BijectionInterceptor cyclicFooBijectionInterceptor = new BijectionInterceptor();
-      cyclicFooBijectionInterceptor.setComponent( new Component(CyclicFoo.class, appContext) );
-      final Method cyclicFooGetName = CyclicFoo.class.getMethod("getName");
-      final MockInvocationContext callGetName = new MockInvocationContext() {
-         @Override
-         public Object getTarget()
-         {
-            return cyclicFoo;
-         }
-
-         @Override
-         public Object proceed() throws Exception
-         {
-            return cyclicFoo.getName();
-         }
-         
-         @Override
-         public Method getMethod()
-         {
-            return cyclicFooGetName;
-         }
-      };
-      
-      final Method cyclicFooGetFooBar = CyclicFoo.class.getMethod("getFooBar");
-      final MockInvocationContext callGetCyclicFooBar = new MockInvocationContext() {
-         @Override
-         public Object getTarget()
-         {
-            return cyclicFoo;
-         }
-         
-         @Override
-         public Object proceed() throws Exception
-         {
-            return cyclicFoo.getFooBar();
-         }
-         
-         @Override
-         public Method getMethod()
-         {
-            return cyclicFooGetFooBar;
-         }
-      };
-      
-      CyclicFoo cyclicFooProxy = new CyclicFoo()
-      {
-         @Override
-         public String getName() throws Exception
-         {
-            return (String) cyclicFooBijectionInterceptor.aroundInvoke(callGetName);
-         }
-         
-         @Override
-         public String getFooBar() throws Exception
-         {
-            return (String) cyclicFooBijectionInterceptor.aroundInvoke(callGetCyclicFooBar);
-         }
-      };
-      
-      
-      final BijectionInterceptor cyclicBarBijectionInterceptor = new BijectionInterceptor();
-      cyclicBarBijectionInterceptor.setComponent( new Component(CyclicBar.class, appContext) );
-      final Method cyclicBarProvideCyclicFooBar = CyclicBar.class.getMethod("provideCyclicFooBar");
-      final MockInvocationContext callProvideCyclicFooBar = new MockInvocationContext() {
-         @Override
-         public Object getTarget()
-         {
-            return cyclicBar;
-         }
-
-         @Override
-         public Object proceed() throws Exception
-         {
-            return cyclicBar.provideCyclicFooBar();
-         }
-         
-         @Override
-         public Method getMethod()
-         {
-            return cyclicBarProvideCyclicFooBar;
-         }
-      };
-      
-      final CyclicBar cyclicBarProxy = new CyclicBarProxy(callProvideCyclicFooBar, cyclicBarBijectionInterceptor);
-      
-      
-      appContext.set("cyclicFoo", cyclicFooProxy);
-      appContext.set("cyclicBar", cyclicBarProxy);
-      
-      try
-      {
-         cyclicFooProxy.getFooBar();
-         assert false : "cyclic dependency not detected";
-      }
-      catch (CyclicDependencyException e) {}
-      
-   }
-
-   /*
-    * Needs to be non-anonymous, so that provideCyclicFooBar() can be accessed reflectively
-    */
-   public class CyclicBarProxy extends CyclicBar
-   {
-      private final MockInvocationContext callProvideCyclicFooBar;
-      private final BijectionInterceptor cyclicBarBijectionInterceptor;
-
-      private CyclicBarProxy(MockInvocationContext callProvideCyclicFooBar, BijectionInterceptor cyclicBarBijectionInterceptor)
-      {
-         this.callProvideCyclicFooBar = callProvideCyclicFooBar;
-         this.cyclicBarBijectionInterceptor = cyclicBarBijectionInterceptor;
-      }
-
-      @Override
-      public String provideCyclicFooBar() throws Exception
-      {
-         return (String) cyclicBarBijectionInterceptor.aroundInvoke(callProvideCyclicFooBar);
-      }
-   }
-
-   @Test
-   public void testConversationInterceptor() throws Exception
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      MockExternalContext externalContext = new MockExternalContext(servletContext);
-      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
-      appContext.set( Seam.getComponentName(Init.class), new Init() );
-      appContext.set( 
-            Seam.getComponentName(ConversationEntries.class) + ".component", 
-            new Component(ConversationEntries.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(PersistenceContexts.class) + ".component", 
-            new Component(PersistenceContexts.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(Manager.class) + ".component", 
-            new Component(Manager.class, appContext) 
-         );
-      FacesLifecycle.beginRequest( externalContext );
-      Manager.instance().setCurrentConversationId("1");
-      FacesLifecycle.resumeConversation(externalContext);
-
-      ConversationInterceptor ci = new ConversationInterceptor();
-      ci.setComponent( new Component(Foo.class, appContext) );
-      
-      assert !Manager.instance().isLongRunningConversation();
-
-      String result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("foo");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "foo";
-         }
-      });
-      
-      assert !Manager.instance().isLongRunningConversation();
-      assert "foo".equals(result);
-      
-      Manager.instance().initializeTemporaryConversation();
-      
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("begin");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "begun";
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert "begun".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("foo");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "foo";
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert "foo".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("end");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "ended";
-         }
-      });
-      
-      assert !Manager.instance().isLongRunningConversation();
-      assert "ended".equals(result);
-      
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("beginNull");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return null;
-         }
-      });
-      
-      assert !Manager.instance().isLongRunningConversation();
-      assert result==null;
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("beginVoid");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return null;
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert result==null;
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("foo");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "foo";
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert "foo".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("endNull");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return null;
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert result==null;
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("endVoid");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return null;
-         }
-      });
-      
-      assert !Manager.instance().isLongRunningConversation();
-      assert result==null;
-      
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("beginIf");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "failure";
-         }
-      });
-      
-      assert !Manager.instance().isLongRunningConversation();
-      assert "failure".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("beginIf");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "success";
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert "success".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("foo");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "foo";
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert "foo".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("endIf");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "failure";
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert "failure".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("endIf");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "success";
-         }
-      });
-      
-      assert !Manager.instance().isLongRunningConversation();
-      assert "success".equals(result);
-      
-      ///////////////////////////////////////////////
-      // Test @End(root=true) for nested conversation
-      ///////////////////////////////////////////////
-      
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("begin");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "begun";
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert "begun".equals(result);
-      
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("beginNested");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "begunNested";
-         }
-      });
-      
-      assert Manager.instance().isNestedConversation();
-      assert "begunNested".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("endRoot");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "endedRoot";
-         }
-      });
-
-      assert !Manager.instance().isNestedConversation();
-      assert !Manager.instance().isLongRunningConversation();
-      assert "endedRoot".equals(result);
-
-      /////////////////////////////////////////////////////
-      // Test @End(root=true) for a non-nested conversation
-      /////////////////////////////////////////////////////
-      
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("begin");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "begun";
-         }
-      });
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert "begun".equals(result);
-      
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("endRoot");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "endedRoot";
-         }
-      });
-
-      assert !Manager.instance().isNestedConversation();
-      assert !Manager.instance().isLongRunningConversation();
-      assert "endedRoot".equals(result);
-   }
-   
-   @Test
-   public void testConversationalInterceptor() throws Exception
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      MockExternalContext externalContext = new MockExternalContext(servletContext);
-      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
-      appContext.set( Seam.getComponentName(Init.class), new Init() );
-      appContext.set( 
-            Seam.getComponentName(ConversationEntries.class) + ".component", 
-            new Component(ConversationEntries.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(Manager.class) + ".component", 
-            new Component(Manager.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(FacesMessages.class) + ".component", 
-            new Component(FacesMessages.class, appContext) 
-         );
-      appContext.set( 
-               Seam.getComponentName(Events.class) + ".component", 
-               new Component(Events.class, appContext) 
-            );
-      FacesLifecycle.setPhaseId(PhaseId.INVOKE_APPLICATION);
-      FacesLifecycle.beginRequest( externalContext );
-      Manager.instance().setCurrentConversationId("1");
-      FacesLifecycle.resumeConversation(externalContext);
-      
-      ConversationalInterceptor ci = new ConversationalInterceptor();
-      ci.setComponent( new Component(Bar.class, appContext) );
-      
-      assert !Manager.instance().isLongRunningConversation();
-      
-      try
-      {
-
-         ci.aroundInvoke( new MockInvocationContext() {
-            @Override
-            public Method getMethod()
-            {
-               return InterceptorTest.getMethod("foo");
-            }
-            @Override
-            public Object proceed() throws Exception
-            {
-               assert false;
-               return null;
-            }
-         });
-         
-         assert false;
-         
-      }
-      catch (Exception e)
-      {
-         assert e instanceof NoConversationException;
-      }
-      
-      assert !Manager.instance().isLongRunningConversation();
-      
-      String result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("begin");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "begun";
-         }
-      });
-      
-      Manager.instance().initializeTemporaryConversation();
-      Manager.instance().beginConversation();
-      
-      //assert Manager.instance().isLongRunningConversation();
-      assert "begun".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("foo");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "foo";
-         }
-      });
-      
-      //assert Manager.instance().isLongRunningConversation();
-      assert "foo".equals(result);
-
-      result = (String) ci.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("end");
-         }
-         @Override
-         public Object proceed() throws Exception
-         {
-            return "ended";
-         }
-      });
-      
-      Manager.instance().endConversation(false);
-      
-      //assert !Manager.instance().isLongRunningConversation();
-      assert "ended".equals(result);
-      
-      ServletLifecycle.endApplication();
-      
-   }
-   
-   @Test
-   public void testValidationInterceptor() throws Exception
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      ExternalContext externalContext = new MockExternalContext(servletContext);
-      new MockFacesContext( externalContext, new MockApplication() ).setCurrent().createViewRoot();
-      
-      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
-      appContext.set( Seam.getComponentName(Init.class), new Init() );
-      appContext.set( 
-            Seam.getComponentName(ConversationEntries.class) + ".component", 
-            new Component(ConversationEntries.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(Manager.class) + ".component", 
-            new Component(Manager.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(FacesMessages.class) + ".component", 
-            new Component(FacesMessages.class, appContext) 
-         );
-      appContext.set(
-            Seam.getComponentName(Interpolator.class) + ".component", 
-            new Component(Interpolator.class, appContext)
-         );
-      FacesLifecycle.setPhaseId(PhaseId.INVOKE_APPLICATION);
-      FacesLifecycle.beginRequest(externalContext);
-      Manager.instance().setCurrentConversationId("1");
-      FacesLifecycle.resumeConversation(externalContext);
-      
-      ServletLifecycle.endApplication();
-   }
-   
-   @Test 
-   public void testRemoveInterceptor() throws Exception
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      MockExternalContext externalContext = new MockExternalContext(servletContext);
-      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
-      appContext.set( Seam.getComponentName(Init.class), new Init() );
-      appContext.set( 
-            Seam.getComponentName(ConversationEntries.class) + ".component", 
-            new Component(ConversationEntries.class, appContext) 
-         );
-      appContext.set( 
-            Seam.getComponentName(Manager.class) + ".component", 
-            new Component(Manager.class, appContext) 
-         );
-
-      FacesLifecycle.beginRequest( externalContext );
-      Contexts.getSessionContext().set( "foo", new Foo() );
-      
-      RemoveInterceptor ri = new RemoveInterceptor();
-      ri.setComponent( new Component(Foo.class, appContext) );
-      
-      ri.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("foo");
-         }
-      } );
-      
-      assert Contexts.getSessionContext().isSet("foo");
-      
-      ri.aroundInvoke( new MockInvocationContext() {
-         @Override
-         public Method getMethod()
-         {
-            return InterceptorTest.getMethod("destroy");
-         }
-      } );
-      
-      assert !Contexts.getSessionContext().isSet("foo");
-      
-      ServletLifecycle.endApplication();
-   }
-
-   static Method getMethod(String name)
-   {
-      try
-      {
-         return Foo.class.getMethod(name);
-      }
-      catch (Exception e)
-      {
-         assert false;
-         return null;
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InterpolatorTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InterpolatorTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InterpolatorTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,67 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.Locale;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-public class InterpolatorTest extends MockContainerTest
-{
-    private static final String CHOICE_EXPR = "There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}.";
-    
-    @Override
-    protected Class[] getComponentsToInstall()
-    {
-       return new Class[] { Interpolator.class, Locale.class, Expressions.class };
-    }
-    
-    @Test
-    public void testInterpolation() 
-    {
-        Interpolator interpolator = Interpolator.instance();
-
-        Assert.assertEquals(interpolator.interpolate("#0 #1 #2", 3, 5, 7), "3 5 7");
-        Assert.assertEquals(interpolator.interpolate("{0} {1} {2}", 3, 5, 7), "3 5 7");
-
-        // this tests that the result of an expression evaluation is not evaluated again
-        Assert.assertEquals(interpolator.interpolate("{1}", "bad", "{0}"), "{0}");
-        
-        // this tests that embedded {} expressions are parsed correctly.
-        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 0), "There are no files.");
-        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 1), "There is one file.");
-        Assert.assertEquals(interpolator.interpolate(CHOICE_EXPR, 2), "There are 2 files.");
-
-        // test sequences of multiple #
-        Assert.assertEquals(interpolator.interpolate("#0",2), "2");
-        Assert.assertEquals(interpolator.interpolate("##0",2), "#2");
-        Assert.assertEquals(interpolator.interpolate("###0",2), "##2");
-        
-        // test a value expression in the mix
-        Contexts.getEventContext().set("contextVariable", "value");
-        Assert.assertEquals(interpolator.interpolate("#{contextVariable}"), "value");
-        Assert.assertEquals(interpolator.interpolate("#0 #{contextVariable} #1", "a", "z"), "a value z");
-        Assert.assertEquals(interpolator.interpolate("#0 ##{contextVariable} #1", "a", "z"), "a #value z");
-        
-        Date date = new Date(0);
-                
-        Assert.assertEquals(interpolator.interpolate("{0,date,short}", date), DateFormat.getDateInstance(DateFormat.SHORT).format(date)); 
-        
-        // test that a messageformat error doesn't blow up
-        Assert.assertEquals(interpolator.interpolate("{nosuchmessage}"), "{nosuchmessage}");
-        
-        try
-        {
-            interpolator.interpolate("hello #{", (Object) null);
-            Assert.fail("interpolator not raised an exception");
-        } catch (Throwable t)
-        {
-            
-        }
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InvocationControl.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InvocationControl.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/InvocationControl.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,53 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.util.concurrent.CountDownLatch;
-
-public class InvocationControl
-{
-   private String name;
-   private CountDownLatch start = new CountDownLatch(1);
-   private CountDownLatch started = new CountDownLatch(1);
-   private CountDownLatch finish = new CountDownLatch(1);
-   private CountDownLatch finished = new CountDownLatch(1);
-   
-   public InvocationControl(String name) {
-      this.name = name;
-   }
-   
-   public String getName() {
-      return this.name;
-   }
-   
-   public void init() {
-      await(start);
-   }
-   
-   public void start() {
-      start.countDown();
-      await(started);
-   }
-   
-   public void markStarted() {
-      started.countDown();
-      await(finish);
-   }
-   
-   public void finish() {
-      finish.countDown();
-      await(finished);
-   }
-   
-   public void markFinished() {
-      finished.countDown();
-   }
-   
-   private void await(CountDownLatch l) {
-      try
-      {
-         l.await();
-      }
-      catch (InterruptedException e)
-      {
-      }
-   }
-}
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MailTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MailTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MailTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,367 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.naming.NamingException;
-
-import org.jboss.seam.mail.MailSession;
-import org.testng.annotations.Test;
-
-import com.sun.mail.smtp.SMTPSSLTransport;
-import com.sun.mail.smtp.SMTPTransport;
-
-public class MailTest
-{
-
-   private static final String HOST = "smtp.jboss.org";
-   
-   private static final String DEFAULT_HOST = "localhost";
-
-   private static final int PORT = 666;
-   
-   private static final int DEFAULT_PORT = 25;
-   
-   private static final int DEFAULT_SSL_PORT = 465;
-
-   private static final String USERNAME = "pmuir";
-
-   private static final String PASSWORD = "letmein";
-   
-   private static final String EMAIL = "pete.muir at jboss.org";
-
-   @Test
-   public void testBasicMailSession()
-   {
-
-      MailSession mailSession = new MailSession();
-
-      mailSession.create();
-
-      Session session = null;
-
-      try
-      {
-         session = mailSession.getSession();
-      }
-      catch (NamingException e)
-      {
-         assert false;
-         // Naming exception can't occur if we aren't getting the Session from
-         // JNDI
-      }
-
-      assert DEFAULT_HOST.equals(session.getProperty("mail.smtp.host"));
-
-      int port = 0;
-
-      try
-      {
-         port = Integer.parseInt(session.getProperty("mail.smtp.port"));
-      }
-      catch (NumberFormatException e)
-      {
-         assert false;
-      }
-
-      assert port == DEFAULT_PORT;
-
-      assert "smtp".equals(session.getProperty("mail.transport.protocol"));
-      
-      SMTPTransport transport = null;
-
-      try
-      {
-         assert session.getTransport() instanceof SMTPTransport;
-         transport = (SMTPTransport) session.getTransport();
-      }
-      catch (NoSuchProviderException e)
-      {
-         assert false;
-      }
-
-      assert !session.getDebug();
-
-      assert transport.getStartTLS();
-
-   }
-
-   @Test
-   public void testMailSession()
-   {
-
-      MailSession mailSession = new MailSession();
-      mailSession.setHost(HOST);
-      mailSession.setPort(PORT);
-      mailSession.setDebug(true);
-
-      mailSession.create();
-
-      Session session = null;
-
-      try
-      {
-         session = mailSession.getSession();
-      }
-      catch (NamingException e)
-      {
-         assert false;
-         // Naming exception can't occur if we aren't getting the Session from
-         // JNDI
-      }
-
-      assert HOST.equals(session.getProperty("mail.smtp.host"));
-
-      int port = 0;
-
-      try
-      {
-         port = Integer.parseInt(session.getProperty("mail.smtp.port"));
-      }
-      catch (NumberFormatException e)
-      {
-         assert false;
-      }
-
-      assert port == PORT;
-
-      try
-      {
-         assert session.getTransport() instanceof SMTPTransport;
-      }
-      catch (NoSuchProviderException e)
-      {
-         assert false;
-      }
-
-      assert session.getDebug();
-
-   }
-
-   @Test
-   public void testAuthenticatedMailSession()
-   {
-      MailSession mailSession = new MailSession();
-      mailSession.setUsername(USERNAME);
-      mailSession.setPassword(PASSWORD);
-
-      mailSession.create();
-
-      Session session = null;
-
-      try
-      {
-         session = mailSession.getSession();
-      }
-      catch (NamingException e)
-      {
-         assert false;
-         // Naming exception can't occur if we aren't getting the Session from
-         // JNDI
-      }
-
-      assert Boolean.parseBoolean(session.getProperty("mail.smtp.auth"));
-
-      // TODO Check authentication
-
-   }
-   
-   @Test
-   public void testMissingPasswordMailSession()
-   {
-      MailSession mailSession = new MailSession();
-      mailSession.setUsername(USERNAME);
-
-      mailSession.create();
-
-      Session session = null;
-
-      try
-      {
-         session = mailSession.getSession();
-      }
-      catch (NamingException e)
-      {
-         assert false;
-         // Naming exception can't occur if we aren't getting the Session from
-         // JNDI
-      }
-
-      assert null == session.getProperty("mail.smtp.auth");
-
-   }
-   
-   @Test
-   public void testMissingUsernameMailSession()
-   {
-      MailSession mailSession = new MailSession();
-      mailSession.setPassword(PASSWORD);
-
-      mailSession.create();
-
-      Session session = null;
-
-      try
-      {
-         session = mailSession.getSession();
-      }
-      catch (NamingException e)
-      {
-         assert false;
-         // Naming exception can't occur if we aren't getting the Session from
-         // JNDI
-      }
-
-      assert null == session.getProperty("mail.smtp.auth");
-
-   }
-
-   @Test
-   public void testBasicSslMailSession()
-   {
-      MailSession mailSession = new MailSession();
-      
-      mailSession.setSsl(true);
-
-      mailSession.create();
-
-      Session session = null;
-
-      try
-      {
-         session = mailSession.getSession();
-      }
-      catch (NamingException e)
-      {
-         assert false;
-         // Naming exception can't occur if we aren't getting the Session from
-         // JNDI
-      }
-
-      assert "smtps".equals(session.getProperty("mail.transport.protocol"));
-      
-      SMTPSSLTransport transport = null;
-
-      try
-      {
-         assert session.getTransport() instanceof SMTPSSLTransport;
-         transport = (SMTPSSLTransport) session.getTransport();
-      }
-      catch (NoSuchProviderException e)
-      {
-         assert false;
-      }
-     
-      int port = 0;
-      
-      try
-      {
-         port = Integer.parseInt(session.getProperty("mail.smtps.port"));
-      }
-      catch (NumberFormatException e)
-      {
-         assert false;
-      }
-
-      assert port == DEFAULT_SSL_PORT;
-      
-      assert DEFAULT_HOST.equals(session.getProperty("mail.smtps.host"));
-      
-      assert !session.getDebug();
-      
-      // TLS not used over SSL
-      assert !transport.getStartTLS();
-
-   }
-   
-   @Test
-   public void testSslMailSession()
-   {
-      MailSession mailSession = new MailSession();
-      mailSession.setHost(HOST);
-      mailSession.setSsl(true);
-      mailSession.setPort(PORT);
-
-      mailSession.create();
-
-      Session session = null;
-
-      try
-      {
-         session = mailSession.getSession();
-      }
-      catch (NamingException e)
-      {
-         assert false;
-         // Naming exception can't occur if we aren't getting the Session from
-         // JNDI
-      }
-     
-      int port = 0;
-      
-      try
-      {
-         port = Integer.parseInt(session.getProperty("mail.smtps.port"));
-      }
-      catch (NumberFormatException e)
-      {
-         assert false;
-      }
-
-      assert port == PORT;
-
-   }
-   
-   @Test
-   public void testAuthenticatedSslMailSession()
-   {
-      MailSession mailSession = new MailSession();
-      mailSession.setUsername(USERNAME);
-      mailSession.setPassword(PASSWORD);
-      mailSession.setSsl(true);
-
-      mailSession.create();
-
-      Session session = null;
-
-      try
-      {
-         session = mailSession.getSession();
-      }
-      catch (NamingException e)
-      {
-         assert false;
-         // Naming exception can't occur if we aren't getting the Session from
-         // JNDI
-      }
-
-      assert Boolean.parseBoolean(session.getProperty("mail.smtps.auth"));
-      assert session.getProperty("mail.smtp.auth") == null;
-
-      // TODO Check authentication
-
-   }
-   
-   @Test
-   public void testJndiMailSession()
-   {
-      MailSession mailSession = new MailSession();
-      mailSession.setSessionJndiName("java:/Mail");
-      
-      mailSession.create();
-      
-      boolean failure = false;
-      
-      // We can't get a Session from JNDI without a full container.
-      try
-      {
-         mailSession.getSession();
-      }
-      catch (Exception e)
-      {
-        failure = true;
-      }
-      
-      assert failure;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MockContainerTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MockContainerTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MockContainerTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,54 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.ApplicationContext;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.contexts.ServletLifecycle;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.mock.MockExternalContext;
-import org.jboss.seam.mock.MockServletContext;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-
-/**
- * A simple base test class that registers components according to class so that
- * they can be looked up successfully using ComponentClass.instance(), as
- * required by much of Seam's internal API.
- */
-public abstract class MockContainerTest
-{
-   @BeforeMethod
-   protected void setUp()
-   {
-      MockServletContext servletContext = new MockServletContext();
-      ServletLifecycle.beginApplication(servletContext);
-      MockExternalContext externalContext = new MockExternalContext(servletContext);
-      Context appContext = new ApplicationContext(externalContext.getApplicationMap());
-      installComponent(appContext, Manager.class);
-      for (Class c : getComponentsToInstall())
-      {
-         installComponent(appContext, c);
-      }
-      appContext.set(Seam.getComponentName(Init.class), new Init());
-      Lifecycle.beginCall();
-   }
-   
-   protected Class[] getComponentsToInstall()
-   {
-      return new Class[] {};
-   }
-   
-   @AfterMethod
-   protected void tearDown()
-   {
-      Lifecycle.endCall();
-   }
-   
-   protected void installComponent(Context appContext, Class clazz)
-   {
-      appContext.set(Seam.getComponentName(clazz) + ".component", new Component(clazz));
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MockInvocationContext.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MockInvocationContext.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MockInvocationContext.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,47 +0,0 @@
-//$Id: MockInvocationContext.java 6435 2007-10-08 18:15:49Z pmuir $
-package org.jboss.seam.test.unit;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-
-import org.jboss.seam.intercept.InvocationContext;
-
-public class MockInvocationContext implements InvocationContext
-{
-
-   public Object getTarget()
-   {
-      //TODO
-      return null;
-   }
-
-   public Map getContextData()
-   {
-      //TODO
-      return null;
-   }
-
-   public Method getMethod()
-   {
-      //TODO
-      return null;
-   }
-
-   public Object[] getParameters()
-   {
-      //TODO
-      return null;
-   }
-
-   public Object proceed() throws Exception
-   {
-      return null;
-   }
-
-   public void setParameters(Object[] params)
-   {
-      //TODO
-      
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageActionsTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageActionsTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageActionsTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,227 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.mock.MockHttpServletRequest;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.test.unit.component.TestActions;
-import org.testng.annotations.Test;
-
-import javax.faces.context.FacesContext;
-import javax.faces.render.ResponseStateManager;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The purpose of this test is to verify the way that page actions are handled. Once
- * a page action triggers a navigation event, subsequent page actions in the chain
- * should be short circuited.
- */
-public class PageActionsTest extends AbstractPageTest
-{
-   @Override
-   protected void installComponents(Context appContext)
-   {
-      super.installComponents(appContext);
-      installComponent(appContext, NoRedirectFacesManager.class);
-      installComponent(appContext, TestActions.class);
-   }
-
-   /**
-    * This test verifies that a non-null outcome will short-circuit the page
-    * actions. It tests two difference variations. The first variation includes
-    * both actions as nested elements of the page node. The second variation has
-    * the first action in the action attribute of the page node and the second
-    * action as a nested element. Aside from the placement of the actions, the
-    * two parts of the test are equivalent.
-    */
-   @Test(enabled = true)
-   public void testShortCircuitOnNonNullOutcome()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      TestActions testActions = TestActions.instance();
-
-      facesContext.getViewRoot().setViewId("/action-test01a.xhtml");
-      Pages.instance().preRender(facesContext);
-      assertViewId(facesContext, "/pageA.xhtml");
-      assertActionCalls(testActions, new String[] { "nonNullActionA" });
-
-      testActions = TestActions.instance();
-
-      facesContext.getViewRoot().setViewId("/action-test01b.xhtml");
-      Pages.instance().preRender(facesContext);
-      assertViewId(facesContext, "/pageA.xhtml");
-      assertActionCalls(testActions, new String[] { "nonNullActionA" });
-   }
-
-   /**
-    * This test verifies that because the first action does not result in a
-    * navigation, the second action is executed. However, the third action is
-    * not called because of the navigation on the second action.
-    */
-   @Test(enabled = true)
-   public void testShortCircuitInMiddle()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      TestActions testActions = TestActions.instance();
-
-      facesContext.getViewRoot().setViewId("/action-test02.xhtml");
-      Pages.instance().preRender(facesContext);
-      assertViewId(facesContext, "/pageB.xhtml");
-      assertActionCalls(testActions, new String[] { "nonNullActionA", "nonNullActionB" });
-   }
-
-   /**
-    * This test verifies that an action method with a null return can still match
-    * a navigation rule and short-circuit the remaining actions. The key is that
-    * a navigation rule is matched, not what the return value is.
-    */
-   @Test(enabled = true)
-   public void testShortCircuitOnNullOutcome()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      TestActions testActions = TestActions.instance();
-
-      facesContext.getViewRoot().setViewId("/action-test03.xhtml");
-      Pages.instance().preRender(facesContext);
-      assertViewId(facesContext, "/pageA.xhtml");
-      assertActionCalls(testActions, new String[] { "nullActionA" });
-   }
-
-   /**
-    * Verify that the first non-null outcome, even if it is to the same view id,
-    * will short circuit the action calls.
-    */
-   @Test(enabled = true)
-   public void testShortCircuitOnNonNullOutcomeToSamePage()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      TestActions testActions = TestActions.instance();
-
-      facesContext.getViewRoot().setViewId("/action-test04.xhtml");
-      Pages.instance().preRender(facesContext);
-      assertViewId(facesContext, "/action-test04.xhtml");
-      assertActionCalls(testActions, new String[] { "nullActionA", "nonNullActionB" });
-   }
-
-   /**
-    * Same as testShortCircuitOnNonNullOutcome except that the navigation rules
-    * are redirects rather than renders.
-    */
-   @Test(enabled = true)
-   public void testShortCircuitOnNonNullOutcomeWithRedirect()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      TestActions testActions = TestActions.instance();
-
-      facesContext.getViewRoot().setViewId("/action-test05.xhtml");
-      Pages.instance().preRender(facesContext);
-      assertViewId(facesContext, "/action-test05.xhtml");
-      assertActionCalls(testActions, new String[] { "nonNullActionA" });
-      assert Contexts.getEventContext().get("lastRedirectViewId").equals("/pageA.xhtml") : 
-         "Expecting a redirect to /pageA.xhtml but redirected to " + Contexts.getEventContext().get("lastRedirectViewId");
-      assert facesContext.getResponseComplete() == true : "The response should have been marked as complete";
-   }
-
-   /**
-    * Verify that only those actions without on-postback="false" are executed when the
-    * magic postback parameter (javax.faces.ViewState) is present in the request map.
-    */
-   @Test(enabled = true)
-   public void testPostbackConditionOnPageAction()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      simulatePostback(facesContext);
-      TestActions testActions = TestActions.instance();
-
-      facesContext.getViewRoot().setViewId("/action-test06.xhtml");
-      Pages.instance().preRender(facesContext);
-      assertViewId(facesContext, "/action-test06.xhtml");
-      assertActionCalls(testActions, new String[] { "nonNullActionA" });
-   }
-   
-   /**
-    * This test is here (and disabled) to demonstrate the old behavior. All page
-    * actions would be executed regardless and navigations could cross page
-    * declaration boundaries since the view id is changing mid-run (hence
-    * resulting in different navigation rule matches)
-    */
-   @Test(enabled = false)
-   public void oldBehaviorTest()
-   {
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-      TestActions testActions = TestActions.instance();
-
-      facesContext.getViewRoot().setViewId("/action-test99a.xhtml");
-      Pages.instance().preRender(facesContext);
-      assertViewId(facesContext, "/pageB.xhtml");
-      assertActionCalls(testActions, new String[] { "nonNullActionA", "nonNullActionB" });
-   }
-
-   private void assertViewId(FacesContext facesContext, String expectedViewId)
-   {
-      String actualViewId = facesContext.getViewRoot().getViewId();
-      assert expectedViewId.equals(actualViewId) :
-         "Expected viewId to be " + expectedViewId + ", but got " + actualViewId;
-   }
-
-   private void assertActionCalls(TestActions testActions, String[] methodNames)
-   {
-      List<String> actionsCalled = testActions.getActionsCalled();
-      assert actionsCalled.size() == methodNames.length :
-         "Expected " + methodNames.length + " action(s) to be called, but executed " + actionsCalled.size() + " action(s) instead";
-      String expectedMethodCalls = "";
-      for (int i = 0, len = methodNames.length; i < len; i++)
-      {
-         if (i > 0)
-         {
-            expectedMethodCalls += ", ";
-         }
-         expectedMethodCalls += methodNames[i];
-      }
-      String actualMethodCalls = "";
-      for (int i = 0, len = actionsCalled.size(); i < len; i++)
-      {
-         if (i > 0)
-         {
-            actualMethodCalls += ", ";
-         }
-         actualMethodCalls += actionsCalled.get(i);
-      }
-
-      assert expectedMethodCalls.equals(actualMethodCalls) :
-         "Expected actions to be called: " + expectedMethodCalls + "; actions actually called: " + actualMethodCalls;
-
-      Contexts.getEventContext().remove(Component.getComponentName(TestActions.class));
-   }
-
-   private void simulatePostback(FacesContext facesContext)
-   {
-      MockHttpServletRequest request = (MockHttpServletRequest) facesContext.getExternalContext().getRequest();
-      request.getParameters().put(ResponseStateManager.VIEW_STATE_PARAM, new String[] { "true" });
-      assert facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext) == true;
-   }
-   
-   @Scope(ScopeType.EVENT)
-   @Name("org.jboss.seam.core.manager")
-   @BypassInterceptors
-   public static class NoRedirectFacesManager extends FacesManager {
-
-      @Override
-      public void redirect(String viewId, Map<String, Object> parameters, boolean includeConversationId, boolean includePageParams)
-      {
-         Contexts.getEventContext().set("lastRedirectViewId", viewId);
-         // a lot of shit happens we don't need; the important part is that the
-         // viewId is not changed on FacesContext, but the response is marked complete
-         FacesContext.getCurrentInstance().responseComplete();
-      }
-      
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageConversationControlTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageConversationControlTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageConversationControlTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,105 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import javax.faces.context.FacesContext;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.core.ConversationEntries;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.navigation.Pages;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Tests that validate the ConversationControl component as initialized for a Page instance.
- * 
- * @author Jacob Orshalick
- */
-public class PageConversationControlTest extends AbstractPageTest
-{
-   /**
-    * Override the base setup to add the required conversation components included in testing.
-    */
-   @BeforeMethod
-   @Override
-   public void setup()
-   {
-      super.setup();
-      
-      installComponent(Contexts.getApplicationContext(), ConversationEntries.class);
-      installComponent(Contexts.getApplicationContext(), Conversation.class);
-      installComponent(Contexts.getApplicationContext(), FacesMessages.class);
-      installComponent(Contexts.getApplicationContext(), Manager.class);
-      installComponent(Contexts.getApplicationContext(), Events.class);
-      
-      Manager.instance().initializeTemporaryConversation();
-      FacesLifecycle.resumeConversation(FacesContext.getCurrentInstance().getExternalContext());
-   }
-
-   /**
-    * Tests that when a nested conversation encounters an end-conversation tag the nested conversation is
-    * demoted to temporary.
-    */
-   @Test
-   public void testBeginNestedAndEndConversation() {
-      Manager.instance().beginConversation();
-      Manager.instance().beginNestedConversation();
-      
-      assert Manager.instance().isLongRunningConversation();
-      assert Manager.instance().isNestedConversation();
-      
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-
-      facesContext.getViewRoot().setViewId("/end-conversation-test.xhtml");
-      Pages.instance().preRender(facesContext);
-      
-      // nested conversation should be demoted to temporary
-      assert !Manager.instance().isLongRunningConversation();
-      assert Manager.instance().isNestedConversation();
-   }
-   
-   /**
-    * Tests that when a non-nested conversation encounters an end-conversation tag specifying that the root 
-    * should be ended the current conversation is simply demoted to temporary.
-    */
-   @Test
-   public void testBeginAndEndRootConversation() {
-      Manager.instance().beginConversation();
-      
-      assert Manager.instance().isLongRunningConversation();
-      
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-
-      facesContext.getViewRoot().setViewId("/end-root-conversation-test.xhtml");
-      Pages.instance().preRender(facesContext);
-      
-      assert !Manager.instance().isLongRunningConversation();
-   }
-   
-   /**
-    * Tests that when a nested conversation encounters an end-conversation tag specifying that the root 
-    * should be ended the root is ended thereby destroying the conversation stack.
-    */
-   @Test
-   public void testBeginNestedAndEndRootConversation() {
-      Manager.instance().beginConversation();
-      String rootConversationId = Manager.instance().getCurrentConversationId();
-      
-      Manager.instance().beginNestedConversation();
-
-      assert !Manager.instance().getCurrentConversationId().equals(rootConversationId);
-      assert Manager.instance().isLongRunningConversation();
-      assert Manager.instance().isNestedConversation();
-      
-      FacesContext facesContext = FacesContext.getCurrentInstance();
-
-      facesContext.getViewRoot().setViewId("/end-root-conversation-test.xhtml");
-      Pages.instance().preRender(facesContext);
-
-      assert Manager.instance().getCurrentConversationId().equals(rootConversationId);
-      assert !Manager.instance().isLongRunningConversation();
-      assert !Manager.instance().isNestedConversation();
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageDescriptorTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageDescriptorTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageDescriptorTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,58 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.navigation.Pages;
-import org.testng.annotations.Test;
-
-/**
- * This test verifies that the page descriptor is parsed correctly and that the
- * Page instance returned by the Pages component are based on the matching Page
- * definition as well as any matching wild-card pages in the page stack.
- */
-public class PageDescriptorTest extends AbstractPageTest
-{
-   /**
-    * Verify that the switch enabled flag is true by default, but false
-    * for the debug page.
-    */
-   @Test(enabled = true)
-   public void testSwitchEnabledFlag()
-   {
-      Pages pages = Pages.instance();
-      
-      assert pages.getPage("/action-test01a.xhtml").isSwitchEnabled();
-      assert !pages.getPage("/debug.xhtml").isSwitchEnabled();
-   }
-   
-   /**
-    * Verify that the Pages component determines when a description exists in the Page stack and when
-    * it does not.
-    */
-   @Test(enabled = true)
-   public void testHasDescription()
-   {
-      Pages pages = Pages.instance();
-      
-      assert pages.hasDescription("/action-test01b.xhtml");
-      assert pages.hasDescription("/action-test01a.xhtml");
-      assert !pages.hasDescription("/action-test02.xhtml");
-   }
-   
-   /**
-    * Verify that the description can be retrieved from the page stack when a wild-card view-id 
-    * description has been specified.  Also verifies that a description specific to a page overrides
-    * the wild-card description.
-    */
-   @Test(enabled = true)
-   public void testGetAndResolveDescription()
-   {
-      Pages pages = Pages.instance();
-      String fineDescription = "fine-description";
-      Contexts.getEventContext().set("fineDescription", fineDescription);
-      
-      assert "coarse-description".equals(pages.getDescription("/action-test01a.xhtml")) :
-         "Expecting the wild-card description to be returned as no description was provided for the view-id";
-      assert fineDescription.equals(pages.renderDescription("/action-test01b.xhtml")) :
-         "Expecting the description for the view-id to be returned";
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageParamTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageParamTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageParamTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,163 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.util.Date;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.IntegerConverter;
-import javax.faces.validator.Validator;
-import javax.faces.validator.ValidatorException;
-
-import javax.validation.constraints.Size;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Expressions;
-import org.jboss.seam.core.Validators;
-import org.jboss.seam.faces.DateConverter;
-import org.jboss.seam.mock.EnhancedMockHttpServletRequest;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.navigation.Param;
-import org.testng.annotations.Test;
-
-/**
- * Verifies that page parameters are setup properly and report the correct information
- * about validators and converters.
- * 
- * @author Dan Allen
- */
-public class PageParamTest extends AbstractPageTest
-{
-   @Test
-   public void testGetConverterById()
-   {
-      String converterId = "javax.faces.Integer";
-      String converterClass = "javax.faces.convert.IntegerConverter";
-      Param param = new Param("param");
-      param.setConverterId(converterId);
-      assert param.getConverter() instanceof IntegerConverter : "expecting: " + converterClass + "; got: " + param.getConverter();
-   }
-   
-   /**
-    * Verify EL expression disability in actionOutcome parameter
-    */
-   @Test(expectedExceptions = IllegalArgumentException.class )
-   public void testGetCallAction()
-   {
-      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest();
-      request.addParameter("actionOutcome", "#{variable}");
-      FacesContext.getCurrentInstance().getExternalContext().setRequest(request);
-      Pages.instance().preRender(FacesContext.getCurrentInstance());      
-   }
-   
-   @Test(expectedExceptions = IllegalArgumentException.class )
-   public void testGetCallActionEscaped()
-   {
-      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest();
-      request.addParameter("actionOutcome", "%3d%23%7dvariable%7b");
-      FacesContext.getCurrentInstance().getExternalContext().setRequest(request);
-      Pages.instance().preRender(FacesContext.getCurrentInstance());      
-   }
-   
-   /**
-    * Verify that converter is null when the parameter value is a value expression and
-    * we are operating outside of a FacesContext.
-    * @jira JBSEAM-3674
-    */
-   @Test
-   public void testConverterIsNullForNonFacesValueExpression()
-   {
-      Param param = new Param("param");
-      param.setValueExpression(Expressions.instance().createValueExpression("#{variable}"));
-      assert param.getConverter() == null;
-   }
-   
-   @Test
-   public void testDateConverter()
-   {
-      Param param = setupParam(false);
-      
-      assert DateConverter.class.equals(param.getConverter().getClass());
-      
-   }
-   
-   @Test
-   public void testGetValidatorById() throws ClassNotFoundException
-   {
-      String validatorId = "TestValidator";
-      String validatorClass= "org.jboss.seam.test.unit.PageParamTest$TestValidator";
-      FacesContext.getCurrentInstance().getApplication().addValidator(validatorId, validatorClass);
-      Param param = new Param("param");
-      param.setValidatorId(validatorId);
-      assert param.getValidator() instanceof TestValidator : "expecting: " + validatorClass + "; got: " + param.getValidator();
-   }
-   
-   @Test(expectedExceptions = ValidatorException.class)
-   public void testValidateModelWithInvalidValue()
-   {
-      setupParamToValidate(false).validateConvertedValue(FacesContext.getCurrentInstance(), "a");
-   }
-   
-   @Test
-   public void testValidateModelWithValidValue()
-   {
-      setupParamToValidate(false).validateConvertedValue(FacesContext.getCurrentInstance(), "aaa");
-   }
-   
-   @Test
-   public void testValidateModelDisabled()
-   {
-      setupParamToValidate(true).validateConvertedValue(FacesContext.getCurrentInstance(), "a");
-   }
-   
-   protected Param setupParamToValidate(boolean disableModelValidator)
-   {
-      installComponent(Contexts.getApplicationContext(), Validators.class);
-      Param param = new Param("value");
-      param.setValueExpression(Expressions.instance().createValueExpression("#{bean.value}"));
-      Contexts.getEventContext().set("bean", new Bean());
-      if (disableModelValidator) {
-         param.setValidateModel(false);
-      }
-      return param;
-   }
-
-   protected Param setupParam(boolean disableModelValidator)
-   {
-      installComponent(Contexts.getApplicationContext(), DateConverter.class);
-      Param param = new Param("birthDate");
-      param.setValueExpression(Expressions.instance().createValueExpression("#{bean.birthDate}"));
-      Bean bean = new Bean();
-      bean.setBirthDate(new Date());
-      Contexts.getEventContext().set("bean", bean);
-      if (disableModelValidator) {
-         param.setValidateModel(false);
-      }
-      return param;
-   }
-   
-   public static class TestValidator implements Validator
-   {
-      public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
-      {
-      }
-   }
-   
-   class Bean {
-      private String value;
-      private Date birthDate;
-      public Date getBirthDate()
-      {
-         return birthDate;
-      }
-      public void setBirthDate(Date birth)
-      {
-         this.birthDate = birth;
-      }
-      @Size(min = 3, max = 10)
-      public String getValue() {
-         return value;
-      }
-      public void setValue(String value) {
-         this.value = value;
-      }
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageflowConfigurationTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageflowConfigurationTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageflowConfigurationTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,38 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ProcessInstance;
-import org.testng.annotations.Test;
-
-public class PageflowConfigurationTest{
-
-  static JbpmConfiguration pageflowConfiguration = JbpmConfiguration.parseResource("org/jboss/seam/bpm/jbpm.pageflow.cfg.xml");
-  
-  @Test
-  public void testOne() {
-    JbpmContext jbpmContext = pageflowConfiguration.createJbpmContext();
-    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
-      "<process-definition name='navigation'>" +
-      "  <start-state name='start'>" +
-      "    <transition to='a' />" +
-      "  </start-state>" +
-      "  <state name='a'>" +
-      "    <transition to='end' />" +
-      "  </state>" +
-      "  <end-state name='end' />" +
-      "</process-definition>"
-    );
-    
-    ProcessInstance processInstance = processDefinition.createProcessInstance();
-
-    processInstance.signal();
-    processInstance.signal();
-    
-    assert processInstance.hasEnded();
-    
-    jbpmContext.close();
-  }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageflowTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageflowTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PageflowTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,110 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.io.StringReader;
-
-import org.jboss.seam.bpm.PageflowParser;
-import org.jboss.seam.pageflow.Page;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.graph.exe.Token;
-import org.jbpm.graph.node.StartState;
-import org.testng.annotations.Test;
-
-public class PageflowTest 
-{
-  
-  JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
-    "<jbpm-configuration />"
-  );
-
-  @Test
-  public void testPageflowWithStartState() {
-    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
-    
-    StringReader stringReader = new StringReader(
-      "<pageflow-definition name='hoepla'>" +
-      "  <start-state name='start' />" +
-      "</pageflow-definition>"
-    );
-    PageflowParser pageflowParser = new PageflowParser(stringReader);
-    ProcessDefinition processDefinition = pageflowParser.readProcessDefinition();
-    assert "start".equals(processDefinition.getStartState().getName());
-    
-    jbpmContext.close();
-  }
-  
-  @Test
-  public void testPageflowWithStartPage() {
-    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();    
-    StringReader stringReader = new StringReader(
-    "<pageflow-definition name='hoepla'>" +
-    "  <start-page name='start' view-id='/start.xhtml'/>" +
-    "</pageflow-definition>");
-    PageflowParser pageflowParser = new PageflowParser(stringReader);
-    ProcessDefinition processDefinition = pageflowParser.readProcessDefinition();
-    
-    assert "start".equals(processDefinition.getStartState().getName());
-    
-    jbpmContext.close();
-  }
-  
-  @Test
-  public void testPageflowWithStartPageAttribute() {
-    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
-    
-    StringReader stringReader = new StringReader(
-      "<pageflow-definition name='hoepla' start-page='start'>" +
-      "  <page name='start' view-id='/start.xhtml'/>" +
-      "</pageflow-definition>"
-    );
-    PageflowParser pageflowParser = new PageflowParser(stringReader);
-    ProcessDefinition processDefinition = pageflowParser.readProcessDefinition();
-    assert "start".equals(processDefinition.getStartState().getName());
-    
-    jbpmContext.close();
-  }
-  
-  @Test
-  public void testOrderPageflow() {
-     StringReader stringReader = new StringReader(
-      "<pageflow-definition name='checkout'>" +
-      "  <start-state name='start'>" +
-      "    <transition to='confirm'/>" +
-      "  </start-state>" +
-      "  <page name='confirm' view-id='/confirm.xhtml'>" +
-      "    <redirect/>" +
-      "    <transition name='update'   to='continue'/>" + 
-      "    <transition name='purchase' to='complete'>" +
-      "      <action expression='#{checkout.submitOrder}' />" +
-      "    </transition>" +
-      "  </page>" +
-      "  <page name='complete' view-id='/complete.xhtml'>" +
-      "    <redirect/>" +
-      "    <end-conversation/>" +
-      "  </page>" +    
-      "  <page name='continue' view-id='/browse.xhtml'>" +
-      "    <end-conversation/>" +
-      "  </page>" +
-      "</pageflow-definition>"
-    );
-    PageflowParser pageflowParser = new PageflowParser(stringReader);
-    ProcessDefinition processDefinition = pageflowParser.readProcessDefinition();
-    
-    StartState start = (StartState) processDefinition.getStartState();
-    Page confirm = (Page) processDefinition.getNode("confirm");
-    Page complete = (Page) processDefinition.getNode("complete");
-    Page cont = (Page) processDefinition.getNode("continue");
-    assert confirm!=null;
-    assert complete!=null;
-    assert cont!=null;
-    
-    ProcessInstance processInstance = new ProcessInstance(processDefinition);
-    Token token = processInstance.getRootToken();
-    assert start.equals(token.getNode());
-    
-    processInstance.signal();
-  }
-  
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PasswordHashTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PasswordHashTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PasswordHashTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,25 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.security.management.PasswordHash;
-import org.testng.annotations.Test;
-
-public class PasswordHashTest
-{   
-   @SuppressWarnings("deprecation")
-   @Test
-   public void testMd5Hash()
-   {
-      PasswordHash passwordHash = new PasswordHash();
-      String hash = passwordHash.generateHash("secret", "MD5");
-      assert hash.equals("Xr4ilOzQ4PCOq3aQ0qbuaQ==");
-   }
-   
-   @SuppressWarnings("deprecation")
-   @Test
-   public void testShaHash()
-   {
-      PasswordHash passwordHash = new PasswordHash();
-      String hash = passwordHash.generateHash("secret", "SHA");
-      assert hash.equals("5en6G6MezRroT3XKqkdPOmY/BfQ=");
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/People.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/People.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/People.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,35 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.datamodel.DataModelSelection;
-
- at Name("people")
-public class People
-{
-   @org.jboss.seam.annotations.datamodel.DataModel(scope=ScopeType.PAGE)
-   private List<Person> peopleList;
-   
-   @DataModelSelection
-   private Person selectedPerson;
-   
-   @Factory("peopleList")
-   public void peopleFactory()
-   {
-      peopleList = new ArrayList<Person>();
-      peopleList.add(new Person("Gavin"));
-      peopleList.add(new Person("Pete"));
-      peopleList.add(new Person("Shane"));
-      peopleList.add(new Person("Norman"));
-   }
-   
-   public Person getSelectedPerson()
-   {
-      return selectedPerson;
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Person.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Person.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/Person.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,45 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.io.Serializable;
-
-import org.jboss.seam.annotations.Name;
-
-
- at Name("person")
-public class Person implements Serializable
-{
-   
-   public Person(String name)
-   {
-      this.name = name;
-   }
-   
-   public Person() {}
-   
-   private String name;
-   
-   public String getName()
-   {
-      return name;
-   }
-   
-    public void setName(String name)
-   {
-      this.name = name;
-   }
-    
-    @Override
-   public boolean equals(Object other)
-   {
-      if (other instanceof Person)
-      {
-         Person that = (Person) other;
-         return (this.name == null && that.name == null) || (this.name != null && this.name.equals(that.name));     
-      }
-      else
-      {
-         return false;
-      }
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,354 +0,0 @@
-//$Id: PhaseListenerTest.java 6435 2007-10-08 18:15:49Z pmuir $
-package org.jboss.seam.test.unit;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.ApplicationContext;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.SessionContext;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.core.ConversationEntries;
-import org.jboss.seam.core.ConversationPropagation;
-import org.jboss.seam.core.Events;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.core.ResourceLoader;
-import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.faces.FacesPage;
-import org.jboss.seam.faces.Validation;
-import org.jboss.seam.jsf.SeamPhaseListener;
-import org.jboss.seam.jsf.SeamStateManager;
-import org.jboss.seam.mock.MockApplication;
-import org.jboss.seam.mock.MockExternalContext;
-import org.jboss.seam.mock.MockFacesContext;
-import org.jboss.seam.mock.MockLifecycle;
-import org.jboss.seam.navigation.Pages;
-import org.jboss.seam.servlet.ServletRequestSessionMap;
-import org.jboss.seam.web.Session;
-import org.testng.annotations.Test;
-
-public class PhaseListenerTest
-{
-   private void installComponents(Context appContext)
-   {
-      Init init = new Init();
-      init.setTransactionManagementEnabled(false);
-      appContext.set( Seam.getComponentName(Init.class), init );
-      installComponent(appContext, FacesManager.class);
-      installComponent(appContext, ConversationEntries.class);
-      installComponent(appContext, FacesPage.class);
-      installComponent(appContext, Conversation.class);
-      installComponent(appContext, FacesMessages.class);
-      installComponent(appContext, Pages.class);
-      installComponent(appContext, Events.class);
-      installComponent(appContext, Validation.class);
-      installComponent(appContext, Session.class);
-      installComponent(appContext, ConversationPropagation.class);
-      installComponent(appContext, ResourceLoader.class);
-   }
-   
-   private void installComponent(Context appContext, Class clazz)
-   {
-      appContext.set( Seam.getComponentName(clazz) + ".component", new Component(clazz) );
-   }
-   
-   private MockFacesContext createFacesContext()
-   {
-      ExternalContext externalContext = new MockExternalContext();
-      MockFacesContext facesContext = new MockFacesContext( externalContext, new MockApplication() );
-      facesContext.setCurrent().createViewRoot();
-      facesContext.getApplication().setStateManager( new SeamStateManager( facesContext.getApplication().getStateManager() ) );
-      
-      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
-      installComponents(appContext);
-      return facesContext;
-   }
-   
-   @Test
-   public void testSeamPhaseListener()
-   {
-      MockFacesContext facesContext = createFacesContext();
-      SeamPhaseListener phases = new SeamPhaseListener();
-
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isConversationContextActive();
-      assert !Manager.instance().isLongRunningConversation();
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
-            
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
-            
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
-      
-      assert !Manager.instance().isLongRunningConversation();
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
-      
-      assert facesContext.getViewRoot().getViewMap().size()==1;
-      assert ( (FacesPage) getPageMap(facesContext).get( getPrefix() + Seam.getComponentName(FacesPage.class) ) ).getConversationId()==null;
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert Contexts.isConversationContextActive();
-      
-      facesContext.getApplication().getStateManager().saveView(facesContext);
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
-
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-   }
-
-   private String getPrefix()
-   {
-      return ScopeType.PAGE.getPrefix() + '$';
-   }
-
-   @SuppressWarnings("serial")
-   @Test
-   public void testSeamPhaseListenerLongRunning()
-   {
-      MockFacesContext facesContext = createFacesContext();
-      
-      getPageMap(facesContext).put( getPrefix() + Seam.getComponentName(FacesPage.class), new FacesPage() { @Override public String getConversationId() { return "2"; } });
-      
-      List<String> conversationIdStack = new ArrayList<String>();
-      conversationIdStack.add("2");
-      ConversationEntries entries = new ConversationEntries();
-      entries.createConversationEntry("2", conversationIdStack);
-      SessionContext sessionContext = new SessionContext( new ServletRequestSessionMap( (HttpServletRequest) facesContext.getExternalContext().getRequest() ) );
-      sessionContext.set( Seam.getComponentName(ConversationEntries.class), entries );
-      
-      SeamPhaseListener phases = new SeamPhaseListener();
-
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isConversationContextActive();
-      assert Manager.instance().isLongRunningConversation();
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
-      
-      assert Manager.instance().isLongRunningConversation();
-      
-      facesContext.getViewRoot().getAttributes().clear();
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
-
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert Contexts.isConversationContextActive();
-      
-      facesContext.getApplication().getStateManager().saveView(facesContext);
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
-      
-      assert ( (FacesPage) getPageMap(facesContext).get( getPrefix() + Seam.getComponentName(FacesPage.class) ) ).getConversationId().equals("2");
-
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-   }
-
-   private Map getPageMap(MockFacesContext facesContext)
-   {
-      return facesContext.getViewRoot().getViewMap();
-   }
-
-   @Test
-   public void testSeamPhaseListenerNewLongRunning()
-   {
-      MockFacesContext facesContext = createFacesContext();
-
-      SeamPhaseListener phases = new SeamPhaseListener();
-
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isConversationContextActive();
-      assert !Manager.instance().isLongRunningConversation();
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
-      
-      Manager.instance().beginConversation();
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
-      
-      assert Manager.instance().isLongRunningConversation();
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert Contexts.isConversationContextActive();
-      
-      facesContext.getApplication().getStateManager().saveView(facesContext);
-      
-      assert facesContext.getViewRoot().getViewMap().size()==1;
-
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
-
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-   }
-
-   @Test
-   public void testSeamPhaseListenerRedirect()
-   {
-      MockFacesContext facesContext = createFacesContext();
-      SeamPhaseListener phases = new SeamPhaseListener();
-
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isConversationContextActive();
-      assert !Manager.instance().isLongRunningConversation();
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
-            
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
-      
-      facesContext.responseComplete();
-            
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
-      
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-   }
-
-   @Test
-   public void testSeamPhaseListenerNonFacesRequest()
-   {
-      MockFacesContext facesContext = createFacesContext();
-      SeamPhaseListener phases = new SeamPhaseListener();
-
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
-      
-      assert Contexts.isConversationContextActive();
-      assert !Manager.instance().isLongRunningConversation();
-      
-      phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
-      
-      assert facesContext.getViewRoot().getViewMap().size()==1;
-      assert ( (FacesPage) getPageMap(facesContext).get( getPrefix() + Seam.getComponentName(FacesPage.class) ) ).getConversationId()==null;
-      assert Contexts.isEventContextActive();
-      assert Contexts.isSessionContextActive();
-      assert Contexts.isApplicationContextActive();
-      assert Contexts.isConversationContextActive();
-      
-      facesContext.getApplication().getStateManager().saveView(facesContext);
-      
-      phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
-      
-      assert !Contexts.isEventContextActive();
-      assert !Contexts.isSessionContextActive();
-      assert !Contexts.isApplicationContextActive();
-      assert !Contexts.isConversationContextActive();
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/QueryTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/QueryTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/QueryTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,110 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.framework.EntityQuery;
-import org.testng.annotations.Test;
-import static org.testng.Assert.*;
-
-public class QueryTest
-{
-   /**
-    * These tests verify that the count query is properly extracted from the rendered
-    * query. There are two points of focus. The first is that "join fetch" is replaced
-    * with "join" in the where clause. The second is that the subject of the query is
-    * used in the count() function unless the query does not have an explicit subject,
-    * in which case a * is used instead.
-    */
-   @Test
-   public void testCountQuery() {
-      UnitQuery query = new UnitQuery();
-      query.setEjbql("from Person p");
-      query.parseEjbql();
-      assertEquals(query.getCountEjbql(), "select count(*) from Person p");
-      
-      query.setEjbql("from Person p where p.location is not null");
-      query.setOrderColumn("username");
-      query.parseEjbql();
-      assertEquals(query.getCountEjbql(), "select count(*) from Person p where p.location is not null");
-      
-      query.setEjbql("select p from Person p");
-      query.setOrderColumn("username");
-      query.parseEjbql();
-      // TODO this should eventually become count(p)
-      assertEquals(query.getCountEjbql(), "select count(*) from Person p");
-
-      // trying to reproduce bug JBSEAM-4694
-      query.setUseWildcardAsCountQuerySubject(false);
-      query.setEjbql("select distinct p from Person p");
-      query.setOrderColumn("username");
-      query.parseEjbql();
-      // TODO this should eventually become count(p)
-      assertEquals(query.getCountEjbql(), "select count(distinct p) from Person p");
-      query.setUseWildcardAsCountQuerySubject(true);
-     
-      query.setEjbql("select v from Vehicle v join fetch v.person");
-      query.setOrderColumn("make");
-      query.parseEjbql();
-      // TODO this should eventually become count(v)
-      assertEquals(query.getCountEjbql(), "select count(*) from Vehicle v join v.person");
-      
-      query.setEjbql("select v.person from Vehicle v left join fetch v.person");
-      query.parseEjbql();
-      // TODO this should eventually become count(v.person)
-      assertEquals(query.getCountEjbql(), "select count(*) from Vehicle v left join v.person");
-      
-      query.setEjbql("select v.person, v.color from Vehicle v");
-      query.parseEjbql();
-      assertEquals(query.getCountEjbql(), "select count(*) from Vehicle v");
-      
-//      query = new CompliantUnitQuery();
-      query.setUseWildcardAsCountQuerySubject(false);
-      query.setEjbql("select p from Person p");
-      query.parseEjbql();
-      assertEquals(query.getCountEjbql(), "select count(p) from Person p");
-   }
-   
-   @Test
-   public void testCountQueryWithGroupBy()
-   {
-      UnitQuery query = new UnitQuery();
-      query.setEjbql("select min(e.birthYear), count(*) from Person p group by p.birthYear");
-      query.setGroupBy("p.birthYear");
-      query.parseEjbql();
-      assertEquals(query.getCountEjbql() , "select count(*) from Person p");      
-	   
-   }
-
-   class UnitQuery extends EntityQuery {
-
-      @Override
-      protected void parseEjbql()
-      {
-         super.parseEjbql();
-      }
-
-      @Override
-      protected String getRenderedEjbql()
-      {
-         return super.getRenderedEjbql();
-      }
-
-      @Override
-      protected String getCountEjbql()
-      {
-         return super.getCountEjbql();
-      }
-
-      /** Making setter method accessible for reproducing JBSEAM-4694. */
-      public void setUseWildcardAsCountQuerySubject(boolean useCompliantCountQuerySubject) {
-         super.setUseWildcardAsCountQuerySubject(useCompliantCountQuerySubject);
-      }
-      
-   }
-
-//   class CompliantUnitQuery extends UnitQuery {
-//
-//      public CompliantUnitQuery() {
-//         setUseWildcardAsCountQuerySubject(false);
-//      }
-//      
-//   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/SeamTextTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/SeamTextTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/SeamTextTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,18 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import org.jboss.seam.text.SeamTextLexer;
-import org.jboss.seam.text.SeamTextParser;
-
-public class SeamTextTest
-{
-    public static void main(String[] args) throws Exception {
-        Reader r = new InputStreamReader( SeamTextTest.class.getResourceAsStream("SeamTextTest.txt") );
-        SeamTextLexer lexer = new SeamTextLexer(r);
-        SeamTextParser parser = new SeamTextParser(lexer);
-        parser.startRule();
-        System.out.println(parser);
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/ActorTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/ActorTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/ActorTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,72 +0,0 @@
-package org.jboss.seam.test.unit.bpm;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.jboss.seam.bpm.Actor;
-import org.testng.annotations.Test;
-
-/**
- * @author Pete Muir
- *
- */
-public class ActorTest
-{
-   
-   @Test
-   public void testActorDirtyChecking()
-   {
-      // Test dirty checking on id
-      Actor actor = new Actor();
-      assert !actor.clearDirty();
-      actor.setId("gavin");
-      assert actor.clearDirty();
-      actor.setId("pete");
-      assert actor.clearDirty();
-      
-      // Test dirty checking on group actor ids
-      actor.getGroupActorIds().add("manager");
-      assert actor.clearDirty();
-      actor.getGroupActorIds().remove("manager");
-      assert actor.clearDirty();
-      actor.getGroupActorIds().add("director");
-      actor.clearDirty();
-      assert !actor.clearDirty();
-      actor.getGroupActorIds().clear();
-      assert actor.clearDirty();
-      
-      
-      Set<String> someAdditions = new HashSet<String>();
-      someAdditions.add("engineering manager");
-      someAdditions.add("sales manager");
-      Set<String> additions = new HashSet<String>();
-      additions.add("marketing manager");
-      additions.addAll(someAdditions);
-      actor.getGroupActorIds().addAll(additions);
-      assert actor.getGroupActorIds().size() == 3;
-      assert actor.clearDirty();
-      actor.getGroupActorIds().removeAll(additions);
-      assert actor.clearDirty();
-      assert actor.getGroupActorIds().size() == 0;
-      
-      actor.getGroupActorIds().addAll(additions);
-      assert actor.getGroupActorIds().size() == 3;
-      actor.clearDirty();
-      actor.getGroupActorIds().retainAll(someAdditions);
-      assert actor.clearDirty();
-      assert actor.getGroupActorIds().size() == 2;
-      
-      // Test dirt checking on group actor ids iterator
-      actor.getGroupActorIds().add("slave");
-      actor.clearDirty();
-      Iterator it = actor.getGroupActorIds().iterator();
-      assert it.hasNext();
-      it.next();
-      it.remove();
-      assert actor.clearDirty();
-      
-      
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/JbpmTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/JbpmTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/JbpmTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,57 +0,0 @@
-package org.jboss.seam.test.unit.bpm;
-
-import org.jboss.seam.bpm.Jbpm;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.testng.annotations.Test;
-
-/**
- * @author Marek Novotny
- *
- */
-public class JbpmTest
-{
-   
-   private static final String PROCESS_DEFINITION = "<process-definition name=\"test\"> " +
-   		                                                "<start-state name=\"start\"> " +
-   		                                                "   <transition to=\"decision\" /> " +
-   		                                                "</start-state> " +
-   		                                                "<decision name=\"decision\"> " +
-   		                                                "   <transition to=\"done\" name=\"true\" />" +
-   		                                                "   <transition to=\"done\" name=\"false\" /> " +
-   		                                                "</decision> " +
-   		                                                "<end-state name=\"done\"/> " +
-   		                                           "</process-definition>";
-   
-   private static final String PAGE_FLOW_DEFINITION = "<pageflow-definition name=\"newuser\" >" +
-                                                          "<start-state name=\"start\">" +
-                                                          "   <transition to=\"account\"/>" +
-                                                          "</start-state>" +
-                                                          "<page name=\"account\" view-id=\"/newuser/account.xhtml\">" +
-                                                          "    <redirect/>" +
-                                                          "   <transition name=\"next\" to=\"checkPassword\" />" +
-                                                          "</page>" + 
-                                                      "</pageflow-definition>" ;
-   
-   @Test
-   public void testGetProcessDefinitionFromXml()
-   {
-
-      Jbpm jbpm = new Jbpm(); 
-      ProcessDefinition pd = jbpm.getProcessDefinitionFromXml(PROCESS_DEFINITION);
-      assert "start".equals(pd.getStartState().getName());
-      assert "test".equals(pd.getName());      
-      
-   }
-   
-   @Test
-   public void testGetPageflowDefinitionFromXml()
-   {
-
-      Jbpm jbpm = new Jbpm(); 
-      ProcessDefinition pd = jbpm.getPageflowDefinitionFromXml(PAGE_FLOW_DEFINITION);
-      assert "start".equals(pd.getStartState().getName());
-      assert "newuser".equals(pd.getName());
-      
-   }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/TaskListTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/TaskListTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/bpm/TaskListTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,64 +0,0 @@
-package org.jboss.seam.test.unit.bpm;
-
-import java.util.HashMap;
-
-import javax.transaction.Status;
-import javax.transaction.SystemException;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
-import org.jboss.seam.bpm.Actor;
-import org.jboss.seam.bpm.PooledTaskInstanceList;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.init.Initialization;
-import org.jboss.seam.mock.MockServletContext;
-import org.jboss.seam.transaction.NoTransaction;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-public class TaskListTest
-{
-   @BeforeMethod
-   protected void setUp()
-   {
-      Lifecycle.beginApplication(new HashMap<String, Object>());
-      new Initialization(new MockServletContext()).create().init();
-      Lifecycle.setupApplication();
-      installComponent(Contexts.getApplicationContext(), Actor.class);
-      installComponent(Contexts.getApplicationContext(), PooledTaskInstanceList.class);
-      installComponent(Contexts.getApplicationContext(), MockRolledBackTransaction.class);
-      Lifecycle.beginCall();
-   }
-
-   @Test
-   public void emptyPooledTaskListIfNoGroupActorIds()
-   {
-      Object pooledTaskInstanceList = Component.getInstance("org.jboss.seam.bpm.pooledTaskInstanceList");
-      assert pooledTaskInstanceList == null;
-   }
-
-   @AfterMethod
-   protected void tearDown()
-   {
-      Lifecycle.endApplication();
-   }
-
-   private void installComponent(Context appContext, Class clazz)
-   {
-      appContext.set(Seam.getComponentName(clazz) + ".component", new Component(clazz));
-   }
-
-   public static class MockRolledBackTransaction extends NoTransaction
-   {
-
-      @Override
-      public int getStatus() throws SystemException
-      {
-         return Status.STATUS_MARKED_ROLLBACK;
-      }
-
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/ConfigurableComponent.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/ConfigurableComponent.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/ConfigurableComponent.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,18 +0,0 @@
-package org.jboss.seam.test.unit.component;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-
- at Name("configurableComponent")
- at Install(false)
-public class ConfigurableComponent {
-    private PrimaryColor primaryColor;
-
-    public PrimaryColor getPrimaryColor() {
-        return primaryColor;
-    }
-
-    public void setPrimaryColor( PrimaryColor primaryColor ) {
-        this.primaryColor = primaryColor;
-    }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/MyEntityHome.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/MyEntityHome.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/MyEntityHome.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,19 +0,0 @@
-package org.jboss.seam.test.unit.component;
-
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.framework.EntityHome;
-import org.jboss.seam.test.unit.entity.SimpleEntity;
-
- at Name("myEntityHome")
-public class MyEntityHome extends EntityHome<SimpleEntity>
-{
-   @Override
-   public void create()
-   {
-      if ( getEntityClass()==null )
-      {
-         throw new IllegalStateException("entityClass is null");
-      }
-      initDefaultMessages();
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/PrimaryColor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/PrimaryColor.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/PrimaryColor.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,5 +0,0 @@
-package org.jboss.seam.test.unit.component;
-
-public enum PrimaryColor {
-    RED, GREEN, BLUE;
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/TestActions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/TestActions.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/component/TestActions.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,51 +0,0 @@
-package org.jboss.seam.test.unit.component;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Name;
-
-/**
- * A bunch of test actions to be used in unit tests.
- */
- at Name("testActions")
-public class TestActions
-{
-   private List<String> actionsCalled = new ArrayList<String>();
-   
-   public String nonNullActionA() {
-      actionsCalled.add("nonNullActionA");
-      return "outcomeA";
-   }
-   
-   public String nonNullActionB() {
-      actionsCalled.add("nonNullActionB");
-      return "outcomeB";
-   }
-   
-   public String nonNullActionC() {
-      actionsCalled.add("nonNullActionC");
-      return "outcomeC";
-   }
-   
-   public void nullActionA() {
-      actionsCalled.add("nullActionA");
-   }
-   
-   public void nullActionB() {
-      actionsCalled.add("nullActionB");
-   }
-   
-   public void nullActionC() {
-      actionsCalled.add("nullActionC");
-   }
-   
-   public List<String> getActionsCalled() {
-      return actionsCalled;
-   }
-   
-   public static TestActions instance() {
-      return (TestActions) Component.getInstance(TestActions.class);
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/entity/SimpleEntity.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/entity/SimpleEntity.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/entity/SimpleEntity.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,39 +0,0 @@
-package org.jboss.seam.test.unit.entity;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-/**
- * A simple entity class that can be used in tests.
- */
- at Entity
-public class SimpleEntity implements Serializable
-{
-   private Long id;
-
-   private String name;
-
-   @Id @GeneratedValue
-   public Long getId()
-   {
-      return id;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setId(Long id)
-   {
-      this.id = id;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/testng.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/testng.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/testng.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,78 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
-
-<suite name="Seam Unit Testsuite" verbose="2" parallel="false">
-   <test name="Seam Unit Tests Core">
-     <classes>
-       <class name="org.jboss.seam.test.unit.CoreTest"/>
-       <class name="org.jboss.seam.test.unit.InitializationTest"/>
-       <class name="org.jboss.seam.test.unit.InterceptorTest"/>
-       <class name="org.jboss.seam.test.unit.ComponentTest"/>
-       <class name="org.jboss.seam.test.unit.ContextTest"/>
-       <class name="org.jboss.seam.test.unit.DependencyTest"/>
-       <class name="org.jboss.seam.test.unit.ExpressionsTest"/>
-     </classes>
-   </test>
-   
-   <test name="Seam Unit Tests Mail">
-     <classes>
-        <class name="org.jboss.seam.test.unit.MailTest"/>
-     </classes>
-   </test>
-   
-   <test name="Seam Unit Tests BPM and Pageflow">
-     <classes>
-        <class name="org.jboss.seam.test.unit.bpm.ActorTest" />
-        <class name="org.jboss.seam.test.unit.bpm.TaskListTest" />
-        <class name="org.jboss.seam.test.unit.PageflowTest"/>
-        <class name="org.jboss.seam.test.unit.bpm.JbpmTest"/>
-     </classes>
-   </test>
-   
-   <test name="Seam Unit Tests Pages dot xml">
-     <classes>
-        <class name="org.jboss.seam.test.unit.PageActionsTest" />
-        <class name="org.jboss.seam.test.unit.PageDescriptorTest" />
-        <class name="org.jboss.seam.test.unit.PageParamTest" />
-     </classes>
-   </test>
-   
-   <test name="Seam Unit Tests JSF integration">
-     <classes>
-        <class name="org.jboss.seam.test.unit.PhaseListenerTest"/>
-     </classes>
-   </test>
-      
-   <test name="Seam Unit Tests Password Hash">
-     <classes>
-       <class name="org.jboss.seam.test.unit.PasswordHashTest"/>
-     </classes>
-   </test>
-   
-   <test name="Seam Unit Tests Framework">
-     <classes>
-        <class name="org.jboss.seam.test.unit.HomeTest" />
-        <class name="org.jboss.seam.test.unit.QueryTest" />
-     </classes>
-   </test>
-   
-   <test name="Seam Unit Tests Filters">
-     <classes>
-        <class name="org.jboss.seam.test.unit.web.MultipartRequestTest" />
-        <class name="org.jboss.seam.test.unit.web.IdentityRequestWrapperTest" />
-     </classes>
-   </test>
-   
-   <test name="Seam Unit Tests Resources and i8ln">
-     <classes>
-        <class name="org.jboss.seam.test.unit.InterpolatorTest"/>
-        <class name="org.jboss.seam.test.unit.web.ConditionalRequestTest" />
-     </classes>
-   </test>
-
-   <test name="Seam Unit Tests URL Rewrite">
-     <classes>
-        <class name="org.jboss.seam.test.unit.web.RewriteTest" />
-     </classes>
-   </test>
-
-</suite>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/ConditionalRequestTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/ConditionalRequestTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/ConditionalRequestTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,229 +0,0 @@
-package org.jboss.seam.test.unit.web;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.Date;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.seam.mock.EnhancedMockHttpServletRequest;
-import org.jboss.seam.mock.EnhancedMockHttpServletResponse;
-import org.jboss.seam.mock.MockHttpSession;
-import org.jboss.seam.web.ConditionalAbstractResource;
-import org.testng.annotations.Test;
-
-/**
- * @author Christian Bauer
- *
- */
-public class ConditionalRequestTest
-{
-   @Test
-   public void testNotModifiedOnlyETag() throws Exception
-   {
-
-      HttpSession session = new MockHttpSession();
-      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest(session);
-      EnhancedMockHttpServletResponse response = new EnhancedMockHttpServletResponse();
-
-      request.addHeader(ConditionalAbstractResource.HEADER_IF_NONE_MATCH, "\"1234\", \"5678\"");
-
-      ConditionalAbstractResource resource = new ConditionalAbstractResource()
-      {
-         public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
-         {
-            if (!sendConditional(request, response, "\"5678\"", null))
-            {
-               response.sendError(HttpServletResponse.SC_OK);
-            }
-         }
-
-         public String getResourcePath()
-         {
-            return null;
-         }
-      };
-
-      resource.getResource(request, response);
-
-      assertEquals(response.getStatus(), HttpServletResponse.SC_NOT_MODIFIED);
-      assertEquals(response.getHeader(ConditionalAbstractResource.HEADER_ETAG), "\"5678\"");
-
-   }
-
-   @Test
-   public void testModifiedOnlyETag() throws Exception
-   {
-
-      HttpSession session = new MockHttpSession();
-      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest(session);
-      EnhancedMockHttpServletResponse response = new EnhancedMockHttpServletResponse();
-
-      request.addHeader(ConditionalAbstractResource.HEADER_IF_NONE_MATCH, "\"123\", \"456\"");
-
-      ConditionalAbstractResource resource = new ConditionalAbstractResource()
-      {
-         public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
-         {
-            if (!sendConditional(request, response, "\"5678\"", null))
-            {
-               response.sendError(HttpServletResponse.SC_OK);
-            }
-         }
-
-         public String getResourcePath()
-         {
-            return null;
-         }
-      };
-
-      resource.getResource(request, response);
-
-      assertEquals(response.getStatus(), HttpServletResponse.SC_OK);
-      assertEquals(response.getHeader(ConditionalAbstractResource.HEADER_ETAG), "\"5678\"");
-   }
-
-   @Test
-   public void testNotModifiedOnlyLastModified() throws Exception
-   {
-
-      HttpSession session = new MockHttpSession();
-      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest(session);
-      EnhancedMockHttpServletResponse response = new EnhancedMockHttpServletResponse();
-
-      final Long currentTime = new Date().getTime();
-      request.addHeader(ConditionalAbstractResource.HEADER_IF_MODIFIED_SINCE, currentTime);
-
-      ConditionalAbstractResource resource = new ConditionalAbstractResource()
-      {
-         public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
-         {
-            if (!sendConditional(request, response, null, currentTime))
-            {
-               response.sendError(HttpServletResponse.SC_OK);
-            }
-         }
-
-         public String getResourcePath()
-         {
-            return null;
-         }
-      };
-
-      resource.getResource(request, response);
-
-      assertEquals(response.getStatus(), HttpServletResponse.SC_NOT_MODIFIED);
-      assertEquals(response.getHeader(ConditionalAbstractResource.HEADER_LAST_MODIFIED), currentTime);
-
-   }
-
-   @Test
-   public void testModifiedOnlyLastModified() throws Exception
-   {
-
-      HttpSession session = new MockHttpSession();
-      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest(session);
-      EnhancedMockHttpServletResponse response = new EnhancedMockHttpServletResponse();
-
-      final Long currentTime = new Date().getTime();
-      request.addHeader(ConditionalAbstractResource.HEADER_IF_MODIFIED_SINCE, currentTime);
-
-      ConditionalAbstractResource resource = new ConditionalAbstractResource()
-      {
-         public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
-         {
-            if (!sendConditional(request, response, null, currentTime + 5000))
-            {
-               response.sendError(HttpServletResponse.SC_OK);
-            }
-         }
-
-         public String getResourcePath()
-         {
-            return null;
-         }
-      };
-
-      resource.getResource(request, response);
-
-      assertEquals(response.getStatus(), HttpServletResponse.SC_OK);
-      assertEquals(response.getHeader(ConditionalAbstractResource.HEADER_LAST_MODIFIED), currentTime + 5000);
-
-   }
-
-   @Test
-   public void testNotModifiedETagLastModified() throws Exception
-   {
-
-      HttpSession session = new MockHttpSession();
-      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest(session);
-      EnhancedMockHttpServletResponse response = new EnhancedMockHttpServletResponse();
-
-      final Long currentTime = new Date().getTime();
-      request.addHeader(ConditionalAbstractResource.HEADER_IF_MODIFIED_SINCE, currentTime);
-      request.addHeader(ConditionalAbstractResource.HEADER_IF_NONE_MATCH, "\"1234\", \"5678\"");
-
-      ConditionalAbstractResource resource = new ConditionalAbstractResource()
-      {
-         public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
-         {
-            if (!sendConditional(request, response, "\"5678\"", currentTime))
-            {
-               response.sendError(HttpServletResponse.SC_OK);
-            }
-         }
-
-         public String getResourcePath()
-         {
-            return null;
-         }
-      };
-
-      resource.getResource(request, response);
-
-      assertEquals(response.getStatus(), HttpServletResponse.SC_NOT_MODIFIED);
-      assertEquals(response.getHeader(ConditionalAbstractResource.HEADER_LAST_MODIFIED), currentTime);
-      assertEquals(response.getHeader(ConditionalAbstractResource.HEADER_ETAG), "\"5678\"");
-
-   }
-
-   @Test
-   public void testModifiedETagLastModified() throws Exception
-   {
-
-      HttpSession session = new MockHttpSession();
-      EnhancedMockHttpServletRequest request = new EnhancedMockHttpServletRequest(session);
-      EnhancedMockHttpServletResponse response = new EnhancedMockHttpServletResponse();
-
-      final Long currentTime = new Date().getTime();
-      request.addHeader(ConditionalAbstractResource.HEADER_IF_MODIFIED_SINCE, currentTime);
-      request.addHeader(ConditionalAbstractResource.HEADER_IF_NONE_MATCH, "\"1234\", \"5678\"");
-
-      ConditionalAbstractResource resource = new ConditionalAbstractResource()
-      {
-         public void getResource(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
-         {
-            if (!sendConditional(request, response, "\"5678\"", currentTime + 5000))
-            {
-               response.sendError(HttpServletResponse.SC_OK);
-            }
-         }
-
-         public String getResourcePath()
-         {
-            return null;
-         }
-      };
-
-      resource.getResource(request, response);
-
-      assertEquals(response.getStatus(), HttpServletResponse.SC_OK);
-      assertEquals(response.getHeader(ConditionalAbstractResource.HEADER_LAST_MODIFIED), currentTime + 5000);
-      assertEquals(response.getHeader(ConditionalAbstractResource.HEADER_ETAG), "\"5678\"");
-
-   }
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/IdentityRequestWrapperTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/IdentityRequestWrapperTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/IdentityRequestWrapperTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,73 +0,0 @@
-package org.jboss.seam.test.unit.web;
-
-import java.security.Principal;
-import java.util.Arrays;
-import java.util.HashSet;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.seam.Seam;
-import org.jboss.seam.mock.MockHttpServletRequest;
-import org.jboss.seam.mock.MockHttpSession;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.SimplePrincipal;
-import org.jboss.seam.web.IdentityRequestWrapper;
-import org.testng.annotations.Test;
-
-public class IdentityRequestWrapperTest
-{
-   private static final String JAAS_USER = "jaasUser";
-   
-   private static final String JAAS_ROLE = "jaasRole";
-   
-   private static final String SEAM_USER = "seamUser";
-   
-   private static final String SEAM_ROLE = "seamRole";
-   
-   @Test
-   public void testWithSeamSecurityEnabled()
-   {
-      HttpServletRequest request = initializeWrappedRequest();
-      if (!Identity.isSecurityEnabled())
-      {
-         Identity.setSecurityEnabled(true);
-      }
-      assert request.getUserPrincipal() != null && request.getUserPrincipal().getName().equals(SEAM_USER);
-      assert request.getRemoteUser() != null && request.getRemoteUser().equals(SEAM_USER);
-      assert request.isUserInRole(SEAM_ROLE);
-   }
-   
-   @Test
-   public void testWithSeamSecurityDisabled()
-   {
-      HttpServletRequest request = initializeWrappedRequest();
-      Identity.setSecurityEnabled(false);
-      assert request.getUserPrincipal() != null && request.getUserPrincipal().getName().equals(JAAS_USER);
-      assert request.getRemoteUser() != null && request.getRemoteUser().equals(JAAS_USER);
-      assert request.isUserInRole(JAAS_ROLE);
-   }
-   
-   public HttpServletRequest initializeWrappedRequest() {
-      HttpSession session = new MockHttpSession();
-      Identity identity = new Identity() {
-
-         @Override
-         public Principal getPrincipal()
-         {
-            return new SimplePrincipal(SEAM_USER);
-         }
-
-         @Override
-         public boolean hasRole(String role)
-         {
-            return SEAM_ROLE.equals(role);
-         }
-         
-      };
-      session.setAttribute(Seam.getComponentName(Identity.class), identity);
-      HttpServletRequest request = new MockHttpServletRequest(session, JAAS_USER, new HashSet<String>(Arrays.asList(JAAS_ROLE)), null, "GET");
-      return new IdentityRequestWrapper(request);
-   }
-   
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/MultipartRequestTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/MultipartRequestTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/MultipartRequestTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,94 +0,0 @@
-package org.jboss.seam.test.unit.web;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashSet;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.seam.mock.MockHttpServletRequest;
-import org.jboss.seam.mock.MockHttpServletResponse;
-import org.jboss.seam.mock.MockHttpSession;
-import org.jboss.seam.mock.MockServletContext;
-import org.jboss.seam.util.Resources;
-import org.jboss.seam.web.MultipartFilter;
-import org.jboss.seam.web.MultipartRequest;
-import org.testng.annotations.Test;
-
-/**
- * @author Pete Muir
- *
- */
-public class MultipartRequestTest
-{
-    
-    @Test
-    public void testMultipartRequest() throws IOException, ServletException
-    {
-        MultipartFilter filter = new MultipartFilter();
-        ServletContext context = new MockServletContext();
-        HttpSession session = new MockHttpSession(context);
-        MockHttpServletRequest request = new MockHttpServletRequest(session, "Pete", new HashSet<String>(), new Cookie[0], "post") 
-        {
-            
-            private final InputStream is = Resources.getResourceAsStream("/META-INF/seam.properties", null);
-            
-            @Override
-            public String getContentType()
-            {
-                return "multipart/test; boundary=foo";
-            }
-            
-            @Override
-            public ServletInputStream getInputStream() throws IOException
-            {
-                return new ServletInputStream() {
-
-                    @Override
-                    public int read() throws IOException
-                    {
-                        return is.read();
-                    }
-                    
-                    @Override
-                    public int read(byte[] b) throws IOException
-                    {
-                        return is.read(b);
-                    }
-                    
-                };
-            }
-            
-        };
-        // Add some parameters to test passthrough
-        String [] fooParams = {"bar"}; 
-        request.getParameterMap().put("foo", fooParams);
-        ServletResponse response = new MockHttpServletResponse();
-        FilterChain chain = new FilterChain() 
-        {
-
-            public void doFilter(ServletRequest request, ServletResponse response)
-                    throws IOException, ServletException
-            {
-                assert request instanceof MultipartRequest;
-                MultipartRequest multipartRequest = (MultipartRequest) request;
-                assert multipartRequest.getParameterMap().containsKey("foo");
-				// Test passthrough parameters
-                assert multipartRequest.getParameterValues("foo").length == 1;
-                assert "bar".equals(multipartRequest.getParameterValues("foo")[0]);
-                
-                // TODO Test a multipart request
-            }
-            
-        };
-        filter.doFilter(request, response, chain);
-    }
-
-}

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/RewriteTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/RewriteTest.java	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/web/RewriteTest.java	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,135 +0,0 @@
-package org.jboss.seam.test.unit.web;
-
-import org.testng.annotations.Test;
-
-import org.jboss.seam.web.Pattern;
-import org.jboss.seam.web.Rewrite;
-import org.jboss.seam.web.ServletMapping;
-
-import static org.testng.Assert.*;
-
-public class RewriteTest 
-{
-    @Test
-    public void testBasicInPattern()
-        throws Exception
-    {
-        Pattern pattern = new Pattern("/foo.seam", "/foo");
-        pattern.setViewMapping(new ServletMapping("*.seam"));
-                 
-        testNoMatchIn(pattern, "/bar");
-        testNoMatchIn(pattern, "/fool");
-        testNoMatchIn(pattern, "/foo.seam");
-        testNoMatchIn(pattern, "/foo/");
-        testNoMatchIn(pattern, "/foo/bar");
-
-        testMatchIn(pattern, "/foo",     "/foo.seam");
-        testMatchIn(pattern, "/foo?x=y", "/foo.seam?x=y");   
-    }
-    
-    @Test
-    public void testSingleArgInPattern()
-        throws Exception
-    {
-        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}");
-        pattern.setViewMapping(new ServletMapping("*.seam"));
-                        
-        testNoMatchIn(pattern, "/foo");
-        testNoMatchIn(pattern, "/foo/bar/baz");
-        testNoMatchIn(pattern, "/foo/bar/baz?x=y");
-        testNoMatchIn(pattern, "/foo/bar/?x=y");
-
-        testMatchIn(pattern, "/foo/",         "/foo.seam?id=");
-        testMatchIn(pattern, "/foo/bar",      "/foo.seam?id=bar");
-        testMatchIn(pattern, "/foo/bar?x=y",  "/foo.seam?x=y&id=bar");
-    }
-
-    @Test
-    public void testMultiArgInPattern()
-        throws Exception
-    {
-        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}/{action}");
-        pattern.setViewMapping(new ServletMapping("*.seam"));
-                              
-        testNoMatchIn(pattern, "/foo");
-        testNoMatchIn(pattern, "/foo/bar");
-        testNoMatchIn(pattern, "/foo/bar/baz/qux");
-
-        testMatchIn(pattern, "/foo/bar/baz",     "/foo.seam?id=bar&action=baz");
-        testMatchIn(pattern, "/foo/bar/baz?x=y", "/foo.seam?x=y&id=bar&action=baz");
-    }
-    
-    
-    @Test
-    public void testBasicOutPattern()
-        throws Exception
-    {
-        Pattern pattern = new Pattern("/foo.seam", "/foo");
-        pattern.setViewMapping(new ServletMapping("*.seam"));
-                 
-        testNoMatchOut(pattern, "/bar.seam");
-        testNoMatchOut(pattern, "/fool.seam");
-        testNoMatchOut(pattern, "/foo");
-        
-        testMatchOut(pattern, "/foo.seam",      "/foo");
-        testMatchOut(pattern, "/foo.seam?x=y",  "/foo?x=y");
-    }
-    
-    
-    @Test
-    public void testSingleArgOutPattern()
-        throws Exception
-    {
-        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}");
-        pattern.setViewMapping(new ServletMapping("*.seam"));
-                        
-        testNoMatchOut(pattern, "/foo.seam");
-        testNoMatchOut(pattern, "/foo.seam?x=y");
-        testNoMatchOut(pattern, "/foo.seam/bar");       
-        //should this match?  
-        //testNoMatchOut(pattern, "/foo.seam/bar?id=test");       
-        
-        testMatchOut(pattern, "/foo.seam?id=bar",      "/foo/bar");
-        testMatchOut(pattern, "/foo.seam?x=y&id=bar",  "/foo/bar?x=y");
-        testMatchOut(pattern, "/foo.seam?id=bar&x=y",  "/foo/bar?x=y");
-        testMatchOut(pattern, "/foo.seam?a=b&x=y&id=bar&c=d&c=e",  "/foo/bar?a=b&x=y&c=d&c=e");
-    }
-    
-    @Test
-    public void testMultiArgOutPattern()
-        throws Exception
-    {
-        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}/{action}");
-        pattern.setViewMapping(new ServletMapping("*.seam"));
-                              
-        testNoMatchOut(pattern, "/foo.seam");
-        testNoMatchOut(pattern, "/foo.seam?id=bar");
-        testNoMatchOut(pattern, "/foo.seam?action=baz");
-
-        testMatchOut(pattern, "/foo.seam?action=baz&id=bar", "/foo/bar/baz");
-        testMatchOut(pattern, "/foo.seam?y=z&action=baz&n=one&n=two&id=bar&x=y", "/foo/bar/baz?y=z&n=one&n=two&x=y");
-    }
-    
-    
-    public void testNoMatchIn(Pattern pattern, String incoming) {
-        assertNull(pattern.matchIncoming(incoming), incoming);
-    }
-    
-    public void testNoMatchOut(Pattern pattern, String incoming) {
-        assertNull(pattern.matchOutgoing(incoming), incoming);
-    }
-    
-    public void testMatchIn(Pattern pattern, String incoming, String expected) {
-        Rewrite rewrite = pattern.matchIncoming(incoming);
-        assertTrue(rewrite.isMatch(), incoming);
-        assertEquals(rewrite.rewrite(), expected);
-    }
-    
-    public void testMatchOut(Pattern pattern, String incoming, String expected) {
-        Rewrite rewrite = pattern.matchOutgoing(incoming);
-        assertTrue(rewrite.isMatch(), incoming);
-        assertEquals(rewrite.rewrite(), expected);
-    }
-
-}
-

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/META-INF/pagesForPageActionsTest.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/META-INF/pagesForPageActionsTest.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/META-INF/pagesForPageActionsTest.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<pages xmlns="http://jboss.com/products/seam/pages"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://jboss.com/products/seam/pages
-		http://jboss.com/products/seam/pages-2.3.xsd">
-
-	<page view-id="/action-test01a.xhtml">
-		<action execute="#{testActions.nonNullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-	</page>
-
-	<page view-id="/action-test01b.xhtml" action="#{testActions.nonNullActionA}">
-		<description>#{fineDescription}</description>
-		<action execute="#{testActions.nonNullActionB}" />
-	</page>
-	
-	<page view-id="/action-test01*">
-		<description>coarse-description</description>
-		<navigation from-action="#{testActions.nonNullActionA}">
-			<rule if-outcome="outcomeA">
-				<render view-id="/pageA.xhtml" />
-			</rule>
-		</navigation>
-
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<render view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test02.xhtml">
-		<action execute="#{testActions.nonNullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		<action execute="#{testActions.nonNullActionC}" />
-		
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<render view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test03.xhtml">
-		<action execute="#{testActions.nullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		
-		<navigation from-action="#{testActions.nullActionA}">
-			<render view-id="/pageA.xhtml"/>
-		</navigation>
-		
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<render view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test04.xhtml">
-		<action execute="#{testActions.nullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		<action execute="#{testActions.nonNullActionC}" />
-		
-		<navigation>
-			<rule>
-				<render view-id="/action-test04.xhtml"/>
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test05.xhtml">
-		<action execute="#{testActions.nonNullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		
-		<navigation from-action="#{testActions.nonNullActionA}">
-			<rule if-outcome="outcomeA">
-				<redirect view-id="/pageA.xhtml" />
-			</rule>
-		</navigation>
-
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<redirect view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-
-	<page view-id="/action-test06.xhtml">
-		<action execute="#{testActions.nonNullActionA}"/>
-		<action execute="#{testActions.nonNullActionB}" on-postback="false"/>
-	</page>
-	
-	<!-- The next two page nodes (action-test99*) demonstrate the old
-	behavior, where successive actions could trigger navigations on
-	different page nodes because the viewId changes mid-run -->
-	<page view-id="/action-test99a.xhtml">
-		<action execute="#{testActions.nonNullActionA}" />
-		<action execute="#{testActions.nonNullActionB}" />
-		
-		<navigation from-action="#{testActions.nonNullActionA}">
-			<rule if-outcome="outcomeA">
-				<render view-id="/action-test99b.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/action-test99b.xhtml">
-		<action execute="#{testActions.nonNullActionC}" />
-
-		<navigation from-action="#{testActions.nonNullActionB}">
-			<rule if-outcome="outcomeB">
-				<render view-id="/pageB.xhtml" />
-			</rule>
-		</navigation>
-	</page>
-	
-	<page view-id="/end-conversation-test.xhtml">
-		<end-conversation />
-	</page>
-	
-	<page view-id="/end-root-conversation-test.xhtml">
-		<end-conversation root="true" />
-	</page>
-
-</pages>

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/META-INF/seam.properties
===================================================================
Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/SeamTextTest.txt
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/SeamTextTest.txt	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/SeamTextTest.txt	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,104 +0,0 @@
-+Seam Text!
-This page demonstrates Seam Text.
-
-++Some examples:
-
-Here is some wiki text: 
-*bold* |mono| ~deleted~ _underline_ /italic/ ^super^
-
-This is a new paragraph. (Just leave a blank line.)
-
-*/_Multiple ~tags~ styles_ can be nested!/*
-
-Special characters can be escaped: \| \* \_ 
-
-This is especially useful for HTML: \<notatag\> \&notanentity;
-
-But if we don't want to use escapes in our preformatted
-text, we can wrap it in backwards quotes, and special 
-characters get escaped automagically:
-
-`//This is some code:
-
-<some-tag/>
-"a string" 
-a_variable_name 
-a||b 
-x=y*z/2`
-
-We wrap quoted text in double quotes:
-
-"This is a block quote with /formatting/. The quote can cross multiple 
-lines, but a blank line does not start a new paragraph. If you
-need multiple paragraphs in a quote, you have to use \<p\>."
-
-You can even have "a quote", or `some code` inside
-a regular paragraph!
-
-We use ordinary old HTML for tables: 
-
-<table>
-   <tr><td>foo</td><td>*bar*</td><td>baz</td></tr><tr>
-   <td>fee</td>
-   <td>fi</td>
-   <td>/fo/</td>
-   </tr>
-</table>
-
-And we can use HTML for lists: 
-
-<ol>
-   <li>foo</li>
-   <li>*bar*</li>
-   <li>/baz/</li>
-</ol>
-
-<ul><li>foo</li><li>*bar*</li><li>/baz/</li></ul>
-
-But if the items fit on a line, we can use \#
-for ordered lists:
-
-# item 1
-# item 2
-# item 3
-
-And \= for unordered lists:
-
-= item 1
-= item 2
-= item 3
-
-We use HTML for <a href="http://www.hibernate.org/">links</a>.
-
-Or we can use [a special syntax=>http://jboss.com/products/seam] to
-link to [=>http://jboss.com/products/seam].
-
-And for images: <img src="http://www.hibernate.org/tpl/jboss/img/01_oben_logo.gif"/>
-
-And even for more exotic formatting, for example:
-
-<q>This is a /HTML/ quote with a <a href="http://jboss.org/">link</a>, 
-and a "nested quote" and even `some code` in it.</q>
-
-<p>
-This is a HTML paragraph with some lists:
-
-# item 1
-# item 2
-
-= an item
-= another item
-
-And "a quote" in it.
-</p>
-
-Oh, and one last thing:
-
-"This is a block quote with
-
-= a list,
-= with 2 items
-
-and <i>some HTML</i> formatting and `some code` and
-and <a href="http://jboss.com/products/seam"><i>yet 
-another</i> link</a>."

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/component/ConfigurableComponent.component.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/component/ConfigurableComponent.component.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/component/ConfigurableComponent.component.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component>
-      <property name="primaryColor">RED</property>   
-</component>
\ No newline at end of file

Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/component/MyEntityHome.component.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/component/MyEntityHome.component.xml	2012-03-14 17:27:54 UTC (rev 14387)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/resources/org/jboss/seam/test/unit/component/MyEntityHome.component.xml	2012-03-14 17:34:37 UTC (rev 14388)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://jboss.com/products/seam/components"
-	xmlns:framework="http://jboss.com/products/seam/framework"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="
-		http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd 
-		http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.3.xsd">
-	
-	<!-- NOTE: The presence of this file exercises the test to verify that the class attribute is read on namespaced elements.
-		 The reason this attribute is significant in this case is because the namespace references a class that does not have @Name.
-		 To allow Seam to locate the @Name annotation, the subclass must be provided. -->
-	<framework:entity-home name="myEntityHome" class="org.jboss.seam.test.unit.component.MyEntityHome">
-		<framework:id>1#{1}</framework:id>
-		<framework:new-instance>#{simpleEntity}</framework:new-instance>
-		<framework:created-message>You #{'created'} it! Yeah!</framework:created-message>
-		<framework:updated-message>You updated it! Yeah!</framework:updated-message>
-		<framework:deleted-message>You deleted it! Yeah!</framework:deleted-message>
-	</framework:entity-home>
-	
-	<component name="simpleEntity" class="org.jboss.seam.test.unit.entity.SimpleEntity"/>
-		
-</components>



More information about the seam-commits mailing list