idx int64 0 41.2k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
25,400 | protected Object resolveObject ( Object objectToResolve ) { final String methodName = "resolveObject" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { objectToResolve } ) ; Object resolvedObject ; if ( objectToResolve instanceof Token ) { resolvedObject = ( ( Token ) objectToResolve ) . current ( ) ; } else { resolvedObject = objectToResolve ; } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName , new Object [ ] { resolvedObject } ) ; return resolvedObject ; } | Resolve any Token to an existing instance of the Token representing a ManagedObject if there is one already in memory . |
25,401 | public static synchronized UTEHelper getHelperInstance ( ) throws java . lang . IllegalStateException { if ( tcInt . isEntryEnabled ( ) ) SibTr . entry ( tcInt , "getHelperInstance" ) ; try { String prop = System . getProperty ( "com.ibm.ws.sib.api.testenv" ) ; if ( ( prop != null ) && ( "enabled" . equals ( prop . toLowerCase ( ) ) ) ) { if ( tcInt . isDebugEnabled ( ) ) SibTr . debug ( tcInt , "TestEnv flag enabled by system property." ) ; UTEHelperFactory . jmsTestEnvironmentEnabled = true ; } else { if ( tcInt . isDebugEnabled ( ) ) SibTr . debug ( tcInt , "testenv system property was present but did not enable testenv - " + prop ) ; } } catch ( SecurityException sce ) { if ( tcInt . isDebugEnabled ( ) ) SibTr . debug ( tcInt , "Could not read system property due to SecurityException" , sce ) ; } if ( instance == null ) { try { instance = ( UTEHelper ) Class . forName ( "com.ibm.ws.sib.api.jms.impl.ute.UTEHelperImpl" ) . newInstance ( ) ; } catch ( Exception e ) { if ( tcInt . isDebugEnabled ( ) ) SibTr . debug ( tcInt , "Couldn't find impl class" , e ) ; RuntimeException f = new java . lang . IllegalStateException ( "UTEHelperFactory.getHelperInstance()" ) ; f . initCause ( e ) ; if ( tcInt . isEntryEnabled ( ) ) SibTr . exit ( tcInt , "getHelperInstance" ) ; throw f ; } } if ( tcInt . isEntryEnabled ( ) ) SibTr . exit ( tcInt , "getHelperInstance" ) ; return instance ; } | This method is used to return an instance of the UTEHelper . |
25,402 | public final synchronized void insertLinkBefore ( Link insertLink , Link followingLink ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( this , tc , "insertLinkBefore" , new long [ ] { insertLink . getSequence ( ) , followingLink . getSequence ( ) } ) ; } Link prev = followingLink . _getPreviousLink ( ) ; insertLink . _link ( prev , followingLink , this ) ; prev . _setNextLink ( insertLink ) ; followingLink . _setPreviousLink ( insertLink ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( this , tc , "insertLinkBefore" , _debugString ( ) ) ; } } | Insert the specified link into the list . |
25,403 | String getDefaultInstancesXML ( String alias ) throws Exception { StringBuilder xml = new StringBuilder ( 200 ) . append ( "\r\n<server>\r\n" ) ; String extendsPid = ( String ) config . get ( SOURCE_PID ) ; if ( ( extendsPid != null ) && ( extendsPid . startsWith ( "com.ibm.ws.jca.resourceAdapter" ) ) ) { String id = getIDFromSupertype ( extendsPid , 31 ) ; xml . append ( " <resourceAdapter id=\"" ) . append ( id ) . append ( "\">\r\n" ) ; xml . append ( " <" ) . append ( alias ) . append ( "/>\r\n" ) ; xml . append ( " </resourceAdapter>\r\n" ) ; } else if ( embeddedRAConfig != null && alias != null ) { String appId ; String appElementName ; if ( extendsPid != null && extendsPid . startsWith ( "com.ibm.ws.app.manager.earappcfg" ) ) { appId = getIDFromSupertype ( extendsPid , 33 ) ; appElementName = "enterpriseApplication" ; } else { String topLevelConfigId = ( String ) config . get ( "config.id" ) ; appId = topLevelConfigId . substring ( 23 , topLevelConfigId . length ( ) - 1 ) ; appElementName = "application" ; } String raId = ( String ) embeddedRAConfig . get ( "id" ) ; xml . append ( " <" ) . append ( appElementName ) . append ( " id=\"" ) . append ( appId ) . append ( "\">\r\n" ) ; xml . append ( " <resourceAdapter id=\"" ) . append ( raId ) . append ( "\">\r\n" ) ; xml . append ( " <" ) . append ( alias ) . append ( "/>\r\n" ) ; xml . append ( " </resourceAdapter>\r\n" ) ; xml . append ( " </" ) . append ( appElementName ) . append ( ">\r\n" ) ; } else { hasConfig = false ; return null ; } xml . append ( "</server>" ) ; return xml . toString ( ) ; } | Get the server . xml snippet that specifies default instances for the resource adapter . |
25,404 | private Object get ( String name ) { if ( isEmbedded ) return embeddedRAConfig == null ? null : embeddedRAConfig . get ( name ) ; else return config . get ( name ) ; } | Returns the value of a configured property of the resourceAdapter element . |
25,405 | private final Dictionary < String , Object > getConfigForEmbeddedResourceAdapter ( ) throws UnableToAdaptException { BundleContext bundleContext = Utils . priv . getBundleContext ( FrameworkUtil . getBundle ( getClass ( ) ) ) ; ServiceReference < ConfigurationAdmin > configAdminRef = Utils . priv . getServiceReference ( bundleContext , ConfigurationAdmin . class ) ; ConfigurationAdmin configAdmin = Utils . priv . getService ( bundleContext , configAdminRef ) ; try { String parentPid = ( String ) config . get ( SOURCE_PID ) ; if ( parentPid == null ) parentPid = ( String ) config . get ( Constants . SERVICE_PID ) ; String filter = "(&(" + ConfigurationAdmin . SERVICE_FACTORYPID + "=com.ibm.ws.jca.embeddedResourceAdapter)(config.parentPID=" + parentPid + "))" ; Configuration [ ] configurations = configAdmin . listConfigurations ( filter ) ; if ( configurations != null ) for ( Configuration config : configAdmin . listConfigurations ( filter ) ) { Dictionary < String , Object > props = config . getProperties ( ) ; String id = ( String ) props . get ( "id" ) ; if ( moduleName . equals ( id ) ) return props ; } return null ; } catch ( Exception x ) { throw new UnableToAdaptException ( x ) ; } finally { bundleContext . ungetService ( configAdminRef ) ; } } | Returns configured properties for an embedded resource adapter if any by matching the id . |
25,406 | public void errorOccurred ( SIConnectionLostException exception , int segmentType , int requestNumber , int priority , Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "errorOccurred" , new Object [ ] { exception , "" + segmentType , "" + requestNumber , "" + priority , conversation } ) ; Throwable cause = exception . getCause ( ) ; if ( cause != null && cause instanceof JFapHeartbeatTimeoutException ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Error is due to heartbeat timeout" ) ; } else { FFDCFilter . processException ( exception , CLASS_NAME + ".errorOccurred" , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_ERROR_01 , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Object [ ] debug = { "Segment type : " + segmentType + " (0x" + Integer . toHexString ( segmentType ) + ")" , "Request number: " + requestNumber , "Priority : " + priority } ; SibTr . debug ( this , tc , "Received an error in the ServerTransportReceiveListener" , debug ) ; SibTr . debug ( this , tc , "Primary exception:" , exception ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "errorOccurred" ) ; } | This method is called by the JFAP channel when it detects a serious error . At this point we should spit out all the info we have and close the connection to the ME . This will ensure that the ME realises that we have died and shutdown any resources we own accordingly . |
25,407 | public void closeConnection ( Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "closeConnection" ) ; try { conversation . close ( ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rejectHandshake" , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_CLOSECONN_01 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Unable to close the conversation" , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "closeConnection" ) ; } | This method is called in extreme cases where the connection needs to be closed right away without any mucking around . Cases such as this is where the initial handshake has failed . |
25,408 | private void rcvTRMExchange ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "rcvTRMExchange" , new Object [ ] { request , conversation , Integer . valueOf ( requestNumber ) , Boolean . valueOf ( allocatedFromBufferPool ) , Boolean . valueOf ( partOfExchange ) } ) ; ConversationState convState = ( ConversationState ) conversation . getAttachment ( ) ; TrmSingleton trm = TrmSingleton . getTrmSingleton ( ) ; ComponentData cd = ( ComponentData ) trm . getComponentData ( ) ; ClientConnection cc = ( ClientConnection ) convState . getCommsConnection ( ) ; if ( convState . getCommsConnection ( ) == null ) { cc = new ServerSideConnection ( conversation ) ; convState . setCommsConnection ( cc ) ; } try { byte [ ] trmRequestData = request . getRemaining ( ) ; byte [ ] trmReplyData = cd . handShake ( cc , trmRequestData ) ; if ( cc . getSICoreConnection ( ) != null ) { ( ( MPCoreConnection ) cc . getSICoreConnection ( ) ) . setMessageCopiedWhenSent ( false ) ; ( ( MPCoreConnection ) cc . getSICoreConnection ( ) ) . setMessageCopiedWhenReceived ( false ) ; convState . addObject ( cc ) ; sendConnectionInfo ( conversation ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "TRM did not allocate us a connection" ) ; } CommsByteBuffer reply = poolManager . allocate ( ) ; reply . wrap ( trmReplyData ) ; conversation . send ( reply , JFapChannelConstants . SEG_TOPOLOGY , requestNumber , JFapChannelConstants . PRIORITY_HANDSHAKE , true , ThrottlingPolicy . BLOCK_THREAD , null ) ; } catch ( ConversationStateFullException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvTRMExchange" , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_TRMEXCG_01 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , e . getMessage ( ) , e ) ; StaticCATHelper . sendExceptionToClient ( e , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_TRMEXCG_01 , conversation , requestNumber ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvTRMExchange" , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_TRMEXCG_02 , this ) ; SibTr . error ( tc , "COMMUNICATION_ERROR_SICO2019" , e ) ; } request . release ( allocatedFromBufferPool ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "rcvTRMExchange" ) ; } | Pass information from TRM on the client to TRM on the server . This will only be called by comms when it receives a segment indicating that TRM has passed a WsByteBuffer of information to be passed along to TRM . |
25,409 | private void rcvMFPRequestSchema ( CommsByteBuffer request , Conversation conversation , int requestNumber , int segmentId , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "rcvMFPRequestSchema" , new Object [ ] { request , conversation , Integer . valueOf ( requestNumber ) , Boolean . valueOf ( allocatedFromBufferPool ) , Boolean . valueOf ( partOfExchange ) } ) ; CompHandshake ch = null ; ConversationState convState = ( ConversationState ) conversation . getAttachment ( ) ; CommsConnection cc = convState . getCommsConnection ( ) ; try { ch = ( CompHandshake ) CompHandshakeFactory . getInstance ( ) ; byte [ ] mfpRequestData = request . getRemaining ( ) ; HandshakeProperties handshakeGroup = conversation . getHandshakeProperties ( ) ; int productVersion = handshakeGroup . getMajorVersion ( ) ; byte [ ] mfpReplyData = ch . compRequest ( cc , productVersion , segmentId , mfpRequestData ) ; if ( mfpReplyData == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "MFP returned null" ) ; SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "MFP_SCHEMA_REQUEST_FAILED_SICO2056" , null , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".rcvMFPRequestSchema" , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_MFPREQSCH_01 , this ) ; StaticCATHelper . sendExceptionToClient ( e , null , conversation , requestNumber ) ; } else { CommsByteBuffer reply = poolManager . allocate ( ) ; reply . wrap ( mfpReplyData ) ; try { conversation . send ( reply , JFapChannelConstants . SEG_REQUEST_SCHEMA_R , requestNumber , JFapChannelConstants . PRIORITY_HIGHEST , true , ThrottlingPolicy . BLOCK_THREAD , null ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvMFPRequestSchema" , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_MFPREQSCH_02 , this ) ; SibTr . error ( tc , "COMMUNICATION_ERROR_SICO2019" , e ) ; } } } catch ( Exception e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvMFPRequestSchema" , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_MFPREQSCH_03 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "MFP unable to create CompHandshake Singleton" , e ) ; } request . release ( allocatedFromBufferPool ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "rcvMFPRequestSchema" ) ; } | This gets called when the server receives a request from the client about an MFP schema . In this case we pass the call off to MFP and return any result they give us . |
25,410 | private void attachConnectionListener ( Conversation conversation , SICoreConnection conn ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "attachConnectionListener" , new Object [ ] { conversation , conn } ) ; ServerLinkLevelState linkState = ( ServerLinkLevelState ) conversation . getLinkLevelAttachment ( ) ; ServerSICoreConnectionListener listener = linkState . getSICoreConnectionListener ( ) ; listener . addSICoreConnection ( conn , conversation ) ; try { conn . addConnectionListener ( listener ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".attachConnectionListener" , CommsConstants . SERVERTRANSPORTRECEIVELISTENER_CONNGET_01 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Unable to register connection listener" , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "attachConnectionListener" ) ; } | Helper method used to register the SICoreConnection with the connection listener . |
25,411 | public void setOptions ( JspToolsOptionsMap options ) { if ( logger != null ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINEST ) ) { logger . logp ( Level . FINEST , CLASS_NAME , "setOptions" , "setOptions is called" ) ; } } this . optionOverrides = options ; } | reg 2007 - 12 - 18 I don t think this code every gets called |
25,412 | public boolean isSearchClasspathForResources ( ) { if ( logger != null ) logger . logp ( Level . INFO , CLASS_NAME , "isSearchClasspathForResources" , "searchClasspathForResources: {" + searchClasspathForResources + "]" ) ; return searchClasspathForResources ; } | defect 201520 - begin |
25,413 | public Subject authenticate ( String assertedUser ) throws AuthenticationException { AuthenticateUserHelper authHelper = new AuthenticateUserHelper ( ) ; return authHelper . authenticateUser ( authenticationService , assertedUser , jaasEntryName ) ; } | Authenticate with asserted user . |
25,414 | public void release ( ) { super . release ( ) ; _forceId = null ; _forceIdIndex = null ; _value = null ; _converter = null ; _javascriptLocation = null ; _imageLocation = null ; _styleLocation = null ; } | attributes id rendered and binding are handled by UIComponentTag |
25,415 | protected void setIntegerProperty ( UIComponent component , String propName , ValueExpression value ) { UIComponentELTagUtils . setIntegerProperty ( component , propName , value ) ; } | sub class helpers |
25,416 | private boolean giveMessageToConsumer ( SIMPMessage msg , TransactionCommon tran , DispatchableConsumerPoint consumerPoint , boolean storedByCD ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "giveMessageToConsumer" , new Object [ ] { msg , tran , consumerPoint , Boolean . valueOf ( storedByCD ) } ) ; boolean messageTaken = false ; if ( msg . getLocalisingMEUuid ( ) == null ) msg . setLocalisingME ( _messageProcessor . getMessagingEngineUuid ( ) ) ; messageTaken = consumerPoint . put ( msg , storedByCD ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "giveMessageToConsumer" , Boolean . valueOf ( messageTaken ) ) ; return messageTaken ; } | Actually hand the message on to a consumerPoint . This is where no - local and exception destination processing is done . |
25,417 | public boolean put ( SIMPMessage msg , TransactionCommon tran , InputHandlerStore inputHandlerStore , boolean storedByIH ) throws SIDiscriminatorSyntaxException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "put" , new Object [ ] { msg , tran , inputHandlerStore , Boolean . valueOf ( storedByIH ) } ) ; JsMessage jsMsg = msg . getMessage ( ) ; if ( msg . getRequiresNewId ( ) || jsMsg . getSystemMessageId ( ) == null ) { jsMsg . setSystemMessageSourceUuid ( _messageProcessor . getMessagingEngineUuid ( ) ) ; jsMsg . setSystemMessageValue ( _messageProcessor . nextTick ( ) ) ; msg . setRequiresNewId ( false ) ; } if ( msg . getMessage ( ) . getReportCOA ( ) != null ) { if ( ! _baseDestHandler . isMQLink ( ) ) { if ( reportHandler == null ) reportHandler = new ReportHandler ( _messageProcessor ) ; try { reportHandler . handleMessage ( msg , tran , SIApiConstants . REPORT_COA ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.put" , "1:912:1.280.5.25" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "put" , "SIResourceException" ) ; throw new SIResourceException ( e ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Ignored report message generation for the request message targeted for MQ destination (via MQLink)" , _baseDestHandler . getName ( ) ) ; } } if ( msg . isTransacted ( ) && ! _isPubSub ) { final boolean retVal = storeMessage ( ( MessageItem ) msg , tran , inputHandlerStore , storedByIH ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "put" , Boolean . valueOf ( retVal ) ) ; return retVal ; } final boolean retVal = internalPut ( msg , tran , inputHandlerStore , storedByIH , false , true ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "put" , Boolean . valueOf ( retVal ) ) ; return retVal ; } | Put a message on this ConsumerDispatcher for delivery to consumers . |
25,418 | public boolean isDurable ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isDurable" ) ; final boolean dur = ( _isPubSub && dispatcherState . isDurable ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isDurable" , Boolean . valueOf ( dur ) ) ; return dur ; } | Returns whether this consumerDispatcher is being used for a durable subscription . |
25,419 | public long newReadyConsumer ( JSConsumerKey consumerKey , boolean bSelector ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "newReadyConsumer" , new Object [ ] { consumerKey , Boolean . valueOf ( bSelector ) } ) ; if ( consumerKey . getForwardScanning ( ) ) { readyFwdScanningCPs . put ( ( SimpleEntry ) consumerKey ) ; } else { if ( bSelector ) { specificReadyConsumerCount ++ ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "sepcificReadyConsumerCount:" + specificReadyConsumerCount ) ; } else { nonSpecificReadyCPs . put ( ( SimpleEntry ) consumerKey ) ; } } ++ readyConsumerVersion ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "newReadyConsumer" , Long . valueOf ( readyConsumerVersion ) ) ; return readyConsumerVersion ; } | Add a ready consumer into our ready lists |
25,420 | public void removeReadyConsumer ( JSConsumerKey consumerKey , boolean bSelector ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeReadyConsumer" , new Object [ ] { consumerKey , Boolean . valueOf ( bSelector ) } ) ; if ( consumerKey == null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher" , "1:1684:1.280.5.25" } , null ) ) ; FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.removeReadyConsumer" , "1:1690:1.280.5.25" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher" , "1:1698:1.280.5.25" } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeReadyConsumer" , e ) ; throw e ; } if ( consumerKey . getForwardScanning ( ) ) { ( ( SimpleEntry ) consumerKey ) . remove ( ) ; } else { if ( bSelector ) { specificReadyConsumerCount -- ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "sepcificReadyConsumerCount:" + specificReadyConsumerCount ) ; } else { ( ( SimpleEntry ) consumerKey ) . remove ( ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeReadyConsumer" ) ; } | Remove the ready consumer from our ready lists |
25,421 | private boolean initialiseTransactionSet ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "initialiseTransactionSet" ) ; boolean suspend = false ; transactionSet = new HashSet ( ) ; try { if ( itemStream != null ) itemStream . getActiveTransactions ( transactionSet ) ; } catch ( MessageStoreException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.initialiseTransactionSet" , "1:1957:1.280.5.25" , this ) ; SIResourceException e2 = new SIResourceException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher" , "1:1965:1.280.5.25" , e } , null ) , e ) ; SibTr . exception ( tc , e2 ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher" , "1:1972:1.280.5.25" , e2 } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "initialiseTransactionSet" , e2 ) ; throw e2 ; } if ( transactionSet . size ( ) > 0 ) suspend = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "initialiseTransactionSet" , new Object [ ] { transactionSet , Boolean . valueOf ( suspend ) } ) ; return suspend ; } | Initialise the transaction map for semi - ordered consumers . This occurs when a consumer with ignoreInitialIndoubts set to false is attaching . |
25,422 | public void detachConsumerPoint ( ConsumerKey consumerKey ) throws SIResourceException , SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "detachConsumerPoint" , consumerKey ) ; if ( ! _isPubSub ) { _baseDestHandler . removeConsumerPointMatchTarget ( ( DispatchableKey ) consumerKey ) ; } else { state = SIMPState . DELETED ; } final Object deletionLock ; if ( isPubSub ( ) ) deletionLock = _baseDestHandler . getPubSubRealization ( ) . getRemotePubSubSupport ( ) ; else deletionLock = consumerPoints ; synchronized ( deletionLock ) { synchronized ( consumerPoints ) { if ( consumerPoints . contains ( consumerKey ) ) { consumerPoints . remove ( consumerKey ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Consumer key removed - new size of consumerPoints is " + consumerPoints . size ( ) ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Consumer key not in map" , consumerKey ) ; } if ( consumerPoints . isEmpty ( ) && _isPubSub && dispatcherState . getSubscriberID ( ) . contains ( "_NON_DURABLE_NON_SHARED" ) && ( ! isDurable ( ) || ( this instanceof RemoteConsumerDispatcher ) ) ) { deleteConsumerDispatcher ( ! isDurable ( ) ) ; } } } if ( _isPubSub && ( ! isDurable ( ) ) && ! dispatcherState . getSubscriberID ( ) . contains ( "_NON_DURABLE_NON_SHARED" ) ) { synchronized ( _baseDestHandler . getDestinationManager ( ) . getNondurableSharedSubscriptions ( ) ) { synchronized ( consumerPoints ) { if ( consumerPoints . isEmpty ( ) ) { deleteConsumerDispatcher ( ! isDurable ( ) ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "detachConsumerPoint" ) ; } | Detach a consumer point from this CD . |
25,423 | protected ConsumerKey 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 , Boolean . valueOf ( readAhead ) , Boolean . valueOf ( forwardScanning ) , consumerSet } ) ; ConsumerKey key = new LocalQPConsumerKey ( consumerPoint , this , criteria , connectionUuid , forwardScanning , consumerSet ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createConsumerKey" , key ) ; return key ; } | Helper methods to create a ConsumerKey . Can be overridden by subclasses |
25,424 | public boolean hasConsumersAttached ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "hasConsumersAttached" ) ; boolean hasConsumersAttached = ( getConsumerCount ( ) > 0 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "hasConsumersAttached" , Boolean . valueOf ( hasConsumersAttached ) ) ; return hasConsumersAttached ; } | Returns true if this consumerDispatcher currently has consumers attached to it . |
25,425 | public List < DispatchableKey > getConsumerPoints ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getConsumerPoints" ) ; SibTr . exit ( tc , "getConsumerPoints" , consumerPoints ) ; } return ( List < DispatchableKey > ) consumerPoints . clone ( ) ; } | This list is cloned to stop illegal access to the ConsumerPoints controlled by this ConsumerDispatcher |
25,426 | public void deleteConsumerDispatcher ( boolean callProxyCode ) throws SIRollbackException , SIConnectionLostException , SIResourceException , SIErrorException , SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteConsumerDispatcher" , new Object [ ] { Boolean . valueOf ( callProxyCode ) , Boolean . valueOf ( isInMatchSpace ) } ) ; synchronized ( consumerPoints ) { if ( hasConsumersAttached ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteConsumerDispatcher" , "Consumers attached " ) ; throw new SINotPossibleInCurrentConfigurationException ( nls . getFormattedMessage ( "DESTINATION_DELETION_ERROR_CWSIP0112" , new Object [ ] { _baseDestHandler . getName ( ) } , null ) ) ; } } state = SIMPState . DELETED ; if ( isInMatchSpace ) _baseDestHandler . dereferenceSubscriptionConsumerDispatcher ( this , ! isDurable ( ) , callProxyCode ) ; try { if ( isDurable ( ) ) { if ( this instanceof RemoteConsumerDispatcher ) _baseDestHandler . deleteRemoteDurableRME ( dispatcherState ) ; else _baseDestHandler . deleteRemoteDurableDME ( dispatcherState . getSubscriberID ( ) ) ; } } catch ( SIDurableSubscriptionNotFoundException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.deleteConsumerDispatcher" , "1:2265:1.280.5.25" , this ) ; SibTr . exception ( tc , e ) ; } getControlAdapter ( ) . dereferenceControllable ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteConsumerDispatcher" ) ; } | Attempts to dereference this consumerDispatcher . Will throw exception if consumers are attached . If succesful the consumerDispatcher reference will be removed from the destination and the consumerDispatcher will be removed from the matchspace . |
25,427 | public void setIsInMatchSpace ( boolean inMatchSpace ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setIsInMatchSpace" , Boolean . valueOf ( inMatchSpace ) ) ; isInMatchSpace = inMatchSpace ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setIsInMatchSpace" ) ; } | Updates to state that the subscription is in the MatchSpace . |
25,428 | public boolean isInMatchSpace ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isInMatchSpace" ) ; SibTr . exit ( tc , "isInMatchSpace" , Boolean . valueOf ( isInMatchSpace ) ) ; } return isInMatchSpace ; } | Indicates whether a subscription associated with the ConsumerDispatcher has been stored in the MatchSpace . |
25,429 | public boolean isLocked ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isLocked" ) ; final boolean isLocked = ( state == SIMPState . LOCKED ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isLocked" , Boolean . valueOf ( isLocked ) ) ; return isLocked ; } | Method isLocked . |
25,430 | public ReferenceStream getReferenceStream ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getReferenceStream" ) ; SibTr . exit ( tc , "getReferenceStream" , subscriptionItemStream ) ; } return subscriptionItemStream ; } | Returns the subscription . |
25,431 | public ItemStream getItemStream ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getItemStream" ) ; SibTr . exit ( tc , "getItemStream" , itemStream ) ; } return itemStream ; } | Returns the p - to - p ItemStream . |
25,432 | private synchronized ReceiveAllowedThread getReceiveAllowedThread ( DestinationHandler destinationHandler ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getReceiveAllowedThread" , destinationHandler ) ; if ( _receiveAllowedThread == null ) { _receiveAllowedThread = new ReceiveAllowedThread ( destinationHandler ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getReceiveAllowedThread" , _receiveAllowedThread ) ; return _receiveAllowedThread ; } _receiveAllowedThread . markForUpdate ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getReceiveAllowedThread" , null ) ; return null ; } | Checks if there is a ReceiveAllowedThread already running . If there is it will mark the thread to indicate that a rerun has been requested . If not a new ReceiveAllowedThread is created and returned . |
25,433 | private synchronized boolean deleteReceiveAllowedThread ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteReceiveAllowedThread" ) ; if ( _receiveAllowedThread . isMarkedForUpdate ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteReceiveAllowedThread" , Boolean . FALSE ) ; return false ; } _receiveAllowedThread = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteReceiveAllowedThread" , Boolean . TRUE ) ; return true ; } | Checks to see if another update has occured to the ReceiveAllowedState . If it has it returns false to indicate that another run is required of the thread otherwise it deletes this instance of the receiveAllowedThread by setting the reference to null |
25,434 | private void searchMatchSpace ( SIMPMessage msg , MessageProcessorSearchResults searchResults ) throws SIDiscriminatorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "searchMatchSpace" , new Object [ ] { msg , searchResults } ) ; JsMessage searchMsg = msg . getMessage ( ) ; int redelCount = msg . guessRedeliveredCount ( ) ; if ( redelCount > 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Set deliverycount into message: " + redelCount ) ; searchMsg . setDeliveryCount ( redelCount ) ; } _messageProcessor . getMessageProcessorMatching ( ) . retrieveMatchingConsumerPoints ( _baseDestHandler . getUuid ( ) , getUuid ( ) , searchMsg , searchResults ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "searchMatchSpace" , searchResults ) ; } | Search the MatchSpace for a specific consumer |
25,435 | public void addAttribute ( String name , String value ) { checkType ( name , String . class ) ; attributes . put ( name , value ) ; } | Add a single - valued attribute . |
25,436 | public void addCollectionAttribute ( String name , Object value ) { List < Object > attributeValues = getCollectionAttribute ( name ) ; attributeValues . add ( value ) ; } | Add a multi - valued attribute . |
25,437 | public Object beginContext ( Map < URL , ModuleMetaData > mmdi ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { if ( mmdi != null && ! mmdi . isEmpty ( ) ) Tr . debug ( tc , "begin context " + mmdi . values ( ) . iterator ( ) . next ( ) . getJ2EEName ( ) ) ; else Tr . debug ( tc , "null or empty object was passed." ) ; } return threadContext . beginContext ( mmdi ) ; } | Begin the context for the map of ModuleMetaData provided . |
25,438 | public void setCustomProperties ( Properties customProperties ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setCustomProperties" , customProperties ) ; this . customProperties = customProperties ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "setCustomProperties" ) ; } | Method called by WebSphere Application Server runtime to set the custom properties configured for the custom KeyManager . |
25,439 | public String getProperty ( final String name ) { String property = null ; if ( customProperties != null ) { property = customProperties . getProperty ( name ) ; } if ( property == null ) { property = SSLConfigManager . getInstance ( ) . getGlobalProperty ( name ) ; } return property ; } | Obtain the value for a named property . Search first the custom properties then the System properties and then the global properties |
25,440 | private void parseSSLCertFile ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "parseSSLCertFile" ) ; } String fileName = null ; String lineRead = null ; BufferedReader bufferReader = null ; certDefaultLabel = getProperty ( PROTOCOL_HTTPS_CERT_DEFAULT_LABEL ) ; try { fileName = getProperty ( PROTOCOL_HTTPS_CERT_MAPPING_FILE ) ; if ( fileName != null && 0 < fileName . length ( ) ) { bufferReader = new BufferedReader ( new FileReader ( fileName ) ) ; lineRead = bufferReader . readLine ( ) ; while ( lineRead != null ) { extractSSLServerCert ( lineRead . trim ( ) ) ; lineRead = bufferReader . readLine ( ) ; } } } catch ( Exception e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) , "parseSSLCertFile" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Error parsing file; " + e ) ; } finally { if ( null != bufferReader ) { try { bufferReader . close ( ) ; } catch ( IOException ioe ) { } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "parseSSLCertFile" ) ; } } | Parse Server SSL Certificate Mapping File . |
25,441 | private void extractSSLServerCert ( String lineRead ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "extractSSLServerCert: " + lineRead ) ; } String tmpString ; String certLabelString ; String ipAddressString ; if ( lineRead . startsWith ( PROTOCOL_HTTPS_CERT_TAG ) ) { tmpString = lineRead . substring ( PROTOCOL_HTTPS_CERT_TAG . length ( ) ) . trim ( ) ; if ( tmpString . startsWith ( SINGLE_QUOTE_STRING ) || tmpString . startsWith ( DOUBLE_QUOTE_STRING ) ) { char delimeterChar = tmpString . charAt ( 0 ) ; certLabelString = tmpString . substring ( 1 , tmpString . lastIndexOf ( delimeterChar ) ) ; if ( certLabelString != null && certLabelString . length ( ) != 0 ) { ipAddressString = tmpString . substring ( tmpString . lastIndexOf ( delimeterChar ) + 1 ) . trim ( ) ; if ( ipAddressString != null && ipAddressString . length ( ) != 0 ) { certMapping . setProperty ( ipAddressString , certLabelString ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "extractSSLServerCert" ) ; } } | This method finds the certificate and associated ip and save cache this pair . |
25,442 | public void bundleChanged ( BundleEvent event ) { switch ( event . getType ( ) ) { case BundleEvent . INSTALLED : processBundle ( event . getBundle ( ) ) ; break ; case BundleEvent . UNINSTALLED : break ; } } | The BundleListener interface . Invoked by OSGI whenever a Bundle changes state . |
25,443 | protected void setWsLogHandler ( ServiceReference < WsLogHandler > ref ) { getMessageRouter ( ) . setWsLogHandler ( ( String ) ref . getProperty ( "id" ) , bundleContext . getService ( ref ) ) ; } | Add the WsLogHandler ref . 1 or more LogHandlers may be set . This method is called from the ServiceListener . |
25,444 | @ SuppressWarnings ( "unchecked" ) protected void processInitialWsLogHandlerServices ( ) throws InvalidSyntaxException { ServiceReference < WsLogHandler > [ ] servRefs = ( ServiceReference < WsLogHandler > [ ] ) bundleContext . getServiceReferences ( WsLogHandler . class . getName ( ) , null ) ; if ( servRefs != null ) { for ( ServiceReference < WsLogHandler > servRef : servRefs ) { setWsLogHandler ( servRef ) ; } } } | Search for and add any WsLogHandler ServiceReferences that were already started by the time we registered our ServiceListener . |
25,445 | protected void processBundle ( Bundle bundle ) { Properties props = readMessageRouterProps ( bundle ) ; if ( props != null ) { msgRouter . modified ( props ) ; } } | Read and parse the bundle s MessageRouter . properties file if one exists . |
25,446 | protected Properties readMessageRouterProps ( Bundle bundle ) { Properties props = null ; final String mrpFileName = "/META-INF/MessageRouter.properties" ; URL propFile = bundle . getEntry ( mrpFileName ) ; if ( propFile != null ) { props = new Properties ( ) ; try { props . load ( propFile . openStream ( ) ) ; } catch ( IOException ioe ) { } } return props ; } | Read the MessageRouter . properties file from the given Bundle . |
25,447 | public void stop ( ) { if ( msgRouter != null ) { TrConfigurator . unsetMessageRouter ( msgRouter ) ; } if ( configListener != null ) { configListener . unregister ( ) ; } } | The bundle is stopping . Inform the TrConfigurator who in turn will inform the TrService . Unregister the config listener service . |
25,448 | public void updateMessageListForHandler ( String msgIds , String handlerId ) { if ( msgIds == null ) { return ; } String [ ] msgStr = msgIds . split ( "," ) ; ArrayList < String > newMsgList = new ArrayList < String > ( Arrays . asList ( msgStr ) ) ; newMsgList . remove ( "" ) ; ArrayList < String > prevMsgList = previousHandlerMessageMap . get ( handlerId ) ; { if ( prevMsgList == null ) { prevMsgList = new ArrayList < String > ( ) ; } } if ( prevMsgList . equals ( newMsgList ) ) { return ; } getMessageRouter ( ) ; ArrayList < String > addedMsgs = new ArrayList < String > ( newMsgList ) ; addedMsgs . removeAll ( prevMsgList ) ; for ( String msgId : addedMsgs ) { msgRouter . addMsgToLogHandler ( msgId , handlerId ) ; } ArrayList < String > removedMsgs = new ArrayList < String > ( prevMsgList ) ; removedMsgs . removeAll ( newMsgList ) ; for ( String msgId : removedMsgs ) { msgRouter . removeMsgFromLogHandler ( msgId , handlerId ) ; } previousHandlerMessageMap . put ( handlerId , newMsgList ) ; String setOfIds = "" ; for ( String msg : newMsgList ) { if ( ! setOfIds . equals ( "" ) ) { setOfIds = setOfIds . concat ( " " ) ; } setOfIds = setOfIds . concat ( msg ) ; } Tr . info ( tc , "MSG_ROUTER_UPDATED" , new Object [ ] { handlerId , setOfIds } ) ; } | Compare the incoming list of message IDs to be associated with the given handler adding and removing as needed to match the new config . |
25,449 | public Map < String , Object > getRowData ( ) { if ( _resultSet == null ) { return null ; } else if ( ! isRowAvailable ( ) ) { throw new IllegalArgumentException ( "the requested row is not available in the ResultSet - you have scrolled beyond the end." ) ; } try { return new WrapResultSetMap ( String . CASE_INSENSITIVE_ORDER ) ; } catch ( SQLException e ) { throw new FacesException ( e ) ; } } | Get the actual data of this row wrapped into a map . The specification is very strict about what has to be returned from here so check the spec before modifying anything here . |
25,450 | public final Object get ( Object key ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "get" , "key=" + key + "Object" ) ; java . util . Map subMap = getSubMap ( key ) ; Object returnValue ; synchronized ( subMap ) { returnValue = subMap . get ( key ) ; } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "get" , "returns retuenVaue=" + returnValue + "(Object)" ) ; return returnValue ; } | Retrieve an object from the map based on its key . |
25,451 | public final Object putIfAbsent ( Object key , Object value ) { Object foundObject = null ; java . util . Map subMap = getSubMap ( key ) ; synchronized ( subMap ) { foundObject = subMap . get ( key ) ; if ( foundObject == null ) subMap . put ( key , value ) ; } return foundObject ; } | Add an object to the subset of the Map if there is no Object represented by the key . |
25,452 | public final Object removeOne ( ) { int index = new java . util . Random ( Thread . currentThread ( ) . hashCode ( ) ) . nextInt ( subMaps . length ) ; int firstIndex = index ; Object removedObject = null ; do { java . util . Map subMap = subMaps [ index ] ; synchronized ( subMap ) { if ( ! subMap . isEmpty ( ) ) { java . util . Iterator iterator = subMap . values ( ) . iterator ( ) ; removedObject = iterator . next ( ) ; iterator . remove ( ) ; break ; } } index ++ ; if ( index == subMaps . length ) index = 0 ; } while ( index != firstIndex ) ; return removedObject ; } | Remove any singe element from the map . |
25,453 | public final long clear ( long numberToClear ) { long numberRemainingToClear = numberToClear ; int index = new java . util . Random ( Thread . currentThread ( ) . hashCode ( ) ) . nextInt ( subMaps . length ) ; int numberEmpty = 0 ; while ( numberRemainingToClear > 0 && numberEmpty < subMaps . length ) { java . util . Map subMap = subMaps [ index ] ; synchronized ( subMap ) { if ( ! subMap . isEmpty ( ) ) { java . util . Iterator iterator = subMap . entrySet ( ) . iterator ( ) ; iterator . next ( ) ; iterator . remove ( ) ; numberRemainingToClear -- ; numberEmpty = 0 ; } else { numberEmpty ++ ; } } index ++ ; if ( index == subMaps . length ) index = 0 ; } return numberToClear - numberRemainingToClear ; } | Clear up to a specified number of elements from the the map . |
25,454 | public int size ( ) { int count = 0 ; if ( subMaps != null ) { for ( int i = 0 ; i < subMaps . length ; i ++ ) { count += subMaps [ i ] . size ( ) ; } } return count ; } | This is a more performant implementation of this method than that found in AbstractMap . It simply iterates over the array of subMaps and adds together their sizes |
25,455 | public ManagedObjectContext createContext ( ) { Bean < T > bean = null ; EjbDescriptor < T > ejbDescriptor = getEjbDescriptor ( ) ; if ( ! ejbDescriptor . isMessageDriven ( ) ) { bean = getBean ( ) ; } WeldManager beanManager = getBeanManager ( ) ; WeldCreationalContext < T > creationalContext = beanManager . createCreationalContext ( bean ) ; ManagedObjectContext managedObjectContext = new CDIManagedObjectState ( creationalContext ) ; return managedObjectContext ; } | This version creates a ManagedObjectContext which contains a CreationalContext for an EJB . |
25,456 | protected InjectionTarget < T > getInjectionTarget ( boolean nonContextual ) { EjbDescriptor < T > ejbDescriptor = getEjbDescriptor ( ) ; InjectionTarget < T > injectionTarget = getBeanManager ( ) . createInjectionTarget ( ejbDescriptor ) ; return injectionTarget ; } | Get an EJB InjectionTarget using the EJBDescriptor |
25,457 | protected WeldCreationalContext < T > getCreationalContext ( ManagedObjectInvocationContext < T > invocationContext ) { ManagedObjectContext managedObjectContext = invocationContext . getManagedObjectContext ( ) ; @ SuppressWarnings ( "unchecked" ) WeldCreationalContext < T > creationalContext = managedObjectContext . getContextData ( WeldCreationalContext . class ) ; AroundConstructCallback < T > callback = new EJBInterceptorAroundConstructCallback < T > ( invocationContext ) ; creationalContext . registerAroundConstructCallback ( callback ) ; creationalContext . setConstructorInterceptionSuppressed ( true ) ; return creationalContext ; } | Get the CreationalContext from the ManagedObjectInvocationContext Register our AroundConstruct callback and stop Weld from invoking any |
25,458 | public void startHelper ( BundleContext bContext ) { _resolvingThread = Thread . currentThread ( ) . getId ( ) ; ResolverHookFactoryReg = bContext . registerService ( ResolverHookFactory . class , this , null ) ; } | Should be called just prior to the resolve bundle operation from the same thread . |
25,459 | public String getResolutionReportString ( ) { ResolutionReport report = _reportRef . get ( ) ; StringBuilder reportMessage = null ; if ( report != null ) { Map < Resource , List < ResolutionReport . Entry > > unresolved ; reportMessage = new StringBuilder ( ) . append ( "Resolver report:\n" ) ; unresolved = report . getEntries ( ) ; if ( ! unresolved . isEmpty ( ) ) { for ( Resource resource : unresolved . keySet ( ) ) { reportMessage . append ( report . getResolutionReportMessage ( resource ) ) ; } } if ( report . getResolutionException ( ) != null ) { reportMessage . append ( "\nResolution exception:\n" + report . getResolutionException ( ) ) ; } } return reportMessage == null ? "No resolution report generated." : reportMessage . toString ( ) ; } | Convenience method to get a string to use for debug tracing . |
25,460 | void balance ( DeleteStack stack , int ntop ) { DeleteStack . HeightNote xx = stack . heightNote ( ) ; ntop -- ; GBSNode bnext = stack . node ( ntop + 1 ) ; for ( int i = ntop ; i > 0 ; i -- ) { xx . depthDecrease = false ; reBalance ( xx , stack . node ( i - 1 ) , stack . node ( i ) , bnext ) ; bnext = xx . bnew ; if ( ! xx . depthDecrease ) break ; } } | Restore height balance following a fringe raveling caused by a delete . |
25,461 | private void reBalance ( DeleteStack . HeightNote xx , GBSNode bparent , GBSNode bpoint , GBSNode bnext ) { xx . bnew = bpoint ; if ( bpoint . leftChild ( ) == bnext ) { switch ( bpoint . balance ( ) ) { case 0 : bpoint . setBalance ( 1 ) ; break ; case 1 : rotateRight ( xx , bparent , bpoint ) ; break ; case - 1 : bpoint . clearBalance ( ) ; xx . depthDecrease = true ; break ; default : throw new RuntimeException ( "bpoint.balance() = " + bpoint . balance ( ) ) ; } } else { switch ( bpoint . balance ( ) ) { case 0 : bpoint . setBalance ( - 1 ) ; break ; case - 1 : rotateLeft ( xx , bparent , bpoint ) ; break ; case 1 : bpoint . clearBalance ( ) ; xx . depthDecrease = true ; break ; default : throw new RuntimeException ( "bpoint.balance() = " + bpoint . balance ( ) ) ; } } } | Method reBalance . |
25,462 | public ManagedObject inject ( Object obj , boolean delayPostConstruct ) throws RuntimeException { ManagedObject mo = null ; Throwable th = null ; try { if ( wrapper != null ) { if ( ! delayPostConstruct ) { mo = wrapper . injectAndPostConstruct ( obj ) ; } else { mo = wrapper . inject ( obj ) ; } } else { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject" , "injection not attempted because wrapper is null " ) ; } } } catch ( InjectionException e ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject" , "caught injection exception: " + e ) ; } if ( ! delayPostConstruct ) { th = e ; } else { throw new RuntimeException ( e ) ; } } catch ( RuntimeException e ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject" , "caught runtime exception: " + e ) ; } if ( ! delayPostConstruct ) { th = e ; } else { throw e ; } } if ( ! delayPostConstruct ) { if ( th != null && WCCustomProperties . THROW_POSTCONSTRUCT_EXCEPTION ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject" , "doPostConstruct exceptions are re-thrown as RuntimeException" ) ; } if ( th instanceof RuntimeException ) { throw ( RuntimeException ) th ; } else { throw new RuntimeException ( th ) ; } } } return mo ; } | If delayPostConstruct is true doPostConstruct will not be called |
25,463 | public ManagedObject inject ( Class < ? > Klass , boolean delayPostConstruct ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . entering ( CLASS_NAME , "inject(Class<?>,boolean)" , "class = " + Klass . getName ( ) + ", delayPostConstruct = " + delayPostConstruct ) ; ManagedObject mo = null ; Throwable th = null ; try { if ( wrapper != null ) { if ( ! delayPostConstruct ) { mo = wrapper . injectAndPostConstruct ( Klass ) ; } else { mo = wrapper . inject ( Klass ) ; } } else { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject" , "injection not attempted because wrapper is null " ) ; } } } catch ( InjectionException e ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject" , "caught injection exception: " + e ) ; } if ( ! delayPostConstruct ) { th = e ; } else { throw new RuntimeException ( e ) ; } } catch ( RuntimeException e ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject" , "caught runtime exception: " + e ) ; } if ( ! delayPostConstruct ) { th = e ; } else { throw e ; } } if ( ! delayPostConstruct ) { if ( th != null && WCCustomProperties . THROW_POSTCONSTRUCT_EXCEPTION ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject" , "doPostConstruct exceptions are re-thrown as RuntimeException" ) ; } if ( th instanceof RuntimeException ) { throw ( RuntimeException ) th ; } else { throw new RuntimeException ( th ) ; } } } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . exiting ( CLASS_NAME , "inject(Class<?>,boolean)" ) ; return mo ; } | inject with class for cdi 1 . 2 support . |
25,464 | public void localQueuePointRemoved ( SIBUuid8 messagingEngineUuid ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "localQueuePointRemoved" , new Object [ ] { messagingEngineUuid } ) ; synchronized ( _queuePointsGuessSet ) { _queuePointsGuessSet . remove ( messagingEngineUuid ) ; _hasLocal = false ; } updateTrmAdvertisements ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "localQueuePointRemoved" ) ; } | Method localQueuePointRemoved . |
25,465 | public void clearLocalisingUuidsSet ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "clearLocalisingUuidsSet" ) ; if ( _queuePointsGuessSet != null ) { synchronized ( _queuePointsGuessSet ) { _queuePointsGuessSet . clear ( ) ; } } if ( _remoteQueuePointsGuessSet != null ) { synchronized ( _remoteQueuePointsGuessSet ) { _remoteQueuePointsGuessSet . clear ( ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "clearLocalisingUuidsSet" ) ; return ; } | Method clearLocalisingUuidsSet . |
25,466 | public void assignQueuePointOutputHandler ( OutputHandler outputHandler , SIBUuid8 messagingEngineUuid ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "assignQueuePointOutputHandler" , new Object [ ] { outputHandler , messagingEngineUuid } ) ; synchronized ( _queuePointOutputHandlers ) { _queuePointOutputHandlers . put ( messagingEngineUuid , outputHandler ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "assignQueuePointOutputHandler" ) ; } | Method assignQueuePointOutputHandler . |
25,467 | public void updateQueuePointOutputHandler ( SIBUuid8 newLocalisingMEUuid , OutputHandler outputHandler , SIBUuid8 existingUuid ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "updateQueuePointOutputHandler" , new Object [ ] { newLocalisingMEUuid , outputHandler , existingUuid } ) ; synchronized ( _queuePointOutputHandlers ) { _queuePointOutputHandlers . remove ( existingUuid ) ; _queuePointOutputHandlers . put ( newLocalisingMEUuid , outputHandler ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "updateQueuePointOutputHandler" ) ; } | Method updateQueuePointOutputHandler . |
25,468 | private boolean doesIndexExists ( Connection con , String indexName ) { if ( usingDB2 ) { if ( usingAS400DB2 ) { return doesIndexExistsiSeries ( con , indexName ) ; } return doesIndexExistsDistributed ( con , indexName ) ; } else return false ; } | PK56991 we are checking if there is an existing index for the session table in distributed and iSeries platforms . The same test does not apply to zOS system as if we ask the customer to create the session index manually during table creation . Session manager does not create session index . |
25,469 | public int compareTo ( Version v ) { if ( this == v ) return 0 ; int diff = major - v . major ; if ( diff != 0 ) return diff ; diff = minor - v . minor ; if ( diff != 0 ) return diff ; diff = micro - v . micro ; if ( diff != 0 ) return diff ; return qualifier . compareTo ( v . qualifier ) ; } | Compares the current version with the parameter Version v |
25,470 | public static Version createVersion ( String vStr ) { if ( vStr == null || vStr . isEmpty ( ) ) return null ; int major = 0 ; int minor = 0 ; int micro = 0 ; String qualifier = "" ; String v [ ] = vStr . split ( "\\." , 4 ) ; try { if ( v . length > 0 ) { major = Integer . valueOf ( v [ 0 ] ) . intValue ( ) ; } if ( v . length > 1 ) { minor = Integer . valueOf ( v [ 1 ] ) . intValue ( ) ; } if ( v . length > 2 ) { micro = Integer . valueOf ( v [ 2 ] ) . intValue ( ) ; } if ( v . length > 3 ) { qualifier = v [ 3 ] ; } return new Version ( major , minor , micro , qualifier ) ; } catch ( NumberFormatException e ) { return null ; } } | Creates a new object of type Version This method extracts the values for the object parameters from vStr |
25,471 | public boolean tryLock ( ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "tryLock" ) ; boolean isLocked = true ; if ( fileLock == null ) isLocked = false ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "tryLock" , "returns isLocked=" + isLocked + "(bloolean)" ) ; return isLocked ; } | Test the lock . |
25,472 | public final void release ( ) throws java . io . IOException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "release" ) ; if ( fileLock != null ) fileLock . release ( ) ; fileLock = null ; if ( fileChannel != null ) fileChannel . close ( ) ; fileChannel = null ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "release" ) ; } | Unlock the file . |
25,473 | public void setInPriorityOverride ( Integer pri ) { if ( ( ( inPriOverride == null ) && ( pri != null ) ) || ( ( inPriOverride != null ) && ( ! inPriOverride . equals ( pri ) ) ) ) { inPriOverride = pri ; recalcOutPriority ( ) ; } } | Sets the administrative override for priority . |
25,474 | public void setInTTL_Override ( Long ttl ) { if ( ( ( inTTL_Override == null ) && ( ttl != null ) ) || ( ( inTTL_Override != null ) && ( ! inTTL_Override . equals ( ttl ) ) ) ) { inTTL_Override = ttl ; recalcOutTTL ( ) ; } } | Sets the administrative override for ttl . |
25,475 | public void setInTTL ( long ttl ) throws JMSException { if ( inTTL != ttl ) { if ( ttl < 0 || ttl > MfpConstants . MAX_TIME_TO_LIVE ) { throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "INVALID_VALUE_CWSIA0301" , new Object [ ] { "timeToLive" , "" + ttl } , tc ) ; } inTTL = ttl ; recalcOutTTL ( ) ; } } | Set the ttl on the basis of the producer . |
25,476 | private void recalcOutDeliveryMode ( ) { if ( inDmOverride . equals ( ApiJmsConstants . DELIVERY_MODE_PERSISTENT ) ) { outboundDeliveryMode = PersistenceType . PERSISTENT ; } else if ( inDmOverride . equals ( ApiJmsConstants . DELIVERY_MODE_NONPERSISTENT ) ) { outboundDeliveryMode = PersistenceType . NON_PERSISTENT ; } else { if ( inDeliveryMode == DeliveryMode . PERSISTENT ) { outboundDeliveryMode = PersistenceType . PERSISTENT ; } else { outboundDeliveryMode = PersistenceType . NON_PERSISTENT ; } } } | This method called by the appropriate setter methods to recalculate the outbound delivery mode . |
25,477 | public boolean enlist ( XAResource xaRes , int recoveryId ) throws RollbackException , IllegalStateException , SystemException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "enlist" , new Object [ ] { xaRes , recoveryId } ) ; if ( tx == null ) { final String msg = "No transaction associated with this thread" ; final IllegalStateException ise = new IllegalStateException ( msg ) ; FFDCFilter . processException ( ise , "com.ibm.tx.jta.impl.TranManagerImpl.enlist" , "470" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "enlist" , ise ) ; throw ise ; } boolean ret = false ; try { ret = tx . enlistResource ( xaRes , recoveryId ) ; } finally { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "enlist" , ret ) ; } return ret ; } | that this class is managing . |
25,478 | protected void processUpgradeHeaderSettings ( String settings ) throws Http2Exception { if ( settings != null ) { byte [ ] decoded = decode ( settings ) ; if ( decoded != null ) { FrameSettings settingsFrame = new FrameSettings ( 0 , decoded . length , ( byte ) 0x0 , false , FrameDirection . READ ) ; settingsFrame . processPayload ( decoded ) ; updateSettings ( settingsFrame ) ; } } } | A settings frame can be encoded as a base - 64 string and passed as a header on the initial upgrade request . This method decodes that base - 64 string and applies the encoded settings to this http2 connection . |
25,479 | public void updateSettings ( FrameSettings settings ) { if ( settings . getHeaderTableSize ( ) != - 1 ) { headerTableSize = settings . getHeaderTableSize ( ) ; } if ( settings . getEnablePush ( ) != - 1 ) { enablePush = settings . getEnablePush ( ) ; } if ( settings . getMaxConcurrentStreams ( ) != - 1 ) { maxConcurrentStreams = settings . getMaxConcurrentStreams ( ) ; } if ( settings . getInitialWindowSize ( ) != - 1 ) { initialWindowSize = settings . getInitialWindowSize ( ) ; } if ( settings . getMaxFrameSize ( ) != - 1 ) { maxFrameSize = settings . getMaxFrameSize ( ) ; } if ( settings . getMaxHeaderListSize ( ) != - 1 ) { this . maxHeaderListSize = settings . getMaxHeaderListSize ( ) ; } } | Apply the http2 connection settings contained in a settings frame to this http2 connection |
25,480 | public TCPConnectRequestContext createTCPConnectRequestContext ( String _localHostName , int _localPort , String _remoteHostName , int _remotePort , int _timeout ) { return new TCPConnectRequestContextImpl ( _localHostName , _localPort , _remoteHostName , _remotePort , _timeout ) ; } | Create a new connection request context based upon the input needed to fully define the context . |
25,481 | public TCPConnectRequestContext createTCPConnectRequestContext ( String _remoteHostName , int _remotePort , int _timeout ) { return new TCPConnectRequestContextImpl ( _remoteHostName , _remotePort , _timeout ) ; } | Create a new connection request context based upon the input needed to fully define the context . The local address is assumed to be null and the local port will be an ephemeral port |
25,482 | protected void customizeWSDLGetInterceptor ( Class < ? > implBeanClass ) { String wsdlLocation = endpointInfo . getWsdlLocation ( ) ; URL wsdlUrl = JaxWsUtils . resolve ( wsdlLocation , jaxWsModuleMetaData . getModuleContainer ( ) ) ; boolean wsdlLocationExisted = true ; boolean wsdlLocationEmpty = StringUtils . isEmpty ( wsdlLocation ) ; if ( ! wsdlLocationEmpty && wsdlUrl == null ) { wsdlLocationExisted = false ; OASISCatalogManager catalogManager = jaxWsModuleMetaData . getServerMetaData ( ) . getServerBus ( ) . getExtension ( OASISCatalogManager . class ) ; String resolvedLocation = null ; if ( catalogManager != null ) { try { resolvedLocation = catalogManager . resolveSystem ( wsdlLocation ) ; if ( resolvedLocation == null ) { resolvedLocation = catalogManager . resolveURI ( wsdlLocation ) ; } } catch ( MalformedURLException e ) { } catch ( IOException e ) { } } if ( resolvedLocation != null ) { wsdlLocationExisted = true ; } } if ( ! wsdlLocationEmpty && wsdlLocationExisted ) { return ; } String protocolBinding = endpointInfo . getProtocolBinding ( ) ; if ( ! JaxWsUtils . isWSDLGenerationSupported ( protocolBinding ) || ! wsdlLocationExisted ) { List < Interceptor < ? extends Message > > inInterceptors = server . getEndpoint ( ) . getInInterceptors ( ) ; inInterceptors . remove ( WSDLGetInterceptor . INSTANCE ) ; inInterceptors . add ( new LibertyJaxWsCompatibleWSDLGetInterceptor ( implBeanClass . getCanonicalName ( ) , wsdlLocation , wsdlLocationExisted ) ) ; } } | Customize WSDL Intercepter when no need to generate WSDL . |
25,483 | public T get ( ) { T object ; while ( true ) { int p = m_put . get ( ) ; int g = m_get . get ( ) ; if ( g >= p ) { if ( p >= LIMIT ) { m_get . set ( 0 ) ; m_put . set ( 0 ) ; } return null ; } if ( ! m_get . compareAndSet ( g , g + 1 ) ) { continue ; } int index = g % m_arraySize ; AtomicReference < T > reference = m_array [ index ] ; object = reference . get ( ) ; if ( object == null ) { continue ; } if ( reference . compareAndSet ( object , null ) ) { return object ; } } } | gets an object from the pool |
25,484 | public boolean put ( T object ) { if ( object == null ) { throw new IllegalArgumentException ( "returning null object to pool" ) ; } while ( true ) { int g = m_get . get ( ) ; int p = m_put . get ( ) ; if ( p >= LIMIT ) { return false ; } if ( p - g >= ( m_arraySize - 1 ) ) { return false ; } if ( ! m_put . compareAndSet ( p , p + 1 ) ) { continue ; } int index = p % m_arraySize ; AtomicReference < T > reference = m_array [ index ] ; if ( reference . compareAndSet ( null , object ) ) { return true ; } } } | puts an object back into the pool for recycling |
25,485 | private SSLHandshakeErrorTracker createSSLHandshakeErrorTracker ( ChannelData inputData ) { Map < Object , Object > bag = inputData . getPropertyBag ( ) ; boolean suppressHandshakeError = SSLChannelConstants . DEFAULT_HANDSHAKE_FAILURE ; Object value = bag . get ( SSLChannelProvider . SSL_CFG_SUPPRESS_HANDSHAKE_ERRORS ) ; if ( value != null ) { suppressHandshakeError = convertBooleanValue ( value ) ; } long maxLogEntries = SSLChannelConstants . DEFAULT_HANDSHAKE_FAILURE_STOP_LOGGING ; value = bag . get ( SSLChannelProvider . SSL_CFG_SUPPRESS_HANDSHAKE_ERRORS_COUNT ) ; if ( value != null ) { maxLogEntries = convertLongValue ( value ) ; } return new SSLHandshakeErrorTracker ( ! suppressHandshakeError , maxLogEntries ) ; } | Create an SSLHandshakeErrorTracker using the properties in the property bag . These properties may or may not be there if the channel is created programmatically and as such this provides defaults which the map will be created with . These defaults should match the defaults from metatype . |
25,486 | public SSLContext getSSLContextForInboundLink ( SSLConnectionLink link , VirtualConnection vc ) throws ChannelException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getSSLContextForInboundLink" ) ; } SSLContext context = getSSLContextForLink ( vc , this . inboundHost , this . inboundPort , this . endPointName , false , link ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getSSLContextForInboundLink" ) ; } return context ; } | This method is overloaded from the base class in order to determine the host and port of the connection required by the calls to the core security code which will eventually return an SSLContext to use . This is only used by inbound connections . |
25,487 | public SSLContext getSSLContextForOutboundLink ( SSLConnectionLink link , VirtualConnection vc , Object address ) throws ChannelException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getSSLContextForOutboundLink" ) ; } TCPConnectRequestContext tcpRequest = ( TCPConnectRequestContext ) address ; InetSocketAddress socket = tcpRequest . getRemoteAddress ( ) ; String protocol = Constants . ENDPOINT_HTTP ; String mapProtocol = ( String ) vc . getStateMap ( ) . get ( OutboundProtocol . PROTOCOL ) ; if ( mapProtocol != null ) { protocol = mapProtocol ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "OutboundProtocol=" + protocol + " specified by in VC" ) ; } } else { Object channelAccessor = ( ( OutboundVirtualConnection ) vc ) . getChannelAccessor ( ) ; if ( channelAccessor instanceof OutboundProtocol ) { protocol = ( ( OutboundProtocol ) channelAccessor ) . getProtocol ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "OutboundProtocol=" + protocol + " specified by " + channelAccessor . getClass ( ) . getName ( ) ) ; } } } SSLContext context = getSSLContextForLink ( vc , socket . getHostName ( ) , Integer . toString ( socket . getPort ( ) ) , protocol , Boolean . FALSE , link ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getSSLContextForOutboundLink" ) ; } return context ; } | This method is overloaded from the base class in order to determine the host and port of the connection required by the calls to the core security code which will eventually return an SSLContext to use . This is only used by outbound connections . |
25,488 | public int getTimeoutValueInSSLClosingHandshake ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "timeoutValueInSSLClosingHandshake : " + this . timeoutValueInSSLClosingHandshake ) ; } return this . timeoutValueInSSLClosingHandshake ; } | PI52696 - Timeout value for which the SSL closing handshake loop will attempt to complete final handshake write before giving up . |
25,489 | public void cleanUpState ( VirtualConnection vc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "cleanUpState" ) ; } SSLDiscriminatorState discState = ( SSLDiscriminatorState ) vc . getStateMap ( ) . remove ( SSL_DISCRIMINATOR_STATE ) ; closeEngine ( discState . getEngine ( ) ) ; WsByteBuffer decryptedNetBuffer = discState . getDecryptedNetBuffer ( ) ; if ( decryptedNetBuffer != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Releasing decryptedNetworkBuffer" ) ; } decryptedNetBuffer . release ( ) ; decryptedNetBuffer = null ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "cleanUpState" ) ; } } | This method will be called from the Channel Framework indicating that no further calls will be made to the discriminator . All data stored or allocated during previous discrimination calls on the input virtual connection should be cleaned up . |
25,490 | protected void onHandshakeFinish ( SSLEngine engine ) { SSLSessionContext context = null ; try { final SSLEngine localEngine = engine ; context = AccessController . doPrivileged ( new PrivilegedExceptionAction < SSLSessionContext > ( ) { public SSLSessionContext run ( ) throws Exception { return localEngine . getSession ( ) . getSessionContext ( ) ; } } ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) + ".onHandshakeFinish" , "814" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Exception querying sessioncontext; " + e ) ; } return ; } if ( null == context || context . equals ( this . sessionContext ) ) { return ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Channel [" + this + "] saving context: " + context ) ; } this . sessionContext = context ; context . setSessionCacheSize ( getConfig ( ) . getSSLSessionCacheSize ( ) ) ; context . setSessionTimeout ( getConfig ( ) . getSSLSessionTimeout ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Session cache size set to " + context . getSessionCacheSize ( ) ) ; Tr . debug ( tc , "Session timeout set to " + context . getSessionTimeout ( ) ) ; } } | Utility method to be called when an SSL handshake has finished . |
25,491 | private void closeEngine ( SSLEngine engine ) { if ( null != engine ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Closing discrimination engine" ) ; } engine . closeOutbound ( ) ; if ( ! engine . isInboundDone ( ) ) { try { engine . closeInbound ( ) ; } catch ( SSLException se ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Error closing inbound engine side; " + se ) ; } } } } } | Close the inbound and outbound sides of the engine created during the discrimination path . This engine was not used during an actual connection only the discrimination as such it has no data to flush . |
25,492 | private static void processFilters ( List < SpanFilter > filters , String pattern , String childNames , Class < ? extends SpanFilter > impl ) { final String methodName = "processFilters" ; try { SpanFilterType type = SpanFilterType . INCOMING ; boolean ignoreCase = false ; boolean regex = true ; SpanFilter filter = ( SpanFilter ) Class . forName ( impl . getName ( ) ) . getConstructor ( String . class , SpanFilterType . class , boolean . class , boolean . class ) . newInstance ( pattern , type , ignoreCase , regex ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName , "filter " + filter ) ; } filters . add ( filter ) ; } catch ( ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | SecurityException | IllegalArgumentException | InvocationTargetException e ) { throw new IllegalStateException ( e ) ; } } | Check the configuration for filters of a particular type . |
25,493 | public void addPersistentData ( HashMap hm ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addPersistentData" , hm ) ; hm . put ( "name" , definition . getName ( ) ) ; hm . put ( "uuid" , definition . getUUID ( ) . toByteArray ( ) ) ; hm . put ( "maxReliability" , Integer . valueOf ( definition . getMaxReliability ( ) . toInt ( ) ) ) ; hm . put ( "defaultReliability" , Integer . valueOf ( definition . getDefaultReliability ( ) . toInt ( ) ) ) ; hm . put ( "destinationType" , Integer . valueOf ( definition . getDestinationType ( ) . toInt ( ) ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addPersistentData" ) ; } | Add data to given object for message store persistence . |
25,494 | final BusGroup [ ] getAllBuses ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getAllBuses" ) ; SibTr . exit ( tc , "getAllBuses" , _buses ) ; } return _buses ; } | Gets the complete list of all buses |
25,495 | final Enumeration getAllNeighbours ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getAllNeighbours" ) ; } Enumeration allNeighbours = null ; synchronized ( _neighbours ) { allNeighbours = ( ( Hashtable ) _neighbours . clone ( ) ) . elements ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "getAllNeighbours" ) ; } return allNeighbours ; } | Gets the complete list of all Neighbours for this ME |
25,496 | final Enumeration getAllRecoveredNeighbours ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getAllRecoveredNeighbours" ) ; } Enumeration allRecoveredNeighbours = null ; synchronized ( _recoveredNeighbours ) { allRecoveredNeighbours = _recoveredNeighbours . elements ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "getAllRecoveredNeighbours" ) ; } return allRecoveredNeighbours ; } | Gets the complete list of all recoved Neighbours for this ME |
25,497 | void addTopicSpaceReference ( SIBUuid8 neighbourUuid , SIBUuid12 topicSpace , String topic , boolean warmRestarted ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addTopicSpaceReference" , new Object [ ] { neighbourUuid , topicSpace , topic , new Boolean ( warmRestarted ) } ) ; synchronized ( _topicSpaces ) { TemporarySubscription sub = ( TemporarySubscription ) _topicSpaces . get ( topicSpace ) ; Neighbour neighbour = null ; if ( warmRestarted ) { synchronized ( _recoveredNeighbours ) { neighbour = ( Neighbour ) _recoveredNeighbours . get ( neighbourUuid ) ; } } else neighbour = getNeighbour ( neighbourUuid ) ; MESubscription subscription = neighbour . getSubscription ( topicSpace , topic ) ; if ( sub == null ) { sub = new TemporarySubscription ( neighbourUuid , subscription ) ; _topicSpaces . put ( topicSpace , sub ) ; } else { sub . addTopic ( neighbourUuid , subscription ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addTopicSpaceReference" ) ; } | When the Destination manager doesn t know about a Destination the topic space reference is created here until either the proxy is deleted or the topic space is created . |
25,498 | void removeTopicSpaceReference ( SIBUuid8 neighbourUuid , MESubscription subscription , SIBUuid12 topicSpace , String topic ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeTopicSpaceReference" , new Object [ ] { neighbourUuid , subscription , topicSpace , topic } ) ; synchronized ( _topicSpaces ) { final TemporarySubscription sub = ( TemporarySubscription ) _topicSpaces . get ( topicSpace ) ; if ( sub == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "TemporarySubscription not found" ) ; } else { if ( sub . removeTopic ( neighbourUuid , subscription ) ) _topicSpaces . remove ( topicSpace ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeTopicSpaceReference" ) ; } | Removes the topic space reference for the given ME on the given topic . |
25,499 | void topicSpaceCreated ( DestinationHandler destination ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "topicSpaceCreated" , destination ) ; synchronized ( _topicSpaces ) { if ( _topicSpaces . containsKey ( destination . getUuid ( ) ) ) { final ArrayList topicSpacesCreated = new ArrayList ( ) ; final ArrayList topicsCreated = new ArrayList ( ) ; final TemporarySubscription tsubscription = ( TemporarySubscription ) _topicSpaces . get ( destination . getUuid ( ) ) ; final Iterator neighbourUuids = tsubscription . iMETopicList . keySet ( ) . iterator ( ) ; while ( neighbourUuids . hasNext ( ) ) { topicSpacesCreated . clear ( ) ; topicsCreated . clear ( ) ; final SIBUuid8 neighbourUuid = ( SIBUuid8 ) neighbourUuids . next ( ) ; final Iterator subscriptions = ( ( List ) tsubscription . iMETopicList . get ( neighbourUuid ) ) . iterator ( ) ; Neighbour neighbour = getNeighbour ( neighbourUuid ) ; boolean recoveredNeighbour = ( neighbour == null ) ; if ( neighbour == null ) { synchronized ( _recoveredNeighbours ) { neighbour = ( Neighbour ) _recoveredNeighbours . get ( neighbourUuid ) ; } } while ( subscriptions . hasNext ( ) ) { final MESubscription subscription = ( MESubscription ) subscriptions . next ( ) ; final boolean proxyCreated = createProxy ( neighbour , destination , subscription , destination . getUuid ( ) , subscription . getTopic ( ) , false ) ; try { if ( ! recoveredNeighbour ) subscription . eventPostCommitAdd ( null ) ; } catch ( SevereMessageStoreException e ) { } if ( proxyCreated ) { if ( ! recoveredNeighbour ) { topicSpacesCreated . add ( destination . getUuid ( ) ) ; topicsCreated . add ( subscription . getTopic ( ) ) ; } else { PubSubOutputHandler h = destination . getPubSubOutputHandler ( neighbour . getUUID ( ) ) ; neighbour . addPubSubOutputHandler ( h ) ; } } else { final SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.proxyhandler.Neighbours" , "1:463:1.113" } , null ) ) ; FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.proxyhandler.Neighbours.topicSpaceCreated" , "1:469:1.113" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "topicSpaceCreated" , e ) ; throw e ; } } _proxyHandler . subscribeEvent ( topicSpacesCreated , topicsCreated , neighbour . getBusId ( ) , null ) ; } _topicSpaces . remove ( destination . getUuid ( ) ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "No proxy subscriptions to register" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "topicSpaceCreated" ) ; } | If a topicSpace is created check through the list of proxies and register them against the real destination object |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.