signature:
public class StatefulSessionSynchronizationInterceptor { /** * Use either the active transaction or the current thread as the lock owner
 * @ return The lock owner */
private static Object getLockOwner ( final TransactionSynchronizationRegistry transactionSynchronizationRegistry ) { } }

implementation: Object owner = transactionSynchronizationRegistry . getTransactionKey ( ) ; return owner != null ? owner : Thread . currentThread ( ) ;


signature:
public class StatefulSessionSynchronizationInterceptor { /** * Releases the passed { @ link StatefulSessionComponentInstance } i . e . marks it as no longer in use . After releasing the
 * instance , this method releases the lock , held by this thread , on the stateful component instance .
 * @ param instance The stateful component instance
 * @ param toDiscard indicates if bean should be discarded due to exception */
static void releaseInstance ( final StatefulSessionComponentInstance instance , boolean toDiscard ) { } }

implementation:
try { if ( ! instance . isDiscarded ( ) && ! toDiscard ) { // mark the SFSB instance as no longer in use
instance . getComponent ( ) . getCache ( ) . release ( instance ) ; } } finally { instance . setSynchronizationRegistered ( false ) ; // release the lock on the SFSB instance
releaseLock ( instance ) ; }


signature:
public class StatefulSessionSynchronizationInterceptor { /** * Releases the lock , held by this thread , on the stateful component instance . */
static void releaseLock ( final StatefulSessionComponentInstance instance ) { } }

implementation: instance . getLock ( ) . unlock ( getLockOwner ( instance . getComponent ( ) . getTransactionSynchronizationRegistry ( ) ) ) ; ROOT_LOGGER . tracef ( "Released lock: %s" , instance . getLock ( ) ) ;


signature:
public class JdrZipFile { /** * Adds the contents of the { @ link InputStream } to the path in the zip .
 * This method allows for absolute control of the destination of the content to be stored .
 * It is not common to use this method .
 * @ param is content to write
 * @ param path destination to write to in the zip file */
public void add ( InputStream is , String path ) { } }

implementation: byte [ ] buffer = new byte [ 1024 ] ; try { String entryName = this . baseName + "/" + path ; ZipEntry ze = new ZipEntry ( entryName ) ; zos . putNextEntry ( ze ) ; int bytesRead = is . read ( buffer ) ; while ( bytesRead > - 1 ) { zos . write ( buffer , 0 , bytesRead ) ; bytesRead = is . read ( buffer ) ; } } catch ( ZipException ze ) { ROOT_LOGGER . debugf ( ze , "%s is already in the zip" , path ) ; } catch ( Exception e ) { ROOT_LOGGER . debugf ( e , "Error when adding %s" , path ) ; } finally { try { zos . closeEntry ( ) ; } catch ( Exception e ) { ROOT_LOGGER . debugf ( e , "Error when closing entry for %s" , path ) ; } }


signature:
public class JdrZipFile { /** * Adds the content of the { @ link InputStream } to the zip in a location that mirrors where { @ link VirtualFile file } is located .
 * For example if { @ code file } is at { @ code / tmp / foo / bar } and { @ code $ JBOSS _ HOME } is { @ code tmp } then the destination will be { @ code JBOSSHOME / foo / bar }
 * @ param file { @ link VirtualFile } where metadata is read from
 * @ param is content to write to the zip file
 * @ throws Exception */
public void add ( VirtualFile file , InputStream is ) throws Exception { } }

implementation: String name = "JBOSS_HOME" + file . getPhysicalFile ( ) . getAbsolutePath ( ) . substring ( this . jbossHome . length ( ) ) ; this . add ( is , name ) ;


signature:
public class JdrZipFile { /** * Adds content to the zipfile at path
 * path is prepended with the directory reserved for generated text files in JDR
 * @ param content
 * @ param path
 * @ throws Exception */
public void add ( String content , String path ) throws Exception { } }

implementation: StringBuilder name = new StringBuilder ( "sos_strings/" ) ; name . append ( this . env . getProductName ( ) . replace ( " " , "_" ) . toLowerCase ( ) ) ; name . append ( "-" ) ; name . append ( this . env . getProductVersion ( ) . split ( "\\." ) [ 0 ] ) ; name . append ( "/" ) ; name . append ( path ) ; this . add ( new ByteArrayInputStream ( content . getBytes ( StandardCharsets . UTF_8 ) ) , name . toString ( ) ) ;


signature:
public class JdrZipFile { /** * Adds content to the zipfile at path
 * path is prepended with the directory reserved for generated text files in JDR
 * @ param stream
 * @ param path
 * @ throws Exception */
public void addAsString ( InputStream stream , String path ) throws Exception { } }

implementation: StringBuilder name = new StringBuilder ( "sos_strings/" ) ; name . append ( this . env . getProductName ( ) . replace ( " " , "_" ) . toLowerCase ( ) ) ; name . append ( "-" ) ; name . append ( this . env . getProductVersion ( ) . split ( "\\." ) [ 0 ] ) ; name . append ( "/" ) ; name . append ( path ) ; this . add ( stream , name . toString ( ) ) ;


signature:
public class JdrZipFile { /** * Adds content to the zipfile in a file named logName
 * path is prepended with the directory reserved for JDR log files
 * @ param content
 * @ param logName
 * @ throws Exception */
public void addLog ( String content , String logName ) throws Exception { } }

implementation: String name = "sos_logs/" + logName ; this . add ( new ByteArrayInputStream ( content . getBytes ( StandardCharsets . UTF_8 ) ) , name ) ;


signature:
public class SecurityActions { /** * Creates a thread with the specified { @ code Runnable } and name .
 * @ param runnable the { @ code Runnable } to be set in the new { @ code Thread } .
 * @ param threadName the name of the new { @ code Thread } .
 * @ return the construct { @ code Thread } instance . */
static Thread createThread ( final Runnable runnable , final String threadName ) { } }

implementation: return ! WildFlySecurityManager . isChecking ( ) ? new Thread ( runnable , threadName ) : doPrivileged ( new CreateThreadAction ( runnable , threadName ) ) ;


signature:
public class JSFDependencyProcessor { /** * / * private boolean isJSFSpecOver1_1 ( ModuleIdentifier jsfModule , ModuleDependency jsfAPI ) throws DeploymentUnitProcessingException {
 * try {
 * return ( jsfAPI . getModuleLoader ( ) . loadModule ( jsfModule ) . getClassLoader ( ) . getResource ( " / javax / faces / component / ActionSource2 . class " ) ! = null ) ;
 * } catch ( ModuleLoadException e ) {
 * throw new DeploymentUnitProcessingException ( e ) ; */
private void addJSFImpl ( String jsfVersion , ModuleSpecification moduleSpecification , ModuleLoader moduleLoader ) { } }

implementation: if ( jsfVersion . equals ( JsfVersionMarker . WAR_BUNDLES_JSF_IMPL ) ) return ; ModuleIdentifier jsfModule = moduleIdFactory . getImplModId ( jsfVersion ) ; ModuleDependency jsfImpl = new ModuleDependency ( moduleLoader , jsfModule , false , false , true , false ) ; jsfImpl . addImportFilter ( PathFilters . getMetaInfFilter ( ) , true ) ; moduleSpecification . addSystemDependency ( jsfImpl ) ;


signature:
public class JSFDependencyProcessor { /** * a CDI ViewHandler . */
private void addCDIFlag ( WarMetaData warMetaData , DeploymentUnit deploymentUnit ) { } }

implementation: JBossWebMetaData webMetaData = warMetaData . getMergedJBossWebMetaData ( ) ; if ( webMetaData == null ) { webMetaData = new JBossWebMetaData ( ) ; warMetaData . setMergedJBossWebMetaData ( webMetaData ) ; } List < ParamValueMetaData > contextParams = webMetaData . getContextParams ( ) ; if ( contextParams == null ) { contextParams = new ArrayList < ParamValueMetaData > ( ) ; } boolean isCDI = false ; final CapabilityServiceSupport support = deploymentUnit . getAttachment ( Attachments . CAPABILITY_SERVICE_SUPPORT ) ; if ( support . hasCapability ( WELD_CAPABILITY_NAME ) ) { isCDI = support . getOptionalCapabilityRuntimeAPI ( WELD_CAPABILITY_NAME , WeldCapability . class ) . get ( ) . isPartOfWeldDeployment ( deploymentUnit ) ; } ParamValueMetaData param = new ParamValueMetaData ( ) ; param . setParamName ( IS_CDI_PARAM ) ; param . setParamValue ( Boolean . toString ( isCDI ) ) ; contextParams . add ( param ) ; webMetaData . setContextParams ( contextParams ) ;


signature:
public class AbstractInvocationHandler { /** * Gets endpoint container lazily .
 * @ return endpoint container */
protected ComponentView getComponentView ( ) { } }

