idx int64 0 41.2k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
23,900 | public final Operation patchInstanceGroupManager ( String instanceGroupManager , InstanceGroupManager instanceGroupManagerResource , List < String > fieldMask ) { PatchInstanceGroupManagerHttpRequest request = PatchInstanceGroupManagerHttpRequest . newBuilder ( ) . setInstanceGroupManager ( instanceGroupManager ) . setInstanceGroupManagerResource ( instanceGroupManagerResource ) . addAllFieldMask ( fieldMask ) . build ( ) ; return patchInstanceGroupManager ( request ) ; } | Updates a managed instance group using the information that you specify in the request . This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched . You must separately verify the status of the individual instances with the listManagedInstances method . This method supports PATCH semantics and uses the JSON merge patch format and processing rules . |
23,901 | public static DatasetId of ( String project , String dataset ) { return new DatasetId ( checkNotNull ( project ) , checkNotNull ( dataset ) ) ; } | Creates a dataset identity given project s and dataset s user - defined ids . |
23,902 | protected JCAConnectionFactoryMBeanImpl setConnectionFactoryChild ( String key , JCAConnectionFactoryMBeanImpl cf ) { return cfMBeanChildrenList . put ( key , cf ) ; } | setConnectionFactoryChild add a child of type JCAConnectionFactoryMBeanImpl to this MBean . |
23,903 | AppConfigurationEntry [ ] getAppConfigurationEntry ( String config ) { Vector entry = null ; if ( ( _fileMap != null ) && ( _fileMap . size ( ) != 0 ) ) { entry = ( Vector ) _fileMap . get ( config ) ; } if ( entry == null || entry . size ( ) == 0 ) { return null ; } int appSize = entry . size ( ) ; AppConfigurationEntry appConfig [ ] = new AppConfigurationEntry [ appSize ] ; Iterator it = entry . iterator ( ) ; for ( int i = 0 ; it . hasNext ( ) ; i ++ ) { AppConfigurationEntry appCfg = ( AppConfigurationEntry ) it . next ( ) ; appConfig [ i ] = new AppConfigurationEntry ( appCfg . getLoginModuleName ( ) , appCfg . getControlFlag ( ) , appCfg . getOptions ( ) ) ; } return appConfig ; } | This method returns an AppConfigurationEntry from internal storage based on the input key or alias . |
23,904 | private static void validateTags ( String [ ] tagList , ArrayList < String > validList , ArrayList < String > invalidList ) { for ( String tag : tagList ) { tag = tag . trim ( ) ; if ( tag . contains ( "\\" ) || tag . contains ( " " ) || tag . contains ( "\n" ) || tag . contains ( "-" ) || tag . equals ( "" ) ) { invalidList . add ( tag ) ; } else { validList . add ( tag ) ; } } } | Filter out tags with escaping characters and invalid characters restrict to only alphabetical and numeric characters |
23,905 | public void init ( CollectorManager collectorManager ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Subscribing to sources " + this , taskMap . keySet ( ) ) ; } try { this . collectorMgr = collectorManager ; collectorMgr . subscribe ( this , new ArrayList < String > ( taskMap . keySet ( ) ) ) ; } catch ( Exception e ) { } finally { latch . countDown ( ) ; } } | Methods from the collector manager handler interface |
23,906 | public boolean isAvailable ( ) { boolean available = false ; String relativeURL = inputSource . getRelativeURL ( ) ; Container container = tcontext . getServletContext ( ) . getModuleContainer ( ) ; if ( container != null ) { if ( options . isDisableJspRuntimeCompilation ( ) == false ) { Entry entry = container . getEntry ( relativeURL ) ; if ( entry != null ) { available = true ; } else { available = inputSource . getLastModified ( ) != 0 ; } } else { available = true ; } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINER ) ) { logger . logp ( Level . FINER , CLASS_NAME , "isAvailable" , "Container's relativeURL [" + relativeURL + "] " + "is available [" + available + "]" ) ; } } else { String realPath = tcontext . getRealPath ( relativeURL ) ; if ( options . isDisableJspRuntimeCompilation ( ) == false ) { available = new File ( realPath ) . exists ( ) ; } else { available = true ; } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINER ) ) { logger . logp ( Level . FINER , CLASS_NAME , "isAvailable" , "relativeURL [" + relativeURL + "] " + "realPath [" + realPath + "] is available [" + available + "]" ) ; } } return available ; } | Defect 268176 . 1 |
23,907 | private void parseMsgSize ( Map < Object , Object > props ) { String value = ( String ) props . get ( HttpConfigConstants . PROPNAME_MSG_SIZE_LIMIT ) ; if ( null != value ) { try { this . msgSizeLimit = Long . parseLong ( value ) ; if ( HttpConfigConstants . UNLIMITED > getMessageSize ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid size, setting to unlimited: " + this . msgSizeLimit ) ; } this . msgSizeLimit = HttpConfigConstants . UNLIMITED ; } } catch ( NumberFormatException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Invalid maximum message size; " + value ) ; } } } } | Parse the standard limit on an incoming message size . |
23,908 | private void parseMsgLargeBuffer ( Map < Object , Object > props ) { if ( ! areMessagesLimited ( ) ) { return ; } String value = ( String ) props . get ( HttpConfigConstants . PROPNAME_MSG_SIZE_LARGEBUFFER ) ; if ( null != value ) { try { long limit = Long . parseLong ( value ) ; if ( limit < getMessageSize ( ) || HttpConfigConstants . UNLIMITED > limit ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Config: Invalid large buffer limit: " + limit ) ; } limit = getMessageSize ( ) ; } this . msgSizeLargeBuffer = limit ; } catch ( NumberFormatException e ) { if ( tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Non-numeric large buffer size; " + value ) ; } } } } | Parse the single larger buffer size that is allowed to reach beyond the standard buffer size |
23,909 | void addFieldInfo ( String className , List < FieldInfo > fieldInfoList ) { if ( ivFieldInfoMap == null ) { ivFieldInfoMap = new HashMap < String , List < FieldInfo > > ( ) ; } ivFieldInfoMap . put ( className , fieldInfoList ) ; } | Adds the className and fieldInfoList to the ivFieldInfoMap . |
23,910 | public void createRecoveryManager ( RecoveryAgent agent , RecoveryLog tranLog , RecoveryLog xaLog , RecoveryLog recoverXaLog , byte [ ] defaultApplId , int defaultEpoch ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createRecoveryManager" , new Object [ ] { this , agent , tranLog , xaLog , recoverXaLog , defaultApplId , defaultEpoch } ) ; _tranLog = tranLog ; _xaLog = xaLog ; _recoverXaLog = recoverXaLog ; _recoveryManager = new EmbeddableRecoveryManager ( this , agent , tranLog , xaLog , recoverXaLog , defaultApplId , defaultEpoch ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "createRecoveryManager" , _recoveryManager ) ; } | Creates a RecoveryManager object instance and associates it with this FailureScopeController The recovery manager handles recovery processing on behalf of the managed failure scope . |
23,911 | public void setToBeDeleted ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setToBeDeleted" ) ; if ( _remoteSupport != null ) _remoteSupport . setToBeDeleted ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setToBeDeleted" ) ; } | Method to indicate the destination is to be deleted . |
23,912 | synchronized static void setFactoryImplementation ( ) { if ( initialized ) return ; initialized = true ; String authConfigProvider = Security . getProperty ( AuthConfigFactory . DEFAULT_FACTORY_SECURITY_PROPERTY ) ; if ( authConfigProvider == null || authConfigProvider . isEmpty ( ) ) { Tr . info ( tc , "JASPI_DEFAULT_AUTH_CONFIG_FACTORY" , new Object [ ] { JASPI_PROVIDER_REGISTRY } ) ; Security . setProperty ( AuthConfigFactory . DEFAULT_FACTORY_SECURITY_PROPERTY , JASPI_PROVIDER_REGISTRY ) ; } else if ( ! authConfigProvider . equals ( JASPI_PROVIDER_REGISTRY ) ) { Tr . info ( tc , "JASPI_AUTH_CONFIG_FACTORY" , new Object [ ] { authConfigProvider } ) ; } } | Make sure we don t dump multiple messages to the logs by only initializing once . |
23,913 | private < T extends Enum < T > > Object [ ] getValidEnumConstants ( Class < T > valueClass ) { T [ ] constants = valueClass . getEnumConstants ( ) ; if ( ! VersionedEnum . class . isAssignableFrom ( valueClass ) ) { return constants ; } List < T > valid = new ArrayList < T > ( constants . length ) ; for ( T value : constants ) { VersionedEnum versionedValue = ( VersionedEnum ) value ; if ( version >= versionedValue . getMinVersion ( ) ) { valid . add ( value ) ; } } return valid . toArray ( ) ; } | Return an array of the constants for the enum that are valid based on the version of this parser . |
23,914 | public WebAuthenticator getSSOAuthenticator ( WebRequest webRequest , String ssoCookieName ) { SecurityMetadata securityMetadata = webRequest . getSecurityMetadata ( ) ; SecurityService securityService = securityServiceRef . getService ( ) ; SSOCookieHelper cookieHelper ; if ( ssoCookieName != null ) { cookieHelper = new SSOCookieHelperImpl ( webAppSecurityConfig , ssoCookieName ) ; } else { cookieHelper = webAppSecurityConfig . createSSOCookieHelper ( ) ; } return new SSOAuthenticator ( securityService . getAuthenticationService ( ) , securityMetadata , webAppSecurityConfig , cookieHelper ) ; } | Create an instance of SSOAuthenticator . |
23,915 | private void initProperties ( int interval ) { if ( interval > MAXIMUM_INTERVAL ) interval = MAXIMUM_INTERVAL ; if ( interval < 1 ) interval = 1 ; _interval = interval ; } | Initialize this instance of an AbstractForAWhileSuppressor . |
23,916 | public static boolean uriCaseCheck ( File file , String matchString ) throws java . io . IOException { if ( isCaseInsensitive || isWindows ) { matchString = WSUtil . resolveURI ( matchString ) ; matchString = matchString . replace ( '/' , File . separatorChar ) ; String canPath = file . getCanonicalPath ( ) ; int offset = 0 ; int inx = matchString . length ( ) ; if ( isWindows && inx > 1 && canPath . length ( ) > 0 && matchString . charAt ( 1 ) == ':' ) { if ( ! ( matchString . substring ( 0 , 1 ) . equalsIgnoreCase ( canPath . substring ( 0 , 1 ) ) ) ) { return false ; } offset = 1 ; } return canPath . regionMatches ( canPath . length ( ) - inx + offset , matchString , offset , inx - offset ) ; } return true ; } | Not a problem on UNIX type systems since the OS handles is case sensitive . |
23,917 | public Object inject ( Class Klass , boolean doPostConstruct ) throws InjectionProviderException { return inject ( Klass , doPostConstruct , ( ExternalContext ) null ) ; } | CDI 1 . 2 injection based on a Class . CDI will create the object instance which allows for constructor Injection . |
23,918 | protected void destroy ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "CompletionKey::destroy entered for:" + this ) ; } if ( this . rawData != null ) { if ( this . wsByteBuf != null ) { this . wsByteBuf . release ( ) ; this . wsByteBuf = null ; } this . rawData = null ; this . stagingByteBuffer = null ; } } | Cleanup resources held by CompletionKey |
23,919 | public void setBuffer ( long address , long length , int index ) { if ( ( index < 0 ) || ( index >= this . bufferCount ) ) { throw new IllegalArgumentException ( ) ; } this . stagingByteBuffer . putLong ( ( FIRST_BUFFER_INDEX + ( 2 * index ) ) * 8 , address ) ; this . stagingByteBuffer . putLong ( ( FIRST_BUFFER_INDEX + ( 2 * index ) + 1 ) * 8 , length ) ; } | Sets the address and length of a buffer with a specified index . |
23,920 | public int getReturnCode ( ) { long returnCode = this . stagingByteBuffer . getLong ( RETURN_CODE_INDEX * 8 ) ; if ( returnCode > Integer . MAX_VALUE ) { AsyncException ae = new AsyncException ( "Return code value invalid" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Invalid value returned for return code, exception: " + ae . getMessage ( ) ) ; } FFDCFilter . processException ( ae , getClass ( ) . getName ( ) , "227" , this ) ; return Integer . MAX_VALUE ; } return ( int ) returnCode ; } | Returns the result code for the operation where the operation has completed . |
23,921 | public void init ( ) { List fMappings = new ArrayList ( webAppConfig . getFilterMappings ( ) ) ; if ( ! fMappings . isEmpty ( ) ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "init" , "filter mappings at init time ->" + fMappings ) ; _filtersDefined = true ; Iterator iter = fMappings . iterator ( ) ; while ( iter . hasNext ( ) ) { FilterMapping fMapping = ( FilterMapping ) iter . next ( ) ; addFilterMapping ( fMapping ) ; if ( WCCustomProperties . INVOKE_FILTER_INIT_AT_START_UP ) { String filterName = fMapping . getFilterConfig ( ) . getFilterName ( ) ; if ( _filterWrappers . get ( filterName ) == null ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "init" , "load filter init at startup, filter ->" + filterName ) ; try { loadFilter ( filterName ) ; } catch ( Throwable th ) { LoggerHelper . logParamsAndException ( logger , Level . SEVERE , CLASS_NAME , "init" , "init.exception.thrown.by.filter.at.startup" , new Object [ ] { filterName } , th ) ; } } } } } else if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "init" , "no filter mappings at init time" ) ; } } | Initialize the manager and see if any filters should be preloaded |
23,922 | public FilterInstanceWrapper getFilterInstanceWrapper ( String filterName ) throws ServletException { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . entering ( CLASS_NAME , "getFilterInstanceWrapper" , "entry for " + filterName ) ; try { FilterInstanceWrapper filterInstW ; filterInstW = ( FilterInstanceWrapper ) ( _filterWrappers . get ( filterName ) ) ; if ( filterInstW == null ) { synchronized ( webAppConfig . getFilterInfo ( filterName ) ) { filterInstW = ( FilterInstanceWrapper ) ( _filterWrappers . get ( filterName ) ) ; if ( filterInstW == null ) { filterInstW = loadFilter ( filterName ) ; } } } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . exiting ( CLASS_NAME , "getFilterInstanceWrapper" , "exit for " + filterName ) ; } return filterInstW ; } catch ( ServletException e ) { com . ibm . wsspi . webcontainer . util . FFDCWrapper . processException ( e , "com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper" , "166" , this ) ; throw e ; } catch ( Throwable th ) { com . ibm . wsspi . webcontainer . util . FFDCWrapper . processException ( th , "com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper" , "172" , this ) ; throw new ServletException ( MessageFormat . format ( "Filter [{0}]: could not be loaded" , new Object [ ] { filterName } ) , th ) ; } } | Returns a FilterInstanceWrapper object corresponding to the passed in filter name . If the filter inst has previously been created return that instance ... if not then create a new filter instance |
23,923 | public void shutdown ( ) { Enumeration filterWrappers = _filterWrappers . elements ( ) ; ClassLoader origClassLoader = ThreadContextHelper . getContextClassLoader ( ) ; try { final ClassLoader warClassLoader = webApp . getClassLoader ( ) ; if ( warClassLoader != origClassLoader ) { ThreadContextHelper . setClassLoader ( warClassLoader ) ; } while ( filterWrappers . hasMoreElements ( ) ) { try { FilterInstanceWrapper fw = ( FilterInstanceWrapper ) filterWrappers . nextElement ( ) ; Throwable t = this . webApp . invokeAnnotTypeOnObjectAndHierarchy ( fw . getFilterInstance ( ) , ANNOT_TYPE . PRE_DESTROY ) ; if ( t != null ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "shutdown" , "Exception caught during preDestroy processing: " + t ) ; } } fw . destroy ( ) ; } catch ( Throwable th ) { com . ibm . wsspi . webcontainer . util . FFDCWrapper . processException ( th , "com.ibm.ws.webcontainer.filter.WebAppFilterManager.shutdown" , "237" , this ) ; } } } finally { ThreadContextHelper . setClassLoader ( origClassLoader ) ; } } | Shuts down the filter manager instance and sets the filter config to null for each loaded filter object |
23,924 | private FilterInstanceWrapper loadFilter ( String filterName ) throws ServletException { ClassLoader origClassLoader = ThreadContextHelper . getContextClassLoader ( ) ; try { final ClassLoader warClassLoader = webApp . getClassLoader ( ) ; if ( warClassLoader != origClassLoader ) { ThreadContextHelper . setClassLoader ( warClassLoader ) ; } return _loadFilter ( filterName ) ; } finally { ThreadContextHelper . setClassLoader ( origClassLoader ) ; } } | Creates a new FilterInstanceWrapper object corresponding to the passed in filter name . This new object is added to the _filterWrappers hash table |
23,925 | protected FilterInstanceWrapper createFilterInstanceWrapper ( String filterName , Filter filter , ManagedObject mo ) throws InjectionException { return new FilterInstanceWrapper ( filterName , filter , _evtSource , mo ) ; } | begin LIDB - 3598 added support for FilterInvocationListeners |
23,926 | private boolean uriMatch ( String requestURI , IFilterMapping fmInfo , DispatcherType dispatcherType ) { boolean theyMatch = false ; switch ( fmInfo . getMappingType ( ) ) { case FMI_MAPPING_SINGLE_SLASH : if ( requestURI . equals ( "/" ) ) theyMatch = true ; break ; case FMI_MAPPING_PATH_MATCH : if ( requestURI . startsWith ( fmInfo . getUrlPattern ( ) + "/" ) || requestURI . equals ( fmInfo . getUrlPattern ( ) ) ) theyMatch = true ; break ; case FMI_MAPPING_EXTENSION_MATCH : String ext = fmInfo . getUrlPattern ( ) . substring ( 2 ) ; int index = requestURI . lastIndexOf ( '.' ) ; if ( index != - 1 ) if ( ext . equals ( requestURI . substring ( index + 1 ) ) ) theyMatch = true ; break ; case FMI_MAPPING_EXACT_MATCH : if ( requestURI . equals ( fmInfo . getUrlPattern ( ) ) ) theyMatch = true ; break ; default : break ; } boolean dispMatch = false ; if ( theyMatch ) { for ( int i = 0 ; i < fmInfo . getDispatchMode ( ) . length ; i ++ ) { if ( dispatcherType == fmInfo . getDispatchMode ( ) [ i ] ) { dispMatch = true ; break ; } } } return dispMatch && theyMatch ; } | Compares the request uri to the passed in filter uri to see if the filter associated with the filter uri should filter the request uri |
23,927 | public Schema makeRefProperty ( String ref , Schema property ) { Schema newProperty = new SchemaImpl ( ) . ref ( ref ) ; this . copyVendorExtensions ( property , newProperty ) ; return newProperty ; } | Make a RefProperty |
23,928 | public void copyVendorExtensions ( Schema source , Schema target ) { if ( source . getExtensions ( ) != null ) { Map < String , Object > vendorExtensions = source . getExtensions ( ) ; for ( String extName : vendorExtensions . keySet ( ) ) { ( ( SchemaImpl ) target ) . addExtension_compat ( extName , vendorExtensions . get ( extName ) ) ; } } } | Copy vendor extensions from Property to another Property |
23,929 | @ FFDCIgnore ( { IDTokenValidationFailedException . class } ) public boolean verify ( long clockSkew , Object key ) throws IDTokenValidationFailedException { boolean verified = false ; try { if ( super . verify ( clockSkew , key ) ) { payload . putAll ( super . getPayload ( ) ) ; addToPayload ( ) ; if ( payload . getAccessTokenHash ( ) != null ) { String athash = payload . getAccessTokenHash ( ) ; if ( this . ath == null ) { Tr . error ( tc , "OIDC_IDTOKEN_VERIFY_ATHASH_ERR" , new Object [ ] { getClientId ( ) , this . ath , athash } ) ; throw IDTokenValidationFailedException . format ( "OIDC_IDTOKEN_VERIFY_ATHASH_ERR" , getClientId ( ) , this . ath , athash ) ; } if ( verifyAccessTokenHash ( athash ) ) { verified = true ; } else { Tr . error ( tc , "OIDC_IDTOKEN_VERIFY_ATHASH_ERR" , new Object [ ] { getClientId ( ) , this . ath , athash } ) ; throw IDTokenValidationFailedException . format ( "OIDC_IDTOKEN_VERIFY_ATHASH_ERR" , getClientId ( ) , this . ath , athash ) ; } } else { verified = true ; } } } catch ( IDTokenValidationFailedException e ) { throw e ; } return verified ; } | Verify idtoken . |
23,930 | final static Class getPropertyType ( String longPropertyName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getPropertyType" , longPropertyName ) ; Class propType = null ; PropertyEntry prop = propertyMap . get ( longPropertyName ) ; if ( prop != null ) { propType = prop . getType ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getPropertyType" , propType ) ; return propType ; } | getPropertyType Utility method which returns the type of value required for the given property . URIDestinationCreator uses this method to test if a property is known or not and assumes silent failure if the property is not known . |
23,931 | final static Object convertPropertyToType ( String longPropertyName , String stringValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "convertPropertyToType" , new Object [ ] { longPropertyName , stringValue } ) ; Object decodedObject = stringValue ; Class requiredType = getPropertyType ( longPropertyName ) ; if ( requiredType == Integer . class ) { decodedObject = Integer . valueOf ( stringValue ) ; } else if ( requiredType == Long . class ) { decodedObject = Long . valueOf ( stringValue ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "convertPropertyToType" ) ; return decodedObject ; } | convertPropertyToType Convert a property from its stringified form into an Object of the appropriate type . Called by URIDestinationCreator . |
23,932 | private static void initializePropertyMaps ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "initializePropertyMap" ) ; addToMaps ( new PhantomPropertyCoder ( JmsInternalConstants . PRIORITY , PR ) , PR_INT , Integer . class , Integer . valueOf ( Message . DEFAULT_PRIORITY ) , null ) ; addToMaps ( new PhantomPropertyCoder ( JmsInternalConstants . DELIVERY_MODE , DM ) , DM_INT , String . class , ApiJmsConstants . DELIVERY_MODE_APP , null ) ; addToMaps ( new PhantomPropertyCoder ( JmsInternalConstants . TIME_TO_LIVE , TL ) , TL_INT , Long . class , Long . valueOf ( Message . DEFAULT_TIME_TO_LIVE ) , null ) ; addToMaps ( new ReadAheadCoder ( "readAhead" , RA ) , RA_INT , String . class , ApiJmsConstants . READ_AHEAD_AS_CONNECTION , null ) ; addToMaps ( new ShortStringPropertyCoder ( "topicName" , TN ) , TN_INT , String . class , null , null ) ; addToMaps ( new ShortStringPropertyCoder ( "topicSpace" , TS ) , TS_INT , String . class , JmsTopicImpl . DEFAULT_TOPIC_SPACE , null ) ; addToMaps ( new ShortStringPropertyCoder ( "queueName" , QN ) , QN_INT , String . class , null , null ) ; addToMaps ( new OnOffPropertyCoder ( JmsInternalConstants . SCOPE_TO_LOCAL_QP , QP ) , QP_INT , String . class , ApiJmsConstants . SCOPE_TO_LOCAL_QP_OFF , JmsQueueImpl . class ) ; addToMaps ( new OnOffPropertyCoder ( JmsInternalConstants . PRODUCER_PREFER_LOCAL , PL ) , PL_INT , String . class , ApiJmsConstants . PRODUCER_PREFER_LOCAL_ON , JmsQueueImpl . class ) ; addToMaps ( new OnOffPropertyCoder ( JmsInternalConstants . PRODUCER_BIND , PB ) , PB_INT , String . class , ApiJmsConstants . PRODUCER_BIND_OFF , JmsQueueImpl . class ) ; addToMaps ( new OnOffPropertyCoder ( JmsInternalConstants . GATHER_MESSAGES , GM ) , GM_INT , String . class , ApiJmsConstants . GATHER_MESSAGES_OFF , JmsQueueImpl . class ) ; addToMaps ( new StringPropertyCoder ( JmsInternalConstants . BUS_NAME , BN ) , BN_INT , String . class , null , null ) ; addToMaps ( new IntegerPropertyCoder ( JmsInternalConstants . BLOCKED_DESTINATION , BD ) , BD_INT , Integer . class , null , null ) ; addToMaps ( new StringPropertyCoder ( "destName" , DN ) , DN_INT , String . class , null , null ) ; addToMaps ( new StringPropertyCoder ( "destDiscrim" , DD ) , DD_INT , String . class , null , null ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "propertyMap" + propertyMap ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "reverseMap" + reverseMap ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "initializePropertyMap" ) ; } | initializePropertyMaps Initialize the Property Maps which must each contain an entry for every supported Destination Property which is to be encoded or set via this class . |
23,933 | private static int decodeBasicProperties ( JmsDestination newDest , byte [ ] msgForm ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "decodeBasicProperties" , new Object [ ] { newDest , msgForm } ) ; int offset = 0 ; byte delMode = ( byte ) ( msgForm [ 0 ] & DM_MASK ) ; if ( delMode == DM_PERSISTENT ) { newDest . setDeliveryMode ( ApiJmsConstants . DELIVERY_MODE_PERSISTENT ) ; } else if ( delMode == DM_NON_PERSISTENT ) { newDest . setDeliveryMode ( ApiJmsConstants . DELIVERY_MODE_NONPERSISTENT ) ; } else { newDest . setDeliveryMode ( ApiJmsConstants . DELIVERY_MODE_APP ) ; } byte priority = ( byte ) ( msgForm [ 1 ] & PRIORITY_MASK ) ; if ( priority != PRIORITY_NOT_SET ) { int pri = 0x0F & ( priority >>> 4 ) ; newDest . setPriority ( pri ) ; } if ( ( msgForm [ 1 ] & TTL_SET ) == TTL_SET ) { long ttl = ArrayUtil . readLong ( msgForm , 2 ) ; newDest . setTimeToLive ( ttl ) ; offset = 10 ; } else { offset = 2 ; } ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "decodeBasicProperties" , offset ) ; return offset ; } | decodeBasicProperties Decode the basic information to set the folloing attributes if present on to the new JmsDestination DeliveryMode Priority TimeToLive |
23,934 | private static void setProperty ( JmsDestination dest , String longName , int propIntValue , Object value ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setProperty" , new Object [ ] { dest , longName , propIntValue , value } ) ; switch ( propIntValue ) { case PR_INT : dest . setPriority ( ( Integer ) value ) ; break ; case DM_INT : dest . setDeliveryMode ( ( String ) value ) ; break ; case TL_INT : dest . setTimeToLive ( ( Long ) value ) ; break ; case RA_INT : dest . setReadAhead ( ( String ) value ) ; break ; case TN_INT : ( ( JmsTopic ) dest ) . setTopicName ( ( String ) value ) ; break ; case TS_INT : ( ( JmsTopic ) dest ) . setTopicSpace ( ( String ) value ) ; break ; case QN_INT : ( ( JmsQueue ) dest ) . setQueueName ( ( String ) value ) ; break ; case QP_INT : ( ( JmsQueue ) dest ) . setScopeToLocalQP ( ( String ) value ) ; break ; case PL_INT : ( ( JmsQueue ) dest ) . setProducerPreferLocal ( ( String ) value ) ; break ; case PB_INT : ( ( JmsQueue ) dest ) . setProducerBind ( ( String ) value ) ; break ; case GM_INT : ( ( JmsQueue ) dest ) . setGatherMessages ( ( String ) value ) ; break ; case BN_INT : dest . setBusName ( ( String ) value ) ; break ; case BD_INT : ( ( JmsDestInternals ) dest ) . setBlockedDestinationCode ( ( Integer ) value ) ; break ; case DN_INT : ( ( JmsDestinationImpl ) dest ) . setDestName ( ( String ) value ) ; break ; case DD_INT : ( ( JmsDestinationImpl ) dest ) . setDestDiscrim ( ( String ) value ) ; break ; default : throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "UNKNOWN_PROPERTY_CWSIA0363" , new Object [ ] { longName } , null , "MsgDestEncodingUtilsImpl.setProperty#1" , null , tc ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setProperty" ) ; } | setProperty Set the given property to the given value on the given JmsDestination . |
23,935 | public void setMessageListener ( MessageConsumer consumer , MessageListener listener ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setMessageListener" , new Object [ ] { consumer , listener } ) ; if ( ! ( consumer instanceof JmsMsgConsumerImpl ) ) { throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "WRONG_CONSUMER_TYPE_CWSIA0088" , new Object [ ] { consumer . getClass ( ) . getName ( ) } , null , "MessageListenerSetter.setMessageListener#1" , this , tc ) ; } JmsMsgConsumerImpl c = ( JmsMsgConsumerImpl ) consumer ; boolean checkManaged = false ; c . _setMessageListener ( listener , checkManaged ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setMessageListener" ) ; } | Assign a messageListener to the message consumer . |
23,936 | protected final void updateLastNotReadyTime ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "updateLastNotReadyTime" ) ; if ( readAhead ) { synchronized ( this ) { if ( ! usable ) { lastNotReadyTime = System . currentTimeMillis ( ) ; usable = true ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "updateLastNotReadyTime" ) ; } | Update the time when the consumer became not ready |
23,937 | protected final void messageReceived ( AIStreamKey key ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "messageReceived" , key ) ; long timeout = refillTime ; boolean reissueGet = false ; synchronized ( this ) { countOfUnlockedMessages ++ ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead change: countOfUnlockedMessages++ " + countOfUnlockedMessages ) ; if ( key . getOriginalTimeout ( ) == SIMPConstants . INFINITE_TIMEOUT ) { countOfOutstandingInfiniteTimeoutGets -- ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead change: countOfOutstandingInfiniteTimeoutGets-- " + countOfOutstandingInfiniteTimeoutGets ) ; } if ( isRefilling && key . getTick ( ) == refillTick ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "we are refilling, refillTime: " + Long . valueOf ( refillTime ) ) ; isRefilling = false ; refillTick = AnycastInputHandler . INVALID_TICK ; if ( refillTime != LocalConsumerPoint . NO_WAIT ) { if ( timeout != LocalConsumerPoint . INFINITE_WAIT ) timeout = refillTime - System . currentTimeMillis ( ) ; if ( timeout == LocalConsumerPoint . INFINITE_WAIT || timeout > 0 ) reissueGet = true ; } } } if ( reissueGet ) { initiateRefill ( ) ; waiting ( timeout , true ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "messageReceived" ) ; } | message received from the DME corresponding to a get request issued by this consumer . Note that this method will never be called on messages received due to gets issued by the RemoteQPConsumerKeyGroup |
23,938 | protected final void completedReceived ( AIStreamKey key , boolean reissueGet ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "completedReceived" , new Object [ ] { key , Boolean . valueOf ( reissueGet ) } ) ; completedReceivedNoPrefetch ( key , reissueGet ) ; try { if ( readAhead ) tryPrefetching ( ) ; } catch ( SIResourceException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.RemoteQPConsumerKey.completedReceived" , "1:568:1.47.1.26" , this ) ; SibTr . exception ( tc , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "completedReceived" ) ; } | completed tick received from the RME corresponding to a get request issued by this consumer . Note that this method is called only when the RemoteConsumerDispatcher does not hide the completed by reissuing the get . This method will never be called for messages received due to gets issued by the RemoteQPConsumerKeyGroup |
23,939 | protected final void completedReceivedNoPrefetch ( AIStreamKey key , boolean reissueGet ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "completedReceivedNoPrefetch" , new Object [ ] { key , Boolean . valueOf ( reissueGet ) } ) ; boolean initiateRefill = false ; long timeout = key . getOriginalTimeout ( ) ; synchronized ( this ) { if ( timeout == SIMPConstants . INFINITE_TIMEOUT ) { countOfOutstandingInfiniteTimeoutGets -- ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead change: countOfOutstandingInfiniteTimeoutGets-- " + countOfOutstandingInfiniteTimeoutGets ) ; } if ( isRefilling ) checkAndResetRefillState ( key . getTick ( ) ) ; if ( timeout != 0L ) { if ( timeout != SIMPConstants . INFINITE_TIMEOUT ) { long currTime = System . currentTimeMillis ( ) ; long expectedResponseTime = currTime + rcd . getRoundTripTime ( ) ; long timeoutTime = key . getIssueTime ( ) + key . getOriginalTimeout ( ) ; if ( expectedResponseTime < timeoutTime ) timeout = timeoutTime - currTime ; else timeout = 0L ; } } } if ( reissueGet && ( timeout == SIMPConstants . INFINITE_TIMEOUT || timeout > 0 ) ) { if ( initiateRefill ) initiateRefill ( ) ; waiting ( timeout , false ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "completedReceivedNoPrefetch" ) ; } | This method will never be called for messages received due to gets issued by the RemoteQPConsumerKeyGroup . |
23,940 | public final void messageLocked ( AIStreamKey key ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "messageLocked" , key ) ; synchronized ( this ) { countOfUnlockedMessages -- ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead change: countOfUnlockedMessages-- " + countOfUnlockedMessages ) ; } try { if ( readAhead ) tryPrefetching ( ) ; } catch ( SIResourceException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.RemoteQPConsumerKey.messageLocked" , "1:663:1.47.1.26" , this ) ; SibTr . exception ( tc , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "messageLocked" ) ; } | Message that was requested by this consumer has been locked . Note that it could have been locked by some other consumer . This method will never be called for messages received due to gets issued by the RemoteQPConsumerKeyGroup |
23,941 | public final void messageUnlocked ( AIStreamKey key ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "messageUnlocked" , key ) ; synchronized ( this ) { countOfUnlockedMessages ++ ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead change: countOfUnlockedMessages++ " + countOfUnlockedMessages ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "messageUnlocked" ) ; } | Message that was requested by this consumer has been unlocked . This method will never be called for messages received due to gets issued by the RemoteQPConsumerKeyGroup |
23,942 | private final void tryPrefetching ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "tryPrefetching" ) ; int toPrefetchCount = 0 ; synchronized ( this ) { if ( ! detached ) { int count = countOfOutstandingInfiniteTimeoutGets + countOfUnlockedMessages ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead check: count(" + count + ") prefetchWindowSize(" + prefetchWindowSize + ")" ) ; if ( count < prefetchWindowSize ) { if ( ( ( prefetchWindowSize - count ) / ( double ) prefetchWindowSize ) > SIMPConstants . MIN_PREFETCH_SIZE ) { toPrefetchCount = prefetchWindowSize - count ; countOfOutstandingInfiniteTimeoutGets += toPrefetchCount ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead change: countOfOutstandingInfiniteTimeoutGets+= " + countOfOutstandingInfiniteTimeoutGets ) ; } } } } if ( toPrefetchCount > 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead change: toPrefetchCount " + toPrefetchCount ) ; AIStreamKey [ ] keys = rcd . issueGet ( criteria , toPrefetchCount , this ) ; int i ; if ( keys == null ) i = 0 ; else i = keys . length ; if ( i < toPrefetchCount ) { synchronized ( this ) { countOfOutstandingInfiniteTimeoutGets -= ( toPrefetchCount - i ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "readAhead change: countOfOutstandingInfiniteTimeoutGets-= " + countOfOutstandingInfiniteTimeoutGets ) ; } SIResourceException e = new SIResourceException ( nls . getFormattedMessage ( "ANYCAST_STREAM_UNAVAILABLE_CWSIP0481" , new Object [ ] { rcd . getDestName ( ) , rcd . getLocalisationUuid ( ) . toString ( ) } , null ) ) ; FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.RemoteQPConsumerKey.tryPrefetching" , "1:755:1.47.1.26" , this ) ; SibTr . exception ( tc , e ) ; consumerPoint . notifyException ( e ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "tryPrefetching" ) ; } | Internal method . See if we need to prefetch more messages and if yes do the prefetch |
23,943 | public LocalTransactionCoordinator suspend ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "suspend" , this ) ; final LocalTranCoordImpl ltc = _coord ; if ( ltc != null ) { _coord = null ; ltc . suspend ( ) ; invokeEventListener ( ltc , UOWEventListener . SUSPEND , null ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "suspend" , ltc ) ; return ltc ; } | Disassociates the LTC scope from the thread . |
23,944 | public void resume ( LocalTransactionCoordinator ltc ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resume" , new Object [ ] { ltc , this } ) ; if ( ltc != null && _coord != null ) { final IllegalStateException ise = new IllegalStateException ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resume" , ise ) ; throw ise ; } _coord = ( LocalTranCoordImpl ) ltc ; if ( _coord != null ) { _coord . resume ( this ) ; invokeEventListener ( _coord , UOWEventListener . RESUME , null ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resume" ) ; } | Associates an LTC scope with the thread . Any existing LTC is suspended first . |
23,945 | public boolean hasOutstandingWork ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "hasOutstandingWork" , this ) ; final boolean retval = ( _coord != null ) ? _coord . hasWork ( ) : false ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "hasOutstandingWork" , retval ) ; return retval ; } | Returns a boolean to indicate whether there are incomplete RMLTs in the current LTC . |
23,946 | void setCoordinator ( LocalTranCoordImpl ltc ) { _coord = ltc ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setCoordinator: LTC=" + ltc ) ; } | Setter for the _coord member var . |
23,947 | public Object createResource ( final ResourceInfo resInfo ) throws Exception { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "createResource" , resInfo ) ; Object connectionFactory ; lock . readLock ( ) . lock ( ) ; try { if ( ! isInitialized . get ( ) ) { lock . readLock ( ) . unlock ( ) ; lock . writeLock ( ) . lock ( ) ; try { if ( ! isInitialized . get ( ) ) initPrivileged ( ) ; } finally { lock . readLock ( ) . lock ( ) ; lock . writeLock ( ) . unlock ( ) ; } } checkAccess ( ) ; ConnectionManager conMgr = AccessController . doPrivileged ( new PrivilegedExceptionAction < ConnectionManager > ( ) { public ConnectionManager run ( ) throws Exception { return conMgrSvc . getConnectionManager ( resInfo , AbstractConnectionFactoryService . this ) ; } } ) ; connectionFactory = getManagedConnectionFactory ( null ) . createConnectionFactory ( conMgr ) ; } catch ( Exception x ) { if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "createResource" , x ) ; throw x ; } catch ( Error x ) { if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "createResource" , x ) ; throw x ; } finally { lock . readLock ( ) . unlock ( ) ; } if ( isServerDefined ) { ComponentMetaData cData = ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) . getComponentMetaData ( ) ; if ( cData != null ) appsToRecycle . add ( cData . getJ2EEName ( ) . getApplication ( ) ) ; } if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "createResource" , connectionFactory ) ; return connectionFactory ; } | Create a connection factory . |
23,948 | public void destroyXAResource ( XAResource xa ) throws DestroyXAResourceException { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "destroyXAResource" , xa ) ; ManagedConnection mc = ( ( WSXAResource ) xa ) . getManagedConnection ( ) ; try { mc . destroy ( ) ; } catch ( ResourceException x ) { if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "destroyXAResource" , x ) ; throw new DestroyXAResourceException ( x ) ; } if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "destroyXAResource" ) ; } | Destroy the XAResource object . Internally the XAResource provider should cleanup resources used by XAResource object . For example JTA should close XAConnection . |
23,949 | public XAResource getXAResource ( Serializable xaresinfo ) throws XAResourceNotAvailableException { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getXAResource" , getID ( ) , xaresinfo ) ; XAResource xa ; ManagedConnection mc = null ; lock . readLock ( ) . lock ( ) ; try { if ( ! isInitialized . get ( ) ) try { lock . readLock ( ) . unlock ( ) ; lock . writeLock ( ) . lock ( ) ; if ( ! isInitialized . get ( ) ) initPrivileged ( ) ; } finally { lock . readLock ( ) . lock ( ) ; lock . writeLock ( ) . unlock ( ) ; } ManagedConnectionFactory mcf = getManagedConnectionFactory ( null ) ; setMQQueueManager ( xaresinfo ) ; Subject subject = getSubjectForRecovery ( mcf , xaresinfo ) ; mc = mcf . createManagedConnection ( subject , null ) ; xa = mc . getXAResource ( ) ; xa = xa instanceof WSXAResource ? xa : new WSXAResourceImpl ( mc , xa ) ; } catch ( Throwable x ) { if ( mc != null ) try { mc . destroy ( ) ; } catch ( Throwable t ) { } FFDCFilter . processException ( x , getClass ( ) . getName ( ) , "328" , this , new Object [ ] { xaresinfo } ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "getXAResource" , x ) ; if ( x instanceof Error ) throw ( Error ) x ; if ( x instanceof RuntimeException ) throw ( RuntimeException ) x ; throw new XAResourceNotAvailableException ( x ) ; } finally { lock . readLock ( ) . unlock ( ) ; } if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "getXAResource" , xa ) ; return xa ; } | Given XAResourceInfo the XAResourceFactory produces a XAResource object . |
23,950 | protected void setContainerAuthData ( ServiceReference < ? > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setContainerAuthData" , ref ) ; lock . writeLock ( ) . lock ( ) ; try { containerAuthDataRef = ref ; } finally { lock . writeLock ( ) . unlock ( ) ; } } | Declarative Services method for setting the service reference for the default container auth data |
23,951 | protected void setRecoveryAuthData ( ServiceReference < ? > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setRecoveryAuthData" , ref ) ; lock . writeLock ( ) . lock ( ) ; try { recoveryAuthDataRef = ref ; } finally { lock . writeLock ( ) . unlock ( ) ; } } | Declarative Services method for setting the recovery auth data service reference |
23,952 | int getAllPuCount ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getAllPuCount" , this ) ; int rtnCount = 0 ; synchronized ( pxmlsInfo ) { for ( JPAPxmlInfo pxmlInfo : pxmlsInfo . values ( ) ) { rtnCount += pxmlInfo . getPuCount ( ) ; } } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getAllPuCount : " + rtnCount ) ; return rtnCount ; } | Returns the number of persistence units in persistence . xml defined in this scope . |
23,953 | JPAPUnitInfo getUniquePuInfo ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getUniquePuInfo" ) ; JPAPUnitInfo rtnVal = null ; synchronized ( pxmlsInfo ) { for ( JPAPxmlInfo pxmlInfo : pxmlsInfo . values ( ) ) { Set < String > puNames = pxmlInfo . getPuNames ( ) ; if ( rtnVal == null && puNames . size ( ) == 1 ) { rtnVal = pxmlInfo . getPuInfo ( puNames . iterator ( ) . next ( ) ) ; } else { if ( puNames . size ( ) != 0 ) { rtnVal = null ; break ; } } } } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getUniquePuInfo" , rtnVal ) ; return rtnVal ; } | Returns an unique PersistenceUnitInfo object if there is only persistence unit defines in this scope otherwise null is returned . |
23,954 | void close ( ) { synchronized ( pxmlsInfo ) { for ( JPAPxmlInfo pxmlInfo : pxmlsInfo . values ( ) ) { pxmlInfo . close ( ) ; } pxmlsInfo . clear ( ) ; } } | Cloase all the active EntityManagers defined in this scope . |
23,955 | public T put ( T t , long timeoutInMillis , int maximumCapacity ) throws InterruptedException { if ( ( t == null ) || ( maximumCapacity > buffer . length ) ) { throw new IllegalArgumentException ( ) ; } long start = ( timeoutInMillis <= 0 ) ? 0 : - 1 ; long waitTime = timeoutInMillis ; T ret = null ; while ( true ) { synchronized ( lock ) { if ( numberOfUsedSlots . get ( ) < maximumCapacity ) { insert ( t ) ; numberOfUsedSlots . getAndIncrement ( ) ; ret = t ; } } if ( ret != null ) { notifyGet_ ( ) ; return ret ; } if ( start == - 1 ) start = System . currentTimeMillis ( ) ; int spinctr = SPINS_PUT_ ; while ( numberOfUsedSlots . get ( ) >= buffer . length ) { if ( waitTime <= 0 ) { return null ; } if ( spinctr > 0 ) { if ( YIELD_PUT_ ) Thread . yield ( ) ; spinctr -- ; } else { waitPut_ ( timeoutInMillis ) ; } waitTime = timeoutInMillis - ( System . currentTimeMillis ( ) - start ) ; } } } | Puts an object into the buffer . If the buffer is at or above the specified maximum capacity the call will block for up to the specified timeout period . |
23,956 | private final void expeditedInsert ( T t ) { expeditedBuffer [ expeditedPutIndex ] = t ; if ( ++ expeditedPutIndex >= expeditedBuffer . length ) { expeditedPutIndex = 0 ; } } | Inserts an object into the expeditedBuffer . Note that since there is no synchronization it is assumed that this is done outside the scope of this call . |
23,957 | private final T expeditedExtract ( ) { T old = expeditedBuffer [ expeditedTakeIndex ] ; expeditedBuffer [ expeditedTakeIndex ] = null ; if ( ++ expeditedTakeIndex >= expeditedBuffer . length ) expeditedTakeIndex = 0 ; return old ; } | Removes an object from the expeditedBuffer . Note that since there is no synchronization it is assumed that this is done outside the scope of this call . |
23,958 | @ SuppressWarnings ( "unchecked" ) public synchronized void expandExpedited ( int additionalCapacity ) { if ( additionalCapacity <= 0 ) { throw new IllegalArgumentException ( ) ; } int capacityBefore = expeditedBuffer . length ; synchronized ( lock ) { int capacityAfter = expeditedBuffer . length ; if ( capacityAfter == capacityBefore ) { final Object [ ] newBuffer = new Object [ expeditedBuffer . length + additionalCapacity ] ; if ( expeditedPutIndex > expeditedTakeIndex ) { int used = expeditedPutIndex - expeditedTakeIndex ; System . arraycopy ( expeditedBuffer , expeditedTakeIndex , newBuffer , 0 , used ) ; expeditedPutIndex = used ; } else if ( expeditedPutIndex != expeditedTakeIndex || expeditedBuffer [ expeditedTakeIndex ] != null ) { int used = expeditedBuffer . length - expeditedTakeIndex ; System . arraycopy ( expeditedBuffer , expeditedTakeIndex , newBuffer , 0 , used ) ; System . arraycopy ( expeditedBuffer , 0 , newBuffer , used , expeditedPutIndex ) ; expeditedPutIndex += used ; } else { expeditedPutIndex = 0 ; } expeditedTakeIndex = 0 ; expeditedBuffer = ( T [ ] ) newBuffer ; } } } | Increases the expedited buffer s capacity by the given amount . |
23,959 | public final Object deserialize ( byte [ ] bytes , ClassLoader loader ) throws ClassNotFoundException , IOException { if ( bytes == null ) return null ; InputStream iin = new InflaterInputStream ( new ByteArrayInputStream ( bytes ) ) ; SerializationService serializationSvc = serializationSvcRef . getService ( ) ; ObjectInputStream oin = loader == null || serializationSvc == null ? new ObjectInputStream ( iin ) : serializationSvc . createObjectInputStream ( iin , loader ) ; try { return oin . readObject ( ) ; } finally { oin . close ( ) ; } } | Utility method that deserializes an object from bytes . |
23,960 | String [ ] [ ] findPartitionInfo ( String hostName , String userDir , String libertyServerName , String executorIdentifier ) throws Exception { PartitionRecord criteria = new PartitionRecord ( false ) ; if ( hostName != null ) criteria . setHostName ( hostName ) ; if ( userDir != null ) criteria . setUserDir ( userDir ) ; if ( libertyServerName != null ) criteria . setLibertyServer ( libertyServerName ) ; if ( executorIdentifier != null ) criteria . setExecutor ( executorIdentifier ) ; List < PartitionRecord > records = null ; TransactionController tranController = new TransactionController ( ) ; try { tranController . preInvoke ( ) ; records = taskStore . find ( criteria ) ; } catch ( Throwable x ) { tranController . setFailure ( x ) ; } finally { Exception x = tranController . postInvoke ( Exception . class ) ; if ( x != null ) throw x ; } String [ ] [ ] partitionInfo = new String [ records == null ? 0 : records . size ( ) ] [ 5 ] ; if ( records != null ) for ( int i = 0 ; i < records . size ( ) ; i ++ ) { PartitionRecord record = records . get ( i ) ; partitionInfo [ i ] [ 0 ] = Long . toString ( record . getId ( ) ) ; partitionInfo [ i ] [ 1 ] = record . getHostName ( ) ; partitionInfo [ i ] [ 2 ] = record . getUserDir ( ) ; partitionInfo [ i ] [ 3 ] = record . getLibertyServer ( ) ; partitionInfo [ i ] [ 4 ] = record . getExecutor ( ) ; } return partitionInfo ; } | Finds partition information in the persistent store . All of the parameters are optional . If a parameter is specified only entries that match it are retrieved from the persistent store . |
23,961 | public < T > TaskStatus < T > getStatus ( long taskId ) { String owner = getOwner ( ) ; if ( owner == null ) return null ; TransactionController tranController = new TransactionController ( ) ; TaskRecord taskRecord = null ; try { tranController . preInvoke ( ) ; taskRecord = taskStore . findById ( taskId , owner , false ) ; } catch ( Throwable x ) { tranController . setFailure ( x ) ; } finally { PersistentStoreException x = tranController . postInvoke ( PersistentStoreException . class ) ; if ( x != null ) throw x ; } return taskRecord == null ? null : new TaskStatusImpl < T > ( taskRecord , this ) ; } | Returns status for the persistent task with the specified id . |
23,962 | public void notifyOfTaskAssignment ( long taskId , long nextExecTime , short binaryFlags , int transactionTimeout ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; Boolean previous = inMemoryTaskIds . put ( taskId , Boolean . TRUE ) ; if ( previous == null ) { InvokerTask task = new InvokerTask ( this , taskId , nextExecTime , binaryFlags , transactionTimeout ) ; long delay = nextExecTime - new Date ( ) . getTime ( ) ; if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( PersistentExecutorImpl . this , tc , "Found task " + taskId + " for " + delay + "ms from now" ) ; scheduledExecutor . schedule ( task , delay , TimeUnit . MILLISECONDS ) ; } else { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( PersistentExecutorImpl . this , tc , "Found task " + taskId + " already scheduled" ) ; } } | Invoked by a controller to notify a persistent executor that a task has been assigned to it . |
23,963 | int removePartitionInfo ( String hostName , String userDir , String libertyServerName , String executorIdentifier ) throws Exception { PartitionRecord criteria = new PartitionRecord ( false ) ; if ( hostName != null ) criteria . setHostName ( hostName ) ; if ( userDir != null ) criteria . setUserDir ( userDir ) ; if ( libertyServerName != null ) criteria . setLibertyServer ( libertyServerName ) ; if ( executorIdentifier != null ) criteria . setExecutor ( executorIdentifier ) ; int numRemoved = 0 ; TransactionController tranController = new TransactionController ( ) ; try { tranController . preInvoke ( ) ; numRemoved = taskStore . remove ( criteria ) ; } catch ( Throwable x ) { tranController . setFailure ( x ) ; } finally { Exception x = tranController . postInvoke ( Exception . class ) ; if ( x != null ) throw x ; } return numRemoved ; } | Removes partition information from the persistent store . All of the parameters are optional . If a parameter is specified only entries that match it are removed from the persistent store . |
23,964 | public final byte [ ] serialize ( Object object ) throws IOException { if ( object == null ) return null ; ByteArrayOutputStream bout = new ByteArrayOutputStream ( ) ; SerializationService serializationSvc = serializationSvcRef . getServiceWithException ( ) ; ObjectOutputStream oout = serializationSvc . createObjectOutputStream ( new DeflaterOutputStream ( bout ) ) ; oout . writeObject ( object ) ; oout . flush ( ) ; oout . close ( ) ; byte [ ] bytes = bout . toByteArray ( ) ; return bytes ; } | Utility method that serializes an object to bytes . |
23,965 | @ Reference ( service = ApplicationTracker . class ) protected void setApplicationTracker ( ServiceReference < ApplicationTracker > ref ) { appTrackerRef . setReference ( ref ) ; } | Declarative Services method for setting the ApplicationTracker reference |
23,966 | @ Reference ( service = Controller . class , cardinality = ReferenceCardinality . OPTIONAL , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY ) protected void setController ( ServiceReference < Controller > ref ) { controllerRef . setReference ( ref ) ; } | Declarative Services method for setting the controller |
23,967 | @ Reference ( service = LocalTransactionCurrent . class ) protected void setLocalTransactionCurrent ( ServiceReference < LocalTransactionCurrent > ref ) { localTranCurrentRef . setReference ( ref ) ; } | Declarative Services method for setting the LocalTransactionCurrent . |
23,968 | @ Reference ( service = SerializationService . class ) protected void setSerializationService ( ServiceReference < SerializationService > ref ) { serializationSvcRef . setReference ( ref ) ; } | Declarative Services method for setting the serialization service |
23,969 | @ Reference ( target = "(id=unbound)" ) protected void setTaskStore ( DatabaseStore svc , Map < String , Object > props ) { persistentStore = svc ; persistentStoreDisplayId = ( String ) props . get ( "config.displayId" ) ; } | Declarative Services method for setting the database store |
23,970 | @ Reference ( service = EmbeddableWebSphereTransactionManager . class ) protected void setTransactionManager ( ServiceReference < EmbeddableWebSphereTransactionManager > ref ) { tranMgrRef . setReference ( ref ) ; } | Declarative Services method for setting the transaction manager |
23,971 | int transfer ( Long maxTaskId , long oldPartitionId ) throws Exception { long partitionId = getPartitionId ( ) ; TransactionController tranController = new TransactionController ( ) ; int count = 0 ; try { tranController . preInvoke ( ) ; count = taskStore . transfer ( maxTaskId , oldPartitionId , partitionId ) ; Config config = configRef . get ( ) ; if ( config . enableTaskExecution && count > 0 && config . pollInterval < 0 ) { Synchronization autoPoll = new PollingTask ( config ) ; UOWCurrent uowCurrent = ( UOWCurrent ) tranController . tranMgr ; tranController . tranMgr . registerSynchronization ( uowCurrent . getUOWCoord ( ) , autoPoll , EmbeddableWebSphereTransactionManager . SYNC_TIER_OUTER ) ; } } catch ( Throwable x ) { tranController . setFailure ( x ) ; } finally { Exception x = tranController . postInvoke ( Exception . class ) ; if ( x != null ) throw x ; } return count ; } | Transfers tasks that have not yet ended to this persistent executor instance . |
23,972 | int updatePartitionInfo ( String oldHostName , String oldUserDir , String oldLibertyServerName , String oldExecutorIdentifier , String newHostName , String newUserDir , String newLibertyServerName , String newExecutorIdentifier ) throws Exception { PartitionRecord updates = new PartitionRecord ( false ) ; if ( newHostName != null ) updates . setHostName ( newHostName ) ; if ( newUserDir != null ) updates . setUserDir ( newUserDir ) ; if ( newLibertyServerName != null ) updates . setLibertyServer ( newLibertyServerName ) ; if ( newExecutorIdentifier != null ) updates . setExecutor ( newExecutorIdentifier ) ; PartitionRecord expected = new PartitionRecord ( false ) ; if ( oldHostName != null ) expected . setHostName ( oldHostName ) ; if ( oldUserDir != null ) expected . setUserDir ( oldUserDir ) ; if ( oldLibertyServerName != null ) expected . setLibertyServer ( oldLibertyServerName ) ; if ( oldExecutorIdentifier != null ) expected . setExecutor ( oldExecutorIdentifier ) ; int numUpdated = 0 ; TransactionController tranController = new TransactionController ( ) ; try { tranController . preInvoke ( ) ; numUpdated = taskStore . persist ( updates , expected ) ; } catch ( Throwable x ) { tranController . setFailure ( x ) ; } finally { Exception x = tranController . postInvoke ( Exception . class ) ; if ( x != null ) throw x ; } return numUpdated ; } | Updates partition information in the persistent store . The parameters are optional except at least one new value must be specified . |
23,973 | private void startPollingTask ( Config config ) { Future < ? > future ; PollingTask pollingTask = new PollingTask ( config ) ; future = scheduledExecutor . schedule ( pollingTask , config . initialPollDelay , TimeUnit . MILLISECONDS ) ; pollingFutureRef . getAndSet ( future ) ; } | Start the polling task . |
23,974 | private int configUpdateInProgress ( ) { int retVal ; configUpdatePendingQueueLock . writeLock ( ) . lock ( ) ; try { retVal = configUpdatesInProgress ; configUpdatesInProgress ++ ; } finally { configUpdatePendingQueueLock . writeLock ( ) . unlock ( ) ; } return retVal ; } | Bump the number of Configuration updates that we are monitoring . |
23,975 | public Object get ( int index ) { try { return getValue ( index ) ; } catch ( JMFException e ) { FFDCFilter . processException ( e , "get" , "125" , this ) ; return null ; } } | Implement get via getValue |
23,976 | protected DERObject convertHexEncoded ( String str , int off ) throws IOException { str = str . toLowerCase ( ) ; byte [ ] data = new byte [ str . length ( ) / 2 ] ; for ( int index = 0 ; index != data . length ; index ++ ) { char left = str . charAt ( ( index * 2 ) + off ) ; char right = str . charAt ( ( index * 2 ) + off + 1 ) ; if ( left < 'a' ) { data [ index ] = ( byte ) ( ( left - '0' ) << 4 ) ; } else { data [ index ] = ( byte ) ( ( left - 'a' + 10 ) << 4 ) ; } if ( right < 'a' ) { data [ index ] |= ( byte ) ( right - '0' ) ; } else { data [ index ] |= ( byte ) ( right - 'a' + 10 ) ; } } ASN1InputStream aIn = new ASN1InputStream ( new ByteArrayInputStream ( data ) ) ; return aIn . readObject ( ) ; } | Convert an inline encoded hex string rendition of an ASN . 1 object back into its corresponding ASN . 1 object . |
23,977 | protected boolean canBePrintable ( String str ) { for ( int i = str . length ( ) - 1 ; i >= 0 ; i -- ) { char ch = str . charAt ( i ) ; if ( str . charAt ( i ) > 0x007f ) { return false ; } if ( 'a' <= ch && ch <= 'z' ) { continue ; } if ( 'A' <= ch && ch <= 'Z' ) { continue ; } if ( '0' <= ch && ch <= '9' ) { continue ; } switch ( ch ) { case ' ' : case '\'' : case '(' : case ')' : case '+' : case '-' : case '.' : case ':' : case '=' : case '?' : continue ; } return false ; } return true ; } | return true if the passed in String can be represented without loss as a PrintableString false otherwise . |
23,978 | protected boolean canBeUTF8 ( String str ) { for ( int i = str . length ( ) - 1 ; i >= 0 ; i -- ) { if ( str . charAt ( i ) > 0x00ff ) { return false ; } } return true ; } | return true if the passed in String can be represented without loss as a UTF8String false otherwise . |
23,979 | private void insertNewLease ( String recoveryIdentity , String recoveryGroup , Connection conn ) throws SQLException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "insertNewLease" , this ) ; short serviceId = ( short ) 1 ; String insertString = "INSERT INTO " + _leaseTableName + " (SERVER_IDENTITY, RECOVERY_GROUP, LEASE_OWNER, LEASE_TIME)" + " VALUES (?,?,?,?)" ; PreparedStatement specStatement = null ; long fir1 = System . currentTimeMillis ( ) ; Tr . audit ( tc , "WTRN0108I: Insert New Lease for server with recovery identity " + recoveryIdentity ) ; try { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Need to setup new row using - " + insertString + ", and time: " + fir1 ) ; specStatement = conn . prepareStatement ( insertString ) ; specStatement . setString ( 1 , recoveryIdentity ) ; specStatement . setString ( 2 , recoveryGroup ) ; specStatement . setString ( 3 , recoveryIdentity ) ; specStatement . setLong ( 4 , fir1 ) ; int ret = specStatement . executeUpdate ( ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Have inserted Server row with return: " + ret ) ; } finally { if ( specStatement != null && ! specStatement . isClosed ( ) ) specStatement . close ( ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "insertNewLease" ) ; } | Insert a new lease in the table |
23,980 | public boolean addMessage ( SIMPMessage msgItem ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addMessage" , new Object [ ] { msgItem } ) ; JsMessage jsMsg = msgItem . getMessage ( ) ; StreamSet streamSet = getStreamSet ( ) ; msgItem . setGuaranteedStreamUuid ( streamSet . getStreamID ( ) ) ; Reliability reliability = msgItem . getReliability ( ) ; if ( reliability == Reliability . BEST_EFFORT_NONPERSISTENT ) { addBestEffortMessage ( msgItem ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addMessage" , false ) ; return false ; } else { SourceStream sourceStream = null ; int priority = msgItem . getPriority ( ) ; synchronized ( streamSet ) { sourceStream = ( SourceStream ) streamSet . getStream ( priority , reliability ) ; if ( sourceStream == null ) { sourceStream = createStream ( streamSet , priority , reliability , streamSet . getPersistentData ( priority , reliability ) , false ) ; } } synchronized ( sourceStream ) { long tick = this . messageProcessor . nextTick ( ) ; if ( msgItem . getRequiresNewId ( ) || jsMsg . getSystemMessageId ( ) == null ) { jsMsg . setSystemMessageSourceUuid ( this . messageProcessor . getMessagingEngineUuid ( ) ) ; jsMsg . setSystemMessageValue ( tick ) ; msgItem . setRequiresNewId ( false ) ; } jsMsg . setGuaranteedValueEndTick ( tick ) ; jsMsg . setGuaranteedValueValueTick ( tick ) ; jsMsg . setGuaranteedValueRequestedOnly ( false ) ; jsMsg . setGuaranteedValueStartTick ( sourceStream . getLastMsgAdded ( ) + 1 ) ; jsMsg . setGuaranteedValueCompletedPrefix ( sourceStream . getCompletedPrefix ( ) ) ; sourceStream . writeUncommitted ( msgItem ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addMessage" , true ) ; return true ; } } | Add a message in to the appropriate source stream . This will create a stream if one does not exist and set any appropriate fields in the message |
23,981 | private void addBestEffortMessage ( SIMPMessage msgItem ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addBestEffortMessage" , new Object [ ] { msgItem } ) ; JsMessage jsMsg = msgItem . getMessage ( ) ; long tick = this . messageProcessor . nextTick ( ) ; if ( msgItem . getRequiresNewId ( ) || jsMsg . getSystemMessageId ( ) == null ) { jsMsg . setSystemMessageSourceUuid ( this . messageProcessor . getMessagingEngineUuid ( ) ) ; jsMsg . setSystemMessageValue ( tick ) ; msgItem . setRequiresNewId ( false ) ; } jsMsg . setGuaranteedValueEndTick ( tick ) ; jsMsg . setGuaranteedValueValueTick ( tick ) ; jsMsg . setGuaranteedValueRequestedOnly ( false ) ; jsMsg . setGuaranteedValueStartTick ( - 1 ) ; jsMsg . setGuaranteedValueCompletedPrefix ( - 1 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addBestEffortMessage" ) ; } | Set any appropriate fields in the best effort message . The message does not actually get added to any streams . |
23,982 | public List processAck ( ControlAck ackMsg ) throws SIRollbackException , SIConnectionLostException , SIResourceException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processAck" , new Object [ ] { ackMsg } ) ; long ackPrefix = ackMsg . getAckPrefix ( ) ; List indexList = processAck ( ackMsg , ackPrefix ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processAck" , indexList ) ; return indexList ; } | Process an Ack control message . This method uses the completed prefix in the ack to decide if the stream s completed prefix should be advanced . |
23,983 | public List processAck ( ControlAck ackMsg , long ackPrefix ) throws SIRollbackException , SIConnectionLostException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processAck" , new Object [ ] { ackMsg , new Long ( ackPrefix ) } ) ; List indexList = null ; if ( ! hasStream ( ackMsg . getGuaranteedStreamUUID ( ) ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processAck" , new Object [ ] { "unknown stream ID - returning null array list(message ignored)" } ) ; return indexList ; } int priority = ackMsg . getPriority ( ) . intValue ( ) ; Reliability reliability = ackMsg . getReliability ( ) ; if ( reliability . compareTo ( Reliability . BEST_EFFORT_NONPERSISTENT ) > 0 ) { StreamSet streamSet = getStreamSet ( ) ; SourceStream sourceStream = ( SourceStream ) streamSet . getStream ( priority , reliability ) ; if ( sourceStream == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processAck" , new Object [ ] { "unknown priority - returning null array list(message ignored)" } ) ; return indexList ; } long completedPrefix = sourceStream . getAckPrefix ( ) ; if ( ackPrefix > completedPrefix ) { indexList = sourceStream . writeAckPrefix ( ackPrefix ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Unexpected Ack message for BEST_EFFORT_NONPERSISTENT message " ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processAck" , indexList ) ; return indexList ; } | Process an Ack control message but use the specified ack prefix to decide if the ack prefix can be advanced . |
23,984 | public void processNack ( ControlNack nackMsg ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processNack" , nackMsg ) ; if ( ! hasStream ( nackMsg . getGuaranteedStreamUUID ( ) ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processNack" , "unknown stream ID - message ignored" ) ; return ; } int priority = nackMsg . getPriority ( ) . intValue ( ) ; Reliability reliability = nackMsg . getReliability ( ) ; if ( reliability . compareTo ( Reliability . BEST_EFFORT_NONPERSISTENT ) > 0 ) { StreamSet streamSet = getStreamSet ( ) ; SourceStream sourceStream = ( SourceStream ) streamSet . getStream ( priority , reliability ) ; if ( sourceStream == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processNack" , "unknown priority - message ignored" ) ; return ; } sourceStream . processNack ( nackMsg ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Unexpected Nack message for BEST_EFFORT_NONPERSISTENT message " ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processNack" ) ; } | Process a Nack control message . This should cause the source stream to resend the original message . |
23,985 | public boolean isFlushed ( SIBUuid12 streamID ) { if ( streamSet == null ) return true ; return ! streamID . equals ( streamSet . getStreamID ( ) ) ; } | returns true if a given set of streams are flushed |
23,986 | public void reconstituteStreamSet ( StreamSet newStreamSet ) throws SIRollbackException , SIConnectionLostException , SIResourceException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "reconstituteStreamSet" , streamSet ) ; if ( streamSet != null ) streamSet . remove ( ) ; streamSet = newStreamSet ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "reconstituteStreamSet" ) ; } | Set the StreamSet to be the given one which will probably have been restored from the the message store |
23,987 | public List consolidateStreams ( int startMode ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "consolidateStreams" ) ; List < List > sentMsgs = new ArrayList < List > ( ) ; StreamSet streamSet = getStreamSet ( ) ; Iterator itr = streamSet . iterator ( ) ; List temp = null ; while ( itr . hasNext ( ) ) { SourceStream stream = ( SourceStream ) itr . next ( ) ; temp = stream . restoreStream ( startMode ) ; if ( temp != null ) sentMsgs . addAll ( temp ) ; if ( pointTopoint ) stream . setDefinedSendWindow ( messageProcessor . getDefinedSendWindow ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "consolidateStreams" , sentMsgs ) ; return sentMsgs ; } | Consolidates the sourceStreams following restart recovery . The streams may have scattered tick values derived from persisted messages or references . |
23,988 | protected void attemptFlush ( ) throws SIRollbackException , SIConnectionLostException , SIResourceException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "attemptFlush" ) ; FlushComplete callback = null ; StreamSet oldStreamSet = null ; synchronized ( this ) { if ( flushInProgress == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "attemptFlush" ) ; return ; } if ( ! flushable ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "attemptFlush" ) ; return ; } callback = flushInProgress ; flushInProgress = null ; oldStreamSet = streamSet ; streamSet = null ; if ( oldStreamSet != null ) { oldStreamSet . remove ( ) ; } } try { if ( oldStreamSet != null ) downControl . sendFlushedMessage ( null , oldStreamSet . getStreamID ( ) ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.gd.SourceStreamManager.attemptFlush" , "1:1158:1.102" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "attemptFlush" , e ) ; return ; } finally { callback . flushComplete ( destinationHandler ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "attemptFlush" ) ; } | This method will be called periodically to check if a stream is flushable and if so will actually flush it . |
23,989 | public void processFlushQuery ( ControlAreYouFlushed flushQuery ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processFlushQuery" , new Object [ ] { flushQuery } ) ; SIBUuid12 streamID = flushQuery . getGuaranteedStreamUUID ( ) ; try { synchronized ( this ) { SIBUuid8 requestor = flushQuery . getGuaranteedSourceMessagingEngineUUID ( ) ; if ( isFlushed ( streamID ) ) { downControl . sendFlushedMessage ( requestor , streamID ) ; } else { downControl . sendNotFlushedMessage ( requestor , streamID , flushQuery . getRequestID ( ) ) ; } } } catch ( SIResourceException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.gd.SourceStreamManager.processFlushQuery" , "1:1333:1.102" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processFlushQuery" , e ) ; throw e ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processFlushQuery" ) ; } | Handle a flush query . |
23,990 | public synchronized void updateTargetCellule ( SIBUuid8 targetMEUuid ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "updateTargetCellule" , targetMEUuid ) ; if ( pointTopoint ) { this . targetMEUuid = targetMEUuid ; StreamSet streamSet = getStreamSet ( ) ; if ( streamSet != null ) { streamSet . updateCellule ( targetMEUuid ) ; Transaction tran = txManager . createAutoCommitTransaction ( ) ; try { streamSet . requestUpdate ( tran ) ; } catch ( MessageStoreException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.gd.SourceStreamManager.updateTargetCellule" , "1:1384:1.102" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "updateTargetCellule" , e ) ; throw new SIResourceException ( e ) ; } Iterator itr = streamSet . iterator ( ) ; while ( itr . hasNext ( ) ) { SourceStream stream = ( SourceStream ) itr . next ( ) ; stream . noGuessesInStream ( ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "updateTargetCellule" ) ; } | This method should only be called when the PtoPOutputHandler was created with an unknown targetCellule and WLM has now told us correct targetCellule . This can only happen when the SourceStreamManager is owned by a PtoPOutputHandler within a LinkHandler |
23,991 | @ Generated ( value = "com.ibm.jtc.jax.tools.xjc.Driver" , date = "2014-06-11T05:49:00-04:00" , comments = "JAXB RI v2.2.3-11/28/2011 06:21 AM(foreman)-" ) public List < ExecutionElement > getExecutionElements ( ) { if ( executionElements == null ) { executionElements = new ArrayList < ExecutionElement > ( ) ; } return this . executionElements ; } | Gets the value of the executionElements property . |
23,992 | public static final String isDestinationPrefixValid ( String destinationPrefix ) { String result = VALID ; boolean isValid = true ; if ( null != destinationPrefix ) { int len = destinationPrefix . length ( ) ; if ( len > DESTINATION_PREFIX_MAX_LENGTH ) { isValid = false ; result = MAX_LENGTH_EXCEEDED ; } else { int along = 0 ; while ( ( along < len ) && isValid ) { char c = destinationPrefix . charAt ( along ) ; if ( ! ( ( 'A' <= c ) && ( 'Z' >= c ) ) ) { if ( ! ( ( 'a' <= c ) && ( 'z' >= c ) ) ) { if ( ! ( ( '0' <= c ) && ( '9' >= c ) ) ) { if ( '.' != c && '/' != c && '%' != c ) { isValid = false ; result = String . valueOf ( c ) ; } } } } along += 1 ; } } } return result ; } | Determines whether a destination prefix is valid or not . |
23,993 | @ Reference ( service = ComponentMetaDataDecorator . class , name = "componentMetadataDecorator" , cardinality = ReferenceCardinality . MULTIPLE , policy = ReferencePolicy . DYNAMIC ) protected void setComponentMetadataDecorator ( ServiceReference < ComponentMetaDataDecorator > ref ) { componentMetadataDecoratorRefs . putReference ( ( String ) ref . getProperty ( "component.name" ) , ref ) ; } | Declarative Services method for adding a component metadata decorator . |
23,994 | protected void unsetComponentMetadataDecorator ( ServiceReference < ComponentMetaDataDecorator > ref ) { componentMetadataDecoratorRefs . removeReference ( ( String ) ref . getProperty ( "component.name" ) , ref ) ; } | Declarative Services method for removing a component metadata decorator . |
23,995 | public void addMappingFilter ( String mapping , com . ibm . websphere . servlet . filter . IFilterConfig config ) { context . addMappingFilter ( mapping , config ) ; } | Adds a filter against a specified mapping into this context |
23,996 | public void disable ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "disable chain " + this ) ; } enabled = false ; } | Disable this chain . This does not change the chain s state . The caller should make subsequent calls to perform actions on the chain . |
23,997 | public synchronized void stop ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "stop chain " + this ) ; } if ( currentConfig == null ) return ; try { ChainData cd = cfw . getChain ( chainName ) ; if ( cd != null ) { cfw . removeChain ( cd ) ; } } catch ( ChainException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Error stopping chain " + chainName , this , e ) ; } } } | Stop this chain |
23,998 | public final SubscriptionMessage createNewSubscriptionMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createNewSubscriptionMessage" ) ; SubscriptionMessage msg = null ; try { msg = new SubscriptionMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } catch ( MessageDecodeFailedException e ) { throw new MessageCreateFailedException ( e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createNewSubscriptionMessage" ) ; return msg ; } | Create a new empty Subscription Propagation message |
23,999 | public final ControlAckExpected createNewControlAckExpected ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createNewControlAckExpected" ) ; ControlAckExpected msg = null ; try { msg = new ControlAckExpectedImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } catch ( MessageDecodeFailedException e ) { throw new MessageCreateFailedException ( e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createNewControlAckExpected" ) ; return msg ; } | Create a new empty ControlAckExpected message |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.