idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
160,100
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
160,101
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 .
160,102
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 .
160,103
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 .
160,104
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
160,105
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 .
160,106
private void updateInjectionBinding ( String jndiName , InjectionBinding < A > injectionBinding ) { if ( ! jndiName . equals ( injectionBinding . getJndiName ( ) ) ) { injectionBinding . setJndiName ( jndiName ) ; } }
Updates an InjectionBinding created for an annotation .
160,107
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 .
160,108
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 .
160,109
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 .
160,110
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
160,111
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...
160,112
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 .
160,113
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 .
160,114
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
160,115
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
160,116
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 .
160,117
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 .
160,118
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 .
160,119
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 .
160,120
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 .
160,121
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 .
160,122
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 .
160,123
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 .
160,124
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 .
160,125
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 .
160,126
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 .
160,127
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 .
160,128
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 .
160,129
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 .
160,130
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 .
160,131
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 .
160,132
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
160,133
private void checkObjectFactoryAttributes ( ResourceInjectionBinding resourceBinding , ObjectFactoryInfo extensionFactory ) throws InjectionConfigurationException { Resource resourceAnnotation = resourceBinding . getAnnotation ( ) ; if ( ! extensionFactory . isAttributeAllowed ( "authenticationType" ) ) { checkObjectFa...
Check attributes for registered ObjectFactory s .
160,134
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 .
160,135
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 .
160,136
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 .
160,137
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 .
160,138
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 .
160,139
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 .
160,140
public static boolean objectsNotEqual ( final Object one , final Object two ) { return ( one == null ) ? ( two != null ) : ( ! one . equals ( two ) ) ; }
Compares two objects for equality .
160,141
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 .
160,142
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 .
160,143
public final void service ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { _jspService ( request , response ) ; }
Entry point into service .
160,144
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 .
160,145
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 .
160,146
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
160,147
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
160,148
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 .
160,149
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
160,150
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 .
160,151
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
160,152
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 .
160,153
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 .
160,154
@ 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 .
160,155
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 .
160,156
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 .
160,157
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 .
160,158
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 .
160,159
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 .
160,160
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 .
160,161
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 .
160,162
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 .
160,163
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 .
160,164
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 .
160,165
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
160,166
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 .
160,167
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 .
160,168
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 .
160,169
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 .
160,170
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...
160,171
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...
160,172
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 .
160,173
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 .
160,174
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 .
160,175
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 .
160,176
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 .
160,177
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 .
160,178
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 .
160,179
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 .
160,180
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 .
160,181
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 .
160,182
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 .
160,183
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 .
160,184
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 .
160,185
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 .
160,186
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 .
160,187
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 .
160,188
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 .
160,189
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 .
160,190
public EJSWrapperBase getLocalBusinessWrapperBase ( int interfaceIndex ) { if ( interfaceIndex == 0 && ivBMD . ivLocalBean ) { return getLocalBeanWrapperBase ( ( LocalBeanWrapper ) ivBusinessLocal [ 0 ] ) ; } return ( EJSWrapperBase ) ivBusinessLocal [ 0 ] ; }
Method to get the local business wrapper base .
160,191
public Object getRemoteBusinessObject ( int interfaceIndex ) throws RemoteException { Class < ? > [ ] bInterfaceClasses = ivBMD . ivBusinessRemoteInterfaceClasses ; BusinessRemoteWrapper wrapper = ivBusinessRemote [ interfaceIndex ] ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug...
Method to get the remote business object given the index of the interface .
160,192
public BusinessRemoteWrapper getRemoteBusinessWrapper ( WrapperId wrapperId ) { int remoteIndex = wrapperId . ivInterfaceIndex ; BusinessRemoteWrapper wrapper = null ; String wrapperInterfaceName = "" ; if ( remoteIndex < ivBusinessRemote . length ) { wrapper = ivBusinessRemote [ remoteIndex ] ; wrapperInterfaceName = ...
d419704 - rewrote for new WrapperId fields and remove the todo .
160,193
private String getAliasToFinalize ( CMConfigData cmConfigData ) { String alias = null ; if ( cmConfigData == null ) return alias ; final String DEFAULT_PRINCIPAL_MAPPING = "DefaultPrincipalMapping" ; final String MAPPING_ALIAS = "com.ibm.mapping.authDataAlias" ; String loginConfigurationName = cmConfigData . getLoginCo...
Get the jaas alias from the config .
160,194
private Set getPrivateGenericCredentials ( final Subject subj ) throws ResourceException { Set privateGenericCredentials = null ; if ( System . getSecurityManager ( ) != null ) { try { privateGenericCredentials = ( Set ) AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws ...
Return the set of private credentials of type GenericCredential from the given subject .
160,195
private Object setJ2CThreadIdentity ( final Subject subj ) throws ResourceException { Object retObject = null ; try { if ( System . getSecurityManager ( ) != null ) { retObject = AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws Exception { return ThreadIdentityManager ....
Apply the given subject s identity to the thread .
160,196
private void checkForUTOKENNotFoundError ( Subject subj ) throws ResourceException { if ( m_ThreadIdentitySupport == AbstractConnectionFactoryService . THREAD_IDENTITY_REQUIRED ) { try { IllegalStateException e = new IllegalStateException ( "ThreadIdentitySecurityHelper.beforeGettingConnection() detected Subject not se...
Check for an unexpected condition when a UTOKEN is not found in the Subject .
160,197
protected void copyStreams ( InputStream is , OutputStream os ) throws IOException { byte [ ] buffer = new byte [ 1024 ] ; try { int read ; while ( ( read = is . read ( buffer ) ) != - 1 ) { os . write ( buffer , 0 , read ) ; buffer = new byte [ 1024 ] ; } } finally { if ( null != os ) os . close ( ) ; if ( null != is ...
Reads from the input stream and copies to the output stream
160,198
protected ExtractedFileInformation extractFileFromArchive ( String fileName , String regex ) throws RepositoryArchiveException , RepositoryArchiveEntryNotFoundException , RepositoryArchiveIOException { JarFile jarFile = null ; ExtractedFileInformation result = null ; File outputFile = null ; File sourceArchive = new Fi...
Extract a file from a jar file to a temporary location on disk that is deleted when the jvm exits .
160,199
protected void processLAandLI ( File archive , RepositoryResourceWritable resource , ProvisioningFeatureDefinition feature ) throws IOException , RepositoryException { String LAHeader = feature . getHeader ( LA_HEADER_FEATURE ) ; String LIHeader = feature . getHeader ( LI_HEADER_FEATURE ) ; processLAandLI ( archive , r...
Locate and process license agreement and information files within a feature