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... | 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 , "... | 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 { _mostRecentThr... | 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 WSATAsyncRes... | 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 s... | 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 ( ) ) S... | 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 ... | 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 ( AppliesToFilt... | 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... | 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 ha... | 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... | 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 ( ) . getNa... | 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 , "Nu... | 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 } ) ; ... | 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 ( Tra... | 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 ( ... | 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 . isAnyTracingEnab... | 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 . addPubSubLocalisatio... | 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 ( ) ... | 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 . isAnyTracingEn... | 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 ... | 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 ( ) . toStri... | 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 ( Tr... | 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 ( ) . getAnycastOHForPseudoD... | 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 //... | 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 gracefull... | 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 . ... | 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 , cr... | 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 , B... | 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 add... | 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 . getRemotePub... | 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 ( TraceComp... | 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 (... | 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 ( ) . removeAnycastInputHandlerAnd... | 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 . i... | 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 ) { _localisationM... | 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 . valu... | 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 = ... | 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 (... | 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 + ... | 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 .... | 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 =... | 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 ( initializ... | 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 , "resetClientI... | 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 , "getPooledConnec... | 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 rero... | 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 <... | 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 usi... | 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 ... | 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 ... | 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 p... | 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 ; setI... | 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 . getInputStrea... | 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 [ ] star... | 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 = createHttpURLC... | 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 attachme... | 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" ) ; testRespons... | 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 (... | 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 ... | 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 . setRequ... | 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 ) ... | 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 != nul... | 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 (... | 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 ( con... | 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" ) ) ) ;... | 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 loc... | 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 resu... | 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 ... | 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 regardles... | 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 ( endpointPre... | 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 . getG... | 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" ) ; Li... | 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 Desc... | 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.