idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
161,500
private final CMConfigData getCMConfigData ( AbstractConnectionFactoryService cfSvc , ResourceInfo refInfo ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getCMConfigData" ) ; int auth = J2CConstants . AUTHENTICATION_APPLICATION ; in...
Construct the CMConfigData including properties from the resource reference if applicable .
161,501
public ConnectionManager getConnectionManager ( ResourceInfo refInfo , AbstractConnectionFactoryService svc ) throws ResourceException { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getConnectionManager" , refInfo , svc ) ; Connection...
Returns the connection manager for this configuration . This method lazily initializes the connection manager service if necessary .
161,502
private final static HashMap < String , String > toHashMap ( List < ? extends ResourceInfo . Property > propList ) { if ( propList == null ) return null ; HashMap < String , String > propMap = new HashMap < String , String > ( ) ; for ( ResourceInfo . Property prop : propList ) propMap . put ( prop . getName ( ) , prop...
Utility method that converts a list of properties to HashMap .
161,503
@ FFDCIgnore ( BAD_OPERATION . class ) public Object narrow ( Object narrowFrom , @ SuppressWarnings ( "rawtypes" ) Class narrowTo ) throws ClassCastException { if ( narrowFrom == null ) { return null ; } if ( narrowTo . isInstance ( narrowFrom ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ...
An implementation of narrow that always attempts to load stub classes from the class loader before dynamically generating a stub class .
161,504
private void scanClasses ( ) throws PersistenceUnitScannerException { try { for ( URL url : urlSet ) { final HashSet < ClassInfoType > citSet = new HashSet < ClassInfoType > ( ) ; final String urlProtocol = url . getProtocol ( ) ; if ( "file" . equalsIgnoreCase ( urlProtocol ) ) { final Path taPath = Paths . get ( url ...
Scan classes in persistence unit root and referenced jar - files
161,505
private void scanEntityMappings ( ) throws PersistenceUnitScannerException { final HashSet < URL > mappingFilesLocated = new HashSet < URL > ( ) ; final HashSet < String > searchNames = new HashSet < String > ( ) ; for ( PersistenceUnitInfo pui : puiList ) { try { mappingFilesLocated . clear ( ) ; searchNames . clear (...
Scan Entity Mappings Files
161,506
private List < URL > findORMResources ( PersistenceUnitInfo pui , String ormFileName ) throws IOException { final boolean isMetaInfoOrmXML = "META-INF/orm.xml" . equals ( ormFileName ) ; final ArrayList < URL > retArr = new ArrayList < URL > ( ) ; Enumeration < URL > ormEnum = pui . getClassLoader ( ) . getResources ( ...
Finds all specified ORM files by name constrained in location by the persistence unit root and jar files .
161,507
public boolean writeSilence ( SIMPMessage m ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeSilence" , new Object [ ] { m } ) ; JsMessage jsMsg = m . getMessage ( ) ; long stamp = jsMsg . getGuaranteedValueValueTick ( ) ; long starts =...
This method uses a Value message to write Silence into the stream either because a message has been filtered out or because it has been rolled back
161,508
public void writeSilence ( ControlSilence m ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeSilence" , new Object [ ] { m } ) ; boolean sendMessage = false ; long completedPrefix ; long starts = m . getStartTick ( ) ; long ends = m . g...
This method writes the ticks in a Silence message into the stream It is called when a Silence message arrives from another ME If the RequestedOnly flag in the message is set then the message is only sent on to downstream MEs if they have previously requested it . Otherwise it is always sent .
161,509
public void writeAckPrefix ( long stamp ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeAckPrefix" , Long . valueOf ( stamp ) ) ; synchronized ( this ) { if ( stamp >= lastAckExpTick ) { getControlAdapter ( ) . getHealthState ( ) . upd...
This method is called when an Ack message is recieved from a downstream ME . It updates the ackPrefix of the stream and then passes the message up to the PubSubInputHandler which will aggregate the Acks from all InternalOutputStreams .
161,510
public void writeSilenceForced ( TickRange vtr ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeSilenceForced" , new Object [ ] { vtr } ) ; long start = vtr . startstamp ; long end = vtr . endstamp ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEn...
This method uses a Value TickRange to write Silence into the stream because a message has expired before it was sent and so needs to be removed from the stream It forces the stream to be updated to Silence without checking the existing state It then updates the upstream control with this new completed prefix
161,511
public static final byte [ ] serialize ( Serializable serializable ) throws IOException { if ( serializable == null ) { return null ; } ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream ( ) ; ObjectOutputStream objectOutputStream = null ; byte [ ] result = null ; if ( null != _instance ) { Seriali...
This serializes an object into a byte array .
161,512
public Object nextElement ( ) { try { return nextElementR ( ) ; } catch ( NoMoreElementsException e ) { throw new NoSuchElementException ( ) ; } catch ( EnumeratorException e ) { throw new RuntimeException ( e . toString ( ) ) ; } catch ( NoSuchObjectException e ) { throw new IllegalStateException ( "Cannot access find...
Obtain the next element from the enumeration
161,513
public boolean hasMoreElements ( ) { try { return hasMoreElementsR ( ) ; } catch ( NoMoreElementsException e ) { return false ; } catch ( EnumeratorException e ) { throw new RuntimeException ( e . toString ( ) ) ; } catch ( NoSuchObjectException e ) { throw new IllegalStateException ( "Cannot access finder result outsi...
Find out if there are any more elements available
161,514
public synchronized boolean hasMoreElementsR ( ) throws RemoteException , EnumeratorException { if ( elements != null && index < elements . length ) { return true ; } else if ( ! exhausted ) { try { elements = null ; index = 0 ; elements = fetchElements ( PREFETCH_COUNT ) ; return true ; } catch ( NoMoreElementsExcepti...
Find out if there are any more elements available ; this method will perform prefetching from the remote result set .
161,515
public synchronized Object [ ] nextNElements ( int n ) throws RemoteException , EnumeratorException { if ( ! hasMoreElementsR ( ) ) { throw new NoMoreElementsException ( ) ; } EJBObject [ ] remainder = null ; final int numCached = elements . length - index ; if ( ! exhausted && numCached < n ) { try { remainder = fetch...
Obtain the next n elements from the enumeration ; the array may contain fewer than n elements if the enumeration is exhausted .
161,516
public EJBObject [ ] loadEntireCollection ( ) { EJBObject [ ] result = null ; try { result = ( EJBObject [ ] ) allRemainingElements ( ) ; } catch ( NoMoreElementsException e ) { return elements ; } catch ( EnumeratorException e ) { throw new RuntimeException ( e . toString ( ) ) ; } catch ( RemoteException e ) { throw ...
Load the entire result set in a greedy fashion . This is required to support methods on the Collection interface
161,517
public synchronized Object [ ] allRemainingElements ( ) throws RemoteException , EnumeratorException { if ( ! hasMoreElementsR ( ) ) { throw new NoMoreElementsException ( ) ; } EJBObject [ ] remainder = null ; if ( ! exhausted ) { try { remainder = vEnum . allRemainingElements ( ) ; } catch ( NoMoreElementsException ex...
Obtain all of the remaining elements from the enumeration
161,518
void extractPersistenceUnits ( JPAPXml pxml ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "extractPersistenceUnits : " + pxml ) ; JaxbPersistence p = JaxbUnmarshaller . unmarshal ( pxml ) ; List < JaxbPUnit > pus = p . getPersisten...
Populates the list of persistence units defined in this persistence . xml .
161,519
void close ( ) { synchronized ( ivPuList ) { for ( JPAPUnitInfo puInfo : ivPuList . values ( ) ) { puInfo . close ( ) ; } ivPuList . clear ( ) ; } }
Close all the active EntityManagers declared in this persistence . xml .
161,520
JPAPUnitInfo addPU ( String puName , JPAPUnitInfo puInfo ) { synchronized ( ivPuList ) { return ivPuList . put ( puName , puInfo ) ; } }
Adds the puInfo to the collection maintained in this xml info object .
161,521
StringBuilder toStringBuilder ( StringBuilder sbuf ) { synchronized ( ivPuList ) { sbuf . append ( "\n PxmlInfo: ScopeName=" ) . append ( ivScopeInfo . getScopeName ( ) ) . append ( "\tRootURL = " ) . append ( ivRootURL ) . append ( "\t# PUs = " ) . append ( ivPuList . size ( ) ) . append ( "\t[" ) ; int index = 0 ; f...
Dump this persistence . xml data to the input StringBuilder .
161,522
private static void restoreInvocationSubject ( SubjectCookie cookie ) { try { if ( cookie . token != null ) { ThreadIdentityManager . resetChecked ( cookie . token ) ; } } catch ( ThreadIdentityException e ) { throw new SecurityException ( e ) ; } finally { SubjectManagerService sms = smServiceRef . getService ( ) ; if...
Restore the invocation subject .
161,523
public RetryState createRetryState ( RetryPolicy policy , MetricRecorder metricRecorder ) { if ( policy == null ) { return new RetryStateNullImpl ( ) ; } else { return new RetryStateImpl ( policy , metricRecorder ) ; } }
Create an object implementing Retry
161,524
public SyncBulkheadState createSyncBulkheadState ( BulkheadPolicy policy , MetricRecorder metricRecorder ) { if ( policy == null ) { return new SyncBulkheadStateNullImpl ( ) ; } else { return new SyncBulkheadStateImpl ( policy , metricRecorder ) ; } }
Create an object implementing a synchronous Bulkhead
161,525
public TimeoutState createTimeoutState ( ScheduledExecutorService executorService , TimeoutPolicy policy , MetricRecorder metricRecorder ) { if ( policy == null ) { return new TimeoutStateNullImpl ( ) ; } else { return new TimeoutStateImpl ( executorService , policy , metricRecorder ) ; } }
Create an object implementing Timeout
161,526
public CircuitBreakerState createCircuitBreakerState ( CircuitBreakerPolicy policy , MetricRecorder metricRecorder ) { if ( policy == null ) { return new CircuitBreakerStateNullImpl ( ) ; } else { return new CircuitBreakerStateImpl ( policy , metricRecorder ) ; } }
Create an object implementing CircuitBreaker
161,527
public Object [ ] getResults ( String topic ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getResults" , topic ) ; if ( cachedResults != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getResults" , cachedResu...
postProcessMatches methods of the handlers .
161,528
protected String createPlainTextJWT ( ) { com . google . gson . JsonObject header = createHeader ( ) ; com . google . gson . JsonObject payload = createPayload ( ) ; String plainTextTokenString = computeBaseString ( header , payload ) ; StringBuffer sb = new StringBuffer ( plainTextTokenString ) ; sb . append ( "." ) ....
Creates the plain text JWT .
161,529
private ConnectionData findConnectionDataToUse ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findConnectionDataToUse" ) ; ConnectionData connectionDataToUse = null ; synchronized ( connectionData ) { int lowestUseCount = conversationsPerConnection ; for ( ...
Helper method chooses the connection to use for a new conversation .
161,530
private Conversation doConnect ( ConversationReceiveListener conversationReceiveListener , ConversationUsageType usageType , JFapAddressHolder jfapAddressHolder , final NetworkConnectionFactoryHolder ncfHolder ) throws JFapConnectFailedException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && t...
Actually do the connecting creating a new ConnectionData if required
161,531
private NetworkConnection connectOverNetwork ( JFapAddressHolder addressHolder , NetworkConnectionFactoryHolder factoryHolder ) throws JFapConnectFailedException , FrameworkException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "connectOverNetwork" , new Objec...
Create a new connection over the network
161,532
private ConnectionData createnewConnectionData ( NetworkConnection vc ) throws FrameworkException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createnewConnectionData" , vc ) ; ConnectionData connectionDataToUse ; NetworkConnectionContext connLink = vc . getN...
Create a new Connection data object
161,533
private Conversation startNewConversation ( ConnectionData connectionDataToUse , ConversationReceiveListener conversationReceiveListener , boolean isNewConnectionData , boolean handshake ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc ,...
start a new conversation using the specified ConnectionData object
161,534
protected synchronized void connectionPending ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "connectionPending" ) ; ++ connectAttemptsPending ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , connectAtt...
Marks the group as having been selected to establish a new conversation . This is used to close a window where the group can be selected but then get closed before the connect call is made .
161,535
protected synchronized void close ( OutboundConnection connection ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "close" , connection ) ; if ( connection . getConnectionData ( ) . getConnectionDataGroup ( ) != this ) { if ( TraceComponent . isAnyTracingEnabled...
Close a conversation on the specified connection . The connection must be part of this group . If the connection has no more conversations left using it then it is added to the idle pool .
161,536
protected boolean isEmpty ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isEmpty" ) ; boolean result ; synchronized ( this ) { synchronized ( connectionData ) { result = connectionData . isEmpty ( ) ; } result = result && ( connectAttemptsPending == 0 ) ; }...
Determines if this group is empty . For the group to be empty it must contain no connection data objects and have no connection attempts pending . This second criteria stops the group from being discarded between selection for establishing a new conversation and actually establishing the conversation .
161,537
protected void purgeFromInvalidateImpl ( OutboundConnection connection , boolean notifyPeer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "purgeFromInvalidateImpl" , new Object [ ] { connection , Boolean . valueOf ( notifyPeer ) } ) ; purge ( connection , tru...
Purge a connection from this group from within invalidate processing . Purging a connection removes it from the group even if the connection still has conversations associated with it . The purged connection is closed and not added to the idle pool .
161,538
protected void purgeClosedConnection ( OutboundConnection connection ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "purgeClosedConnection" , connection ) ; purge ( connection , false , false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEna...
Purge a connection from this group because it has already been closed . The purged connection is not added to the idle pool .
161,539
public void removeConnectionDataFromGroup ( ConnectionData cd ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeConnectionDataFromGroup" , new Object [ ] { cd } ) ; boolean removed = false ; synchronized ( connectionData ) { removed = connectionData . remo...
Remove the connection from the group
161,540
public static String getDateString ( Date date ) { SimpleDateFormat sdf = new SimpleDateFormat ( sdformatMillisec ) ; sdf . setTimeZone ( TimeZone . getTimeZone ( "GMT" ) ) ; StringBuffer dateBuffer = new StringBuffer ( sdf . format ( date ) ) ; dateBuffer . insert ( dateBuffer . length ( ) - 2 , ":" ) ; return dateBuf...
Returns a date String from the specified Date object . It is expected to be called before passing the date to SDO set method .
161,541
public static String [ ] getRDNAttributes ( String dn ) { String rdnstr = getRDN ( dn ) ; StringTokenizer st = new StringTokenizer ( rdnstr . toLowerCase ( ) , "+" ) ; List < String > list = new ArrayList < String > ( ) ; while ( st . hasMoreTokens ( ) ) { String rdn = st . nextToken ( ) ; int index = rdn . indexOf ( '...
Return an array of RDN attributes of the given DN in lower case form .
161,542
public static String getRDN ( String DN ) { if ( DN == null || DN . trim ( ) . length ( ) == 0 ) { return DN ; } String RDN = null ; try { LdapName name = new LdapName ( DN ) ; if ( name . size ( ) == 0 ) { return DN ; } RDN = name . get ( name . size ( ) - 1 ) ; } catch ( InvalidNameException e ) { e . getMessage ( ) ...
Gets the RDN from the specified DN For example uid = persona will be returned for given uid = persona cn = users dc = yourco dc = com .
161,543
static public LdapURL [ ] getLdapURLs ( Attribute attr ) throws WIMException { final String METHODNAME = "getLdapURLs" ; LdapURL [ ] ldapURLs = new LdapURL [ 0 ] ; if ( attr != null ) { List < LdapURL > ldapURLList = new ArrayList < LdapURL > ( attr . size ( ) ) ; try { for ( NamingEnumeration < ? > enu = attr . getAll...
Gets the LdapURL array from the given dynamic member attribute .
161,544
public static String getUniqueKey ( X509Certificate cert ) { StringBuffer key = new StringBuffer ( "subjectDN:" ) ; key . append ( cert . getSubjectX500Principal ( ) . getName ( ) ) . append ( "issuerDN:" ) . append ( cert . getIssuerX500Principal ( ) . getName ( ) ) ; return null ; }
Get a unique key for a certificate .
161,545
static String getDNSubField ( String varName , String DN ) throws CertificateMapperException { if ( varName . equals ( "DN" ) ) { return DN ; } StringTokenizer st = new StringTokenizer ( DN ) ; for ( ; ; ) { String name , value ; try { name = st . nextToken ( ",= " ) ; value = st . nextToken ( "," ) ; if ( value != nul...
Given input return the digest version .
161,546
public static short getMembershipScope ( String scope ) { if ( scope != null ) { scope = scope . trim ( ) ; if ( LdapConstants . LDAP_DIRECT_GROUP_MEMBERSHIP_STRING . equalsIgnoreCase ( scope ) ) { return LdapConstants . LDAP_DIRECT_GROUP_MEMBERSHIP ; } else if ( LdapConstants . LDAP_NESTED_GROUP_MEMBERSHIP_STRING . eq...
Gets the short form the scope from the string form of the scope
161,547
public static boolean inAttributes ( String attrName , Attributes attrs ) { for ( NamingEnumeration < String > neu = attrs . getIDs ( ) ; neu . hasMoreElements ( ) ; ) { String attrId = neu . nextElement ( ) ; if ( attrId . equalsIgnoreCase ( attrName ) ) { return true ; } } return false ; }
Whether the specified attribute name is contained in the attributes .
161,548
public static Attribute cloneAttribute ( String newAttrName , Attribute attr ) throws WIMSystemException { Attribute newAttr = new BasicAttribute ( newAttrName ) ; try { for ( NamingEnumeration < ? > neu = attr . getAll ( ) ; neu . hasMoreElements ( ) ; ) { newAttr . add ( neu . nextElement ( ) ) ; } } catch ( NamingEx...
Clone the specified attribute with a new name .
161,549
public static String convertToDashedString ( byte [ ] objectGUID ) { StringBuilder displayStr = new StringBuilder ( ) ; displayStr . append ( prefixZeros ( objectGUID [ 3 ] & 0xFF ) ) ; displayStr . append ( prefixZeros ( objectGUID [ 2 ] & 0xFF ) ) ; displayStr . append ( prefixZeros ( objectGUID [ 1 ] & 0xFF ) ) ; di...
Convert the byte array to Active Directory GUID format .
161,550
public static JsonValue serializeAsJson ( Object o ) throws IOException { try { return findFieldsToSerialize ( o ) . mainObject ; } catch ( IllegalStateException ise ) { throw new IOException ( "Unable to build JSON for Object" , ise ) ; } catch ( JsonException e ) { throw new IOException ( "Unable to build JSON for Ob...
Convert a POJO into a serialized JsonValue object
161,551
private static ClassAndMethod getClassForFieldName ( String fieldName , Class < ? > classToLookForFieldIn ) { return internalGetClassForFieldName ( fieldName , classToLookForFieldIn , false ) ; }
Gets a class for a JSON field name by looking in a given Class for an appropriate setter . The setter is assumed not to be a Collection .
161,552
private static ClassAndMethod getClassForCollectionOfFieldName ( String fieldName , Class < ? > classToLookForFieldIn ) { return internalGetClassForFieldName ( fieldName , classToLookForFieldIn , true ) ; }
Gets a class for a JSON field name by looking in a given Class for an appropriate setter . The setter is assumed to be a Collection .
161,553
private static ClassAndMethod internalGetClassForFieldName ( String fieldName , Class < ? > classToLookForFieldIn , boolean isForArray ) { Method found = null ; String fieldNameAsASetter = new StringBuilder ( "set" ) . append ( fieldName . substring ( 0 , 1 ) . toUpperCase ( ) ) . append ( fieldName . substring ( 1 ) )...
Utility method given a JSON field name and an associated POJO it will hunt for the appropriate setter to use and if located return the type the setter expects along with a reflected reference to the method itself .
161,554
public static void addThreadIdentityService ( ThreadIdentityService tis ) { if ( tis != null ) { threadIdentityServices . add ( tis ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "A ThreadIdentityService implementation was added." , tis . getClass ( ) . getName ( ) ) ...
Add a ThreadIdentityService reference . This method is called by ThreadIdentityManagerConfigurator when a ThreadIdentityService shows up in the OSGI framework .
161,555
public static void addJ2CIdentityService ( J2CIdentityService j2cIdentityService ) { if ( j2cIdentityService != null ) { j2cIdentityServices . add ( j2cIdentityService ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "A J2CIdentityService implementation was added." , j2...
Add a J2CIdentityService reference . This method is called by ThreadIdentityManagerConfigurator when a J2CIdentityService shows up in the OSGI framework .
161,556
public static void removeThreadIdentityService ( ThreadIdentityService tis ) { if ( tis != null ) { threadIdentityServices . remove ( tis ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "A ThreadIdentityService implementation was removed." , tis . getClass ( ) . getNam...
Remove a ThreadIdentityService reference . This method is called by ThreadIdentityManagerConfigurator when a ThreadIdentityService leaves the OSGI framework .
161,557
public static void removeJ2CIdentityService ( J2CIdentityService j2cIdentityService ) { if ( j2cIdentityService != null ) { j2cIdentityServices . remove ( j2cIdentityService ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "A J2CIdentityService implementation was remove...
Remove a J2CIdentityService reference . This method is called by ThreadIdentityManagerConfigurator when a J2CIdentityService leaves the OSGI framework .
161,558
public static void removeAllThreadIdentityServices ( ) { threadIdentityServices . clear ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "All the ThreadIdentityService implementations were removed." ) ; } }
Remove all the ThreadIdentityService references . This method is called by ThreadIdentityManagerConfigurator when the ThreadIdentityService service tracker is closed .
161,559
public static void removeAllJ2CIdentityServices ( ) { j2cIdentityServices . clear ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "All the J2CIdentityService implementations were removed." ) ; } }
Remove all the J2CIdentityService references . This method is called by ThreadIdentityManagerConfigurator when the J2CIdentityService service tracker is closed .
161,560
private static boolean checkForRecursionAndSet ( ) { if ( recursionMarker . get ( ) == null ) { recursionMarker . set ( Boolean . TRUE ) ; return false ; } else { return true ; } }
Check for recursion .
161,561
public static Object runAsServer ( ) { LinkedHashMap < ThreadIdentityService , Object > token = null ; if ( ! checkForRecursionAndSet ( ) ) { try { for ( int i = 0 , size = threadIdentityServices . size ( ) ; i < size ; ++ i ) { ThreadIdentityService tis = threadIdentityServices . get ( i ) ; if ( tis . isAppThreadIden...
Set the server s identity as the thread identity .
161,562
@ SuppressWarnings ( { "rawtypes" } ) private static void resetCheckedInternal ( Object token , Exception firstException ) throws ThreadIdentityException { Exception cachedException = firstException ; if ( threadIdentityServices . isEmpty ( ) == false || j2cIdentityServices . isEmpty ( ) == false ) { if ( ! checkForRec...
Reset the identity on the thread .
161,563
public static Subject getJ2CInvocationSubject ( ) { Subject j2cSubject = null ; for ( J2CIdentityService j2cIdentityService : j2cIdentityServices ) { if ( j2cIdentityService . isJ2CThreadIdentityEnabled ( ) ) { Subject subject = j2cIdentityService . getJ2CInvocationSubject ( ) ; if ( subject != null ) { j2cSubject = su...
Get a J2C subject based on the invocation subject . Use first subject that is not null .
161,564
public Map < String , List < AppConfigurationEntry > > getEntries ( ) { Map < String , List < AppConfigurationEntry > > jaasConfigurationEntries = new HashMap < String , List < AppConfigurationEntry > > ( ) ; Map < String , String > jaasConfigIDs = new HashMap < String , String > ( ) ; if ( jaasLoginContextEntries != n...
Get all jaasLoginContextEntry in the server . xml and create any missing default entries . If there are no jaas configuration then create all the default entries system . DEFAULT system . WEB_INBOUND system . DESERIALIZE_CONTEXT system . UNAUTHENTICATED and WSLogin
161,565
public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { if ( "addTransformer" . equals ( method . getName ( ) ) ) { addTransformer ( ( ClassFileTransformer ) args [ 0 ] , args . length > 1 ? ( Boolean ) args [ 1 ] : false ) ; return null ; } if ( "removeTransformer" . equals ( method ...
If this method is traced it can call proxy . toString which causes another invoke call leading to an infinite loop .
161,566
public static void addSubjectCustomData ( Subject callSubject , Hashtable < String , Object > newCred ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "addSubjectCustomData" , newCred ) ; } AddPrivateCredentials action = new AddPrivateCredentials ( callSubject , newCred...
This method adds the custom Hashtable provided to the private credentials of the Subject passed in .
161,567
public static Hashtable < String , Object > getCustomCredentials ( Subject callSubject , String cacheKey ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getCustomCredentials" , cacheKey ) ; } if ( callSubject == null || cacheKey == null ) { if ( TraceComponent . isAny...
This method extracts the custom hashtable from the provided Subject using the cacheKey .
161,568
public static void handlePasswordValidationCallback ( PasswordValidationCallback callback , Subject executionSubject , Hashtable < String , Object > addedCred , String appRealm , Invocation [ ] invocations ) throws RemoteException , WSSecurityException { invocations [ 2 ] = Invocation . PASSWORDVALIDATIONCALLBACK ; if ...
The PasswordValidationCallback is used for password validation . This callback is used by the Resource Adapter to employ the password validation facilities of its containing runtime . This Callback is passed to the CallbackHandler provided by the J2C runtime during invocation of the handle method by the Resource Adapte...
161,569
private static void addUniqueIdAndGroupsForUser ( String securityName , Hashtable < String , Object > credData , String appRealm ) throws WSSecurityException , RemoteException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "addUniqueIdAndGroupsForUser" , securityName ) ...
Checks if the provided securityName is valid against the user registry . In case it is valid it then gets uniqueId and the groups for the user with the given securityName . It then uses this information to create the custom hashtable required for login .
161,570
private static boolean checkUserPassword ( String userSecurityName , String password , UserRegistry registry , String realmName , Hashtable < String , Object > addedCred , Invocation isCCInvoked ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "checkUserPassword user: "...
Checks the user name and password against the user registry provided . If the user name and password are valid it returns true .
161,571
public static String getCacheKey ( String uniqueId , String appRealm ) { StringBuilder cacheKey = new StringBuilder ( ) ; if ( uniqueId == null || appRealm == null ) { cacheKey . append ( CACHE_KEY_PREFIX ) ; } else { cacheKey . append ( CACHE_KEY_PREFIX ) . append ( uniqueId ) . append ( CACHE_KEY_SEPARATOR ) . append...
This method constructs the cache key that is required by security for caching the Subject .
161,572
private static boolean validateCallbackInformation ( Hashtable < String , Object > credData , String securityName , Invocation isInvoked ) { boolean status = true ; if ( isInvoked == Invocation . CALLERPRINCIPALCALLBACK ) { String existingName = ( String ) credData . get ( AttributeNameConstants . WSCREDENTIAL_SECURITY...
This method validates whether the user security name provided by the CallerPrincipalCallback and the PasswordValidationCallback match . It does this check only in case the CallerPrincipalCallback was invoked prior to the current invocation of the PasswordValidationCallback .
161,573
public static String objectId ( Object o ) { return ( o == null ) ? "0x0" : o . getClass ( ) . getName ( ) + "@" + Integer . toHexString ( o . hashCode ( ) ) ; }
A string that identifies an object instance within WAS messages and heap dumps .
161,574
synchronized void activate ( ComponentContext componentContext ) throws Exception { this . componentContext = componentContext ; this . classAvailableTransformer = new ClassAvailableTransformer ( this , instrumentation , includeBootstrap ) ; this . transformer = new ProbeClassFileTransformer ( this , instrumentation , ...
Activation callback from the Declarative Services runtime where the component is ready for activation .
161,575
synchronized void deactivate ( ) throws Exception { this . proxyActivator . deactivate ( ) ; this . instrumentation . removeTransformer ( this . classAvailableTransformer ) ; this . instrumentation . removeTransformer ( this . transformer ) ; this . shuttingDown = true ; Collection < Class < ? > > probedClasses = proce...
Deactivation callback from the Declarative Services runtime where the component is deactivated .
161,576
public boolean registerMonitor ( Object monitor ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "monitor = " + monitor ) ; } long startTime = System . nanoTime ( ) ; Set < ProbeListener > listeners = buildListenersFromAnnotated ( monitor ) ; if ( TraceComponent ...
Register an annotated object as a monitor . The annotations will be used to generate the appropriate configuration .
161,577
public boolean unregisterMonitor ( Object annotatedObject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "unregisteringMonitor = " + annotatedObject ) ; } Set < ProbeListener > listeners = removeListenersForMonitor ( annotatedObject ) ; if ( listeners == null ...
Unregister the specified monitor . Unregistering a monitor may cause one or more probes to be deactivated and the associated classes retransformed .
161,578
Set < ProbeListener > removeListenersForMonitor ( Object monitor ) { Set < ProbeListener > listeners = null ; listenersLock . writeLock ( ) . lock ( ) ; try { listeners = listenersForMonitor . remove ( monitor ) ; if ( listeners == null ) { listeners = Collections . emptySet ( ) ; } else { allRegisteredListeners . remo...
Remove the listeners associated with the specified monitor from the set of registered listeners .
161,579
Collection < Class < ? > > processNewListeners ( Collection < ProbeListener > listeners ) { Set < Class < ? > > classesToTransform = new HashSet < Class < ? > > ( ) ; Set < ProbeListener > matchingListeners = new HashSet < ProbeListener > ( ) ; Set < Class < ? > > monitorableTemp ; synchronized ( this . monitorable ) {...
Process recently registered listeners and calculate which classes need to be transformed with probes that drive the listeners .
161,580
synchronized Collection < Class < ? > > processRemovedListeners ( Collection < ProbeListener > listeners ) { Set < Class < ? > > classesToTransform = new HashSet < Class < ? > > ( ) ; for ( ProbeListener listener : listeners ) { Collection < ProbeImpl > listenerProbes = removeProbesByListener ( listener ) ; for ( Probe...
Process the recently unregistered listeners and calculate which classes need to be transformed to remove deactivated probes .
161,581
public void classAvailable ( Class < ? > clazz ) { if ( ! isMonitorable ( clazz ) ) { return ; } listenersLock . readLock ( ) . lock ( ) ; try { for ( ProbeListener listener : allRegisteredListeners ) { ProbeFilter filter = listener . getProbeFilter ( ) ; if ( filter . matches ( clazz ) ) { addInterestedByClass ( clazz...
Process a recently defined class to determine if it needs to be transformed with probes .
161,582
public synchronized ProbeImpl getProbe ( Class < ? > probedClass , String key ) { Map < String , ProbeImpl > classProbes = probesByKey . get ( probedClass ) ; if ( classProbes != null ) { return classProbes . get ( key ) ; } return null ; }
Get an existing instance of a probe with the specified source class and key .
161,583
public void addActiveProbesforListener ( ProbeListener listener , Collection < ProbeImpl > probes ) { addProbesByListener ( listener , probes ) ; for ( ProbeImpl probe : probes ) { addListenerByProbe ( probe , listener ) ; } }
Update the appropriate collections to reflect recently activated probes for the specified listener .
161,584
void addListenerByProbe ( ProbeImpl probe , ProbeListener listener ) { Set < ProbeListener > listeners = listenersByProbe . get ( probe ) ; if ( listeners == null ) { listeners = new CopyOnWriteArraySet < ProbeListener > ( ) ; listenersByProbe . putIfAbsent ( probe , listeners ) ; listeners = listenersByProbe . get ( p...
Add the specified listener to the collection of listeners associated with the specified probe .
161,585
boolean removeListenerByProbe ( ProbeImpl probe , ProbeListener listener ) { boolean deactivatedProbe = false ; Set < ProbeListener > listeners = listenersByProbe . get ( probe ) ; if ( listeners != null ) { listeners . remove ( listener ) ; if ( listeners . isEmpty ( ) ) { deactivateProbe ( probe ) ; deactivatedProbe ...
Remove the specified listener from the collection of listeners associated with the specified probe .
161,586
synchronized void deactivateProbe ( ProbeImpl probe ) { listenersByProbe . remove ( probe ) ; activeProbesById . remove ( probe . getIdentifier ( ) ) ; Class < ? > clazz = probe . getSourceClass ( ) ; Map < String , ProbeImpl > classProbesByKey = probesByKey . get ( clazz ) ; classProbesByKey . remove ( probe . getName...
Deactivate the specified probe and remove all data associated with the probe .
161,587
synchronized void addProbesByListener ( ProbeListener listener , Collection < ProbeImpl > probes ) { Set < ProbeImpl > listenerProbes = probesByListener . get ( listener ) ; if ( listenerProbes == null ) { listenerProbes = new HashSet < ProbeImpl > ( ) ; probesByListener . put ( listener , listenerProbes ) ; } listener...
Associate the specified collection of probes with the specified listener .
161,588
synchronized Collection < ProbeImpl > removeProbesByListener ( ProbeListener listener ) { Set < ProbeImpl > listenerProbes = probesByListener . remove ( listener ) ; if ( listenerProbes == null ) { listenerProbes = Collections . emptySet ( ) ; } return listenerProbes ; }
Remove all probes that were fired at the specified listener .
161,589
public boolean isExcludedClass ( String className ) { if ( className . startsWith ( "java/lang/reflect" ) ) { return true ; } if ( className . startsWith ( "sun/misc" ) ) { return true ; } if ( className . startsWith ( "sun/reflect" ) ) { return true ; } if ( className . startsWith ( "com/ibm/oti/" ) ) { return true ; ...
Determine if the named class is one that should be excluded from monitoring via probe injection . The patterns below generally include classes required to implement JVM function on which the monitoring code depends .
161,590
public boolean isMonitorable ( Class < ? > clazz ) { if ( notMonitorable . contains ( clazz ) ) { return false ; } else if ( monitorable . contains ( clazz ) ) { return true ; } boolean isMonitorable = true ; if ( ! instrumentation . isModifiableClass ( clazz ) ) { isMonitorable = false ; } else if ( clazz . isInterfac...
Determine of the specified class can be monitored via the probes infrastructure .
161,591
boolean checkPrefix ( char [ ] chars , int [ ] cursor ) { if ( chars . length > cursor [ 0 ] && chars [ cursor [ 0 ] ] == MatchSpace . NONWILD_MARKER ) return false ; if ( prefix == null ) return true ; if ( cursor [ 1 ] - cursor [ 0 ] < prefix . minlen ) return false ; for ( int i = 0 ; i < prefix . items . length ; i...
Override checkPrefix to implement topic semantics
161,592
static boolean topicSkipForward ( char [ ] chars , int [ ] cursor ) { if ( cursor [ 0 ] == cursor [ 1 ] ) return false ; while ( cursor [ 0 ] < cursor [ 1 ] && chars [ cursor [ 0 ] ] != MatchSpace . SUBTOPIC_SEPARATOR_CHAR ) cursor [ 0 ] ++ ; return true ; }
Skip forward to the next separator character
161,593
boolean checkSuffix ( char [ ] chars , int [ ] cursor ) { if ( suffix == null ) return true ; if ( cursor [ 1 ] - cursor [ 0 ] < suffix . minlen ) return false ; int last = suffix . items . length - 1 ; for ( int i = last ; i >= 0 ; i -- ) { Object item = suffix . items [ i ] ; if ( item == Pattern . matchOne ) if ( ! ...
Override checkSuffix to implement topic semantics
161,594
static boolean topicSkipBackward ( char [ ] chars , int [ ] cursor ) { if ( cursor [ 0 ] == cursor [ 1 ] ) return false ; while ( cursor [ 0 ] < cursor [ 1 ] && chars [ cursor [ 1 ] - 1 ] != MatchSpace . SUBTOPIC_SEPARATOR_CHAR ) cursor [ 1 ] -- ; return true ; }
Skip backward to the next separator character
161,595
static boolean matchBackward ( char [ ] chars , char [ ] pattern , int [ ] cursor ) { int start = cursor [ 1 ] - pattern . length ; if ( start < cursor [ 0 ] ) return false ; if ( ! matchForward ( chars , pattern , new int [ ] { start , cursor [ 1 ] } ) ) return false ; cursor [ 1 ] = start ; return true ; }
Match characters in a backward direction
161,596
public static Object parsePattern ( String pattern ) { char [ ] accum = new char [ pattern . length ( ) ] ; int finger = 0 ; List tokens = new ArrayList ( ) ; boolean trivial = true ; for ( int i = 0 ; i < pattern . length ( ) ; i ++ ) { char c = pattern . charAt ( i ) ; if ( c == '*' ) { finger = flush ( accum , finge...
Parse a string topic pattern into a TopicPattern object
161,597
public static StringArrayWrapper create ( String [ ] data , String bigDestName ) throws JMSException { int size = 0 ; if ( data != null ) size = data . length ; List fakedFullMsgPath = new ArrayList ( size + 1 ) ; if ( size > 0 ) { for ( int i = 0 ; i < size ; i ++ ) { String destName = data [ i ] ; String busName = nu...
This method is used for unit test purposes to simulate the creation of a StringArrayWrapper whose destinations are all on the local bus .
161,598
public String [ ] getArray ( ) { String [ ] newArray = null ; newArray = new String [ fullMsgPath . size ( ) - 1 ] ; for ( int i = 0 ; i < newArray . length ; i ++ ) { newArray [ i ] = ( ( SIDestinationAddress ) fullMsgPath . get ( i ) ) . getDestinationName ( ) ; } return newArray ; }
Returns a list of the destination names not including the big destination name .
161,599
public void createDestinationLocalization ( DestinationDefinition destinationDefinition , LocalizationDefinition destinationLocalizationDefinition , Set destinationLocalizingMEs , boolean isTemporary ) throws SIResourceException , SIMPDestinationAlreadyExistsException { if ( TraceComponent . isAnyTracingEnabled ( ) && ...
Method only called by unit tests to create destinations