idx int64 0 41.2k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
25,600 | public void dumpRaw ( FormattedWriter fw ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dumpRaw" ) ; try { xmlRequestWriteRawDataOnFile ( fw ) ; } catch ( IOException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Exception caught writing Mmessage store dump!" , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "dumpRaw" ) ; } | Dump the message store persistence diagnostic information . |
25,601 | public void dumpAll ( FormattedWriter fw ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dumpAll" ) ; try { xmlRequestWriteOnFile ( fw ) ; xmlWriteRawOn ( fw , true ) ; fw . flush ( ) ; } catch ( IOException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Exception caught writing Mmessage store dump!" , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "dumpAll" ) ; } | Dump message store dynamic diagnostic information and the the message store persistence diagnostic information including information about the Items themselves . |
25,602 | public void engineReloaded ( Object messagingEngine ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "engineReloaded" ) ; initialize ( ( JsMessagingEngine ) messagingEngine , true ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "engineReloaded" ) ; } | Notification that the configuration of the engine has changed . |
25,603 | public String [ ] listPreparedTransactions ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getPreparedTransactions" ) ; String [ ] col = null ; if ( _manager != null ) { Xid [ ] xids = null ; xids = _manager . listRemoteInDoubts ( ) ; if ( xids != null ) { col = new String [ xids . length ] ; for ( int i = 0 ; i < xids . length ; i ++ ) { col [ i ] = ( ( PersistentTranId ) xids [ i ] ) . toString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "xid " + col [ i ] + " in-doubt" ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPreparedTransactions" ) ; return col ; } | Obtain a list of XIDs which are in - doubt . Part of MBean interface for resolving in - doubt transactions . |
25,604 | private void initialize ( JsMessagingEngine engineConfiguration , boolean isReload ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "initialize" , new Object [ ] { "isReload=" + isReload , "Config=" + engineConfiguration } ) ; _messagingEngine = engineConfiguration ; final WASConfiguration configuration = WASConfiguration . getDefaultWasConfiguration ( ) ; configuration . setCleanPersistenceOnStart ( false ) ; SIBFileStore fs = ( SIBFileStore ) _messagingEngine . getFilestore ( ) ; configuration . setObjectManagerLogDirectory ( fs . getPath ( ) ) ; configuration . setObjectManagerLogSize ( fs . getLogFileSize ( ) ) ; configuration . setObjectManagerPermanentStoreDirectory ( fs . getPath ( ) ) ; configuration . setObjectManagerMinimumPermanentStoreSize ( fs . getMinPermanentFileStoreSize ( ) ) ; configuration . setObjectManagerMaximumPermanentStoreSize ( fs . getMaxPermanentFileStoreSize ( ) ) ; configuration . setObjectManagerPermanentStoreSizeUnlimited ( fs . isUnlimitedPermanentStoreSize ( ) ) ; configuration . setObjectManagerTemporaryStoreDirectory ( fs . getPath ( ) ) ; configuration . setObjectManagerMinimumTemporaryStoreSize ( fs . getMinTemporaryFileStoreSize ( ) ) ; configuration . setObjectManagerMaximumTemporaryStoreSize ( fs . getMaxTemporaryFileStoreSize ( ) ) ; configuration . setObjectManagerTemporaryStoreSizeUnlimited ( fs . isUnlimitedTemporaryStoreSize ( ) ) ; if ( ( engineConfiguration . getMessageStoreType ( ) == JsMessagingEngine . MESSAGE_STORE_TYPE_DATASTORE ) && ( engineConfiguration . datastoreExists ( ) ) ) { configuration . setPersistentMessageStoreClassname ( MessageStoreConstants . PERSISTENT_MESSAGE_STORE_CLASS_DATABASE ) ; if ( ! isReload ) { SibTr . info ( tc , "MESSAGING_ENGINE_PERSISTENCE_DATASTORE_SIMS1568" , new Object [ ] { engineConfiguration . getName ( ) } ) ; } } else if ( ( engineConfiguration . getMessageStoreType ( ) == JsMessagingEngine . MESSAGE_STORE_TYPE_FILESTORE ) && ( engineConfiguration . filestoreExists ( ) ) ) { configuration . setPersistentMessageStoreClassname ( MessageStoreConstants . PERSISTENT_MESSAGE_STORE_CLASS_OBJECTMANAGER ) ; if ( ! isReload ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Messaging engine " + engineConfiguration . getName ( ) + " is using a file store." ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "initialize" ) ; throw new IllegalStateException ( nls . getString ( "MSGSTORE_CONFIGURATION_ERROR_SIMS0503" ) ) ; } initialize ( configuration , isReload ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "initialize" ) ; } | Initalizes the message store using the given JetStream configuration . Copies the relevant pieces of data into a MessageStoreConfiguration object which is then used to initialize the message store . Will only initialize PMI if this is not a reload . |
25,605 | public final void registerLink ( final AbstractItemLink newLink , final AbstractItem item ) { register ( newLink ) ; _setMembership ( newLink , item ) ; } | register new Item link . |
25,606 | public final void initialize ( JsRecoveryMessagingEngine recoveryME , String mode ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "initialize" , new Object [ ] { recoveryME , mode } ) ; this . _messagingEngine = recoveryME ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "initialize" , "Assigned new recoverME to messages store" ) ; } | lohith liberty change these are currently dummy as MessageStore is not used as a component by Admin |
25,607 | private < A extends Annotation , AS extends Annotation > InjectionProcessor < A , AS > getProcessor ( int processorIndex , InjectionProcessorProvider < A , AS > provider ) throws InjectionException { if ( ivProcessors == null ) { ivProcessors = new InjectionProcessor < ? , ? > [ ivProviders . size ( ) ] ; } if ( ivProcessors [ processorIndex ] == null ) { ivProcessors [ processorIndex ] = ivProviders . get ( processorIndex ) . createInjectionProcessor ( ) ; ivContext . initProcessor ( ivProcessors [ processorIndex ] , ivNameSpaceConfig ) ; } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) InjectionProcessor < A , AS > processor = ( InjectionProcessor ) ivProcessors [ processorIndex ] ; return processor ; } | Get or create a processor . |
25,608 | public void processXML ( ) throws InjectionException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "processXML" ) ; for ( int processorIndex = 0 ; processorIndex < ivProviders . size ( ) ; processorIndex ++ ) { InjectionProcessorProvider < ? , ? > provider = ivProviders . get ( processorIndex ) ; if ( isProcessXMLNeeded ( provider ) ) { InjectionProcessor < ? , ? > processor = getProcessor ( processorIndex , provider ) ; try { processor . processXML ( ) ; } catch ( InjectionException iex ) { FFDCFilter . processException ( iex , CLASS_NAME + ".processXML" , "300" , this , new Object [ ] { processor } ) ; Tr . error ( tc , "FAILED_TO_PROCESS_XML_FROM_DD_CWNEN0009E" , iex . getMessage ( ) ) ; throw iex ; } catch ( Throwable t ) { FFDCFilter . processException ( t , CLASS_NAME + ".processXML" , "768" , this , new Object [ ] { processor } ) ; Tr . error ( tc , "FAILED_TO_PROCESS_XML_FROM_DD_CWNEN0009E" , t ) ; throw new InjectionConfigurationException ( "Failed to process xml from Deployment Descriptor." , t ) ; } } } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "processXML" ) ; } | Process XML for all processors as needed . |
25,609 | private boolean isProcessXMLNeeded ( InjectionProcessorProvider < ? , ? > provider ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "isProcessXMLNeeded: " + provider ) ; List < Class < ? extends JNDIEnvironmentRef > > refClasses = provider . getJNDIEnvironmentRefClasses ( ) ; if ( refClasses == null ) { if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isProcessXMLNeeded: true (unknown)" ) ; return true ; } for ( Class < ? extends JNDIEnvironmentRef > refClass : refClasses ) { List < ? extends JNDIEnvironmentRef > refs = ivNameSpaceConfig . getJNDIEnvironmentRefs ( refClass ) ; if ( refs != null && ! refs . isEmpty ( ) ) { if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isProcessXMLNeeded: true (" + refClass . getName ( ) + ")" ) ; return true ; } } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isProcessXMLNeeded: false" ) ; return false ; } | Returns true if the specified processor must be created to process XML . |
25,610 | public void processAnnotations ( Class < ? > classHierarchy ) throws InjectionException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "processAnnotations: " + classHierarchy ) ; for ( Class < ? > klass = classHierarchy ; klass != null && klass != Object . class ; klass = klass . getSuperclass ( ) ) { Field [ ] fields = getAllDeclaredFields ( klass , classHierarchy ) ; for ( int processorIndex = 0 ; processorIndex < ivProviders . size ( ) ; processorIndex ++ ) { InjectionProcessorProvider < ? , ? > provider = ivProviders . get ( processorIndex ) ; processClassAnnotations ( processorIndex , provider , klass ) ; if ( fields != null ) { processMemberAnnotations ( processorIndex , provider , fields , fields ) ; } } } Method [ ] methods = getAllDeclaredMethods ( classHierarchy ) ; for ( int processorIndex = 0 ; processorIndex < ivProviders . size ( ) ; processorIndex ++ ) { processMemberAnnotations ( processorIndex , ivProviders . get ( processorIndex ) , methods , methods ) ; } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "processAnnotations" ) ; } | Process all class field and method annotations for the class hierarchy . |
25,611 | private < A extends Annotation , AS extends Annotation > void processClassAnnotations ( int processorIndex , InjectionProcessorProvider < A , AS > provider , Class < ? > klass ) throws InjectionException { Class < A > annClass = provider . getAnnotationClass ( ) ; if ( annClass != null ) { A ann = klass . getAnnotation ( annClass ) ; if ( ann != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "found class annotation " + toStringSecure ( ann ) ) ; InjectionProcessor < A , AS > processor = getProcessor ( processorIndex , provider ) ; addOrMergeInjectionBinding ( processorIndex , processor , klass , null , ann ) ; } Class < AS > pluralAnnClass = provider . getAnnotationsClass ( ) ; if ( pluralAnnClass != null ) { AS pluralAnn = klass . getAnnotation ( pluralAnnClass ) ; if ( pluralAnn != null ) { InjectionProcessor < A , AS > processor = getProcessor ( processorIndex , provider ) ; A [ ] singleAnns = processor . getAnnotations ( pluralAnn ) ; if ( singleAnns != null ) { for ( A singleAnn : singleAnns ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "found plural class annotation " + toStringSecure ( singleAnn ) ) ; addOrMergeInjectionBinding ( processorIndex , processor , klass , null , singleAnn ) ; } } } } } } | Process class annotations with the specified processor . |
25,612 | private Field [ ] getAllDeclaredFields ( Class < ? > klass , Class < ? > classHierarchy ) { try { return klass . getDeclaredFields ( ) ; } catch ( Throwable ex ) { FFDCFilter . processException ( ex , CLASS_NAME + ".getAllDeclaredFields" , "249" , new Object [ ] { classHierarchy , klass } ) ; if ( classHierarchy != klass ) { Tr . warning ( tc , "SUPER_FIELD_ANNOTATIONS_IGNORED_CWNEN0048W" , klass . getName ( ) , classHierarchy . getName ( ) , ex . toString ( ) ) ; if ( ivInjectionEngine . isValidationFailable ( ivNameSpaceConfig . isCheckApplicationConfiguration ( ) ) ) { throw new RuntimeException ( "Resource annotations on the fields of the " + klass . getName ( ) + " class could not be processed. The " + klass . getName ( ) + " class is being processed for annotations because it is" + " referenced by the " + classHierarchy . getName ( ) + " application class." + " The annotations could not be obtained because of the exception : " + ex , ex ) ; } } else { Tr . warning ( tc , "FIELD_ANNOTATIONS_IGNORED_CWNEN0047W" , klass . getName ( ) , ex . toString ( ) ) ; if ( ivInjectionEngine . isValidationFailable ( ivNameSpaceConfig . isCheckApplicationConfiguration ( ) ) ) { throw new RuntimeException ( "Resource annotations on the fields of the " + klass . getName ( ) + " class could not be processed. The annotations could not be obtained" + " because of the exception : " + ex , ex ) ; } } return null ; } } | Return the declared fields for the specified class in the class hierarchy . |
25,613 | private static Method [ ] getAllDeclaredMethods ( Class < ? > classHierarchy ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; Collection < MethodMap . MethodInfo > methodInfos = MethodMap . getAllDeclaredMethods ( classHierarchy ) ; Method [ ] methods = new Method [ methodInfos . size ( ) ] ; int index = 0 ; for ( MethodMap . MethodInfo methodInfo : methodInfos ) { Method method = methodInfo . getMethod ( ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "adding method " + method ) ; methods [ index ++ ] = method ; } return methods ; } | Return the non - overridden declared methods for the specified class . |
25,614 | private < A extends Annotation > void processMemberAnnotations ( int processorIndex , InjectionProcessorProvider < A , ? > provider , Member [ ] members , AnnotatedElement [ ] annotatedMembers ) throws InjectionException { Class < A > annClass = provider . getAnnotationClass ( ) ; if ( annClass != null ) { for ( int i = 0 ; i < members . length ; i ++ ) { A ann = annotatedMembers [ i ] . getAnnotation ( annClass ) ; if ( ann != null ) { Member member = members [ i ] ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "found member annotation " + toStringSecure ( ann ) + " on " + member ) ; InjectionProcessor < A , ? > processor = getProcessor ( processorIndex , provider ) ; addOrMergeInjectionBinding ( processorIndex , processor , member . getDeclaringClass ( ) , member , ann ) ; } } } } | Process annotations on fields and methods . |
25,615 | public void processBindings ( ) throws InjectionException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "processBindings" ) ; if ( ivProcessors != null ) { for ( InjectionProcessor < ? , ? > processor : ivProcessors ) { if ( processor != null ) { try { InjectionProcessorContextImpl . processBindings ( processor ) ; } catch ( InjectionException iex ) { FFDCFilter . processException ( iex , CLASS_NAME + ".processBindings" , "480" , this , new Object [ ] { processor } ) ; Tr . error ( tc , "FAILED_TO_PROCESS_BINDINGS_CWNEN0011E" , iex . getMessage ( ) ) ; throw iex ; } catch ( Throwable t ) { FFDCFilter . processException ( t , CLASS_NAME + ".processBindings" , "815" , this , new Object [ ] { processor } ) ; Tr . error ( tc , "FAILED_TO_PROCESS_BINDINGS_CWNEN0011E" , t ) ; throw new InjectionException ( "Failed to process bindings for metadata" , t ) ; } } } } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "processBindings" ) ; } | Process injection bindings for all created processors . |
25,616 | public static IPlatformAdapter getInstance ( ) { if ( svInstance != null ) { return svInstance ; } synchronized ( PlatformAdapterAccessor . class ) { if ( svInstance != null ) { return svInstance ; } String adapterClassName = null ; try { adapterClassName = AccessController . doPrivileged ( new PrivilegedExceptionAction < String > ( ) { public String run ( ) throws Exception { return System . getProperty ( ADAPTER_NAME_PROP ) ; } } ) ; if ( adapterClassName != null ) { Class < ? extends IPlatformAdapter > clazz = ( Class < ? extends IPlatformAdapter > ) Class . forName ( adapterClassName ) ; svInstance = clazz . newInstance ( ) ; } else { svInstance = new DefaultPlatformAdapter ( ) ; } } catch ( Throwable t ) { Tr . error ( tc , "<Need new error message> - Failed to initialize {0}" , new Object [ ] { adapterClassName } ) ; svInstance = new DefaultPlatformAdapter ( ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "chosen adapter is: " + svInstance . getClass ( ) . getName ( ) ) ; } return svInstance ; } | Returns the JVM - specific implementation of IPlatformAdapter . This implementation will be able to provide non - standard JVM private API calls in a standard way by using the IPlatformAdapter interface . |
25,617 | public Object injectAndPostConstruct ( Class < ? > Klass ) throws InjectionProviderException { Object instance = null ; ManagedObject mo = ( ManagedObject ) ( ( WASInjectionProvider ) getInjectionProvider ( ) ) . inject ( Klass , true , _externalContext ) ; instance = mo . getObject ( ) ; if ( instance instanceof FacesWrapper ) { Object innerInstance = ( ( FacesWrapper ) instance ) . getWrapped ( ) ; if ( innerInstance != null ) { injectAndPostConstruct ( innerInstance ) ; } } return instance ; } | Made public for use by ClassUtils . |
25,618 | public void injectAndPostConstruct ( Object instance ) throws InjectionProviderException { if ( instance instanceof FacesWrapper ) { Object innerInstance = ( ( FacesWrapper ) instance ) . getWrapped ( ) ; if ( innerInstance != null ) { injectAndPostConstruct ( innerInstance ) ; } } ( ( WASInjectionProvider ) getInjectionProvider ( ) ) . inject ( instance , true , _externalContext ) ; } | when a specific constructor is used . Made public for use by ClassUtils . |
25,619 | String getDefaultSourcClassForSystemEvent ( Class systemEventClass ) { Constructor [ ] constructors = systemEventClass . getConstructors ( ) ; for ( Constructor constr : constructors ) { Class [ ] parms = constr . getParameterTypes ( ) ; if ( parms == null || parms . length != 1 ) { continue ; } return parms [ 0 ] . getName ( ) ; } log . warning ( "The SystemEvent source type for " + systemEventClass . getName ( ) + " could not be detected, either register it manually or use a constructor argument " + "for auto detection, defaulting now to java.lang.Object" ) ; return "java.lang.Object" ; } | A mapper for the handful of system listener defaults since every default mapper has the source type embedded in the constructor we can rely on introspection for the default mapping |
25,620 | public void becomeCloneOf ( ManagedObject clone ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "becomeCloneOf" , "Clone=" + clone ) ; PersistableMetaData theOther = ( PersistableMetaData ) clone ; _uniqueID = theOther . _uniqueID ; _streamID = theOther . _streamID ; _lockID = theOther . _lockID ; _referredID = theOther . _referredID ; _sequence = theOther . _sequence ; _expiryTime = theOther . _expiryTime ; _storageStrategy = theOther . _storageStrategy ; _priority = theOther . _priority ; _persistentSize = theOther . _persistentSize ; _maxDepth = theOther . _maxDepth ; _canExpireSilently = theOther . _canExpireSilently ; _logicallyDeleted = theOther . _logicallyDeleted ; _type = theOther . _type ; _className = theOther . _className ; _transactionId = theOther . _transactionId ; _streamListToken = theOther . _streamListToken ; _itemListToken = theOther . _itemListToken ; _rawDataToken = theOther . _rawDataToken ; _containsExpirables = theOther . _containsExpirables ; _redeliveredCount = theOther . _redeliveredCount ; _deliveryDelayTime = theOther . _deliveryDelayTime ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "becomeCloneOf" ) ; } | Replace the state of this object with the same object in some other state . Used to restore the before image if a transaction rolls back . |
25,621 | @ FFDCIgnore ( NoSuchMethodException . class ) private static boolean isRRSTransactional ( Object activationSpec ) { try { return ( Boolean ) activationSpec . getClass ( ) . getMethod ( "getRRSTransactional" ) . invoke ( activationSpec ) ; } catch ( NoSuchMethodException x ) { return false ; } catch ( Exception x ) { return false ; } } | Determines whether or not an activation spec is RRS transactional . |
25,622 | public void deactivateEndpoint ( Object activationSpec , WSMessageEndpointFactory messageEndpointFactory ) throws ResourceException { try { if ( activationSpec instanceof ActivationSpec ) { if ( endpointActivationParams . remove ( new ActivationParams ( activationSpec , messageEndpointFactory ) ) ) endpointDeactivation ( ( ActivationSpec ) activationSpec , messageEndpointFactory ) ; else if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "already deactivated" ) ; } else { throw new UnsupportedOperationException ( ) ; } } catch ( Exception ex ) { Tr . error ( tc , "J2CA8803.deactivation.failed" , bootstrapContextRef . getReference ( ) . getProperty ( Constants . SERVICE_PID ) , ex ) ; throw new ResourceException ( ex ) ; } } | Deactivate the endpoint corresponding to the specified activation spec instance . |
25,623 | void endpointDeactivation ( ActivationSpec activationSpec , WSMessageEndpointFactory messageEndpointFactory ) { ClassLoader previousClassLoader = jcasu . beginContextClassLoader ( raClassLoader ) ; try { BootstrapContextImpl bootstrapContext = bootstrapContextRef . getServiceWithException ( ) ; bootstrapContext . resourceAdapter . endpointDeactivation ( messageEndpointFactory , activationSpec ) ; } finally { jcasu . endContextClassLoader ( raClassLoader , previousClassLoader ) ; } Tr . info ( tc , "J2CA8804.act.spec.inactive" , id , messageEndpointFactory . getJ2EEName ( ) ) ; } | Utility method to perform endpoint deactivation . |
25,624 | private static int [ ] getFullJCAVersion ( BootstrapContextImpl bootstrapContext ) { int [ ] fullVersionIntArray = { 1 , 5 } ; ResourceAdapterMetaData raMetadata = bootstrapContext . getResourceAdapterMetaData ( ) ; if ( raMetadata != null ) { ConnectorModuleMetaData connectorMetadata = ( ConnectorModuleMetaData ) raMetadata . getModuleMetaData ( ) ; String fullVersionString = connectorMetadata . getSpecVersion ( ) ; String [ ] fullVersionStrArray = fullVersionString . split ( "\\." ) ; fullVersionIntArray [ 0 ] = Integer . valueOf ( fullVersionStrArray [ 0 ] ) ; fullVersionIntArray [ 1 ] = Integer . valueOf ( fullVersionStrArray [ 1 ] ) ; } return fullVersionIntArray ; } | Returns the JCA specification major and minor version with which the resource adapter declares support . |
25,625 | public final int registerRRSXAResourceInfo ( String actSpecId ) { RRSXAResourceFactory xaFactory = rrsXAResFactorySvcRef . getService ( ) ; if ( xaFactory == null ) { String formattedMessage = Utils . getMessage ( "J2CA8807.native.rrs.not.available" , new Object [ 0 ] ) ; throw new IllegalStateException ( formattedMessage ) ; } String filter = FilterUtils . createPropertyFilter ( "native.xa.factory" , ( xaFactory . getClass ( ) . getCanonicalName ( ) ) ) ; Serializable xaResInfo = xaFactory . getXAResourceInfo ( null ) ; int recoveryToken = transactionManager . registerResourceInfo ( filter , xaResInfo ) ; return recoveryToken ; } | Registers RRS XA resource information with the transaction manager . This is used for inbound . |
25,626 | protected void unsetJcaRuntimeVersion ( JCARuntimeVersion ref ) { Version toUnset = ref . getVersion ( ) ; if ( runtimeVersion . getVersion ( ) . compareTo ( toUnset ) == 0 ) runtimeVersion = DEFAULT_VERSION ; } | Declarative Services method for unsetting the JCA feature version |
25,627 | public boolean isDeliveryTransacted ( Method method ) throws NoSuchMethodException { BeanMetaData bmd = super . beanMetaData ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "MEF.isDeliveryTransacted called for " + bmd . enterpriseBeanName + "." + method . getName ( ) ) ; } EJBMethodInfoImpl minfo = getEJBMethodInfo ( method ) ; if ( minfo == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "MEF.isDeliveryTransacted failed to find method " + bmd . enterpriseBeanName + "." + method . getName ( ) ) ; } Tr . error ( tc , "NO_SUCH_MDB_METHOD_CNTR0085E" , bmd . j2eeName , method . getName ( ) , bmd . localInterfaceClass ) ; throw new NoSuchMethodException ( bmd . enterpriseBeanName + "." + method . getName ( ) + " not found" ) ; } EJBTransactionAttribute txAttr = minfo . getEJBTransactionAttribute ( ) ; boolean transacted ; if ( txAttr == EJBTransactionAttribute . REQUIRED ) { transacted = true ; } else if ( txAttr == EJBTransactionAttribute . NOT_SUPPORTED ) { transacted = false ; } else if ( txAttr == EJBTransactionAttribute . BEAN_MANAGED ) { transacted = false ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "MEF.isDeliveryTransacted detected invalid TX attribute for " + bmd . enterpriseBeanName + "." + method . getName ( ) + ", TX attribute is " + txAttr ) ; } Tr . error ( tc , "INVALID_MDB_TX_ATTR_CNTR0084E" , method . getName ( ) , bmd . j2eeName ) ; ResourceException r ; r = new ApplicationServerInternalException ( "Method exists, but TX attribute is neither REQUIRED, NOT_SUPPORTED, nor BEAN_MANAGED: " + txAttr ) ; NoSuchMethodException ex = new NoSuchMethodException ( "see chained exception" ) ; ex . initCause ( r ) ; throw ex ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "MEF.isDeliveryTransacted returning " + transacted + " for " + bmd . enterpriseBeanName + "." + method . getName ( ) ) ; } return transacted ; } | This is used to find out whether message deliveries to a message endpoint will be transacted or not . The message delivery preferences must not change during the lifetime of a message endpoint . This information is only a hint and may be useful to perform optimizations on message delivery . |
25,628 | private EJBMethodInfoImpl getEJBMethodInfo ( Method method ) { String targetSignature = MethodAttribUtils . methodSignature ( method ) ; EJBMethodInfoImpl minfo = null ; int n = ivMdbMethods . length ; for ( int i = 0 ; i < n ; ++ i ) { minfo = ivMdbMethods [ i ] ; if ( targetSignature . equals ( minfo . getMethodSignature ( ) ) ) { return minfo ; } } return null ; } | Get the EJBMethodInfo object associated with a specified Method object . |
25,629 | public void initialize ( EJSContainer ejbContainer , BeanId id , BeanMetaData bmd ) throws RemoteException { super . initialize ( ejbContainer , id , bmd ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "MEF Initializing MessageEndpointFactory for enterprise class " + bmd . enterpriseBeanName + ", with message listener interface of " + bmd . localInterfaceClass . getName ( ) ) ; } ivMdbMethods = beanMetaData . localMethodInfos ; ivMaxCreation = bmd . maxPoolSize ; if ( ivMaxCreation > 0 ) { MessageEndpointHandlerPool messageEndpointHandlerPool = new MessageEndpointHandlerPool ( this ) ; ivInvocationHandlerPool = container . poolManager . create ( bmd . minPoolSize , bmd . maxPoolSize , null , messageEndpointHandlerPool ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "MessageEndpointFactory initialized for enterprise class " + bmd . enterpriseBeanName + " with messaging listener interface of " + bmd . localInterfaceClass . getName ( ) ) ; } } | Extends EJSHome . initialize method with processing specific to a MessageEndpointFactory for a specified MDB . |
25,630 | public void returnInvocationHandler ( MessageEndpointBase endpoint , boolean reuse ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "MEF.returnInvocationHandler" ) ; if ( ivInvocationHandlerPool != null ) { if ( reuse ) { MessageEndpointBase . reset ( endpoint ) ; ivInvocationHandlerPool . put ( endpoint ) ; } synchronized ( ivStateLock ) { ivStateLock . notify ( ) ; } } if ( ivInvocationHandlerPool == null || ! reuse ) { synchronized ( ivStateLock ) { -- ivNumberOfMessageEndpointsCreated ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "MEF.returnInvocationHandler" ) ; } | LI2110 . 56 - rewrote method to use new reuse parameter . |
25,631 | public void setRAKey ( String raKey ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "MEF.setRAKey for enterprise class " + beanMetaData . enterpriseBeanName ) ; } ivRAKey = raKey ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "MEF.setRAKey for enterprise class " + beanMetaData . enterpriseBeanName ) ; } } | Set the Resource Adapter key that uniquely identifies the RA . This key is useful as a unique identifier in error messages . |
25,632 | protected ObjectManagerByteArrayOutputStream getSerializedBytes ( ) throws ObjectManagerException { final String methodName = "getSerializedBytes" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; ObjectManagerByteArrayOutputStream byteArrayOutputStream ; long estimatedLength ; try { if ( this instanceof SimplifiedSerialization ) { estimatedLength = estimatedLength ( ) ; byteArrayOutputStream = owningToken . objectStore . getObjectManagerState ( ) . getbyteArrayOutputStreamFromPool ( ( int ) estimatedLength ) ; java . io . DataOutputStream dataOutputStream = new java . io . DataOutputStream ( byteArrayOutputStream ) ; int signature = getSignature ( ) ; dataOutputStream . writeInt ( signature ) ; if ( signature == SimplifiedSerialization . signature_Generic ) { dataOutputStream . writeUTF ( getClass ( ) . getName ( ) ) ; } ( ( SimplifiedSerialization ) this ) . writeObject ( dataOutputStream ) ; } else { estimatedLength = 1024 ; byteArrayOutputStream = owningToken . objectStore . getObjectManagerState ( ) . getbyteArrayOutputStreamFromPool ( ( int ) estimatedLength ) ; byteArrayOutputStream . writeInt ( SimplifiedSerialization . signature_DefaultSerialization ) ; java . io . ObjectOutputStream objectOutputStream = new java . io . ObjectOutputStream ( byteArrayOutputStream ) ; objectOutputStream . writeObject ( this ) ; objectOutputStream . close ( ) ; } } catch ( java . io . IOException exception ) { ObjectManager . ffdc . processException ( this , cclass , methodName , exception , "1:619:1.34" ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName , exception ) ; throw new PermanentIOException ( this , exception ) ; } reserveSpaceInStore ( byteArrayOutputStream ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName , new Object [ ] { byteArrayOutputStream , new Long ( updateSequence ) , new Integer ( byteArrayOutputStream . size ( ) ) , new Long ( estimatedLength ) } ) ; return byteArrayOutputStream ; } | Get the serialized bytes representing this ManagedObject these will be given to the logger and potentially to the ObjectStore . |
25,633 | protected long getSerializedBytesLength ( ) throws ObjectManagerException { final String methodName = "getSerializedBytesLength" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; class DummyOutputStream extends java . io . OutputStream { public void write ( int b ) throws java . io . IOException { } } java . io . DataOutputStream dataOutputStream = new java . io . DataOutputStream ( new DummyOutputStream ( ) ) ; try { if ( this instanceof SimplifiedSerialization ) { int signature = getSignature ( ) ; dataOutputStream . writeInt ( signature ) ; if ( signature == SimplifiedSerialization . signature_Generic ) { dataOutputStream . writeUTF ( getClass ( ) . getName ( ) ) ; } ( ( SimplifiedSerialization ) this ) . writeObject ( dataOutputStream ) ; } else { dataOutputStream . writeInt ( SimplifiedSerialization . signature_DefaultSerialization ) ; java . io . ObjectOutputStream objectOutputStream = new java . io . ObjectOutputStream ( dataOutputStream ) ; objectOutputStream . writeObject ( this ) ; objectOutputStream . close ( ) ; } } catch ( java . io . IOException exception ) { ObjectManager . ffdc . processException ( this , cclass , methodName , exception , "1:707:1.34" ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName , exception ) ; throw new PermanentIOException ( this , exception ) ; } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( cclass , methodName , new Object [ ] { dataOutputStream , new Long ( dataOutputStream . size ( ) ) } ) ; return dataOutputStream . size ( ) ; } | Get the length of the serialized bytes representing this ManagedObject . |
25,634 | public void preAdd ( Transaction transaction ) throws ObjectManagerException { final String methodName = "preAdd" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { transaction } ) ; testState ( nextStateForAdd ) ; lock ( transaction . internalTransaction . getTransactionLock ( ) ) ; updateSequence ++ ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName ) ; } | Driven when the transaction is getting ready to add this ManagedObject to an object store . The after image has not been captured so the ManagedObject can still be changed . |
25,635 | public void preReplace ( Transaction transaction ) throws ObjectManagerException { final String methodName = "preReplace" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { transaction } ) ; if ( transactionLock . getLockingTransaction ( ) != transaction . internalTransaction ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName , new Object [ ] { transaction , transactionLock } ) ; throw new InvalidTransactionException ( this , transaction . internalTransaction , transactionLock ) ; } testState ( nextStateForReplace ) ; updateSequence ++ ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName ) ; } | Driven when the transaction is getting ready to replace a ManagedObject in an object store The object must have previously been locked . The after image has not been captured so the ManagedObject can still be changed . |
25,636 | public void postReplace ( Transaction transaction , boolean logged ) throws ObjectManagerException { final String methodName = "postReplace" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { transaction , new Boolean ( logged ) } ) ; if ( logged ) { setState ( nextStateForReplace ) ; } else { owningToken . objectStore . reserve ( - latestSerializedSizeDelta , false ) ; latestSerializedSize = latestSerializedSize - latestSerializedSizeDelta ; } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName ) ; } | Driven when the object is replaced in an object store within a transaction . The object must have previously been locked . |
25,637 | public void preOptimisticReplace ( Transaction transaction ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "preOptimisticReplace" , new Object [ ] { transaction } ) ; testState ( nextStateForOptimisticReplace ) ; updateSequence ++ ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "preOptimisticReplace" ) ; } | Driven when the object is optimistically replaced in an object store within a transaction . This differs from a standard replace in that the ManagedObject need not be locked . There is no before immage taken and it is up to the user of the optimisticReplace to perform any compensating action should the transaction back out . The after image has not been captured so the ManagedObject can still be changed . |
25,638 | public void postOptimisticReplace ( Transaction transaction , boolean logged ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "postOptimisticReplace" , new Object [ ] { transaction , new Boolean ( logged ) } ) ; if ( logged ) { setState ( nextStateForOptimisticReplace ) ; } else { owningToken . objectStore . reserve ( - latestSerializedSizeDelta , false ) ; latestSerializedSize = latestSerializedSize - latestSerializedSizeDelta ; } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "postOptimisticReplace" ) ; } | Driven when the object is optimistically replaced in an object store within a transaction . |
25,639 | public void prePrepare ( Transaction transaction ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "prePrepare" , new Object [ ] { transaction } ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "prePrepare" ) ; } | Driven just before the object changes to prepared state within a transaction if requested . This is only redriven at recovery time if the the ManagedObject explicitly re - requests this at recovery time . Any ManagedObject requesting this callback should override this method . |
25,640 | protected void commit ( Transaction transaction , ObjectManagerByteArrayOutputStream serializedBytes , long savedSequenceNumber , boolean requiresCurrentCheckpoint ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "commit" , new Object [ ] { transaction , serializedBytes , new Long ( savedSequenceNumber ) , new Boolean ( requiresCurrentCheckpoint ) } ) ; int entryState = state ; setState ( nextStateForCommit ) ; switch ( entryState ) { case stateAdded : case stateReplaced : synchronized ( forcedUpdateSequenceLock ) { if ( savedSequenceNumber > forcedUpdateSequence ) { forcedUpdateSequence = savedSequenceNumber ; latestSerializedBytes = serializedBytes ; owningToken . objectStore . add ( this , requiresCurrentCheckpoint ) ; } } break ; case stateToBeDeleted : case stateMustBeDeleted : int tempLatestSerializedSize ; synchronized ( forcedUpdateSequenceLock ) { if ( savedSequenceNumber > forcedUpdateSequence ) { forcedUpdateSequence = savedSequenceNumber ; if ( latestSerializedBytes != null ) { owningToken . objectStore . getObjectManagerState ( ) . returnByteArrayOutputStreamToPool ( latestSerializedBytes ) ; latestSerializedBytes = null ; } } owningToken . objectStore . remove ( owningToken , requiresCurrentCheckpoint ) ; tempLatestSerializedSize = latestSerializedSize ; latestSerializedSize = 0 ; } owningToken . objectStore . reserve ( - tempLatestSerializedSize , false ) ; break ; } beforeImmage = null ; numberOfLocksTaken = 0 ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "commit" ) ; } | Driven when the object changes to commited state within a transaction . Cannot be overriden by a subclass of ManagedObject . |
25,641 | protected void backout ( Transaction transaction , long savedSequenceNumber , boolean requiresCurrentCheckpoint ) throws ObjectManagerException { final String methodName = "backout" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { transaction , new Boolean ( requiresCurrentCheckpoint ) } ) ; int entryState = state ; setState ( nextStateForBackout ) ; switch ( entryState ) { case stateAdded : case stateMustBeDeleted : int tempLatestSerializedSize ; synchronized ( forcedUpdateSequenceLock ) { if ( savedSequenceNumber > forcedUpdateSequence ) { forcedUpdateSequence = savedSequenceNumber ; if ( latestSerializedBytes != null ) { owningToken . objectStore . getObjectManagerState ( ) . returnByteArrayOutputStreamToPool ( latestSerializedBytes ) ; latestSerializedBytes = null ; } } owningToken . objectStore . remove ( owningToken , requiresCurrentCheckpoint ) ; tempLatestSerializedSize = latestSerializedSize ; latestSerializedSize = 0 ; } owningToken . objectStore . reserve ( - tempLatestSerializedSize , false ) ; break ; case stateReplaced : backingOut = true ; becomeCloneOf ( beforeImmage ) ; backingOut = false ; break ; } beforeImmage = null ; numberOfLocksTaken = 0 ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName ) ; } | Driven when the object is backed out within a transaction . |
25,642 | protected void optimisticReplaceBackout ( Transaction transaction , ObjectManagerByteArrayOutputStream serializedBytes , long savedSequenceNumber , boolean requiresCurrentCheckpoint ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "optimisticReplaceBackout" , new Object [ ] { transaction , serializedBytes , new Long ( savedSequenceNumber ) , new Boolean ( requiresCurrentCheckpoint ) } ) ; setState ( nextStateForOptimisticReplaceBackout ) ; synchronized ( forcedUpdateSequenceLock ) { if ( savedSequenceNumber > forcedUpdateSequence ) { forcedUpdateSequence = savedSequenceNumber ; if ( state != stateDeleted ) { latestSerializedBytes = serializedBytes ; owningToken . objectStore . add ( this , requiresCurrentCheckpoint ) ; } } } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "optimisticReplaceBackout" ) ; } | Driven when the ManageObject is backed out after an optimistic replace within a transaction . |
25,643 | protected void checkpoint ( InternalTransaction internalTransaction , ObjectManagerByteArrayOutputStream serializedBytes , long savedSequenceNumber ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "checkpoint" , new Object [ ] { internalTransaction , serializedBytes , new Long ( savedSequenceNumber ) } ) ; if ( lockedBy ( internalTransaction ) ) { switch ( state ) { case stateAdded : synchronized ( forcedUpdateSequenceLock ) { if ( savedSequenceNumber > forcedUpdateSequence ) { forcedUpdateSequence = savedSequenceNumber ; latestSerializedBytes = serializedBytes ; owningToken . objectStore . add ( this , true ) ; } } break ; case stateReplaced : break ; case stateToBeDeleted : case stateMustBeDeleted : synchronized ( forcedUpdateSequenceLock ) { if ( savedSequenceNumber > forcedUpdateSequence ) { if ( serializedBytes != null ) { forcedUpdateSequence = savedSequenceNumber ; latestSerializedBytes = serializedBytes ; owningToken . objectStore . add ( this , true ) ; } } } break ; } } else { synchronized ( forcedUpdateSequenceLock ) { if ( savedSequenceNumber > forcedUpdateSequence ) { forcedUpdateSequence = savedSequenceNumber ; if ( state != stateDeleted ) { latestSerializedBytes = serializedBytes ; owningToken . objectStore . add ( this , true ) ; } } } } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "checkpoint" ) ; } | Called by the Transaction after the ObjectManager when it has written a checkpointStartLogRecord . The ManagedObject can assume that all log records up to and including logSequenceNumber are now safely hardened to disk . On this assumption we can write after images to the ObjectStores . |
25,644 | private void setState ( int [ ] nextState ) throws StateErrorException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setState" , new Object [ ] { nextState , new Integer ( state ) , stateNames [ state ] } ) ; synchronized ( stateLock ) { previousState = state ; state = nextState [ state ] ; } if ( state == stateError ) { StateErrorException stateErrorException = new StateErrorException ( this , previousState , stateNames [ previousState ] ) ; ObjectManager . ffdc . processException ( this , cclass , "setState" , stateErrorException , "1:2016:1.34" ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "setState" , new Object [ ] { stateErrorException , new Integer ( state ) , stateNames [ state ] } ) ; throw stateErrorException ; } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "setState" , "state=" + state + "(int) " + stateNames [ state ] + "(String)" ) ; } | Makes a state transition . |
25,645 | private void readObject ( java . io . ObjectInputStream objectInputStream ) throws java . io . IOException , java . lang . ClassNotFoundException { final String methodName = "readObject" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { objectInputStream } ) ; objectInputStream . defaultReadObject ( ) ; threadsWaitingForLock = 0 ; forcedUpdateSequence = 0 ; forcedUpdateSequenceLock = new ForcedUpdateSequenceLock ( ) ; transactionLock = new TransactionLock ( null ) ; state = stateReady ; previousState = - 1 ; stateLock = new Object ( ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName ) ; } | Customized deserialization . Notice that subclasses do not have to call this method in their super class because the deserialisation of the subclass need not concern itself with restoring the state of the super class . |
25,646 | public static Link parseMessageDestinationLink ( String origin , String link ) { return parse ( origin , link , false ) ; } | Parse a message - destination - link |
25,647 | public static Link parse ( String origin , String link , boolean allowModuleName ) { String originMod = origin ; int index = link . indexOf ( '#' ) ; if ( index == - 1 ) { if ( allowModuleName ) { index = link . lastIndexOf ( '/' ) ; if ( index == - 1 ) { return new Link ( null , null , link ) ; } return new Link ( null , link . substring ( 0 , index ) , link . substring ( index + 1 ) ) ; } return new Link ( null , null , link ) ; } String name = link . substring ( index + 1 ) ; String uri = link . substring ( 0 , index ) ; if ( originMod == null ) { originMod = "" ; } else { index = originMod . lastIndexOf ( '/' ) ; originMod = index == - 1 ? "" : originMod . substring ( 0 , index ) ; } if ( uri . startsWith ( "../" ) ) { uri = uri . substring ( 3 ) ; } while ( uri . startsWith ( "../" ) ) { index = originMod . lastIndexOf ( '/' ) ; if ( index == - 1 ) { originMod = "" ; } else { originMod = originMod . substring ( 0 , index ) ; } uri = uri . substring ( 3 ) ; } return new Link ( originMod . isEmpty ( ) ? uri : originMod + '/' + uri , null , name ) ; } | Parse a link from an ejb - link or a message - destination - link |
25,648 | private Object mergeReferenceAttributes ( String attributeName , EvaluationContext context , ExtendedAttributeDefinition attributeDef , ConfigElement config , Object rawValues ) { Object rawValue ; String [ ] referenceAttributes = getReferenceAttributes ( attributeName ) ; context . addProcessed ( referenceAttributes [ 0 ] ) ; context . addProcessed ( referenceAttributes [ 1 ] ) ; rawValue = config . getAttribute ( referenceAttributes [ 1 ] ) ; if ( rawValue == null ) { rawValue = config . getAttribute ( referenceAttributes [ 0 ] ) ; } else if ( attributeDef . getCardinality ( ) != 0 ) { Object refRawValue = config . getAttribute ( referenceAttributes [ 0 ] ) ; if ( refRawValue != null ) { rawValue = mergeReferenceValues ( attributeDef , refRawValue , rawValue ) ; } } else { } if ( rawValues == null ) { return rawValue ; } if ( rawValue == null || attributeDef . getCardinality ( ) == 0 ) { return rawValues ; } return mergeReferenceValues ( attributeDef , rawValues , rawValue ) ; } | Merge references and nested elements prior to evaluation . |
25,649 | private Object getUnconfiguredAttributeValue ( EvaluationContext context , ExtendedAttributeDefinition attributeDef ) throws ConfigEvaluatorException { Object rawValue = null ; rawValue = variableEvaluator . lookupVariableExtension ( context , attributeDef ) ; if ( rawValue == null ) { String [ ] defaultValues = attributeDef . getDefaultValue ( ) ; if ( defaultValues != null ) { rawValue = Arrays . asList ( defaultValues ) ; } } return rawValue ; } | Try to determine a value from variable or defaults for the AD . |
25,650 | private Object convertObjectToSingleValue ( Object rawValue , ExtendedAttributeDefinition attrDef , EvaluationContext context , int index , boolean ignoreWarnings ) throws ConfigEvaluatorException { if ( rawValue instanceof String ) { return convertStringToSingleValue ( ( String ) rawValue , attrDef , context , ignoreWarnings ) ; } else if ( rawValue instanceof ConfigElement . Reference ) { ConfigElement . Reference reference = processReference ( ( ConfigElement . Reference ) rawValue , context , ignoreWarnings ) ; if ( attrDef != null && attrDef . getType ( ) == MetaTypeFactory . PID_TYPE ) { return evaluateReference ( reference . getId ( ) , attrDef , context ) ; } else { return evaluateReference ( reference , context ) ; } } else if ( rawValue instanceof ConfigElement ) { return convertConfigElementToSingleValue ( ( ConfigElement ) rawValue , attrDef , context , index , ignoreWarnings ) ; } else { throw new IllegalStateException ( "Unsupported type: " + rawValue . getClass ( ) ) ; } } | Process and evaluate a raw value . |
25,651 | private String resolveStringValue ( Object rawValue , ExtendedAttributeDefinition attrDef , EvaluationContext context , boolean ignoreWarnings ) throws ConfigEvaluatorException { if ( rawValue instanceof String ) { return processString ( ( String ) rawValue , attrDef , context , ignoreWarnings ) ; } else if ( rawValue instanceof ConfigElement ) { return processString ( ( ( ConfigElement ) rawValue ) . getElementValue ( ) , attrDef , context , ignoreWarnings ) ; } else { throw new IllegalStateException ( "Attribute type mismatch. Expected String type, got " + rawValue ) ; } } | Resolve a raw value to a String and process it so that it can be evaluated . |
25,652 | private Object convertStringToSingleValue ( String rawValue , ExtendedAttributeDefinition attrDef , EvaluationContext context , boolean ignoreWarnings ) throws ConfigEvaluatorException { String value = processString ( rawValue , attrDef , context , ignoreWarnings ) ; return evaluateString ( value , attrDef , context ) ; } | Process and evaluate a raw String value . |
25,653 | private Object evaluateString ( String strVal , ExtendedAttributeDefinition attrDef , EvaluationContext context ) throws ConfigEvaluatorException { if ( attrDef == null ) { return strVal ; } int type = attrDef . getType ( ) ; if ( type == AttributeDefinition . BOOLEAN ) { return Boolean . valueOf ( strVal ) ; } else if ( type == AttributeDefinition . BYTE ) { return Byte . valueOf ( strVal ) ; } else if ( type == AttributeDefinition . CHARACTER ) { return Character . valueOf ( strVal . charAt ( 0 ) ) ; } else if ( type == AttributeDefinition . DOUBLE ) { return Double . valueOf ( strVal ) ; } else if ( type == AttributeDefinition . FLOAT ) { return Float . valueOf ( strVal ) ; } else if ( type == AttributeDefinition . INTEGER ) { return Integer . valueOf ( strVal ) ; } else if ( type == AttributeDefinition . LONG ) { return Long . valueOf ( strVal ) ; } else if ( type == AttributeDefinition . SHORT ) { return Short . valueOf ( strVal ) ; } else if ( type == MetaTypeFactory . DURATION_TYPE ) { return MetatypeUtils . evaluateDuration ( strVal , TimeUnit . MILLISECONDS ) ; } else if ( type == MetaTypeFactory . DURATION_S_TYPE ) { return MetatypeUtils . evaluateDuration ( strVal , TimeUnit . SECONDS ) ; } else if ( type == MetaTypeFactory . DURATION_M_TYPE ) { return MetatypeUtils . evaluateDuration ( strVal , TimeUnit . MINUTES ) ; } else if ( type == MetaTypeFactory . DURATION_H_TYPE ) { return MetatypeUtils . evaluateDuration ( strVal , TimeUnit . HOURS ) ; } else if ( type == MetaTypeFactory . PASSWORD_TYPE || type == MetaTypeFactory . HASHED_PASSWORD_TYPE ) { return new SerializableProtectedString ( strVal . toCharArray ( ) ) ; } else if ( type == MetaTypeFactory . ON_ERROR_TYPE ) { return Enum . valueOf ( OnError . class , strVal . trim ( ) . toUpperCase ( ) ) ; } else if ( type == MetaTypeFactory . TOKEN_TYPE ) { return MetatypeUtils . evaluateToken ( strVal ) ; } else if ( type == MetaTypeFactory . PID_TYPE ) { return evaluateReference ( strVal , attrDef , context ) ; } else { return strVal ; } } | Evaluate a string to a value of the target attribute type . |
25,654 | private String [ ] convertListToStringArray ( List < ? > rawValues , ExtendedAttributeDefinition attrDef , EvaluationContext context , boolean ignoreWarnings ) throws ConfigEvaluatorException { @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) Collection < String > collection = ( Collection ) convertListToVector ( rawValues , attrDef , context , ignoreWarnings ) ; return collection == null ? null : collection . toArray ( new String [ collection . size ( ) ] ) ; } | Converts a list of raw configuration values to a string array . |
25,655 | private Object convertConfigElementToSingleValue ( ConfigElement childElement , ExtendedAttributeDefinition attrDef , EvaluationContext context , int index , boolean ignoreWarnings ) throws ConfigEvaluatorException { if ( attrDef != null && attrDef . getType ( ) != MetaTypeFactory . PID_TYPE ) { return convertStringToSingleValue ( childElement . getElementValue ( ) , attrDef , context , ignoreWarnings ) ; } return evaluateConfigElement ( childElement , attrDef , context , index ) ; } | Process a raw ConfigElement value and evaluate it . |
25,656 | private String evaluateConfigElement ( ConfigElement childElement , final ExtendedAttributeDefinition parentAttribute , EvaluationContext context , int index ) throws ConfigEvaluatorException { RegistryEntry childRegistryEntry = null ; if ( parentAttribute != null && parentAttribute . getType ( ) == MetaTypeFactory . PID_TYPE ) { final String elementName = childElement . getNodeName ( ) ; RegistryEntry specifiedChildRegistryEntry = metatypeRegistry . getRegistryEntry ( parentAttribute . getReferencePid ( ) ) ; if ( specifiedChildRegistryEntry == null ) { return null ; } childRegistryEntry = specifiedChildRegistryEntry . traverseHierarchy ( new EntryAction < RegistryEntry > ( ) { private RegistryEntry result ; public boolean entry ( RegistryEntry registryEntry ) { if ( elementName . equals ( registryEntry . getPid ( ) ) || elementName . equals ( registryEntry . getEffectiveAD ( parentAttribute . getID ( ) ) ) ) { result = registryEntry ; return false ; } return true ; } public RegistryEntry getResult ( ) { return result ; } } ) ; if ( childRegistryEntry == null ) { childRegistryEntry = specifiedChildRegistryEntry ; } } else { childRegistryEntry = getRegistryEntryForChildFirstConfig ( context . getEvaluationResult ( ) . getRegistryEntry ( ) , childElement . getNodeName ( ) ) ; } String factoryPid = childElement . getNodeName ( ) ; if ( childRegistryEntry != null ) { factoryPid = childRegistryEntry . getPid ( ) ; } ConfigElement nestedElement = childElement ; if ( childElement instanceof SimpleElement ) { SimpleElement original = ( SimpleElement ) childElement ; if ( childRegistryEntry != null ) { if ( childRegistryEntry . isSingleton ( ) ) { nestedElement = new SingletonElement ( original , factoryPid ) ; } else { nestedElement = new FactoryElement ( original , index , childRegistryEntry ) ; } nestedElement . setIdAttribute ( ) ; } else { original . setDefaultId ( index ) ; nestedElement = original ; } nestedElement . setParent ( context . getConfigElement ( ) ) ; } ConfigID configId = nestedElement . getConfigID ( ) ; String pid = null ; try { pid = getPid ( configId ) ; } catch ( ConfigNotFoundException ex ) { throw new ConfigEvaluatorException ( "Could not obtain configuration for nested info" , ex ) ; } NestedInfo nestedInfo = new NestedInfo ( ) ; nestedInfo . configElement = nestedElement ; nestedInfo . pid = pid ; nestedInfo . registryEntry = childRegistryEntry ; if ( ! context . addNestedInfo ( nestedInfo ) || isHiddenExtension ( parentAttribute , context ) ) { return null ; } context . getEvaluationResult ( ) . addReference ( configId ) ; return pid ; } | Creates a NestedInfo object containing the service pid config element and registry entry for a nested config element . If this service pid has not been seen yet in this context the pid value will be returned . Otherwise the method returns null . |
25,657 | static void rcvCreateTempDestination ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvCreateTempDestination" , new Object [ ] { request , conversation , "" + requestNumber , "" + allocatedFromBufferPool , "" + partOfExchange } ) ; ConversationState convState = ( ConversationState ) conversation . getAttachment ( ) ; short connectionObjectID = request . getShort ( ) ; SICoreConnection connection = ( ( CATConnection ) convState . getObject ( connectionObjectID ) ) . getSICoreConnection ( ) ; short dist = request . getShort ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "SICoreConnection Id:" , connectionObjectID ) ; SibTr . debug ( tc , "Distribution" , dist ) ; } Distribution distribution = Distribution . getDistribution ( dist ) ; String destinationNamePrefix = request . getString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Destination prefix;" , destinationNamePrefix ) ; try { JsDestinationAddress destAddress = ( JsDestinationAddress ) connection . createTemporaryDestination ( distribution , destinationNamePrefix ) ; CommsByteBuffer reply = poolManager . allocate ( ) ; reply . putSIDestinationAddress ( destAddress , conversation . getHandshakeProperties ( ) . getFapLevel ( ) ) ; try { conversation . send ( reply , JFapChannelConstants . SEG_CREATE_TEMP_DESTINATION_R , requestNumber , JFapChannelConstants . PRIORITY_MEDIUM , true , ThrottlingPolicy . BLOCK_THREAD , null ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvCreateTempDestination" , CommsConstants . STATICCATDESTINATION_DESTCREATE_01 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; SibTr . error ( tc , "COMMUNICATION_ERROR_SICO2022" , e ) ; } } catch ( SINotAuthorizedException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; StaticCATHelper . sendExceptionToClient ( e , null , conversation , requestNumber ) ; } catch ( SIException e ) { if ( ! convState . hasMETerminated ( ) ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvCreateTempDestination" , CommsConstants . STATICCATDESTINATION_DESTCREATE_02 ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; StaticCATHelper . sendExceptionToClient ( e , CommsConstants . STATICCATDESTINATION_DESTCREATE_02 , conversation , requestNumber ) ; } request . release ( allocatedFromBufferPool ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "rcvCreateTempDestination" ) ; } | Creates a temporary destination for use for this connection only . |
25,658 | public static Expectations getJwtPrincipalExpectations ( String testAction , String user , String issuer ) { Expectations expectations = new Expectations ( ) ; expectations . addExpectation ( new JwtExpectation ( testAction , "token_type" , JwtFatConstants . TOKEN_TYPE_BEARER ) ) ; expectations . addExpectation ( new JwtExpectation ( testAction , "sub" , user ) ) ; expectations . addExpectation ( new JwtExpectation ( testAction , "upn" , user ) ) ; expectations . addExpectation ( new JwtExpectation ( testAction , "iss" , issuer ) ) ; return expectations ; } | Sets expectations that will check various claims within the subject JWT . |
25,659 | public void visitInnerClass ( String name , String outerName , String innerName , int access ) { ensureAnnotated ( ) ; if ( name . equals ( getClassInternalName ( ) ) ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( outerName ) ; sb . append ( "$" ) ; sb . append ( innerName ) ; isInnerClass = name . equals ( sb . toString ( ) ) ; } super . visitInnerClass ( name , outerName , innerName , access ) ; } | Visit the information about an inner class . We use this to determine whether or not the we re visiting an inner class . This callback is also used to ensure that appropriate class level annotations exist . |
25,660 | protected void ensureTraceObjectFieldAnnotated ( ) { if ( traceObjectFieldAnnotationVisitor == null && getTraceObjectFieldType ( ) != null ) { visitAnnotation ( TRACE_OBJECT_FIELD_TYPE . getDescriptor ( ) , true ) ; TraceObjectFieldAnnotationVisitor av = traceObjectFieldAnnotationVisitor ; traceObjectFieldAnnotationVisitor = null ; av . visit ( "fieldName" , getTraceObjectFieldName ( ) ) ; av . visit ( "fieldDesc" , getTraceObjectFieldType ( ) . getDescriptor ( ) ) ; av . visitEnd ( ) ; traceObjectFieldAnnotationVisitor = av ; } } | Verify that the TraceObjectField annotation exists on the instrumented class . If one does not exist add it . |
25,661 | public void visitEnd ( ) { if ( isInstrumentableClass ( ) ) { if ( isTraceObjectFieldDefinitionRequired ( ) ) { int access = ( Opcodes . ACC_PRIVATE | Opcodes . ACC_FINAL | Opcodes . ACC_STATIC | Opcodes . ACC_SYNTHETIC ) ; String name = getTraceObjectFieldName ( ) ; String desc = getTraceObjectFieldType ( ) . getDescriptor ( ) ; visitField ( access , name , desc , null , null ) ; } if ( isStaticInitializerRequired ( ) && ! isStaticInitDefined ( ) ) { staticInitializerGenerated = true ; MethodVisitor mv = visitMethod ( Opcodes . ACC_STATIC , "<clinit>" , "()V" , null , null ) ; Label lineNumberLabel = new Label ( ) ; mv . visitCode ( ) ; mv . visitLabel ( lineNumberLabel ) ; mv . visitLineNumber ( 65535 , lineNumberLabel ) ; mv . visitInsn ( Opcodes . RETURN ) ; mv . visitMaxs ( 1 , 0 ) ; mv . visitEnd ( ) ; } } super . visitEnd ( ) ; } | Visit the end of the class . All of the methods and fieldInfos defined in the class have been visited at this point . If we didn t encounter a trace state field or static initializer we ll add them now . |
25,662 | public TraceOptionsData getTraceOptionsData ( ) { if ( classInfo != null ) { return classInfo . getTraceOptionsData ( ) ; } if ( optionsAnnotationVisitor != null ) { return optionsAnnotationVisitor . getTraceOptionsData ( ) ; } return null ; } | Get the effective trace options for this class . |
25,663 | public void notificationCreated ( RuntimeUpdateManager updateManager , RuntimeUpdateNotification notification ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "notificationCreated" , notification . getName ( ) ) ; if ( configChecked ) { if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "notificationCreated: early return." , notification . getName ( ) ) ; return ; } if ( ! configChecked && RuntimeUpdateNotification . APPLICATIONS_STARTING . equals ( notification . getName ( ) ) ) { configChecked = true ; try { String sessionCacheConfigFilter = FilterUtils . createPropertyFilter ( Constants . SERVICE_PID , "com.ibm.ws.session.cache" ) ; Configuration [ ] sessionCacheConfigurations = configAdmin . listConfigurations ( sessionCacheConfigFilter ) ; if ( sessionCacheConfigurations . length != 1 ) { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "There should always be one exactly one sessionCacheConfiguration. " + "Number of sessionCacheConfigurations found = " + sessionCacheConfigurations . length ) ; } if ( sessionCacheConfigurations != null ) { for ( Configuration configuration : sessionCacheConfigurations ) { if ( configuration == null ) { continue ; } Dictionary < String , Object > props = configuration . getProperties ( ) ; String [ ] libraryRefs = ( String [ ] ) props . get ( "libraryRef" ) ; if ( libraryRefs == null ) { if ( ! isSessionCacheBellConfigured ( ) ) { Tr . error ( tc , "ERROR_CONFIG_INVALID_HTTPSESSIONCACHE" , Tr . formatMessage ( tc , "SESSION_CACHE_CONFIG_MESSAGE" , sampleConfig ) ) ; } } else if ( libraryRefs . length == 0 ) { Tr . debug ( tc , "The libraryRef attribute of the httpSessionCache in the server configuration could not be resolved. " + "Check for possible CWWKG0033W messages." ) ; } else { Configuration libraryConfiguration = configAdmin . getConfiguration ( libraryRefs [ 0 ] ) ; if ( libraryConfiguration != null ) { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "A httpSessionCache configuration with a valid libraryRef was found." ) ; } else { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "A httpSessionCache configuration with a valid libraryRef was found, " + "but the configuration the libraryRef points to is null. " + "This should never happen." ) ; } } } } } catch ( InvalidSyntaxException | IOException ex ) { Tr . error ( tc , "ERROR_SESSION_INIT" , ex ) ; } } if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "notificationCreated" , notification . getName ( ) ) ; } | Perform validation checking on the sessionCache feature s configuration . |
25,664 | private boolean isSessionCacheBellConfigured ( ) throws IOException , InvalidSyntaxException { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; boolean sessionCacheBellFound = false ; String bellConfigFilter = FilterUtils . createPropertyFilter ( "service.factoryPid" , "com.ibm.ws.classloading.bell" ) ; Configuration [ ] bellConfigurations = configAdmin . listConfigurations ( bellConfigFilter ) ; if ( bellConfigurations != null ) { for ( Configuration bellConfig : bellConfigurations ) { if ( bellConfig == null ) { continue ; } Dictionary < String , Object > bellProps = bellConfig . getProperties ( ) ; String [ ] bellServices = ( String [ ] ) bellProps . get ( "service" ) ; for ( String service : bellServices ) { if ( "javax.cache.spi.CachingProvider" . equals ( service ) ) { sessionCacheBellFound = true ; String bellLibraryRef = ( String ) bellProps . get ( "libraryRef" ) ; if ( bellLibraryRef != null ) { Configuration libraryConfiguration = configAdmin . getConfiguration ( bellLibraryRef ) ; if ( libraryConfiguration != null ) { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "A javax.cache.spi.CachingProvider BELL with a valid libraryRef was found." ) ; } else { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "A javax.cache.spi.CachingProvider BELL with a valid libraryRef was found, " + "but the configuration the libraryRef points to is null. " + "This should never happen." ) ; } } else { Tr . debug ( tc , "A BELL with a javax.cache.spi.CachingProvider service was found, " + "but the libraryRef is invalid. Check for possible CWWKG0033W messages." ) ; } } } } } return sessionCacheBellFound ; } | Check if the server configuration contains a BELL that provides the javax . cache . spi . CachingProvider service . |
25,665 | protected void activate ( ComponentContext cc ) { Bundle usingBundle = cc . getUsingBundle ( ) ; userContext = usingBundle . getBundleContext ( ) ; } | called by DS to activate this component |
25,666 | public static HttpURLConnection getHttpConnectionWithAnyResponseCode ( LibertyServer server , String path ) throws IOException { int timeout = DEFAULT_TIMEOUT ; URL url = createURL ( server , path ) ; HttpURLConnection con = getHttpConnection ( url , timeout , HTTPRequestMethod . GET ) ; Log . info ( SecurityFatHttpUtils . class , "getHttpConnection" , "Connecting to " + url . toExternalForm ( ) + " expecting http response in " + timeout + " seconds." ) ; con . connect ( ) ; return con ; } | This method creates a connection to a webpage and then returns the connection it doesn t care what the response code is . |
25,667 | @ SuppressWarnings ( "unchecked" ) public List getAllOutboundConversations ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getAllOutboundConversations" ) ; final List < Conversation > result = new ArrayList < Conversation > ( ) ; final HashMap < EndPointDescriptor , ConnectionDataGroup > endPointToGroupMapClone ; synchronized ( endPointToGroupMap ) { endPointToGroupMapClone = ( HashMap < EndPointDescriptor , ConnectionDataGroup > ) endPointToGroupMap . clone ( ) ; } for ( final Iterator groupIterator = endPointToGroupMapClone . values ( ) . iterator ( ) ; groupIterator . hasNext ( ) ; ) { final ConnectionDataGroup group = ( ConnectionDataGroup ) groupIterator . next ( ) ; final List connectionData = group . getConnections ( ) ; for ( final Iterator connectionDataIterator = connectionData . iterator ( ) ; connectionDataIterator . hasNext ( ) ; ) { final ConnectionData thisConnectionData = ( ConnectionData ) connectionDataIterator . next ( ) ; final Connection connection = thisConnectionData . getConnection ( ) ; final Conversation [ ] conversationArray = connection . getConversations ( ) ; for ( Conversation conv : conversationArray ) { if ( conv != null ) result . add ( conv ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getAllOutboundConversations" , result ) ; return result ; } | Gets a list of all the active conversations known about by the outbound connection tracker . |
25,668 | public void closeConversation ( OutboundConnection connectionHostingConversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "closeConversation" , connectionHostingConversation ) ; boolean closeOnThisThread = false ; synchronized ( closeList ) { closeOnThisThread = closeList . isEmpty ( ) ; closeList . addLast ( connectionHostingConversation ) ; if ( closeOnThisThread ) connectionHostingConversation = closeList . getFirst ( ) ; } while ( closeOnThisThread ) { ConnectionData connectionData = connectionHostingConversation . getConnectionData ( ) ; if ( connectionData != null ) { EndPointDescriptor endPointDescriptior = connectionData . getEndPointDescriptor ( ) ; ConnectionDataGroup group ; synchronized ( endPointToGroupMap ) { group = endPointToGroupMap . get ( endPointDescriptior ) ; if ( ( group == null ) || ( group != connectionData . getConnectionDataGroup ( ) ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { if ( group == null ) SibTr . debug ( this , tc , "group == nul" ) ; else SibTr . debug ( this , tc , "group != connectionData.getConnectionDataGroup()" ) ; } Exception e = new SIErrorException ( nls . getFormattedMessage ( "OUTCONNTRACKER_INTERNAL_SICJ0064" , null , "OUTCONNTRACKER_INTERNAL_SICJ0064" ) ) ; FFDCFilter . processException ( e , "com.ibm.ws.sib.jfapchannel.impl.octracker.OutboundConnectionTracker" , JFapChannelConstants . OUTBOUNDCONNTRACKER_CLOSECONV_01 , connectionData ) ; } else { group . close ( connectionHostingConversation ) ; if ( group . isEmpty ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "group: " + group + " has become empty" ) ; endPointToGroupMap . remove ( group . getEndPointDescriptor ( ) ) ; } } } } synchronized ( closeList ) { closeList . removeFirst ( ) ; closeOnThisThread = ! closeList . isEmpty ( ) ; if ( closeOnThisThread ) { connectionHostingConversation = closeList . getFirst ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "close list has an entry: " + connectionHostingConversation ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "closeConversation" ) ; } | Closes a conversation for the specified connection . It is unnecessary to require a reference to the conversation being closed as by the time this method is invoked the conversation has been marked closed and all that remains is the book keeping . This method notifies the appropriate connection group that a conversation has closed and if necessary removes the group from the map of those tracked . |
25,669 | public Conversation connect ( final ConversationReceiveListener receiveListener , final Conversation . ConversationType conversationType , final ConversationUsageType usageType ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "connect" , new Object [ ] { receiveListener , conversationType , usageType } ) ; final EndPointDescriptor testEndPoint = bridgeServiceDescriptor ; ConnectionDataGroup connGroup ; String chainName = JFapChannelConstants . CHAIN_NAME_TCPPROXYBRIDGESERVICE_OUTBOUND ; synchronized ( endPointToGroupMap ) { connGroup = endPointToGroupMap . get ( testEndPoint ) ; if ( connGroup == null ) { NetworkConnectionFactory virtualConnectionFactory ; try { NetworkTransportFactory transportFactory = framework . getNetworkTransportFactory ( ) ; virtualConnectionFactory = transportFactory . getOutboundNetworkConnectionFactoryByName ( chainName ) ; if ( virtualConnectionFactory == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Unknown chain name: " + chainName ) ; throw new SIErrorException ( nls . getFormattedMessage ( "OUTCONNTRACKER_INTERNAL_SICJ0064" , null , "OUTCONNTRACKER_INTERNAL_SICJ0064" ) ) ; } connGroup = new ConnectionDataGroup ( this , virtualConnectionFactory , testEndPoint , framework ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "created new connection data group: " + connGroup ) ; endPointToGroupMap . put ( testEndPoint , connGroup ) ; } catch ( FrameworkException frameworkException ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . exception ( this , tc , frameworkException ) ; throw new SIErrorException ( nls . getFormattedMessage ( "OUTCONNTRACKER_INTERNAL_SICJ0064" , null , "OUTCONNTRACKER_INTERNAL_SICJ0064" ) , frameworkException ) ; } } connGroup . connectionPending ( ) ; } Conversation retConversation = connGroup . connect ( receiveListener , usageType ) ; if ( retConversation != null ) retConversation . setConversationType ( conversationType ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "connect" , retConversation ) ; return retConversation ; } | begin F244595 D259087 |
25,670 | public Conversation cloneConversation ( OutboundConnection connection , ConversationReceiveListener conversationReceiveListener ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "cloneConversation" , new Object [ ] { connection , conversationReceiveListener } ) ; Conversation clonedConversation = connection . getConnectionData ( ) . getConnectionDataGroup ( ) . clone ( connection , conversationReceiveListener ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "cloneConversation" , clonedConversation ) ; return clonedConversation ; } | Clones a conversation . The method locates the appropriate connection group and invokes it s clone method . |
25,671 | public void purgeFromInvalidateImpl ( OutboundConnection connection , boolean notifyPeer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "purgeFromInvalidateImpl" , new Object [ ] { connection , "" + notifyPeer } ) ; connection . getConnectionData ( ) . getConnectionDataGroup ( ) . purgeFromInvalidateImpl ( connection , notifyPeer ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "purgeFromInvalidateImpl" ) ; } | Purges a conneciton from the tracker . This is invoked when an error is detected on a connection and we do not want any further conversations to attempt to use it . |
25,672 | public void purgeClosedConnection ( OutboundConnection connection ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "purgeClosedConnection" , connection ) ; connection . getConnectionData ( ) . getConnectionDataGroup ( ) . purgeClosedConnection ( connection ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "purgeClosedConnection" ) ; } | Purges a connection from the tracker that has been closed by the remote peer so can no longer be used . |
25,673 | public static JWTPayload getPayload ( String tokenString ) { JWTPayload payload = null ; String [ ] jwtParts = splitTokenString ( tokenString ) ; if ( jwtParts . length >= 2 ) { WSJsonToken token = deserialize ( jwtParts , tokenString ) ; payload = new JWTPayload ( ) ; fromJsonToken ( token , payload ) ; } return payload ; } | Extract payload from token without validating . |
25,674 | protected static String getElement ( JWTPayload payload , String element ) { String output = null ; if ( payload != null ) { Object outObj = payload . get ( element ) ; if ( outObj instanceof String ) { output = ( String ) outObj ; } else if ( outObj instanceof List ) { if ( ( ( List < String > ) outObj ) . size ( ) == 1 ) { output = ( ( List < String > ) outObj ) . get ( 0 ) ; } } } return output ; } | Get Aud element . |
25,675 | public String getExceptionType ( ) { String exceptionType = null ; Throwable rootCause = this ; do { Throwable temp = ( ( ServletException ) rootCause ) . getRootCause ( ) ; if ( temp != null ) { rootCause = temp ; } else { break ; } } while ( rootCause instanceof ServletException ) ; exceptionType = rootCause . getClass ( ) . getName ( ) ; return exceptionType ; } | Returns the fully - qualified class name of the exception . |
25,676 | public Class getExceptionClass ( ) { Class exceptionClass = null ; Throwable rootCause = this ; do { Throwable temp = ( ( ServletException ) rootCause ) . getRootCause ( ) ; if ( temp != null ) { rootCause = temp ; } else { break ; } } while ( rootCause instanceof ServletException ) ; exceptionClass = rootCause . getClass ( ) ; return exceptionClass ; } | Returns the java . lang . Class of the root cause . |
25,677 | private boolean isApplicationError ( Throwable rootEx , String pkgRoot ) { if ( rootEx != null ) { StackTraceElement [ ] stackTrace = rootEx . getStackTrace ( ) ; if ( stackTrace != null && stackTrace . length > 0 ) { StackTraceElement rootThrower = stackTrace [ 0 ] ; String className = rootThrower . getClassName ( ) ; if ( className != null && ! ! ! className . startsWith ( pkgRoot ) ) { return true ; } } } return false ; } | This method determines if the error is initiated by an application or not . |
25,678 | public void setLocalizationInfo ( String resourceBundleName , String resourceKey , Object [ ] formatArguments ) { exceptionInfo . setLocalizationInfo ( resourceBundleName , resourceKey , formatArguments ) ; } | Set the values to be used for finding the correct translated version of the message and formatting it . |
25,679 | public boolean isStarted ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isStarted" ) ; SibTr . exit ( tc , "isStarted" , new Boolean ( _started ) ) ; } return _started ; } | Indicates whether the MP has started or not . |
25,680 | protected SICoreConnection createConnection ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createConnection" ) ; SICoreConnection newConn = new ConnectionImpl ( this , null , null ) ; _connectionsLockManager . lock ( ) ; try { checkStarted ( ) ; synchronized ( _connections ) { _connections . put ( newConn , newConn ) ; } } finally { _connectionsLockManager . unlock ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createConnection" , newConn ) ; return newConn ; } | Connection locks are obtained on the connection lock manager . |
25,681 | protected void removeConnection ( ConnectionImpl connection ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeConnection" , connection ) ; synchronized ( _connections ) { _connections . remove ( connection ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeConnection" ) ; } | Removes a connection from the list of connections |
25,682 | void addConsumer ( ConsumerSessionImpl consumer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addConsumer" , consumer ) ; _consumerList . add ( consumer ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addConsumer" ) ; } | Adds a consumer to the message procoessor s list of consumers . |
25,683 | ConsumerSessionImpl getConsumer ( long id ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getConsumer" , new Long ( id ) ) ; ConsumerSessionImpl consumer = _consumerList . get ( id ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getConsumer" , consumer ) ; return consumer ; } | Gets a consumer from the list of consumers on this messaging engine |
25,684 | void removeConsumer ( ConsumerSessionImpl consumer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeConsumer" , consumer ) ; _consumerList . remove ( consumer ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeConsumer" ) ; } | Removes a consumer from the list of all consumers on this messaging engine . |
25,685 | public String getMessagingEngineBus ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMessagingEngineBus" ) ; String returnString = _engine . getBusName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getMessagingEngineBus" , returnString ) ; return returnString ; } | Gets the bus the messaging engine belongs to . |
25,686 | public JsBus getBus ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getBus" ) ; JsBus jsBus = ( JsBus ) _engine . getBus ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getBus" , jsBus ) ; return jsBus ; } | Gets a reference to the actual bus which this messaging engine belongs to . |
25,687 | public MultiMEProxyHandler getProxyHandler ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getProxyHandler" ) ; SibTr . exit ( tc , "getProxyHandler" , _multiMEProxyHandler ) ; } return _multiMEProxyHandler ; } | getProxyHandler returns the reference to the MultiMEProxyHandler for handling with proxy requests |
25,688 | private void checkStarted ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkStarted" ) ; synchronized ( _mpStartStopLock ) { if ( ! isStarted ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkStarted" , "ME not started" ) ; throw new SIResourceException ( nls . getFormattedMessage ( "MESSAGE_PROCESSOR_NOT_STARTED_ERROR_CWSIP0211" , new Object [ ] { getMessagingEngineName ( ) , getMessagingEngineBus ( ) } , null ) ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkStarted" ) ; } | Checks that the ME is started |
25,689 | public void initialize ( JsMessagingEngine engine ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "initialize" , engine ) ; this . _engine = engine ; this . _engine . setMEUUID ( new SIBUuid8 ( ) ) ; _mpio = new MPIO ( this ) ; _meFactories = new HashMap < String , Object > ( ) ; try { _meFactories . put ( SIMPConstants . JS_MBEAN_FACTORY , engine . getMBeanFactory ( ) ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.MessageProcessor.initialize" , "1:1202:1.445" , this ) ; SIErrorException finalE = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.MessageProcessor" , "1:1209:1.445" , e } , null ) , e ) ; SibTr . exception ( tc , finalE ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.MessageProcessor" , "1:1215:1.445" , SIMPUtils . getStackTrace ( e ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "initialize" , finalE ) ; throw finalE ; } if ( _factories == null ) { _factories = new HashMap < String , Object > ( ) ; try { _factories . put ( SIMPConstants . JS_DESTINATION_ADDRESS_FACTORY , JsMainAdminComponentImpl . getSIDestinationAddressFactory ( ) ) ; _factories . put ( SIMPConstants . SI_DESTINATION_ADDRESS_FACTORY , JsMainAdminComponentImpl . getSIDestinationAddressFactory ( ) ) ; _factories . put ( SIMPConstants . CONTROL_MESSAGE_FACTORY , ControlMessageFactory . getInstance ( ) ) ; _factories . put ( SIMPConstants . JS_ADMIN_FACTORY , JsAdminFactory . getInstance ( ) ) ; _factories . put ( SIMPConstants . MATCHING_INSTANCE , Matching . getInstance ( ) ) ; _factories . put ( SIMPConstants . JS_SELECTION_CRITERIA_FACTORY , JsMainAdminComponentImpl . getSelectionCriteriaFactory ( ) ) ; _factories . put ( SIMPConstants . JS_MESSAGE_HANDLE_FACTORY , JsMessageHandleFactory . getInstance ( ) ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.MessageProcessor.initialize" , "1:1261:1.445" , this ) ; SIErrorException finalE = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.MessageProcessor" , "1:1268:1.445" , e } , null ) , e ) ; SibTr . exception ( tc , finalE ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.MessageProcessor" , "1:1274:1.445" , SIMPUtils . getStackTrace ( e ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "initialize" , finalE ) ; throw finalE ; } } _discardMsgsAfterQueueDeletion = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "initialize" ) ; } | Initialises the MessageProcessor class . Called by the JsEngineComponent . initialize |
25,690 | public void stop ( int mode ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stop" , new Integer ( mode ) ) ; try { if ( mode == JsConstants . ME_STOP_COMMS_CONNECTIONS ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Stop request from Comms server for COMMS connections" ) ; closeConnections ( JsConstants . ME_STOP_QUIESCE , SIMPConstants . MP_VIACOMMS_CONNECTION ) ; return ; } if ( mode == JsConstants . ME_STOP_COMMS_SSL_CONNECTIONS ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Stop request from Comms server for COMMS SSL connections" ) ; closeConnections ( JsConstants . ME_STOP_QUIESCE , SIMPConstants . MP_VIACOMMSSSL_CONNECTION ) ; return ; } } catch ( Exception e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { if ( mode == JsConstants . ME_STOP_COMMS_CONNECTIONS ) SibTr . debug ( tc , "Failure in closing COMMS connections" , e ) ; else SibTr . debug ( tc , "Failure in closing COMMS over SSL connections" , e ) ; } return ; } try { announceMPStopping ( ) ; _connectionsLockManager . lockExclusive ( ) ; synchronized ( _mpStartStopLock ) { if ( _starting ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Stop waiting until start complete" ) ; try { _mpStartStopLock . wait ( ) ; } catch ( InterruptedException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . exception ( tc , e ) ; } } if ( ! _started ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "stop" , "Returning as not started." ) ; return ; } _started = false ; _mpio . stop ( ) ; _stoppableThreadCache . stopAllThreads ( ) ; _msgStore . expirerStop ( ) ; _msgStore . deliveryDelayManagerStop ( ) ; if ( _destinationManager == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "stop" , "Null DM" ) ; return ; } _destinationManager . stop ( mode ) ; closeConnections ( mode , SIMPConstants . MP_INPROCESS_CONNECTION ) ; _administrator . stop ( ) ; SchemaStore . messageStoreStoppingNotify ( _msgStore ) ; } } finally { _connectionsLockManager . unlockExclusive ( ) ; if ( _consumerThreadPool != null ) { _consumerThreadPool . shutdownNow ( ) ; _consumerThreadPool = null ; } if ( _systemThreadPool != null ) { _systemThreadPool . shutdownNow ( ) ; _systemThreadPool = null ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "stop" ) ; } | Stops the message processor |
25,691 | private void coldStart ( ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "coldStart" ) ; createPersistentStore ( ) ; createDestinationManager ( ) ; _proxyHandlerDestAddr = SIMPUtils . createJsSystemDestinationAddress ( SIMPConstants . PROXY_SYSTEM_DESTINATION_PREFIX , getMessagingEngineUuid ( ) ) ; createProxyHandler ( ) ; initializeNonPersistent ( ) ; _destinationChangeListener = new DestinationChangeListener ( this ) ; _linkChangeListener = new LinkChangeListener ( this ) ; createControlAdapter ( ) ; configureNeighbours ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "coldStart" ) ; } | Specific cold start procedure for the Message Processor . |
25,692 | private void configureNeighbours ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "configureNeighbours" ) ; try { JsAdminService service = JsMainAdminComponentImpl . getJsAdminService ( ) ; _messagingEnginesOnBus = new HashSet < SIBUuid8 > ( ) ; Set mes = null ; if ( service . isInitialized ( ) ) mes = service . getMessagingEngineSet ( _engine . getBusName ( ) ) ; if ( mes != null ) { Iterator iterator = mes . iterator ( ) ; LocalTransaction transaction = _txManager . createLocalTransaction ( true ) ; while ( iterator . hasNext ( ) ) { SIBUuid8 jsEngineUUID = new SIBUuid8 ( ( String ) iterator . next ( ) ) ; if ( ! jsEngineUUID . equals ( new SIBUuid8 ( _engine . getUuid ( ) ) ) ) { _multiMEProxyHandler . createNeighbour ( jsEngineUUID , _engine . getBusName ( ) , ( Transaction ) transaction ) ; } _messagingEnginesOnBus . add ( jsEngineUUID ) ; } transaction . commit ( ) ; } } catch ( SIException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.MessageProcessor.configureNeighbours" , "1:2223:1.445" , this ) ; SibTr . exception ( tc , e ) ; SIErrorException finalE = new SIErrorException ( nls . getFormattedMessage ( "MESSAGE_PROCESSOR_CONFIGURE_NEIGHBOURS_ERROR_CWSIP0391" , new Object [ ] { getMessagingEngineName ( ) , e } , null ) , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "configureNeighbours" , finalE ) ; SibTr . error ( tc , "MESSAGE_PROCESSOR_CONFIGURE_NEIGHBOURS_ERROR_CWSIP0391" , new Object [ ] { getMessagingEngineName ( ) , SIMPUtils . getStackTrace ( e ) } ) ; throw finalE ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "configureNeighbours" ) ; } | Loads the Neighbours from Admin |
25,693 | private void createProxyHandler ( ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createProxyHandler" ) ; _multiMEProxyHandler = new MultiMEProxyHandler ( this , _txManager ) ; _persistentStore . addItemStream ( _multiMEProxyHandler , _txManager . createAutoCommitTransaction ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createProxyHandler" ) ; } | In a cold start ME Environment the proxy handler needs to be created . |
25,694 | private void createDestinationManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createDestinationManager" ) ; _destinationManager = new DestinationManager ( this , _persistentStore ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createDestinationManager" ) ; } | Create this message processor s destination manager . |
25,695 | private void createDynamicConfigManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createDynamicConfigManager" ) ; _dynamicConfigManager = new DynamicConfigManager ( this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createDynamicConfigManager" ) ; } | Create this message processor s dynamic config manager . |
25,696 | private void createPersistentStore ( ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createPersistentStore" ) ; _persistentStore = new MessageProcessorStore ( new SIBUuid8 ( _engine . getUuid ( ) ) , _msgStore , _txManager ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createPersistentStore" ) ; } | Create this message processor s persistent store . |
25,697 | public DestinationDefinition createSystemDefaultExceptionDestination ( ) throws SIResourceException , SIMPDestinationAlreadyExistsException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createSystemDefaultExceptionDestination" ) ; DestinationDefinition defaultExceptionDestDef = createDestinationDefinition ( DestinationType . QUEUE , SIMPConstants . SYSTEM_DEFAULT_EXCEPTION_DESTINATION + getMessagingEngineName ( ) ) ; defaultExceptionDestDef . setMaxReliability ( Reliability . ASSURED_PERSISTENT ) ; defaultExceptionDestDef . setDefaultReliability ( Reliability . ASSURED_PERSISTENT ) ; defaultExceptionDestDef . setUUID ( SIMPUtils . createSIBUuid12 ( SIMPConstants . SYSTEM_DEFAULT_EXCEPTION_DESTINATION + getMessagingEngineName ( ) ) ) ; Set < String > destinationLocalizingMEs = new HashSet < String > ( ) ; destinationLocalizingMEs . add ( getMessagingEngineUuid ( ) . toString ( ) ) ; _destinationManager . createDestinationLocalization ( defaultExceptionDestDef , createLocalizationDefinition ( defaultExceptionDestDef . getName ( ) ) , destinationLocalizingMEs , false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createSystemDefaultExceptionDestination" , defaultExceptionDestDef ) ; return defaultExceptionDestDef ; } | Method to create the System default exception destination . There will be a default exception destination per Messaging Engine . |
25,698 | public void startNewThread ( Runnable runnable ) throws InterruptedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "startNewThread" ) ; if ( _consumerThreadPool == null ) { createConsumerThreadPool ( ) ; } try { _consumerThreadPool . execute ( runnable , ThreadPool . EXPAND_WHEN_QUEUE_IS_FULL_WAIT_AT_LIMIT ) ; } catch ( ThreadPoolQueueIsFullException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.MessageProcessor.startNewThread" , "1:2705:1.445" , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "startNewThread" ) ; } | Starts a new thread from the MP Consumers Thread Pool Only consumer threads should use this thread pool . |
25,699 | public void startNewSystemThread ( Runnable runnable ) throws InterruptedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "startNewSystemThread" , runnable ) ; if ( _systemThreadPool == null ) { createSystemThreadPool ( ) ; } try { _systemThreadPool . execute ( runnable , ThreadPool . EXPAND_WHEN_QUEUE_IS_FULL_WAIT_AT_LIMIT ) ; } catch ( ThreadPoolQueueIsFullException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.MessageProcessor.startNewSystemThread" , "1:2758:1.445" , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "startNewSystemThread" ) ; } | Starts a new thread from the MP System Thread Pool Only system threads should start call start using this method . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.