implementation:
ComponentView cv = componentView ; // we need to check both , otherwise it is possible for
// componentView to be initialized before reference
if ( cv == null ) { synchronized ( this ) { cv = componentView ; if ( cv == null ) { cv = getMSCService ( componentViewName , ComponentView . class ) ; if ( cv == null ) { throw WSLogger . ROOT_LOGGER . cannotFindComponentView ( componentViewName ) ; } if ( reference == null ) { try { reference = cv . createInstance ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } componentView = cv ; } } } return cv ;


signature:
public class AbstractInvocationHandler { /** * Invokes WS endpoint .
 * @ param endpoint WS endpoint
 * @ param wsInvocation web service invocation
 * @ throws Exception if any error occurs */
public void invoke ( final Endpoint endpoint , final Invocation wsInvocation ) throws Exception { } }

implementation: try { if ( ! EndpointState . STARTED . equals ( endpoint . getState ( ) ) ) { throw WSLogger . ROOT_LOGGER . endpointAlreadyStopped ( endpoint . getShortName ( ) ) ; } SecurityDomainContext securityDomainContext = endpoint . getSecurityDomainContext ( ) ; securityDomainContext . runAs ( ( Callable < Void > ) ( ) -> { invokeInternal ( endpoint , wsInvocation ) ; return null ; } ) ; } catch ( Throwable t ) { handleInvocationException ( t ) ; } finally { onAfterInvocation ( wsInvocation ) ; }


signature:
public class AbstractInvocationHandler { /** * Translates SEI method to component view method .
 * @ param seiMethod SEI method
 * @ param viewMethods component view methods
 * @ return matching component view method */
protected Method getComponentViewMethod ( final Method seiMethod , final Collection < Method > viewMethods ) { } }

implementation: for ( final Method viewMethod : viewMethods ) { if ( matches ( seiMethod , viewMethod ) ) { return viewMethod ; } } throw new IllegalStateException ( ) ;


signature:
public class AbstractInvocationHandler { /** * Compares two methods if they are identical .
 * @ param seiMethod reference method
 * @ param viewMethod target method
 * @ return true if they match , false otherwise */
private boolean matches ( final Method seiMethod , final Method viewMethod ) { } }

implementation: if ( ! seiMethod . getName ( ) . equals ( viewMethod . getName ( ) ) ) return false ; final Class < ? > [ ] sourceParams = seiMethod . getParameterTypes ( ) ; final Class < ? > [ ] targetParams = viewMethod . getParameterTypes ( ) ; if ( sourceParams . length != targetParams . length ) return false ; for ( int i = 0 ; i < sourceParams . length ; i ++ ) { if ( ! sourceParams [ i ] . equals ( targetParams [ i ] ) ) return false ; } return true ;


signature:
public class JPAService { /** * Create single instance of management statistics resource per managementAdaptor version .
 * ManagementAccess
 * The persistence provider and jipijapa adapters will be in the same classloader ,
 * either a static module or included directly in the application . Those are the two supported use
 * cases for management of deployment persistence units also .
 * From a management point of view , the requirements are :
 * 1 . show management statistics for static persistence provider modules and applications that have
 * their own persistence provider module .
 * 2 . persistence provider adapters will provide a unique key that identifies the management version of supported
 * management statistics / operations . For example , Hibernate 3 . x might be 1.0 , Hibernate 4.1/4.2 might
 * be version 2.0 and Hibernate 4.3 could be 2.0 also as long as its compatible ( same stats ) with 4.1/4.2.
 * Eventually , a Hibernate ( later version ) change in statistics is likely to happen , the management version
 * will be incremented .
 * @ param managementAdaptor the management adaptor that will provide statistics
 * @ param scopedPersistenceUnitName name of the persistence unit
 * @ param deploymentUnit deployment unit for the deployment requesting a resource
 * @ return the management resource */
public static Resource createManagementStatisticsResource ( final ManagementAdaptor managementAdaptor , final String scopedPersistenceUnitName , final DeploymentUnit deploymentUnit ) { } }

implementation:
synchronized ( existingResourceDescriptionResolver ) { final EntityManagerFactoryLookup entityManagerFactoryLookup = new EntityManagerFactoryLookup ( ) ; final Statistics statistics = managementAdaptor . getStatistics ( ) ; if ( false == existingResourceDescriptionResolver . contains ( managementAdaptor . getVersion ( ) ) ) { // setup statistics ( this used to be part of JPA subsystem startup )
ResourceDescriptionResolver resourceDescriptionResolver = new StandardResourceDescriptionResolver ( statistics . getResourceBundleKeyPrefix ( ) , statistics . getResourceBundleName ( ) , statistics . getClass ( ) . getClassLoader ( ) ) { private ResourceDescriptionResolver fallback = JPAExtension . getResourceDescriptionResolver ( ) ; // add a fallback in case provider doesn ' t have all properties properly defined
@ Override public String getResourceAttributeDescription ( String attributeName , Locale locale , ResourceBundle bundle ) { if ( bundle . containsKey ( getBundleKey ( attributeName ) ) ) { return super . getResourceAttributeDescription ( attributeName , locale , bundle ) ; } else { return fallback . getResourceAttributeDescription ( attributeName , locale , fallback . getResourceBundle ( locale ) ) ; } } } ; PathElement subsystemPE = PathElement . pathElement ( ModelDescriptionConstants . SUBSYSTEM , JPAExtension . SUBSYSTEM_NAME ) ; ManagementResourceRegistration deploymentResourceRegistration = deploymentUnit . getAttachment ( DeploymentModelUtils . MUTABLE_REGISTRATION_ATTACHMENT ) ; ManagementResourceRegistration deploymentSubsystemRegistration = deploymentResourceRegistration . getSubModel ( PathAddress . pathAddress ( subsystemPE ) ) ; ManagementResourceRegistration subdeploymentSubsystemRegistration = deploymentResourceRegistration . getSubModel ( PathAddress . pathAddress ( PathElement . pathElement ( ModelDescriptionConstants . SUBDEPLOYMENT ) , subsystemPE ) ) ; ManagementResourceRegistration providerResource = deploymentSubsystemRegistration . registerSubModel ( new ManagementResourceDefinition ( PathElement . pathElement ( managementAdaptor . getIdentificationLabel ( ) ) , resourceDescriptionResolver , statistics , entityManagerFactoryLookup ) ) ; providerResource . registerReadOnlyAttribute ( PersistenceUnitServiceHandler . SCOPED_UNIT_NAME , null ) ; providerResource = subdeploymentSubsystemRegistration . registerSubModel ( new ManagementResourceDefinition ( PathElement . pathElement ( managementAdaptor . getIdentificationLabel ( ) ) , resourceDescriptionResolver , statistics , entityManagerFactoryLookup ) ) ; providerResource . registerReadOnlyAttribute ( PersistenceUnitServiceHandler . SCOPED_UNIT_NAME , null ) ; existingResourceDescriptionResolver . add ( managementAdaptor . getVersion ( ) ) ; } // create ( per deployment ) dynamic Resource implementation that can reflect the deployment specific names ( e . g . jpa entity classname / Hibernate region name )
return new DynamicManagementStatisticsResource ( statistics , scopedPersistenceUnitName , managementAdaptor . getIdentificationLabel ( ) , entityManagerFactoryLookup ) ; }


signature:
public class TransactionSubsystem11Parser { /** * { @ inheritDoc } */
@ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { } }

implementation:
// no attributes
if ( reader . getAttributeCount ( ) > 0 ) { throw unexpectedAttribute ( reader , 0 ) ; } final ModelNode address = new ModelNode ( ) ; address . add ( ModelDescriptionConstants . SUBSYSTEM , TransactionExtension . SUBSYSTEM_NAME ) ; address . protect ( ) ; final ModelNode subsystem = new ModelNode ( ) ; subsystem . get ( OP ) . set ( ADD ) ; subsystem . get ( OP_ADDR ) . set ( address ) ; list . add ( subsystem ) ; // elements
final EnumSet < Element > required = EnumSet . of ( Element . RECOVERY_ENVIRONMENT , Element . CORE_ENVIRONMENT ) ; final EnumSet < Element > encountered = EnumSet . noneOf ( Element . class ) ; while ( reader . hasNext ( ) && reader . nextTag ( ) != END_ELEMENT ) { switch ( Namespace . forUri ( reader . getNamespaceURI ( ) ) ) { case TRANSACTIONS_1_1 : { final Element element = Element . forName ( reader . getLocalName ( ) ) ; required . remove ( element ) ; if ( ! encountered . add ( element ) ) { throw unexpectedElement ( reader ) ; } switch ( element ) { case RECOVERY_ENVIRONMENT : { parseRecoveryEnvironmentElement ( reader , subsystem ) ; break ; } case CORE_ENVIRONMENT : { parseCoreEnvironmentElement ( reader , subsystem ) ; break ; } case COORDINATOR_ENVIRONMENT : { parseCoordinatorEnvironmentElement ( reader , subsystem ) ; break ; } case OBJECT_STORE : { parseObjectStoreEnvironmentElementAndEnrichOperation ( reader , subsystem ) ; break ; } case JTS : { parseJts ( reader , subsystem ) ; break ; } default : { throw unexpectedElement ( reader ) ; } } break ; } default : { throw unexpectedElement ( reader ) ; } } } if ( ! required . isEmpty ( ) ) { throw missingRequiredElement ( reader , required ) ; } final ModelNode logStoreAddress = address . clone ( ) ; final ModelNode operation = new ModelNode ( ) ; operation . get ( OP ) . set ( ADD ) ; logStoreAddress . add ( LogStoreConstants . LOG_STORE , LogStoreConstants . LOG_STORE ) ; logStoreAddress . protect ( ) ; operation . get ( OP_ADDR ) . set ( logStoreAddress ) ; list . add ( operation ) ;


signature:
public class ActiveMQServerService { /** * Get { @ link CredentialSource } injector based on name of the bridge .
 * If name was not used create new injector .
 * @ param name the bridge name
 * @ return injector */
public InjectedValue < ExceptionSupplier < CredentialSource , Exception > > getBridgeCredentialSourceSupplierInjector ( String name ) { } }

implementation: if ( bridgeCredentialSource . containsKey ( name ) ) { return bridgeCredentialSource . get ( name ) ; } else { InjectedValue < ExceptionSupplier < CredentialSource , Exception > > injector = new InjectedValue < > ( ) ; bridgeCredentialSource . put ( name , injector ) ; return injector ; }


signature:
public class JBossContextXATerminator { /** * Interception of register work call to get transaction being imported to wildfly transacton client .
 * For importing a transaction Wildfly transaction client eventually calls { @ link SubordinationManager }
 * as Narayana { @ link XATerminator } s do . This wrapping then let wildfly transacton client to register the transaction
 * for itself , wildfly transacton client then import transaction to Narayana too and finally this method
 * uses Narayana ' s { @ link XATerminator } to register all { @ link Work } s binding . < br >
 * Narayana ' s { @ link XATerminator } tries to import transaction too but as transaction is already
 * imported it just gets instance of transaction already imported via call of wildfly transacton client . */
@ Override public void registerWork ( Work work , Xid xid , long timeout ) throws WorkCompletedException { } }

implementation:
try { // jca provides timeout in milliseconds , SubordinationManager expects seconds
int timeout_seconds = ( int ) timeout / 1000 ; // unlimited timeout for jca means - 1 which fails in wfly client
if ( timeout_seconds <= 0 ) timeout_seconds = ContextTransactionManager . getGlobalDefaultTransactionTimeout ( ) ; localTransactionContext . findOrImportTransaction ( xid , timeout_seconds ) ; } catch ( XAException xae ) { throw TransactionLogger . ROOT_LOGGER . cannotFindOrImportInflowTransaction ( xid , work , xae ) ; } jbossXATerminator . registerWork ( work , xid , timeout ) ;


signature:
public class JBossContextXATerminator { /** * Start work gets imported transaction and assign it to current thread .
 * This method mimics behavior of Narayana ' s { @ link JBossXATerminator } . */
@ Override public void startWork ( Work work , Xid xid ) throws WorkCompletedException { } }

implementation: LocalTransaction transaction = null ; try { ImportResult < LocalTransaction > transactionImportResult = localTransactionContext . findOrImportTransaction ( xid , 0 ) ; transaction = transactionImportResult . getTransaction ( ) ; ContextTransactionManager . getInstance ( ) . resume ( transaction ) ; } catch ( XAException xae ) { throw TransactionLogger . ROOT_LOGGER . cannotFindOrImportInflowTransaction ( xid , work , xae ) ; } catch ( InvalidTransactionException ite ) { throw TransactionLogger . ROOT_LOGGER . importedInflowTransactionIsInactive ( xid , work , ite ) ; } catch ( SystemException se ) { throw TransactionLogger . ROOT_LOGGER . cannotResumeInflowTransactionUnexpectedError ( transaction , work , se ) ; }


signature:
public class JBossContextXATerminator { /** * Suspending transaction and canceling the work .
 * Suspend transaction has to be called on the wildfly transaction manager
 * and the we delegate work cancellation to { @ link JBossXATerminator } . < br >
 * First we have to cancel the work for jboss terminator would not work with
 * suspended transaction . */
@ Override public void endWork ( Work work , Xid xid ) { } }

implementation: jbossXATerminator . cancelWork ( work , xid ) ; try { ContextTransactionManager . getInstance ( ) . suspend ( ) ; } catch ( SystemException se ) { throw TransactionLogger . ROOT_LOGGER . cannotSuspendInflowTransactionUnexpectedError ( work , se ) ; }


signature:
public class JBossContextXATerminator { /** * Calling { @ link JBossXATerminator } to cancel the work for us .
 * There should not be need any action to be processed by wildfly transaction client . */
@ Override public void cancelWork ( Work work , Xid xid ) { } }

implementation: jbossXATerminator . cancelWork ( work , xid ) ;


signature:
public class AbstractSecurityMetaDataAccessorEJB { /** * @ see org . jboss . webservices . integration . tomcat . AbstractSecurityMetaDataAccessorEJB # getSecurityDomain ( Deployment )
 * @ param dep webservice deployment
 * @ return security domain associated with EJB 3 deployment */
public String getSecurityDomain ( final Deployment dep ) { } }

implementation: String securityDomain = null ; for ( final EJBEndpoint ejbEndpoint : getEjbEndpoints ( dep ) ) { String nextSecurityDomain = ejbEndpoint . getSecurityDomain ( ) ; if ( nextSecurityDomain == null || nextSecurityDomain . isEmpty ( ) ) { nextSecurityDomain = null ; } securityDomain = getDomain ( securityDomain , nextSecurityDomain ) ; } if ( securityDomain == null ) { final DeploymentUnit unit = WSHelper . getRequiredAttachment ( dep , DeploymentUnit . class ) ; if ( unit . getParent ( ) != null ) { final EarMetaData jbossAppMD = unit . getParent ( ) . getAttachment ( Attachments . EAR_METADATA ) ; return jbossAppMD instanceof JBossAppMetaData ? ( ( JBossAppMetaData ) jbossAppMD ) . getSecurityDomain ( ) : null ; } } return securityDomain ;


signature:
public class AbstractSecurityMetaDataAccessorEJB { /** * @ see org . jboss . webservices . integration . tomcat . SecurityMetaDataAccessorEJB # isSecureWsdlAccess ( Endpoint )
 * @ param endpoint EJB webservice endpoint
 * @ return whether WSDL access have to be secured */
public boolean isSecureWsdlAccess ( final Endpoint endpoint ) { } }

implementation: final EJBSecurityMetaData ejbSecurityMD = this . getEjbSecurityMetaData ( endpoint ) ; final boolean hasEjbSecurityMD = ejbSecurityMD != null ; return hasEjbSecurityMD ? ejbSecurityMD . getSecureWSDLAccess ( ) : false ;


signature:
public class AbstractSecurityMetaDataAccessorEJB { /** * @ see org . jboss . webservices . integration . tomcat . SecurityMetaDataAccessorEJB # getTransportGuarantee ( Endpoint )
 * @ param endpoint EJB webservice endpoint
 * @ return transport guarantee or null if not specified */
public String getTransportGuarantee ( final Endpoint endpoint ) { } }

implementation: final EJBSecurityMetaData ejbSecurityMD = this . getEjbSecurityMetaData ( endpoint ) ; final boolean hasEjbSecurityMD = ejbSecurityMD != null ; return hasEjbSecurityMD ? ejbSecurityMD . getTransportGuarantee ( ) : null ;


signature:
public class AbstractSecurityMetaDataAccessorEJB { /** * Gets EJB security meta data if associated with EJB endpoint .
 * @ param endpoint EJB webservice endpoint
 * @ return EJB security meta data or null */
private EJBSecurityMetaData getEjbSecurityMetaData ( final Endpoint endpoint ) { } }

implementation: final String ejbName = endpoint . getShortName ( ) ; final Deployment dep = endpoint . getService ( ) . getDeployment ( ) ; final EJBArchiveMetaData ejbArchiveMD = WSHelper . getOptionalAttachment ( dep , EJBArchiveMetaData . class ) ; final EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD . getBeanByEjbName ( ejbName ) : null ; return ejbMD != null ? ejbMD . getSecurityMetaData ( ) : null ;


signature:
public class AbstractSecurityMetaDataAccessorEJB { /** * Returns security domain value . This method checks domain is the same for every EJB 3 endpoint .
 * @ param oldSecurityDomain our security domain
 * @ param nextSecurityDomain next security domain
 * @ return security domain value
 * @ throws IllegalStateException if domains have different values */
private String getDomain ( final String oldSecurityDomain , final String nextSecurityDomain ) { } }

implementation: if ( nextSecurityDomain == null ) { return oldSecurityDomain ; } if ( oldSecurityDomain == null ) { return nextSecurityDomain ; } ensureSameDomains ( oldSecurityDomain , nextSecurityDomain ) ; return oldSecurityDomain ;


signature:
public class AbstractSecurityMetaDataAccessorEJB { /** * This method ensures both passed domains contain the same value .
 * @ param oldSecurityDomain our security domain
 * @ param newSecurityDomain next security domain
 * @ throws IllegalStateException if domains have different values */
private void ensureSameDomains ( final String oldSecurityDomain , final String newSecurityDomain ) { } }

implementation: final boolean domainsDiffer = ! oldSecurityDomain . equals ( newSecurityDomain ) ; if ( domainsDiffer ) throw WSLogger . ROOT_LOGGER . multipleSecurityDomainsDetected ( oldSecurityDomain , newSecurityDomain ) ;


signature:
public class LookupInjectionSource { /** * { @ inheritDoc } */
public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) { } }

