idx
int64 0
165k
| question
stringlengths 73
4.15k
| target
stringlengths 5
918
| len_question
int64 21
890
| len_target
int64 3
255
|
|---|---|---|---|---|
159,400
|
public synchronized void resumeAssociation ( boolean allowSetRollback ) throws TRANSACTION_ROLLEDBACK { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resumeAssociation" , allowSetRollback ) ; // if another thread is active we have to wait // doSetRollback indicates if this method has marked the transaction for rollbackOnly // and if so TRANSACTION_ROLLEDBACK exception is thrown. boolean doSetRollback = false ; while ( _activeAssociations > _suspendedAssociations ) { doSetRollback = allowSetRollback ; try { if ( doSetRollback && ! _rollbackOnly ) setRollbackOnly ( ) ; } catch ( Exception ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.Transaction.JTA.TransactionImpl.resumeAssociation" , "1748" , this ) ; if ( traceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setRollbackOnly threw exception" , ex ) ; // swallow this exception } try { wait ( ) ; } // woken up by removeAssociation catch ( InterruptedException iex ) { /* no ffdc */ } } // end while _suspendedAssociations -- ; if ( doSetRollback ) { if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resumeAssociation throwing rolledback" ) ; throw new TRANSACTION_ROLLEDBACK ( "Context already active" ) ; } if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resumeAssociation" ) ; }
|
This polices the single threaded operation of the transaction . allowSetRollback indicates whether the condition where there is already an active association should result in rolling back the transaction .
| 377
| 34
|
159,401
|
@ Override public synchronized void addAssociation ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "addAssociation" ) ; if ( _activeAssociations > _suspendedAssociations ) { if ( traceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "addAssociation received incoming request for active context" ) ; try { setRollbackOnly ( ) ; } catch ( Exception ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.Transaction.JTA.TransactionImpl.addAssociation" , "1701" , this ) ; if ( traceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setRollbackOnly threw exception" , ex ) ; // swallow this exception } if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "addAssociation throwing rolledback" ) ; throw new TRANSACTION_ROLLEDBACK ( "Context already active" ) ; } stopInactivityTimer ( ) ; _activeAssociations ++ ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "addAssociation" ) ; }
|
Called by interceptor when incoming request arrives . This polices the single threaded operation of the transaction .
| 280
| 21
|
159,402
|
@ Override public synchronized void removeAssociation ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "removeAssociation" ) ; _activeAssociations -- ; if ( _activeAssociations <= 0 ) { startInactivityTimer ( ) ; } else { _mostRecentThread . pop ( ) ; } notifyAll ( ) ; //LIDB1673.23 if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "removeAssociation" ) ; }
|
Called by interceptor when reply is sent . This updates the server association count for this context .
| 132
| 20
|
159,403
|
@ Override public void enlistAsyncResource ( String xaResFactoryFilter , Serializable xaResInfo , Xid xid ) throws SystemException // @LIDB1922-5C { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "enlistAsyncResource (SPI): args: " , new Object [ ] { xaResFactoryFilter , xaResInfo , xid } ) ; try { final WSATAsyncResource res = new WSATAsyncResource ( xaResFactoryFilter , xaResInfo , xid ) ; final WSATParticipantWrapper wrapper = new WSATParticipantWrapper ( res ) ; getResources ( ) . addAsyncResource ( wrapper ) ; } finally { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "enlistAsyncResource (SPI)" ) ; } }
|
Enlist an asynchronous resource with the target TransactionImpl object . A WSATParticipantWrapper is typically a representation of a downstream WSAT subordinate server .
| 186
| 31
|
159,404
|
public synchronized void inactivityTimeout ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "inactivityTimeout" , this ) ; _inactivityTimerActive = false ; if ( _inactivityTimer != null ) { try { // important that this runs as part of synchronized block // to prevent context being re-imported while processing. _inactivityTimer . alarm ( ) ; } catch ( Throwable exc ) { FFDCFilter . processException ( exc , "com.ibm.ws.tx.jta.TransactionImpl.inactivityTimeout" , "2796" , this ) ; if ( traceOn && tc . isEventEnabled ( ) ) Tr . event ( tc , "exception caught in inactivityTimeout" , exc ) ; // swallow } finally { _inactivityTimer = null ; } } else { if ( _activeAssociations <= 0 ) // off server ... do the rollback { final EmbeddableTranManagerSet tranManager = ( EmbeddableTranManagerSet ) TransactionManagerFactory . getTransactionManager ( ) ; try { // resume this onto the current thread and roll it back tranManager . resume ( this ) ; // PK15024 // If there is a superior server involved in this transaction, make sure it is told about this inactivity timeout. try { tranManager . setRollbackOnly ( ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.Transaction.JTA.TransactionImpl.inactivityTimeout" , "4353" , this ) ; if ( traceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "inactivityTimeout setRollbackOnly threw exception" , e ) ; } // Mark it so that a bean on the superior server can test its status on return. // PK15024 tranManager . rollback ( ) ; } catch ( Exception ex ) { if ( traceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "inactivityTimeout resume/rollback threw exception" , ex ) ; // swallow this exception // main timeout may have already rolled back! } } } if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "inactivityTimeout" ) ; }
|
Called by the timeout manager when inactivity timer expires . Needs to be synchronized as it may interfere with normal timeout .
| 505
| 24
|
159,405
|
synchronized ConsumerSessionImpl get ( long id ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "get" , new Long ( id ) ) ; ConsumerSessionImpl consumer = null ; if ( _messageProcessor . isStarted ( ) ) { consumer = ( ConsumerSessionImpl ) _consumers . get ( new Long ( id ) ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "get" , consumer ) ; return consumer ; }
|
Gets a consumer using its id .
| 112
| 8
|
159,406
|
synchronized void add ( ConsumerSessionImpl consumer ) { consumer . setId ( _consumerCount ) ; if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "add" , new Long ( consumer . getIdInternal ( ) ) ) ; _consumers . put ( new Long ( _consumerCount ) , consumer ) ; _consumerCount ++ ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "add" ) ; }
|
Adds a consumer to the list of Consumers that this messaging engine contains
| 103
| 13
|
159,407
|
private static Collection < String > getFromAppliesTo ( final Asset asset , final AppliesToFilterGetter getter ) { Collection < AppliesToFilterInfo > atfis = asset . getWlpInformation ( ) . getAppliesToFilterInfo ( ) ; Collection < String > ret = new ArrayList < String > ( ) ; if ( atfis != null ) { for ( AppliesToFilterInfo at : atfis ) { if ( at != null ) { String val = getter . getValue ( at ) ; if ( val != null ) { ret . add ( val ) ; } } } } return ret ; }
|
Utility method to cycle through the applies to filters info and collate the values found
| 136
| 17
|
159,408
|
@ Activate protected void activate ( ComponentContext ctx , Map < String , Object > properties ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "activate" , properties ) ; } if ( isEnabled ( ) ) { loadMaps ( properties ) ; } else { Tr . error ( tc , "SF_ERROR_NOT_ENABLED" ) ; } }
|
to be deleted
| 95
| 3
|
159,409
|
private void updateCacheState ( Map < String , Object > props ) { getAuthenticationConfig ( props ) ; if ( cacheEnabled ) { authCacheServiceRef . activate ( cc ) ; } else { authCacheServiceRef . deactivate ( cc ) ; } }
|
Based on the configuration properties the auth cache should either be active or not .
| 55
| 15
|
159,410
|
private ReentrantLock optionallyObtainLockedLock ( AuthenticationData authenticationData ) { ReentrantLock currentLock = null ; if ( isAuthCacheServiceAvailable ( ) ) { currentLock = authenticationGuard . requestAccess ( authenticationData ) ; currentLock . lock ( ) ; } return currentLock ; }
|
This method will try to obtain a lock from the authentication guard based on the given authentication data and lock it . If an equals authentication data on another thread is received for which a lock already exists this method will block that another thread until the first thread relinquishes the lock . This allows having locking based on authentication data instead of blindly locking all access . The intention is to NOT allow multiple concurrent JAAS logins for the same authentication data in order to be able to correctly represent the user with the same runtime subject for the same data better manage caching and to prevent cycles doing logins for which potentially many of the results will be discarded .
| 64
| 126
|
159,411
|
@ Override public Subject delegate ( String roleName , String appName ) { Subject runAsSubject = getRunAsSubjectFromProvider ( roleName , appName ) ; return runAsSubject ; }
|
Gets the delegation subject based on the currently configured delegation provider or the MethodDelegationProvider if one is not configured .
| 41
| 25
|
159,412
|
static private StringBuilder determineType ( String name , Object o ) { String value = null ; if ( o instanceof String || o instanceof StringBuffer || o instanceof java . nio . CharBuffer || o instanceof Integer || o instanceof Long || o instanceof Byte || o instanceof Double || o instanceof Float || o instanceof Short || o instanceof BigInteger || o instanceof java . math . BigDecimal ) { value = o . toString ( ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Skipping class: " + o . getClass ( ) ) ; } return null ; } // type="class" name="o" StringBuilder buffer = new StringBuilder ( 48 ) ; buffer . append ( name ) ; buffer . append ( "type=\"" ) ; // charbuffer is abstract so we might get HeapCharBuffer here, force it // to the generic layer in the XML output if ( o instanceof java . nio . CharBuffer ) { buffer . append ( "java.nio.CharBuffer" ) ; } else { buffer . append ( o . getClass ( ) . getName ( ) ) ; } buffer . append ( "\" " ) ; buffer . append ( name ) ; buffer . append ( "=\"" ) ; buffer . append ( value ) ; buffer . append ( "\"" ) ; return buffer ; }
|
Determine the type of the Object passed in and add the XML format for the result .
| 310
| 19
|
159,413
|
static private StringBuilder serializeChannel ( StringBuilder buffer , OutboundChannelDefinition ocd , int order ) throws NotSerializableException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Serializing channel: " + order + " " + ocd . getOutboundFactory ( ) . getName ( ) ) ; } buffer . append ( " <channel order=\"" ) ; buffer . append ( order ) ; buffer . append ( "\" factory=\"" ) ; buffer . append ( ocd . getOutboundFactory ( ) . getName ( ) ) ; buffer . append ( "\">\n" ) ; Map < Object , Object > props = ocd . getOutboundChannelProperties ( ) ; if ( null != props ) { for ( Entry < Object , Object > entry : props . entrySet ( ) ) { if ( null == entry . getValue ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Property value [" + entry . getKey ( ) + "] is null, " + ocd . toString ( ) ) ; } throw new NotSerializableException ( "Property value for [" + entry . getKey ( ) + "] is null" ) ; } // TODO should pass around the one big stringbuffer instead // of creating all these intermediate ones StringBuilder kBuff = determineType ( "key" , entry . getKey ( ) ) ; if ( null != kBuff ) { StringBuilder vBuff = determineType ( "value" , entry . getValue ( ) ) ; if ( null != vBuff ) { buffer . append ( " <property " ) ; buffer . append ( kBuff ) ; buffer . append ( " " ) ; buffer . append ( vBuff ) ; buffer . append ( "/>\n" ) ; } } } } buffer . append ( " </channel>\n" ) ; return buffer ; }
|
Method to serialize a given channel object into the overall output buffer .
| 429
| 14
|
159,414
|
static public String serialize ( CFEndPoint point ) throws NotSerializableException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "serialize" ) ; } if ( null == point ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Null CFEndPoint input for serialization" ) ; } throw new NotSerializableException ( "Null input" ) ; } // start the end point with name/host/port StringBuilder buffer = new StringBuilder ( 512 ) ; buffer . append ( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Serializing endpoint: " + point . getName ( ) ) ; } buffer . append ( "<cfendpoint name=\"" ) ; buffer . append ( point . getName ( ) ) ; buffer . append ( "\" host=\"" ) ; buffer . append ( point . getAddress ( ) . getCanonicalHostName ( ) ) ; buffer . append ( "\" port=\"" ) ; buffer . append ( point . getPort ( ) ) ; buffer . append ( "\" local=\"" ) ; buffer . append ( point . isLocal ( ) ) ; buffer . append ( "\" ssl=\"" ) ; buffer . append ( point . isSSLEnabled ( ) ) ; buffer . append ( "\">\n" ) ; // loop through each channel in the list int i = 0 ; for ( OutboundChannelDefinition def : point . getOutboundChannelDefs ( ) ) { buffer = serializeChannel ( buffer , def , i ++ ) ; } buffer . append ( "</cfendpoint>" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Serialized string: \n" + buffer . toString ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "serialize" ) ; } return buffer . toString ( ) ; }
|
Method to serialize the given end point object into an XML string .
| 497
| 14
|
159,415
|
public MessageStore getOwningMessageStore ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( this , tc , "getOwningMessageStore" ) ; SibTr . exit ( this , tc , "getOwningMessageStore" , "return=" + _ms ) ; } return _ms ; }
|
This method is used to check the MessageStore instance that an implementing transaction object originated from . This is used to check that a transaction is being used to add Items to the same MessageStore as that it came from .
| 84
| 43
|
159,416
|
protected void createRealizationAndState ( MessageProcessor messageProcessor , TransactionCommon transaction ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createRealizationAndState" , new Object [ ] { messageProcessor , transaction } ) ; /* * Create associated protocol suppor of appropriate type */ if ( isPubSub ( ) ) { _pubSubRealization = new PubSubRealization ( this , messageProcessor , getLocalisationManager ( ) , transaction ) ; _protoRealization = _pubSubRealization ; } else { _ptoPRealization = new JSPtoPRealization ( this , messageProcessor , getLocalisationManager ( ) ) ; _protoRealization = _ptoPRealization ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createRealizationAndState" ) ; }
|
Cold start version of method to create state associated with Destination .
| 221
| 12
|
159,417
|
public void deleteMsgsWithNoReferences ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteMsgsWithNoReferences" ) ; if ( null != _pubSubRealization ) //doing a sanity check with checking for not null _pubSubRealization . deleteMsgsWithNoReferences ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteMsgsWithNoReferences" ) ; }
|
This method deletes the messages which are not having any references . Previously these messages were deleted during ME startup in reconstitute method . This method is called from DeletePubSubMsgsThread context
| 121
| 39
|
159,418
|
public final synchronized AnycastOutputHandler getAnycastOutputHandler ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getAnycastOutputHandler" ) ; AnycastOutputHandler aoh = null ; if ( _ptoPRealization != null ) aoh = _ptoPRealization . getAnycastOutputHandler ( definition , false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getAnycastOutputHandler" , aoh ) ; return aoh ; }
|
Called to get the AnycastOutputHandler for this Destination
| 140
| 12
|
159,419
|
public Object [ ] getPostReconstitutePseudoIds ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getPostReconstitutePseudoIds" ) ; Object [ ] result = _protoRealization . getRemoteSupport ( ) . getPostReconstitutePseudoIds ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getPostReconstitutePseudoIds" , result ) ; return result ; }
|
Returns an array of all pseudoDestination UUIDs which should be mapped to this BaseDestinationHandler . This method is used by the DestinationManager to determine what pseudo references need to be added after a destination is reconstituted .
| 143
| 48
|
159,420
|
protected void addPubSubLocalisation ( LocalizationDefinition destinationLocalizationDefinition ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addPubSubLocalisation" , new Object [ ] { destinationLocalizationDefinition } ) ; _pubSubRealization . addPubSubLocalisation ( destinationLocalizationDefinition ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addPubSubLocalisation" ) ; }
|
Add PubSubLocalisation .
| 123
| 6
|
159,421
|
public void setRemote ( boolean hasRemote ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setRemote" , Boolean . valueOf ( hasRemote ) ) ; getLocalisationManager ( ) . setRemote ( hasRemote ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setRemote" ) ; }
|
Do we have a remote localisation?
| 104
| 8
|
159,422
|
public void setLocal ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setLocal" ) ; getLocalisationManager ( ) . setLocal ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setLocal" ) ; }
|
Do we have a local localisation?
| 90
| 8
|
159,423
|
public boolean isToBeIgnored ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isToBeIgnored" ) ; SibTr . exit ( tc , "isToBeIgnored" , Boolean . valueOf ( _toBeIgnored ) ) ; } return _toBeIgnored ; }
|
Are we ignoring this destination handler due to corruption?
| 87
| 10
|
159,424
|
PtoPXmitMsgsItemStream getXmitQueuePoint ( SIBUuid8 meUuid ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getXmitQueuePoint" , meUuid ) ; PtoPXmitMsgsItemStream stream = getLocalisationManager ( ) . getXmitQueuePoint ( meUuid ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getXmitQueuePoint" , stream ) ; return stream ; }
|
Return the itemstream representing a transmit queue to a remote ME
| 140
| 12
|
159,425
|
private void eventMessageExpiryNotification ( SIMPMessage msg , TransactionCommon tran ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "eventMessageExpiryNotification" , new Object [ ] { msg , tran } ) ; // If a ReportHandler object has not been created yet, then do so. if ( _reportHandler == null ) _reportHandler = new ReportHandler ( messageProcessor ) ; // Generate and send the report under the same transaction as the delete try { _reportHandler . handleMessage ( msg , tran , SIApiConstants . REPORT_EXPIRY ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.BaseDestinationHandler.eventMessageExpiryNotification" , "1:3778:1.700.3.45" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "eventMessageExpiryNotification" , "SIResourceException" ) ; throw new SIResourceException ( nls . getFormattedMessage ( "REPORT_MESSAGE_ERROR_CWSIP0422" , new Object [ ] { messageProcessor . getMessagingEngineName ( ) , e } , null ) , e ) ; } /** * 463584 * If this message has been restored from msgstore but this destination has been recreated * in admin thus a different destination uuid and diferent BDH instance the stats object will be null. * It only gets initialized during the create/updateLocalisations call. This call will never happen * on this BDH. * Therefore... If a destination has been recreated, the stats on expiry will no longer be valid. */ if ( _protoRealization != null ) _protoRealization . onExpiryReport ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "eventMessageExpiryNotification" ) ; }
|
This is a callback required for expiry notification . For example we generate a report message here if expiry reports are requested .
| 487
| 25
|
159,426
|
public String constructPseudoDurableDestName ( String subName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "constructPseudoDurableDestName" , subName ) ; String psuedoDestName = constructPseudoDurableDestName ( messageProcessor . getMessagingEngineUuid ( ) . toString ( ) , subName ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "constructPseudoDurableDestName" , psuedoDestName ) ; return psuedoDestName ; }
|
Creates the pseudo destination name string for remote durable subscriptions . The case when this local ME is the DME .
| 153
| 23
|
159,427
|
public String constructPseudoDurableDestName ( String meUUID , String durableName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "constructPseudoDurableDestName" , new Object [ ] { meUUID , durableName } ) ; String returnString = meUUID + "##" + durableName ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "constructPseudoDurableDestName" , returnString ) ; return returnString ; }
|
Creates the pseudo destination name string for remote durable subscriptions . The case when the the DME is remote to this ME .
| 139
| 25
|
159,428
|
public AnycastOutputHandler getAnycastOHForPseudoDest ( String destName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getAnycastOHForPseudoDest" , destName ) ; AnycastOutputHandler returnAOH = _pubSubRealization . getRemotePubSubSupport ( ) . getAnycastOHForPseudoDest ( destName ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getAnycastOHForPseudoDest" , returnAOH ) ; return returnAOH ; }
|
Durable subscriptions homed on this ME but attached to from remote MEs have AnycastOutputHandlers mapped by their pseudo destination names .
| 153
| 28
|
159,429
|
void sendCODMessage ( SIMPMessage msg , TransactionCommon tran ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendCODMessage" , new Object [ ] { msg , tran } ) ; // If COD Report messages are required, this is when we need to create and // send them. if ( msg . getReportCOD ( ) != null ) { // Create the ReportHandler object if not already created if ( _reportHandler == null ) _reportHandler = new ReportHandler ( messageProcessor ) ; try { _reportHandler . handleMessage ( msg , tran , SIApiConstants . REPORT_COD ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.BaseDestinationHandler.sendCODMessage" , "1:3909:1.700.3.45" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "sendCODMessage" , "SIResourceException" ) ; throw new SIResourceException ( nls . getFormattedMessage ( "REPORT_MESSAGE_ERROR_CWSIP0423" , new Object [ ] { messageProcessor . getMessagingEngineName ( ) , e } , null ) , e ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "sendCODMessage" ) ; }
|
Method sendCODMessage . Initializes the reportHandler and sends a COD message if appropriate
| 369
| 19
|
159,430
|
@ Override public void announceMPStopping ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "announceMPStopping" ) ; if ( isPubSub ( ) ) { if ( null != _pubSubRealization ) { //doing a sanity check with checking for not null //signal to _pubSubRealization to gracefully exit from deleteMsgsWithNoReferences() _pubSubRealization . stopDeletingMsgsWihoutReferencesTask ( true ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "announceMPStopping" ) ; }
|
MP is stopping . All mediation activity should stop also .
| 162
| 11
|
159,431
|
@ Override public void stop ( int mode ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stop" , Integer . valueOf ( mode ) ) ; // Deregister the destination deregisterDestination ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "stop" ) ; }
|
Stop anything that needs stopping like mediations .. etc .
| 102
| 11
|
159,432
|
public int createDurableFromRemote ( String subName , SelectionCriteria criteria , String user , boolean isCloned , boolean isNoLocal , boolean isSIBServerSubject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createDurableFromRemote" , new Object [ ] { subName , criteria , user , Boolean . valueOf ( isSIBServerSubject ) } ) ; int status = DurableConstants . STATUS_OK ; // Create a ConsumerDispatcherState for the local call ConsumerDispatcherState subState = new ConsumerDispatcherState ( subName , definition . getUUID ( ) , criteria , isNoLocal , messageProcessor . getMessagingEngineName ( ) , definition . getName ( ) , getBus ( ) ) ; // Set the security id into the CD state subState . setUser ( user , isSIBServerSubject ) ; //defect 259036 - we need to enable sharing of the durable subscription subState . setIsCloned ( isCloned ) ; try { _pubSubRealization . createLocalDurableSubscription ( subState , null ) ; } catch ( SIDurableSubscriptionAlreadyExistsException e ) { // No FFDC code needed status = DurableConstants . STATUS_SUB_ALREADY_EXISTS ; } catch ( Throwable e ) { // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.BaseDestinationHandler.createDurableFromRemote" , "1:4436:1.700.3.45" , this ) ; // FFDC keeps the local broker happy, but we still need to return // a status to keep the remote ME live. status = DurableConstants . STATUS_SUB_GENERAL_ERROR ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createDurableFromRemote" , Integer . valueOf ( status ) ) ; return status ; }
|
Handle a remote request to create a local durable subscription .
| 458
| 11
|
159,433
|
@ Override public JsDestinationAddress getRoutingDestinationAddr ( JsDestinationAddress inAddress , boolean fixedMessagePoint ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getRoutingDestinationAddr" , new Object [ ] { this , inAddress , Boolean . valueOf ( fixedMessagePoint ) } ) ; JsDestinationAddress routingAddress = null ; // Pull out any encoded ME from a system or temporary queue SIBUuid8 encodedME = null ; if ( _isSystem || _isTemporary ) encodedME = SIMPUtils . parseME ( inAddress . getDestinationName ( ) ) ; // If this is a system or temporary queue that is located on a different ME to us // we need to set the actual address as the routing destination. if ( ( encodedME != null ) && ! ( encodedME . equals ( getMessageProcessor ( ) . getMessagingEngineUuid ( ) ) ) ) { routingAddress = inAddress ; } // The only other reason for setting a routing destination is if the sender is bound // (or will be bound) to a single message point. In which case we use the routing // address to transmit the chosen ME (added later by the caller) else if ( fixedMessagePoint ) { //TODO what if inAddres is isLocalOnly() or already has an ME? routingAddress = _destinationAddr ; } else if ( ( inAddress != null ) && ( inAddress . getME ( ) != null ) ) { routingAddress = _destinationAddr ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getRoutingDestinationAddr" , routingAddress ) ; return routingAddress ; }
|
Being a real destination there is no implicit need to add a routing destination address to any messages sent to this destination . However if the sender is bound to a single message point then we need to set a routing destination so that a particular ME Uuid can be set into it . Another reason for setting a routing address is if we re sending to a remote system or temporary queue
| 405
| 74
|
159,434
|
public void deleteRemoteDurableDME ( String subName ) throws SIRollbackException , SIConnectionLostException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteRemoteDurableDME" , new Object [ ] { subName } ) ; _pubSubRealization . getRemotePubSubSupport ( ) . deleteRemoteDurableDME ( subName ) ; // All done, return if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteRemoteDurableDME" ) ; }
|
Clean up the local AnycastOutputHandler that was created to handle access to a locally homed durable subscription . This method should only be invoked as part of ConsumerDispatcher . deleteConsumerDispatcher .
| 152
| 42
|
159,435
|
public void requestReallocation ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "requestReallocation" ) ; if ( ! isCorruptOrIndoubt ( ) ) { //PK73754 // Reset reallocation flag under lock on the BDH. synchronized ( this ) { _isToBeReallocated = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "requestReallocation" , "Have set reallocation flag" ) ; } // Set cleanup_pending state destinationManager . getDestinationIndex ( ) . cleanup ( this ) ; destinationManager . startAsynchDeletion ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "requestReallocation" ) ; }
|
Request reallocation of transmitQs on the next asynch deletion thread run
| 212
| 17
|
159,436
|
@ Override public boolean isTopicAccessCheckRequired ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isTopicAccessCheckRequired" ) ; if ( ! isPubSub ( ) || isTemporary ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isTopicAccessCheckRequired" , Boolean . FALSE ) ; return false ; } boolean check = super . isTopicAccessCheckRequired ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isTopicAccessCheckRequired" , Boolean . valueOf ( check ) ) ; return check ; // Look to the underlying definition }
|
Override Method in AbstractBaseDestinationHandler
| 182
| 8
|
159,437
|
public boolean removeAnycastInputHandlerAndRCD ( String key ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeAnycastInputHandlerAndRCD" , key ) ; boolean removed = _protoRealization . getRemoteSupport ( ) . removeAnycastInputHandlerAndRCD ( key ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "removeAnycastInputHandlerAndRCD" , Boolean . valueOf ( removed ) ) ; return removed ; }
|
Removes the AIH and the RCD instances for a given dme ID . Also removes the itemStreams from the messageStore for the aiContainerItemStream and the rcdItemStream
| 144
| 40
|
159,438
|
public void closeRemoteConsumer ( SIBUuid8 dmeUuid ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "closeRemoteConsumer" , dmeUuid ) ; _protoRealization . getRemoteSupport ( ) . closeRemoteConsumers ( dmeUuid ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "closeRemoteConsumer" ) ; return ; }
|
Close the remote consumers for a given remote ME
| 120
| 9
|
159,439
|
public PubSubRealization getPubSubRealization ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getPubSubRealization" ) ; SibTr . exit ( tc , "getPubSubRealization" , _pubSubRealization ) ; } return _pubSubRealization ; }
|
Retrieve the PubSubRealization
| 84
| 7
|
159,440
|
public PtoPRealization getPtoPRealization ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getPtoPRealization" ) ; SibTr . exit ( tc , "getPtoPRealization" , _ptoPRealization ) ; } return _ptoPRealization ; }
|
Retrieve the PtoPRealization
| 90
| 8
|
159,441
|
public AbstractProtoRealization getProtocolRealization ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getProtocolRealization" ) ; SibTr . exit ( tc , "getProtocolRealization" , _protoRealization ) ; } return _protoRealization ; }
|
Retrieve the ProtocolRealization
| 85
| 6
|
159,442
|
public LocalisationManager getLocalisationManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getLocalisationManager" , this ) ; // Instantiate LocalisationManager to manage localisations and interface to WLM if ( _localisationManager == null ) { _localisationManager = new LocalisationManager ( this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getLocalisationManager" , _localisationManager ) ; return _localisationManager ; }
|
Retrieve the LocalisationManager
| 138
| 6
|
159,443
|
protected void setByteArrayValue ( byte [ ] input ) { this . sValue = null ; this . bValue = input ; this . offset = 0 ; this . valueLength = input . length ; if ( ELEM_ADDED != this . status ) { this . status = ELEM_CHANGED ; } }
|
Set the byte array value to the given input .
| 68
| 10
|
159,444
|
protected void setByteArrayValue ( byte [ ] input , int offset , int length ) { if ( ( offset + length ) > input . length ) { throw new IllegalArgumentException ( "Invalid length: " + offset + "+" + length + " > " + input . length ) ; } this . sValue = null ; this . bValue = input ; this . offset = offset ; this . valueLength = length ; if ( ELEM_ADDED != this . status ) { this . status = ELEM_CHANGED ; } }
|
Set the byte array value of this header based on the input array but starting at the input offset into that array and with the given length .
| 115
| 28
|
159,445
|
protected void setStringValue ( String input ) { this . bValue = null ; this . sValue = input ; this . offset = 0 ; this . valueLength = ( null == input ) ? 0 : input . length ( ) ; if ( ELEM_ADDED != this . status ) { this . status = ELEM_CHANGED ; } }
|
Set the string value to the given input .
| 75
| 9
|
159,446
|
protected void updateLastCRLFInfo ( int index , int pos , boolean isCR ) { this . lastCRLFBufferIndex = index ; this . lastCRLFPosition = pos ; this . lastCRLFisCR = isCR ; }
|
Set the relevant information for the CRLF position information from the parsing code .
| 54
| 16
|
159,447
|
protected void destroy ( ) { this . nextSequence = null ; this . prevSequence = null ; this . bValue = null ; this . sValue = null ; this . buffIndex = - 1 ; this . offset = 0 ; this . valueLength = 0 ; this . myHashCode = - 1 ; this . lastCRLFBufferIndex = - 1 ; this . lastCRLFisCR = false ; this . lastCRLFPosition = - 1 ; this . status = ELEM_ADDED ; this . myOwner . freeElement ( this ) ; }
|
Perform cleanup when this object is no longer needed .
| 122
| 11
|
159,448
|
public Properties getHeader ( RepositoryLogRecord record ) { if ( ! headerMap . containsKey ( record ) ) { throw new IllegalArgumentException ( "Record was not return by an iterator over this instance" ) ; } return headerMap . get ( record ) ; }
|
Returns header information for the server this record was created on .
| 57
| 12
|
159,449
|
@ Trivial public static URL createWSJPAURL ( URL url ) throws MalformedURLException { if ( url == null ) { return null ; } // Encode the URL to be embedded into the wsjpa URL's path final String encodedURLPathStr = encode ( url . toExternalForm ( ) ) ; URL returnURL ; try { returnURL = AccessController . doPrivileged ( new PrivilegedExceptionAction < URL > ( ) { @ Override @ Trivial public URL run ( ) throws MalformedURLException { return new URL ( WSJPA_PROTOCOL_NAME + ":" + encodedURLPathStr ) ; } } ) ; } catch ( PrivilegedActionException e ) { throw ( MalformedURLException ) e . getException ( ) ; } return returnURL ; }
|
Encapsulates the specified URL within a wsjpa URL .
| 177
| 14
|
159,450
|
@ Trivial public static URL extractEmbeddedURL ( URL url ) throws MalformedURLException { if ( url == null ) { return null ; } if ( ! url . getProtocol ( ) . equalsIgnoreCase ( WSJPA_PROTOCOL_NAME ) ) { throw new IllegalArgumentException ( "The specified URL \"" + url + "\" does not use the \"" + WSJPA_PROTOCOL_NAME + "\" protocol." ) ; } String encodedPath = url . getPath ( ) ; if ( encodedPath == null || encodedPath . trim ( ) . equals ( "" ) ) { throw new IllegalArgumentException ( "The specified URL \"" + url + "\" is missing path information." ) ; } final String decodedPath = decode ( encodedPath ) ; try { return AccessController . doPrivileged ( new PrivilegedExceptionAction < URL > ( ) { @ Override @ Trivial public URL run ( ) throws MalformedURLException { return new URL ( decodedPath ) ; } } ) ; } catch ( PrivilegedActionException e ) { throw ( MalformedURLException ) e . getException ( ) ; } }
|
Extracts the embedded URL from the provided wsjpa protocoled URL .
| 257
| 17
|
159,451
|
@ Trivial private static String encode ( String s ) { if ( s == null ) { return null ; } // Throw an IllegalArgumentException if "%21" is already present in the String if ( s . contains ( "%21" ) ) { throw new IllegalArgumentException ( "WSJPAURLUtils.encode() cannot encode Strings containing \"%21\"." ) ; } return s . replace ( "!" , "%21" ) ; }
|
Private method that substitutes ! characters with its escaped code %21 .
| 98
| 13
|
159,452
|
@ Trivial private static String decode ( String s ) { if ( s == null ) { return null ; } return s . replace ( "%21" , "!" ) ; }
|
Private method that substitutes the escape code %21 with the ! character .
| 38
| 14
|
159,453
|
@ Override public ValidationMode getValidationMode ( ) { // Convert this ValidationMode from the class defined // in JAXB (com.ibm.ws.jpa.pxml20.PersistenceUnitValidationModeType) // to JPA (javax.persistence.ValidationMode). ValidationMode rtnMode = null ; PersistenceUnitValidationModeType jaxbMode = null ; jaxbMode = ivPUnit . getValidationMode ( ) ; if ( jaxbMode == PersistenceUnitValidationModeType . AUTO ) { rtnMode = ValidationMode . AUTO ; } else if ( jaxbMode == PersistenceUnitValidationModeType . CALLBACK ) { rtnMode = ValidationMode . CALLBACK ; } else if ( jaxbMode == PersistenceUnitValidationModeType . NONE ) { rtnMode = ValidationMode . NONE ; } return rtnMode ; }
|
Gets the value of the validationMode property .
| 208
| 10
|
159,454
|
public static void setServiceProviderFinder ( ExternalContext ectx , ServiceProviderFinder slp ) { ectx . getApplicationMap ( ) . put ( SERVICE_PROVIDER_KEY , slp ) ; }
|
Set a ServiceProviderFinder to the current application to locate SPI service providers used by MyFaces .
| 45
| 21
|
159,455
|
private static ServiceProviderFinder _getServiceProviderFinderFromInitParam ( ExternalContext context ) { String initializerClassName = context . getInitParameter ( SERVICE_PROVIDER_FINDER_PARAM ) ; if ( initializerClassName != null ) { try { // get Class object Class < ? > clazz = ClassUtils . classForName ( initializerClassName ) ; if ( ! ServiceProviderFinder . class . isAssignableFrom ( clazz ) ) { throw new FacesException ( "Class " + clazz + " does not implement ServiceProviderFinder" ) ; } // create instance and return it return ( ServiceProviderFinder ) ClassUtils . newInstance ( clazz ) ; } catch ( ClassNotFoundException cnfe ) { throw new FacesException ( "Could not find class of specified ServiceProviderFinder" , cnfe ) ; } } return null ; }
|
Gets a ServiceProviderFinder from the web . xml config param .
| 193
| 15
|
159,456
|
public void psSetBytes ( PreparedStatement pstmtImpl , int i , byte [ ] x ) throws SQLException { pstmtImpl . setBytes ( i , x ) ; }
|
Allow for special handling of Oracle prepared statement setBytes This method just does the normal setBytes call Oracle helper overrides it
| 42
| 24
|
159,457
|
public void psSetString ( PreparedStatement pstmtImpl , int i , String x ) throws SQLException { pstmtImpl . setString ( i , x ) ; }
|
Allow for special handling of Oracle prepared statement setString This method just does the normal setString call Oracle helper overrides it
| 40
| 24
|
159,458
|
public void resetClientInformation ( WSRdbManagedConnectionImpl mc ) throws SQLException { if ( mc . mcf . jdbcDriverSpecVersion >= 40 && ( mc . clientInfoExplicitlySet || mc . clientInfoImplicitlySet ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "resetClientInformation" , mc ) ; try { mc . sqlConn . setClientInfo ( mc . mcf . defaultClientInfo ) ; mc . clientInfoExplicitlySet = false ; mc . clientInfoImplicitlySet = false ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , getClass ( ) . getName ( ) + "resetClientInformation" , "780" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "resetClientInformation" , ex ) ; throw AdapterUtil . mapSQLException ( ex , mc ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "resetClientInformation" ) ; } }
|
This method is used to reset the client information on the backend database connection . Information will be reset only if it has been set .
| 275
| 26
|
159,459
|
public ConnectionResults getPooledConnection ( final CommonDataSource ds , String userName , String password , final boolean is2Phase , final WSConnectionRequestInfoImpl cri , boolean useKerberos , Object gssCredential ) throws ResourceException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getPooledConnection" , AdapterUtil . toString ( ds ) , userName , "******" , is2Phase ? "two-phase" : "one-phase" , cri , useKerberos , gssCredential ) ; // if kerberose is set then issue a warning that no special APIs are used instead, // a getConnection() without username/password will be used. // to get a connection. if ( useKerberos ) { Tr . warning ( tc , "KERBEROS_NOT_SUPPORTED_WARNING" ) ; } try { final String user = userName == null ? null : userName . trim ( ) ; final String pwd = password == null ? null : password . trim ( ) ; PooledConnection pConn = AccessController . doPrivileged ( new PrivilegedExceptionAction < PooledConnection > ( ) { public PooledConnection run ( ) throws SQLException { boolean buildConnection = cri . ivShardingKey != null || cri . ivSuperShardingKey != null ; if ( is2Phase ) if ( buildConnection ) return mcf . jdbcRuntime . buildXAConnection ( ( XADataSource ) ds , user , pwd , cri ) ; else if ( user == null ) return ( ( XADataSource ) ds ) . getXAConnection ( ) ; else return ( ( XADataSource ) ds ) . getXAConnection ( user , pwd ) ; else if ( buildConnection ) return mcf . jdbcRuntime . buildPooledConnection ( ( ConnectionPoolDataSource ) ds , user , pwd , cri ) ; else if ( user == null ) return ( ( ConnectionPoolDataSource ) ds ) . getPooledConnection ( ) ; else return ( ( ConnectionPoolDataSource ) ds ) . getPooledConnection ( user , pwd ) ; } } ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "getPooledConnection" , AdapterUtil . toString ( pConn ) ) ; return new ConnectionResults ( pConn , null ) ; } catch ( PrivilegedActionException pae ) { FFDCFilter . processException ( pae . getException ( ) , getClass ( ) . getName ( ) , "1298" ) ; ResourceException resX = new DataStoreAdapterException ( "JAVAX_CONN_ERR" , pae . getException ( ) , DatabaseHelper . class , is2Phase ? "XAConnection" : "PooledConnection" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "getPooledConnection" , "Exception" ) ; throw resX ; } catch ( ClassCastException castX ) { // There's a possibility this occurred because of an error in the JDBC driver // itself. The trace should allow us to determine this. FFDCFilter . processException ( castX , getClass ( ) . getName ( ) , "1312" ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Caught ClassCastException" , castX ) ; ResourceException resX = new DataStoreAdapterException ( castX . getMessage ( ) , null , DatabaseHelper . class , is2Phase ? "NOT_A_2_PHASE_DS" : "NOT_A_1_PHASE_DS" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "getPooledConnection" , "Exception" ) ; throw resX ; } }
|
Get a Pooled or XA Connection from the specified DataSource . A null userName indicates that no user name or password should be provided .
| 858
| 29
|
159,460
|
public void setClientRerouteData ( Object dataSource , String cRJNDIName , String cRAlternateServer , String cRAlternatePort , String cRPrimeServer , String cRPrimePort , Context jndiContext , String driverType ) throws Throwable // add driverType { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Client reroute is not supported on non-DB2 JCC driver." ) ; } }
|
This method is used to set the client reroute options on the datasoruce Object . This method will be a no - op for all but the DB2 universal driver .
| 104
| 35
|
159,461
|
public boolean isAnAuthorizationException ( SQLException x ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "isAnAuthorizationException" , x ) ; boolean isAuthError = false ; LinkedList < SQLException > stack = new LinkedList < SQLException > ( ) ; if ( x != null ) stack . push ( x ) ; // Limit the chain depth so that poorly written exceptions don't cause an infinite loop. for ( int depth = 0 ; depth < 20 && ! isAuthError && ! stack . isEmpty ( ) ; depth ++ ) { x = stack . pop ( ) ; isAuthError |= isAuthException ( x ) ; // Add the chained exceptions to the stack. if ( x . getNextException ( ) != null ) stack . push ( x . getNextException ( ) ) ; if ( x . getCause ( ) instanceof SQLException && x . getCause ( ) != x . getNextException ( ) ) stack . push ( ( SQLException ) x . getCause ( ) ) ; } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "isAnAuthorizationException" , isAuthError ) ; return isAuthError ; }
|
Method is used to see if the exception passed is an authorization exception or not .
| 301
| 16
|
159,462
|
public void reuseKerbrosConnection ( Connection sqlConn , GSSCredential gssCred , Properties props ) throws SQLException { // an exception would have been thrown earlier than this point, so adding the trace just in case. if ( tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Kerberos reuse is not supported when using generic helper. No-op operation." ) ; } }
|
Method used to reuse a connection using kerberos . This method will reset all connection properties thus after a reuse is called connection should be treated as if it was a newly created connection
| 93
| 36
|
159,463
|
public int branchCouplingSupported ( int couplingType ) { // Return -1 as we have no support for resref branch coupling if ( couplingType == ResourceRefInfo . BRANCH_COUPLING_LOOSE || couplingType == ResourceRefInfo . BRANCH_COUPLING_TIGHT ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Specified branch coupling type not supported" ) ; } return - 1 ; } // If resref branch coupling unset then return default xa_start flags return javax . transaction . xa . XAResource . TMNOFLAGS ; }
|
This method checks if the connection supports loose or tight branch coupling
| 141
| 12
|
159,464
|
public boolean loadClasses ( ) { Boolean result = AccessController . doPrivileged ( new PrivilegedAction < Boolean > ( ) { @ Override public Boolean run ( ) { Policy policy = jaccProviderService . getService ( ) . getPolicy ( ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "policy object" + policy ) ; // in order to support the CTS provider, Policy object should be set prior to // instanciate PolicyConfigFactory class. if ( policy == null ) { Exception e = new Exception ( "Policy object is null." ) ; Tr . error ( tc , "JACC_POLICY_INSTANTIATION_FAILURE" , new Object [ ] { policyName , e } ) ; return Boolean . FALSE ; } try { Policy . setPolicy ( policy ) ; policy . refresh ( ) ; } catch ( ClassCastException cce ) { Tr . error ( tc , "JACC_POLICY_INSTANTIATION_FAILURE" , new Object [ ] { policyName , cce } ) ; return Boolean . FALSE ; } pcf = jaccProviderService . getService ( ) . getPolicyConfigFactory ( ) ; if ( pcf != null ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "factory object : " + pcf ) ; PolicyConfigurationManager . initialize ( policy , pcf ) ; } else { Tr . error ( tc , "JACC_FACTORY_INSTANTIATION_FAILURE" , new Object [ ] { factoryName } ) ; return Boolean . FALSE ; } return Boolean . TRUE ; } } ) ; return result . booleanValue ( ) ; }
|
Loads the JACC Policy and Factory classes .
| 366
| 10
|
159,465
|
private static String getResourceLookup ( Resource resource ) // F743-16274.1 { if ( svResourceLookupMethod == null ) { return "" ; } try { return ( String ) svResourceLookupMethod . invoke ( resource , ( Object [ ] ) null ) ; } catch ( Exception ex ) { throw new IllegalStateException ( ex ) ; } }
|
Returns the result of javax . annotation . Resource . lookup or the empty string if that method is unavailable in the current JVM .
| 78
| 28
|
159,466
|
private void setXMLType ( String typeName , String element , String nameElement , String typeElement ) // F743-32443 throws InjectionConfigurationException { if ( ivNameSpaceConfig . getClassLoader ( ) == null ) { setInjectionClassTypeName ( typeName ) ; } else { Class < ? > type = loadClass ( typeName ) ; //The type parameter is "optional" if ( type != null ) { ResourceImpl curAnnotation = ( ResourceImpl ) getAnnotation ( ) ; if ( curAnnotation . ivIsSetType ) { Class < ? > curType = getInjectionClassType ( ) ; // check that value from xml is a subclasss, if not throw an error Class < ? > mostSpecificClass = mostSpecificClass ( type , curType ) ; if ( mostSpecificClass == null ) { Tr . error ( tc , "CONFLICTING_XML_VALUES_CWNEN0052E" , ivComponent , ivModule , ivApplication , typeElement , element , nameElement , getJndiName ( ) , curType , type ) ; // d479669 String exMsg = "The " + ivComponent + " bean in the " + ivModule + " module of the " + ivApplication + " application has conflicting configuration data in the XML" + " deployment descriptor. Conflicting " + typeElement + " element values exist for multiple " + element + " elements with the same " + nameElement + " element value : " + getJndiName ( ) + ". The conflicting " + typeElement + " element values are " + curType + " and " + type + "." ; // d479669 throw new InjectionConfigurationException ( exMsg ) ; } curAnnotation . ivType = mostSpecificClass ; } else { curAnnotation . ivType = type ; curAnnotation . ivIsSetType = true ; } } } }
|
Sets the injection type as specified in XML .
| 406
| 10
|
159,467
|
private boolean isEnvEntryTypeCompatible ( Object newType ) // F743-32443 { Class < ? > curType = getInjectionClassType ( ) ; if ( curType == null ) { return true ; } return isClassesCompatible ( ( Class < ? > ) newType , getInjectionClassType ( ) ) ; }
|
Checks if the specified type is compatible for merging with the type that has already specified for this binding .
| 75
| 21
|
159,468
|
public void setEnvEntryType ( ResourceImpl annotation , Object type ) // F743-32443 throws InjectionException { if ( type instanceof String ) { setInjectionClassTypeName ( ( String ) type ) ; } else { Class < ? > classType = ( Class < ? > ) type ; annotation . ivType = classType ; annotation . ivIsSetType = true ; setInjectionClassType ( classType ) ; } }
|
Sets the type of this binding .
| 95
| 8
|
159,469
|
private boolean isEnvEntryType ( Class < ? > resolverType ) // F743-32443 { Class < ? > injectType = getInjectionClassType ( ) ; return injectType == null ? resolverType . getName ( ) . equals ( getInjectionClassTypeName ( ) ) : resolverType == injectType ; }
|
Checks if the type of this binding is the same as the specified type .
| 74
| 16
|
159,470
|
@ Override public List < Asset > getAllAssets ( ) throws IOException , RequestFailureException { HttpURLConnection connection = createHttpURLConnectionToMassive ( "/assets" ) ; connection . setRequestMethod ( "GET" ) ; testResponseCode ( connection ) ; return JSONAssetConverter . readValues ( connection . getInputStream ( ) ) ; }
|
This method will issue a GET to all of the assets in massive
| 79
| 13
|
159,471
|
private HttpURLConnection createHeadConnection ( String path ) throws IOException { HttpURLConnection connection = createHttpURLConnectionToMassive ( path ) ; connection . setRequestMethod ( "HEAD" ) ; return connection ; }
|
Creates a head request connection to the specified path
| 48
| 10
|
159,472
|
private void deleteAsset ( String id ) throws IOException , RequestFailureException { HttpURLConnection connection = createHttpURLConnectionToMassive ( "/assets/" + id ) ; connection . setRequestMethod ( "DELETE" ) ; testResponseCode ( connection , true ) ; }
|
Deletes an asset with the given ID . Note this will not delete any attachments associated with the asset .
| 60
| 21
|
159,473
|
private void writeMultiPart ( final String assetId , final AttachmentSummary attSummary , HttpURLConnection connection ) throws IOException , BadVersionException , RequestFailureException { final File fileToWrite = attSummary . getFile ( ) ; String boundary = "---------------------------287032381131322" ; byte [ ] startBytes = getStartBytes ( attSummary , boundary ) ; byte [ ] endBytes = getEndBytes ( attSummary , boundary ) ; long fileSize ; fileSize = AccessController . doPrivileged ( new PrivilegedAction < Long > ( ) { @ Override public Long run ( ) { return attSummary . getFile ( ) . length ( ) ; } } ) ; long contentLength = startBytes . length + endBytes . length + fileSize ; connection . setRequestProperty ( "Content-Type" , "multipart/form-data; boundary=" + boundary ) ; connection . setRequestProperty ( "Content-Length" , "" + contentLength ) ; connection . setRequestMethod ( "POST" ) ; connection . setDoOutput ( true ) ; OutputStream httpStream = connection . getOutputStream ( ) ; // Write the header httpStream . write ( startBytes ) ; httpStream . flush ( ) ; FileInputStream inputStream = null ; try { try { inputStream = AccessController . doPrivileged ( new PrivilegedExceptionAction < FileInputStream > ( ) { @ Override public FileInputStream run ( ) throws IOException { return new FileInputStream ( fileToWrite ) ; } } ) ; } catch ( PrivilegedActionException e ) { throw ( IOException ) e . getCause ( ) ; } byte [ ] buffer = new byte [ 1024 ] ; int read ; int total = 0 ; while ( ( read = inputStream . read ( buffer ) ) != - 1 ) { httpStream . write ( buffer , 0 , read ) ; total += read ; } if ( total != fileSize ) { throw new IOException ( "File size was " + fileSize + " but we only uploaded " + total + " bytes" ) ; } httpStream . flush ( ) ; } finally { if ( inputStream != null ) { inputStream . close ( ) ; } } httpStream . write ( endBytes ) ; httpStream . flush ( ) ; httpStream . close ( ) ; }
|
Adds a new attachment to an asset
| 490
| 7
|
159,474
|
@ Override public InputStream getAttachment ( final Asset asset , final Attachment attachment ) throws IOException , BadVersionException , RequestFailureException { // accept license for type CONTENT HttpURLConnection connection ; if ( attachment . getType ( ) == AttachmentType . CONTENT ) { connection = createHttpURLConnection ( attachment . getUrl ( ) + "?license=agree" ) ; } else { connection = createHttpURLConnection ( attachment . getUrl ( ) ) ; } // If the attachment was a link and we have a basic auth userid + password specified // we are attempting to access the files staged from a protected site so authorise for it if ( attachment . getLinkType ( ) == AttachmentLinkType . DIRECT ) { if ( ( loginInfo . getAttachmentBasicAuthUserId ( ) != null ) && ( loginInfo . getAttachmentBasicAuthPassword ( ) != null ) ) { String userpass = loginInfo . getAttachmentBasicAuthUserId ( ) + ":" + loginInfo . getAttachmentBasicAuthPassword ( ) ; String basicAuth = "Basic " + encode ( userpass . getBytes ( Charset . forName ( "UTF-8" ) ) ) ; connection . setRequestProperty ( "Authorization" , basicAuth ) ; } } connection . setRequestMethod ( "GET" ) ; testResponseCode ( connection ) ; return connection . getInputStream ( ) ; }
|
Returns the contents of an attachment
| 301
| 6
|
159,475
|
public Attachment getAttachmentMetaData ( String assetId , String attachmentId ) throws IOException , BadVersionException , RequestFailureException { // At the moment can only get all attachments Asset ass = getAsset ( assetId ) ; List < Attachment > allAttachments = ass . getAttachments ( ) ; for ( Attachment attachment : allAttachments ) { if ( attachmentId . equals ( attachment . get_id ( ) ) ) { return attachment ; } } // Didn't find it so just return null return null ; }
|
Returns the meta data about an attachment
| 111
| 7
|
159,476
|
@ Override public void deleteAttachment ( final String assetId , final String attachmentId ) throws IOException , RequestFailureException { HttpURLConnection connection = createHttpURLConnectionToMassive ( "/assets/" + assetId + "/attachments/" + attachmentId ) ; connection . setRequestMethod ( "DELETE" ) ; testResponseCode ( connection , true ) ; }
|
Delete an attachment from an asset
| 80
| 6
|
159,477
|
@ Override public void deleteAssetAndAttachments ( final String assetId ) throws IOException , RequestFailureException { Asset ass = getUnverifiedAsset ( assetId ) ; List < Attachment > attachments = ass . getAttachments ( ) ; if ( attachments != null ) { for ( Attachment attachment : attachments ) { deleteAttachment ( assetId , attachment . get_id ( ) ) ; } } // Now delete the asset deleteAsset ( assetId ) ; }
|
This will delete an asset and all its attachments
| 98
| 9
|
159,478
|
@ Override public Asset getAsset ( final String assetId ) throws IOException , BadVersionException , RequestFailureException { HttpURLConnection connection = createHttpURLConnectionToMassive ( "/assets/" + assetId ) ; connection . setRequestMethod ( "GET" ) ; testResponseCode ( connection ) ; return JSONAssetConverter . readValue ( connection . getInputStream ( ) ) ; }
|
Gets a single asset
| 85
| 5
|
159,479
|
@ Override public void updateState ( final String assetId , final StateAction action ) throws IOException , RequestFailureException { StateUpdateAction newState = new StateUpdateAction ( action ) ; HttpURLConnection connection = createHttpURLConnectionToMassive ( "/assets/" + assetId + "/state" ) ; connection . setRequestMethod ( "PUT" ) ; connection . setRequestProperty ( "Content-Type" , "application/json" ) ; connection . setDoOutput ( true ) ; JSONAssetConverter . writeValue ( connection . getOutputStream ( ) , newState ) ; // Make sure it was ok testResponseCode ( connection , true ) ; }
|
This method will update the state of an object by taking the supplied action .
| 142
| 15
|
159,480
|
private URL createURL ( final String urlString ) throws MalformedURLException { URL url ; try { url = AccessController . doPrivileged ( new PrivilegedExceptionAction < URL > ( ) { @ Override public URL run ( ) throws MalformedURLException { return new URL ( urlString ) ; } } ) ; } catch ( PrivilegedActionException e ) { throw ( MalformedURLException ) e . getCause ( ) ; } return url ; }
|
Create a URL in a doPriv
| 102
| 7
|
159,481
|
@ Override public Attachment updateAttachment ( String assetId , AttachmentSummary summary ) throws IOException , BadVersionException , RequestFailureException { // First find the attachment to update Asset ass = getAsset ( assetId ) ; List < Attachment > attachments = ass . getAttachments ( ) ; if ( attachments != null ) { for ( Attachment attachment : attachments ) { if ( attachment . getName ( ) . equals ( summary . getName ( ) ) ) { this . deleteAttachment ( assetId , attachment . get_id ( ) ) ; break ; } } } return this . addAttachment ( assetId , summary ) ; }
|
This method will update an existing attachment on an asset . Note that Massive currently doesn t support update attachment so this will do a delete and an add .
| 136
| 30
|
159,482
|
private void clearInputStream ( HttpURLConnection conn ) { InputStream is = null ; byte [ ] buffer = new byte [ 1024 ] ; try { is = conn . getInputStream ( ) ; while ( is . read ( buffer ) != - 1 ) { continue ; } } catch ( IOException e ) { // Don't care. } finally { if ( is != null ) { try { is . close ( ) ; } catch ( IOException e ) { // Don't care. } } } }
|
Read the input stream from the connection throw it away and close the connection swallow all exceptions .
| 106
| 18
|
159,483
|
public static String getCharset ( final String contentType ) { // Default to UTF-8 String charset = "UTF-8" ; try { // Content type is in the form: // Content-Type: text/html; charset=utf-8 // Where they can be lots of params separated by ; characters if ( contentType != null && ! contentType . isEmpty ( ) ) { if ( contentType . contains ( ";" ) ) { String [ ] params = contentType . substring ( contentType . indexOf ( ";" ) ) . split ( ";" ) ; for ( String param : params ) { param = param . trim ( ) ; if ( param . indexOf ( "=" ) > 0 ) { String paramName = param . substring ( 0 , param . indexOf ( "=" ) ) . trim ( ) ; if ( "charset" . equals ( paramName ) && param . length ( ) > ( param . indexOf ( "=" ) + 1 ) ) { String paramValue = param . substring ( param . indexOf ( "=" ) + 1 ) . trim ( ) ; if ( paramValue != null && ! paramValue . isEmpty ( ) && Charset . isSupported ( paramValue ) ) { charset = paramValue ; break ; } } } } } } } catch ( Throwable t ) { // Ignore, we really don't want this util killing anything! } return charset ; }
|
Utility method to get the charset from a url connection s content type
| 307
| 15
|
159,484
|
private String parseErrorObject ( String errorObject ) { if ( errorObject == null ) { return null ; } try { // Just use JsonObject parse directly instead of DataModelSerializer as we only want one attribute InputStream inputStream = new ByteArrayInputStream ( errorObject . getBytes ( Charset . forName ( "UTF-8" ) ) ) ; JsonReader jsonReader = Json . createReader ( inputStream ) ; JsonObject parsedObject = jsonReader . readObject ( ) ; jsonReader . close ( ) ; Object errorMessage = parsedObject . get ( "message" ) ; if ( errorMessage != null && errorMessage instanceof JsonString && ! ( ( JsonString ) errorMessage ) . getString ( ) . isEmpty ( ) ) { return ( ( JsonString ) errorMessage ) . getString ( ) ; } else { return errorObject ; } } catch ( JsonException e ) { return errorObject ; } }
|
This treats the supplied string as a JSON object and looks for the message attribute inside it . If it is not valid JSON or does not contain a message the original string is returned .
| 205
| 36
|
159,485
|
public static void writeValue ( OutputStream stream , Object pojo ) throws IOException { DataModelSerializer . serializeAsStream ( pojo , stream ) ; }
|
Write a JSON representation of the asset to a stream
| 35
| 10
|
159,486
|
public static List < Asset > readValues ( InputStream inputStream ) throws IOException { return DataModelSerializer . deserializeList ( inputStream , Asset . class ) ; }
|
Read a list of assets from an input stream
| 38
| 9
|
159,487
|
public static Asset readValue ( InputStream inputStream ) throws IOException , BadVersionException { return DataModelSerializer . deserializeObject ( inputStream , Asset . class ) ; }
|
Read a single assets from an input stream
| 39
| 8
|
159,488
|
public static < T > T readValue ( InputStream inputStream , Class < T > type ) throws IOException , BadVersionException { return DataModelSerializer . deserializeObject ( inputStream , type ) ; }
|
Reads in a single object from a JSON input stream
| 46
| 11
|
159,489
|
public static < T > List < T > readValues ( InputStream inputStream , Class < T > type ) throws IOException { return DataModelSerializer . deserializeList ( inputStream , type ) ; }
|
Reads in a list of objects from a JSON input stream
| 45
| 12
|
159,490
|
public static String getHomeBeanClassName ( EnterpriseBean enterpriseBean , boolean isPost11DD ) // d114199 { String packageName = null ; String homeInterfaceName = getHomeInterfaceName ( enterpriseBean ) ; // LIDB2281.24.2 made several changes to code below, to accommodate case // where neither a remote home nor a local home is present (EJB 2.1 allows // this). if ( homeInterfaceName == null ) { // f111627.1 homeInterfaceName = getLocalHomeInterfaceName ( enterpriseBean ) ; // f111627.1 } if ( homeInterfaceName != null ) { packageName = packageName ( homeInterfaceName ) ; StringBuffer result = new StringBuffer ( ) ; if ( packageName != null ) { result . append ( packageName ) ; result . append ( ' ' ) ; } result . append ( homeBeanPrefix ) ; result . append ( getUniquePrefix ( enterpriseBean ) ) ; String homeName = encodeBeanInterfacesName ( enterpriseBean , isPost11DD , false , true , true ) ; // d114199 d147734 result . append ( homeName ) ; return result . toString ( ) ; } else { return null ; } }
|
Return the name of the deployed home bean class . Assumption here is the package name of the local and remote interfaces are the same . This method uses the last package name found in either the remote or local interface if one or the other exist . If neither is found null is returned .
| 270
| 57
|
159,491
|
public static String getConcreteBeanClassName ( EnterpriseBean enterpriseBean ) { String beanClassName = enterpriseBean . getEjbClassName ( ) ; String packageName = packageName ( beanClassName ) ; String beanName = encodeBeanInterfacesName ( enterpriseBean , true , false , false , false ) ; // d147734 StringBuffer result = new StringBuffer ( ) ; if ( packageName != null ) { result . append ( packageName ) ; result . append ( ' ' ) ; } result . append ( concreteBeanPrefix ) ; result . append ( beanName ) ; return result . toString ( ) ; }
|
f110762 . 2
| 141
| 5
|
159,492
|
public static final String updateFilenameHashCode ( EnterpriseBean enterpriseBean , String oldName ) { String newName = null ; int len = oldName . length ( ) ; int last_ = ( len > 9 && ( oldName . charAt ( len - 9 ) == ' ' ) ) ? len - 9 : - 1 ; // input file name must have a trailing "_" follows by 8 hex digits // and check to make sure the last 8 characters are all hex digits if ( last_ != - 1 && allHexDigits ( oldName , ++ last_ , len ) ) { String hashStr = getHashStr ( enterpriseBean ) ; newName = oldName . substring ( 0 , last_ ) + BuzzHash . computeHashStringMid32Bit ( hashStr , true ) ; } return newName ; }
|
Attempts to find the new file name originated from input oldName using the the new modified BuzzHash algorithm . This method detects if the oldName contains a valid trailing hashcode and try to compute the new one . If the oldName has no valid hashcode in the input name null is return . For ease of invocation regardless of the type of file passes in this method only changes the hash value and will not recreate the complete file name from the EnterpriseBean .
| 174
| 92
|
159,493
|
public String getWebServiceEndpointProxyClassName ( ) { StringBuilder result = new StringBuilder ( ) ; // Use the package of the EJB implementation. String packageName = packageName ( ivBeanClass ) ; if ( packageName != null ) { result . append ( packageName ) ; result . append ( ' ' ) ; } result . append ( endpointPrefix ) ; // WSEJBProxy result . append ( ivBeanType ) ; // SL/SF/BMP/CMP, etc. result . append ( ivBeanName ) ; // First 32 characters result . append ( ' ' ) ; result . append ( ivHashSuffix ) ; // 8 digit hashcode return result . toString ( ) ; }
|
LI3294 - 35 d497921
| 155
| 9
|
159,494
|
public void processMessage ( JsMessage jsMsg ) throws SIResourceException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processMessage" , new Object [ ] { jsMsg } ) ; int priority = jsMsg . getPriority ( ) . intValue ( ) ; Reliability reliability = jsMsg . getReliability ( ) ; SIBUuid12 streamID = jsMsg . getGuaranteedStreamUUID ( ) ; StreamSet streamSet = getStreamSet ( streamID , true ) ; InternalInputStream internalInputStream = null ; synchronized ( streamSet ) { internalInputStream = ( InternalInputStream ) streamSet . getStream ( priority , reliability ) ; // This may be the first message which has required this stream if ( internalInputStream == null && ( reliability . compareTo ( Reliability . BEST_EFFORT_NONPERSISTENT ) > 0 ) ) { internalInputStream = createStream ( streamSet , priority , reliability ) ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processMessage" ) ; }
|
This method creates a Stream if this is the first inbound message which has been sent to remote Mes
| 240
| 20
|
159,495
|
private void activeRequestIntropectors ( PrintWriter writer ) { writer . println ( "\n------------------------------------------------------------------------------" ) ; writer . println ( " Active Requests" ) ; writer . println ( "------------------------------------------------------------------------------\n" ) ; List < RequestContext > activeRequests = RequestProbeService . getActiveRequests ( ) ; if ( activeRequests == null || activeRequests . size ( ) == 0 ) { // If no active request available.. writer . println ( "----- No active requests ----- " ) ; } else { int maxDurationLength = 0 ; List < String > activeRequestDetails = new ArrayList < String > ( ) ; for ( RequestContext requestContext : activeRequests ) { double totalRequestDuration = ( System . nanoTime ( ) - requestContext . getRootEvent ( ) . getStartTime ( ) ) / 1000000.0 ; String totalRequestDurationStr = String . format ( "%.3f" , totalRequestDuration ) ; totalRequestDurationStr = totalRequestDurationStr + "ms" ; if ( requestContext . getRequestId ( ) . toString ( ) . length ( ) > maxDurationLength ) { maxDurationLength = requestContext . getRequestId ( ) . toString ( ) . length ( ) ; } String threadId = DataFormatHelper . padHexString ( ( int ) requestContext . getThreadId ( ) , 8 ) ; activeRequestDetails . add ( requestContext . getRequestId ( ) . toString ( ) + "," + threadId + "," + totalRequestDurationStr ) ; } writer . println ( String . format ( "%-" + ( maxDurationLength + EXTRA_SPACE_REQUIRED ) + "s" + "%-10s%s" , "Request" , "Thread" , "Duration" ) ) ; for ( String request : activeRequestDetails ) { String requestId = request . split ( "," ) [ 0 ] ; String threadId = request . split ( "," ) [ 1 ] ; String totalDuration = request . split ( "," ) [ 2 ] ; writer . println ( String . format ( "%-" + ( maxDurationLength + EXTRA_SPACE_REQUIRED ) + "s" + "%-10s%s" , requestId , threadId , totalDuration ) ) ; } writer . println ( "------------------------------------------------------------------------------\n" ) ; for ( RequestContext requestContext : activeRequests ) { // Print the RequestContext for all the active requests. writer . println ( "Request " + requestContext . getRequestId ( ) . toString ( ) ) ; writer . println ( RequestContext . dumpTree ( requestContext . getRootEvent ( ) , true ) ) ; writer . println ( ) ; } } }
|
This method will dump all the active request thread id and their duration in tabular format . In addition will dump the RequestContext
| 577
| 25
|
159,496
|
private void transformDescriptorIntrospectors ( PrintWriter writer ) { Map < String , RequestProbeTransformDescriptor > registeredTransformDescriptors = RequestProbeBCIManagerImpl . getRequestProbeTransformDescriptors ( ) ; List < String > transformDescriptorRefs = new ArrayList < String > ( ) { { add ( "Transform Descriptor" ) ; add ( "" ) ; } } ; List < String > tdDetails = new ArrayList < String > ( ) { { add ( "ClassName.MethodName(Description)" ) ; add ( "" ) ; } } ; List < Integer > indentationLength = new ArrayList < Integer > ( ) ; int maxSpaceRequired = 0 ; for ( Entry < String , RequestProbeTransformDescriptor > transformDescriptor : registeredTransformDescriptors . entrySet ( ) ) { transformDescriptorRefs . add ( transformDescriptor . getValue ( ) . toString ( ) ) ; if ( transformDescriptor . getValue ( ) . getMethodDesc ( ) . equals ( "all" ) ) tdDetails . add ( transformDescriptor . getValue ( ) . getClassName ( ) + "." + transformDescriptor . getValue ( ) . getMethodName ( ) + "(" + transformDescriptor . getValue ( ) . getMethodDesc ( ) + ")" ) ; else tdDetails . add ( transformDescriptor . getValue ( ) . getClassName ( ) + "." + transformDescriptor . getValue ( ) . getMethodName ( ) + transformDescriptor . getValue ( ) . getMethodDesc ( ) ) ; } for ( String transformDescriptorRef : transformDescriptorRefs ) { if ( transformDescriptorRef . length ( ) > maxSpaceRequired ) { maxSpaceRequired = transformDescriptorRef . length ( ) ; } } indentationLength . add ( maxSpaceRequired + EXTRA_SPACE_REQUIRED ) ; writer . println ( ) ; writer . println ( "------------------------------------------------------------------------------" ) ; writer . println ( " Registered Transform Descriptors " ) ; writer . println ( "------------------------------------------------------------------------------" ) ; for ( int i = 0 ; i < transformDescriptorRefs . size ( ) ; i ++ ) { writer . println ( String . format ( "%-" + indentationLength . get ( 0 ) + "s%s" , transformDescriptorRefs . get ( i ) , tdDetails . get ( i ) ) ) ; } if ( registeredTransformDescriptors . size ( ) == 0 ) { writer . println ( "----- No transform descriptors are registered ----- " ) ; } }
|
This method will dump all registered transform descriptors . It includes className methodName and description
| 574
| 18
|
159,497
|
public void instrumentWithProbes ( Collection < Class < ? > > classes ) { for ( Class < ? > clazz : classes ) { try { instrumentation . retransformClasses ( clazz ) ; } catch ( Throwable t ) { } } }
|
Instrument the provided classes with the appropriate probes .
| 55
| 10
|
159,498
|
public final JsMessageHandle createJsMessageHandle ( SIBUuid8 uuid , long value ) throws NullPointerException { if ( uuid == null ) { throw new NullPointerException ( "uuid" ) ; } return new JsMessageHandleImpl ( uuid , Long . valueOf ( value ) ) ; }
|
Create a new JsMessageHandle to represent an SIBusMessage .
| 71
| 15
|
159,499
|
@ Override public Principal getCallerPrincipal ( ) { EJBSecurityCollaborator < ? > securityCollaborator = container . ivSecurityCollaborator ; if ( securityCollaborator == null ) { return NullSecurityCollaborator . UNAUTHENTICATED ; } return getCallerPrincipal ( securityCollaborator , EJSContainer . getMethodContext ( ) ) ; }
|
Not implemented yet
| 86
| 3
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.