code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException, WIMException {
TimedDirContext ctx = iContextManager.getDirContext();
// checkWritePermission(ctx); TODO Why are we not checking for permission here?
try {
try {
ctx.modifyAttri... | java |
public void modifyAttributes(String dn, int mod_op, Attributes attrs) throws NamingException, WIMException {
TimedDirContext ctx = iContextManager.getDirContext();
iContextManager.checkWritePermission(ctx);
try {
try {
ctx.modifyAttributes(new LdapName(dn), mod_op, at... | java |
public void rename(String dn, String newDn) throws WIMException {
TimedDirContext ctx = iContextManager.getDirContext();
iContextManager.checkWritePermission(ctx);
try {
try {
ctx.rename(dn, newDn);
} catch (NamingException e) {
if (!Contex... | java |
protected final void addConverter(String name, String converterId)
{
_factories.put(name, new ConverterHandlerFactory(converterId));
} | java |
protected final void addConverter(String name, String converterId, Class<? extends TagHandler> type)
{
_factories.put(name, new UserConverterHandlerFactory(converterId, type));
} | java |
protected final void addTagHandler(String name, Class<? extends TagHandler> handlerType)
{
_factories.put(name, new HandlerFactory(handlerType));
} | java |
protected final void addUserTag(String name, URL source)
{
if (_strictJsf2FaceletsCompatibility == null)
{
MyfacesConfig config = MyfacesConfig.getCurrentInstance(
FacesContext.getCurrentInstance().getExternalContext());
_strictJsf2FaceletsCompatibility =... | java |
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE, target = "(!(com.ibm.ws.security.registry.type=QuickStartSecurityRegistry))")
protected synchronized void setUserRegistry(ServiceReference<UserRegistry> ref) {
urs.add(ref);
unregisterQuickStartSecurityRegistry... | java |
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE,
target = "(!(com.ibm.ws.management.security.role.name=QuickStartSecurityAdministratorRole))")
protected synchronized void setManagementRole(ServiceReference<ManagementRole> ref) {
managementRoles.add(ref... | java |
@Modified
protected synchronized void modify(QuickStartSecurityConfig config) {
this.config = config;
validateConfigurationProperties();
if (urConfigReg == null) {
registerQuickStartSecurityRegistryConfiguration();
} else {
updateQuickStartSecurityRegistryCo... | java |
@Trivial
private boolean isStringValueUndefined(Object str) {
if (str instanceof SerializableProtectedString) {
// Avoid constructing a String from a ProtectedString
char[] contents = ((SerializableProtectedString) str).getChars();
for (char ch : contents)
... | java |
private Dictionary<String, Object> buildUserRegistryConfigProps() {
Hashtable<String, Object> properties = new Hashtable<String, Object>();
properties.put("config.id", QUICK_START_SECURITY_REGISTRY_ID);
properties.put("id", QUICK_START_SECURITY_REGISTRY_ID);
properties.put(UserRegistrySe... | java |
private void registerQuickStartSecurityRegistryConfiguration() {
if (bc == null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "BundleContext is null, we must be deactivated.");
}
return;
}
if (urConfigReg !=... | java |
private void unregisterQuickStartSecurityRegistryConfiguration() {
if (urConfigReg != null) {
urConfigReg.unregister();
urConfigReg = null;
quickStartRegistry = null;
} else {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
... | java |
private void registerQuickStartSecurityAdministratorRole() {
if (bc == null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "BundleContext is null, we must be deactivated.");
}
return;
}
if (managementRoleReg ... | java |
static long roundUpDelay(long delay, TimeUnit unit, long now) {
if (delay < 0) {
// Negative is treated as 0.
delay = 0;
}
long target = now + unit.toMillis(delay);
if (target < now) {
// We can't add the delay to the current time without overflow.
... | java |
public static void copyStream(InputStream from, OutputStream to) throws IOException {
byte buffer[] = new byte[2048];
int bytesRead;
while ((bytesRead = from.read(buffer)) != -1) {
to.write(buffer, 0, bytesRead);
}
from.close();
} | java |
public static void copyReader(Reader from, Writer to) throws IOException {
char buffer[] = new char[2048];
int charsRead;
while ((charsRead = from.read(buffer)) != -1) {
to.write(buffer, 0, charsRead);
}
from.close();
to.flush();
} | java |
public void activate() {
// if no handlers are currently running, start one now
if (this.numHandlersInFlight.getInt() == 0) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Activating result handler: " + this.completionPort);
}
... | java |
public static void setConnectionHandle(VirtualConnection vc, ConnectionHandle handle) {
if (vc == null || handle == null) {
return;
}
Map<Object, Object> map = vc.getStateMap();
// set connection handle into VC
Object vcLock = vc.getLockObject();
synchronized... | java |
protected void setConnectionType(VirtualConnection vc) {
if (this.myType == 0 || vc == null) {
ConnectionType newType = ConnectionType.getVCConnectionType(vc);
this.myType = (newType == null) ? 0 : newType.export();
}
} | java |
public static void processException(Throwable th, String sourceId, String probeId, Object callerThis) {
FFDCConfigurator.getDelegate().processException(th, sourceId, probeId, callerThis);
} | java |
void close() {
if (logger.isLoggable(Level.FINER)) {
logger.logp(Level.FINER, logger.getName(), "close", "Close called for " + RESTClientMessagesUtil.getObjID(this) + " within connection: "
+ connector.getConnectionId());
}
... | java |
@Trivial
private File getArchiveFile() {
String methodName = "getArchiveFile";
if ( archiveFileLock != null ) {
synchronized ( archiveFileLock ) {
if ( (archiveFile == null) && !archiveFileFailed ) {
try {
archiveFile = extract... | java |
private String getArchiveFilePath() {
if ( archiveFileLock == null ) {
return archiveFilePath;
} else {
synchronized( archiveFileLock ) {
@SuppressWarnings("unused")
File useArchiveFile = getArchiveFile();
return archiveFilePath;
... | java |
ZipFileHandle getZipFileHandle() throws IOException {
synchronized( zipFileHandleLock ) {
if ( zipFileHandleFailed ) {
return null;
} else if ( zipFileHandle != null ) {
return zipFileHandle;
}
File useArchiveFile = getArchiveFile(... | java |
@Trivial
protected ZipFileEntry createEntry(String entryName, String a_entryPath) {
ZipEntryData[] useZipEntries = getZipEntryData();
if ( useZipEntries.length == 0 ) {
return null;
}
String r_entryPath = a_entryPath.substring(1);
int location = locatePath(r_entr... | java |
URI createEntryUri(String r_entryPath, File useArchiveFile) {
URI archiveUri = getURI(useArchiveFile);
if ( archiveUri == null ) {
return null;
}
if ( r_entryPath.isEmpty() ) {
return null;
}
// URLs for jar/zip data now use wsjar to avoid lockin... | java |
@Trivial
private static URI getURI(final File file) {
return AccessController.doPrivileged( new PrivilegedAction<URI>() {
@Override
public URI run() {
return file.toURI();
}
} );
} | java |
private ExtractionGuard placeExtractionGuard(String path) {
boolean isPrimary;
CountDownLatch completionLatch;
synchronized( extractionsLock ) {
completionLatch = extractionLocks.get(path);
if ( completionLatch != null ) {
isPrimary = false;
... | java |
private void releaseExtractionGuard(ExtractionGuard extractionLatch) {
synchronized( extractionsLock ) {
extractionLocks.remove( extractionLatch.path );
}
extractionLatch.completionLatch.countDown();
} | java |
private boolean isModified(ArtifactEntry entry, File file) {
long fileLastModified = FileUtils.fileLastModified(file);
long entryLastModified = entry.getLastModified();
// File 100K entry 10K delta 90k true (entry is much older than the file)
// File 10k entry 100k delta 90k t... | java |
@Trivial
private boolean deleteAll(File rootFile) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled() ) {
Tr.debug(tc, "Delete [ " + rootFile.getAbsolutePath() + " ]");
}
if ( FileUtils.fileIsFile(rootFile) ) {
boolean didDelete = FileUtils.fileDelete(r... | java |
public void startRecovery(RecoveryLogFactory fac) {
if (tc.isEntryEnabled())
Tr.entry(tc, "startRecovery", fac);
// This is a stand alone server. HA can never effect this server so direct local recovery now.
RecoveryDirector director = null;
try {
director = Reco... | java |
private boolean checkPeersAtStartup() {
if (tc.isEntryEnabled())
Tr.entry(tc, "checkPeersAtStartup");
boolean checkAtStartup;
try {
checkAtStartup = AccessController.doPrivileged(
new PrivilegedExceptionAction<B... | java |
public synchronized void writeHeader(long timestamp) throws IOException {
if (writer == null && headerBytes != null) {
writer = createNewWriter(manager.startNewFile(timestamp));
writer.write(headerBytes);
manager.notifyOfFileAction(LogEventListener.EVENTTYPEROLL) ;
}
} | java |
public synchronized void stop() {
if (writer != null) {
try {
writer.close(headerBytes);
writer = null;
} catch (IOException ex) {
// No need to crash on this error even if the tail won't be written
// since reading logic can take care of that.
}
}
// Ensure that timer is stopped as well.... | java |
public void enableFileSwitch(int switchHour) {
if(fileSwitchTimer == null){
fileSwitchTimer = AccessHelper.createTimer();
}
//set calendar instance to the specified configuration hour for cutting
//default to midnight when the passed in value is invalid, or midnight is specified (to avoid negative va... | java |
private X509TrustManager createPromptingTrustManager() {
TrustManager[] trustManagers = null;
try {
String defaultAlg = TrustManagerFactory.getDefaultAlgorithm();
TrustManagerFactory tmf = TrustManagerFactory.getInstance(defaultAlg);
tmf.init((KeyStore) null);
... | java |
private SSLSocketFactory setUpSSLContext() throws NoSuchAlgorithmException, KeyManagementException {
SSLContext ctx = SSLContext.getInstance("SSL");
ctx.init(null, new TrustManager[] { createPromptingTrustManager() }, null);
return ctx.getSocketFactory();
} | java |
private HashMap<String, Object> createJMXEnvironment(final String user, final String password, final SSLSocketFactory sslSF) {
HashMap<String, Object> environment = new HashMap<String, Object>();
environment.put("jmx.remote.protocol.provider.pkgs", "com.ibm.ws.jmx.connector.client");
environment... | java |
private JMXConnector getMBeanServerConnection(String controllerHost, int controllerPort, HashMap<String, Object> environment) throws MalformedURLException, IOException {
JMXServiceURL serviceURL = new JMXServiceURL("REST", controllerHost, controllerPort, "/IBMJMXConnectorREST");
return new ClientProvide... | java |
public JMXConnector getJMXConnector(String controllerHost, int controllerPort, String user, String password) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, IOException {
HashMap<String, Object> environment = createJMXEnvironment(user, password, setUpSSLContext());
JMXCon... | java |
public synchronized void commit()
throws SIIncorrectCallException,
SIRollbackException,
SIResourceException,
SIConnectionLostException,
SIErrorException
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "commit");
if (!valid)
{
... | java |
public synchronized void rollback()
throws SIIncorrectCallException,
SIResourceException,
SIConnectionLostException,
SIErrorException
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "rollback");
if (!valid)
{
throw new SIIncorrectCall... | java |
public synchronized boolean isValid()
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "isValid");
if (tc.isEntryEnabled()) SibTr.exit(this, tc, "isValid", ""+valid);
return valid;
} | java |
public short getLowestMessagePriority()
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getLowestMessagePriority");
if (tc.isEntryEnabled()) SibTr.exit(this, tc, "getLowestMessagePriority", ""+lowestPriority);
return lowestPriority;
} | java |
public void updateLowestMessagePriority(short messagePriority)
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "updateLowestMessagePriority",
new Object[] {""+messagePriority});
// Only update if the message priority is lower than another message
... | java |
public void associateConsumer(ConsumerSessionProxy consumer) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "associateConsumer", new Object[]{consumer, Boolean.valueOf(strictRedeliveryOrdering)});
// This is a no-op if strict redelivery ordering is... | java |
public void informConsumersOfRollback() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "informConsumersOfRollback", new Object[]{Boolean.valueOf(strictRedeliveryOrdering)});
if (strictRedeliveryOrdering) {
// Take a copy of the set of consumers, t... | java |
static void unboundSfsbFromExtendedPC(JPAExPcBindingContext bindingContext)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "unboundSfsbFromExtendedPC : " + bindingContext);
JPAPuId puIds[] = bindingContext.getExPcPuIds();
long bindId = bindingCon... | java |
private static final boolean parentHasSameExPc(JPAPuId parentPuIds[], JPAPuId puId)
{
for (JPAPuId parentPuId : parentPuIds)
{
if (parentPuId.equals(puId))
{
return true;
}
}
return false;
} | java |
public void queue(JFapByteBuffer bufferData,
int segmentType,
int requestNumber,
int priority,
SendListener sendListener,
Conversation conversation,
Connection connection,
i... | java |
public TransmissionData dequeue()
throws SIConnectionDroppedException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dequeue");
TransmissionData retValue = null;
Queue queue = null;
synchronized(queueMonitor)
{
if (state == CLOSED... | java |
public boolean hasCapacity(int priority)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "hasCapacity", ""+priority);
boolean result;
synchronized(queueMonitor)
{
result = priority >= lowestPriorityWithCapacity;
}
if (TraceCompon... | java |
public void close(boolean immediate)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "close", ""+immediate);
synchronized(queueMonitor)
{
if (immediate || (totalQueueDepth == 0))
{
state = CLOSED;
closeWaitersMonito... | java |
public void purge()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "purge");
synchronized(queueMonitor)
{
state = CLOSED;
for (int i=0; i < JFapChannelConstants.MAX_PRIORITY_LEVELS-1; ++i)
{
queueArray[i].monitor.setActive(false);
}
... | java |
public void waitForCloseToComplete()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "waitForCloseToComplete");
closeWaitersMonitor.waitOn();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "waitForCloseToComplete");
... | java |
public boolean isEmpty() throws SIConnectionDroppedException
{
synchronized(queueMonitor)
{
if (state == CLOSED) throw new SIConnectionDroppedException(TraceNLS.getFormattedMessage(JFapChannelConstants.MSG_BUNDLE, "PRIORITY_QUEUE_PURGED_SICJ0077", null, "PRIORITY_QUEUE_PURGED_SICJ0077"));
... | java |
private static boolean isGABuild() {
boolean result = true;
final Properties props = new Properties();
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
try {
final File version = new File(... | java |
public void setFfdcAlready(boolean ffdcAlready) {
this.ffdcAlready = ffdcAlready;
if (tc.isDebugEnabled()) {
Tr.debug(tc, "ffdc already handled? " + ffdcAlready);
}
} | java |
private static String getResource(Bundle myBundle, String resourcePath) {
if (myBundle == null)
return null;
String bundleShortDescription = getBundleDescription(myBundle);
StringBuilder responseString = new StringBuilder();
URL bundleResource = myBundle.getResource(resourceP... | java |
private static void harvestPackageList(BundlePackages packages, Bundle bundle) {
// Double check that the bundle is (still) installed:
if (bundle.getLocation() != null && bundle.getState() != Bundle.UNINSTALLED) {
BundleManifest manifest = new BundleManifest(bundle);
/*
... | java |
public static String extractPackageFromStackTraceElement(StackTraceElement element) {
String className = element.getClassName();
int lastDotIndex = className.lastIndexOf(".");
String packageName;
if (lastDotIndex > 0) {
packageName = className.substring(0, lastDotIndex);
... | java |
public boolean isSpecOrThirdPartyOrBootDelegationPackage(String packageName) {
SharedPackageInspector inspector = st.getService();
if (inspector != null) {
PackageType type = inspector.getExportedPackageType(packageName);
if (type != null && type.isSpecApi()) {
r... | java |
public static Properties jslPropertiesToJavaProperties(
final JSLProperties xmlProperties) {
final Properties props = new Properties();
for (final Property prop : xmlProperties.getPropertyList()) {
props.setProperty(prop.getName(), prop.getValue());
}
return pr... | java |
public static JSLProperties javaPropsTojslProperties(final Properties javaProps) {
JSLProperties newJSLProps = jslFactory.createJSLProperties();
Enumeration<?> keySet = javaProps.propertyNames();
while (keySet.hasMoreElements()) {
String key = (String)keySet.nextE... | java |
@Override
public Logger getLogger(String name) {
// get the logger from the super impl
Logger logger = super.getLogger(name);
// At this point we don't know which concrete class to use until the
// ras/logging provider is initialized enough to provide a
// wsLogger class
... | java |
public ServiceRegistration<KeyringMonitor> monitorKeyRings(String ID, String trigger, String keyStoreLocation) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(this, tc, "monitorKeyRing registration for", ID);
}
BundleContext bundleContext = actionable.ge... | java |
public void start() throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "start");
synchronized (this)
{
active = true;
// start the liveness timer for sending ControlRequestHighestGeneratedTick, if needed
if (!completedTick... | java |
public void stop()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "stop");
synchronized (this)
{
active = false;
// stop the liveness timer for sending ControlRequestHighestGeneratedTick, if needed
//NOTE: the requestHighestGeneratedTickTimer w... | java |
public void processTimedoutEntries(List timedout)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "processTimedoutEntries", new Object[] {this,timedout});
boolean sendMsg = false;
synchronized (this)
{
if (active && completedTicksInitialized && !timedout... | java |
public final void expiredRequest(long tick)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "expiredRequest", Long.valueOf(tick));
expiredRequest(tick, false);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "expiredRequest");
... | java |
public final void removeConsumerKey(String selector, JSRemoteConsumerPoint aock)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeConsumerKey", new Object[] { selector, aock });
synchronized (this)
{
JSRemoteConsumerPoint aock2 = (JSRemoteConsumerPoint... | java |
public synchronized long getNumberOfRequestsInState(int requiredState)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getNumberOfRequestsInState", Integer.valueOf(requiredState));
//Count the number of tick range objects that are in the
//specified state
lon... | java |
public final void unlockRejectedTick(TransactionCommon t, AOValue storedTick) throws MessageStoreException, SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "unlockRejectedTick");
try {
SIMPMessage msg =
consumerDispatcher.getMessageBy... | java |
public final void consumeAcceptedTick(TransactionCommon t, AOValue storedTick) throws Exception
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "consumeAcceptedTick", storedTick);
try {
SIMPMessage msg =
consumerDispatcher.getMessageByValue(storedTick);... | java |
public FileChannel getFileChannel() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "getFileChannel(): " + fc);
}
return this.fc;
} | java |
private void convertBufferIfNeeded() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "convertBufferIfNeeded status: " + status);
}
if (isFCEnabled()) {
// TRANSFER_TO status is currently on, so turn if OFF
status = status &... | java |
public void checkType(JSField elem, int indir) throws JMFSchemaViolationException {
if (!equivFields(element, elem) || indir != indirect)
throw new JMFSchemaViolationException("Incorrect list element types");
} | java |
private boolean equivFields(JSField one, JSField two) {
if (one instanceof JSDynamic) {
return two instanceof JSDynamic;
}
else if (one instanceof JSEnum) {
return two instanceof JSEnum;
}
else if (one instanceof JSPrimitive) {
return (two instanceof JSPrimitive)
&& ((JSPri... | java |
int reallocate(int fieldOffset) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "reallocate", new Object[]{Integer.valueOf(offset)});
byte[] oldContents = contents;
int oldOffset = offset;
contents = new byte[length];
System.arraycopy(oldContents, offset, con... | java |
void reallocated(byte[] newContents, int newOffset) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "reallocated", new Object[]{newContents, Integer.valueOf(newOffset)});
if (contents != null) {
contents = newContents;
offset = newOffset + 8;
sharedCont... | java |
static int getSize(Object agg) throws JMFSchemaViolationException {
if (agg == null) {
return 0;
}
else if (agg instanceof Collection) {
return ((Collection)agg).size();
}
else if (agg.getClass().isArray()) {
return Array.getLength(agg);
}
else {
throw new JMFSchemaVi... | java |
static Iterator getIterator(Object agg) throws JMFSchemaViolationException {
if (agg instanceof Collection) {
return ((Collection)agg).iterator();
}
else if (agg.getClass().isArray()) {
return new LiteIterator(agg);
}
else {
throw new JMFSchemaViolationException(agg.getClass().getN... | java |
public AppValidator failsWith(String expectedFailure) {
stringsToFind.add(expectedFailure);
stringsToFind.add(APP_FAIL_CODE);
server.addIgnoredErrors(Collections.singletonList(expectedFailure));
return this;
} | java |
private int acquireExpedite() {
int a;
while ((a = expeditesAvailable.get()) > 0 && !expeditesAvailable.compareAndSet(a, a - 1));
return a; // returning the value rather than true/false will enable better debug
} | java |
@Trivial
private void decrementWithheldConcurrency() {
int w;
while ((w = withheldConcurrency.get()) > 0 && !withheldConcurrency.compareAndSet(w, w - 1));
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "withheld concurrency " + w + " --> " + (... | java |
@Override
@FFDCIgnore(value = { RejectedExecutionException.class })
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, PolicyTaskCallback[] callbacks) throws InterruptedException, ExecutionException {
int taskCount = tasks.size();
// Special case to run a single task on the current... | java |
void runTask(PolicyTaskFutureImpl<?> future) {
running.add(future); // intentionally done before checking state to avoid missing cancels on shutdownNow
int runCount = runningCount.incrementAndGet();
try {
Callback callback = cbLateStart.get();
if (callback != null) {
... | java |
@Trivial
private void transferOrReleasePermit() {
maxConcurrencyConstraint.release();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "expedites/maxConcurrency available",
expeditesAvailable, maxConcurrencyConstraint.availablePerm... | java |
public void closeConnection()
{
if (tc.isEntryEnabled()) Tr.entry(tc, "closeConnection");
try
{
if(_XAResourceFactory != null && _XARes != null)
{
((XAResourceFactory)_XAResourceFactory).destroyXAResource(_XARes);
}
}
catch(... | java |
protected VirtualConnection readInternal(long numBytes, TCPReadCompletedCallback readCallback, boolean forceQueue, int timeout) {
if (timeout == IMMED_TIMEOUT) {
immediateTimeout();
return null;
}
if (timeout == ABORT_TIMEOUT) {
abort();
immediateT... | java |
public boolean isFileServingEnabled() {
// PK54499 START
disallowAllFileServingProp = WCCustomProperties.DISALLOW_ALL_FILE_SERVING;
if (disallowAllFileServingProp != null && !this.getApplicationName().equalsIgnoreCase("isclite")) {
try
{
if (Boolean.valueO... | java |
public Map<String, String> getJspAttributes() {
if (null == this.jspAttributes) {
this.jspAttributes = new HashMap<String, String>();
}
return this.jspAttributes;
} | java |
public IServletConfig getServletInfo(String string) {
if (string == null || string.isEmpty()){
Tr.debug(tc, "getServletInfo", "servlet name is null/empty. Use internal servlet name " + NULLSERVLETNAME);
string = NULLSERVLETNAME;
}
return (IServletConfig) this.servletInfo... | java |
public boolean isServeServletsByClassnameEnabled() {
// PK52059 START
disallowServeServletsByClassnameProp = WCCustomProperties.DISALLOW_SERVE_SERVLETS_BY_CLASSNAME_PROP;
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
logger.logp(Level.FI... | java |
public void setMimeFilters(HashMap mimeFilters) {
if (mimeFilters != null && mimeFilters.size() > 0) {
this.isMimeFilteringEnabled = true;
}
this.mimeFilters = mimeFilters;
} | java |
public String getApplicationName() {
if (this.applicationName != null)
return this.applicationName;
else if (webApp != null)
return this.webApp.getApplicationName();
else
return null;
} | java |
public void setDisableStaticMappingCache(){
if (this.contextParams != null){
String value = (String) this.contextParams.get("com.ibm.ws.webcontainer.DISABLE_STATIC_MAPPING_CACHE");
if (value != null ){
if (value.equalsIgnoreCase("true")){
if (com.ibm.e... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.