idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
36,400
public int getRequiredRemoteBusinessInterfaceIndex ( String interfaceName ) throws IllegalStateException { int interfaceIndex = getRemoteBusinessInterfaceIndex ( interfaceName ) ; if ( interfaceIndex == - 1 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getRequiredRemo...
Gets the index of the remote busines interface . This method will throw an IllegalStateException if a remte interface could not be matched . If it is known that a match must occur on a remote business interface then this method should be used .
36,401
public String [ ] [ ] getMethodLevelCustomFinderMethodSignatures ( String cfprocessstring ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getMethodLevelCustomFinderMethodSignatures:" + cfprocessstring ) ; StringTokenizer st = new StringTokenizer ( cfprocessstring , ":" ...
d112604 . 1
36,402
public JsMessage transcribeToJmf ( ) throws MessageCopyFailedException , IncorrectMessageTypeException , UnsupportedEncodingException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "transcribeToJmf" ) ; JsMsgObject newJmo = null ; try { if ( this instanceof JsJm...
Transcribe this message to pure JMF
36,403
public int getApproximateLength ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getApproximateLength" ) ; if ( approxLength == - 1 ) approxLength = guessApproxLength ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exi...
Return an approximate size for the flattened message . It is important that this method is quick and cheap rather than highly accurate .
36,404
private final JsMessageImpl createNew ( ) throws MessageCopyFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createNew" ) ; JsMessageImpl newMsg = null ; Class msgClass = this . getClass ( ) ; try { newMsg = ( JsMessageImpl ) msgClass . newInstanc...
Return a new Jsmessage of the same specialization as this containing the given JsMsgObject .
36,405
private final JsMessageImpl createNewGeneralized ( JsMsgObject newJmo ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createNewGeneralized" ) ; JsMessageImpl newMsg = null ; newMsg = new JsMessageImpl ( newJmo ) ; if ( TraceComponent . isAnyTracingEnabled ( ) ...
Return a new JsMessage generalizing the message to just be a JsMessageImpl . The new message contains the given JsMsgObject .
36,406
@ SuppressWarnings ( "rawtypes" ) public static Hashtable parsePostData ( ServletInputStream in , String encoding , boolean multireadPropertyEnabled ) throws IOException { int inputLen ; byte [ ] postedBytes = null ; String postedBody ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . i...
begin 231634 Support posts with query parms in chunked body WAS . webcontainer
36,407
public final Item findOldestItem ( ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findOldestItem" ) ; ItemCollection ic = ( ( ItemCollection ) _getMembership ( ) ) ; if ( null == ic ) { if ( TraceComponent . isAnyTracingEnabled ( ...
Find the item that has been known to the stream for longest . The item returned may be in any of the states defined in the state model . The caller should not assume that the item can be used for any particular purpose .
36,408
protected void abort ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Aborting connection" ) ; } this . aborted = true ; }
Abort this context to trigger immediate exceptions on future IO requests .
36,409
protected void setTimeoutTime ( int time ) { int timeout = time ; if ( timeout == TCPRequestContext . NO_TIMEOUT ) { this . timeoutTime = TCPRequestContext . NO_TIMEOUT ; this . timeoutInterval = 0 ; } else { if ( timeout == TCPRequestContext . USE_CHANNEL_TIMEOUT ) { timeout = getConfig ( ) . getInactivityTimeout ( ) ...
Sets the timeout value returned by getTimeoutTime .
36,410
public boolean updateIOCounts ( long byteCount , int type ) { setLastIOAmt ( byteCount ) ; setIODoneAmount ( getIODoneAmount ( ) + byteCount ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { String dbString = null ; if ( type == 0 ) { dbString = "Read " ; } else { dbString = "Wrote " ; } ...
rather than in extension classes
36,411
public ConversationReceiveListener acceptConnection ( Conversation cfConversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "acceptConnection" , cfConversation ) ; synchronized ( activeConversations ) { Object connectionReference = cfConversation . getConnection...
Called when we are about to accept a connection from a peer .
36,412
public void removeConversation ( Conversation conv ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeConversation" , conv ) ; synchronized ( activeConversations ) { Object connectionReference = conv . getConnectionReference ( ) ; ArrayList list = ( ArrayLi...
This method removes a conversation from the list of active conversations . This would be called if the connection is closed or if a failure is deteceted .
36,413
public void connectionClosed ( Object connectionReference ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "connectionClosed" , connectionReference ) ; removeAllConversations ( connectionReference ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntry...
Driven in the event that the underlying connection closes . This will only be driven if the socket dies before a connection to the ME has had chance to be established .
36,414
public void removeAllConversations ( Object connectionReference ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeAllConversations" , connectionReference ) ; final ArrayList list ; synchronized ( activeConversations ) { list = ( ArrayList ) activeConversat...
This method is used to clean up any resources that
36,415
protected final ObjectFactoryInfo getObjectFactoryInfo ( Class < ? > klass , String className ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getObjectFactory: " + klass + ", " + className ) ; if ( ivObjectFactoryMap == null ) { if ...
Gets an object factory for the specified class or class name . This method must be used to support configurations without a class loader .
36,416
private void updateInjectionBinding ( String jndiName , InjectionBinding < A > injectionBinding ) { if ( ! jndiName . equals ( injectionBinding . getJndiName ( ) ) ) { injectionBinding . setJndiName ( jndiName ) ; } }
Updates an InjectionBinding created for an annotation .
36,417
private < P extends Annotation > InjectionBinding < ? > addOrMergeOverrideInjectionBinding ( Class < ? > instanceClass , Member member , A annotation , String jndiName ) throws InjectionException { @ SuppressWarnings ( "unchecked" ) InjectionProcessor < P , ? > processor = ( InjectionProcessor < P , ? > ) ivOverridePro...
Creates and adds a new override injection binding or merges the data in an annotation with an existing override injection binding .
36,418
void performJavaNameSpaceBinding ( ) throws InjectionException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "performJavaNameSpaceBinding: " + this ) ; for ( InjectionBinding < A > injectionBinding : ivAllAnnotationsCollection . valu...
Bind all the jndi annotation entries found .
36,419
public final void addInjectionBinding ( InjectionBinding < A > injectionBinding ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "addInjectionBinding: " + injectionBinding ) ; ivAllAnnotationsCollection . put ( injectionBinding . getJ...
Add the InjectionBinding to the annotationCollection . The collection will be used later when binding and resolving injection targets .
36,420
protected final String getJavaBeansPropertyName ( Member fieldOrMethod ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getJavaBeansPropertyName : " + fieldOrMethod ) ; String propertyName ; if ( fieldOrMethod instanceof Field ) { Fi...
F50309 . 5
36,421
public Set < String > getServerFeatures ( ) { ServerTask serverTask = runningServer . get ( ) ; try { if ( serverTask != null ) return serverTask . getServerFeatures ( ) ; } catch ( InterruptedException e ) { } return Collections . emptySet ( ) ; }
The feature gather operation needs to launch the server far enough for it to read config and figure out all of the features that would be loaded . It doesn t actually start any of those features but it needs to get far enough to evaluate the full feature set including features and auto - features that are part of Liber...
36,422
protected Node findNode ( int nodeStreamID ) { if ( nodeStreamID == this . streamID ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "findNode exit: bottom of recursion, found node: " + this ) ; } return this ; } else { Iterator < Node > iter = dependents . iterator ( )...
Starting with this node find the node matching the input stream ID look at this node and all dependents recursively . To search the whole tree start by calling findNode on the root node .
36,423
protected void addDependent ( Node nodeToAdd ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "addDependent entry: node to add: " + nodeToAdd ) ; } dependents . add ( nodeToAdd ) ; }
Add a new dependent to this node .
36,424
protected void removeDependent ( Node nodeToRemove ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "removeDependent entry: node to remove: " + nodeToRemove ) ; } dependents . remove ( nodeToRemove ) ; }
Remove a dependent from the dependent list this node is keeping
36,425
protected void clearDependentsWriteCount ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "clearDependentsWriteCount entry: for this node: " + this ) ; } dependentWriteCount = 0 ; if ( ( dependents == null ) || ( dependents . size ( ) == 0 ) ) { return ; } for ( int i...
clear counts for all direct dependents of this node . also clear the dependent write counter
36,426
protected Node findNextWrite ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "findNextWrite entry: on node " + this + "With status: " + status + "and positive ratio of: " + getPriorityRatioPositive ( ) ) ; } if ( status == NODE_STATUS . REQUESTING_WRITE ) { if ( Trac...
recursively go through the tree finding the highest priority node that is requesting to write .
36,427
protected int incrementDependentWriteCount ( ) { dependentWriteCount ++ ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "incrementDependentWriteCount entry: new dependentWriteCount of: " + dependentWriteCount + " for node: " + this ) ; } return dependentWriteCount ; }
increment the count since of the number of writes the direct dependents have done since that last reset .
36,428
protected void setParent ( Node newParent , boolean removeDep ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setParent entry: new parent will be: " + newParent + " for node: " + this ) ; } Node oldParent = parent ; parent = newParent ; if ( newParent != null ) { pare...
Give this node a new parent . Remove this node as a dependent of the old parent Add this node as a dependent of the new parent .
36,429
private final AbstractItemLink _next ( long lockID ) throws SevereMessageStoreException { AbstractItemLink lockedMatchingLink = null ; if ( _jumpbackEnabled ) { while ( null == lockedMatchingLink ) { AbstractItemLink link ; synchronized ( this ) { link = _behindList . getFirst ( true ) ; } if ( link == null ) { break ;...
Finds and locks the next matching item .
36,430
public final void available ( AbstractItemLink link ) throws SevereMessageStoreException { if ( _jumpbackEnabled ) { final long newPos = link . getPosition ( ) ; synchronized ( this ) { if ( newPos <= _highestPosition ) { if ( null != link . matches ( _filter ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . ...
The cursor is being told that a link has become available . Add it to the list to revisit but only if it is older than the current cursor position .
36,431
public final AbstractItem next ( long lockID ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "next" , Long . valueOf ( lockID ) ) ; final AbstractItemLink lockedMatchingLink = _next ( lockID ) ; AbstractItem lockedMatchingItem...
Return the next item that is deemed a match by the filter specified when the cursor was created . Items returned by this method are locked .
36,432
public final void finished ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "finished" ) ; if ( null != _lastLink ) { _lastLink . cursorRemoved ( ) ; _lastLink = null ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit (...
Signals that use of the cursor has finished . The cursor is removed from the AIL that it currently rests on .
36,433
private void callTransactionalLifecycleInterceptors ( InterceptorProxy [ ] proxies , int methodId ) throws RemoteException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; LifecycleInterceptorWrapper wrapper = new LifecycleInterceptorWrapper ( container , this ) ; EJSDeployedSupport s = new EJSDep...
Invoke PostConstruct or PreDestroy interceptors associated with this bean using the transaction and security context specified in the method info .
36,434
public void postInvoke ( int id , EJSDeployedSupport s ) throws RemoteException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "postInvoke" ) ; } if ( ivContainerManagedConcurrency && s . ivLockAcquired ) { EJBMethodInfoImpl mInfo =...
Release lock acquired by preInvoke .
36,435
private Class < ? > resolveClassWithCL ( String name ) throws ClassNotFoundException { SecurityManager security = System . getSecurityManager ( ) ; if ( security != null ) { return Class . forName ( name , false , getClassLoader ( thisClass ) ) ; } return Class . forName ( name , false , platformClassloader ) ; }
Resolves a class using the appropriate classloader .
36,436
protected Class < ? > resolveProxyClass ( String [ ] interfaceNames ) throws ClassNotFoundException { ClassLoader proxyClassLoader = classLoader ; Class < ? > [ ] interfaces = new Class [ interfaceNames . length ] ; Class < ? > nonPublicInterface = null ; for ( int i = 0 ; i < interfaceNames . length ; i ++ ) { Class <...
Delegates class loading to the specified class loader .
36,437
private static ClassLoader getPlatformClassLoader ( ) { if ( JavaInfo . majorVersion ( ) >= 9 ) { return AccessController . doPrivileged ( new PrivilegedAction < ClassLoader > ( ) { public ClassLoader run ( ) { ClassLoader pcl = null ; try { Method getPlatformClassLoader = ClassLoader . class . getMethod ( "getPlatform...
Returns the PlatformClassloader when running with java 9 and above ; otherwise returns null .
36,438
public void setAsynchConsumerCallback ( int requestNumber , int maxActiveMessages , long messageLockExpiry , int batchsize , OrderingContext orderContext , boolean stoppable , int maxSequentialFailures , long hiddenMessageDelay ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry...
Creates a normal or stoppable async consumer for this session . This is called in response to the request from a client . This differs from readahead or synchronous sessions where an async callback is registered without the client knowing .
36,439
public void flush ( int requestNumber ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "flush" , "" + requestNumber ) ; try { if ( mainConsumer . isStarted ( ) ) getConsumerSession ( ) . stop ( ) ; getConsumerSession ( ) . activateAsynchConsumer ( true ) ; if ( ...
This method will flush the consumer to ensure it is completely out of messages .
36,440
private boolean sendMessage ( SIBusMessage sibMessage , boolean lastMsg , Integer priority ) throws MessageEncodeFailedException , IncorrectMessageTypeException , MessageCopyFailedException , UnsupportedEncodingException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this ,...
Method to perform a single send of a message to the client .
36,441
private boolean sendEntireMessage ( SIBusMessage sibMessage , List < DataSlice > messageSlices , boolean lastMsg , Integer priority ) throws MessageEncodeFailedException , IncorrectMessageTypeException , MessageCopyFailedException , UnsupportedEncodingException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . is...
Sends the message in one big buffer . If the messageSlices parameter is not null then the message has already been encoded and does not need to be done again . This may be in the case where the message was destined to be sent in chunks but is so small that it does not seem worth it .
36,442
public void consumerSessionStopped ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "consumerSessionStopped" ) ; mainConsumer . stopStoppableSession ( ) ; ConversationState convState = ( ConversationState ) getConversation ( ) . getAttachment ( ) ; CommsServer...
Method called when the asynchronous consumer has been stopped duee to the maxSequentialFailures threshold being reached
36,443
private void checkObjectFactoryAttributes ( ResourceInjectionBinding resourceBinding , ObjectFactoryInfo extensionFactory ) throws InjectionConfigurationException { Resource resourceAnnotation = resourceBinding . getAnnotation ( ) ; if ( ! extensionFactory . isAttributeAllowed ( "authenticationType" ) ) { checkObjectFa...
Check attributes for registered ObjectFactory s .
36,444
private Reference createExtensionFactoryReference ( ObjectFactoryInfo extensionFactory , ResourceInjectionBinding resourceBinding ) { String className = extensionFactory . getObjectFactoryClass ( ) . getName ( ) ; Reference ref = new Reference ( resourceBinding . getInjectionClassTypeName ( ) , className , null ) ; if ...
Creates a Reference for a binding from a registered ObjectFactory .
36,445
private ResourceInfo createResourceInfo ( ResourceInjectionBinding resourceBinding ) { J2EEName j2eeName = ivNameSpaceConfig . getJ2EEName ( ) ; Resource resourceAnnotation = resourceBinding . getAnnotation ( ) ; return new ResourceInfo ( j2eeName == null ? null : j2eeName . getApplication ( ) , j2eeName == null ? null...
Creates a ResourceInfo for a binding .
36,446
public HttpURLConnection createConnection ( TLSClientParameters tlsClientParameters , Proxy proxy , URL url ) throws IOException { HttpURLConnection connection = ( HttpURLConnection ) ( proxy != null ? url . openConnection ( proxy ) : url . openConnection ( ) ) ; if ( HTTPS_URL_PROTOCOL_ID . equals ( url . getProtocol ...
Create a HttpURLConnection proxified if necessary .
36,447
public static List < Parameter > collectConstructorParameters ( Class < ? > cls , Components components , javax . ws . rs . Consumes classConsumes ) { if ( cls . isLocalClass ( ) || ( cls . isMemberClass ( ) && ! Modifier . isStatic ( cls . getModifiers ( ) ) ) ) { return Collections . emptyList ( ) ; } List < Paramete...
Collects constructor - level parameters from class .
36,448
public static List < Parameter > collectFieldParameters ( Class < ? > cls , Components components , javax . ws . rs . Consumes classConsumes ) { final List < Parameter > parameters = new ArrayList < Parameter > ( ) ; for ( Field field : ReflectionUtils . getDeclaredFields ( cls ) ) { final List < Annotation > annotatio...
Collects field - level parameters from class .
36,449
public static String [ ] splitContentValues ( String [ ] strings ) { final Set < String > result = new LinkedHashSet < String > ( ) ; for ( String string : strings ) { if ( string . isEmpty ( ) ) continue ; String [ ] splitted = string . trim ( ) . split ( "," ) ; for ( String string2 : splitted ) { result . add ( stri...
Splits the provided array of strings into an array using comma as the separator . Also removes leading and trailing whitespace and omits empty strings from the results .
36,450
public static boolean objectsNotEqual ( final Object one , final Object two ) { return ( one == null ) ? ( two != null ) : ( ! one . equals ( two ) ) ; }
Compares two objects for equality .
36,451
public static void addFieldToString ( final StringBuffer buffer , final String name , final Object value ) { buffer . append ( " <" ) ; buffer . append ( name ) ; buffer . append ( "=" ) ; buffer . append ( value ) ; buffer . append ( ">" ) ; }
Adds a string representation of the given field to the buffer .
36,452
public static void addPasswordFieldToString ( final StringBuffer buffer , final String name , final Object value ) { addFieldToString ( buffer , name , ( value == null ) ? null : "*****" ) ; }
Adds a string representation of the given password to the buffer . This will contain a row of asterisks if the password is non - null .
36,453
public final void service ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { _jspService ( request , response ) ; }
Entry point into service .
36,454
public Object put ( long key , Object value ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "put" , new Object [ ] { new Long ( key ) , value , this } ) ; if ( value == null ) { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "put" , "IllegalArgumentException" ) ; throw new IllegalArgumentException ( "Null is not ...
Store the given value in the map associating it with the given key . If the map already contains an entry associated with the given key that entry will be replaced .
36,455
public Object remove ( long key ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "remove" , new Object [ ] { new Long ( key ) , this } ) ; int hash = getHashForExistingEntry ( key ) ; Object result = null ; if ( hash >= 0 ) { result = _values [ hash ] ; } if ( result != null ) { if ( tc . isDebugEnabled ( ) ) Tr . ...
Remove the entry from the map that is associated with the given key .
36,456
public Object get ( long key ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "get" , new Object [ ] { new Long ( key ) , this } ) ; int hash = getHashForExistingEntry ( key ) ; Object value = null ; if ( hash >= 0 ) { value = _values [ hash ] ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "get" , value ) ; re...
Return the entry from the map associated with the given key
36,457
private int getHashForKey ( long key ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getHashForKey" , new Object [ ] { new Long ( key ) , this } ) ; int hash = ( int ) ( key % _mapSize ) ; if ( hash < 0 ) hash = - hash ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getHashForKey" , new Integer ( hash ) ) ; re...
suitable int index into the map
36,458
private void processConfigProps ( Map < String , Object > props ) { if ( props == null || props . isEmpty ( ) ) return ; id = ( String ) props . get ( CFG_KEY_ID ) ; if ( id == null ) { Tr . error ( tc , "AUTHZ_ROLE_ID_IS_NULL" ) ; return ; } rolePids = ( String [ ] ) props . get ( CFG_KEY_ROLE ) ; processRolePids ( ) ...
Process the sytemRole properties from the server . xml .
36,459
private Configuration retrieveConfig ( NestedConfigHelper configHelper , ConfigurationAdmin configAdmin ) throws InitWithoutConfig { if ( configHelper == null ) throw new InitWithoutConfig ( "Configuration not found" ) ; if ( configAdmin == null ) throw new InitWithoutConfig ( "ConfigurationAdmin service not found" ) ;...
get the configuration object or die trying
36,460
private List < String > getIds ( ConfigurationAdmin ca , String [ ] pids ) { final String methodName = "getIds(): " ; if ( pids == null ) { return Collections . emptyList ( ) ; } List < String > ids = new ArrayList < String > ( ) ; for ( String pid : pids ) { try { String filter = "(" + org . osgi . framework . Constan...
Find the PID in the configAdmin and get the id corresponding to it .
36,461
private boolean folderContainsFiles ( File folder ) { if ( folder != null ) { File [ ] files = folder . listFiles ( ) ; for ( File file : files ) if ( file . isFile ( ) ) return true ; for ( File file : files ) if ( file . isDirectory ( ) ) if ( folderContainsFiles ( file ) ) return true ; } return false ; }
Breadth - first traversal of folder and any subdirectories looking for if any files exist
36,462
public static ASN1Sequence getInstance ( Object obj ) { if ( obj == null || obj instanceof ASN1Sequence ) { return ( ASN1Sequence ) obj ; } throw new IllegalArgumentException ( "unknown object in getInstance" ) ; }
return an ASN1Sequence from the given object .
36,463
private static boolean markError ( OverlayContainer overlay , String errorTag ) { if ( overlay . getFromNonPersistentCache ( errorTag , WebExtAdapter . class ) == null ) { overlay . addToNonPersistentCache ( errorTag , WebExtAdapter . class , errorTag ) ; return true ; } else { return false ; } }
Mark an error condition to an overlay container .
36,464
@ FFDCIgnore ( ParseException . class ) public com . ibm . ws . javaee . dd . webext . WebExt adapt ( Container root , OverlayContainer rootOverlay , ArtifactContainer artifactContainer , Container containerToAdapt ) throws UnableToAdaptException { com . ibm . ws . javaee . dd . web . WebApp primary = containerToAdapt ...
Obtain the web extension for a module container .
36,465
private String stripExtension ( String moduleName ) { if ( moduleName . endsWith ( ".war" ) || moduleName . endsWith ( ".jar" ) ) { return moduleName . substring ( 0 , moduleName . length ( ) - 4 ) ; } return moduleName ; }
Strip the extension from a module name .
36,466
public final boolean isReconfigurable ( WSConnectionRequestInfoImpl cri , boolean reauth ) { if ( reauth ) { return ivConfigID == cri . ivConfigID ; } else { return match ( ivUserName , cri . ivUserName ) && match ( ivPassword , cri . ivPassword ) && match ( ivShardingKey , cri . ivShardingKey ) && match ( ivSuperShard...
Indicates whether a Connection with this CRI may be reconfigured to the specific CRI .
36,467
private boolean matchKerberosIdentities ( WSConnectionRequestInfoImpl cri ) { boolean flag = false ; final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "matchKerberosIdentities" , this , cri ) ; if ( kerberosIdentityisSet && cri . ke...
Per JAVA Docs method returns true if the two names contain at least one primitive element in common . If either of the names represents an anonymous entity the method will return false .
36,468
private static final boolean match ( Object obj1 , Object obj2 ) { return obj1 == obj2 || ( obj1 != null && obj1 . equals ( obj2 ) ) ; }
Determine if two objects either of which may be null are equal .
36,469
private final boolean matchCatalog ( WSConnectionRequestInfoImpl cri ) { String defaultValue = defaultCatalog == null ? cri . defaultCatalog : defaultCatalog ; return match ( ivCatalog , cri . ivCatalog ) || ivCatalog == null && match ( defaultValue , cri . ivCatalog ) || cri . ivCatalog == null && match ( ivCatalog , ...
Determine if the catalog property matches . It is considered to match if - Both catalog values are unspecified . - Both catalog values are the same value . - One of the catalog values is unspecified and the other CRI requested the default value .
36,470
private final boolean matchSchema ( WSConnectionRequestInfoImpl cri ) { String defaultValue = defaultSchema == null ? cri . defaultSchema : defaultSchema ; return match ( ivSchema , cri . ivSchema ) || ivSchema == null && match ( defaultValue , cri . ivSchema ) || cri . ivSchema == null && match ( ivSchema , defaultVal...
Determine if the schema property matches . It is considered to match if - Both schema values are unspecified . - Both schema values are the same value . - One of the schema values is unspecified and the other CRI requested the default value .
36,471
private final boolean matchNetworkTimeout ( WSConnectionRequestInfoImpl cri ) { int defaultValue = defaultNetworkTimeout == 0 ? cri . defaultNetworkTimeout : defaultNetworkTimeout ; return ivNetworkTimeout == cri . ivNetworkTimeout || ivNetworkTimeout == 0 && ( defaultValue == cri . ivNetworkTimeout ) || cri . ivNetwor...
Determine if the networkTimeout property matches . It is considered to match if - Both networkTimeout values are unspecified . - Both networkTimeout values are the same value . - One of the networkTimeout values is unspecified and the other CRI requested the default value .
36,472
private final boolean matchHoldability ( WSConnectionRequestInfoImpl cri ) { int defaultValue = defaultHoldability == 0 ? cri . defaultHoldability : defaultHoldability ; return ivHoldability == cri . ivHoldability || ivHoldability == 0 && match ( defaultValue , cri . ivHoldability ) || cri . ivHoldability == 0 && match...
Determine if the result set holdability property matches . It is considered to match if - Both holdability values are unspecified . - Both holdability values are the same value . - One of the holdability values is unspecified and the other CRI requested the default value .
36,473
private final boolean matchReadOnly ( WSConnectionRequestInfoImpl cri ) { Boolean defaultValue = defaultReadOnly == null ? cri . defaultReadOnly : defaultReadOnly ; return match ( ivReadOnly , cri . ivReadOnly ) || ivReadOnly == null && match ( defaultValue , cri . ivReadOnly ) || cri . ivReadOnly == null && match ( iv...
Determine if the read - only property matches . It is considered to match if - Both read - only values are unspecified . - Both read - only values are the same value . - One of the read - only values is unspecified and the other CRI requested the default value .
36,474
private final boolean matchTypeMap ( WSConnectionRequestInfoImpl cri ) { Map < String , Class < ? > > defaultValue = defaultTypeMap == null ? cri . defaultTypeMap : defaultTypeMap ; return matchTypeMap ( ivTypeMap , cri . ivTypeMap ) || ivTypeMap == null && matchTypeMap ( defaultValue , cri . ivTypeMap ) || cri . ivTyp...
Determine if the type map property matches . It is considered to match if - Both type map values are unspecified . - Both type map values are the same value . - One of the type map values is unspecified and the other CRI requested the default value .
36,475
public static final boolean matchTypeMap ( Map < String , Class < ? > > m1 , Map < String , Class < ? > > m2 ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "matchTypeMap" , new Object [ ] { m1 , m2 } ) ; boolean match = false ; if (...
determines if two typeMaps match . Note that this method takes under account an Oracle 11g change with TypeMap
36,476
public void setDefaultValues ( String catalog , int holdability , Boolean readOnly , Map < String , Class < ? > > typeMap , String schema , int networkTimeout ) { defaultCatalog = catalog ; defaultHoldability = holdability ; defaultReadOnly = readOnly ; defaultTypeMap = typeMap ; defaultSchema = schema ; defaultNetwork...
Initialize default values that are used for unspecified properties . This allows us to match unspecified values with specified values in another CRI .
36,477
public boolean isCRIChangable ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "isCRIChangable :" , changable ) ; return changable ; }
returns boolean indicating if cri is changable or not .
36,478
public void setCatalog ( String catalog ) throws SQLException { if ( ! changable ) { throw new SQLException ( AdapterUtil . getNLSMessage ( "WS_INTERNAL_ERROR" , new Object [ ] { "ConnectionRequestInfo cannot be modified, doing so may result in corruption: catalog, cri" , catalog , this } ) ) ; } if ( TraceComponent . ...
Change the value of the catalog property in the connection request information .
36,479
public void setHoldability ( int holdability ) throws SQLException { if ( ! changable ) { throw new SQLException ( AdapterUtil . getNLSMessage ( "WS_INTERNAL_ERROR" , new Object [ ] { "ConnectionRequestInfo cannot be modified, doing so may result in corruption: holdability, cri" , holdability , this } ) ) ; } if ( Trac...
Change the value of the result set holdability property in the connection request information .
36,480
public void setTransactionIsolationLevel ( int iso ) throws SQLException { if ( ! changable ) { throw new SQLException ( AdapterUtil . getNLSMessage ( "WS_INTERNAL_ERROR" , "ConnectionRequestInfo cannot be modified, doing so may result in corruption: iso , cri" , iso , this ) ) ; } if ( TraceComponent . isAnyTracingEna...
sets the isolation level for this CRI . The J2C team are aware of the change and they are ok with setting the isolation level as the values are not part of the hashCode and hence any changes there will not affect the bucket in which the mc will reside in the connection pool We are in need for setting the cri in case th...
36,481
public void setReadOnly ( boolean readOnly ) throws SQLException { if ( ! changable ) { throw new SQLException ( AdapterUtil . getNLSMessage ( "WS_INTERNAL_ERROR" , new Object [ ] { "ConnectionRequestInfo cannot be modified, doing so may result in corruption: readOnly , cri" , readOnly , this } ) ) ; } if ( TraceCompon...
sets the readonly for this CRI . The J2C team are aware of the change and they are ok with setting the readonly as the values are not part of the hashCode and hence any changes there will not affect the bucket in which the mc will reside in the connection pool . We are in need for setting the cri in case the applicatio...
36,482
public void setShardingKey ( Object shardingKey ) throws SQLException { if ( ! changable ) throw new SQLException ( AdapterUtil . getNLSMessage ( "WS_INTERNAL_ERROR" , "ConnectionRequestInfo cannot be modified, doing so may result in corruption: shardingKey, cri" , shardingKey , this ) ) ; if ( TraceComponent . isAnyTr...
Change the value of the sharding key property in the connection request information .
36,483
public void setSuperShardingKey ( Object superShardingKey ) throws SQLException { if ( ! changable ) throw new SQLException ( AdapterUtil . getNLSMessage ( "WS_INTERNAL_ERROR" , "ConnectionRequestInfo cannot be modified, doing so may result in corruption: superShardingKey, cri" , superShardingKey , this ) ) ; if ( Trac...
Change the value of the super sharding key property in the connection request information .
36,484
public void setTypeMap ( Map < String , Class < ? > > map ) throws SQLException { if ( ! changable ) { throw new SQLException ( AdapterUtil . getNLSMessage ( "WS_INTERNAL_ERROR" , new Object [ ] { "ConnectionRequestInfo cannot be modified, doing so may result in corruption: type map, cri" , map , this } ) ) ; } if ( Tr...
Change the value of the type map property in the connection request information .
36,485
public static WSConnectionRequestInfoImpl createChangableCRIFromNon ( WSConnectionRequestInfoImpl oldCRI ) { WSConnectionRequestInfoImpl connInfo = new WSConnectionRequestInfoImpl ( oldCRI . getUserName ( ) , oldCRI . getPassword ( ) , oldCRI . getIsolationLevel ( ) , oldCRI . getCatalog ( ) , oldCRI . isReadOnly ( ) ,...
utility to create changable CRI from non changable one .
36,486
protected void processAnnotations ( Object instance ) throws IllegalAccessException , InvocationTargetException , NamingException { if ( context == null ) { return ; } checkAnnotation ( instance . getClass ( ) , instance ) ; Class superclass = instance . getClass ( ) . getSuperclass ( ) ; while ( superclass != null && ...
Inject resources in specified instance .
36,487
protected static void lookupMethodResource ( javax . naming . Context context , Object instance , Method method , String name ) throws NamingException , IllegalAccessException , InvocationTargetException { if ( ! method . getName ( ) . startsWith ( "set" ) || method . getParameterTypes ( ) . length != 1 || ! method . g...
Inject resources in specified method .
36,488
private void _send ( SIBusMessage msg , SITransaction tran ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SILimitExceededException , SIErrorException , SINotAuthorizedException , SII...
This method performs the actual send but does no parameter checking and gets no locks needed to perform the send . This should be done by a suitable super - method .
36,489
private void sendEntireMessage ( SITransaction tran , SIBusMessage msg , List < DataSlice > messageSlices , boolean requireReply , short jfapPriority ) throws SIResourceException , SISessionUnavailableException , SINotPossibleInCurrentConfigurationException , SIIncorrectCallException , SIConnectionUnavailableException ...
Sends the entire message in one big JFap message . This requires the allocation of one big area of storage for the whole message . If the messageSlices parameter is not null then the message has already been encoded and can just be added into the buffer without encoding again .
36,490
private void sendData ( CommsByteBuffer request , short jfapPriority , boolean requireReply , SITransaction tran , int outboundSegmentType , int outboundNoReplySegmentType , int replySegmentType ) throws SIResourceException , SISessionUnavailableException , SINotPossibleInCurrentConfigurationException , SIIncorrectCall...
This helper method is used to send the final or only part of a message to our peer . It takes care of whether we should be exchanging the message and deals with the exceptions returned .
36,491
public void close ( ) throws SIResourceException , SIConnectionLostException , SIErrorException , SIConnectionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "close" ) ; if ( ! isClosed ( ) ) { try { closeLock . writeLock ( ) . lockInterruptibly ...
Closes the ProducerSession .
36,492
private static Object getFieldValue ( FieldClassValue fieldClassValue , Object obj ) { try { return fieldClassValue . get ( obj . getClass ( ) ) . get ( obj ) ; } catch ( IllegalAccessException e ) { throw new IllegalStateException ( e ) ; } }
Get the value of a field from an object .
36,493
public static WrapperProxyState getLocalBeanWrapperProxyState ( LocalBeanWrapperProxy obj ) { BusinessLocalWrapperProxy proxyStateHolder = ( BusinessLocalWrapperProxy ) getFieldValue ( svLocalBeanWrapperProxyStateFieldClassValue , obj ) ; return proxyStateHolder . ivState ; }
Returns the wrapper proxy object for an object that implements LocalBeanWrapperProxy . This operation should never fail but if it does exceptions will be thrown as EJBException .
36,494
protected void registerServant ( ) { if ( ivRemoteObjectWrapper != null ) { synchronized ( ivRemoteObjectWrapper ) { if ( ! isRemoteRegistered ) { try { if ( ! isZOS ) { Object originalLoader = ThreadContextAccessor . UNCHANGED ; try { if ( ivBMD != null ) { originalLoader = EJBThreadData . svThreadContextAccessor . pu...
Register the remote wrapper servant to ORB .
36,495
private void registerServant ( BusinessRemoteWrapper wrapper , int i ) { synchronized ( wrapper ) { if ( ! ivBusinessRemoteRegistered [ i ] ) { try { if ( ! isZOS ) { WrapperId wrapperId = new WrapperId ( wrapper . beanId . getByteArrayBytes ( ) , wrapper . bmd . ivBusinessRemoteInterfaceClasses [ i ] . getName ( ) , i...
d416391 added entire method .
36,496
protected void disconnect ( ) { if ( localWrapperProxyState != null ) { localWrapperProxyState . disconnect ( ) ; } if ( ivBusinessLocalWrapperProxyStates != null ) { for ( WrapperProxyState state : ivBusinessLocalWrapperProxyStates ) { state . disconnect ( ) ; } } if ( ivRemoteObjectWrapper != null ) { synchronized ( ...
Disconnect all wrappers . Unregisters the remote wrapper servant from ORB and disconnects local wrapper proxy states .
36,497
public EJBLocalObject getLocalObject ( ) { if ( localObject != null ) { if ( localWrapperProxyState != null && localWrapperProxyState . ivWrapper == null ) { localWrapperProxyState . connect ( ivBeanId , localWrapper ) ; } return localObject ; } throw new IllegalStateException ( "Local interface not defined" ) ; }
Returns a client proxy object for the local component view .
36,498
public Object getBusinessObject ( String interfaceName ) throws RemoteException { int interfaceIndex = ivBMD . getLocalBusinessInterfaceIndex ( interfaceName ) ; if ( interfaceIndex != - 1 ) { return getLocalBusinessObject ( interfaceIndex ) ; } interfaceIndex = ivBMD . getRemoteBusinessInterfaceIndex ( interfaceName )...
Method to get a business object given the name of the interface .
36,499
public Object getLocalBusinessObject ( int interfaceIndex ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getLocalBusinessObject : " + ivBusinessLocalProxies [ interfaceIndex ] . getClass ( ) . getName ( ) ) ; if ( ivBusinessLocalWrapperProxyStates != null && ivBusiness...
Method to get the local business object given the index of the interface . The returned object will be a wrapper a no - interface wrapper or a local wrapper proxy .