implementation:
final String applicationName = resolutionContext . getApplicationName ( ) ; final String moduleName = resolutionContext . getModuleName ( ) ; final String componentName = resolutionContext . getComponentName ( ) ; final boolean compUsesModule = resolutionContext . isCompUsesModule ( ) ; final String scheme = org . jboss . as . naming . InitialContext . getURLScheme ( lookupName ) ; if ( scheme == null ) { // relative name , build absolute name and setup normal lookup injection
if ( componentName != null && ! compUsesModule ) { ContextNames . bindInfoFor ( applicationName , moduleName , componentName , "java:comp/env/" + lookupName ) . setupLookupInjection ( serviceBuilder , injector , phaseContext . getDeploymentUnit ( ) , optional ) ; } else if ( compUsesModule ) { ContextNames . bindInfoFor ( applicationName , moduleName , componentName , "java:module/env/" + lookupName ) . setupLookupInjection ( serviceBuilder , injector , phaseContext . getDeploymentUnit ( ) , optional ) ; } else { ContextNames . bindInfoFor ( applicationName , moduleName , componentName , "java:jboss/env/" + lookupName ) . setupLookupInjection ( serviceBuilder , injector , phaseContext . getDeploymentUnit ( ) , optional ) ; } } else { if ( scheme . equals ( "java" ) ) { // an absolute java name , setup normal lookup injection
if ( compUsesModule && lookupName . startsWith ( "java:comp/" ) ) { // switch " comp " with " module "
ContextNames . bindInfoFor ( applicationName , moduleName , componentName , "java:module/" + lookupName . substring ( 10 ) ) . setupLookupInjection ( serviceBuilder , injector , phaseContext . getDeploymentUnit ( ) , optional ) ; } else { ContextNames . bindInfoFor ( applicationName , moduleName , componentName , lookupName ) . setupLookupInjection ( serviceBuilder , injector , phaseContext . getDeploymentUnit ( ) , optional ) ; } } else { // an absolute non java name
final ManagedReferenceFactory managedReferenceFactory ; if ( URL_SCHEMES . contains ( scheme ) ) { // a Java EE Standard Resource Manager Connection Factory for URLs , using lookup to define value of URL , inject factory that creates URL instances
managedReferenceFactory = new ManagedReferenceFactory ( ) { @ Override public ManagedReference getReference ( ) { try { return new ImmediateManagedReference ( new URL ( lookupName ) ) ; } catch ( MalformedURLException e ) { throw new RuntimeException ( e ) ; } } } ; } else { // lookup for a non java jndi resource , inject factory which does a true jndi lookup
managedReferenceFactory = new ManagedReferenceFactory ( ) { @ Override public ManagedReference getReference ( ) { try { return new ImmediateManagedReference ( new InitialContext ( ) . lookup ( lookupName ) ) ; } catch ( NamingException e ) { EeLogger . ROOT_LOGGER . tracef ( e , "failed to lookup %s" , lookupName ) ; return null ; } } } ; } injector . inject ( managedReferenceFactory ) ; } }


signature:
public class WeldSubsystem10Parser { /** * { @ inheritDoc } */
@ Override public void readElement ( final XMLExtendedStreamReader reader , final List < ModelNode > list ) throws XMLStreamException { } }

implementation:
// Require no attributes or content
requireNoAttributes ( reader ) ; requireNoContent ( reader ) ; list . add ( Util . createAddOperation ( PathAddress . pathAddress ( WeldExtension . PATH_SUBSYSTEM ) ) ) ;


signature:
public class AttributeAnalysis { /** * Set my unqualified IDL name .
 * This also sets the names of the associated operations . */
void setIDLName ( String idlName ) { } }

implementation:
super . setIDLName ( idlName ) ; // If the first char is an uppercase letter and the second char is not
// an uppercase letter , then convert the first char to lowercase .
if ( idlName . charAt ( 0 ) >= 0x41 && idlName . charAt ( 0 ) <= 0x5a && ( idlName . length ( ) <= 1 || idlName . charAt ( 1 ) < 0x41 || idlName . charAt ( 1 ) > 0x5a ) ) { idlName = idlName . substring ( 0 , 1 ) . toLowerCase ( Locale . ENGLISH ) + idlName . substring ( 1 ) ; } if ( accessorAnalysis != null ) accessorAnalysis . setIDLName ( "_get_" + idlName ) ; if ( mutatorAnalysis != null ) mutatorAnalysis . setIDLName ( "_set_" + idlName ) ;


signature:
public class JndiName { /** * Get the absolute JNDI name as a string .
 * @ return The absolute JNDI name as a string */
public String getAbsoluteName ( ) { } }

implementation: final StringBuilder absolute = new StringBuilder ( ) ; if ( parent != null ) { absolute . append ( parent ) . append ( ENTRY_SEPARATOR ) ; } absolute . append ( local ) ; return absolute . toString ( ) ;


signature:
public class JndiName { /** * Create a new instance of the JndiName by breaking the provided string format into a JndiName parts .
 * @ param name The string representation of a JNDI name .
 * @ return The JndiName representation */
public static JndiName of ( final String name ) { } }

implementation: if ( name == null || name . isEmpty ( ) ) throw NamingLogger . ROOT_LOGGER . invalidJndiName ( name ) ; final String [ ] parts = name . split ( ENTRY_SEPARATOR ) ; JndiName current = null ; for ( String part : parts ) { current = new JndiName ( current , part ) ; } return current ;


