idx int64 0 41.2k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
24,900 | private void validateTimeToLive ( long timeToLive ) throws JMSException { if ( ( timeToLive < 0 ) || ( timeToLive > MfpConstants . MAX_TIME_TO_LIVE ) ) { throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "INVALID_VALUE_CWSIA0068" , new Object [ ] { "timeToLive" , "" + timeToLive } , tc ) ; } } | Validates the timeToLive field and throws an exception if there is a problem . |
24,901 | private void validateDeliveryDelayTime ( long deliveryDelayTime ) throws JMSException { if ( ( deliveryDelayTime < 0 ) || ( deliveryDelayTime > MfpConstants . MAX_DELIVERY_DELAY ) ) { throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "INVALID_VALUE_CWSIA0068" , new Object [ ] { "deliveryDelay" , "" + deliveryDelayTime } , tc ) ; } } | Validates the deliveryDelayTime field and throws an exception if there is a problem . |
24,902 | private void validateTTLAndDD ( long timeToLive ) throws JMSException { if ( getDeliveryDelay ( ) > 0 && timeToLive > 0 ) { if ( timeToLive <= getDeliveryDelay ( ) ) { throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "INVALID_VALUE_CWSIA0070" , new Object [ ] { getDeliveryDelay ( ) , timeToLive } , tc ) ; } } } | Validates timetoLive and deliverydelay values . Throws exception if there is a problem |
24,903 | private void validateCompletionListernerForNull ( CompletionListener cListener ) throws IllegalArgumentException { if ( null == cListener ) { throw ( IllegalArgumentException ) JmsErrorUtils . newThrowable ( IllegalArgumentException . class , "INVALID_VALUE_CWSIA0068" , new Object [ ] { "CompletionListener" , null } , null , null , this , tc ) ; } } | Validates if CompletionListener is NULL . If it is null throws IllegalArgumentException |
24,904 | private void validateMessageForNull ( Message msg ) throws MessageFormatException { if ( msg == null ) { throw ( MessageFormatException ) JmsErrorUtils . newThrowable ( MessageFormatException . class , "INVALID_VALUE_CWSIA0068" , new Object [ ] { "message" , null } , tc ) ; } } | Validates if Message is NULL . If it is null throws MessageFormatException |
24,905 | public synchronized ReentrantLock requestAccess ( AuthenticationData authenticationData ) { ReentrantLock currentLock = null ; currentLock = authenticationDataLocks . get ( authenticationData ) ; if ( currentLock == null ) { currentLock = new ReentrantLock ( ) ; authenticationDataLocks . put ( authenticationData , currentLock ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "The size of the authenticationDataLocks is " , authenticationDataLocks . size ( ) ) ; } return currentLock ; } | Obtains a reentrant lock for the given authentication data . |
24,906 | public synchronized void relinquishAccess ( AuthenticationData authenticationData , ReentrantLock currentLock ) { if ( currentLock != null ) { ReentrantLock savedLock = authenticationDataLocks . get ( authenticationData ) ; if ( currentLock == savedLock ) { authenticationDataLocks . remove ( authenticationData ) ; } currentLock . unlock ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "The size of the authenticationDataLocks is " , authenticationDataLocks . size ( ) ) ; } } | Unlocks the lock and cleans up internal state . |
24,907 | protected void destroyConnectionFactories ( boolean destroyImmediately ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "destroyConnectionFactories" , destroyImmediately , destroyWasDeferred ) ; if ( ! appsToRecycle . isEmpty ( ) ) { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "recycle applications" , appsToRecycle ) ; ApplicationRecycleCoordinator appRecycleCoord = null ; appRecycleCoord = ( ApplicationRecycleCoordinator ) priv . locateService ( componentContext , "appRecycleService" ) ; Set < String > members = new HashSet < String > ( appsToRecycle ) ; appsToRecycle . removeAll ( members ) ; appRecycleCoord . recycleApplications ( members ) ; } lock . writeLock ( ) . lock ( ) ; try { if ( isInitialized . get ( ) || destroyImmediately && destroyWasDeferred ) try { isInitialized . set ( false ) ; if ( destroyImmediately ) { conMgrSvc . destroyConnectionFactories ( ) ; if ( isDerbyEmbedded ) shutdownDerbyEmbedded ( ) ; conMgrSvc . deleteObserver ( this ) ; jdbcDriverSvc . deleteObserver ( this ) ; } destroyWasDeferred = ! destroyImmediately ; } catch ( RuntimeException x ) { throw x ; } catch ( Exception x ) { throw new RuntimeException ( x ) ; } } finally { lock . writeLock ( ) . unlock ( ) ; } if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "destroyConnectionFactories" ) ; } | Utility method to destroy WAS data source instances . |
24,908 | private static final void parseIsolationLevel ( NavigableMap < String , Object > wProps , String vendorImplClassName ) { Object isolationLevel = wProps . get ( DataSourceDef . isolationLevel . name ( ) ) ; if ( isolationLevel instanceof String ) { isolationLevel = "TRANSACTION_READ_COMMITTED" . equals ( isolationLevel ) ? Connection . TRANSACTION_READ_COMMITTED : "TRANSACTION_REPEATABLE_READ" . equals ( isolationLevel ) ? Connection . TRANSACTION_REPEATABLE_READ : "TRANSACTION_SERIALIZABLE" . equals ( isolationLevel ) ? Connection . TRANSACTION_SERIALIZABLE : "TRANSACTION_READ_UNCOMMITTED" . equals ( isolationLevel ) ? Connection . TRANSACTION_READ_UNCOMMITTED : "TRANSACTION_NONE" . equals ( isolationLevel ) ? Connection . TRANSACTION_NONE : "TRANSACTION_SNAPSHOT" . equals ( isolationLevel ) ? ( vendorImplClassName . startsWith ( "com.microsoft." ) ? 4096 : 16 ) : isolationLevel ; wProps . put ( DataSourceDef . isolationLevel . name ( ) , isolationLevel ) ; } } | Utility method that converts transaction isolation level constant names to the corresponding int value . |
24,909 | protected void setJaasLoginContextEntry ( ServiceReference < ? > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "setJaasLoginContextEntry" , ref ) ; } if ( ref != null ) { jaasLoginContextEntryName = ( String ) ref . getProperty ( "name" ) ; } } | Declarative services method to set the JAASLoginContextEntry . |
24,910 | protected void unsetConnectionManager ( ServiceReference < ConnectionManagerService > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "unsetConnectionManager" , ref ) ; } | Declarative Services method for unsetting the connection manager service reference |
24,911 | protected void unsetDriver ( ServiceReference < JDBCDriverService > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "unsetDriver" , ref ) ; } | Declarative Services method for unsetting the JDBC driver service reference |
24,912 | protected void unsetJaasLoginContextEntry ( ServiceReference < com . ibm . ws . security . jaas . common . JAASLoginContextEntry > svc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "unsetJaasLoginContextEntry" , svc ) ; } jaasLoginContextEntryName = null ; } | Declarative services method to unset the JAASLoginContextEntry . |
24,913 | protected void recordUnresolvedClass ( String classOrPackageName ) { if ( ! AnnotationTargetsVisitor . isPackageName ( classOrPackageName ) ) { String i_className = internClassName ( classOrPackageName ) ; if ( ! i_containsScannedClassName ( i_className ) ) { i_addUnresolvedClassName ( i_className ) ; } } } | classes list by a later processing step . |
24,914 | protected void i_setSuperclassName ( String i_subclassName , String i_superclassName ) { i_superclassNameMap . put ( i_subclassName , i_superclassName ) ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] Subclass [ {1} ] has superclass [ {2} ]" , new Object [ ] { getHashText ( ) , i_subclassName , i_superclassName } ) ) ; } } | When reading from serialization don t set the referenced classes . |
24,915 | protected AnnotationTargetsImpl_PolicyData getPolicyData ( ScanPolicy policy ) { if ( policy == ScanPolicy . SEED ) { scanDirectClasses ( ) ; return seedData ; } else if ( policy == ScanPolicy . PARTIAL ) { scanDirectClasses ( ) ; return partialData ; } else if ( policy == ScanPolicy . EXCLUDED ) { scanDirectClasses ( ) ; return excludedData ; } else if ( policy == ScanPolicy . EXTERNAL ) { scanReferenceClasses ( ) ; return externalData ; } else { throw new IllegalArgumentException ( "Policy [ " + policy + " ]" ) ; } } | Version for results retrieval ... trigger a scan . |
24,916 | protected AnnotationTargetsImpl_PolicyData doGetPolicyData ( ScanPolicy policy ) { if ( policy == ScanPolicy . SEED ) { return seedData ; } else if ( policy == ScanPolicy . PARTIAL ) { return partialData ; } else if ( policy == ScanPolicy . EXCLUDED ) { return excludedData ; } else if ( policy == ScanPolicy . EXTERNAL ) { return externalData ; } else { throw new IllegalArgumentException ( "Policy [ " + policy + " ]" ) ; } } | Version for recording ... don t trigger a scan! |
24,917 | public boolean init ( String s1 ) { if ( s1 == null ) { Tr . error ( tc , "AUTH_FILTER_INIT_NULL_STRING" ) ; return false ; } StringTokenizer st1 = new StringTokenizer ( s1 , ";" ) ; StringTokenizer st2 = null ; String s2 = null ; while ( st1 . hasMoreTokens ( ) ) { s2 = st1 . nextToken ( ) ; st2 = new StringTokenizer ( s2 , "^=!<>%" ) ; String key = st2 . nextToken ( ) ; if ( ! st2 . hasMoreTokens ( ) ) { Tr . error ( tc , "AUTH_FILTER_MALFORMED_CONDITION" , new Object [ ] { s1 , s2 , null } ) ; return false ; } String valueString = st2 . nextToken ( ) ; String operand = s2 . substring ( key . length ( ) , s2 . length ( ) - valueString . length ( ) ) . trim ( ) ; boolean ipAddress = false ; if ( REMOTE_ADDRESS . equals ( key ) ) ipAddress = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Adding " + key + " " + operand + " " + valueString ) ; } try { ICondition condition = makeConditionWithSymbolOperand ( key , operand , valueString , ipAddress ) ; filterCondition . add ( condition ) ; } catch ( FilterException e ) { throw new RuntimeException ( e ) ; } } return true ; } | Pass the filter string so the implementation can read any of the properties |
24,918 | public boolean isAccepted ( IRequestInfo req ) { boolean answer = true ; if ( processAll ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "processAll is true, therefore we always intercept." ) ; } return answer ; } String HTTPheader = null ; Iterator < ICondition > iter = filterCondition . iterator ( ) ; while ( iter . hasNext ( ) ) { ICondition cond = iter . next ( ) ; String key = cond . getKey ( ) ; HTTPheader = req . getHeader ( key ) ; boolean ipAddress = false ; if ( HTTPheader == null ) { if ( key . equals ( REMOTE_ADDRESS ) ) { HTTPheader = req . getRemoteAddr ( ) ; ipAddress = true ; } else if ( key . equals ( REQUEST_URL ) ) { HTTPheader = req . getRequestURL ( ) ; } else if ( key . equals ( AuthFilterConfig . KEY_WEB_APP ) || key . equals ( APPLICATION_NAMES ) ) { HTTPheader = req . getApplicationName ( ) ; } else if ( key . equals ( AuthFilterConfig . KEY_COOKIE ) ) { HTTPheader = req . getCookieName ( key ) ; } else if ( cond instanceof NotContainsCondition ) { continue ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "No HTTPheader found, and no remote-address, request-url, webApp, applicationNames, cookie, or requestHeader rule used - do not Intercept." ) ; } return false ; } } if ( HTTPheader == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "No HTTPheader found - do not Intercept." ) ; } return false ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Checking condition {0} {1}." , new Object [ ] { cond , HTTPheader } ) ; } try { IValue compareValue ; if ( ipAddress ) { compareValue = new ValueIPAddress ( HTTPheader ) ; } else { compareValue = new ValueString ( HTTPheader ) ; } answer = cond . checkCondition ( compareValue ) ; if ( ! answer ) { break ; } } catch ( FilterException e ) { throw new RuntimeException ( e ) ; } } return answer ; } | Indicates if TAI should intercept request based on pre - defined rules . Basically just execute the conditions created earlier . |
24,919 | public boolean containsGuesses ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "containsGuesses" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "containsGuesses" , Boolean . FALSE ) ; return false ; } | The anycast protocol contains no guesses . |
24,920 | public int getCurrentMaxIndoubtMessages ( int priority , int COS ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getCurrentMaxIndoubtMessages" , new Object [ ] { new Integer ( priority ) , new Integer ( COS ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getCurrentMaxIndoubtMessages" ) ; return 0 ; } | The anycast protocol contains no indoubt messages |
24,921 | private HttpOutboundServiceContextImpl getInterface ( VirtualConnection inVC ) { if ( null == this . myInterface ) { this . myInterface = new HttpOutboundServiceContextImpl ( ( TCPConnectionContext ) getDeviceLink ( ) . getChannelAccessor ( ) , this , inVC , this . myChannel . getHttpConfig ( ) ) ; } return this . myInterface ; } | Get access to the outbound service context for this connection . If it does not exist yet then create it . |
24,922 | protected void postConnectProcessing ( VirtualConnection inVC ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Finished connecting to target: " + this + " " + inVC ) ; } getInterface ( inVC ) ; } | Any work required after connecting to the target . |
24,923 | protected void clear ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Clearing the outbound link: " + this + " " + getVirtualConnection ( ) ) ; } setEnableReconnect ( this . myChannel . getHttpConfig ( ) . allowsRetries ( ) ) ; setAllowReconnect ( true ) ; this . reconnecting = false ; this . reconnectException = null ; this . earlyReconnectDestroy = false ; } | Clear any local variables when this object needs to be reset . |
24,924 | protected void reConnectSync ( IOException originalExcep ) throws IOException { setAllowReconnect ( false ) ; try { connect ( getTargetAddress ( ) ) ; } catch ( Exception e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Sync reconnect failed, throwing original exception" ) ; } throw originalExcep ; } } | Attempt to reconnect synchronously to the target server . If an error occurs then simply throw the original exception that caused this recovery path . |
24,925 | protected void reConnectAsync ( IOException originalExcep ) { setAllowReconnect ( false ) ; this . reconnecting = true ; this . reconnectException = originalExcep ; connectAsynch ( getTargetAddress ( ) ) ; } | Attempt to reconnect asynchronously to the target server . If an error occurs then simply throw the original exception that caused this recovery path . |
24,926 | final void resumeLocalTx ( LocalTransactionCoordinator lCoord ) throws IllegalStateException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEventEnabled ( ) ) { if ( lCoord != null ) { Tr . event ( tc , "Resuming LTC cntxt: tid=" + Integer . toHexString ( lCoord . hashCode ( ) ) + "(LTC)" ) ; } else { Tr . event ( tc , "Resuming LTC cntxt: " + "null Coordinator!" ) ; } } ltcCurrent . resume ( lCoord ) ; if ( isTraceOn && lCoord != null && TETxLifeCycleInfo . isTraceEnabled ( ) ) { TETxLifeCycleInfo . traceLocalTxResume ( "" + System . identityHashCode ( lCoord ) , "Resume Local Tx" ) ; } } | Resume the local transaction associated with the given coordinator instance . If the coordinator passed in is null no local context will be resumed . IllegalStateException is raised if a global transaction context exists on the current thread . |
24,927 | public void setAll ( String _rhn , String _rha , String _lhn , String _lha ) { this . remoteHostName = _rhn ; this . remoteHostAddress = _rha ; this . localHostName = _lhn ; this . localHostAddress = _lha ; this . addrLocal = null ; this . addrRemote = null ; } | Set all of the stored information based on the input strings . |
24,928 | public void setAddrs ( InetAddress _remote , InetAddress _local ) { this . addrRemote = _remote ; this . addrLocal = _local ; this . remoteHostName = null ; this . remoteHostAddress = null ; this . localHostName = null ; this . localHostAddress = null ; } | Set the address information based on the input InetAddress objects . |
24,929 | private synchronized void setReceiveAllowed ( DestinationAliasDefinition aliasDefinition ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setReceiveAllowed" , aliasDefinition ) ; ExtendedBoolean aliasIsReceiveAllowed = aliasDefinition . isReceiveAllowed ( ) ; if ( aliasIsReceiveAllowed . equals ( ExtendedBoolean . NONE ) ) _isReceiveAllowed = getTarget ( ) . isReceiveAllowed ( ) ; else if ( aliasIsReceiveAllowed . equals ( ExtendedBoolean . FALSE ) ) _isReceiveAllowed = false ; else _isReceiveAllowed = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setReceiveAllowed" , Boolean . valueOf ( _isReceiveAllowed ) ) ; } | Set receive allowed flag based on the value stored in the ExtendedBoolean |
24,930 | public void setQueueName ( String qName ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setQueueName" , qName ) ; setDestName ( qName ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setQueueName" ) ; } | Set the QueueName . Note that this method is used to provide a Java Bean interface to the property queueName and is not a JMS method as such . |
24,931 | public String getLogLocation ( ) { if ( logInstanceBrowser instanceof MainLogRepositoryBrowserImpl ) { return ( ( MainLogRepositoryBrowserImpl ) logInstanceBrowser ) . getLocation ( ) . getAbsolutePath ( ) ; } else { return ( ( OneInstanceBrowserImpl ) logInstanceBrowser ) . getLocation ( ) . getAbsolutePath ( ) ; } } | Returns log directory used by this reader . |
24,932 | public static boolean containsLogFiles ( File location ) { if ( location == null ) { return false ; } location = checkKnownType ( location ) ; if ( isFile ( location ) ) { try { if ( new OneFileBrowserImpl ( location ) . getProcessId ( ) != null ) { return true ; } } catch ( IllegalArgumentException ex ) { } return false ; } if ( location . isDirectory ( ) ) { LogRepositoryBrowserImpl browser = new LogRepositoryBrowserImpl ( location , new String [ ] { location . getName ( ) } ) ; if ( browser . findNext ( ( File ) null , - 1 ) != null ) { return true ; } File [ ] wblDirs = location . listFiles ( new FileFilter ( ) { public boolean accept ( File pathname ) { return pathname . isDirectory ( ) && new LogRepositoryBrowserImpl ( pathname , new String [ ] { pathname . getName ( ) } ) . findNext ( ( File ) null , - 1 ) != null ; } } ) ; if ( wblDirs . length > 0 ) { return true ; } } for ( File file : new File [ ] { location , getChild ( location , LogRepositoryBrowserImpl . DEFAULT_LOCATION ) , getChild ( location , LogRepositoryBrowserImpl . TRACE_LOCATION ) } ) { if ( file . isDirectory ( ) ) { MainLogRepositoryBrowserImpl fileBrowser = new MainLogRepositoryBrowserImpl ( file ) ; if ( fileBrowser . findByMillis ( - 1 ) != null ) { return true ; } } } return false ; } | checks if specified location contains log files . |
24,933 | public static File [ ] listRepositories ( File parent ) { if ( parent == null ) { throw new IllegalArgumentException ( "Input parameter can't be null." ) ; } parent = checkKnownType ( parent ) ; if ( ! parent . isDirectory ( ) ) { throw new IllegalArgumentException ( "Input parameter should be an existing directory: " + parent ) ; } File [ ] result = parent . listFiles ( new FileFilter ( ) { public boolean accept ( File pathname ) { return pathname . isDirectory ( ) && getChild ( pathname , LogRepositoryBrowserImpl . DEFAULT_LOCATION ) . isDirectory ( ) || getChild ( pathname , LogRepositoryBrowserImpl . TRACE_LOCATION ) . isDirectory ( ) ; } } ) ; return result == null ? new File [ ] { } : result ; } | list subdirectories containing repository files . |
24,934 | public Iterable < ServerInstanceLogRecordList > getLogLists ( ) { return getLogLists ( ( Date ) null , ( Date ) null , ( LogRecordHeaderFilter ) null ) ; } | returns log records from the binary repository |
24,935 | public Iterable < ServerInstanceLogRecordList > getLogLists ( int minLevel , int maxLevel ) { return getLogLists ( ( Date ) null , ( Date ) null , new LevelFilter ( minLevel , maxLevel ) ) ; } | returns log records from the binary repository that are within the level range as specified by the parameters . |
24,936 | public ServerInstanceLogRecordList getLogListForServerInstance ( Date time , final LogRecordHeaderFilter filter ) { ServerInstanceByTime instance = new ServerInstanceByTime ( time == null ? - 1 : time . getTime ( ) ) ; if ( instance . logs == null && instance . traces == null ) { return EMPTY_LIST ; } else { return new ServerInstanceLogRecordListImpl ( instance . logs , instance . traces , false ) { public OnePidRecordListImpl queryResult ( LogRepositoryBrowser browser ) { return new LogRecordBrowser ( browser ) . recordsInProcess ( - 1 , - 1 , filter ) ; } } ; } } | returns log records from the binary repository which satisfy condition of the filter as specified by the parameter . The returned logs will be from the same server instance . The server instance will be determined by the time as specified by the parameter . |
24,937 | public boolean addSync ( ) throws ResourceException { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "addSync" ) ; } UOWCoordinator uowCoord = mcWrapper . getUOWCoordinator ( ) ; if ( uowCoord == null ) { java . lang . IllegalStateException e = new java . lang . IllegalStateException ( "addSync: illegal state exception. uowCoord is null" ) ; Object [ ] parms = new Object [ ] { "addSync" , e } ; Tr . error ( tc , "ILLEGAL_STATE_EXCEPTION_J2CA0079" , parms ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "addSync" , e ) ; throw e ; } try { if ( mcWrapper . isConnectionSynchronizationProvider ( ) ) { throw new NotSupportedException ( ) ; } if ( mcWrapper . isEnlistmentDisabled ( ) ) { if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Managed connection isEnlistmentDisabled is true." ) ; Tr . debug ( this , tc , "Returning without registering." ) ; } if ( isTracingEnabled && tc . isEntryEnabled ( ) ) { Tr . exit ( this , tc , "addSync" , false ) ; } return false ; } EmbeddableWebSphereTransactionManager tranMgr = mcWrapper . pm . connectorSvc . transactionManager ; tranMgr . registerSynchronization ( uowCoord , this ) ; } catch ( Exception e ) { com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ejs.j2c.XATransactionWrapper.addSync" , "237" , this ) ; Object [ ] parms = new Object [ ] { "addSync" , e , "ResourceException" } ; Tr . error ( tc , "REGISTER_WITH_SYNCHRONIZATION_EXCP_J2CA0026" , parms ) ; ResourceException re = new ResourceException ( "addSync: caught Exception" ) ; re . initCause ( e ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "addSync" , e ) ; throw re ; } if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "addSync" , true ) ; return true ; } | Register the current object with the Synchronization manager for the current transaction |
24,938 | public void end ( Xid xid , int flags ) throws XAException { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "end" ) ; if ( getMcWrapper ( ) . isMCAborted ( ) ) { Tr . exit ( tc , "Connection was aborted. Exiting end." ) ; return ; } try { xaResource . end ( xid , flags ) ; } catch ( XAException e ) { processXAException ( e ) ; if ( flags == XAResource . TMFAIL && ( ( e . errorCode >= XAException . XA_RBBASE ) && ( e . errorCode <= XAException . XA_RBEND ) ) ) { } else { com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ejs.j2c.XATransactionWrapper.end" , "417" , this ) ; if ( ! mcWrapper . isStale ( ) ) { Tr . error ( tc , "XA_RESOURCE_ADAPTER_OPERATION_ID_EXCP_J2CA0027" , "end" , xid , e , mcWrapper . gConfigProps . cfName ) ; } if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "end" , e ) ; throw e ; } } catch ( Exception e ) { com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ejs.j2c.XATransactionWrapper.end" , "423" , this ) ; if ( ! mcWrapper . shouldBeDestroyed ( ) ) { mcWrapper . markTransactionError ( ) ; Tr . error ( tc , "XA_RESOURCE_ADAPTER_OPERATION_ID_EXCP_J2CA0027" , "end" , xid , e , mcWrapper . gConfigProps . cfName ) ; } XAException xae = new XAException ( XAException . XAER_RMFAIL ) ; xae . initCause ( e ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "end" , xae ) ; throw xae ; } if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "end" ) ; } | Ends the work performed on behalf of a transaction branch . The resource manager disassociates the XA resource from the transaction branch specified and let the transaction be completed . |
24,939 | public void delist ( ) throws ResourceException { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "delist" , mcWrapper . getUOWCoordinator ( ) ) ; enlisted = false ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "delist" ) ; } | Delist an XA Resource . |
24,940 | public boolean setTransactionTimeout ( int seconds ) throws XAException { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "setTransactionTimeout" ) ; boolean rc = false ; try { rc = xaResource . setTransactionTimeout ( seconds ) ; } catch ( XAException e ) { processXAException ( e ) ; com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ejs.j2c.XATransactionWrapper.setTransactionTimeout" , "790" , this ) ; if ( ! mcWrapper . isStale ( ) ) { Tr . error ( tc , "XA_RESOURCE_ADAPTER_OPERATION_EXCP_J2CA0028" , "setTransactionTimeout" , e , mcWrapper . gConfigProps . cfName ) ; } if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "setTransactionTimeout" , e ) ; throw e ; } catch ( Exception e ) { com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ejs.j2c.XATransactionWrapper.setTransactionTimeout" , "796" , this ) ; if ( ! mcWrapper . shouldBeDestroyed ( ) ) { mcWrapper . markTransactionError ( ) ; Tr . error ( tc , "XA_RESOURCE_ADAPTER_OPERATION_EXCP_J2CA0028" , "setTransactionTimeout" , e , mcWrapper . gConfigProps . cfName ) ; } XAException x = new XAException ( "Exception:" + e . toString ( ) ) ; x . initCause ( e ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "setTransactionTimeout" , e ) ; throw x ; } if ( isTracingEnabled && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "setTransactionTimeout" , rc ) ; return rc ; } | Set the current transaction timeout value for this XAResource instance . Once set this timeout value is effective until setTransactionTimeout is invoked again with a different value . To reset the timeout value to the default value used by the resource manager set the value to zero . If the timeout operation is performed successfully the method returns true ; otherwise false . If a resource manager does not support transaction timeout value to be set explicitly this method returns false . |
24,941 | public void processXAException ( XAException xae ) { final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( ( xae . errorCode == XAException . XAER_RMERR ) || ( xae . errorCode == XAException . XAER_RMFAIL ) ) { if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "processXAException: detecting bad XAException error code. Marking MCWrapper stale. " ) ; } mcWrapper . markTransactionError ( ) ; } if ( xae . errorCode != 0 ) { if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "processXAException: Non-zero return code from XAResource. Return code is: " , getXAExceptionCodeString ( xae . errorCode ) ) ; } } } | Method checks for failing error code coming back form an XAResource and marks the MCWrapper as stale so that it doesn t get returned to the freepool . |
24,942 | void addWab ( WAB wab , WABInstaller installer ) { if ( ! Thread . holdsLock ( this ) ) { throw new IllegalStateException ( ) ; } if ( wabs == null ) { wabs = new ConcurrentLinkedQueue < WAB > ( ) ; } wabs . add ( wab ) ; if ( groupUninstalled ) uninstallGroup ( installer ) ; } | after adding the wab to the web container etc .. |
24,943 | void uninstallGroup ( WABInstaller installer ) { if ( wabs != null ) { List < WAB > toRemove = new ArrayList < WAB > ( ) ; for ( WAB wab : wabs ) { wab . terminateWAB ( ) ; wab . removeWAB ( ) ; toRemove . add ( wab ) ; } wabs . removeAll ( toRemove ) ; if ( wabs . size ( ) != 0 ) { installer . wabLifecycleDebug ( "First pass wab group uninstall detected outstanding WABs" , wabs ) ; toRemove . clear ( ) ; for ( WAB wab : wabs ) { wab . terminateWAB ( ) ; wab . removeWAB ( ) ; toRemove . add ( wab ) ; } wabs . removeAll ( toRemove ) ; if ( wabs . size ( ) != 0 ) { installer . wabLifecycleDebug ( "Second pass wab group uninstall detected outstanding WABs" , wabs ) ; } } } } | server - stop and in response to the removal of the wab feature from the server config . |
24,944 | boolean removeWAB ( WAB wab ) { if ( ! Thread . holdsLock ( this ) ) { throw new IllegalStateException ( ) ; } wabs . remove ( wab ) ; return wabs . isEmpty ( ) ; } | Tells this wab group to forget this wab DOES NOT UNINSTALL the wab . |
24,945 | public void put ( List undeliveredMessages , boolean isRestoring ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "put" , undeliveredMessages ) ; int length = undeliveredMessages . size ( ) ; RemoteQPConsumerKey [ ] rcks = new RemoteQPConsumerKey [ length ] ; LocalTransaction tran = null ; try { tran = _tranManager . createLocalTransaction ( true ) ; for ( int i = 0 ; i < length ; i ++ ) { AIMessageItem msg = ( AIMessageItem ) undeliveredMessages . get ( i ) ; RemoteDispatchableKey dkey = msg . getAIStreamKey ( ) . getRemoteDispatchableKey ( ) ; if ( dkey instanceof RemoteQPConsumerKey ) rcks [ i ] = ( RemoteQPConsumerKey ) dkey ; itemStream . addItem ( msg , ( Transaction ) tran ) ; registerForEvents ( msg ) ; msg . setLocalisingME ( getLocalisationUuid ( ) ) ; } tran . commit ( ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.RemoteConsumerDispatcher.put" , "1:708:1.97.2.21" , this ) ; SibTr . exception ( tc , e ) ; if ( tran != null ) { try { tran . rollback ( ) ; } catch ( Exception e2 ) { FFDCFilter . processException ( e2 , "com.ibm.ws.sib.processor.impl.RemoteConsumerDispatcher.put" , "1:721:1.97.2.21" , this ) ; SibTr . exception ( tc , e2 ) ; } } if ( ! isRestoring ) { SIIncorrectCallException e3 = new SIIncorrectCallException ( nls . getFormattedMessage ( "PUTEXCEPTION_DISCONNECT_CONSUMER_CWSIP0473" , new Object [ ] { getDestName ( ) , getLocalisationUuid ( ) . toString ( ) , e } , null ) ) ; dispatchExceptionToConsumers ( e3 ) ; for ( int i = 0 ; i < length ; i ++ ) { AIMessageItem msg = ( AIMessageItem ) undeliveredMessages . get ( i ) ; AIStreamKey key = msg . getAIStreamKey ( ) ; _aih . reject ( key ) ; resolve ( key ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "put" , e ) ; return ; } for ( int i = 0 ; i < length ; i ++ ) { AIMessageItem msg = ( AIMessageItem ) undeliveredMessages . get ( i ) ; if ( msg . isReserved ( ) ) msg . restoreAOData ( lockID ) ; if ( ! msg . isReserved ( ) ) { if ( rcks [ i ] != null ) rcks [ i ] . messageReceived ( msg . getAIStreamKey ( ) ) ; dispatchInternalAndHandleException ( msg ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "put" ) ; } | This method is called by the AIH in the assured ordered case when an arriving message completes a list Note the messages are not currently in the itemStream |
24,946 | public void reachabilityChange ( boolean reachable ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "reachabilityChange" , Boolean . valueOf ( reachable ) ) ; Object [ ] clonedConsumerPoints = null ; synchronized ( consumerPoints ) { if ( _currentReachability && ! reachable ) { clonedConsumerPoints = consumerPoints . toArray ( ) ; } _currentReachability = reachable ; } if ( clonedConsumerPoints != null ) { SIResourceException e = new SIResourceException ( nls . getFormattedMessage ( "ANYCAST_STREAM_UNAVAILABLE_CWSIP0471" , new Object [ ] { getDestName ( ) , SIMPUtils . getMENameFromUuid ( getLocalisationUuid ( ) . toString ( ) ) } , null ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . exception ( tc , e ) ; for ( int i = 0 ; i < clonedConsumerPoints . length ; i ++ ) { DispatchableKey ck = ( DispatchableKey ) clonedConsumerPoints [ i ] ; ck . getConsumerPoint ( ) . implicitClose ( null , e , _aih . getLocalisationUuid ( ) ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "reachabilityChange" ) ; } | The reachability to the DME has changed |
24,947 | public void disconnectCardOneConsumer ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "disconnectCardOneConsumer" ) ; Object [ ] clonedConsumerPoints = null ; synchronized ( consumerPoints ) { clonedConsumerPoints = consumerPoints . toArray ( ) ; } SILimitExceededException e = new SILimitExceededException ( nls . getFormattedMessage ( "CONSUMERCARDINALITY_LIMIT_REACHED_CWSIP0472" , new Object [ ] { getDestName ( ) , getLocalisationUuid ( ) . toString ( ) } , null ) ) ; FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.RemoteConsumerDispatcher.disconnectCardOneConsumer" , "1:945:1.97.2.21" , this ) ; SibTr . exception ( tc , e ) ; for ( int i = 0 ; i < clonedConsumerPoints . length ; i ++ ) { DispatchableKey ck = ( DispatchableKey ) clonedConsumerPoints [ i ] ; ck . notifyConsumerPointAboutException ( e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "disconnectCardOneConsumer" ) ; } | The disconnectCardOneConsumer method is invoked by the Anycast Input Handler to notify it that the current cardinality - one consumer must be disconnected . This can happen when this RME becomes unreachable and the DME allows a consumer in a separate RME to connect . As soon as this RME becomes reachable again the DME sends ControlCardinalityInfo to trigger this consumer s disconnection . |
24,948 | protected DispatchableKey createConsumerKey ( DispatchableConsumerPoint consumerPoint , SelectionCriteria criteria , SIBUuid12 connectionUuid , boolean readAhead , boolean forwardScanning , JSConsumerSet consumerSet ) throws SISelectorSyntaxException , SIDiscriminatorSyntaxException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createConsumerKey" , new Object [ ] { consumerPoint , criteria , connectionUuid , new Boolean ( readAhead ) , new Boolean ( forwardScanning ) , consumerSet } ) ; RemoteQPConsumerKey consKey = new RemoteQPConsumerKey ( consumerPoint , this , criteria , connectionUuid , readAhead , forwardScanning ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createConsumerKey" , consKey ) ; return consKey ; } | overiding the method in the superclass to create a RemoteQPConsumerKey |
24,949 | protected JSKeyGroup createConsumerKeyGroup ( JSConsumerSet consumerSet ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createConsumerKeyGroup" , consumerSet ) ; JSKeyGroup ckg = new RemoteQPConsumerKeyGroup ( this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createConsumerKeyGroup" , ckg ) ; return ckg ; } | overriding the method in the superclass to create a RemoteQPConsumerKeyGroup |
24,950 | protected void eventPostCommitAdd ( SIMPMessage msg , TransactionCommon transaction ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "eventPostCommitAdd" , new Object [ ] { msg , transaction } ) ; SibTr . exit ( tc , "eventPostCommitAdd" ) ; } } | Overriding super class method to do nothing |
24,951 | protected void eventUnlocked ( SIMPMessage msg ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "eventUnlocked" , msg ) ; AIMessageItem message = ( AIMessageItem ) msg ; dispatchInternalAndHandleException ( message ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "eventUnlocked" ) ; } | Overriding super class method |
24,952 | public long getRejectTimeout ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getRejectTimeout" ) ; boolean localCardinalityOne ; synchronized ( consumerPoints ) { localCardinalityOne = _cardinalityOne ; } if ( localCardinalityOne ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getRejectTimeout" , new Long ( AbstractItem . NEVER_EXPIRES ) ) ; return AbstractItem . NEVER_EXPIRES ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getRejectTimeout" , new Long ( _messageProcessor . getCustomProperties ( ) . get_unlocked_reject_interval ( ) ) ) ; return _messageProcessor . getCustomProperties ( ) . get_unlocked_reject_interval ( ) ; } | The timeperiod after which a message that was added to the itemStream and is still in unlocked state should be rejected . This is important to not starve other remote MEs |
24,953 | @ Reference ( name = "messageEndpointCollaborator" , service = MessageEndpointCollaborator . class , cardinality = ReferenceCardinality . OPTIONAL , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY ) protected void setMessageEndpointCollaborator ( ServiceReference < MessageEndpointCollaborator > reference ) { messageEndpointCollaboratorRef . setReference ( reference ) ; } | Sets the MessageEndpointCollaborator reference . |
24,954 | public XAResource getRRSXAResource ( String activationSpecId , Xid xid ) throws XAResourceNotAvailableException { RRSXAResourceFactory factory = rrsXAResFactorySvcRef . getService ( ) ; if ( factory == null ) { return null ; } else { return factory . getTwoPhaseXAResource ( xid ) ; } } | Method to get the XAResource corresponding to an ActivationSpec from the RRSXAResourceFactory |
24,955 | private void addAdminObjectService ( ServiceReference < AdminObjectService > reference , String id , boolean jndiName ) { NamedAdminObjectServiceInfo aosInfo = createNamedAdminObjectServiceInfo ( id ) ; aosInfo . getServices ( jndiName ) . addReference ( reference ) ; ServiceReference < AdminObjectService > oldServiceRef = aosInfo . serviceRef ; if ( aosInfo . updateServiceRef ( ) . equals ( reference ) ) { if ( oldServiceRef != null ) { deactivateEndpoints ( aosInfo . endpointFactories ) ; } activateDeferredEndpoints ( aosInfo . endpointFactories ) ; } updateSchemeJndiNames ( true ) ; } | Internal method for adding an AdminObjectService with an id . |
24,956 | protected synchronized void removeAdminObjectService ( ServiceReference < AdminObjectService > reference ) { String id = ( String ) reference . getProperty ( ADMIN_OBJECT_CFG_ID ) ; if ( id != null ) { removeAdminObjectService ( reference , id , false ) ; String jndiName = ( String ) reference . getProperty ( ADMIN_OBJECT_CFG_JNDI_NAME ) ; if ( jndiName != null && ! jndiName . equals ( id ) ) { removeAdminObjectService ( reference , jndiName , true ) ; } } } | Declarative service method for removing an AdminObjectService . |
24,957 | protected void removeAdminObjectService ( ServiceReference < AdminObjectService > reference , String id , boolean jndiName ) { NamedAdminObjectServiceInfo aosInfo = adminObjectServices . get ( id ) ; if ( aosInfo != null ) { aosInfo . getServices ( jndiName ) . removeReference ( reference ) ; if ( reference . equals ( aosInfo . serviceRef ) ) { deactivateEndpoints ( aosInfo . endpointFactories ) ; if ( aosInfo . updateServiceRef ( ) == null ) { cleanupAdminObjectServiceInfo ( aosInfo ) ; } else { activateDeferredEndpoints ( aosInfo . endpointFactories ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "unset reference not the primary reference" ) ; } } } updateSchemeJndiNames ( false ) ; } | Should be private but findbugs complains about remove method with SR . |
24,958 | protected synchronized void removeEndPointActivationService ( ServiceReference < EndpointActivationService > reference ) { String activationSvcId = ( String ) reference . getProperty ( ACT_SPEC_CFG_ID ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "activationSvcId : " + activationSvcId ) ; } EndpointActivationServiceInfo easInfo = endpointActivationServices . get ( activationSvcId ) ; if ( easInfo != null ) { if ( easInfo . serviceRef . equals ( reference ) ) { deactivateEndpoints ( easInfo . endpointFactories ) ; easInfo . setReference ( null ) ; cleanupEndpointActivationServiceInfo ( easInfo ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "unset reference already removed" ) ; } } } } | Declarative service method for removing an EndpointActivationService . |
24,959 | private void activateDeferredEndpoints ( Set < MessageEndpointFactoryImpl > mefs ) { for ( MessageEndpointFactoryImpl mef : mefs ) { if ( ! mef . runtimeActivated ) { try { if ( mef . endpointActivationServiceInfo . getAutoStart ( ) == false && mef . shouldActivate == false ) { Tr . info ( tc , "MDB_ENDPOINT_NOT_ACTIVATED_AUTOSTART_CNTR4116I" , mef . getJ2EEName ( ) . getComponent ( ) , mef . getJ2EEName ( ) . getModule ( ) , mef . getJ2EEName ( ) . getApplication ( ) , mef . endpointActivationServiceInfo . id ) ; return ; } activateEndpointInternal ( mef , false ) ; } catch ( Throwable ex ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Ignoring unexpected exception : " + ex ) ; } } } } } | Attempt to activate a set of endpoints if all services are available and they are not already activated . |
24,960 | private void activateEndpointInternal ( MessageEndpointFactoryImpl mef , boolean explicit ) throws ResourceException { if ( mef . adminObjectServiceInfo != null && mef . adminObjectServiceInfo . serviceRef == null ) { if ( explicit ) { Tr . warning ( tc , "MDB_DESTINATION_NOT_FOUND_CNTR4016W" , mef . getJ2EEName ( ) . getComponent ( ) , mef . adminObjectServiceInfo . id ) ; } return ; } if ( mef . schemeJndiNameInfo != null && ! mef . schemeJndiNameInfo . lookupSucceeded ( ) ) { if ( explicit ) { Tr . warning ( tc , "MDB_DESTINATION_NOT_FOUND_CNTR4016W" , mef . getJ2EEName ( ) . getComponent ( ) , mef . schemeJndiNameInfo . getJndiName ( ) ) ; } } EndpointActivationService eas = mef . endpointActivationServiceInfo . getService ( ) ; if ( eas == null ) { if ( explicit ) { Tr . warning ( tc , "MDB_ACTIVATION_SPEC_NOT_FOUND_CNTR4015W" , mef . getJ2EEName ( ) . getComponent ( ) , mef . endpointActivationServiceInfo . id ) ; } return ; } if ( ! isServerStarted ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "server is not started" ) ; } return ; } mef . activateEndpointInternal ( eas , mef . endpointActivationServiceInfo . getMaxEndpoints ( ) , mef . adminObjectServiceInfo == null ? null : ( AdminObjectService ) context . locateService ( "adminObjectServices" , mef . adminObjectServiceInfo . serviceRef ) ) ; mef . runtimeActivated = true ; } | Attempt to activate an endpoint if all its services are available . |
24,961 | private void deactivateEndpoints ( Set < MessageEndpointFactoryImpl > mefs ) { for ( MessageEndpointFactoryImpl mef : mefs ) { if ( mef . runtimeActivated ) { deactivateEndpointInternal ( mef ) ; } } } | Deactivates a set of endpoints if they have been activated . |
24,962 | public void restore ( ObjectInputStream ois , int dataVersion ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "restore" , new Object [ ] { ois , new Integer ( dataVersion ) } ) ; checkPersistentVersionId ( dataVersion ) ; try { HashMap hm = ( HashMap ) ois . readObject ( ) ; restorePersistentDestinationData ( hm ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.store.itemstreams.PtoPMessageItemStream.restore" , "1:464:1.93.1.14" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.store.itemstreams.PtoPMessageItemStream" , "1:471:1.93.1.14" , e } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "restore" , e ) ; throw new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.store.itemstreams.PtoPMessageItemStream" , "1:482:1.93.1.14" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "restore" ) ; } | Method restore called by message store . |
24,963 | public void getActiveTransactions ( Set < PersistentTranId > transactionList ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getActiveTransactions" , transactionList ) ; AbstractItem item = null ; NonLockingCursor cursor = newNonLockingItemCursor ( new Filter ( ) { public boolean filterMatches ( AbstractItem abstractItem ) throws MessageStoreException { if ( abstractItem . isRemoving ( ) ) return true ; else return false ; } } ) ; cursor . allowUnavailableItems ( ) ; while ( null != ( item = cursor . next ( ) ) ) { transactionList . add ( item . getTransactionId ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getActiveTransactions" ) ; } | getActiveTransactions - This method iterates through all msgs on the itemstream in Removing state and builds a list of all transaction ids involved in the remove |
24,964 | protected final Properties generateLTPAKeys ( byte [ ] keyPasswordBytes , final String realm ) throws Exception { Properties expProps = null ; try { KeyEncryptor encryptor = new KeyEncryptor ( keyPasswordBytes ) ; LTPAKeyPair pair = LTPADigSignature . generateLTPAKeyPair ( ) ; byte [ ] publicKey = pair . getPublic ( ) . getEncoded ( ) ; byte [ ] privateKey = pair . getPrivate ( ) . getEncoded ( ) ; byte [ ] encryptedPrivateKey = encryptor . encrypt ( privateKey ) ; byte [ ] sharedKey = LTPACrypto . generate3DESKey ( ) ; byte [ ] encryptedSharedKey = encryptor . encrypt ( sharedKey ) ; String tmpShared = Base64Coder . base64EncodeToString ( encryptedSharedKey ) ; String tmpPrivate = Base64Coder . base64EncodeToString ( encryptedPrivateKey ) ; String tmpPublic = Base64Coder . base64EncodeToString ( publicKey ) ; expProps = new Properties ( ) ; expProps . put ( KEYIMPORT_SECRETKEY , tmpShared ) ; expProps . put ( KEYIMPORT_PRIVATEKEY , tmpPrivate ) ; expProps . put ( KEYIMPORT_PUBLICKEY , tmpPublic ) ; expProps . put ( KEYIMPORT_REALM , realm ) ; expProps . put ( CREATION_HOST_PROPERTY , "localhost" ) ; expProps . put ( LTPA_VERSION_PROPERTY , "1.0" ) ; expProps . put ( CREATION_DATE_PROPERTY , ( new java . util . Date ( ) ) . toString ( ) ) ; } catch ( Exception e ) { throw e ; } return expProps ; } | Generates the LTPA keys and stores them into a Properties object . |
24,965 | private OutputStream getOutputStream ( final String keyFile ) throws IOException { try { return AccessController . doPrivileged ( new PrivilegedExceptionAction < OutputStream > ( ) { public OutputStream run ( ) throws IOException { return new FileOutputStream ( new File ( keyFile ) ) ; } } ) ; } catch ( PrivilegedActionException e ) { throw new IOException ( e . getCause ( ) ) ; } } | Obtain the OutputStream for the given file . |
24,966 | protected void addLTPAKeysToFile ( OutputStream os , Properties ltpaProps ) throws Exception { try { ltpaProps . store ( os , null ) ; } catch ( IOException e ) { throw e ; } finally { if ( os != null ) try { os . close ( ) ; } catch ( IOException e ) { } } return ; } | Write the LTPA key properties to the given OutputStream . This method will close the OutputStream . |
24,967 | private String checkConflict ( Element elem , String oldAttrValue , String attr ) throws JspCoreException { String result = oldAttrValue ; String attrValue = null ; if ( elem . getAttributeNode ( attr ) != null ) { attrValue = elem . getAttributeNode ( attr ) . getValue ( ) ; } if ( attrValue != null ) { if ( oldAttrValue != null && ! oldAttrValue . equals ( attrValue ) ) { throw new JspTranslationException ( elem , "jsp.error.tag.conflict.attr" , new Object [ ] { attr , oldAttrValue , attrValue } ) ; } result = attrValue ; } return result ; } | new method for jsp2 . 1ELwork |
24,968 | private Set < String > convertAbsToRelative ( Collection < File > files ) { Set < String > result = new HashSet < String > ( ) ; for ( File f : files ) { String fAbsPath = PathUtils . fixPathString ( f ) ; if ( fAbsPath . startsWith ( rootAbsolutePath ) ) { String absPath = fAbsPath ; absPath = absPath . substring ( rootAbsolutePath . length ( ) ) ; if ( "\\" . equals ( File . separator ) ) { absPath = absPath . replace ( '\\' , '/' ) ; } if ( absPath . length ( ) == 0 ) { absPath = "/" ; } result . add ( absPath ) ; } else throw new IllegalStateException ( fAbsPath + " " + rootAbsolutePath ) ; } return result ; } | convert java . io . files into relative paths under the root container . |
24,969 | public void processNewConnection ( SocketIOChannel socket ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "processNewConnection" ) ; } VirtualConnection vc = vcf . createConnection ( ) ; TCPConnLink bc = ( TCPConnLink ) tcpChannel . getConnectionLink ( vc ) ; TCPReadRequestContextImpl bcRead = bc . getTCPReadConnLink ( ) ; bc . setSocketIOChannel ( socket ) ; ConnectionDescriptor cd = vc . getConnectionDescriptor ( ) ; Socket s = socket . getSocket ( ) ; InetAddress remote = s . getInetAddress ( ) ; InetAddress local = s . getLocalAddress ( ) ; if ( cd != null ) { cd . setAddrs ( remote , local ) ; } else { ConnectionDescriptorImpl cdi = new ConnectionDescriptorImpl ( remote , local ) ; vc . setConnectionDescriptor ( cdi ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Processing Connection: " + vc . getConnectionDescriptor ( ) ) ; } int rc = vc . attemptToSetFileChannelCapable ( VirtualConnection . FILE_CHANNEL_CAPABLE_ENABLED ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "FileChannelCapable set in VC to: " + rc ) ; } bcRead . setJITAllocateSize ( bc . getConfig ( ) . getNewConnectionBufferSize ( ) ) ; int timeout = bc . getConfig ( ) . getInactivityTimeout ( ) ; if ( timeout == ValidateUtils . INACTIVITY_TIMEOUT_NO_TIMEOUT ) { timeout = TCPRequestContext . NO_TIMEOUT ; } vc . getStateMap ( ) . put ( "REMOTE_ADDRESS" , bc . getRemoteAddress ( ) . getHostAddress ( ) ) ; bcRead . read ( 1 , cc , true , timeout ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "processNewConnection" ) ; } } | Processes a new connection by scheduling initial read . |
24,970 | public final void declareAlreadyPrecommitted ( ) throws TaskListException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "declareAlreadyPrecommitted" ) ; if ( STATE_UNTOUCHED == _state ) { _state = STATE_END_PRECOMMIT ; } else if ( STATE_END_PRECOMMIT == _state ) { } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "declareAlreadyPrecommitted" ) ; throw new TaskListException ( _state ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "declareAlreadyPrecommitted" ) ; } | Use this method to declare that a tasklist has already been precommitted . This is used when restoring tasks used to resolve in doubt items from persistence . By doing this we reduce the number of different paths through the state model . |
24,971 | private static boolean needsQuote ( String value ) { if ( null == value ) return true ; int len = value . length ( ) ; if ( 0 == len ) { return true ; } if ( '"' == value . charAt ( 0 ) ) { if ( '"' == value . charAt ( len - 1 ) ) { return false ; } return true ; } for ( int i = 0 ; i < len ; i ++ ) { char c = value . charAt ( i ) ; if ( c < 0x20 || c >= 0x7f || TSPECIALS . indexOf ( c ) != - 1 ) { return true ; } } return false ; } | Return true iff the string contains special characters that need to be quoted . |
24,972 | private static void maybeQuote ( StringBuilder buff , String value ) { if ( null == value || 0 == value . length ( ) ) { buff . append ( "\"\"" ) ; } else if ( needsQuote ( value ) ) { buff . append ( '"' ) ; buff . append ( value ) ; buff . append ( '"' ) ; } else { buff . append ( value ) ; } } | Append the input value string to the given buffer wrapping it with quotes if need be . |
24,973 | private static String convertV0Cookie ( HttpCookie cookie ) { StringBuilder buffer = new StringBuilder ( 40 ) ; buffer . append ( cookie . getName ( ) ) ; String value = cookie . getValue ( ) ; if ( null != value && 0 != value . length ( ) ) { buffer . append ( '=' ) ; buffer . append ( value ) ; } else { buffer . append ( "=\"\"" ) ; } value = cookie . getPath ( ) ; if ( null != value && 0 != value . length ( ) ) { buffer . append ( "; $Path=" ) ; buffer . append ( value ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Created v0 Cookie: [" + buffer . toString ( ) + "]" ) ; } return buffer . toString ( ) ; } | Convert the V0 Cookie into a Cookie header string . |
24,974 | private static String convertV1Cookie ( HttpCookie cookie ) { StringBuilder buffer = new StringBuilder ( 40 ) ; buffer . append ( cookie . getName ( ) ) ; buffer . append ( '=' ) ; maybeQuote ( buffer , cookie . getValue ( ) ) ; buffer . append ( "; $Version=1" ) ; String value = cookie . getPath ( ) ; if ( null != value && 0 != value . length ( ) ) { buffer . append ( "; $Path=" ) ; if ( ! skipCookiePathQuotes ) { maybeQuote ( buffer , value ) ; } else { buffer . append ( value ) ; } } value = cookie . getDomain ( ) ; if ( null != value && 0 != value . length ( ) ) { buffer . append ( "; $Domain=" ) ; maybeQuote ( buffer , value ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Created v1 Cookie: [" + buffer . toString ( ) + "]" ) ; } return buffer . toString ( ) ; } | Convert the V1 Cookie into a Cookie header string . |
24,975 | private static String convertV1SetCookie ( HttpCookie cookie ) { StringBuilder buffer = new StringBuilder ( 40 ) ; buffer . append ( cookie . getName ( ) ) ; buffer . append ( '=' ) ; maybeQuote ( buffer , cookie . getValue ( ) ) ; buffer . append ( "; Version=1" ) ; String value = cookie . getComment ( ) ; if ( null != value && 0 != value . length ( ) ) { buffer . append ( "; Comment=" ) ; maybeQuote ( buffer , value ) ; } value = cookie . getDomain ( ) ; if ( null != value && 0 != value . length ( ) ) { buffer . append ( "; Domain=" ) ; maybeQuote ( buffer , value ) ; } int maxAge = cookie . getMaxAge ( ) ; if ( - 1 < maxAge ) { buffer . append ( "; Max-Age=" ) ; buffer . append ( maxAge ) ; } else if ( cookie . isDiscard ( ) ) { buffer . append ( "; Max-Age=0" ) ; } value = cookie . getPath ( ) ; if ( null != value && 0 != value . length ( ) ) { buffer . append ( "; Path=" ) ; if ( ! skipCookiePathQuotes ) { maybeQuote ( buffer , value ) ; } else { buffer . append ( value ) ; } } if ( cookie . isSecure ( ) ) { buffer . append ( "; Secure" ) ; } if ( cookie . isHttpOnly ( ) ) { buffer . append ( "; HttpOnly" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Created v1 Set-Cookie: [" + buffer . toString ( ) + "]" ) ; } return buffer . toString ( ) ; } | Convert the V1 Cookie into a Set - Cookie header string . |
24,976 | public InetAddress getRemoteAddress ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getRemoteAddress" ) ; InetAddress result = null ; TCPConnectionContext tcpContext = null ; ConnectionLink connLinkRef = baseLink . getDeviceLink ( ) ; if ( connLinkRef != null ) { tcpContext = ( TCPConnectionContext ) connLinkRef . getChannelAccessor ( ) ; if ( tcpContext != null ) result = tcpContext . getRemoteAddress ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getRemoteAddress" , result ) ; return result ; } | begin F206161 . 5 |
24,977 | private Map < String , Object > filterUnexpectedKeys ( Map < String , Object > inputProps ) { Map < String , Object > outputProps = new HashMap < String , Object > ( ) ; Set < Entry < String , Object > > entries = inputProps . entrySet ( ) ; for ( Map . Entry < String , Object > entry : entries ) { String key = entry . getKey ( ) ; if ( EXPECTED_KEYS . contains ( key ) ) { outputProps . put ( key , entry . getValue ( ) ) ; } } return outputProps ; } | Reduce the map to the set of expected keys |
24,978 | private void publishToRepository ( String attributeName , String attributeType , Object oldValue , Object newValue ) { super . sendNotification ( new AttributeChangeNotification ( this , sequenceNum . incrementAndGet ( ) , System . currentTimeMillis ( ) , "" , attributeName , attributeType , oldValue , newValue ) ) ; } | Send attribute change notification |
24,979 | public static void main ( String [ ] args ) { final boolean testTimeout = true ; final boolean testDeadlock = false ; final boolean testShutdown = true ; final long timeout = 1000 ; final Object lock1 = new Object ( ) ; final Object lock2 = new Object ( ) ; final Thread thread1 = new Thread ( ) { public void run ( ) { synchronized ( lock1 ) { System . out . println ( "Thread1 has lock1" ) ; try { Thread . sleep ( 100 ) ; } catch ( InterruptedException ie ) { ie . printStackTrace ( ) ; } ; synchronized ( lock2 ) { System . out . println ( "Thread1 has both locks" ) ; } } } } ; final Thread thread2 = new Thread ( ) { public void run ( ) { synchronized ( lock2 ) { System . out . println ( "Thread2 has lock2" ) ; try { Thread . sleep ( 100 ) ; } catch ( InterruptedException ie ) { ie . printStackTrace ( ) ; } ; synchronized ( lock1 ) { System . out . println ( "Thread2 has both locks" ) ; } } } } ; final Thread shutdownThread = new Thread ( ) { public void run ( ) { System . out . println ( "Shutdown hook sleeping" ) ; try { Thread . sleep ( timeout * 3 ) ; } catch ( InterruptedException ie ) { ie . printStackTrace ( ) ; } finally { System . out . println ( "Shutdown hook finished" ) ; } } } ; final TimedExitThread tet = new TimedExitThread ( ) ; tet . setTimeout ( timeout ) ; if ( testDeadlock ) { thread1 . start ( ) ; thread2 . start ( ) ; } if ( testShutdown ) { Runtime . getRuntime ( ) . addShutdownHook ( shutdownThread ) ; } tet . start ( ) ; if ( testTimeout ) { System . out . println ( "main() sleeping" ) ; try { Thread . sleep ( timeout * 2 ) ; } catch ( InterruptedException ie ) { ie . printStackTrace ( ) ; } finally { System . out . println ( "main() finished" ) ; } } } | Unit test code - run as Java application from your eclipse workspace |
24,980 | public static void startServerComms ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "startServerComms" ) ; try { ServerConnectionManager . initialise ( new AcceptListenerFactoryImpl ( ) ) ; } catch ( Throwable t ) { FFDCFilter . processException ( t , CLASS_NAME + ".startServerComms" , CommsConstants . SERVERTRANSPORTFACTORY_INIT_02 , null ) ; SibTr . error ( tc , "SERVER_FAILED_TO_START_SICO2004" , t ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "startServerComms" ) ; } | Starts the comms server communications . |
24,981 | public void enlistSynchronization ( javax . transaction . Synchronization sync ) throws IllegalStateException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "enlistSynchronization" , sync ) ; if ( ( _state != Running ) && ( _state != Suspended ) ) { final IllegalStateException ise = new IllegalStateException ( "Cannot enlist Synchronization. LocalTransactionCoordinator is completing or completed." ) ; FFDCFilter . processException ( ise , "com.ibm.tx.ltc.LocalTranCoordImpl.enlistSynchronization" , "591" , this ) ; Tr . error ( tc , "ERR_ENLIST_SYNCH_LTC_COMPLETE" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "enlistSynchronization" , ise ) ; throw ise ; } if ( sync == null ) { final IllegalStateException ise = new IllegalStateException ( "Synchronization enlistment failed. Synchronization specified was null." ) ; FFDCFilter . processException ( ise , "com.ibm.tx.ltc.LocalTranCoordImpl.enlistSynchronization" , "600" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "enlistSynchronization" , ise ) ; throw ise ; } zosSyncChecks ( sync ) ; if ( sync instanceof ContainerSynchronization ) { if ( _containerSync != null ) { final String msg = "Enlistment failed. A ContainerSynchronization is already enlisted." ; final IllegalStateException ise = new IllegalStateException ( msg ) ; FFDCFilter . processException ( ise , "com.ibm.tx.ltc.LocalTranCoordImpl.enlistSynchronization" , "618" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "enlistSynchronization" , ise ) ; throw ise ; } _containerSync = ( ContainerSynchronization ) sync ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "ContainerSynchronization Enlisted." ) ; } else { if ( _syncs == null ) { _syncs = new ArrayList < Synchronization > ( ) ; } _syncs . add ( sync ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "enlistSynchronization" ) ; } | Enlist a Synchronization object that will be informed upon completion of the local transaction containment boundary . |
24,982 | protected void suspend ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "suspend" ) ; _current = null ; _state = Suspended ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "suspend" ) ; } | Suspend any native context off the thread |
24,983 | protected void resume ( LocalTranCurrentImpl current ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resume" , current ) ; _current = current ; _state = Running ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resume" ) ; } | Resume any native context onto the thread |
24,984 | protected void getComponentMetadataForLTC ( ) { if ( _deferredConfig ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getComponentMetadataForLTC" ) ; _deferredConfig = false ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getComponentMetadataForLTC" ) ; } } | Complete the deferred LTC start by retrieving the remaining LTC config from component metadata |
24,985 | public void setConnectionObjectId ( short connectionObjectId ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setConnectionObjectId" , Short . valueOf ( connectionObjectId ) ) ; this . connectionObjectId = connectionObjectId ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setConnectionObjectId" ) ; } | setConnectionObjectId - sets and stores the connection object id |
24,986 | public void setCachedConsumerProps ( CachedSessionProperties props ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setCachedConsumerProps" , props ) ; this . cachedProps = props ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setCachedConsumerProps" ) ; } | Sets the cached destination . |
24,987 | public void setCachedConsumer ( CATMainConsumer consumer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setCachedConsumer" , consumer ) ; this . cachedConsumer = consumer ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setCachedConsumer" ) ; } | Sets the cached CATMainConsumer |
24,988 | public synchronized int addObject ( Object object ) throws ConversationStateFullException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "addObject" , "object=" + object ) ; int objectIndex = 0 ; if ( freeSlot == MINUS_ONE ) { extendObjectTable ( ) ; } objectIndex = freeSlot ; objectTable [ objectIndex ] = object ; highWatermark = Math . max ( highWatermark , freeSlot ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "High Water Mark = " , Integer . valueOf ( highWatermark ) ) ; foundFreeSlot = false ; for ( int i = ( highWatermark + 1 ) ; i <= maxIndex ; i ++ ) { if ( objectTable [ i ] == null ) { freeSlot = i ; foundFreeSlot = true ; break ; } } if ( ! foundFreeSlot ) { for ( int i = OBJECT_TABLE_ORIGIN ; i <= ( highWatermark - 1 ) ; i ++ ) { if ( objectTable [ i ] == null ) { freeSlot = i ; foundFreeSlot = true ; break ; } } } if ( ! foundFreeSlot ) { freeSlot = MINUS_ONE ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "Next free slot = " , Integer . valueOf ( freeSlot ) ) ; SibTr . debug ( tc , "Max Index = " , Integer . valueOf ( maxIndex ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "addObject" , "" + objectIndex ) ; return objectIndex ; } | addObject - adds a given object to the object store |
24,989 | private synchronized void extendObjectTable ( ) throws ConversationStateFullException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "extendObjectTable" ) ; int newTableSize = ( ( ( maxIndex + 1 ) * OBJECT_TABLE_EXTEND_FACTOR ) - OBJECT_TABLE_ORIGIN ) ; if ( newTableSize > maxTableSize ) { if ( ( maxIndex + 1 ) < maxTableSize ) { newTableSize = maxTableSize ; } else { ConversationStateFullException e = new ConversationStateFullException ( ) ; FFDCFilter . processException ( e , CLASS_NAME + ".extendObjectTable" , CommsConstants . CONVERSATIONSTATE_EXTENDOBJECTTABLE_01 , new Object [ ] { getLastItemsInStore ( ) , this } ) ; throw e ; } } Object [ ] newObjectTable = new Object [ newTableSize ] ; System . arraycopy ( objectTable , 0 , newObjectTable , 0 , ( maxIndex + 1 ) ) ; freeSlot = ( maxIndex + 1 ) ; maxIndex = ( newTableSize - 1 ) ; objectTable = newObjectTable ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "Next free slot = " , Integer . valueOf ( freeSlot ) ) ; SibTr . debug ( tc , "Max Index = " , Integer . valueOf ( maxIndex ) ) ; SibTr . debug ( tc , "High Water Mark = " , Integer . valueOf ( highWatermark ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "extendObjectTable" ) ; } | extendObjectTable - extends the object store if it is found to be full . The table can be extended until a maximum size . The maximum size can be supplied or a default size . |
24,990 | public synchronized Object getObject ( int objectIndex ) throws IndexOutOfBoundsException , NoSuchElementException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getObject" , "" + objectIndex ) ; Object object ; if ( ( objectIndex < OBJECT_TABLE_ORIGIN ) || ( objectIndex > maxIndex ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Invalid object index" ) ; throw new IndexOutOfBoundsException ( ) ; } object = objectTable [ objectIndex ] ; if ( object == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "No such element existed!" ) ; throw new NoSuchElementException ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getObject" , object ) ; return object ; } | getObject - retrieve an object from the object store . |
24,991 | public synchronized Object removeObject ( int objectIndex ) throws IndexOutOfBoundsException , NoSuchElementException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeObject" , Integer . valueOf ( objectIndex ) ) ; if ( ( objectIndex < OBJECT_TABLE_ORIGIN ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Invalid object index" ) ; throw new IndexOutOfBoundsException ( ) ; } else if ( ( objectIndex > maxIndex ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Invalid object index" ) ; return null ; } if ( objectTable [ objectIndex ] == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "No object exists at the entry" ) ; throw new NoSuchElementException ( ) ; } Object returnObject = objectTable [ objectIndex ] ; objectTable [ objectIndex ] = null ; if ( freeSlot == MINUS_ONE ) { freeSlot = objectIndex ; } else { freeSlot = Math . min ( freeSlot , objectIndex ) ; } if ( highWatermark == objectIndex ) { while ( objectTable [ highWatermark ] == null ) { if ( highWatermark == OBJECT_TABLE_ORIGIN ) { break ; } highWatermark = ( highWatermark - 1 ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "removeObject" , returnObject ) ; return returnObject ; } | removeObject - remove an object from the object store . |
24,992 | public void dumpObjectTable ( int numberOfEntries ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dumpObjectTable" ) ; if ( numberOfEntries < 0 ) { throw new IllegalArgumentException ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { for ( int i = OBJECT_TABLE_ORIGIN ; i < ( OBJECT_TABLE_ORIGIN + numberOfEntries ) ; i ++ ) { SibTr . debug ( this , tc , "objectTable: " + i , objectTable [ i ] ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "dumpObjectTable" ) ; } | dumpTable - dumps the specified number of entries in the Object Table . |
24,993 | public void setInitialRequestNumber ( int initialRequestNumber ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setInitialRequestNumber" , Integer . valueOf ( initialRequestNumber ) ) ; this . requestNumber = initialRequestNumber ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setInitialRequestNumber" ) ; } | This method will set the initial request number for this conversation . |
24,994 | public synchronized int getUniqueRequestNumber ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getUniqueRequestNumber" ) ; requestNumber += 2 ; if ( requestNumber > Short . MAX_VALUE ) { requestNumber = requestNumber % 2 ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getUniqueRequestNumber" , "" + requestNumber ) ; return requestNumber ; } | This method will return a unique number that can be used for JFAP exchanges . as this can be for ME - ME comms unique number is always increased by two . As such if the initiating peer uses odd request numbers they will always use unique numbers . |
24,995 | public synchronized String getLastItemsInStore ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getLastItemsInStore" ) ; String lastItems = "" ; for ( int x = maxIndex ; x > ( maxIndex - 101 ) ; x -- ) { lastItems = " [" + x + "]: " + objectTable [ x ] + "\r\n" + lastItems ; } lastItems = "The last 100 items in the store:\r\n\r\n" + lastItems ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getLastItemsInStore" ) ; return lastItems ; } | This method can be used to create a String that details the last 100 items added to the store . It is best used at the time when the object store is full to indicate what is taking up all the space in the store . |
24,996 | public void putChunkedMessageWrapper ( long wrapperId , ChunkedMessageWrapper wrapper ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putChunkedMessageWrapper" , new Object [ ] { Long . valueOf ( wrapperId ) , wrapper } ) ; inProgressMessages . put ( Long . valueOf ( wrapperId ) , wrapper ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "putChunkedMessageWrapper" ) ; } | Puts a chunked message wrapper into our map . |
24,997 | public void removeChunkedMessageWrapper ( long wrapperId ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeChunkedMessageWrapper" , Long . valueOf ( wrapperId ) ) ; inProgressMessages . remove ( Long . valueOf ( wrapperId ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "removeChunkedMessageWrapper" ) ; } | Removes a chunked message wrapper from our map . |
24,998 | public void setInjectionBinding ( InjectionBinding < ? > injectionBinding ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setInjectionBinding : " + injectionBinding ) ; ivInjectionBinding = injectionBinding ; } | Set the parent InjectionBinding containing the information for this injection target |
24,999 | public static String createString ( char [ ] charBuf ) { if ( ! enabled ) { return createStringFallback ( charBuf ) ; } String str = new String ( ) ; try { synchronized ( str ) { valueField . set ( str , charBuf ) ; countField . set ( str , charBuf . length ) ; } synchronized ( str ) { if ( str . length ( ) != charBuf . length ) { throw new IllegalStateException ( "Fast java.lang.String construction failed." ) ; } } } catch ( Exception e ) { handleError ( e ) ; str = createStringFallback ( charBuf ) ; } return str ; } | creates a new java . lang . String by setting the char array directly to the String instance with reflection . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.