idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
163,800
public static TxXATerminator instance ( String providerId ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "instance" , providerId ) ; final TxXATerminator xat ; synchronized ( _txXATerminators ) { if ( _txXATerminators . containsKey ( providerId ) ) { xat = ( TxXATerminator ) _txXATerminators . get ( providerId ) ...
Return the TxXATerminator instance specific to the given providerId
173
16
163,801
protected JCATranWrapper getTxWrapper ( Xid xid , boolean addAssociation ) throws XAException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getTxWrapper" , xid ) ; final JCATranWrapper txWrapper = TxExecutionContextHandler . getTxWrapper ( xid , addAssociation ) ; if ( txWrapper . getTransaction ( ) == null ) { /...
Gets the Transaction from the TxExecutionContextHandler that imported it
195
15
163,802
private String getMethod ( ELNode . Function func ) throws JspTranslationException { FunctionInfo funcInfo = func . getFunctionInfo ( ) ; String signature = funcInfo . getFunctionSignature ( ) ; int start = signature . indexOf ( ' ' ) ; if ( start < 0 ) { throw new JspTranslationException ( "jsp.error.tld.fn.invalid.si...
Get the method name from the signature .
193
8
163,803
public boolean exists ( String index ) { boolean exists = false ; if ( indexNames . isEmpty ( ) == false ) { for ( i = 0 ; i < indexNames . size ( ) ; i ++ ) { if ( index . equals ( ( String ) indexNames . elementAt ( i ) ) ) { exists = true ; break ; } } } return exists ; }
see if the passed in index exists in the vector
78
10
163,804
private void _createEagerBeans ( FacesContext facesContext ) { ExternalContext externalContext = facesContext . getExternalContext ( ) ; RuntimeConfig runtimeConfig = RuntimeConfig . getCurrentInstance ( externalContext ) ; List < ManagedBean > eagerBeans = new ArrayList < ManagedBean > ( ) ; // check all registered ma...
Checks for application scoped managed - beans with eager = true creates them and stores them in the application map .
418
23
163,805
protected static ExpressionFactory loadExpressionFactory ( String expressionFactoryClassName ) { try { Class < ? > expressionFactoryClass = Class . forName ( expressionFactoryClassName ) ; return ( ExpressionFactory ) expressionFactoryClass . newInstance ( ) ; } catch ( Exception ex ) { if ( log . isLoggable ( Level . ...
Loads and instantiates the given ExpressionFactory implementation .
124
11
163,806
protected void initCDIIntegration ( ServletContext servletContext , ExternalContext externalContext ) { // Lookup bean manager and put it into an application scope attribute to // access it later. Remember the trick here is do not call any CDI api // directly, so if no CDI api is on the classpath no exception will be t...
The intention of this method is provide a point where CDI integration is done . Faces Flow and javax . faces . view . ViewScope requires CDI in order to work so this method should set a BeanManager instance on application map under the key oam . cdi . BEAN_MANAGER_INSTANCE . The default implementation look on ServletCo...
511
83
163,807
ThreadGroup getThreadGroup ( String identifier , String threadFactoryName , ThreadGroup parentGroup ) { ConcurrentHashMap < String , ThreadGroup > threadFactoryToThreadGroup = metadataIdentifierToThreadGroups . get ( identifier ) ; if ( threadFactoryToThreadGroup == null ) if ( metadataIdentifierService . isMetaDataAva...
Returns the thread group to use for the specified application component .
226
12
163,808
void threadFactoryDestroyed ( String threadFactoryName , ThreadGroup parentGroup ) { Collection < ThreadGroup > groupsToDestroy = new LinkedList < ThreadGroup > ( ) ; for ( ConcurrentHashMap < String , ThreadGroup > threadFactoryToThreadGroup : metadataIdentifierToThreadGroups . values ( ) ) { ThreadGroup group = threa...
Invoke this method when destroying a ManagedThreadFactory in order to interrupt all managed threads that it created .
148
22
163,809
protected void createRealizationAndState ( MessageProcessor messageProcessor , TransactionCommon transaction ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createRealizationAndState" , new Object [ ] { messageProcessor , transaction } ) ; /* * Create associated stat...
Cold start version of State Handler creation .
157
8
163,810
protected void reconstitute ( MessageProcessor processor , HashMap durableSubscriptionsTable , int startMode ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "reconstitute" , new Object [ ] { processor , durableSubscriptionsTable , new Intege...
Overide the reconstitute method so we can set the message processor instance as this will have been done by the cursor . next method .
157
28
163,811
synchronized private void _put ( String componentFamily , String rendererType , Renderer renderer ) { Map < String , Renderer > familyRendererMap = _renderers . get ( componentFamily ) ; if ( familyRendererMap == null ) { familyRendererMap = new ConcurrentHashMap < String , Renderer > ( 8 , 0.75f , 1 ) ; _renderers . p...
Put the renderer on the double map
225
8
163,812
public Object get ( Object key ) { NonSyncHashtableEntry tab [ ] = table ; int hash = key . hashCode ( ) ; int index = ( hash & 0x7FFFFFFF ) % tab . length ; for ( NonSyncHashtableEntry e = tab [ index ] ; e != null ; e = e . next ) { if ( ( e . hash == hash ) && e . key . equals ( key ) ) { return e . value ; } } retu...
Returns the value to which the specified key is mapped in this hashtable .
103
15
163,813
public void write ( Writer out , ELContext ctx ) throws ELException , IOException { out . write ( this . literal ) ; }
Allow this instance to write to the passed Writer given the ELContext state
30
14
163,814
public Object provideCacheable ( Object key ) { if ( tc . isDebugEnabled ( ) ) tc . debug ( this , cclass , "provideCacheable" , key ) ; return null ; }
Cache methods do nothing for this type
43
7
163,815
void setMatcher ( ContentMatcher m ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "setMatcher" , "matcher: " + m + ", hasContent: " + new Boolean ( hasContent ) ) ; wildMatchers . add ( m ) ; this . hasContent |= m . hasTests ( ) ; if ( tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "setMatcher"...
Caches a matcher
108
5
163,816
ContentMatcher [ ] getMatchers ( ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "getMatchers" ) ; // ans removed as it is never used ! // Matcher[] ans = new Matcher[wildMatchers.size()]; if ( tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "getMatchers" ) ; return ( ContentMatcher [ ] ) wildMatc...
Returns the Matcher cache as an array
114
8
163,817
public ManagedObject get ( Token token ) throws ObjectManagerException { final String methodName = "get" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) { trace . entry ( this , cclass , methodName , token ) ; trace . exit ( this , cclass , methodName ) ; } // if (Tracing.isAnyTracingEnabled() ...
Always throws InMemoryObjectNotAvailableException .
109
9
163,818
public static AccessLog . Format convertNCSAFormat ( String name ) { if ( null == name ) { return AccessLog . Format . COMMON ; } AccessLog . Format format = AccessLog . Format . COMMON ; String test = name . trim ( ) . toLowerCase ( ) ; if ( "combined" . equals ( test ) ) { format = AccessLog . Format . COMBINED ; } r...
Convert the input string into the appropriate Format setting .
91
11
163,819
public static DebugLog . Level convertDebugLevel ( String name ) { if ( null == name ) { return DebugLog . Level . NONE ; } // WAS panels have expanded names for some of these so we're doing // a series of checks instead of the enum.valueOf() option // default to the WARNING level DebugLog . Level level = DebugLog . Le...
Convert the input string into the appropriate debug log level setting .
231
13
163,820
private static Throwable findRootCause ( Throwable t ) { Throwable root = t ; Throwable cause = root . getCause ( ) ; while ( cause != null ) { root = cause ; cause = root . getCause ( ) ; } return root ; }
Find root cause of a specified Throwable object .
55
10
163,821
public void setCheckConfig ( boolean checkConfig ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setCheckConfig: " + checkConfig ) ; ivCheckConfig = checkConfig ; }
F743 - 33178
57
6
163,822
public void addSingleton ( BeanMetaData bmd , boolean startup , Set < String > dependsOnLinks ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "addSingleton: " + bmd . j2eeName + " (startup=" + startup + ", dependsOn=" + ( dependsOnLinks != null ) + ")" ) ; if ( startup )...
Adds a singleton bean belonging to this application .
214
10
163,823
public synchronized void checkIfCreateNonPersistentTimerAllowed ( EJBModuleMetaDataImpl mmd ) { if ( ivStopping ) { throw new EJBStoppedException ( ivName ) ; } if ( mmd != null && mmd . ivStopping ) { throw new EJBStoppedException ( mmd . getJ2EEName ( ) . toString ( ) ) ; } }
Prevent non - persistent timers from being created after the application or module has begun stopping .
86
18
163,824
private void finishStarting ( ) throws RuntimeWarning { boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "finishStarting: " + ivName ) ; // NOTE - Any state that is cleared here should also be cleared in // stoppingModule. if ( ivModules != nul...
Notification that the application is about to finish starting . Performs processing of singletons after all modules have been started but before the application has finished starting . Module references are resolved and startup singletons are started .
234
44
163,825
private HomeRecord resolveEJBLink ( J2EEName source , String link ) throws RuntimeWarning { boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resolveEJBLink: " + link ) ; String module = source . getModule ( ) ; String component = source . getC...
Resolves a dependency reference link to another EJB .
456
11
163,826
private void resolveDependencies ( ) throws RuntimeWarning { // d684950 if ( EJSPlatformHelper . isZOSCRA ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "resolveDependencies: skipped in adjunct process" ) ; return ; } // F743-20281 - If an exception happened during ...
Resolves and verifies the singleton dependency links .
296
11
163,827
private void resolveBeanDependencies ( BeanMetaData bmd , Set < BeanMetaData > used ) throws RuntimeWarning { boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resolveBeanDependencies: " + bmd . j2eeName ) ; // F7434950.CodRev - If another bean...
Verifies that the specified bean only depends on other singletons and that it does not depend on itself . This method calls itself recursively to process all dependencies .
701
34
163,828
private void createStartupBeans ( ) throws RuntimeWarning { boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; // d684950 if ( EJSPlatformHelper . isZOSCRA ( ) ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "createStartupBeans: skipped in adjunct process" ) ; return ; } if ( isTraceOn && ...
Creates all startup singleton beans .
544
8
163,829
private void notifyApplicationEventListeners ( Collection < EJBModuleMetaDataImpl > modules , boolean started ) throws RuntimeWarning { // F743-26072 final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "notifyApplicationEventListeners: start...
Notifies all application event listeners in the specified modules .
372
11
163,830
public synchronized void addSingletonInitialization ( EJSHome home ) { if ( ivStopping ) { throw new EJBStoppedException ( home . getJ2EEName ( ) . toString ( ) ) ; } if ( ivSingletonInitializations == null ) { ivSingletonInitializations = new LinkedHashSet < EJSHome > ( ) ; } ivSingletonInitializations . add ( home ) ...
Record the initialization attempt of a singleton . This method must not be called for a bean before it is called for each of that bean s dependencies . This method may be called multiple times for the same bean but only the first call will have an effect .
93
51
163,831
public synchronized boolean queueOrStartNonPersistentTimerAlarm ( TimerNpImpl timer , EJBModuleMetaDataImpl module ) { if ( ivStopping ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "not starting timer alarm after application stop: " + timer ) ; return false ; } else { ...
Queues or starts a non - persistent timer alarm returning an indication of whether or not the operation was successful .
236
22
163,832
private void beginStopping ( boolean application , J2EEName j2eeName , Collection < EJBModuleMetaDataImpl > modules ) { // F743-26072 boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "beginStopping: application=" + application + ", " + j2eeName...
Notification that the application or a module within the application will begin stopping stopping . This method should never throw an exception .
520
24
163,833
public void stoppingModule ( EJBModuleMetaDataImpl mmd ) { // F743-26072 boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "stoppingModule: " + mmd . getJ2EEName ( ) ) ; // If the application is stopping (rather than a single module), then // we...
Notification that a module within this application will begin stopping . This method should never throw an exception .
243
20
163,834
public void stopping ( ) { boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "stopping" ) ; J2EEName j2eeName = ivApplicationMetaData == null ? null : ivApplicationMetaData . getJ2EEName ( ) ; beginStopping ( true , j2eeName , ivModules ) ; // F...
Notification that the application will begin stopping .
107
9
163,835
void validateVersionedModuleBaseName ( String appBaseName , String modBaseName ) { for ( EJBModuleMetaDataImpl ejbMMD : ivModules ) { String versionedAppBaseName = ejbMMD . ivVersionedAppBaseName ; if ( versionedAppBaseName != null && ! versionedAppBaseName . equals ( appBaseName ) ) { throw new IllegalArgumentExceptio...
F54184 . 1 F54184 . 2
166
10
163,836
public SIBusMessage next ( ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SINotAuthorizedException , SIResourceException , SIErrorException { checkValid ( ) ; return _delegate . next ( ) ; }
Browses the next message . Checks that the session is valid and then delegates .
81
16
163,837
public void reset ( ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SIResourceException , SIErrorException { checkValid ( ) ; _delegate . reset ( ) ; }
Resets the browse cursor . Checks that the session is valid and then delegates .
70
16
163,838
private void writeObject ( ObjectOutputStream out ) throws IOException { try { out . defaultWriteObject ( ) ; // p113380 - start of change // write out the header information out . write ( EYECATCHER ) ; out . writeShort ( PLATFORM ) ; out . writeShort ( VERSION_ID ) ; // p113380 - end of change // write out the common...
We will implement writeObject in order to controll the marshalling for this object . Note this is overriding the default implementation of the Serializable interface .
553
30
163,839
public static TransmissionLayout segmentToLayout ( int segment ) { TransmissionLayout layout = XMIT_LAYOUT_UNKNOWN ; switch ( segment ) { case 0x00 : layout = XMIT_LAYOUT_UNKNOWN ; break ; case JFapChannelConstants . SEGMENT_HEARTBEAT : case JFapChannelConstants . SEGMENT_HEARTBEAT_RESPONSE : case JFapChannelConstants ...
Converts from a segment ID to a layout for the transmission .
261
13
163,840
public static String getSegmentName ( int segmentType ) { String segmentName = "(Unknown segment type)" ; segmentName = segValues . get ( segmentType ) ; if ( segmentName == null ) segmentName = "(Unknown segment type)" ; return segmentName ; }
This method can be used to return the actual segment name for a given segment type .
57
17
163,841
private boolean updateConfiguration ( EvaluationResult result , ConfigurationInfo info , Collection < ConfigurationInfo > infos , boolean encourageUpdates ) throws ConfigUpdateException { //encourageUpdates is overruled by metatype declining nested notifications. encourageUpdates &= ! ! ! ( result . getRegistryEntry ( ...
Recursively updates the configuration in config admin
883
9
163,842
private static Dictionary < String , Object > massageNewConfig ( Dictionary < String , Object > oldProps , Dictionary < String , Object > newProps ) { ConfigurationDictionary ret = new ConfigurationDictionary ( ) ; if ( oldProps != null ) { for ( Enumeration < String > keyItr = oldProps . keys ( ) ; keyItr . hasMoreEle...
Return a new config dictionary with initial hidden keys and values from o then add all keys and values from n to the new config dictionary and return . If returning dictionary is empty return null instead .
329
38
163,843
void reset ( com . ibm . wsspi . bytebuffer . WsByteBuffer buff , RichByteBufferPool p ) { this . buffer = buff ; this . pool = p ; }
Resets the buffer with a new underlying buffer .
41
10
163,844
public synchronized void setDelegate ( Future < V > delegate ) { if ( delegateHolder . isCancelled ( ) ) { delegate . cancel ( mayInterruptWhenCancellingDelegate ) ; } else { this . delegate = delegate ; delegateHolder . complete ( delegate ) ; } }
Set the Future to delegate calls to
63
7
163,845
public boolean isUnauthenticated ( Subject subject ) { if ( subject == null ) { return true ; } WSCredential wsCred = getWSCredential ( subject ) ; if ( wsCred == null ) { return true ; } else { return wsCred . isUnauthenticated ( ) ; } }
Check whether the subject is un - authenticated or not .
71
11
163,846
public String getRealm ( Subject subject ) throws Exception { String realm = null ; WSCredential credential = getWSCredential ( subject ) ; if ( credential != null ) { realm = credential . getRealmName ( ) ; } return realm ; }
Gets the realm from the subjects WSCredential .
55
12
163,847
public static GSSCredential getGSSCredentialFromSubject ( final Subject subject ) { if ( subject == null ) { return null ; } GSSCredential gssCredential = AccessController . doPrivileged ( new PrivilegedAction < GSSCredential > ( ) { @ Override public GSSCredential run ( ) { GSSCredential gssCredInSubject = null ; Set ...
Gets a GSSCredential from a Subject
271
11
163,848
@ Sensitive public Hashtable < String , Object > createNewHashtableInSubject ( @ Sensitive final Subject subject ) { return AccessController . doPrivileged ( new NewHashtablePrivilegedAction ( subject ) ) ; }
Creates a Hashtable of values in the Subject without tracing the Subject .
47
15
163,849
@ Sensitive public Hashtable < String , ? > getSensitiveHashtableFromSubject ( @ Sensitive final Subject subject ) { if ( System . getSecurityManager ( ) == null ) { return getHashtableFromSubject ( subject ) ; } else { return AccessController . doPrivileged ( new GetHashtablePrivilegedAction ( subject ) ) ; } }
Gets a Hashtable of values from the Subject without tracing the Subject or hashtable .
75
18
163,850
@ Sensitive public Hashtable < String , ? > getSensitiveHashtableFromSubject ( @ Sensitive final Subject subject , @ Sensitive final String [ ] properties ) { return AccessController . doPrivileged ( new PrivilegedAction < Hashtable < String , ? > > ( ) { @ Override public Hashtable < String , ? > run ( ) { if ( TraceC...
Gets a Hashtable of values from the Subject but do not trace the hashtable
285
17
163,851
public static void traceMessageIds ( TraceComponent callersTrace , String action , SIMessageHandle [ ] messageHandles ) { if ( ( light_tc . isDebugEnabled ( ) || callersTrace . isDebugEnabled ( ) ) && messageHandles != null ) { // Build our trace string StringBuffer trcBuffer = new StringBuffer ( ) ; trcBuffer . append...
Allow tracing of messages and transaction when deleting
237
8
163,852
public static void traceTransaction ( TraceComponent callersTrace , String action , Object transaction , int commsId , int commsFlags ) { if ( light_tc . isDebugEnabled ( ) || callersTrace . isDebugEnabled ( ) ) { // Build the trace string String traceText = action + ": " + transaction + " CommsId:" + commsId + " Comms...
Trace a transaction associated with an action .
146
9
163,853
public static void traceException ( TraceComponent callersTrace , Throwable ex ) { if ( light_tc . isDebugEnabled ( ) || callersTrace . isDebugEnabled ( ) ) { // Find XA completion code if one exists, as this isn't in a normal dump String xaErrStr = null ; if ( ex instanceof XAException ) { XAException xaex = ( XAExcep...
Trace an exception .
224
5
163,854
public static String minimalToString ( Object object ) { return object . getClass ( ) . getName ( ) + "@" + Integer . toHexString ( System . identityHashCode ( object ) ) ; }
Util to prevent full dump of the conversation in this class as that will print too much data if trace of this class is turned on to get transaction and msgid information
45
34
163,855
public static String msgToString ( SIBusMessage message ) { if ( message == null ) return STRING_NULL ; return message + "[" + message . getSystemMessageId ( ) + "]" ; }
Util to trace the System Message ID of a message along with the default toString
45
17
163,856
private final static void retransformClass ( Class < ? > clazz ) { if ( detailedTransformTrace && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "retransformClass" , clazz ) ; try { instrumentation . retransformClasses ( clazz ) ; } catch ( Throwable t ) { Tr . error ( tc , "INSTRUMENTATION_TRANSFORM_FAILED_FOR_CLASS_2" ,...
Ask the JVM to retransform the class that has recently been enabled for trace . This class will explicitly call the class loader to load and initialize the class to work around an IBM JDK issue with hot code replace during class initialization .
142
48
163,857
public void send ( final SIBusMessage msg , final SITransaction tran ) throws SISessionDroppedException , SIConnectionDroppedException , SISessionUnavailableException , SIConnectionUnavailableException , SIConnectionLostException , SILimitExceededException , SINotAuthorizedException , SIResourceException , SIErrorExcep...
Sends a message . Checks that the session is valid . Maps the transaction parameter before delegating .
127
20
163,858
protected IOResult attemptReadFromSocket ( TCPBaseRequestContext readReq , boolean fromSelector ) throws IOException { IOResult rc = IOResult . NOT_COMPLETE ; TCPReadRequestContextImpl req = ( TCPReadRequestContextImpl ) readReq ; TCPConnLink conn = req . getTCPConnLink ( ) ; long dataRead = 0 ; if ( req . getJITAlloca...
Attempt to read for the socket .
759
7
163,859
protected IOResult attemptWriteToSocket ( TCPBaseRequestContext req ) throws IOException { IOResult rc = IOResult . NOT_COMPLETE ; WsByteBuffer wsBuffArray [ ] = req . getBuffers ( ) ; long bytesWritten = attemptWriteToSocketUsingNIO ( req , wsBuffArray ) ; req . setLastIOAmt ( bytesWritten ) ; if ( TraceComponent . is...
Attempt to write information stored in the active buffers to the network .
541
13
163,860
static String getServerResourceAbsolutePath ( String resourcePath ) { String path = null ; File f = new File ( resourcePath ) ; if ( f . isAbsolute ( ) ) { path = resourcePath ; } else { WsLocationAdmin wla = locationService . getServiceWithException ( ) ; if ( wla != null ) path = wla . resolveString ( SERVER_CONFIG_L...
Return the absolute path of the given resource path relative to the server config dir . If the given resource path is already absolute then just return it . If the location admin service is not available then return null .
101
41
163,861
private AuthConfigProvider getAuthConfigProvider ( String appContext ) { AuthConfigProvider provider = null ; AuthConfigFactory providerFactory = getAuthConfigFactory ( ) ; if ( providerFactory != null ) { if ( providerConfigModified && providerFactory instanceof ProviderRegistry ) { ( ( ProviderRegistry ) providerFact...
Some comment why we re doing this
122
7
163,862
protected Subject doHashTableLogin ( Subject clientSubject , JaspiRequest jaspiRequest ) throws WSLoginFailedException { Subject authenticatedSubject = null ; final Hashtable < String , Object > hashTable = getCustomCredentials ( clientSubject ) ; String unauthenticatedSubjectString = UNAUTHENTICATED_ID ; String user =...
Create a WAS Subject using the HashTable obtained from the JASPI provider
860
15
163,863
public List < com . ibm . wsspi . security . wim . model . Context > getContexts ( ) { if ( contexts == null ) { contexts = new ArrayList < com . ibm . wsspi . security . wim . model . Context > ( ) ; } return this . contexts ; }
Gets the value of the contexts property .
68
9
163,864
public List < com . ibm . wsspi . security . wim . model . Entity > getEntities ( ) { if ( entities == null ) { entities = new ArrayList < com . ibm . wsspi . security . wim . model . Entity > ( ) ; } return this . entities ; }
Gets the value of the entities property .
68
9
163,865
public List < com . ibm . wsspi . security . wim . model . Control > getControls ( ) { if ( controls == null ) { controls = new ArrayList < com . ibm . wsspi . security . wim . model . Control > ( ) ; } return this . controls ; }
Gets the value of the controls property .
68
9
163,866
private int skipForward ( char [ ] chars , int start , int length ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "skipForward" , new Object [ ] { chars , new Integer ( start ) , new Integer ( length ) } ) ; int ans = length ; for ( int i = 0 ; i < length ; i ++ ) if ( chars [ start + i ] == MatchSpace ...
Skip forward to next separator
146
6
163,867
void get ( char [ ] chars , int start , int length , boolean invert , MatchSpaceKey msg , EvalCache cache , Object contextValue , SearchResults result ) throws MatchingException , BadMessageFormatMatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "get" , new Object [ ] { chars , new Integer...
Override get to rule out NONWILD_MARKER
176
12
163,868
public static void reloadApplications ( LibertyServer server , final Set < String > appIdsToReload ) throws Exception { ServerConfiguration config = server . getServerConfiguration ( ) . clone ( ) ; /* * Get the apps to remove. */ ConfigElementList < Application > toRemove = new ConfigElementList < Application > ( conf...
Reload select applications .
180
5
163,869
public static void updateConfigDynamically ( LibertyServer server , ServerConfiguration config , boolean waitForAppToStart ) throws Exception { resetMarksInLogs ( server ) ; server . updateServerConfiguration ( config ) ; server . waitForStringInLogUsingMark ( "CWWKG001[7-8]I" ) ; if ( waitForAppToStart ) { server . wa...
This method will the reset the log and trace marks for log and trace searches update the configuration and then wait for the server to re - initialize . Optionally it will then wait for the application to start .
122
41
163,870
public static void resetMarksInLogs ( LibertyServer server ) throws Exception { server . setMarkToEndOfLog ( server . getDefaultLogFile ( ) ) ; server . setMarkToEndOfLog ( server . getMostRecentTraceFile ( ) ) ; }
Reset the marks in all Liberty logs .
58
9
163,871
private void onHandlerEntry ( ) { if ( enabled ) { Type exceptionType = handlers . get ( handlerPendingInstruction ) ; // Clear the pending instruction flag handlerPendingInstruction = null ; // Filter the interested down to this exception Set < ProbeListener > filtered = new HashSet < ProbeListener > ( ) ; for ( Probe...
Generate the code required to fire a probe out of an exception handler .
489
15
163,872
public static FileLock getFileLock ( java . io . RandomAccessFile file , String fileName ) throws java . io . IOException { return ( FileLock ) Utils . getImpl ( "com.ibm.ws.objectManager.utils.FileLockImpl" , new Class [ ] { java . io . RandomAccessFile . class , String . class } , new Object [ ] { file , fileName } )...
Create a platform specific FileLock instance .
91
8
163,873
public static void initialize ( FacesContext context ) { if ( context . isProjectStage ( ProjectStage . Production ) ) { boolean initialize = true ; String elMode = WebConfigParamUtils . getStringInitParameter ( context . getExternalContext ( ) , FaceletCompositionContextImpl . INIT_PARAM_CACHE_EL_EXPRESSIONS , ELExpre...
This method should be called at startup to decide if a view processor should be provided or not to the runtime .
577
22
163,874
private void clearTransientAndNonFaceletComponents ( final FacesContext context , final UIComponent component ) { //Scan children int childCount = component . getChildCount ( ) ; if ( childCount > 0 ) { for ( int i = 0 ; i < childCount ; i ++ ) { UIComponent child = component . getChildren ( ) . get ( i ) ; if ( child ...
Clear all transient components not created by facelets algorithm . In this way we ensure the component tree does not have any changes done after markInitialState .
366
30
163,875
@ Override public void destroy ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "destroy" , this ) ; // check the TSR is active - otherwise we can trigger exceptions when we // try to get data out of it. if ( tsr . getTransactionKey ( ) != null ) { final Map < String , InstanceAndContext < ? > > storage = getStor...
Destroy the entire context . This causes
241
7
163,876
@ Override public void doPrePhaseActions ( FacesContext facesContext ) { if ( ! _flashScopeDisabled ) { final PhaseId currentPhaseId = facesContext . getCurrentPhaseId ( ) ; if ( PhaseId . RESTORE_VIEW . equals ( currentPhaseId ) ) { // restore the redirect value // note that the result of this method is used in many p...
Used to restore the redirect value and the FacesMessages of the previous request and to manage the flashMap tokens for this request before phase restore view starts .
153
31
163,877
@ Override public boolean isRedirect ( ) { FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; boolean thisRedirect = _isRedirectTrueOnThisRequest ( facesContext ) ; boolean prevRedirect = _isRedirectTrueOnPreviousRequest ( facesContext ) ; boolean executePhase = ! PhaseId . RENDER_RESPONSE . equals ( f...
Return the value of this property for the flash for this session .
106
13
163,878
@ Override public void keep ( String key ) { _checkFlashScopeDisabled ( ) ; FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; Map < String , Object > requestMap = facesContext . getExternalContext ( ) . getRequestMap ( ) ; Object value = requestMap . get ( key ) ; // if the key does not exist in the r...
Take a value from the requestMap or if it does not exist from the execute FlashMap and put it on the render FlashMap so it is visible on the next request .
269
35
163,879
@ Override public void putNow ( String key , Object value ) { _checkFlashScopeDisabled ( ) ; FacesContext . getCurrentInstance ( ) . getExternalContext ( ) . getRequestMap ( ) . put ( key , value ) ; }
This is just an alias for the request scope map .
53
11
163,880
@ Override public void setKeepMessages ( boolean keepMessages ) { FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; ExternalContext externalContext = facesContext . getExternalContext ( ) ; Map < String , Object > requestMap = externalContext . getRequestMap ( ) ; requestMap . put ( FLASH_KEEP_MESSAGE...
If this property is true the messages should be kept for the next request no matter if it is a normal postback case or a POST - REDIRECT - GET case .
84
35
163,881
@ SuppressWarnings ( "unchecked" ) private void _restoreMessages ( FacesContext facesContext ) { List < MessageEntry > messageList = ( List < MessageEntry > ) _getExecuteFlashMap ( facesContext ) . get ( FLASH_KEEP_MESSAGES_LIST ) ; if ( messageList != null ) { Iterator < MessageEntry > iterMessages = messageList . ite...
Restore any saved FacesMessages from the previous request . Note that we don t need to save the keepMessages value for this request because we just have to check if the value for FLASH_KEEP_MESSAGES_LIST exists .
175
52
163,882
private void _saveRenderFlashMapTokenForNextRequest ( FacesContext facesContext ) { ExternalContext externalContext = facesContext . getExternalContext ( ) ; String tokenValue = ( String ) externalContext . getRequestMap ( ) . get ( FLASH_RENDER_MAP_TOKEN ) ; ClientWindow clientWindow = externalContext . getClientWindo...
Take the render map key and store it as a key for the next request .
347
16
163,883
private String _getRenderFlashMapTokenFromPreviousRequest ( FacesContext facesContext ) { ExternalContext externalContext = facesContext . getExternalContext ( ) ; String tokenValue = null ; ClientWindow clientWindow = externalContext . getClientWindow ( ) ; if ( clientWindow != null ) { if ( facesContext . getApplicat...
Retrieve the map token of the render map from the previous request .
351
14
163,884
@ SuppressWarnings ( "unchecked" ) private Map < String , Object > _getRenderFlashMap ( FacesContext context ) { // Note that we don't have to synchronize here, because it is no problem // if we create more SubKeyMaps with the same subkey, because they are // totally equal and point to the same entries in the SessionMa...
Return the flash map created on this traversal .
233
10
163,885
@ SuppressWarnings ( "unchecked" ) private Map < String , Object > _getExecuteFlashMap ( FacesContext context ) { // Note that we don't have to synchronize here, because it is no problem // if we create more SubKeyMaps with the same subkey, because they are // totally equal and point to the same entries in the SessionM...
Return the execute Flash Map .
234
6
163,886
private void _clearExecuteFlashMap ( FacesContext facesContext ) { Map < String , Object > map = _getExecuteFlashMap ( facesContext ) ; if ( ! map . isEmpty ( ) ) { //RTC 168417 / JIRA MYFACES-3975 //JSF 2.2 invoke PreClearFlashEvent facesContext . getApplication ( ) . publishEvent ( facesContext , PreClearFlashEvent ....
Destroy the execute FlashMap because it is not needed anymore .
179
12
163,887
private Cookie _createFlashCookie ( String name , String value , ExternalContext externalContext ) { Cookie cookie = new Cookie ( name , value ) ; cookie . setMaxAge ( - 1 ) ; cookie . setPath ( _getCookiePath ( externalContext ) ) ; cookie . setSecure ( externalContext . isSecure ( ) ) ; //cookie.setHttpOnly(true); if...
Creates a Cookie with the given name and value . In addition it will be configured with maxAge = - 1 the current request path and secure value .
119
31
163,888
private String _getCookiePath ( ExternalContext externalContext ) { String contextPath = externalContext . getRequestContextPath ( ) ; if ( contextPath == null || "" . equals ( contextPath ) ) { contextPath = "/" ; } return contextPath ; }
Returns the path for the Flash - Cookies .
56
9
163,889
private Boolean _convertToBoolean ( Object value ) { Boolean booleanValue ; if ( value instanceof Boolean ) { booleanValue = ( Boolean ) value ; } else { booleanValue = Boolean . parseBoolean ( value . toString ( ) ) ; } return booleanValue ; }
Convert the Object to a Boolean .
59
8
163,890
@ FFDCIgnore ( NumberFormatException . class ) public static Long evaluateDuration ( String strVal , TimeUnit endUnit ) { // If the value is a number, simply return the numeric value as a long try { return Long . valueOf ( strVal ) ; } catch ( NumberFormatException ex ) { // ignore } // Otherwise, parse the duration wi...
Converts a string value representing a unit of time into a Long value .
99
15
163,891
@ Trivial private static String collapseWhitespace ( String value ) { final int length = value . length ( ) ; for ( int i = 0 ; i < length ; ++ i ) { if ( isSpace ( value . charAt ( i ) ) ) { return collapse0 ( value , i , length ) ; } } return value ; }
Collapses contiguous sequences of whitespace to a single 0x20 . Leading and trailing whitespace is removed .
73
22
163,892
public void stop ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "CommsInboundChain Stop" ) ; //stopchain() first quiesce's(invokes chainQuiesced) depending on the chainQuiesceTimeOut //Once the chain is quiesced StopChainTask is initiated.Hence we block until the a...
stop will get called only from de - activate .
317
10
163,893
private boolean shouldDeferToJwtSso ( HttpServletRequest req , MicroProfileJwtConfig config , MicroProfileJwtConfig jwtssoConfig ) { if ( ( ! isJwtSsoFeatureActive ( config ) ) && ( jwtssoConfig == null ) ) { return false ; } String hdrValue = req . getHeader ( Authorization_Header ) ; if ( tc . isDebugEnabled ( ) ) { ...
if we don t have a valid bearer header and jwtsso is active we should defer .
149
20
163,894
protected boolean matches ( File f , boolean isFile ) { if ( fileFilter != null ) { if ( isFile && directoriesOnly ) { return false ; } else if ( ! isFile && filesOnly ) { return false ; } else if ( fileNameRegex != null ) { Matcher m = fileNameRegex . matcher ( f . getName ( ) ) ; if ( ! m . matches ( ) ) { return fal...
Check to see if this is a resource we re monitoring based on the filter configuration
99
16
163,895
public Object remove ( Object key ) { synchronized ( _cacheL2 ) { if ( ! _cacheL1 . containsKey ( key ) && ! _cacheL2 . containsKey ( key ) ) { // nothing to remove return null ; } Object retval ; Map newMap ; synchronized ( _cacheL1 ) { // "dummy" synchronization to guarantee _cacheL1 will be assigned after fully init...
This operation is very expensive . A full copy of the Map is created
165
14
163,896
public void complete ( VirtualConnection vc , TCPWriteRequestContext wsc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "complete() called: vc=" + vc ) ; } HttpOutboundServiceContextImpl mySC = ( HttpOutboundServiceContextImpl ) vc . getStateMap ( ) . get ( CallbackID...
Called by the TCP channel when the write has finished .
495
12
163,897
public synchronized void putString ( String item ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putString" , item ) ; checkValid ( ) ; // A String is presented by a BIT16 denoting the length followed by encoded bytes. If the // String is null, then a length o...
Puts a String into the byte buffer encoded in UTF8 .
456
13
163,898
public synchronized void putSIDestinationAddress ( SIDestinationAddress destAddr , short fapLevel ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putSIDestinationAddress" , new Object [ ] { destAddr , Short . valueOf ( fapLevel ) } ) ; checkValid ( ) ; String ...
Puts an SIDestinationAddress into the byte buffer .
532
13
163,899
public synchronized void putSelectionCriteria ( SelectionCriteria criteria ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putSelectionCriteria" , criteria ) ; checkValid ( ) ; String discriminator = null ; String selector = null ; short selectorDomain = ( sho...
Puts a SelectionCriteria object into the byte buffer .
227
12