signature:
public class IronJacamarDeploymentParsingProcessor { /** * Process a deployment for iron - jacamar . xml files . Will parse the xml file
 * and attach metadata discovered during processing .
 * @ param phaseContext the deployment unit context
 * @ throws DeploymentUnitProcessingException */
@ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation: final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ResourceRoot resourceRoot = deploymentUnit . getAttachment ( Attachments . DEPLOYMENT_ROOT ) ; final VirtualFile deploymentRoot = resourceRoot . getRoot ( ) ; final boolean resolveProperties = Util . shouldResolveJBoss ( deploymentUnit ) ; IronJacamarXmlDescriptor xmlDescriptor = process ( deploymentRoot , resolveProperties ) ; if ( xmlDescriptor != null ) { deploymentUnit . putAttachment ( IronJacamarXmlDescriptor . ATTACHMENT_KEY , xmlDescriptor ) ; }


signature:
public class RunningRequestsHttpHandler { /** * Increments the counter and registers a listener to decrement the counter upon exchange complete event . */
@ Override public void handleRequest ( HttpServerExchange exchange ) throws Exception { } }

implementation:
runningCount . increment ( ) ; exchange . addExchangeCompleteListener ( new ExchangeCompletionListener ( ) { @ Override public void exchangeEvent ( HttpServerExchange exchange , NextListener nextListener ) { runningCount . decrement ( ) ; // Proceed to next listener must be called !
nextListener . proceed ( ) ; } } ) ; wrappedHandler . handleRequest ( exchange ) ;


signature:
public class InjectedJMSContext { /** * Return the actual JMSContext used by this injection .
 * The use of the correct AbstractJMSContext ( one with the @ RequestScoped , the other
 * with the @ TransactionScoped ) is determined by the presence on an active transaction . */
@ Override JMSContext getDelegate ( ) { } }

implementation:
boolean inTx = isInTransaction ( ) ; AbstractJMSContext jmsContext = inTx ? transactedJMSContext . get ( ) : requestedJMSContext ; ROOT_LOGGER . debugf ( "using %s to create the injected JMSContext" , jmsContext , id ) ; ConnectionFactory connectionFactory = getConnectionFactory ( ) ; JMSContext contextInstance = jmsContext . getContext ( id , info , connectionFactory ) ; // fix of WFLY - 9501
// CCM tries to clean opened connections before execution of @ PreDestroy method on JMSContext - which is executed after completion , see .
// Correct phase to call close is afterCompletion { @ see TransactionSynchronizationRegistry . registerInterposedSynchronization }
if ( inTx ) { TransactedJMSContext transactedJMSContext = ( TransactedJMSContext ) jmsContext ; transactedJMSContext . registerCleanUpListener ( transactionSynchronizationRegistry , contextInstance ) ; } return contextInstance ;


signature:
public class InjectedJMSContext { /** * check whether there is an active transaction . */
private boolean isInTransaction ( ) { } }

implementation: TransactionSynchronizationRegistry tsr = getTransactionSynchronizationRegistry ( ) ; boolean inTx = tsr . getTransactionStatus ( ) == Status . STATUS_ACTIVE ; return inTx ;


signature:
public class InjectedJMSContext { /** * lookup the transactionSynchronizationRegistry and cache it . */
private TransactionSynchronizationRegistry getTransactionSynchronizationRegistry ( ) { } }

implementation: TransactionSynchronizationRegistry cachedTSR = transactionSynchronizationRegistry ; if ( cachedTSR == null ) { cachedTSR = ( TransactionSynchronizationRegistry ) lookup ( TRANSACTION_SYNCHRONIZATION_REGISTRY_LOOKUP ) ; transactionSynchronizationRegistry = cachedTSR ; } return cachedTSR ;


signature:
public class InjectedJMSContext { /** * lookup the connectionFactory and cache it . */
private ConnectionFactory getConnectionFactory ( ) { } }

implementation: ConnectionFactory cachedCF = connectionFactory ; if ( cachedCF == null ) { cachedCF = ( ConnectionFactory ) lookup ( info . getConnectionFactoryLookup ( ) ) ; connectionFactory = cachedCF ; } return cachedCF ;


signature:
public class NamingUtils { /** * Get the last component of a name .
 * @ param name the name
 * @ return the last component */
public static String getLastComponent ( final Name name ) { } }

implementation: if ( name . size ( ) > 0 ) return name . get ( name . size ( ) - 1 ) ; return "" ;


signature:
public class NamingUtils { /** * Determine if a name is empty , or if ot contains only one component which is the empty string .
 * @ param name the name
 * @ return { @ code true } if the name is empty or contains one empty component */
public static boolean isEmpty ( final Name name ) { } }

implementation: return name . isEmpty ( ) || ( name . size ( ) == 1 && "" . equals ( name . get ( 0 ) ) ) ;


signature:
public class NamingUtils { /** * Create a name - not - found exception .
 * @ param name the name
 * @ param contextName the context name
 * @ return the exception */
public static NameNotFoundException nameNotFoundException ( final String name , final Name contextName ) { } }

implementation: return NamingLogger . ROOT_LOGGER . nameNotFoundInContext ( name , contextName ) ;


signature:
public class NamingUtils { /** * Return a general naming exception with a root cause .
 * @ param message the message
 * @ param cause the exception cause , or { @ code null } for none
 * @ return the exception */
public static NamingException namingException ( final String message , final Throwable cause ) { } }

implementation: final NamingException exception = new NamingException ( message ) ; if ( cause != null ) exception . initCause ( cause ) ; return exception ;


signature:
public class NamingUtils { /** * Return a general naming exception with a root cause and a remaining name field .
 * @ param message the message
 * @ param cause the exception cause , or { @ code null } for none
 * @ param remainingName the remaining name
 * @ return the exception */
public static NamingException namingException ( final String message , final Throwable cause , final Name remainingName ) { } }

implementation: final NamingException exception = namingException ( message , cause ) ; exception . setRemainingName ( remainingName ) ; return exception ;


signature:
public class NamingUtils { /** * Return a cannot - proceed exception .
 * @ param resolvedObject the resolved object
 * @ param remainingName the remaining name
 * @ return the exception */
public static CannotProceedException cannotProceedException ( final Object resolvedObject , final Name remainingName ) { } }

implementation: final CannotProceedException cpe = new CannotProceedException ( ) ; cpe . setResolvedObj ( resolvedObject ) ; cpe . setRemainingName ( remainingName ) ; return cpe ;


signature:
public class NamingUtils { /** * Return a naming enumeration over a collection .
 * @ param collection the collection
 * @ param < T > the member type
 * @ return the enumeration */
public static < T > NamingEnumeration < T > namingEnumeration ( final Collection < T > collection ) { } }

implementation: final Iterator < T > iterator = collection . iterator ( ) ; return new NamingEnumeration < T > ( ) { public T next ( ) { return nextElement ( ) ; } public boolean hasMore ( ) { return hasMoreElements ( ) ; } public void close ( ) { } public boolean hasMoreElements ( ) { return iterator . hasNext ( ) ; } public T nextElement ( ) { return iterator . next ( ) ; } } ;


signature:
public class NamingUtils { /** * Rebind val to name in ctx , and make sure that all intermediate contexts exist
 * @ param ctx the parent JNDI Context under which value will be bound
 * @ param name the name relative to ctx where value will be bound
 * @ param value the value to bind .
 * @ throws NamingException for any error */
public static void rebind ( final Context ctx , final String name , final Object value ) throws NamingException { } }

implementation: final Name n = ctx . getNameParser ( "" ) . parse ( name ) ; rebind ( ctx , n , value ) ;


signature:
public class NamingUtils { /** * Unbinds a name from ctx , and removes parents if they are empty
 * @ param ctx the parent JNDI Context under which the name will be unbound
 * @ param name The name to unbind
 * @ throws NamingException for any error */
public static void unbind ( Context ctx , String name ) throws NamingException { } }

implementation: unbind ( ctx , ctx . getNameParser ( "" ) . parse ( name ) ) ;


signature:
public class AbstractActiveMQComponentControlHandler { /** * Hook to allow subclasses to handle read - attribute requests for attributes other than { @ link CommonAttributes # STARTED } .
 * Implementations must not call any of the
 * { @ link org . jboss . as . controller . OperationContext # completeStep ( OperationContext . ResultHandler ) context . completeStep variants } .
 * This default implementation just throws the exception returned by { @ link # unsupportedAttribute ( String ) } .
 * @ param attributeName the name of the attribute
 * @ param context the operation context
 * @ param operation
 * @ throws OperationFailedException */
protected void handleReadAttribute ( String attributeName , OperationContext context , ModelNode operation ) throws OperationFailedException { } }

implementation: unsupportedAttribute ( attributeName ) ;


signature:
public class AbstractActiveMQComponentControlHandler { /** * Hook to allow subclasses to handle operations other than { @ code read - attribute } , { @ code start } and
 * { @ code stop } . Implementations must not call any of the
 * { @ link org . jboss . as . controller . OperationContext # completeStep ( OperationContext . ResultHandler ) context . completeStep variants } .
 * This default implementation just throws the exception returned by { @ link # unsupportedOperation ( String ) } .
 * @ param operationName the name of the operation
 * @ param context the operation context
 * @ param operation the operation
 * @ return an object that can be passed back in { @ link # handleRevertOperation ( String , org . jboss . as . controller . OperationContext , org . jboss . dmr . ModelNode , Object ) }
 * if the operation should be reverted . A value of { @ code null } is an indication that no reversible
 * modification was made
 * @ throws OperationFailedException */
protected Object handleOperation ( String operationName , OperationContext context , ModelNode operation ) throws OperationFailedException { } }

implementation: unsupportedOperation ( operationName ) ; throw MessagingLogger . ROOT_LOGGER . unsupportedOperation ( operationName ) ;


signature:
public class AbstractActiveMQComponentControlHandler { /** * Gets the runtime ActiveMQ control object that can help service this request .
 * @ param context the operation context
 * @ param operation the operation
 * @ param forWrite { @ code true } if this operation will modify the runtime ; { @ code false } if not .
 * @ return the control object
 * @ throws OperationFailedException */
protected final T getActiveMQComponentControl ( final OperationContext context , final ModelNode operation , final boolean forWrite ) throws OperationFailedException { } }

implementation: final ServiceName artemisServiceName = MessagingServices . getActiveMQServiceName ( PathAddress . pathAddress ( operation . get ( ModelDescriptionConstants . OP_ADDR ) ) ) ; ServiceController < ? > artemisService = context . getServiceRegistry ( forWrite ) . getService ( artemisServiceName ) ; ActiveMQServer server = ActiveMQServer . class . cast ( artemisService . getValue ( ) ) ; PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; T control = getActiveMQComponentControl ( server , address ) ; if ( control == null ) { throw ControllerLogger . ROOT_LOGGER . managementResourceNotFound ( address ) ; } return control ;


signature:
public class CommonIronJacamarParser { /** * Parses connection attributes for version 5.0
 * @ param reader the xml reader
 * @ param connectionDefinitionNode the connection definition add node
 * @ return the pool name
 * @ throws XMLStreamException */
private String parseConnectionAttributes_5_0 ( final XMLExtendedStreamReader reader , final ModelNode connectionDefinitionNode ) throws XMLStreamException { } }

implementation: String poolName = null ; String jndiName = null ; int attributeSize = reader . getAttributeCount ( ) ; for ( int i = 0 ; i < attributeSize ; i ++ ) { ConnectionDefinition . Attribute attribute = ConnectionDefinition . Attribute . forName ( reader . getAttributeLocalName ( i ) ) ; String value = reader . getAttributeValue ( i ) ; switch ( attribute ) { case ENABLED : { ENABLED . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case CONNECTABLE : { CONNECTABLE . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case TRACKING : { TRACKING . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case JNDI_NAME : { jndiName = value ; JNDINAME . parseAndSetParameter ( jndiName , connectionDefinitionNode , reader ) ; break ; } case POOL_NAME : { poolName = value ; break ; } case USE_JAVA_CONTEXT : { USE_JAVA_CONTEXT . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case USE_CCM : { USE_CCM . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case SHARABLE : { SHARABLE . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case ENLISTMENT : { ENLISTMENT . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case CLASS_NAME : { CLASS_NAME . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case MCP : { MCP . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case ENLISTMENT_TRACE : ENLISTMENT_TRACE . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; default : throw ParseUtils . unexpectedAttribute ( reader , i ) ; } } if ( poolName == null || poolName . trim ( ) . equals ( "" ) ) { if ( jndiName != null && jndiName . trim ( ) . length ( ) != 0 ) { if ( jndiName . contains ( "/" ) ) { poolName = jndiName . substring ( jndiName . lastIndexOf ( "/" ) + 1 ) ; } else { poolName = jndiName . substring ( jndiName . lastIndexOf ( ":" ) + 1 ) ; } } else { throw ParseUtils . missingRequired ( reader , EnumSet . of ( ConnectionDefinition . Attribute . JNDI_NAME ) ) ; } } return poolName ;


signature:
public class CommonIronJacamarParser { /** * parse a single connection - definition tag
 * @ param reader the reader
 * @ throws javax . xml . stream . XMLStreamException
 * XMLStreamException
 * @ throws ParserException ParserException
 * @ throws org . jboss . jca . common . api . validator . ValidateException
 * ValidateException */
protected void parseConnectionDefinitions_5_0 ( final XMLExtendedStreamReader reader , final Map < String , ModelNode > map , final Map < String , HashMap < String , ModelNode > > configMap , final boolean isXa ) throws XMLStreamException , ParserException , ValidateException { } }

implementation: final ModelNode connectionDefinitionNode = new ModelNode ( ) ; connectionDefinitionNode . get ( OP ) . set ( ADD ) ; final String poolName = parseConnectionAttributes_5_0 ( reader , connectionDefinitionNode ) ; boolean poolDefined = Boolean . FALSE ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { if ( Activation . Tag . forName ( reader . getLocalName ( ) ) == Activation . Tag . CONNECTION_DEFINITION ) { map . put ( poolName , connectionDefinitionNode ) ; return ; } else { if ( ConnectionDefinition . Tag . forName ( reader . getLocalName ( ) ) == ConnectionDefinition . Tag . UNKNOWN ) { throw ParseUtils . unexpectedEndElement ( reader ) ; } } break ; } case START_ELEMENT : { switch ( ConnectionDefinition . Tag . forName ( reader . getLocalName ( ) ) ) { case CONFIG_PROPERTY : { if ( ! configMap . containsKey ( poolName ) ) { configMap . put ( poolName , new HashMap < String , ModelNode > ( 0 ) ) ; } parseConfigProperties ( reader , configMap . get ( poolName ) ) ; break ; } case SECURITY : { parseElytronSupportedSecuritySettings ( reader , connectionDefinitionNode ) ; break ; } case TIMEOUT : { parseTimeOut ( reader , isXa , connectionDefinitionNode ) ; break ; } case VALIDATION : { parseValidation ( reader , connectionDefinitionNode ) ; break ; } case XA_POOL : { if ( ! isXa ) { throw ParseUtils . unexpectedElement ( reader ) ; } if ( poolDefined ) { throw new ParserException ( bundle . multiplePools ( ) ) ; } parseXaPool ( reader , connectionDefinitionNode ) ; poolDefined = true ; break ; } case POOL : { if ( isXa ) { throw ParseUtils . unexpectedElement ( reader ) ; } if ( poolDefined ) { throw new ParserException ( bundle . multiplePools ( ) ) ; } parsePool ( reader , connectionDefinitionNode ) ; poolDefined = true ; break ; } case RECOVERY : { parseElytronSupportedRecovery ( reader , connectionDefinitionNode ) ; break ; } default : throw ParseUtils . unexpectedElement ( reader ) ; } break ; } } } throw ParseUtils . unexpectedEndElement ( reader ) ;


signature:
public class CommonIronJacamarParser { /** * parse a single connection - definition tag
 * @ param reader the reader
 * @ throws javax . xml . stream . XMLStreamException
 * XMLStreamException
 * @ throws ParserException ParserException
 * @ throws org . jboss . jca . common . api . validator . ValidateException
 * ValidateException */
protected void parseConnectionDefinitions_1_0 ( final XMLExtendedStreamReader reader , final Map < String , ModelNode > map , final Map < String , HashMap < String , ModelNode > > configMap , final boolean isXa ) throws XMLStreamException , ParserException , ValidateException { } }

implementation: final ModelNode connectionDefinitionNode = new ModelNode ( ) ; connectionDefinitionNode . get ( OP ) . set ( ADD ) ; String poolName = null ; String jndiName = null ; int attributeSize = reader . getAttributeCount ( ) ; boolean poolDefined = Boolean . FALSE ; for ( int i = 0 ; i < attributeSize ; i ++ ) { ConnectionDefinition . Attribute attribute = ConnectionDefinition . Attribute . forName ( reader . getAttributeLocalName ( i ) ) ; String value = reader . getAttributeValue ( i ) ; switch ( attribute ) { case ENABLED : { ENABLED . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case JNDI_NAME : { jndiName = value ; JNDINAME . parseAndSetParameter ( jndiName , connectionDefinitionNode , reader ) ; break ; } case POOL_NAME : { poolName = value ; break ; } case USE_JAVA_CONTEXT : { USE_JAVA_CONTEXT . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case USE_CCM : { USE_CCM . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case SHARABLE : { SHARABLE . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case ENLISTMENT : { ENLISTMENT . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } case CLASS_NAME : { CLASS_NAME . parseAndSetParameter ( value , connectionDefinitionNode , reader ) ; break ; } default : throw ParseUtils . unexpectedAttribute ( reader , i ) ; } } if ( poolName == null || poolName . trim ( ) . equals ( "" ) ) { if ( jndiName != null && jndiName . trim ( ) . length ( ) != 0 ) { if ( jndiName . contains ( "/" ) ) { poolName = jndiName . substring ( jndiName . lastIndexOf ( "/" ) + 1 ) ; } else { poolName = jndiName . substring ( jndiName . lastIndexOf ( ":" ) + 1 ) ; } } else { throw ParseUtils . missingRequired ( reader , EnumSet . of ( ConnectionDefinition . Attribute . JNDI_NAME ) ) ; } } while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { if ( Activation . Tag . forName ( reader . getLocalName ( ) ) == Activation . Tag . CONNECTION_DEFINITION ) { map . put ( poolName , connectionDefinitionNode ) ; return ; } else { if ( ConnectionDefinition . Tag . forName ( reader . getLocalName ( ) ) == ConnectionDefinition . Tag . UNKNOWN ) { throw ParseUtils . unexpectedEndElement ( reader ) ; } } break ; } case START_ELEMENT : { switch ( ConnectionDefinition . Tag . forName ( reader . getLocalName ( ) ) ) { case CONFIG_PROPERTY : { if ( ! configMap . containsKey ( poolName ) ) { configMap . put ( poolName , new HashMap < String , ModelNode > ( 0 ) ) ; } parseConfigProperties ( reader , configMap . get ( poolName ) ) ; break ; } case SECURITY : { parseSecuritySettings ( reader , connectionDefinitionNode ) ; break ; } case TIMEOUT : { parseTimeOut ( reader , isXa , connectionDefinitionNode ) ; break ; } case VALIDATION : { parseValidation ( reader , connectionDefinitionNode ) ; break ; } case XA_POOL : { if ( ! isXa ) { throw ParseUtils . unexpectedElement ( reader ) ; } if ( poolDefined ) { throw new ParserException ( bundle . multiplePools ( ) ) ; } parseXaPool ( reader , connectionDefinitionNode ) ; poolDefined = true ; break ; } case POOL : { if ( isXa ) { throw ParseUtils . unexpectedElement ( reader ) ; } if ( poolDefined ) { throw new ParserException ( bundle . multiplePools ( ) ) ; } parsePool ( reader , connectionDefinitionNode ) ; poolDefined = true ; break ; } case RECOVERY : { parseRecovery ( reader , connectionDefinitionNode ) ; break ; } default : throw ParseUtils . unexpectedElement ( reader ) ; } break ; } } } throw ParseUtils . unexpectedEndElement ( reader ) ;


signature:
public class CommonIronJacamarParser { /** * parse a { @ link XaPool } object
 * @ param reader reader
 * @ throws XMLStreamException XMLStreamException
 * @ throws ParserException
 * @ throws ValidateException ValidateException */
protected void parseXaPool ( XMLExtendedStreamReader reader , ModelNode node ) throws XMLStreamException , ParserException , ValidateException { } }

implementation:
while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { if ( XaDataSource . Tag . forName ( reader . getLocalName ( ) ) == XaDataSource . Tag . XA_POOL ) { return ; } else { if ( XaPool . Tag . forName ( reader . getLocalName ( ) ) == XaPool . Tag . UNKNOWN ) { throw ParseUtils . unexpectedEndElement ( reader ) ; } } break ; } case START_ELEMENT : { switch ( XaPool . Tag . forName ( reader . getLocalName ( ) ) ) { case MAX_POOL_SIZE : { String value = rawElementText ( reader ) ; MAX_POOL_SIZE . parseAndSetParameter ( value , node , reader ) ; break ; } case MIN_POOL_SIZE : { String value = rawElementText ( reader ) ; MIN_POOL_SIZE . parseAndSetParameter ( value , node , reader ) ; break ; } case INITIAL_POOL_SIZE : { String value = rawElementText ( reader ) ; INITIAL_POOL_SIZE . parseAndSetParameter ( value , node , reader ) ; break ; } case PREFILL : { String value = rawElementText ( reader ) ; POOL_PREFILL . parseAndSetParameter ( value , node , reader ) ; break ; } case FAIR : { String value = rawElementText ( reader ) ; POOL_FAIR . parseAndSetParameter ( value , node , reader ) ; break ; } case USE_STRICT_MIN : { String value = rawElementText ( reader ) ; POOL_USE_STRICT_MIN . parseAndSetParameter ( value , node , reader ) ; break ; } case FLUSH_STRATEGY : { String value = rawElementText ( reader ) ; POOL_FLUSH_STRATEGY . parseAndSetParameter ( value , node , reader ) ; break ; } case INTERLEAVING : { String value = rawElementText ( reader ) ; // just presence means true
value = value == null ? "true" : value ; INTERLEAVING . parseAndSetParameter ( value , node , reader ) ; break ; } case IS_SAME_RM_OVERRIDE : { String value = rawElementText ( reader ) ; SAME_RM_OVERRIDE . parseAndSetParameter ( value , node , reader ) ; break ; } case NO_TX_SEPARATE_POOLS : { String value = rawElementText ( reader ) ; // just presence means true
value = value == null ? "true" : value ; NOTXSEPARATEPOOL . parseAndSetParameter ( value , node , reader ) ; break ; } case PAD_XID : { String value = rawElementText ( reader ) ; PAD_XID . parseAndSetParameter ( value , node , reader ) ; break ; } case WRAP_XA_RESOURCE : { String value = rawElementText ( reader ) ; WRAP_XA_RESOURCE . parseAndSetParameter ( value , node , reader ) ; break ; } case CAPACITY : { parseCapacity ( reader , node ) ; break ; } default : throw ParseUtils . unexpectedElement ( reader ) ; } break ; } } } throw ParseUtils . unexpectedEndElement ( reader ) ;


signature:
public class BasicComponent { /** * Wraps an existing object instance in a ComponentInstance , and run the post construct interceptor chain on it .
 * @ param instance The instance to wrap
 * @ return The new ComponentInstance */
public ComponentInstance createInstance ( Object instance ) { } }

implementation: BasicComponentInstance obj = constructComponentInstance ( new ImmediateManagedReference ( instance ) , true ) ; obj . constructionFinished ( ) ; return obj ;


signature:
public class BasicComponent { /** * Construct the component instance . Upon return , the object instance should have injections and lifecycle
 * invocations completed already .
 * @ param instance An instance to be wrapped , or null if a new instance should be created
 * @ return the component instance */
protected BasicComponentInstance constructComponentInstance ( ManagedReference instance , boolean invokePostConstruct ) { } }

implementation: return constructComponentInstance ( instance , invokePostConstruct , Collections . emptyMap ( ) ) ;


signature:
public class BasicComponent { /** * Construct the component instance . Upon return , the object instance should have injections and lifecycle
 * invocations completed already .
 * @ param instance An instance to be wrapped , or null if a new instance should be created
 * @ return the component instance */
protected BasicComponentInstance constructComponentInstance ( ManagedReference instance , boolean invokePostConstruct , final Map < Object , Object > context ) { } }

implementation:
waitForComponentStart ( ) ; // create the component instance
final BasicComponentInstance basicComponentInstance = this . instantiateComponentInstance ( preDestroyInterceptor , interceptorInstanceMap , context ) ; if ( instance != null ) { basicComponentInstance . setInstanceData ( BasicComponentInstance . INSTANCE_KEY , instance ) ; } if ( invokePostConstruct ) { // now invoke the postconstruct interceptors
final InterceptorContext interceptorContext = new InterceptorContext ( ) ; interceptorContext . putPrivateData ( Component . class , this ) ; interceptorContext . putPrivateData ( ComponentInstance . class , basicComponentInstance ) ; interceptorContext . putPrivateData ( InvocationType . class , InvocationType . POST_CONSTRUCT ) ; interceptorContext . setContextData ( new HashMap < String , Object > ( ) ) ; try { postConstructInterceptor . processInvocation ( interceptorContext ) ; } catch ( Exception e ) { throw EeLogger . ROOT_LOGGER . componentConstructionFailure ( e ) ; } } componentInstanceCreated ( basicComponentInstance ) ; // return the component instance
return basicComponentInstance ;


signature:
public class BasicComponent { /** * { @ inheritDoc } */
public void stop ( ) { } }

implementation:
if ( stopping . compareAndSet ( false , true ) ) { synchronized ( this ) { gate = false ; this . interceptorInstanceMap = null ; this . preDestroyInterceptor = null ; this . postConstructInterceptor = null ; } // TODO : only run this if there is no instances
// TODO : trigger destruction of all component instances
// TODO : this has lots of potential for race conditions unless we are careful
// TODO : using stopContext . asynchronous ( ) and then executing synchronously is pointless .
// Use org . jboss . as . server . Services # addServerExecutorDependency to inject an executor to do this async
}


signature:
public class InterceptorClassDescription { /** * Merges two descriptors , either of the parameters will be null .
 * this method will never return null ;
 * @ param existing
 * @ param override
 * @ return */
public static InterceptorClassDescription merge ( InterceptorClassDescription existing , InterceptorClassDescription override ) { } }

implementation: if ( existing == null && override == null ) { return EMPTY_INSTANCE ; } if ( override == null ) { return existing ; } if ( existing == null ) { return override ; } final Builder builder = builder ( existing ) ; if ( override . getAroundInvoke ( ) != null ) { builder . setAroundInvoke ( override . getAroundInvoke ( ) ) ; } if ( override . getAroundTimeout ( ) != null ) { builder . setAroundTimeout ( override . getAroundTimeout ( ) ) ; } if ( override . getAroundConstruct ( ) != null ) { builder . setAroundConstruct ( override . getAroundConstruct ( ) ) ; } if ( override . getPostConstruct ( ) != null ) { builder . setPostConstruct ( override . getPostConstruct ( ) ) ; } if ( override . getPreDestroy ( ) != null ) { builder . setPreDestroy ( override . getPreDestroy ( ) ) ; } if ( override . getPrePassivate ( ) != null ) { builder . setPrePassivate ( override . getPrePassivate ( ) ) ; } if ( override . getPostActivate ( ) != null ) { builder . setPostActivate ( override . getPostActivate ( ) ) ; } return builder . build ( ) ;


signature:
public class JaxrsSpringProcessor { /** * Lookup Seam integration resource loader .
 * @ return the Seam integration resource loader
 * @ throws DeploymentUnitProcessingException
 * for any error */
protected synchronized VirtualFile getResteasySpringVirtualFile ( ) throws DeploymentUnitProcessingException { } }

implementation: if ( resourceRoot != null ) { return resourceRoot ; } try { Module module = Module . getBootModuleLoader ( ) . loadModule ( MODULE ) ; URL fileUrl = module . getClassLoader ( ) . getResource ( JAR_LOCATION ) ; if ( fileUrl == null ) { throw JaxrsLogger . JAXRS_LOGGER . noSpringIntegrationJar ( ) ; } File dir = new File ( fileUrl . toURI ( ) ) ; File file = null ; for ( String jar : dir . list ( ) ) { if ( jar . endsWith ( ".jar" ) ) { file = new File ( dir , jar ) ; break ; } } if ( file == null ) { throw JaxrsLogger . JAXRS_LOGGER . noSpringIntegrationJar ( ) ; } VirtualFile vf = VFS . getChild ( file . toURI ( ) ) ; final Closeable mountHandle = VFS . mountZip ( file , vf , TempFileProviderService . provider ( ) ) ; Service < Closeable > mountHandleService = new Service < Closeable > ( ) { public void start ( StartContext startContext ) throws StartException { } public void stop ( StopContext stopContext ) { VFSUtils . safeClose ( mountHandle ) ; } public Closeable getValue ( ) throws IllegalStateException , IllegalArgumentException { return mountHandle ; } } ; ServiceBuilder < Closeable > builder = serviceTarget . addService ( ServiceName . JBOSS . append ( SERVICE_NAME ) , mountHandleService ) ; builder . setInitialMode ( ServiceController . Mode . ACTIVE ) . install ( ) ; resourceRoot = vf ; return resourceRoot ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( e ) ; }


signature:
public class AbstractRuntimeMetricsHandler { /** * Resolves runtime name of model resource .
 * @ param context - operation context in which handler is invoked
 * @ param address - deployment address
 * @ return runtime name of module . Value which is returned is never null . */
protected static String resolveRuntimeName ( final OperationContext context , final PathElement address ) { } }

implementation: final ModelNode runtimeName = context . readResourceFromRoot ( PathAddress . pathAddress ( address ) , false ) . getModel ( ) . get ( ModelDescriptionConstants . RUNTIME_NAME ) ; return runtimeName . asString ( ) ;


signature:
public class ManagedBeanAnnotationProcessor { /** * Check the deployment annotation index for all classes with the @ ManagedBean annotation . For each class with the
 * annotation , collect all the required information to create a managed bean instance , and attach it to the context .
 * @ param phaseContext the deployment unit context
 * @ throws DeploymentUnitProcessingException */
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEResourceReferenceProcessorRegistry registry = deploymentUnit . getAttachment ( org . jboss . as . ee . component . Attachments . RESOURCE_REFERENCE_PROCESSOR_REGISTRY ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( org . jboss . as . ee . component . Attachments . EE_MODULE_DESCRIPTION ) ; final CompositeIndex compositeIndex = deploymentUnit . getAttachment ( Attachments . COMPOSITE_ANNOTATION_INDEX ) ; final PropertyReplacer replacer = EJBAnnotationPropertyReplacement . propertyReplacer ( deploymentUnit ) ; if ( compositeIndex == null ) { return ; } final List < AnnotationInstance > instances = compositeIndex . getAnnotations ( MANAGED_BEAN_ANNOTATION_NAME ) ; if ( instances == null || instances . isEmpty ( ) ) { return ; } for ( AnnotationInstance instance : instances ) { AnnotationTarget target = instance . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw EeLogger . ROOT_LOGGER . classOnlyAnnotation ( "@ManagedBean" , target ) ; } final ClassInfo classInfo = ( ClassInfo ) target ; // skip if it ' s not a valid managed bean class
if ( ! assertManagedBeanClassValidity ( classInfo ) ) { continue ; } final String beanClassName = classInfo . name ( ) . toString ( ) ; // Get the managed bean name from the annotation
final AnnotationValue nameValue = instance . value ( ) ; final String beanName = ( nameValue == null || nameValue . asString ( ) . isEmpty ( ) ) ? beanClassName : replacer . replaceProperties ( nameValue . asString ( ) ) ; final ManagedBeanComponentDescription componentDescription = new ManagedBeanComponentDescription ( beanName , beanClassName , moduleDescription , deploymentUnit . getServiceName ( ) ) ; // Add the view
ViewDescription viewDescription = new ViewDescription ( componentDescription , beanClassName ) ; viewDescription . getConfigurators ( ) . addFirst ( new ViewConfigurator ( ) { public void configure ( final DeploymentPhaseContext context , final ComponentConfiguration componentConfiguration , final ViewDescription description , final ViewConfiguration configuration ) throws DeploymentUnitProcessingException { // Add MB association interceptors
configuration . addClientPostConstructInterceptor ( ManagedBeanCreateInterceptor . FACTORY , InterceptorOrder . ClientPostConstruct . INSTANCE_CREATE ) ; final ClassLoader classLoader = componentConfiguration . getModuleClassLoader ( ) ; configuration . addViewInterceptor ( AccessCheckingInterceptor . getFactory ( ) , InterceptorOrder . View . CHECKING_INTERCEPTOR ) ; configuration . addViewInterceptor ( new ImmediateInterceptorFactory ( new ContextClassLoaderInterceptor ( classLoader ) ) , InterceptorOrder . View . TCCL_INTERCEPTOR ) ; } } ) ; viewDescription . getBindingNames ( ) . addAll ( Arrays . asList ( "java:module/" + beanName , "java:app/" + moduleDescription . getModuleName ( ) + "/" + beanName ) ) ; componentDescription . getViews ( ) . add ( viewDescription ) ; moduleDescription . addComponent ( componentDescription ) ; // register an EEResourceReferenceProcessor which can process @ Resource references to this managed bean .
registry . registerResourceReferenceProcessor ( new ManagedBeanResourceReferenceProcessor ( beanClassName ) ) ; }


signature:
public class ManagedBeanAnnotationProcessor { /** * Returns true if the passed < code > managedBeanClass < / code > meets the requirements set by the Managed bean spec about
 * bean implementation classes . The passed < code > managedBeanClass < / code > must not be an interface and must not be final or abstract .
 * If it passes these requirements then this method returns true . Else it returns false .
 * @ param managedBeanClass The session bean class
 * @ return */
private static boolean assertManagedBeanClassValidity ( final ClassInfo managedBeanClass ) { } }

implementation:
final short flags = managedBeanClass . flags ( ) ; final String className = managedBeanClass . name ( ) . toString ( ) ; // must * not * be an interface
if ( Modifier . isInterface ( flags ) ) { ROOT_LOGGER . invalidManagedBeanInterface ( "MB.2.1.1" , className ) ; return false ; } // bean class must * not * be abstract or final
if ( Modifier . isAbstract ( flags ) || Modifier . isFinal ( flags ) ) { ROOT_LOGGER . invalidManagedBeanAbstractOrFinal ( "MB.2.1.1" , className ) ; return false ; } // valid class
return true ;


signature:
public class UndertowSubsystemParser_7_0 { /** * Registers attributes common across listener types */
private static PersistentResourceXMLDescription . PersistentResourceXMLBuilder listenerBuilder ( PersistentResourceDefinition resource ) { } }

implementation:
return builder ( resource . getPathElement ( ) ) // xsd socket - optionsType
. addAttributes ( ListenerResourceDefinition . RECEIVE_BUFFER , ListenerResourceDefinition . SEND_BUFFER , ListenerResourceDefinition . BACKLOG , ListenerResourceDefinition . KEEP_ALIVE , ListenerResourceDefinition . READ_TIMEOUT , ListenerResourceDefinition . WRITE_TIMEOUT , ListenerResourceDefinition . MAX_CONNECTIONS ) // xsd listener - type
. addAttributes ( ListenerResourceDefinition . SOCKET_BINDING , ListenerResourceDefinition . WORKER , ListenerResourceDefinition . BUFFER_POOL , ListenerResourceDefinition . ENABLED , ListenerResourceDefinition . RESOLVE_PEER_ADDRESS , ListenerResourceDefinition . MAX_ENTITY_SIZE , ListenerResourceDefinition . BUFFER_PIPELINED_DATA , ListenerResourceDefinition . MAX_HEADER_SIZE , ListenerResourceDefinition . MAX_PARAMETERS , ListenerResourceDefinition . MAX_HEADERS , ListenerResourceDefinition . MAX_COOKIES , ListenerResourceDefinition . ALLOW_ENCODED_SLASH , ListenerResourceDefinition . DECODE_URL , ListenerResourceDefinition . URL_CHARSET , ListenerResourceDefinition . ALWAYS_SET_KEEP_ALIVE , ListenerResourceDefinition . MAX_BUFFERED_REQUEST_SIZE , ListenerResourceDefinition . RECORD_REQUEST_START_TIME , ListenerResourceDefinition . ALLOW_EQUALS_IN_COOKIE_VALUE , ListenerResourceDefinition . NO_REQUEST_TIMEOUT , ListenerResourceDefinition . REQUEST_PARSE_TIMEOUT , ListenerResourceDefinition . DISALLOWED_METHODS , ListenerResourceDefinition . SECURE , ListenerResourceDefinition . RFC6265_COOKIE_VALIDATION , ListenerResourceDefinition . ALLOW_UNESCAPED_CHARACTERS_IN_URL ) ;


signature:
public class TransactionExtension { /** * { @ inheritDoc } */
public void initialize ( ExtensionContext context ) { } }

implementation:
TransactionLogger . ROOT_LOGGER . debug ( "Initializing Transactions Extension" ) ; final LogStoreResource resource = new LogStoreResource ( ) ; final boolean registerRuntimeOnly = context . isRuntimeOnlyRegistrationValid ( ) ; final SubsystemRegistration subsystem = context . registerSubsystem ( SUBSYSTEM_NAME , CURRENT_MODEL_VERSION ) ; final TransactionSubsystemRootResourceDefinition rootResourceDefinition = new TransactionSubsystemRootResourceDefinition ( registerRuntimeOnly ) ; final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( rootResourceDefinition ) ; registration . registerOperationHandler ( GenericSubsystemDescribeHandler . DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ; // Create the path resolver handlers
if ( context . getProcessType ( ) . isServer ( ) ) { // It ' s less than ideal to create a separate operation here , but this extension contains two relative - to attributes
final ResolvePathHandler objectStorePathHandler = ResolvePathHandler . Builder . of ( RESOLVE_OBJECT_STORE_PATH , context . getPathManager ( ) ) . setPathAttribute ( TransactionSubsystemRootResourceDefinition . OBJECT_STORE_PATH ) . setRelativeToAttribute ( TransactionSubsystemRootResourceDefinition . OBJECT_STORE_RELATIVE_TO ) . build ( ) ; registration . registerOperationHandler ( objectStorePathHandler . getOperationDefinition ( ) , objectStorePathHandler ) ; } ManagementResourceRegistration logStoreChild = registration . registerSubModel ( new LogStoreDefinition ( resource , registerRuntimeOnly ) ) ; if ( registerRuntimeOnly ) { ManagementResourceRegistration transactionChild = logStoreChild . registerSubModel ( new LogStoreTransactionDefinition ( resource ) ) ; transactionChild . registerSubModel ( LogStoreTransactionParticipantDefinition . INSTANCE ) ; } subsystem . registerXMLElementWriter ( TransactionSubsystemXMLPersister . INSTANCE ) ;


signature:
public class TransactionExtension { /** * { @ inheritDoc } */
@ Override public void initializeParsers ( ExtensionParsingContext context ) { } }

implementation: context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_1_0 . getUriString ( ) , TransactionSubsystem10Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_1_1 . getUriString ( ) , TransactionSubsystem11Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_1_2 . getUriString ( ) , TransactionSubsystem12Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_1_3 . getUriString ( ) , TransactionSubsystem13Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_1_4 . getUriString ( ) , TransactionSubsystem14Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_1_5 . getUriString ( ) , TransactionSubsystem15Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_2_0 . getUriString ( ) , TransactionSubsystem20Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_3_0 . getUriString ( ) , TransactionSubsystem30Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_4_0 . getUriString ( ) , TransactionSubsystem40Parser :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . TRANSACTIONS_5_0 . getUriString ( ) , TransactionSubsystem50Parser :: new ) ;


signature:
public class PrimitiveAnalysis { /** * Get a singleton instance representing one of the primitive types . */
public static PrimitiveAnalysis getPrimitiveAnalysis ( final Class cls ) { } }

implementation: if ( cls == null ) throw IIOPLogger . ROOT_LOGGER . cannotAnalyzeNullClass ( ) ; if ( cls == Void . TYPE ) return voidAnalysis ; if ( cls == Boolean . TYPE ) return booleanAnalysis ; if ( cls == Character . TYPE ) return charAnalysis ; if ( cls == Byte . TYPE ) return byteAnalysis ; if ( cls == Short . TYPE ) return shortAnalysis ; if ( cls == Integer . TYPE ) return intAnalysis ; if ( cls == Long . TYPE ) return longAnalysis ; if ( cls == Float . TYPE ) return floatAnalysis ; if ( cls == Double . TYPE ) return doubleAnalysis ; throw IIOPLogger . ROOT_LOGGER . notAPrimitive ( cls . getName ( ) ) ;


signature:
public class ShutDownInterceptorFactory { /** * Upon calling this method the EJB will be set to a shutdown state , and no further invocations will be allowed .
 * It will then wait for all active invocation to finish and then return . */
public void shutdown ( ) { } }

implementation:
int value ; int oldValue ; // set the shutdown bit
do { oldValue = invocationCount ; value = SHUTDOWN_FLAG | oldValue ; // the component has already been shutdown
if ( oldValue == value ) { return ; } } while ( ! updater . compareAndSet ( this , oldValue , value ) ) ; synchronized ( lock ) { value = invocationCount ; while ( value != SHUTDOWN_FLAG ) { try { lock . wait ( ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } value = invocationCount ; if ( ( value & SHUTDOWN_FLAG ) == 0 ) { return ; // component has been restarted
} } }


signature:
public class PersistenceUnitServiceImpl { /** * Create EE container entity manager factory
 * @ return EntityManagerFactory */
private EntityManagerFactory createContainerEntityManagerFactory ( ) { } }

implementation:
persistenceProviderAdaptor . beforeCreateContainerEntityManagerFactory ( pu ) ; try { ROOT_LOGGER . tracef ( "calling createContainerEntityManagerFactory for pu=%s with integration properties=%s, application properties=%s" , pu . getScopedPersistenceUnitName ( ) , properties , pu . getProperties ( ) ) ; return persistenceProvider . createContainerEntityManagerFactory ( pu , properties ) ; } finally { try { persistenceProviderAdaptor . afterCreateContainerEntityManagerFactory ( pu ) ; } finally { pu . setAnnotationIndex ( null ) ; // close reference to Annotation Index ( only needed during call to createContainerEntityManagerFactory )
// This is needed if the datasource is restarted
// pu . setTempClassLoaderFactory ( null ) ; / / close reference to temp classloader factory ( only needed during call to createEntityManagerFactory )
} }


signature:
public class WebMetaDataHelper { /** * Creates URL pattern list from passed string .
 * @ param urlPattern URL pattern
 * @ return list wrapping passed parameter */
public static List < String > getUrlPatterns ( final String urlPattern ) { } }

implementation: final List < String > linkedList = new LinkedList < String > ( ) ; linkedList . add ( urlPattern ) ; return linkedList ;


signature:
public class WebMetaDataHelper { /** * Gets servlets meta data from jboss web meta data . If not found it creates new servlets meta data and associates them
 * with jboss web meta data .
 * @ param jbossWebMD jboss web meta data
 * @ return servlets meta data */
public static JBossServletsMetaData getServlets ( final JBossWebMetaData jbossWebMD ) { } }

implementation: JBossServletsMetaData servletsMD = jbossWebMD . getServlets ( ) ; if ( servletsMD == null ) { servletsMD = new JBossServletsMetaData ( ) ; jbossWebMD . setServlets ( servletsMD ) ; } return servletsMD ;


signature:
public class WebMetaDataHelper { /** * Gets servlet mappings meta data from jboss web meta data . If not found it creates new servlet mappings meta data and
 * associates them with jboss web meta data .
 * @ param jbossWebMD jboss web meta data
 * @ return servlet mappings meta data */
public static List < ServletMappingMetaData > getServletMappings ( final JBossWebMetaData jbossWebMD ) { } }

implementation: List < ServletMappingMetaData > servletMappingsMD = jbossWebMD . getServletMappings ( ) ; if ( servletMappingsMD == null ) { servletMappingsMD = new LinkedList < ServletMappingMetaData > ( ) ; jbossWebMD . setServletMappings ( servletMappingsMD ) ; } return servletMappingsMD ;


signature:
public class WebMetaDataHelper { /** * Gets security constraints meta data from jboss web meta data . If not found it creates new security constraints meta data
 * and associates them with jboss web meta data .
 * @ param jbossWebMD jboss web meta data
 * @ return security constraints meta data */
public static List < SecurityConstraintMetaData > getSecurityConstraints ( final JBossWebMetaData jbossWebMD ) { } }

implementation: List < SecurityConstraintMetaData > securityConstraintsMD = jbossWebMD . getSecurityConstraints ( ) ; if ( securityConstraintsMD == null ) { securityConstraintsMD = new LinkedList < SecurityConstraintMetaData > ( ) ; jbossWebMD . setSecurityConstraints ( securityConstraintsMD ) ; } return securityConstraintsMD ;


signature:
public class WebMetaDataHelper { /** * Gets login config meta data from jboss web meta data . If not found it creates new login config meta data and associates
 * them with jboss web meta data .
 * @ param jbossWebMD jboss web meta data
 * @ return login config meta data */
public static LoginConfigMetaData getLoginConfig ( final JBossWebMetaData jbossWebMD ) { } }

implementation: LoginConfigMetaData loginConfigMD = jbossWebMD . getLoginConfig ( ) ; if ( loginConfigMD == null ) { loginConfigMD = new LoginConfigMetaData ( ) ; jbossWebMD . setLoginConfig ( loginConfigMD ) ; } return loginConfigMD ;


signature:
public class WebMetaDataHelper { /** * Gets context parameters meta data from jboss web meta data . If not found it creates new context parameters meta data and
 * associates them with jboss web meta data .
 * @ param jbossWebMD jboss web meta data
 * @ return context parameters meta data */
public static List < ParamValueMetaData > getContextParams ( final JBossWebMetaData jbossWebMD ) { } }

implementation: List < ParamValueMetaData > contextParamsMD = jbossWebMD . getContextParams ( ) ; if ( contextParamsMD == null ) { contextParamsMD = new LinkedList < ParamValueMetaData > ( ) ; jbossWebMD . setContextParams ( contextParamsMD ) ; } return contextParamsMD ;


signature:
public class WebMetaDataHelper { /** * Gets web resource collections meta data from security constraint meta data . If not found it creates new web resource
 * collections meta data and associates them with security constraint meta data .
 * @ param securityConstraintMD security constraint meta data
 * @ return web resource collections meta data */
public static WebResourceCollectionsMetaData getWebResourceCollections ( final SecurityConstraintMetaData securityConstraintMD ) { } }

implementation: WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD . getResourceCollections ( ) ; if ( webResourceCollectionsMD == null ) { webResourceCollectionsMD = new WebResourceCollectionsMetaData ( ) ; securityConstraintMD . setResourceCollections ( webResourceCollectionsMD ) ; } return webResourceCollectionsMD ;


signature:
public class WebMetaDataHelper { /** * Gets init parameters meta data from servlet meta data . If not found it creates new init parameters meta data and
 * associates them with servlet meta data .
 * @ param servletMD servlet meta data
 * @ return init parameters meta data */
public static List < ParamValueMetaData > getServletInitParams ( final ServletMetaData servletMD ) { } }

implementation: List < ParamValueMetaData > initParamsMD = servletMD . getInitParam ( ) ; if ( initParamsMD == null ) { initParamsMD = new LinkedList < ParamValueMetaData > ( ) ; servletMD . setInitParam ( initParamsMD ) ; } return initParamsMD ;


signature:
public class WebMetaDataHelper { /** * Creates new security constraint meta data and associates them with security constraints meta data .
 * @ param securityConstraintsMD security constraints meta data
 * @ return new security constraing meta data */
public static SecurityConstraintMetaData newSecurityConstraint ( final List < SecurityConstraintMetaData > securityConstraintsMD ) { } }

implementation: final SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData ( ) ; securityConstraintsMD . add ( securityConstraintMD ) ; return securityConstraintMD ;


signature:
public class WebMetaDataHelper { /** * Creates new web resource collection meta data and associates them with web resource collections meta data .
 * @ param servletName servlet name
 * @ param urlPattern URL pattern
 * @ param securedWsdl whether WSDL access is secured
 * @ param webResourceCollectionsMD web resource collections meta data
 * @ return new web resource collection meta data */
public static WebResourceCollectionMetaData newWebResourceCollection ( final String servletName , final String urlPattern , final boolean securedWsdl , final WebResourceCollectionsMetaData webResourceCollectionsMD ) { } }

implementation: final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData ( ) ; webResourceCollectionMD . setWebResourceName ( servletName ) ; webResourceCollectionMD . setUrlPatterns ( WebMetaDataHelper . getUrlPatterns ( urlPattern ) ) ; webResourceCollectionMD . setHttpMethods ( WebMetaDataHelper . getHttpMethods ( securedWsdl ) ) ; webResourceCollectionsMD . add ( webResourceCollectionMD ) ; return webResourceCollectionMD ;


signature:
public class WebMetaDataHelper { /** * Creates new servlet meta data and associates them with servlets meta data .
 * @ param servletName servlet name
 * @ param servletClass servlet class name
 * @ param servletsMD servlets meta data
 * @ return new servlet meta data */
public static JBossServletMetaData newServlet ( final String servletName , final String servletClass , final JBossServletsMetaData servletsMD ) { } }

implementation: final JBossServletMetaData servletMD = new JBossServletMetaData ( ) ; servletMD . setServletName ( servletName ) ; servletMD . setServletClass ( servletClass ) ; servletsMD . add ( servletMD ) ; return servletMD ;


signature:
public class WebMetaDataHelper { /** * Creates new servlet mapping meta data and associates them with servlet mappings meta data .
 * @ param servletName servlet name
 * @ param urlPatterns URL patterns
 * @ param servletMappingsMD servlet mapping meta data
 * @ return new servlet mapping meta data */
public static ServletMappingMetaData newServletMapping ( final String servletName , final List < String > urlPatterns , final List < ServletMappingMetaData > servletMappingsMD ) { } }

implementation: final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData ( ) ; servletMappingMD . setServletName ( servletName ) ; servletMappingMD . setUrlPatterns ( urlPatterns ) ; servletMappingsMD . add ( servletMappingMD ) ; return servletMappingMD ;


signature:
public class WebMetaDataHelper { /** * Creates new authentication constraint and associates it with security constraint meta data .
 * @ param roleNames roles
 * @ param securityConstraintMD security constraint meta data
 * @ return new authentication constraint meta data */
public static AuthConstraintMetaData newAuthConstraint ( final List < String > roleNames , final SecurityConstraintMetaData securityConstraintMD ) { } }

implementation: final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData ( ) ; authConstraintMD . setRoleNames ( roleNames ) ; securityConstraintMD . setAuthConstraint ( authConstraintMD ) ; return authConstraintMD ;


signature:
public class WebMetaDataHelper { /** * Creates new user constraint meta data and associates it with security constraint meta data .
 * @ param transportGuarantee transport guarantee value
 * @ param securityConstraintMD security constraint meta data
 * @ return new user data constraint meta data */
public static UserDataConstraintMetaData newUserDataConstraint ( final String transportGuarantee , final SecurityConstraintMetaData securityConstraintMD ) { } }

implementation: final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData ( ) ; final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType . valueOf ( transportGuarantee ) ; userDataConstraintMD . setTransportGuarantee ( transportGuaranteeValue ) ; securityConstraintMD . setUserDataConstraint ( userDataConstraintMD ) ; return userDataConstraintMD ;


signature:
public class WebMetaDataHelper { /** * Creates new parameter meta data and associates it with parameters meta data .
 * @ param key parameter key
 * @ param value parameter value
 * @ param paramsMD parameters meta data
 * @ return new parameter meta data */
public static ParamValueMetaData newParamValue ( final String key , final String value , final List < ParamValueMetaData > paramsMD ) { } }

implementation: final ParamValueMetaData paramValueMD = WebMetaDataHelper . newParamValue ( key , value ) ; paramsMD . add ( paramValueMD ) ; return paramValueMD ;


signature:
public class WebMetaDataHelper { /** * Creates new parameter with specified key and value .
 * @ param key the key
 * @ param value the value
 * @ return new parameter */
private static ParamValueMetaData newParamValue ( final String key , final String value ) { } }

implementation: final ParamValueMetaData paramMD = new ParamValueMetaData ( ) ; paramMD . setParamName ( key ) ; paramMD . setParamValue ( value ) ; return paramMD ;


signature:
public class DsXmlDeploymentInstallProcessor { /** * Process a deployment for standard ra deployment files . Will parse the xml
 * file and attach a configuration discovered during processing .
 * @ param phaseContext the deployment unit context
 * @ throws DeploymentUnitProcessingException */
@ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final CapabilityServiceSupport support = deploymentUnit . getAttachment ( Attachments . CAPABILITY_SERVICE_SUPPORT ) ; final List < DataSources > dataSourcesList = deploymentUnit . getAttachmentList ( DsXmlDeploymentParsingProcessor . DATA_SOURCES_ATTACHMENT_KEY ) ; final boolean legacySecurityPresent = phaseContext . getDeploymentUnit ( ) . hasAttachment ( SecurityAttachments . SECURITY_ENABLED ) ; for ( DataSources dataSources : dataSourcesList ) { if ( dataSources . getDrivers ( ) != null && dataSources . getDrivers ( ) . size ( ) > 0 ) { ConnectorLogger . DS_DEPLOYER_LOGGER . driversElementNotSupported ( deploymentUnit . getName ( ) ) ; } ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; if ( dataSources . getDataSource ( ) != null && dataSources . getDataSource ( ) . size ( ) > 0 ) { for ( int i = 0 ; i < dataSources . getDataSource ( ) . size ( ) ; i ++ ) { DataSource ds = ( DataSource ) dataSources . getDataSource ( ) . get ( i ) ; if ( ds . isEnabled ( ) && ds . getDriver ( ) != null ) { try { final String jndiName = Util . cleanJndiName ( ds . getJndiName ( ) , ds . isUseJavaContext ( ) ) ; LocalDataSourceService lds = new LocalDataSourceService ( jndiName , ContextNames . bindInfoFor ( jndiName ) ) ; lds . getDataSourceConfigInjector ( ) . inject ( buildDataSource ( ds ) ) ; final String dsName = ds . getJndiName ( ) ; final PathAddress addr = getDataSourceAddress ( dsName , deploymentUnit , false ) ; installManagementModel ( ds , deploymentUnit , addr ) ; // TODO why have we been ignoring a configured legacy security domain but no legacy security present ?
boolean useLegacySecurity = legacySecurityPresent && isLegacySecurityRequired ( ds . getSecurity ( ) ) ; startDataSource ( lds , jndiName , ds . getDriver ( ) , serviceTarget , getRegistration ( false , deploymentUnit ) , getResource ( dsName , false , deploymentUnit ) , dsName , useLegacySecurity , ds . isJTA ( ) , support ) ; } catch ( Exception e ) { throw ConnectorLogger . ROOT_LOGGER . exceptionDeployingDatasource ( e , ds . getJndiName ( ) ) ; } } else { ConnectorLogger . DS_DEPLOYER_LOGGER . debugf ( "Ignoring: %s" , ds . getJndiName ( ) ) ; } } } if ( dataSources . getXaDataSource ( ) != null && dataSources . getXaDataSource ( ) . size ( ) > 0 ) { for ( int i = 0 ; i < dataSources . getXaDataSource ( ) . size ( ) ; i ++ ) { XaDataSource xads = ( XaDataSource ) dataSources . getXaDataSource ( ) . get ( i ) ; if ( xads . isEnabled ( ) && xads . getDriver ( ) != null ) { try { String jndiName = Util . cleanJndiName ( xads . getJndiName ( ) , xads . isUseJavaContext ( ) ) ; XaDataSourceService xds = new XaDataSourceService ( jndiName , ContextNames . bindInfoFor ( jndiName ) ) ; xds . getDataSourceConfigInjector ( ) . inject ( buildXaDataSource ( xads ) ) ; final String dsName = xads . getJndiName ( ) ; final PathAddress addr = getDataSourceAddress ( dsName , deploymentUnit , true ) ; installManagementModel ( xads , deploymentUnit , addr ) ; final Credential credential = xads . getRecovery ( ) == null ? null : xads . getRecovery ( ) . getCredential ( ) ; // TODO why have we been ignoring a configured legacy security domain but no legacy security present ?
boolean useLegacySecurity = legacySecurityPresent && ( isLegacySecurityRequired ( xads . getSecurity ( ) ) || isLegacySecurityRequired ( credential ) ) ; startDataSource ( xds , jndiName , xads . getDriver ( ) , serviceTarget , getRegistration ( true , deploymentUnit ) , getResource ( dsName , true , deploymentUnit ) , dsName , useLegacySecurity , true , support ) ; } catch ( Exception e ) { throw ConnectorLogger . ROOT_LOGGER . exceptionDeployingDatasource ( e , xads . getJndiName ( ) ) ; } } else { ConnectorLogger . DS_DEPLOYER_LOGGER . debugf ( "Ignoring %s" , xads . getJndiName ( ) ) ; } } } }


signature:
public class DriverProcessor { /** * { @ inheritDoc } */
@ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final Module module = deploymentUnit . getAttachment ( Attachments . MODULE ) ; final ServicesAttachment servicesAttachment = deploymentUnit . getAttachment ( Attachments . SERVICES ) ; if ( module != null && servicesAttachment != null ) { final ModuleClassLoader classLoader = module . getClassLoader ( ) ; final List < String > driverNames = servicesAttachment . getServiceImplementations ( Driver . class . getName ( ) ) ; int idx = 0 ; for ( String driverClassName : driverNames ) { try { final Class < ? extends Driver > driverClass = classLoader . loadClass ( driverClassName ) . asSubclass ( Driver . class ) ; final Constructor < ? extends Driver > constructor = driverClass . getConstructor ( ) ; final Driver driver = constructor . newInstance ( ) ; final int majorVersion = driver . getMajorVersion ( ) ; final int minorVersion = driver . getMinorVersion ( ) ; final boolean compliant = driver . jdbcCompliant ( ) ; if ( compliant ) { DEPLOYER_JDBC_LOGGER . deployingCompliantJdbcDriver ( driverClass , Integer . valueOf ( majorVersion ) , Integer . valueOf ( minorVersion ) ) ; } else { DEPLOYER_JDBC_LOGGER . deployingNonCompliantJdbcDriver ( driverClass , Integer . valueOf ( majorVersion ) , Integer . valueOf ( minorVersion ) ) ; } String driverName = deploymentUnit . getName ( ) ; if ( ( driverName . contains ( "." ) && ! driverName . endsWith ( ".jar" ) ) || driverNames . size ( ) != 1 ) { driverName += "_" + driverClassName + "_" + majorVersion + "_" + minorVersion ; } InstalledDriver driverMetadata = new InstalledDriver ( driverName , driverClass . getName ( ) , null , null , majorVersion , minorVersion , compliant ) ; DriverService driverService = new DriverService ( driverMetadata , driver ) ; phaseContext . getServiceTarget ( ) . addService ( ServiceName . JBOSS . append ( "jdbc-driver" , driverName . replaceAll ( "\\." , "_" ) ) , driverService ) . addDependency ( ConnectorServices . JDBC_DRIVER_REGISTRY_SERVICE , DriverRegistry . class , driverService . getDriverRegistryServiceInjector ( ) ) . setInitialMode ( Mode . ACTIVE ) . install ( ) ; if ( idx == 0 && driverNames . size ( ) != 1 ) { // create short name driver service
driverName = deploymentUnit . getName ( ) ; // reset driverName to the deployment unit name
driverMetadata = new InstalledDriver ( driverName , driverClass . getName ( ) , null , null , majorVersion , minorVersion , compliant ) ; driverService = new DriverService ( driverMetadata , driver ) ; phaseContext . getServiceTarget ( ) . addService ( ServiceName . JBOSS . append ( "jdbc-driver" , driverName . replaceAll ( "\\." , "_" ) ) , driverService ) . addDependency ( ConnectorServices . JDBC_DRIVER_REGISTRY_SERVICE , DriverRegistry . class , driverService . getDriverRegistryServiceInjector ( ) ) . setInitialMode ( Mode . ACTIVE ) . install ( ) ; } idx ++ ; } catch ( Throwable e ) { DEPLOYER_JDBC_LOGGER . cannotInstantiateDriverClass ( driverClassName , e ) ; } } }


signature:
public class ContainerInterceptorsParser { /** * Parses the < code > interceptor - binding < / code > element and returns the corresponding { @ link InterceptorBindingMetaData }
 * @ param reader
 * @ param propertyReplacer
 * @ return
 * @ throws XMLStreamException */
private InterceptorBindingMetaData readInterceptorBinding ( final XMLStreamReader reader , final PropertyReplacer propertyReplacer ) throws XMLStreamException { } }

implementation: return InterceptorBindingMetaDataParser . INSTANCE . parse ( reader , propertyReplacer ) ;


signature:
public class JPAInterceptorProcessor { /** * Register our listeners on SFSB that will be created */
private void registerSessionBeanInterceptors ( SessionBeanComponentDescription componentDescription , final DeploymentUnit deploymentUnit ) { } }

implementation:
// if it ' s a SFSB then setup appropriate interceptors
if ( componentDescription . isStateful ( ) ) { // first setup the post construct and pre destroy component interceptors
componentDescription . getConfigurators ( ) . addFirst ( new ComponentConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentDescription description , ComponentConfiguration configuration ) throws DeploymentUnitProcessingException { configuration . addPostConstructInterceptor ( SFSBPreCreateInterceptor . FACTORY , InterceptorOrder . ComponentPostConstruct . JPA_SFSB_PRE_CREATE ) ; configuration . addPostConstructInterceptor ( SFSBCreateInterceptor . FACTORY , InterceptorOrder . ComponentPostConstruct . JPA_SFSB_CREATE ) ; configuration . addPreDestroyInterceptor ( SFSBDestroyInterceptor . FACTORY , InterceptorOrder . ComponentPreDestroy . JPA_SFSB_DESTROY ) ; configuration . addComponentInterceptor ( SFSBInvocationInterceptor . FACTORY , InterceptorOrder . Component . JPA_SFSB_INTERCEPTOR , false ) ; // we need to serialized the entity manager state
configuration . getInterceptorContextKeys ( ) . add ( SFSBInvocationInterceptor . CONTEXT_KEY ) ; } } ) ; } // register interceptor on stateful / stateless SB with transactional entity manager .
if ( ( componentDescription . isStateful ( ) || componentDescription . isStateless ( ) ) ) { componentDescription . getConfigurators ( ) . add ( new ComponentConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentDescription description , ComponentConfiguration configuration ) throws DeploymentUnitProcessingException { configuration . addComponentInterceptor ( SBInvocationInterceptor . FACTORY , InterceptorOrder . Component . JPA_SESSION_BEAN_INTERCEPTOR , false ) ; } } ) ; }


signature:
public class CSIv2Util { /** * Make a deep copy of an { @ code IOP : TaggedComponent } .
 * @ param tc the { @ code TaggedComponent } to be copied .
 * @ return a reference to the created copy . */
public static TaggedComponent createCopy ( TaggedComponent tc ) { } }

implementation: TaggedComponent copy = null ; if ( tc != null ) { byte [ ] buf = new byte [ tc . component_data . length ] ; System . arraycopy ( tc . component_data , 0 , buf , 0 , tc . component_data . length ) ; copy = new TaggedComponent ( tc . tag , buf ) ; } return copy ;