id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
135,300
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AbstractCodeGen.java
AbstractCodeGen.writeRightCurlyBracket
void writeRightCurlyBracket(Writer out, int indent) throws IOException { writeEol(out); writeWithIndent(out, indent, "}\n"); }
java
void writeRightCurlyBracket(Writer out, int indent) throws IOException { writeEol(out); writeWithIndent(out, indent, "}\n"); }
[ "void", "writeRightCurlyBracket", "(", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeEol", "(", "out", ")", ";", "writeWithIndent", "(", "out", ",", "indent", ",", "\"}\\n\"", ")", ";", "}" ]
Output right curly bracket @param out Writer @param indent space number @throws IOException ioException
[ "Output", "right", "curly", "bracket" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AbstractCodeGen.java#L202-L206
135,301
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AbstractCodeGen.java
AbstractCodeGen.writeDefaultConstructor
void writeDefaultConstructor(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, indent, " * Default constructor\n"); writeWithIndent(out, indent, " */\n"); //constructor writeWithIndent(out, indent, "public " + getClassName(def) + "()"); writeLeftCurlyBracket(out, indent); writeRightCurlyBracket(out, indent); writeEol(out); }
java
void writeDefaultConstructor(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, indent, " * Default constructor\n"); writeWithIndent(out, indent, " */\n"); //constructor writeWithIndent(out, indent, "public " + getClassName(def) + "()"); writeLeftCurlyBracket(out, indent); writeRightCurlyBracket(out, indent); writeEol(out); }
[ "void", "writeDefaultConstructor", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeWithIndent", "(", "out", ",", "indent", ",", "\"/**\\n\"", ")", ";", "writeWithIndent", "(", "out", ",", "indent",...
Output Default Constructor @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "Default", "Constructor" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AbstractCodeGen.java#L216-L227
135,302
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AbstractCodeGen.java
AbstractCodeGen.upcaseFirst
String upcaseFirst(String name) { StringBuilder sb = new StringBuilder(); sb.append(name.substring(0, 1).toUpperCase(Locale.ENGLISH)); sb.append(name.substring(1)); return sb.toString(); }
java
String upcaseFirst(String name) { StringBuilder sb = new StringBuilder(); sb.append(name.substring(0, 1).toUpperCase(Locale.ENGLISH)); sb.append(name.substring(1)); return sb.toString(); }
[ "String", "upcaseFirst", "(", "String", "name", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "name", ".", "substring", "(", "0", ",", "1", ")", ".", "toUpperCase", "(", "Locale", ".", "ENGLISH",...
Upcase first letter @param name string @return String name string
[ "Upcase", "first", "letter" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AbstractCodeGen.java#L235-L241
135,303
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/api/connectionmanager/pool/PoolConfiguration.java
PoolConfiguration.getInitialSize
public int getInitialSize() { if (initialSize == null) return getMinSize(); if (initialSize.intValue() > maxSize) return maxSize; return initialSize.intValue(); }
java
public int getInitialSize() { if (initialSize == null) return getMinSize(); if (initialSize.intValue() > maxSize) return maxSize; return initialSize.intValue(); }
[ "public", "int", "getInitialSize", "(", ")", "{", "if", "(", "initialSize", "==", "null", ")", "return", "getMinSize", "(", ")", ";", "if", "(", "initialSize", ".", "intValue", "(", ")", ">", "maxSize", ")", "return", "maxSize", ";", "return", "initialSi...
Get initial-pool-size @return The value
[ "Get", "initial", "-", "pool", "-", "size" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/api/connectionmanager/pool/PoolConfiguration.java#L133-L142
135,304
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/pool/AbstractJanitor.java
AbstractJanitor.dumpQueuedThread
private String dumpQueuedThread(Thread t) { StringBuilder sb = new StringBuilder(); // Header sb = sb.append("Queued thread: "); sb = sb.append(t.getName()); sb = sb.append(newLine); // Body StackTraceElement[] stes = SecurityActions.getStackTrace(t); if (stes != null) { for (StackTraceElement ste : stes) { sb = sb.append(" "); sb = sb.append(ste.getClassName()); sb = sb.append(":"); sb = sb.append(ste.getMethodName()); sb = sb.append(":"); sb = sb.append(ste.getLineNumber()); sb = sb.append(newLine); } } return sb.toString(); }
java
private String dumpQueuedThread(Thread t) { StringBuilder sb = new StringBuilder(); // Header sb = sb.append("Queued thread: "); sb = sb.append(t.getName()); sb = sb.append(newLine); // Body StackTraceElement[] stes = SecurityActions.getStackTrace(t); if (stes != null) { for (StackTraceElement ste : stes) { sb = sb.append(" "); sb = sb.append(ste.getClassName()); sb = sb.append(":"); sb = sb.append(ste.getMethodName()); sb = sb.append(":"); sb = sb.append(ste.getLineNumber()); sb = sb.append(newLine); } } return sb.toString(); }
[ "private", "String", "dumpQueuedThread", "(", "Thread", "t", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "// Header", "sb", "=", "sb", ".", "append", "(", "\"Queued thread: \"", ")", ";", "sb", "=", "sb", ".", "append", "...
Dump a thread @param t The thread @return The stack trace
[ "Dump", "a", "thread" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/pool/AbstractJanitor.java#L176-L202
135,305
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerEventQueue.java
WorkManagerEventQueue.addEvent
public synchronized void addEvent(WorkManagerEvent event) { if (trace) log.tracef("addEvent(%s)", event); List<WorkManagerEvent> e = events.get(event.getAddress().getWorkManagerName()); if (e == null) { e = new ArrayList<WorkManagerEvent>(); events.put(event.getAddress().getWorkManagerName(), e); } e.add(event); }
java
public synchronized void addEvent(WorkManagerEvent event) { if (trace) log.tracef("addEvent(%s)", event); List<WorkManagerEvent> e = events.get(event.getAddress().getWorkManagerName()); if (e == null) { e = new ArrayList<WorkManagerEvent>(); events.put(event.getAddress().getWorkManagerName(), e); } e.add(event); }
[ "public", "synchronized", "void", "addEvent", "(", "WorkManagerEvent", "event", ")", "{", "if", "(", "trace", ")", "log", ".", "tracef", "(", "\"addEvent(%s)\"", ",", "event", ")", ";", "List", "<", "WorkManagerEvent", ">", "e", "=", "events", ".", "get", ...
Add an event @param event The event
[ "Add", "an", "event" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerEventQueue.java#L73-L87
135,306
ironjacamar/ironjacamar
embedded/src/main/java/org/ironjacamar/embedded/byteman/IronJacamarWithByteman.java
IronJacamarWithByteman.createScriptText
private ScriptText createScriptText(int key, BMRule rule) { StringBuilder builder = new StringBuilder(); builder.append("# BMUnit autogenerated script: ").append(rule.name()); builder.append("\nRULE "); builder.append(rule.name()); if (rule.isInterface()) { builder.append("\nINTERFACE "); } else { builder.append("\nCLASS "); } builder.append(rule.targetClass()); builder.append("\nMETHOD "); builder.append(rule.targetMethod()); String location = rule.targetLocation(); if (location != null && location.length() > 0) { builder.append("\nAT "); builder.append(location); } String binding = rule.binding(); if (binding != null && binding.length() > 0) { builder.append("\nBIND "); builder.append(binding); } String helper = rule.helper(); if (helper != null && helper.length() > 0) { builder.append("\nHELPER "); builder.append(helper); } builder.append("\nIF "); builder.append(rule.condition()); builder.append("\nDO "); builder.append(rule.action()); builder.append("\nENDRULE\n"); return new ScriptText("IronJacamarWithByteman" + key, builder.toString()); }
java
private ScriptText createScriptText(int key, BMRule rule) { StringBuilder builder = new StringBuilder(); builder.append("# BMUnit autogenerated script: ").append(rule.name()); builder.append("\nRULE "); builder.append(rule.name()); if (rule.isInterface()) { builder.append("\nINTERFACE "); } else { builder.append("\nCLASS "); } builder.append(rule.targetClass()); builder.append("\nMETHOD "); builder.append(rule.targetMethod()); String location = rule.targetLocation(); if (location != null && location.length() > 0) { builder.append("\nAT "); builder.append(location); } String binding = rule.binding(); if (binding != null && binding.length() > 0) { builder.append("\nBIND "); builder.append(binding); } String helper = rule.helper(); if (helper != null && helper.length() > 0) { builder.append("\nHELPER "); builder.append(helper); } builder.append("\nIF "); builder.append(rule.condition()); builder.append("\nDO "); builder.append(rule.action()); builder.append("\nENDRULE\n"); return new ScriptText("IronJacamarWithByteman" + key, builder.toString()); }
[ "private", "ScriptText", "createScriptText", "(", "int", "key", ",", "BMRule", "rule", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "builder", ".", "append", "(", "\"# BMUnit autogenerated script: \"", ")", ".", "append", "("...
Create a ScriptText instance @param key The key @param rule The rule @return The ScriptText instance
[ "Create", "a", "ScriptText", "instance" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/embedded/src/main/java/org/ironjacamar/embedded/byteman/IronJacamarWithByteman.java#L118-L166
135,307
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/SecurityActions.java
SecurityActions.getDeclaredClasses
static Class<?>[] getDeclaredClasses(final Class<?> c) { if (System.getSecurityManager() == null) return c.getDeclaredClasses(); return AccessController.doPrivileged(new PrivilegedAction<Class<?>[]>() { public Class<?>[] run() { return c.getDeclaredClasses(); } }); }
java
static Class<?>[] getDeclaredClasses(final Class<?> c) { if (System.getSecurityManager() == null) return c.getDeclaredClasses(); return AccessController.doPrivileged(new PrivilegedAction<Class<?>[]>() { public Class<?>[] run() { return c.getDeclaredClasses(); } }); }
[ "static", "Class", "<", "?", ">", "[", "]", "getDeclaredClasses", "(", "final", "Class", "<", "?", ">", "c", ")", "{", "if", "(", "System", ".", "getSecurityManager", "(", ")", "==", "null", ")", "return", "c", ".", "getDeclaredClasses", "(", ")", ";...
Get the declared classes @param c The class @return The classes
[ "Get", "the", "declared", "classes" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/SecurityActions.java#L100-L112
135,308
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/SecurityActions.java
SecurityActions.getDeclaredField
static Field getDeclaredField(final Class<?> c, final String name) throws NoSuchFieldException { if (System.getSecurityManager() == null) return c.getDeclaredField(name); Field result = AccessController.doPrivileged(new PrivilegedAction<Field>() { public Field run() { try { return c.getDeclaredField(name); } catch (NoSuchFieldException e) { return null; } } }); if (result != null) return result; throw new NoSuchFieldException(); }
java
static Field getDeclaredField(final Class<?> c, final String name) throws NoSuchFieldException { if (System.getSecurityManager() == null) return c.getDeclaredField(name); Field result = AccessController.doPrivileged(new PrivilegedAction<Field>() { public Field run() { try { return c.getDeclaredField(name); } catch (NoSuchFieldException e) { return null; } } }); if (result != null) return result; throw new NoSuchFieldException(); }
[ "static", "Field", "getDeclaredField", "(", "final", "Class", "<", "?", ">", "c", ",", "final", "String", "name", ")", "throws", "NoSuchFieldException", "{", "if", "(", "System", ".", "getSecurityManager", "(", ")", "==", "null", ")", "return", "c", ".", ...
Get the declared field @param c The class @param name The name @return The field @exception NoSuchFieldException If a matching field is not found.
[ "Get", "the", "declared", "field" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/SecurityActions.java#L140-L165
135,309
ironjacamar/ironjacamar
web/src/main/java/org/ironjacamar/web/console/AttrResultInfo.java
AttrResultInfo.getAsText
public String getAsText() { if (throwable != null) return throwable.toString(); if (result != null) { try { if (editor != null) { editor.setValue(result); return editor.getAsText(); } else { return result.toString(); } } catch (Exception e) { return "String representation of " + name + "unavailable"; } } return null; }
java
public String getAsText() { if (throwable != null) return throwable.toString(); if (result != null) { try { if (editor != null) { editor.setValue(result); return editor.getAsText(); } else { return result.toString(); } } catch (Exception e) { return "String representation of " + name + "unavailable"; } } return null; }
[ "public", "String", "getAsText", "(", ")", "{", "if", "(", "throwable", "!=", "null", ")", "return", "throwable", ".", "toString", "(", ")", ";", "if", "(", "result", "!=", "null", ")", "{", "try", "{", "if", "(", "editor", "!=", "null", ")", "{", ...
Get the text representation @return The string
[ "Get", "the", "text", "representation" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/web/src/main/java/org/ironjacamar/web/console/AttrResultInfo.java#L100-L126
135,310
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/DistributedWorkManagerImpl.java
DistributedWorkManagerImpl.checkTransport
private void checkTransport() throws WorkException { if (!transport.isInitialized()) { try { transport.initialize(); initialize(); } catch (Throwable t) { WorkException we = new WorkException("Exception during transport initialization"); we.initCause(t); throw we; } } }
java
private void checkTransport() throws WorkException { if (!transport.isInitialized()) { try { transport.initialize(); initialize(); } catch (Throwable t) { WorkException we = new WorkException("Exception during transport initialization"); we.initCause(t); throw we; } } }
[ "private", "void", "checkTransport", "(", ")", "throws", "WorkException", "{", "if", "(", "!", "transport", ".", "isInitialized", "(", ")", ")", "{", "try", "{", "transport", ".", "initialize", "(", ")", ";", "initialize", "(", ")", ";", "}", "catch", ...
Check the transport @exception WorkException In case of an error
[ "Check", "the", "transport" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/DistributedWorkManagerImpl.java#L485-L501
135,311
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/DistributedWorkManagerImpl.java
DistributedWorkManagerImpl.removeDistributedStatistics
private synchronized void removeDistributedStatistics() { if (distributedStatistics != null) { listeners.remove((NotificationListener)distributedStatistics); distributedStatistics.setTransport(null); distributedStatistics = null; } }
java
private synchronized void removeDistributedStatistics() { if (distributedStatistics != null) { listeners.remove((NotificationListener)distributedStatistics); distributedStatistics.setTransport(null); distributedStatistics = null; } }
[ "private", "synchronized", "void", "removeDistributedStatistics", "(", ")", "{", "if", "(", "distributedStatistics", "!=", "null", ")", "{", "listeners", ".", "remove", "(", "(", "NotificationListener", ")", "distributedStatistics", ")", ";", "distributedStatistics", ...
Remove distributed statistics
[ "Remove", "distributed", "statistics" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/DistributedWorkManagerImpl.java#L535-L543
135,312
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/DistributedWorkManagerImpl.java
DistributedWorkManagerImpl.getLocalAddress
Address getLocalAddress() { if (localAddress == null) localAddress = new Address(getId(), getName(), transport != null ? transport.getId() : null); return localAddress; }
java
Address getLocalAddress() { if (localAddress == null) localAddress = new Address(getId(), getName(), transport != null ? transport.getId() : null); return localAddress; }
[ "Address", "getLocalAddress", "(", ")", "{", "if", "(", "localAddress", "==", "null", ")", "localAddress", "=", "new", "Address", "(", "getId", "(", ")", ",", "getName", "(", ")", ",", "transport", "!=", "null", "?", "transport", ".", "getId", "(", ")"...
Get local address @return The value
[ "Get", "local", "address" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/DistributedWorkManagerImpl.java#L749-L755
135,313
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.setShortRunningThreadPool
public void setShortRunningThreadPool(BlockingExecutor executor) { if (trace) log.trace("short running executor:" + (executor != null ? executor.getClass() : "null")); if (executor != null) { if (executor instanceof StatisticsExecutor) { this.shortRunningExecutor = (StatisticsExecutor) executor; } else { this.shortRunningExecutor = new StatisticsExecutorImpl(executor); } } }
java
public void setShortRunningThreadPool(BlockingExecutor executor) { if (trace) log.trace("short running executor:" + (executor != null ? executor.getClass() : "null")); if (executor != null) { if (executor instanceof StatisticsExecutor) { this.shortRunningExecutor = (StatisticsExecutor) executor; } else { this.shortRunningExecutor = new StatisticsExecutorImpl(executor); } } }
[ "public", "void", "setShortRunningThreadPool", "(", "BlockingExecutor", "executor", ")", "{", "if", "(", "trace", ")", "log", ".", "trace", "(", "\"short running executor:\"", "+", "(", "executor", "!=", "null", "?", "executor", ".", "getClass", "(", ")", ":",...
Set the executor for short running tasks @param executor The executor
[ "Set", "the", "executor", "for", "short", "running", "tasks" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L228-L244
135,314
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.setLongRunningThreadPool
public void setLongRunningThreadPool(BlockingExecutor executor) { if (trace) log.trace("long running executor:" + (executor != null ? executor.getClass() : "null")); if (executor != null) { if (executor instanceof StatisticsExecutor) { this.longRunningExecutor = (StatisticsExecutor) executor; } else { this.longRunningExecutor = new StatisticsExecutorImpl(executor); } } }
java
public void setLongRunningThreadPool(BlockingExecutor executor) { if (trace) log.trace("long running executor:" + (executor != null ? executor.getClass() : "null")); if (executor != null) { if (executor instanceof StatisticsExecutor) { this.longRunningExecutor = (StatisticsExecutor) executor; } else { this.longRunningExecutor = new StatisticsExecutorImpl(executor); } } }
[ "public", "void", "setLongRunningThreadPool", "(", "BlockingExecutor", "executor", ")", "{", "if", "(", "trace", ")", "log", ".", "trace", "(", "\"long running executor:\"", "+", "(", "executor", "!=", "null", "?", "executor", ".", "getClass", "(", ")", ":", ...
Set the executor for long running tasks @param executor The executor
[ "Set", "the", "executor", "for", "long", "running", "tasks" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L259-L275
135,315
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.doFirstChecks
public void doFirstChecks(Work work, long startTimeout, ExecutionContext execContext) throws WorkException { if (isShutdown()) throw new WorkRejectedException(bundle.workmanagerShutdown()); if (work == null) throw new WorkRejectedException(bundle.workIsNull()); if (startTimeout < 0) throw new WorkRejectedException(bundle.startTimeoutIsNegative(startTimeout)); checkAndVerifyWork(work, execContext); }
java
public void doFirstChecks(Work work, long startTimeout, ExecutionContext execContext) throws WorkException { if (isShutdown()) throw new WorkRejectedException(bundle.workmanagerShutdown()); if (work == null) throw new WorkRejectedException(bundle.workIsNull()); if (startTimeout < 0) throw new WorkRejectedException(bundle.startTimeoutIsNegative(startTimeout)); checkAndVerifyWork(work, execContext); }
[ "public", "void", "doFirstChecks", "(", "Work", "work", ",", "long", "startTimeout", ",", "ExecutionContext", "execContext", ")", "throws", "WorkException", "{", "if", "(", "isShutdown", "(", ")", ")", "throw", "new", "WorkRejectedException", "(", "bundle", ".",...
Do first checks for work starting methods @param work to check @param startTimeout to check @param execContext to check @throws WorkException in case of check don't pass
[ "Do", "first", "checks", "for", "work", "starting", "methods" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L811-L823
135,316
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.addWorkWrapper
void addWorkWrapper(WorkWrapper ww) { synchronized (activeWorkWrappers) { activeWorkWrappers.add(ww); if (statisticsEnabled) statistics.setWorkActive(activeWorkWrappers.size()); } }
java
void addWorkWrapper(WorkWrapper ww) { synchronized (activeWorkWrappers) { activeWorkWrappers.add(ww); if (statisticsEnabled) statistics.setWorkActive(activeWorkWrappers.size()); } }
[ "void", "addWorkWrapper", "(", "WorkWrapper", "ww", ")", "{", "synchronized", "(", "activeWorkWrappers", ")", "{", "activeWorkWrappers", ".", "add", "(", "ww", ")", ";", "if", "(", "statisticsEnabled", ")", "statistics", ".", "setWorkActive", "(", "activeWorkWra...
Add work wrapper to active set @param ww The work wrapper
[ "Add", "work", "wrapper", "to", "active", "set" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L979-L988
135,317
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.removeWorkWrapper
void removeWorkWrapper(WorkWrapper ww) { synchronized (activeWorkWrappers) { activeWorkWrappers.remove(ww); if (statisticsEnabled) statistics.setWorkActive(activeWorkWrappers.size()); } }
java
void removeWorkWrapper(WorkWrapper ww) { synchronized (activeWorkWrappers) { activeWorkWrappers.remove(ww); if (statisticsEnabled) statistics.setWorkActive(activeWorkWrappers.size()); } }
[ "void", "removeWorkWrapper", "(", "WorkWrapper", "ww", ")", "{", "synchronized", "(", "activeWorkWrappers", ")", "{", "activeWorkWrappers", ".", "remove", "(", "ww", ")", ";", "if", "(", "statisticsEnabled", ")", "statistics", ".", "setWorkActive", "(", "activeW...
Remove work wrapper from active set @param ww The work wrapper
[ "Remove", "work", "wrapper", "from", "active", "set" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L994-L1003
135,318
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.getExecutor
private BlockingExecutor getExecutor(Work work) { BlockingExecutor executor = shortRunningExecutor; if (longRunningExecutor != null && WorkManagerUtil.isLongRunning(work)) { executor = longRunningExecutor; } fireHintsComplete(work); return executor; }
java
private BlockingExecutor getExecutor(Work work) { BlockingExecutor executor = shortRunningExecutor; if (longRunningExecutor != null && WorkManagerUtil.isLongRunning(work)) { executor = longRunningExecutor; } fireHintsComplete(work); return executor; }
[ "private", "BlockingExecutor", "getExecutor", "(", "Work", "work", ")", "{", "BlockingExecutor", "executor", "=", "shortRunningExecutor", ";", "if", "(", "longRunningExecutor", "!=", "null", "&&", "WorkManagerUtil", ".", "isLongRunning", "(", "work", ")", ")", "{"...
Get the executor @param work The work instance @return The executor
[ "Get", "the", "executor" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1010-L1021
135,319
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.fireHintsComplete
private void fireHintsComplete(Work work) { if (work != null && work instanceof WorkContextProvider) { WorkContextProvider wcProvider = (WorkContextProvider) work; List<WorkContext> contexts = wcProvider.getWorkContexts(); if (contexts != null && !contexts.isEmpty()) { Iterator<WorkContext> it = contexts.iterator(); while (it.hasNext()) { WorkContext wc = it.next(); if (wc instanceof HintsContext) { HintsContext hc = (HintsContext) wc; if (hc instanceof WorkContextLifecycleListener) { WorkContextLifecycleListener listener = (WorkContextLifecycleListener)hc; listener.contextSetupComplete(); } } } } } }
java
private void fireHintsComplete(Work work) { if (work != null && work instanceof WorkContextProvider) { WorkContextProvider wcProvider = (WorkContextProvider) work; List<WorkContext> contexts = wcProvider.getWorkContexts(); if (contexts != null && !contexts.isEmpty()) { Iterator<WorkContext> it = contexts.iterator(); while (it.hasNext()) { WorkContext wc = it.next(); if (wc instanceof HintsContext) { HintsContext hc = (HintsContext) wc; if (hc instanceof WorkContextLifecycleListener) { WorkContextLifecycleListener listener = (WorkContextLifecycleListener)hc; listener.contextSetupComplete(); } } } } } }
[ "private", "void", "fireHintsComplete", "(", "Work", "work", ")", "{", "if", "(", "work", "!=", "null", "&&", "work", "instanceof", "WorkContextProvider", ")", "{", "WorkContextProvider", "wcProvider", "=", "(", "WorkContextProvider", ")", "work", ";", "List", ...
Fire complete for HintsContext @param work The work instance
[ "Fire", "complete", "for", "HintsContext" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1027-L1052
135,320
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.checkAndVerifyWork
private void checkAndVerifyWork(Work work, ExecutionContext executionContext) throws WorkException { if (specCompliant) { verifyWork(work); } if (work instanceof WorkContextProvider && executionContext != null) { //Implements WorkContextProvider and not-null ExecutionContext throw new WorkRejectedException(bundle.workExecutionContextMustNullImplementsWorkContextProvider()); } }
java
private void checkAndVerifyWork(Work work, ExecutionContext executionContext) throws WorkException { if (specCompliant) { verifyWork(work); } if (work instanceof WorkContextProvider && executionContext != null) { //Implements WorkContextProvider and not-null ExecutionContext throw new WorkRejectedException(bundle.workExecutionContextMustNullImplementsWorkContextProvider()); } }
[ "private", "void", "checkAndVerifyWork", "(", "Work", "work", ",", "ExecutionContext", "executionContext", ")", "throws", "WorkException", "{", "if", "(", "specCompliant", ")", "{", "verifyWork", "(", "work", ")", ";", "}", "if", "(", "work", "instanceof", "Wo...
Check and verify work before submitting. @param work the work instance @param executionContext any execution context that is passed by apadater @throws WorkException if any exception occurs
[ "Check", "and", "verify", "work", "before", "submitting", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1060-L1072
135,321
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.verifyWork
private void verifyWork(Work work) throws WorkException { Class<? extends Work> workClass = work.getClass(); String className = workClass.getName(); if (!validatedWork.contains(className)) { if (isWorkMethodSynchronized(workClass, RUN_METHOD_NAME)) throw new WorkException(bundle.runMethodIsSynchronized(className)); if (isWorkMethodSynchronized(workClass, RELEASE_METHOD_NAME)) throw new WorkException(bundle.releaseMethodIsSynchronized(className)); validatedWork.add(className); } }
java
private void verifyWork(Work work) throws WorkException { Class<? extends Work> workClass = work.getClass(); String className = workClass.getName(); if (!validatedWork.contains(className)) { if (isWorkMethodSynchronized(workClass, RUN_METHOD_NAME)) throw new WorkException(bundle.runMethodIsSynchronized(className)); if (isWorkMethodSynchronized(workClass, RELEASE_METHOD_NAME)) throw new WorkException(bundle.releaseMethodIsSynchronized(className)); validatedWork.add(className); } }
[ "private", "void", "verifyWork", "(", "Work", "work", ")", "throws", "WorkException", "{", "Class", "<", "?", "extends", "Work", ">", "workClass", "=", "work", ".", "getClass", "(", ")", ";", "String", "className", "=", "workClass", ".", "getName", "(", ...
Verify the given work instance. @param work The work @throws WorkException Thrown if a spec compliant issue is found
[ "Verify", "the", "given", "work", "instance", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1079-L1095
135,322
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.isWorkMethodSynchronized
private boolean isWorkMethodSynchronized(Class<? extends Work> workClass, String methodName) { try { Method method = SecurityActions.getMethod(workClass, methodName, new Class[0]); if (Modifier.isSynchronized(method.getModifiers())) return true; } catch (NoSuchMethodException e) { //Never happens, Work implementation should have these methods } return false; }
java
private boolean isWorkMethodSynchronized(Class<? extends Work> workClass, String methodName) { try { Method method = SecurityActions.getMethod(workClass, methodName, new Class[0]); if (Modifier.isSynchronized(method.getModifiers())) return true; } catch (NoSuchMethodException e) { //Never happens, Work implementation should have these methods } return false; }
[ "private", "boolean", "isWorkMethodSynchronized", "(", "Class", "<", "?", "extends", "Work", ">", "workClass", ",", "String", "methodName", ")", "{", "try", "{", "Method", "method", "=", "SecurityActions", ".", "getMethod", "(", "workClass", ",", "methodName", ...
Checks, if Work implementation class method is synchronized @param workClass - implementation class @param methodName - could be "run" or "release" @return true, if method is synchronized, false elsewhere
[ "Checks", "if", "Work", "implementation", "class", "method", "is", "synchronized" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1103-L1117
135,323
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.checkWorkCompletionException
private void checkWorkCompletionException(WorkWrapper wrapper) throws WorkException { if (wrapper.getWorkException() != null) { if (trace) log.tracef("Exception %s for %s", wrapper.getWorkException(), this); deltaWorkFailed(); throw wrapper.getWorkException(); } deltaWorkSuccessful(); }
java
private void checkWorkCompletionException(WorkWrapper wrapper) throws WorkException { if (wrapper.getWorkException() != null) { if (trace) log.tracef("Exception %s for %s", wrapper.getWorkException(), this); deltaWorkFailed(); throw wrapper.getWorkException(); } deltaWorkSuccessful(); }
[ "private", "void", "checkWorkCompletionException", "(", "WorkWrapper", "wrapper", ")", "throws", "WorkException", "{", "if", "(", "wrapper", ".", "getWorkException", "(", ")", "!=", "null", ")", "{", "if", "(", "trace", ")", "log", ".", "tracef", "(", "\"Exc...
Checks work completed status. @param wrapper work wrapper instance @throws {@link WorkException} if work is completed with an exception
[ "Checks", "work", "completed", "status", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1124-L1137
135,324
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.fireWorkContextSetupFailed
private void fireWorkContextSetupFailed(Object workContext, String errorCode, WorkListener workListener, Work work, WorkException exception) { if (workListener != null) { WorkEvent event = new WorkEvent(this, WorkEvent.WORK_STARTED, work, null); workListener.workStarted(event); } if (workContext instanceof WorkContextLifecycleListener) { WorkContextLifecycleListener listener = (WorkContextLifecycleListener) workContext; listener.contextSetupFailed(errorCode); } if (workListener != null) { WorkEvent event = new WorkEvent(this, WorkEvent.WORK_COMPLETED, work, exception); workListener.workCompleted(event); } }
java
private void fireWorkContextSetupFailed(Object workContext, String errorCode, WorkListener workListener, Work work, WorkException exception) { if (workListener != null) { WorkEvent event = new WorkEvent(this, WorkEvent.WORK_STARTED, work, null); workListener.workStarted(event); } if (workContext instanceof WorkContextLifecycleListener) { WorkContextLifecycleListener listener = (WorkContextLifecycleListener) workContext; listener.contextSetupFailed(errorCode); } if (workListener != null) { WorkEvent event = new WorkEvent(this, WorkEvent.WORK_COMPLETED, work, exception); workListener.workCompleted(event); } }
[ "private", "void", "fireWorkContextSetupFailed", "(", "Object", "workContext", ",", "String", "errorCode", ",", "WorkListener", "workListener", ",", "Work", "work", ",", "WorkException", "exception", ")", "{", "if", "(", "workListener", "!=", "null", ")", "{", "...
Calls listener with given error code. @param workContext work context listener @param errorCode error code @param workListener work listener @param work work instance @param exception exception
[ "Calls", "listener", "with", "given", "error", "code", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1307-L1327
135,325
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.getSupportedWorkContextClass
@SuppressWarnings("unchecked") private <T extends WorkContext> Class<T> getSupportedWorkContextClass(Class<T> adaptorWorkContext) { for (Class<? extends WorkContext> supportedWorkContext : SUPPORTED_WORK_CONTEXT_CLASSES) { // Assignable or not if (supportedWorkContext.isAssignableFrom(adaptorWorkContext)) { Class clz = adaptorWorkContext; while (clz != null) { // Supported by the server if (clz.equals(supportedWorkContext)) { return clz; } clz = clz.getSuperclass(); } } } return null; }
java
@SuppressWarnings("unchecked") private <T extends WorkContext> Class<T> getSupportedWorkContextClass(Class<T> adaptorWorkContext) { for (Class<? extends WorkContext> supportedWorkContext : SUPPORTED_WORK_CONTEXT_CLASSES) { // Assignable or not if (supportedWorkContext.isAssignableFrom(adaptorWorkContext)) { Class clz = adaptorWorkContext; while (clz != null) { // Supported by the server if (clz.equals(supportedWorkContext)) { return clz; } clz = clz.getSuperclass(); } } } return null; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", "extends", "WorkContext", ">", "Class", "<", "T", ">", "getSupportedWorkContextClass", "(", "Class", "<", "T", ">", "adaptorWorkContext", ")", "{", "for", "(", "Class", "<", "?", "exten...
Returns work context class if given work context is supported by server, returns null instance otherwise. @param <T> work context class @param adaptorWorkContext adaptor supplied work context class @return work context class
[ "Returns", "work", "context", "class", "if", "given", "work", "context", "is", "supported", "by", "server", "returns", "null", "instance", "otherwise", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1385-L1409
135,326
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkWrapper.java
WorkWrapper.getWorkContext
public <T> T getWorkContext(Class<T> workContextClass) { T instance = null; if (workContexts != null && workContexts.containsKey(workContextClass)) { instance = workContextClass.cast(workContexts.get(workContextClass)); } return instance; }
java
public <T> T getWorkContext(Class<T> workContextClass) { T instance = null; if (workContexts != null && workContexts.containsKey(workContextClass)) { instance = workContextClass.cast(workContexts.get(workContextClass)); } return instance; }
[ "public", "<", "T", ">", "T", "getWorkContext", "(", "Class", "<", "T", ">", "workContextClass", ")", "{", "T", "instance", "=", "null", ";", "if", "(", "workContexts", "!=", "null", "&&", "workContexts", ".", "containsKey", "(", "workContextClass", ")", ...
Returns work context instance. @param <T> class type info @param workContextClass work context type @return work context instance
[ "Returns", "work", "context", "instance", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkWrapper.java#L504-L514
135,327
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkWrapper.java
WorkWrapper.addWorkContext
public void addWorkContext(Class<? extends WorkContext> workContextClass, WorkContext workContext) { if (workContextClass == null) { throw new IllegalArgumentException("Work context class is null"); } if (workContext == null) { throw new IllegalArgumentException("Work context is null"); } if (workContexts == null) { workContexts = new HashMap<Class<? extends WorkContext>, WorkContext>(1); } if (trace) log.tracef("Adding work context %s for %s", workContextClass, this); workContexts.put(workContextClass, workContext); }
java
public void addWorkContext(Class<? extends WorkContext> workContextClass, WorkContext workContext) { if (workContextClass == null) { throw new IllegalArgumentException("Work context class is null"); } if (workContext == null) { throw new IllegalArgumentException("Work context is null"); } if (workContexts == null) { workContexts = new HashMap<Class<? extends WorkContext>, WorkContext>(1); } if (trace) log.tracef("Adding work context %s for %s", workContextClass, this); workContexts.put(workContextClass, workContext); }
[ "public", "void", "addWorkContext", "(", "Class", "<", "?", "extends", "WorkContext", ">", "workContextClass", ",", "WorkContext", "workContext", ")", "{", "if", "(", "workContextClass", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\...
Adds new work context. @param workContext new work context @param workContextClass work context class
[ "Adds", "new", "work", "context", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkWrapper.java#L522-L543
135,328
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkWrapper.java
WorkWrapper.fireWorkContextSetupComplete
private void fireWorkContextSetupComplete(Object workContext) { if (workContext != null && workContext instanceof WorkContextLifecycleListener) { if (trace) log.tracef("WorkContextSetupComplete(%s) for %s", workContext, this); WorkContextLifecycleListener listener = (WorkContextLifecycleListener)workContext; listener.contextSetupComplete(); } }
java
private void fireWorkContextSetupComplete(Object workContext) { if (workContext != null && workContext instanceof WorkContextLifecycleListener) { if (trace) log.tracef("WorkContextSetupComplete(%s) for %s", workContext, this); WorkContextLifecycleListener listener = (WorkContextLifecycleListener)workContext; listener.contextSetupComplete(); } }
[ "private", "void", "fireWorkContextSetupComplete", "(", "Object", "workContext", ")", "{", "if", "(", "workContext", "!=", "null", "&&", "workContext", "instanceof", "WorkContextLifecycleListener", ")", "{", "if", "(", "trace", ")", "log", ".", "tracef", "(", "\...
Calls listener after work context is setted up. @param listener work context listener
[ "Calls", "listener", "after", "work", "context", "is", "setted", "up", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkWrapper.java#L549-L559
135,329
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkWrapper.java
WorkWrapper.fireWorkContextSetupFailed
private void fireWorkContextSetupFailed(Object workContext) { if (workContext != null && workContext instanceof WorkContextLifecycleListener) { if (trace) log.tracef("WorkContextSetupFailed(%s) for %s", workContext, this); WorkContextLifecycleListener listener = (WorkContextLifecycleListener)workContext; listener.contextSetupFailed(WorkContextErrorCodes.CONTEXT_SETUP_FAILED); } }
java
private void fireWorkContextSetupFailed(Object workContext) { if (workContext != null && workContext instanceof WorkContextLifecycleListener) { if (trace) log.tracef("WorkContextSetupFailed(%s) for %s", workContext, this); WorkContextLifecycleListener listener = (WorkContextLifecycleListener)workContext; listener.contextSetupFailed(WorkContextErrorCodes.CONTEXT_SETUP_FAILED); } }
[ "private", "void", "fireWorkContextSetupFailed", "(", "Object", "workContext", ")", "{", "if", "(", "workContext", "!=", "null", "&&", "workContext", "instanceof", "WorkContextLifecycleListener", ")", "{", "if", "(", "trace", ")", "log", ".", "tracef", "(", "\"W...
Calls listener if setup failed @param listener work context listener
[ "Calls", "listener", "if", "setup", "failed" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkWrapper.java#L565-L575
135,330
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/util/Injection.java
Injection.inject
@SuppressWarnings("unchecked") public void inject(Object object, String propertyName, Object propertyValue, String propertyType, boolean includeFields) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (object == null) throw new IllegalArgumentException("Object is null"); if (propertyName == null || propertyName.trim().equals("")) throw new IllegalArgumentException("PropertyName is undefined"); String methodName = "set" + propertyName.substring(0, 1).toUpperCase(Locale.US); if (propertyName.length() > 1) { methodName += propertyName.substring(1); } Method method = findMethod(object.getClass(), methodName, propertyType); if (method != null) { Class<?> parameterClass = method.getParameterTypes()[0]; Object parameterValue = null; try { parameterValue = getValue(propertyName, parameterClass, propertyValue, SecurityActions.getClassLoader(object.getClass())); } catch (Throwable t) { throw new InvocationTargetException(t, t.getMessage()); } if (!parameterClass.isPrimitive() || parameterValue != null) method.invoke(object, new Object[] {parameterValue}); } else { if (!includeFields) throw new NoSuchMethodException("Method " + methodName + " not found"); // Ok, we didn't find a method - assume field Field field = findField(object.getClass(), propertyName, propertyType); if (field != null) { Class<?> fieldClass = field.getType(); Object fieldValue = null; try { fieldValue = getValue(propertyName, fieldClass, propertyValue, SecurityActions.getClassLoader(object.getClass())); } catch (Throwable t) { throw new InvocationTargetException(t, t.getMessage()); } field.set(object, fieldValue); } else { throw new NoSuchMethodException("Field " + propertyName + " not found"); } } }
java
@SuppressWarnings("unchecked") public void inject(Object object, String propertyName, Object propertyValue, String propertyType, boolean includeFields) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (object == null) throw new IllegalArgumentException("Object is null"); if (propertyName == null || propertyName.trim().equals("")) throw new IllegalArgumentException("PropertyName is undefined"); String methodName = "set" + propertyName.substring(0, 1).toUpperCase(Locale.US); if (propertyName.length() > 1) { methodName += propertyName.substring(1); } Method method = findMethod(object.getClass(), methodName, propertyType); if (method != null) { Class<?> parameterClass = method.getParameterTypes()[0]; Object parameterValue = null; try { parameterValue = getValue(propertyName, parameterClass, propertyValue, SecurityActions.getClassLoader(object.getClass())); } catch (Throwable t) { throw new InvocationTargetException(t, t.getMessage()); } if (!parameterClass.isPrimitive() || parameterValue != null) method.invoke(object, new Object[] {parameterValue}); } else { if (!includeFields) throw new NoSuchMethodException("Method " + methodName + " not found"); // Ok, we didn't find a method - assume field Field field = findField(object.getClass(), propertyName, propertyType); if (field != null) { Class<?> fieldClass = field.getType(); Object fieldValue = null; try { fieldValue = getValue(propertyName, fieldClass, propertyValue, SecurityActions.getClassLoader(object.getClass())); } catch (Throwable t) { throw new InvocationTargetException(t, t.getMessage()); } field.set(object, fieldValue); } else { throw new NoSuchMethodException("Field " + propertyName + " not found"); } } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "inject", "(", "Object", "object", ",", "String", "propertyName", ",", "Object", "propertyValue", ",", "String", "propertyType", ",", "boolean", "includeFields", ")", "throws", "NoSuchMethodExcept...
Inject a value into an object property @param object The object @param propertyName The property name @param propertyValue The property value @param propertyType The property type as a fully quilified class name @param includeFields Should fields be included for injection if a method can't be found @exception NoSuchMethodException If the property method cannot be found @exception IllegalAccessException If the property method cannot be accessed @exception InvocationTargetException If the property method cannot be executed
[ "Inject", "a", "value", "into", "an", "object", "property" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/util/Injection.java#L99-L165
135,331
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/util/Injection.java
Injection.getSubstitutionValue
protected String getSubstitutionValue(String input) { if (input == null || input.trim().equals("")) return input; while (input.indexOf("${") != -1) { int from = input.indexOf("${"); int to = input.indexOf("}"); int dv = input.indexOf(":", from + 2); if (dv != -1 && dv > to) { dv = -1; } String systemProperty = ""; String defaultValue = ""; if (dv == -1) { String s = input.substring(from + 2, to); if ("/".equals(s)) { systemProperty = File.separator; } else if (":".equals(s)) { systemProperty = File.pathSeparator; } else { systemProperty = SecurityActions.getSystemProperty(s); } } else { systemProperty = SecurityActions.getSystemProperty(input.substring(from + 2, dv)); defaultValue = input.substring(dv + 1, to); } String prefix = ""; String postfix = ""; if (from != 0) { prefix = input.substring(0, from); } if (to + 1 < input.length() - 1) { postfix = input.substring(to + 1); } if (systemProperty != null && !systemProperty.trim().equals("")) { input = prefix + systemProperty + postfix; } else if (!defaultValue.trim().equals("")) { input = prefix + defaultValue + postfix; } else { input = prefix + postfix; } } return input; }
java
protected String getSubstitutionValue(String input) { if (input == null || input.trim().equals("")) return input; while (input.indexOf("${") != -1) { int from = input.indexOf("${"); int to = input.indexOf("}"); int dv = input.indexOf(":", from + 2); if (dv != -1 && dv > to) { dv = -1; } String systemProperty = ""; String defaultValue = ""; if (dv == -1) { String s = input.substring(from + 2, to); if ("/".equals(s)) { systemProperty = File.separator; } else if (":".equals(s)) { systemProperty = File.pathSeparator; } else { systemProperty = SecurityActions.getSystemProperty(s); } } else { systemProperty = SecurityActions.getSystemProperty(input.substring(from + 2, dv)); defaultValue = input.substring(dv + 1, to); } String prefix = ""; String postfix = ""; if (from != 0) { prefix = input.substring(0, from); } if (to + 1 < input.length() - 1) { postfix = input.substring(to + 1); } if (systemProperty != null && !systemProperty.trim().equals("")) { input = prefix + systemProperty + postfix; } else if (!defaultValue.trim().equals("")) { input = prefix + defaultValue + postfix; } else { input = prefix + postfix; } } return input; }
[ "protected", "String", "getSubstitutionValue", "(", "String", "input", ")", "{", "if", "(", "input", "==", "null", "||", "input", ".", "trim", "(", ")", ".", "equals", "(", "\"\"", ")", ")", "return", "input", ";", "while", "(", "input", ".", "indexOf"...
System property substitution @param input The input string @return The output
[ "System", "property", "substitution" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/util/Injection.java#L430-L496
135,332
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerUtil.java
WorkManagerUtil.getShouldDistribute
public static Boolean getShouldDistribute(DistributableWork work) { if (work != null && work instanceof WorkContextProvider) { List<WorkContext> contexts = ((WorkContextProvider)work).getWorkContexts(); if (contexts != null) { for (WorkContext wc : contexts) { if (wc instanceof DistributableContext) { DistributableContext dc = (DistributableContext)wc; return dc.getDistribute(); } else if (wc instanceof HintsContext) { HintsContext hc = (HintsContext)wc; if (hc.getHints().keySet().contains(DistributableContext.DISTRIBUTE)) { Serializable value = hc.getHints().get(DistributableContext.DISTRIBUTE); if (value != null && value instanceof Boolean) { return (Boolean)value; } } } } } } return null; }
java
public static Boolean getShouldDistribute(DistributableWork work) { if (work != null && work instanceof WorkContextProvider) { List<WorkContext> contexts = ((WorkContextProvider)work).getWorkContexts(); if (contexts != null) { for (WorkContext wc : contexts) { if (wc instanceof DistributableContext) { DistributableContext dc = (DistributableContext)wc; return dc.getDistribute(); } else if (wc instanceof HintsContext) { HintsContext hc = (HintsContext)wc; if (hc.getHints().keySet().contains(DistributableContext.DISTRIBUTE)) { Serializable value = hc.getHints().get(DistributableContext.DISTRIBUTE); if (value != null && value instanceof Boolean) { return (Boolean)value; } } } } } } return null; }
[ "public", "static", "Boolean", "getShouldDistribute", "(", "DistributableWork", "work", ")", "{", "if", "(", "work", "!=", "null", "&&", "work", "instanceof", "WorkContextProvider", ")", "{", "List", "<", "WorkContext", ">", "contexts", "=", "(", "(", "WorkCon...
Get should distribute override @param work The work instance @return The override, if none return null
[ "Get", "should", "distribute", "override" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerUtil.java#L101-L132
135,333
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/tx/narayana/XAResourceWrapperImpl.java
XAResourceWrapperImpl.convertXid
private Xid convertXid(Xid xid) { if (xid instanceof XidWrapper) return xid; else return new XidWrapperImpl(xid, pad, jndiName); }
java
private Xid convertXid(Xid xid) { if (xid instanceof XidWrapper) return xid; else return new XidWrapperImpl(xid, pad, jndiName); }
[ "private", "Xid", "convertXid", "(", "Xid", "xid", ")", "{", "if", "(", "xid", "instanceof", "XidWrapper", ")", "return", "xid", ";", "else", "return", "new", "XidWrapperImpl", "(", "xid", ",", "pad", ",", "jndiName", ")", ";", "}" ]
Return wrapper for given xid. @param xid xid @return return wrapper
[ "Return", "wrapper", "for", "given", "xid", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/tx/narayana/XAResourceWrapperImpl.java#L258-L264
135,334
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/bv/SerializableValidatorFactory.java
SerializableValidatorFactory.readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); validatorFactory = BeanValidationImpl.createValidatorFactory(); }
java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); validatorFactory = BeanValidationImpl.createValidatorFactory(); }
[ "private", "void", "readObject", "(", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "validatorFactory", "=", "BeanValidationImpl", ".", "createValidatorFactory", "(", ")", ...
Read the object - Nothing is read as the validator factory is transient. A new instance is created @param in The input stream @exception IOException Thrown if an error occurs
[ "Read", "the", "object", "-", "Nothing", "is", "read", "as", "the", "validator", "factory", "is", "transient", ".", "A", "new", "instance", "is", "created" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/bv/SerializableValidatorFactory.java#L147-L151
135,335
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/pool/IdleConnectionRemover.java
IdleConnectionRemover.setExecutorService
public void setExecutorService(ExecutorService v) { if (v != null) { executorService = v; isExternal = true; } else { executorService = null; isExternal = false; } }
java
public void setExecutorService(ExecutorService v) { if (v != null) { executorService = v; isExternal = true; } else { executorService = null; isExternal = false; } }
[ "public", "void", "setExecutorService", "(", "ExecutorService", "v", ")", "{", "if", "(", "v", "!=", "null", ")", "{", "executorService", "=", "v", ";", "isExternal", "=", "true", ";", "}", "else", "{", "executorService", "=", "null", ";", "isExternal", ...
Set the executor service @param v The value
[ "Set", "the", "executor", "service" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/pool/IdleConnectionRemover.java#L108-L120
135,336
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/pool/IdleConnectionRemover.java
IdleConnectionRemover.registerPool
public void registerPool(ManagedConnectionPool mcp, long mcpInterval) { try { lock.lock(); synchronized (registeredPools) { registeredPools.put(new Key(System.identityHashCode(mcp), System.currentTimeMillis(), mcpInterval), mcp); } if (mcpInterval > 1 && mcpInterval / 2 < interval) { interval = interval / 2; long maybeNext = System.currentTimeMillis() + interval; if (next > maybeNext && maybeNext > 0) { next = maybeNext; condition.signal(); } } } finally { lock.unlock(); } }
java
public void registerPool(ManagedConnectionPool mcp, long mcpInterval) { try { lock.lock(); synchronized (registeredPools) { registeredPools.put(new Key(System.identityHashCode(mcp), System.currentTimeMillis(), mcpInterval), mcp); } if (mcpInterval > 1 && mcpInterval / 2 < interval) { interval = interval / 2; long maybeNext = System.currentTimeMillis() + interval; if (next > maybeNext && maybeNext > 0) { next = maybeNext; condition.signal(); } } } finally { lock.unlock(); } }
[ "public", "void", "registerPool", "(", "ManagedConnectionPool", "mcp", ",", "long", "mcpInterval", ")", "{", "try", "{", "lock", ".", "lock", "(", ")", ";", "synchronized", "(", "registeredPools", ")", "{", "registeredPools", ".", "put", "(", "new", "Key", ...
Register pool for idle connection cleanup @param mcp managed connection pool @param mcpInterval validation interval
[ "Register", "pool", "for", "idle", "connection", "cleanup" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/pool/IdleConnectionRemover.java#L162-L188
135,337
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/pool/IdleConnectionRemover.java
IdleConnectionRemover.unregisterPool
public void unregisterPool(ManagedConnectionPool mcp) { synchronized (registeredPools) { registeredPools.values().remove(mcp); if (registeredPools.isEmpty()) interval = Long.MAX_VALUE; } }
java
public void unregisterPool(ManagedConnectionPool mcp) { synchronized (registeredPools) { registeredPools.values().remove(mcp); if (registeredPools.isEmpty()) interval = Long.MAX_VALUE; } }
[ "public", "void", "unregisterPool", "(", "ManagedConnectionPool", "mcp", ")", "{", "synchronized", "(", "registeredPools", ")", "{", "registeredPools", ".", "values", "(", ")", ".", "remove", "(", "mcp", ")", ";", "if", "(", "registeredPools", ".", "isEmpty", ...
Unregister pool instance for idle connection cleanup @param mcp pool instance
[ "Unregister", "pool", "instance", "for", "idle", "connection", "cleanup" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/pool/IdleConnectionRemover.java#L194-L203
135,338
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.registerMetadata
public Metadata registerMetadata(String name, Connector c, File archive) { Metadata md = new MetadataImpl(name, c, archive); metadataRepository.registerMetadata(md); return md; }
java
public Metadata registerMetadata(String name, Connector c, File archive) { Metadata md = new MetadataImpl(name, c, archive); metadataRepository.registerMetadata(md); return md; }
[ "public", "Metadata", "registerMetadata", "(", "String", "name", ",", "Connector", "c", ",", "File", "archive", ")", "{", "Metadata", "md", "=", "new", "MetadataImpl", "(", "name", ",", "c", ",", "archive", ")", ";", "metadataRepository", ".", "registerMetad...
Register a metadata instance with the repository @param name The name @param c The connector metadata @param archive The archive @return The metadata instance registered
[ "Register", "a", "metadata", "instance", "with", "the", "repository" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L297-L302
135,339
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.createResourceAdapter
protected void createResourceAdapter(DeploymentBuilder builder, String raClz, Collection<org.ironjacamar.common.api.metadata.spec.ConfigProperty> configProperties, Map<String, String> overrides, TransactionSupportEnum transactionSupport, String productName, String productVersion, InboundResourceAdapter ira, CloneableBootstrapContext bootstrapContext) throws DeployException { try { Class<?> clz = Class.forName(raClz, true, builder.getClassLoader()); javax.resource.spi.ResourceAdapter resourceAdapter = (javax.resource.spi.ResourceAdapter)clz.newInstance(); validationObj.add(new ValidateClass(Key.RESOURCE_ADAPTER, clz, configProperties)); Collection<org.ironjacamar.core.api.deploymentrepository.ConfigProperty> dcps = injectConfigProperties(resourceAdapter, configProperties, overrides, builder.getClassLoader()); org.ironjacamar.core.spi.statistics.StatisticsPlugin statisticsPlugin = null; if (resourceAdapter instanceof org.ironjacamar.core.spi.statistics.Statistics) statisticsPlugin = ((org.ironjacamar.core.spi.statistics.Statistics)resourceAdapter).getStatistics(); TransactionIntegration ti = null; if (isXA(transactionSupport)) { ti = transactionIntegration; } bootstrapContext.setResourceAdapter(resourceAdapter); builder.resourceAdapter(new ResourceAdapterImpl(resourceAdapter, bootstrapContext, dcps, statisticsPlugin, productName, productVersion, createInboundMapping(ira, builder.getClassLoader()), is16(builder.getMetadata()), beanValidation, builder.getActivation().getBeanValidationGroups(), ti)); } catch (Throwable t) { throw new DeployException(bundle.unableToCreateResourceAdapter(raClz), t); } }
java
protected void createResourceAdapter(DeploymentBuilder builder, String raClz, Collection<org.ironjacamar.common.api.metadata.spec.ConfigProperty> configProperties, Map<String, String> overrides, TransactionSupportEnum transactionSupport, String productName, String productVersion, InboundResourceAdapter ira, CloneableBootstrapContext bootstrapContext) throws DeployException { try { Class<?> clz = Class.forName(raClz, true, builder.getClassLoader()); javax.resource.spi.ResourceAdapter resourceAdapter = (javax.resource.spi.ResourceAdapter)clz.newInstance(); validationObj.add(new ValidateClass(Key.RESOURCE_ADAPTER, clz, configProperties)); Collection<org.ironjacamar.core.api.deploymentrepository.ConfigProperty> dcps = injectConfigProperties(resourceAdapter, configProperties, overrides, builder.getClassLoader()); org.ironjacamar.core.spi.statistics.StatisticsPlugin statisticsPlugin = null; if (resourceAdapter instanceof org.ironjacamar.core.spi.statistics.Statistics) statisticsPlugin = ((org.ironjacamar.core.spi.statistics.Statistics)resourceAdapter).getStatistics(); TransactionIntegration ti = null; if (isXA(transactionSupport)) { ti = transactionIntegration; } bootstrapContext.setResourceAdapter(resourceAdapter); builder.resourceAdapter(new ResourceAdapterImpl(resourceAdapter, bootstrapContext, dcps, statisticsPlugin, productName, productVersion, createInboundMapping(ira, builder.getClassLoader()), is16(builder.getMetadata()), beanValidation, builder.getActivation().getBeanValidationGroups(), ti)); } catch (Throwable t) { throw new DeployException(bundle.unableToCreateResourceAdapter(raClz), t); } }
[ "protected", "void", "createResourceAdapter", "(", "DeploymentBuilder", "builder", ",", "String", "raClz", ",", "Collection", "<", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "spec", ".", "ConfigProperty", ">", "configProperties", ...
Create resource adapter instance @param builder The deployment builder @param raClz The resource adapter class @param configProperties The config properties @param overrides The config properties overrides @param transactionSupport The transaction support level @param productName The product name @param productVersion The product version @param ira The inbound resource adapter definition @param bootstrapContext the bootstrapContext to use @throws DeployException Thrown if the resource adapter cant be created
[ "Create", "resource", "adapter", "instance" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L446-L488
135,340
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.createAdminObject
protected void createAdminObject(DeploymentBuilder builder, Connector connector, AdminObject ao) throws DeployException { try { String aoClass = findAdminObject(ao.getClassName(), connector); Class<?> clz = Class.forName(aoClass, true, builder.getClassLoader()); Object adminObject = clz.newInstance(); Collection<org.ironjacamar.common.api.metadata.spec.ConfigProperty> configProperties = findConfigProperties( aoClass, connector); Collection<org.ironjacamar.core.api.deploymentrepository.ConfigProperty> dcps = injectConfigProperties( adminObject, configProperties, ao.getConfigProperties(), builder.getClassLoader()); validationObj.add(new ValidateClass(Key.ADMIN_OBJECT, clz, configProperties)); org.ironjacamar.core.spi.statistics.StatisticsPlugin statisticsPlugin = null; if (adminObject instanceof org.ironjacamar.core.spi.statistics.Statistics) statisticsPlugin = ((org.ironjacamar.core.spi.statistics.Statistics)adminObject).getStatistics(); if (builder.getResourceAdapter() != null) associateResourceAdapter(builder.getResourceAdapter().getResourceAdapter(), adminObject); builder.adminObject(new AdminObjectImpl(ao.getJndiName(), adminObject, dcps, ao, statisticsPlugin, jndiStrategy)); } catch (Throwable t) { throw new DeployException(bundle.unableToCreateAdminObject(ao.getId(), ao.getJndiName()), t); } }
java
protected void createAdminObject(DeploymentBuilder builder, Connector connector, AdminObject ao) throws DeployException { try { String aoClass = findAdminObject(ao.getClassName(), connector); Class<?> clz = Class.forName(aoClass, true, builder.getClassLoader()); Object adminObject = clz.newInstance(); Collection<org.ironjacamar.common.api.metadata.spec.ConfigProperty> configProperties = findConfigProperties( aoClass, connector); Collection<org.ironjacamar.core.api.deploymentrepository.ConfigProperty> dcps = injectConfigProperties( adminObject, configProperties, ao.getConfigProperties(), builder.getClassLoader()); validationObj.add(new ValidateClass(Key.ADMIN_OBJECT, clz, configProperties)); org.ironjacamar.core.spi.statistics.StatisticsPlugin statisticsPlugin = null; if (adminObject instanceof org.ironjacamar.core.spi.statistics.Statistics) statisticsPlugin = ((org.ironjacamar.core.spi.statistics.Statistics)adminObject).getStatistics(); if (builder.getResourceAdapter() != null) associateResourceAdapter(builder.getResourceAdapter().getResourceAdapter(), adminObject); builder.adminObject(new AdminObjectImpl(ao.getJndiName(), adminObject, dcps, ao, statisticsPlugin, jndiStrategy)); } catch (Throwable t) { throw new DeployException(bundle.unableToCreateAdminObject(ao.getId(), ao.getJndiName()), t); } }
[ "protected", "void", "createAdminObject", "(", "DeploymentBuilder", "builder", ",", "Connector", "connector", ",", "AdminObject", "ao", ")", "throws", "DeployException", "{", "try", "{", "String", "aoClass", "=", "findAdminObject", "(", "ao", ".", "getClassName", ...
Create admin object instance @param builder The deployment builder @param connector The metadata @param ao The admin object @throws DeployException Thrown if the admin object cant be created
[ "Create", "admin", "object", "instance" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L615-L646
135,341
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.findManagedConnectionFactory
private String findManagedConnectionFactory(String className, Connector connector) { for (org.ironjacamar.common.api.metadata.spec.ConnectionDefinition cd : connector.getResourceadapter().getOutboundResourceadapter().getConnectionDefinitions()) { if (className.equals(cd.getManagedConnectionFactoryClass().getValue()) || className.equals(cd.getConnectionFactoryInterface().getValue())) return cd.getManagedConnectionFactoryClass().getValue(); } return className; }
java
private String findManagedConnectionFactory(String className, Connector connector) { for (org.ironjacamar.common.api.metadata.spec.ConnectionDefinition cd : connector.getResourceadapter().getOutboundResourceadapter().getConnectionDefinitions()) { if (className.equals(cd.getManagedConnectionFactoryClass().getValue()) || className.equals(cd.getConnectionFactoryInterface().getValue())) return cd.getManagedConnectionFactoryClass().getValue(); } return className; }
[ "private", "String", "findManagedConnectionFactory", "(", "String", "className", ",", "Connector", "connector", ")", "{", "for", "(", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "spec", ".", "ConnectionDefinition", "cd", ":", "c...
Find the ManagedConnectionFactory class @param className The initial class name @param connector The metadata @return The ManagedConnectionFactory
[ "Find", "the", "ManagedConnectionFactory", "class" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L654-L664
135,342
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.findAdminObject
private String findAdminObject(String className, Connector connector) { for (org.ironjacamar.common.api.metadata.spec.AdminObject ao : connector.getResourceadapter().getAdminObjects()) { if (className.equals(ao.getAdminobjectClass().getValue()) || className.equals(ao.getAdminobjectInterface().getValue())) return ao.getAdminobjectClass().getValue(); } return className; }
java
private String findAdminObject(String className, Connector connector) { for (org.ironjacamar.common.api.metadata.spec.AdminObject ao : connector.getResourceadapter().getAdminObjects()) { if (className.equals(ao.getAdminobjectClass().getValue()) || className.equals(ao.getAdminobjectInterface().getValue())) return ao.getAdminobjectClass().getValue(); } return className; }
[ "private", "String", "findAdminObject", "(", "String", "className", ",", "Connector", "connector", ")", "{", "for", "(", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "spec", ".", "AdminObject", "ao", ":", "connector", ".", "g...
Find the AdminObject class @param className The initial class name @param connector The metadata @return The AdminObject
[ "Find", "the", "AdminObject", "class" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L672-L682
135,343
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.findConfigProperties
private Collection<org.ironjacamar.common.api.metadata.spec.ConfigProperty> findConfigProperties(String className, Connector connector) { for (org.ironjacamar.common.api.metadata.spec.ConnectionDefinition cd : connector.getResourceadapter().getOutboundResourceadapter().getConnectionDefinitions()) { if (className.equals(cd.getManagedConnectionFactoryClass().getValue()) || className.equals(cd.getConnectionFactoryInterface().getValue())) return cd.getConfigProperties(); } return null; }
java
private Collection<org.ironjacamar.common.api.metadata.spec.ConfigProperty> findConfigProperties(String className, Connector connector) { for (org.ironjacamar.common.api.metadata.spec.ConnectionDefinition cd : connector.getResourceadapter().getOutboundResourceadapter().getConnectionDefinitions()) { if (className.equals(cd.getManagedConnectionFactoryClass().getValue()) || className.equals(cd.getConnectionFactoryInterface().getValue())) return cd.getConfigProperties(); } return null; }
[ "private", "Collection", "<", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "spec", ".", "ConfigProperty", ">", "findConfigProperties", "(", "String", "className", ",", "Connector", "connector", ")", "{", "for", "(", "org", ".",...
Find the config properties for the class @param className The class name @param connector The metadata @return The config properties
[ "Find", "the", "config", "properties", "for", "the", "class" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L690-L701
135,344
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.convertType
private Class<?> convertType(Class<?> old) { if (Boolean.class.equals(old)) { return boolean.class; } else if (boolean.class.equals(old)) { return Boolean.class; } else if (Byte.class.equals(old)) { return byte.class; } else if (byte.class.equals(old)) { return Byte.class; } else if (Short.class.equals(old)) { return short.class; } else if (short.class.equals(old)) { return Short.class; } else if (Integer.class.equals(old)) { return int.class; } else if (int.class.equals(old)) { return Integer.class; } else if (Long.class.equals(old)) { return long.class; } else if (long.class.equals(old)) { return Long.class; } else if (Float.class.equals(old)) { return float.class; } else if (float.class.equals(old)) { return Float.class; } else if (Double.class.equals(old)) { return double.class; } else if (double.class.equals(old)) { return Double.class; } else if (Character.class.equals(old)) { return char.class; } else if (char.class.equals(old)) { return Character.class; } return null; }
java
private Class<?> convertType(Class<?> old) { if (Boolean.class.equals(old)) { return boolean.class; } else if (boolean.class.equals(old)) { return Boolean.class; } else if (Byte.class.equals(old)) { return byte.class; } else if (byte.class.equals(old)) { return Byte.class; } else if (Short.class.equals(old)) { return short.class; } else if (short.class.equals(old)) { return Short.class; } else if (Integer.class.equals(old)) { return int.class; } else if (int.class.equals(old)) { return Integer.class; } else if (Long.class.equals(old)) { return long.class; } else if (long.class.equals(old)) { return Long.class; } else if (Float.class.equals(old)) { return float.class; } else if (float.class.equals(old)) { return Float.class; } else if (Double.class.equals(old)) { return double.class; } else if (double.class.equals(old)) { return Double.class; } else if (Character.class.equals(old)) { return char.class; } else if (char.class.equals(old)) { return Character.class; } return null; }
[ "private", "Class", "<", "?", ">", "convertType", "(", "Class", "<", "?", ">", "old", ")", "{", "if", "(", "Boolean", ".", "class", ".", "equals", "(", "old", ")", ")", "{", "return", "boolean", ".", "class", ";", "}", "else", "if", "(", "boolean...
Convert type if possible @param old The old type @return The new type; otherwise <code>null</code>
[ "Convert", "type", "if", "possible" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L802-L870
135,345
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.isSupported
private boolean isSupported(Class<?> t) { if (Boolean.class.equals(t) || boolean.class.equals(t) || Byte.class.equals(t) || byte.class.equals(t) || Short.class.equals(t) || short.class.equals(t) || Integer.class.equals(t) || int.class.equals(t) || Long.class.equals(t) || long.class.equals(t) || Float.class.equals(t) || float.class.equals(t) || Double.class.equals(t) || double.class.equals(t) || Character.class.equals(t) || char.class.equals(t) || String.class.equals(t)) return true; return false; }
java
private boolean isSupported(Class<?> t) { if (Boolean.class.equals(t) || boolean.class.equals(t) || Byte.class.equals(t) || byte.class.equals(t) || Short.class.equals(t) || short.class.equals(t) || Integer.class.equals(t) || int.class.equals(t) || Long.class.equals(t) || long.class.equals(t) || Float.class.equals(t) || float.class.equals(t) || Double.class.equals(t) || double.class.equals(t) || Character.class.equals(t) || char.class.equals(t) || String.class.equals(t)) return true; return false; }
[ "private", "boolean", "isSupported", "(", "Class", "<", "?", ">", "t", ")", "{", "if", "(", "Boolean", ".", "class", ".", "equals", "(", "t", ")", "||", "boolean", ".", "class", ".", "equals", "(", "t", ")", "||", "Byte", ".", "class", ".", "equa...
Is a support type @param t The type @return True if supported, otherwise false
[ "Is", "a", "support", "type" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L877-L891
135,346
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.associateResourceAdapter
@SuppressWarnings("unchecked") protected void associateResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter, Object object) throws DeployException { if (resourceAdapter != null && object != null && object instanceof ResourceAdapterAssociation) { try { ResourceAdapterAssociation raa = (ResourceAdapterAssociation)object; raa.setResourceAdapter(resourceAdapter); } catch (Throwable t) { throw new DeployException(bundle.unableToAssociate(object.getClass().getName()), t); } } }
java
@SuppressWarnings("unchecked") protected void associateResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter, Object object) throws DeployException { if (resourceAdapter != null && object != null && object instanceof ResourceAdapterAssociation) { try { ResourceAdapterAssociation raa = (ResourceAdapterAssociation)object; raa.setResourceAdapter(resourceAdapter); } catch (Throwable t) { throw new DeployException(bundle.unableToAssociate(object.getClass().getName()), t); } } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "associateResourceAdapter", "(", "javax", ".", "resource", ".", "spi", ".", "ResourceAdapter", "resourceAdapter", ",", "Object", "object", ")", "throws", "DeployException", "{", "if", "(", "r...
Associate resource adapter with the object if it implements ResourceAdapterAssociation @param resourceAdapter The resource adapter @param object The possible association object @throws DeployException Thrown if the resource adapter cant be associated
[ "Associate", "resource", "adapter", "with", "the", "object", "if", "it", "implements", "ResourceAdapterAssociation" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L899-L915
135,347
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.getTransactionSupport
private TransactionSupportEnum getTransactionSupport(Connector connector, Activation activation) { if (activation.getTransactionSupport() != null) return activation.getTransactionSupport(); if (connector.getResourceadapter().getOutboundResourceadapter() != null) return connector.getResourceadapter().getOutboundResourceadapter().getTransactionSupport(); // We have to assume XA for pure inbound, overrides is done with activation return TransactionSupportEnum.XATransaction; }
java
private TransactionSupportEnum getTransactionSupport(Connector connector, Activation activation) { if (activation.getTransactionSupport() != null) return activation.getTransactionSupport(); if (connector.getResourceadapter().getOutboundResourceadapter() != null) return connector.getResourceadapter().getOutboundResourceadapter().getTransactionSupport(); // We have to assume XA for pure inbound, overrides is done with activation return TransactionSupportEnum.XATransaction; }
[ "private", "TransactionSupportEnum", "getTransactionSupport", "(", "Connector", "connector", ",", "Activation", "activation", ")", "{", "if", "(", "activation", ".", "getTransactionSupport", "(", ")", "!=", "null", ")", "return", "activation", ".", "getTransactionSupp...
Get the transaction support level @param connector The spec metadata @param activation The activation @return True if XA, otherwise false
[ "Get", "the", "transaction", "support", "level" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L923-L933
135,348
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.applyConnectionManagerConfiguration
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc, org.ironjacamar.common.api.metadata.resourceadapter.ConnectionDefinition cd) { if (cd.getJndiName() != null) cmc.setJndiName(cd.getJndiName()); if (cd.isSharable() != null) cmc.setSharable(cd.isSharable()); if (cd.isEnlistment() != null) cmc.setEnlistment(cd.isEnlistment()); if (cd.isConnectable() != null) cmc.setConnectable(cd.isConnectable()); if (cd.isTracking() != null) cmc.setTracking(cd.isTracking()); }
java
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc, org.ironjacamar.common.api.metadata.resourceadapter.ConnectionDefinition cd) { if (cd.getJndiName() != null) cmc.setJndiName(cd.getJndiName()); if (cd.isSharable() != null) cmc.setSharable(cd.isSharable()); if (cd.isEnlistment() != null) cmc.setEnlistment(cd.isEnlistment()); if (cd.isConnectable() != null) cmc.setConnectable(cd.isConnectable()); if (cd.isTracking() != null) cmc.setTracking(cd.isTracking()); }
[ "private", "void", "applyConnectionManagerConfiguration", "(", "ConnectionManagerConfiguration", "cmc", ",", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "resourceadapter", ".", "ConnectionDefinition", "cd", ")", "{", "if", "(", "cd", ...
Apply connection definition to connection manager configuration @param cmc The connection manager configuration @param cd The connection definition definition
[ "Apply", "connection", "definition", "to", "connection", "manager", "configuration" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L950-L967
135,349
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.applyConnectionManagerConfiguration
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc, org.ironjacamar.common.api.metadata.common.Security s) { if (s != null && s.getSecurityDomain() != null) { cmc.setSecurityDomain(s.getSecurityDomain()); } }
java
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc, org.ironjacamar.common.api.metadata.common.Security s) { if (s != null && s.getSecurityDomain() != null) { cmc.setSecurityDomain(s.getSecurityDomain()); } }
[ "private", "void", "applyConnectionManagerConfiguration", "(", "ConnectionManagerConfiguration", "cmc", ",", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "common", ".", "Security", "s", ")", "{", "if", "(", "s", "!=", "null", "&&...
Apply security to connection manager configuration @param cmc The connection manager configuration @param s The security definition
[ "Apply", "security", "to", "connection", "manager", "configuration" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L974-L981
135,350
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.applyConnectionManagerConfiguration
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc, org.ironjacamar.common.api.metadata.common.XaPool xp) { if (xp != null) { if (xp.isIsSameRmOverride() != null) cmc.setIsSameRMOverride(xp.isIsSameRmOverride()); if (xp.isPadXid() != null) cmc.setPadXid(xp.isPadXid()); if (xp.isWrapXaResource() != null) cmc.setWrapXAResource(xp.isWrapXaResource()); } }
java
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc, org.ironjacamar.common.api.metadata.common.XaPool xp) { if (xp != null) { if (xp.isIsSameRmOverride() != null) cmc.setIsSameRMOverride(xp.isIsSameRmOverride()); if (xp.isPadXid() != null) cmc.setPadXid(xp.isPadXid()); if (xp.isWrapXaResource() != null) cmc.setWrapXAResource(xp.isWrapXaResource()); } }
[ "private", "void", "applyConnectionManagerConfiguration", "(", "ConnectionManagerConfiguration", "cmc", ",", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "common", ".", "XaPool", "xp", ")", "{", "if", "(", "xp", "!=", "null", ")"...
Apply xa-pool to connection manager configuration @param cmc The connection manager configuration @param xp The xa-pool definition
[ "Apply", "xa", "-", "pool", "to", "connection", "manager", "configuration" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L988-L1002
135,351
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.applyConnectionManagerConfiguration
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc, org.ironjacamar.common.api.metadata.common.Timeout t) { if (t != null) { if (t.getAllocationRetry() != null) cmc.setAllocationRetry(t.getAllocationRetry()); if (t.getAllocationRetryWaitMillis() != null) cmc.setAllocationRetryWaitMillis(t.getAllocationRetryWaitMillis()); if (t.getXaResourceTimeout() != null) cmc.setXAResourceTimeout(t.getXaResourceTimeout()); } }
java
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc, org.ironjacamar.common.api.metadata.common.Timeout t) { if (t != null) { if (t.getAllocationRetry() != null) cmc.setAllocationRetry(t.getAllocationRetry()); if (t.getAllocationRetryWaitMillis() != null) cmc.setAllocationRetryWaitMillis(t.getAllocationRetryWaitMillis()); if (t.getXaResourceTimeout() != null) cmc.setXAResourceTimeout(t.getXaResourceTimeout()); } }
[ "private", "void", "applyConnectionManagerConfiguration", "(", "ConnectionManagerConfiguration", "cmc", ",", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "common", ".", "Timeout", "t", ")", "{", "if", "(", "t", "!=", "null", ")",...
Apply timeout to connection manager configuration @param cmc The connection manager configuration @param t The timeout definition
[ "Apply", "timeout", "to", "connection", "manager", "configuration" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1009-L1023
135,352
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.applyPoolConfiguration
private void applyPoolConfiguration(PoolConfiguration pc, org.ironjacamar.common.api.metadata.common.Pool p) { if (p != null) { if (p.getMinPoolSize() != null) pc.setMinSize(p.getMinPoolSize().intValue()); if (p.getInitialPoolSize() != null) pc.setInitialSize(p.getInitialPoolSize().intValue()); if (p.getMaxPoolSize() != null) pc.setMaxSize(p.getMaxPoolSize().intValue()); if (p.isPrefill() != null) pc.setPrefill(p.isPrefill().booleanValue()); if (p.getFlushStrategy() != null) pc.setFlushStrategy(p.getFlushStrategy()); } }
java
private void applyPoolConfiguration(PoolConfiguration pc, org.ironjacamar.common.api.metadata.common.Pool p) { if (p != null) { if (p.getMinPoolSize() != null) pc.setMinSize(p.getMinPoolSize().intValue()); if (p.getInitialPoolSize() != null) pc.setInitialSize(p.getInitialPoolSize().intValue()); if (p.getMaxPoolSize() != null) pc.setMaxSize(p.getMaxPoolSize().intValue()); if (p.isPrefill() != null) pc.setPrefill(p.isPrefill().booleanValue()); if (p.getFlushStrategy() != null) pc.setFlushStrategy(p.getFlushStrategy()); } }
[ "private", "void", "applyPoolConfiguration", "(", "PoolConfiguration", "pc", ",", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "common", ".", "Pool", "p", ")", "{", "if", "(", "p", "!=", "null", ")", "{", "if", "(", "p", ...
Apply pool to pool configuration @param pc The pool configuration @param p The pool definition
[ "Apply", "pool", "to", "pool", "configuration" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1030-L1050
135,353
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.applyPoolConfiguration
private void applyPoolConfiguration(PoolConfiguration pc, org.ironjacamar.common.api.metadata.common.Timeout t) { if (t != null) { if (t.getBlockingTimeoutMillis() != null) pc.setBlockingTimeout(t.getBlockingTimeoutMillis().longValue()); if (t.getIdleTimeoutMinutes() != null) pc.setIdleTimeoutMinutes(t.getIdleTimeoutMinutes().intValue()); } }
java
private void applyPoolConfiguration(PoolConfiguration pc, org.ironjacamar.common.api.metadata.common.Timeout t) { if (t != null) { if (t.getBlockingTimeoutMillis() != null) pc.setBlockingTimeout(t.getBlockingTimeoutMillis().longValue()); if (t.getIdleTimeoutMinutes() != null) pc.setIdleTimeoutMinutes(t.getIdleTimeoutMinutes().intValue()); } }
[ "private", "void", "applyPoolConfiguration", "(", "PoolConfiguration", "pc", ",", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "common", ".", "Timeout", "t", ")", "{", "if", "(", "t", "!=", "null", ")", "{", "if", "(", "t...
Apply timeout to pool configuration @param pc The pool configuration @param t The timeout definition
[ "Apply", "timeout", "to", "pool", "configuration" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1057-L1068
135,354
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.applyPoolConfiguration
private void applyPoolConfiguration(PoolConfiguration pc, org.ironjacamar.common.api.metadata.common.Validation v) { if (v != null) { if (v.isValidateOnMatch() != null) pc.setValidateOnMatch(v.isValidateOnMatch().booleanValue()); if (v.isBackgroundValidation() != null) pc.setBackgroundValidation(v.isBackgroundValidation().booleanValue()); if (v.getBackgroundValidationMillis() != null) pc.setBackgroundValidationMillis(v.getBackgroundValidationMillis().longValue()); if (v.isUseFastFail() != null) pc.setUseFastFail(v.isUseFastFail().booleanValue()); } }
java
private void applyPoolConfiguration(PoolConfiguration pc, org.ironjacamar.common.api.metadata.common.Validation v) { if (v != null) { if (v.isValidateOnMatch() != null) pc.setValidateOnMatch(v.isValidateOnMatch().booleanValue()); if (v.isBackgroundValidation() != null) pc.setBackgroundValidation(v.isBackgroundValidation().booleanValue()); if (v.getBackgroundValidationMillis() != null) pc.setBackgroundValidationMillis(v.getBackgroundValidationMillis().longValue()); if (v.isUseFastFail() != null) pc.setUseFastFail(v.isUseFastFail().booleanValue()); } }
[ "private", "void", "applyPoolConfiguration", "(", "PoolConfiguration", "pc", ",", "org", ".", "ironjacamar", ".", "common", ".", "api", ".", "metadata", ".", "common", ".", "Validation", "v", ")", "{", "if", "(", "v", "!=", "null", ")", "{", "if", "(", ...
Apply validation to pool configuration @param pc The pool configuration @param v The validation definition
[ "Apply", "validation", "to", "pool", "configuration" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1075-L1092
135,355
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.createInboundMapping
private Map<String, ActivationSpecImpl> createInboundMapping(InboundResourceAdapter ira, ClassLoader cl) throws Exception { if (ira != null) { Map<String, ActivationSpecImpl> result = new HashMap<>(); for (org.ironjacamar.common.api.metadata.spec.MessageListener ml : ira.getMessageadapter().getMessagelisteners()) { String type = ml.getMessagelistenerType().getValue(); org.ironjacamar.common.api.metadata.spec.Activationspec as = ml.getActivationspec(); String clzName = as.getActivationspecClass().getValue(); Class<?> clz = Class.forName(clzName, true, cl); Map<String, Class<?>> configProperties = createPropertyMap(clz); Set<String> requiredConfigProperties = new HashSet<>(); if (as.getRequiredConfigProperties() != null) { for (org.ironjacamar.common.api.metadata.spec.RequiredConfigProperty rcp : as.getRequiredConfigProperties()) { requiredConfigProperties.add(rcp.getConfigPropertyName().getValue()); } } validationObj.add(new ValidateClass(Key.ACTIVATION_SPEC, clz, as.getConfigProperties())); ActivationSpecImpl asi = new ActivationSpecImpl(clzName, configProperties, requiredConfigProperties); if (!result.containsKey(type)) result.put(type, asi); } return result; } return null; }
java
private Map<String, ActivationSpecImpl> createInboundMapping(InboundResourceAdapter ira, ClassLoader cl) throws Exception { if (ira != null) { Map<String, ActivationSpecImpl> result = new HashMap<>(); for (org.ironjacamar.common.api.metadata.spec.MessageListener ml : ira.getMessageadapter().getMessagelisteners()) { String type = ml.getMessagelistenerType().getValue(); org.ironjacamar.common.api.metadata.spec.Activationspec as = ml.getActivationspec(); String clzName = as.getActivationspecClass().getValue(); Class<?> clz = Class.forName(clzName, true, cl); Map<String, Class<?>> configProperties = createPropertyMap(clz); Set<String> requiredConfigProperties = new HashSet<>(); if (as.getRequiredConfigProperties() != null) { for (org.ironjacamar.common.api.metadata.spec.RequiredConfigProperty rcp : as.getRequiredConfigProperties()) { requiredConfigProperties.add(rcp.getConfigPropertyName().getValue()); } } validationObj.add(new ValidateClass(Key.ACTIVATION_SPEC, clz, as.getConfigProperties())); ActivationSpecImpl asi = new ActivationSpecImpl(clzName, configProperties, requiredConfigProperties); if (!result.containsKey(type)) result.put(type, asi); } return result; } return null; }
[ "private", "Map", "<", "String", ",", "ActivationSpecImpl", ">", "createInboundMapping", "(", "InboundResourceAdapter", "ira", ",", "ClassLoader", "cl", ")", "throws", "Exception", "{", "if", "(", "ira", "!=", "null", ")", "{", "Map", "<", "String", ",", "Ac...
Create an inbound mapping @param ira The inbound resource adapter definition @param cl The class loader @return The mapping @exception Exception Thrown in case of an error
[ "Create", "an", "inbound", "mapping" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1198-L1234
135,356
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.createPropertyMap
private Map<String, Class<?>> createPropertyMap(Class<?> clz) throws Exception { Map<String, Class<?>> result = new HashMap<>(); for (Method m : clz.getMethods()) { if (m.getName().startsWith("set")) { if (m.getReturnType().equals(Void.TYPE) && m.getParameterCount() == 1 && isSupported(m.getParameterTypes()[0])) result.put(m.getName().substring(3), m.getParameterTypes()[0]); } } return result; }
java
private Map<String, Class<?>> createPropertyMap(Class<?> clz) throws Exception { Map<String, Class<?>> result = new HashMap<>(); for (Method m : clz.getMethods()) { if (m.getName().startsWith("set")) { if (m.getReturnType().equals(Void.TYPE) && m.getParameterCount() == 1 && isSupported(m.getParameterTypes()[0])) result.put(m.getName().substring(3), m.getParameterTypes()[0]); } } return result; }
[ "private", "Map", "<", "String", ",", "Class", "<", "?", ">", ">", "createPropertyMap", "(", "Class", "<", "?", ">", "clz", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "Class", "<", "?", ">", ">", "result", "=", "new", "HashMap", "<...
Get property map @param clz The class @return The map @exception Exception Thrown in case of an error
[ "Get", "property", "map" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1242-L1258
135,357
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.getProductName
private String getProductName(Connector raXml) { if (raXml != null && !XsdString.isNull(raXml.getEisType())) return raXml.getEisType().getValue(); return ""; }
java
private String getProductName(Connector raXml) { if (raXml != null && !XsdString.isNull(raXml.getEisType())) return raXml.getEisType().getValue(); return ""; }
[ "private", "String", "getProductName", "(", "Connector", "raXml", ")", "{", "if", "(", "raXml", "!=", "null", "&&", "!", "XsdString", ".", "isNull", "(", "raXml", ".", "getEisType", "(", ")", ")", ")", "return", "raXml", ".", "getEisType", "(", ")", "....
Get the product name for the resource adapter @param raXml The connector @return The value
[ "Get", "the", "product", "name", "for", "the", "resource", "adapter" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1265-L1271
135,358
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.getProductVersion
private String getProductVersion(Connector raXml) { if (raXml != null && !XsdString.isNull(raXml.getResourceadapterVersion())) return raXml.getResourceadapterVersion().getValue(); return ""; }
java
private String getProductVersion(Connector raXml) { if (raXml != null && !XsdString.isNull(raXml.getResourceadapterVersion())) return raXml.getResourceadapterVersion().getValue(); return ""; }
[ "private", "String", "getProductVersion", "(", "Connector", "raXml", ")", "{", "if", "(", "raXml", "!=", "null", "&&", "!", "XsdString", ".", "isNull", "(", "raXml", ".", "getResourceadapterVersion", "(", ")", ")", ")", "return", "raXml", ".", "getResourcead...
Get the product version for the resource adapter @param raXml The connector @return The value
[ "Get", "the", "product", "version", "for", "the", "resource", "adapter" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1278-L1284
135,359
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.is16
private boolean is16(Connector connector) { if (connector == null || connector.getVersion() == Connector.Version.V_16 || connector.getVersion() == Connector.Version.V_17) return true; return false; }
java
private boolean is16(Connector connector) { if (connector == null || connector.getVersion() == Connector.Version.V_16 || connector.getVersion() == Connector.Version.V_17) return true; return false; }
[ "private", "boolean", "is16", "(", "Connector", "connector", ")", "{", "if", "(", "connector", "==", "null", "||", "connector", ".", "getVersion", "(", ")", "==", "Connector", ".", "Version", ".", "V_16", "||", "connector", ".", "getVersion", "(", ")", "...
Is a 1.6+ deployment @param connector The metadata @return True if 1.6+, otherwise false
[ "Is", "a", "1", ".", "6", "+", "deployment" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1316-L1324
135,360
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.verifyBeanValidation
@SuppressWarnings("unchecked") private void verifyBeanValidation(Deployment deployment) throws DeployException { if (beanValidation != null) { ValidatorFactory vf = null; try { vf = beanValidation.getValidatorFactory(); javax.validation.Validator v = vf.getValidator(); Collection<String> l = deployment.getActivation().getBeanValidationGroups(); if (l == null || l.isEmpty()) l = Arrays.asList(javax.validation.groups.Default.class.getName()); Collection<Class<?>> groups = new ArrayList<>(); for (String clz : l) { try { groups.add(Class.forName(clz, true, deployment.getClassLoader())); } catch (ClassNotFoundException e) { throw new DeployException(bundle.unableToLoadBeanValidationGroup(clz, deployment.getIdentifier()), e); } } Set failures = new HashSet(); if (deployment.getResourceAdapter() != null) { Set f = v.validate(deployment.getResourceAdapter().getResourceAdapter(), groups.toArray(new Class<?>[groups.size()])); if (!f.isEmpty()) failures.addAll(f); } if (deployment.getConnectionFactories() != null) { for (org.ironjacamar.core.api.deploymentrepository.ConnectionFactory cf : deployment.getConnectionFactories()) { Set f = v.validate(cf.getConnectionFactory(), groups.toArray(new Class<?>[groups.size()])); if (!f.isEmpty()) failures.addAll(f); } } if (deployment.getAdminObjects() != null) { for (org.ironjacamar.core.api.deploymentrepository.AdminObject ao : deployment.getAdminObjects()) { Set f = v.validate(ao.getAdminObject(), groups.toArray(new Class<?>[groups.size()])); if (!f.isEmpty()) failures.addAll(f); } } if (!failures.isEmpty()) { throw new DeployException(bundle.violationOfValidationRule(deployment.getIdentifier()), new ConstraintViolationException(failures)); } } finally { if (vf != null) vf.close(); } } }
java
@SuppressWarnings("unchecked") private void verifyBeanValidation(Deployment deployment) throws DeployException { if (beanValidation != null) { ValidatorFactory vf = null; try { vf = beanValidation.getValidatorFactory(); javax.validation.Validator v = vf.getValidator(); Collection<String> l = deployment.getActivation().getBeanValidationGroups(); if (l == null || l.isEmpty()) l = Arrays.asList(javax.validation.groups.Default.class.getName()); Collection<Class<?>> groups = new ArrayList<>(); for (String clz : l) { try { groups.add(Class.forName(clz, true, deployment.getClassLoader())); } catch (ClassNotFoundException e) { throw new DeployException(bundle.unableToLoadBeanValidationGroup(clz, deployment.getIdentifier()), e); } } Set failures = new HashSet(); if (deployment.getResourceAdapter() != null) { Set f = v.validate(deployment.getResourceAdapter().getResourceAdapter(), groups.toArray(new Class<?>[groups.size()])); if (!f.isEmpty()) failures.addAll(f); } if (deployment.getConnectionFactories() != null) { for (org.ironjacamar.core.api.deploymentrepository.ConnectionFactory cf : deployment.getConnectionFactories()) { Set f = v.validate(cf.getConnectionFactory(), groups.toArray(new Class<?>[groups.size()])); if (!f.isEmpty()) failures.addAll(f); } } if (deployment.getAdminObjects() != null) { for (org.ironjacamar.core.api.deploymentrepository.AdminObject ao : deployment.getAdminObjects()) { Set f = v.validate(ao.getAdminObject(), groups.toArray(new Class<?>[groups.size()])); if (!f.isEmpty()) failures.addAll(f); } } if (!failures.isEmpty()) { throw new DeployException(bundle.violationOfValidationRule(deployment.getIdentifier()), new ConstraintViolationException(failures)); } } finally { if (vf != null) vf.close(); } } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "verifyBeanValidation", "(", "Deployment", "deployment", ")", "throws", "DeployException", "{", "if", "(", "beanValidation", "!=", "null", ")", "{", "ValidatorFactory", "vf", "=", "null", ";", ...
Verify deployment against bean validation @param deployment The deployment @exception DeployException Thrown in case of a violation
[ "Verify", "deployment", "against", "bean", "validation" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1331-L1409
135,361
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.loadNativeLibraries
private void loadNativeLibraries(File root) { if (root != null && root.exists()) { List<String> libs = new ArrayList<String>(); if (root.isDirectory()) { if (root.listFiles() != null) { for (File f : root.listFiles()) { if (f.isFile()) { String fileName = f.getName().toLowerCase(Locale.US); if (fileName.endsWith(".a") || fileName.endsWith(".so") || fileName.endsWith(".dll")) { libs.add(f.getAbsolutePath()); } } } } else { log.debugf("Root is a directory, but there were an I/O error: %s", root.getAbsolutePath()); } } if (libs.size() > 0) { for (String lib : libs) { try { SecurityActions.load(lib); log.debugf("Loaded library: %s", lib); } catch (Throwable t) { log.debugf("Unable to load library: %s", lib); } } } else { log.debugf("No native libraries for %s", root.getAbsolutePath()); } } }
java
private void loadNativeLibraries(File root) { if (root != null && root.exists()) { List<String> libs = new ArrayList<String>(); if (root.isDirectory()) { if (root.listFiles() != null) { for (File f : root.listFiles()) { if (f.isFile()) { String fileName = f.getName().toLowerCase(Locale.US); if (fileName.endsWith(".a") || fileName.endsWith(".so") || fileName.endsWith(".dll")) { libs.add(f.getAbsolutePath()); } } } } else { log.debugf("Root is a directory, but there were an I/O error: %s", root.getAbsolutePath()); } } if (libs.size() > 0) { for (String lib : libs) { try { SecurityActions.load(lib); log.debugf("Loaded library: %s", lib); } catch (Throwable t) { log.debugf("Unable to load library: %s", lib); } } } else { log.debugf("No native libraries for %s", root.getAbsolutePath()); } } }
[ "private", "void", "loadNativeLibraries", "(", "File", "root", ")", "{", "if", "(", "root", "!=", "null", "&&", "root", ".", "exists", "(", ")", ")", "{", "List", "<", "String", ">", "libs", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";...
Load native libraries @param root The deployment root
[ "Load", "native", "libraries" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1415-L1463
135,362
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.hasFailuresLevel
protected boolean hasFailuresLevel(Collection<Failure> failures, int severity) { if (failures != null) { for (Failure failure : failures) { if (failure.getSeverity() == severity) { return true; } } } return false; }
java
protected boolean hasFailuresLevel(Collection<Failure> failures, int severity) { if (failures != null) { for (Failure failure : failures) { if (failure.getSeverity() == severity) { return true; } } } return false; }
[ "protected", "boolean", "hasFailuresLevel", "(", "Collection", "<", "Failure", ">", "failures", ",", "int", "severity", ")", "{", "if", "(", "failures", "!=", "null", ")", "{", "for", "(", "Failure", "failure", ":", "failures", ")", "{", "if", "(", "fail...
Check for failures at a certain level @param failures failures failures The failures @param severity severity severity The level @return True if a failure is found with the specified severity; otherwise false
[ "Check", "for", "failures", "at", "a", "certain", "level" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1510-L1523
135,363
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.printFailuresLog
public String printFailuresLog(Validator validator, Collection<Failure> failures, FailureHelper... fhInput) { String errorText = ""; FailureHelper fh = null; if (fhInput.length == 0) fh = new FailureHelper(failures); else fh = fhInput[0]; if (failures != null && failures.size() > 0) { errorText = fh.asText(validator.getResourceBundle()); } return errorText; }
java
public String printFailuresLog(Validator validator, Collection<Failure> failures, FailureHelper... fhInput) { String errorText = ""; FailureHelper fh = null; if (fhInput.length == 0) fh = new FailureHelper(failures); else fh = fhInput[0]; if (failures != null && failures.size() > 0) { errorText = fh.asText(validator.getResourceBundle()); } return errorText; }
[ "public", "String", "printFailuresLog", "(", "Validator", "validator", ",", "Collection", "<", "Failure", ">", "failures", ",", "FailureHelper", "...", "fhInput", ")", "{", "String", "errorText", "=", "\"\"", ";", "FailureHelper", "fh", "=", "null", ";", "if",...
print Failures into Log files. @param validator validator validator validator instance used to run validation rules @param failures failures failures the list of Failures to be printed @param fhInput fhInput fhInput optional parameter. Normally used only for test or in case of FailureHelper already present in context @return the error Text
[ "print", "Failures", "into", "Log", "files", "." ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1536-L1550
135,364
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/listener/AbstractTransactionalConnectionListener.java
AbstractTransactionalConnectionListener.resetXAResourceTimeout
private void resetXAResourceTimeout() { // Do a reset of the underlying XAResource timeout if (!(xaResource instanceof LocalXAResource) && xaResourceTimeout > 0) { try { xaResource.setTransactionTimeout(xaResourceTimeout); } catch (XAException e) { log.debugf(e, "Exception during resetXAResourceTimeout for %s", this); } } }
java
private void resetXAResourceTimeout() { // Do a reset of the underlying XAResource timeout if (!(xaResource instanceof LocalXAResource) && xaResourceTimeout > 0) { try { xaResource.setTransactionTimeout(xaResourceTimeout); } catch (XAException e) { log.debugf(e, "Exception during resetXAResourceTimeout for %s", this); } } }
[ "private", "void", "resetXAResourceTimeout", "(", ")", "{", "// Do a reset of the underlying XAResource timeout", "if", "(", "!", "(", "xaResource", "instanceof", "LocalXAResource", ")", "&&", "xaResourceTimeout", ">", "0", ")", "{", "try", "{", "xaResource", ".", "...
Reset XAResource timeout
[ "Reset", "XAResource", "timeout" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/listener/AbstractTransactionalConnectionListener.java#L348-L362
135,365
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/SimpleTemplate.java
SimpleTemplate.process
@Override public void process(Map<String, String> varMap, Writer out) { try { if (templateText == null) { templateText = Utils.readFileIntoString(input); } String replacedString = replace(varMap); out.write(replacedString); out.flush(); } catch (IOException e) { e.printStackTrace(); } }
java
@Override public void process(Map<String, String> varMap, Writer out) { try { if (templateText == null) { templateText = Utils.readFileIntoString(input); } String replacedString = replace(varMap); out.write(replacedString); out.flush(); } catch (IOException e) { e.printStackTrace(); } }
[ "@", "Override", "public", "void", "process", "(", "Map", "<", "String", ",", "String", ">", "varMap", ",", "Writer", "out", ")", "{", "try", "{", "if", "(", "templateText", "==", "null", ")", "{", "templateText", "=", "Utils", ".", "readFileIntoString",...
Processes the template @param varMap variable map @param out the writer to output the text to.
[ "Processes", "the", "template" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/SimpleTemplate.java#L73-L90
135,366
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/SimpleTemplate.java
SimpleTemplate.replace
public String replace(Map<String, String> varMap) { StringBuilder newString = new StringBuilder(); int p = 0; int p0 = 0; while (true) { p = templateText.indexOf("${", p); if (p == -1) { newString.append(templateText.substring(p0, templateText.length())); break; } else { newString.append(templateText.substring(p0, p)); } p0 = p; p = templateText.indexOf("}", p); if (p != -1) { String varName = templateText.substring(p0 + 2, p).trim(); if (varMap.containsKey(varName)) { newString.append(varMap.get(varName)); p0 = p + 1; } } } return newString.toString(); }
java
public String replace(Map<String, String> varMap) { StringBuilder newString = new StringBuilder(); int p = 0; int p0 = 0; while (true) { p = templateText.indexOf("${", p); if (p == -1) { newString.append(templateText.substring(p0, templateText.length())); break; } else { newString.append(templateText.substring(p0, p)); } p0 = p; p = templateText.indexOf("}", p); if (p != -1) { String varName = templateText.substring(p0 + 2, p).trim(); if (varMap.containsKey(varName)) { newString.append(varMap.get(varName)); p0 = p + 1; } } } return newString.toString(); }
[ "public", "String", "replace", "(", "Map", "<", "String", ",", "String", ">", "varMap", ")", "{", "StringBuilder", "newString", "=", "new", "StringBuilder", "(", ")", ";", "int", "p", "=", "0", ";", "int", "p0", "=", "0", ";", "while", "(", "true", ...
Replace string in the template text @param varMap variable map @return replaced string
[ "Replace", "string", "in", "the", "template", "text" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/SimpleTemplate.java#L98-L129
135,367
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/deploymentrepository/DeploymentBuilder.java
DeploymentBuilder.getConnectionFactories
public Collection<ConnectionFactory> getConnectionFactories() { if (connectionFactories == null) return Collections.emptyList(); return Collections.unmodifiableCollection(connectionFactories); }
java
public Collection<ConnectionFactory> getConnectionFactories() { if (connectionFactories == null) return Collections.emptyList(); return Collections.unmodifiableCollection(connectionFactories); }
[ "public", "Collection", "<", "ConnectionFactory", ">", "getConnectionFactories", "(", ")", "{", "if", "(", "connectionFactories", "==", "null", ")", "return", "Collections", ".", "emptyList", "(", ")", ";", "return", "Collections", ".", "unmodifiableCollection", "...
Get connection factories @return The value
[ "Get", "connection", "factories" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/deploymentrepository/DeploymentBuilder.java#L246-L252
135,368
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/deploymentrepository/DeploymentBuilder.java
DeploymentBuilder.connectionFactory
public DeploymentBuilder connectionFactory(ConnectionFactory v) { if (connectionFactories == null) connectionFactories = new ArrayList<ConnectionFactory>(); connectionFactories.add(v); return this; }
java
public DeploymentBuilder connectionFactory(ConnectionFactory v) { if (connectionFactories == null) connectionFactories = new ArrayList<ConnectionFactory>(); connectionFactories.add(v); return this; }
[ "public", "DeploymentBuilder", "connectionFactory", "(", "ConnectionFactory", "v", ")", "{", "if", "(", "connectionFactories", "==", "null", ")", "connectionFactories", "=", "new", "ArrayList", "<", "ConnectionFactory", ">", "(", ")", ";", "connectionFactories", "."...
Add connection factory @param v The value @return The builder
[ "Add", "connection", "factory" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/deploymentrepository/DeploymentBuilder.java#L259-L266
135,369
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/deploymentrepository/DeploymentBuilder.java
DeploymentBuilder.getAdminObjects
public Collection<AdminObject> getAdminObjects() { if (adminObjects == null) return Collections.emptyList(); return Collections.unmodifiableCollection(adminObjects); }
java
public Collection<AdminObject> getAdminObjects() { if (adminObjects == null) return Collections.emptyList(); return Collections.unmodifiableCollection(adminObjects); }
[ "public", "Collection", "<", "AdminObject", ">", "getAdminObjects", "(", ")", "{", "if", "(", "adminObjects", "==", "null", ")", "return", "Collections", ".", "emptyList", "(", ")", ";", "return", "Collections", ".", "unmodifiableCollection", "(", "adminObjects"...
Get admin objects @return The value
[ "Get", "admin", "objects" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/deploymentrepository/DeploymentBuilder.java#L272-L278
135,370
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/deploymentrepository/DeploymentBuilder.java
DeploymentBuilder.adminObject
public DeploymentBuilder adminObject(AdminObject v) { if (adminObjects == null) adminObjects = new ArrayList<AdminObject>(); adminObjects.add(v); return this; }
java
public DeploymentBuilder adminObject(AdminObject v) { if (adminObjects == null) adminObjects = new ArrayList<AdminObject>(); adminObjects.add(v); return this; }
[ "public", "DeploymentBuilder", "adminObject", "(", "AdminObject", "v", ")", "{", "if", "(", "adminObjects", "==", "null", ")", "adminObjects", "=", "new", "ArrayList", "<", "AdminObject", ">", "(", ")", ";", "adminObjects", ".", "add", "(", "v", ")", ";", ...
Add admin object @param v The value @return The builder
[ "Add", "admin", "object" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/deploymentrepository/DeploymentBuilder.java#L285-L292
135,371
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.attributeAsBoolean
protected Boolean attributeAsBoolean(XMLStreamReader reader, String attributeName, Boolean defaultValue, Map<String, String> expressions) throws XMLStreamException, ParserException { String attributeString = rawAttributeText(reader, attributeName); if (attributeName != null && expressions != null && attributeString != null && attributeString.indexOf("${") != -1) expressions.put(attributeName, attributeString); String stringValue = getSubstitutionValue(attributeString); if (StringUtils.isEmpty(stringValue) || stringValue.trim().equalsIgnoreCase("true") || stringValue.trim().equalsIgnoreCase("false")) { return StringUtils.isEmpty(stringValue) ? defaultValue : Boolean.valueOf(stringValue.trim()); } else { throw new ParserException(bundle.attributeAsBoolean(attributeString, reader.getLocalName())); } }
java
protected Boolean attributeAsBoolean(XMLStreamReader reader, String attributeName, Boolean defaultValue, Map<String, String> expressions) throws XMLStreamException, ParserException { String attributeString = rawAttributeText(reader, attributeName); if (attributeName != null && expressions != null && attributeString != null && attributeString.indexOf("${") != -1) expressions.put(attributeName, attributeString); String stringValue = getSubstitutionValue(attributeString); if (StringUtils.isEmpty(stringValue) || stringValue.trim().equalsIgnoreCase("true") || stringValue.trim().equalsIgnoreCase("false")) { return StringUtils.isEmpty(stringValue) ? defaultValue : Boolean.valueOf(stringValue.trim()); } else { throw new ParserException(bundle.attributeAsBoolean(attributeString, reader.getLocalName())); } }
[ "protected", "Boolean", "attributeAsBoolean", "(", "XMLStreamReader", "reader", ",", "String", "attributeName", ",", "Boolean", "defaultValue", ",", "Map", "<", "String", ",", "String", ">", "expressions", ")", "throws", "XMLStreamException", ",", "ParserException", ...
convert an xml attribute in boolean value. Empty elements results in default value @param reader the StAX reader @param attributeName the name of the attribute @param defaultValue defaultValue @param expressions The expressions @return the boolean representing element @throws XMLStreamException StAX exception @throws ParserException in case of not valid boolean for given attribute
[ "convert", "an", "xml", "attribute", "in", "boolean", "value", ".", "Empty", "elements", "results", "in", "default", "value" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L128-L148
135,372
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.rawAttributeText
private String rawAttributeText(XMLStreamReader reader, String attributeName) { String attributeString = reader.getAttributeValue("", attributeName); if (attributeString == null) return null; return attributeString.trim(); }
java
private String rawAttributeText(XMLStreamReader reader, String attributeName) { String attributeString = reader.getAttributeValue("", attributeName); if (attributeString == null) return null; return attributeString.trim(); }
[ "private", "String", "rawAttributeText", "(", "XMLStreamReader", "reader", ",", "String", "attributeName", ")", "{", "String", "attributeString", "=", "reader", ".", "getAttributeValue", "(", "\"\"", ",", "attributeName", ")", ";", "if", "(", "attributeString", "=...
Read the raw attribute @param reader @param attributeName @return the string representing raw attribute textx
[ "Read", "the", "raw", "attribute" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L236-L244
135,373
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.elementAsInteger
protected Integer elementAsInteger(XMLStreamReader reader, String key, Map<String, String> expressions) throws XMLStreamException, ParserException { Integer integerValue = null; String elementtext = rawElementText(reader); if (key != null && expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions.put(key, elementtext); try { integerValue = Integer.valueOf(getSubstitutionValue(elementtext)); } catch (NumberFormatException nfe) { throw new ParserException(bundle.notValidNumber(elementtext, reader.getLocalName())); } return integerValue; }
java
protected Integer elementAsInteger(XMLStreamReader reader, String key, Map<String, String> expressions) throws XMLStreamException, ParserException { Integer integerValue = null; String elementtext = rawElementText(reader); if (key != null && expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions.put(key, elementtext); try { integerValue = Integer.valueOf(getSubstitutionValue(elementtext)); } catch (NumberFormatException nfe) { throw new ParserException(bundle.notValidNumber(elementtext, reader.getLocalName())); } return integerValue; }
[ "protected", "Integer", "elementAsInteger", "(", "XMLStreamReader", "reader", ",", "String", "key", ",", "Map", "<", "String", ",", "String", ">", "expressions", ")", "throws", "XMLStreamException", ",", "ParserException", "{", "Integer", "integerValue", "=", "nul...
convert an xml element in Integer value @param reader the StAX reader @param key The key @param expressions The expressions @return the integer representing element @throws XMLStreamException StAX exception @throws ParserException in case it isn't a number
[ "convert", "an", "xml", "element", "in", "Integer", "value" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L256-L274
135,374
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.elementAsLong
protected Long elementAsLong(XMLStreamReader reader, String key, Map<String, String> expressions) throws XMLStreamException, ParserException { Long longValue = null; String elementtext = rawElementText(reader); if (key != null && expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions.put(key, elementtext); try { longValue = Long.valueOf(getSubstitutionValue(elementtext)); } catch (NumberFormatException nfe) { throw new ParserException(bundle.notValidNumber(elementtext, reader.getLocalName())); } return longValue; }
java
protected Long elementAsLong(XMLStreamReader reader, String key, Map<String, String> expressions) throws XMLStreamException, ParserException { Long longValue = null; String elementtext = rawElementText(reader); if (key != null && expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions.put(key, elementtext); try { longValue = Long.valueOf(getSubstitutionValue(elementtext)); } catch (NumberFormatException nfe) { throw new ParserException(bundle.notValidNumber(elementtext, reader.getLocalName())); } return longValue; }
[ "protected", "Long", "elementAsLong", "(", "XMLStreamReader", "reader", ",", "String", "key", ",", "Map", "<", "String", ",", "String", ">", "expressions", ")", "throws", "XMLStreamException", ",", "ParserException", "{", "Long", "longValue", "=", "null", ";", ...
convert an xml element in Long value @param reader the StAX reader @param key The key @param expressions The expressions @return the long representing element @throws XMLStreamException StAX exception @throws ParserException in case it isn't a number
[ "convert", "an", "xml", "element", "in", "Long", "value" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L286-L305
135,375
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.elementAsFlushStrategy
protected FlushStrategy elementAsFlushStrategy(XMLStreamReader reader, Map<String, String> expressions) throws XMLStreamException, ParserException { String elementtext = rawElementText(reader); if (expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions.put(CommonXML.ELEMENT_FLUSH_STRATEGY, elementtext); FlushStrategy result = FlushStrategy.forName(getSubstitutionValue(elementtext)); if (result != FlushStrategy.UNKNOWN) return result; throw new ParserException(bundle.notValidFlushStrategy(elementtext)); }
java
protected FlushStrategy elementAsFlushStrategy(XMLStreamReader reader, Map<String, String> expressions) throws XMLStreamException, ParserException { String elementtext = rawElementText(reader); if (expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions.put(CommonXML.ELEMENT_FLUSH_STRATEGY, elementtext); FlushStrategy result = FlushStrategy.forName(getSubstitutionValue(elementtext)); if (result != FlushStrategy.UNKNOWN) return result; throw new ParserException(bundle.notValidFlushStrategy(elementtext)); }
[ "protected", "FlushStrategy", "elementAsFlushStrategy", "(", "XMLStreamReader", "reader", ",", "Map", "<", "String", ",", "String", ">", "expressions", ")", "throws", "XMLStreamException", ",", "ParserException", "{", "String", "elementtext", "=", "rawElementText", "(...
convert an xml element in FlushStrategy value @param reader the StAX reader @param expressions expressions @return the flush strategy represention @throws XMLStreamException StAX exception @throws ParserException in case it isn't a number
[ "convert", "an", "xml", "element", "in", "FlushStrategy", "value" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L316-L330
135,376
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.parseCapacity
protected Capacity parseCapacity(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { Extension incrementer = null; Extension decrementer = null; while (reader.hasNext()) { switch (reader.nextTag()) { case END_ELEMENT : { switch (reader.getLocalName()) { case CommonXML.ELEMENT_CAPACITY : return new CapacityImpl(incrementer, decrementer); default : break; } } case START_ELEMENT : { switch (reader.getLocalName()) { case CommonXML.ELEMENT_INCREMENTER : { incrementer = parseExtension(reader, CommonXML.ELEMENT_INCREMENTER); break; } case CommonXML.ELEMENT_DECREMENTER : { decrementer = parseExtension(reader, CommonXML.ELEMENT_DECREMENTER); break; } default : // Nothing } break; } default : throw new ParserException(bundle.unexpectedElement(reader.getLocalName())); } } throw new ParserException(bundle.unexpectedEndOfDocument()); }
java
protected Capacity parseCapacity(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { Extension incrementer = null; Extension decrementer = null; while (reader.hasNext()) { switch (reader.nextTag()) { case END_ELEMENT : { switch (reader.getLocalName()) { case CommonXML.ELEMENT_CAPACITY : return new CapacityImpl(incrementer, decrementer); default : break; } } case START_ELEMENT : { switch (reader.getLocalName()) { case CommonXML.ELEMENT_INCREMENTER : { incrementer = parseExtension(reader, CommonXML.ELEMENT_INCREMENTER); break; } case CommonXML.ELEMENT_DECREMENTER : { decrementer = parseExtension(reader, CommonXML.ELEMENT_DECREMENTER); break; } default : // Nothing } break; } default : throw new ParserException(bundle.unexpectedElement(reader.getLocalName())); } } throw new ParserException(bundle.unexpectedEndOfDocument()); }
[ "protected", "Capacity", "parseCapacity", "(", "XMLStreamReader", "reader", ")", "throws", "XMLStreamException", ",", "ParserException", ",", "ValidateException", "{", "Extension", "incrementer", "=", "null", ";", "Extension", "decrementer", "=", "null", ";", "while",...
Parse capacity tag @param reader reader @return the parsed capacity object @throws XMLStreamException in case of error @throws ParserException in case of error @throws ValidateException in case of error
[ "Parse", "capacity", "tag" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L836-L876
135,377
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.filterPoolEvents
public static List<TraceEvent> filterPoolEvents(List<TraceEvent> data) throws Exception { List<TraceEvent> result = new ArrayList<TraceEvent>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_GET || te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_PREFILL || te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_INCREMENTER || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_RETURN || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_IDLE || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_INVALID || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_FLUSH || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_ERROR || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_PREFILL || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_INCREMENTER || te.getType() == TraceEvent.MANAGED_CONNECTION_POOL_CREATE || te.getType() == TraceEvent.MANAGED_CONNECTION_POOL_DESTROY || te.getType() == TraceEvent.PUSH_CCM_CONTEXT || te.getType() == TraceEvent.POP_CCM_CONTEXT || te.getType() == TraceEvent.REGISTER_CCM_CONNECTION || te.getType() == TraceEvent.UNREGISTER_CCM_CONNECTION || te.getType() == TraceEvent.CCM_USER_TRANSACTION || te.getType() == TraceEvent.UNKNOWN_CCM_CONNECTION || te.getType() == TraceEvent.CLOSE_CCM_CONNECTION || te.getType() == TraceEvent.VERSION) continue; result.add(te); } return result; }
java
public static List<TraceEvent> filterPoolEvents(List<TraceEvent> data) throws Exception { List<TraceEvent> result = new ArrayList<TraceEvent>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_GET || te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_PREFILL || te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_INCREMENTER || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_RETURN || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_IDLE || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_INVALID || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_FLUSH || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_ERROR || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_PREFILL || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_INCREMENTER || te.getType() == TraceEvent.MANAGED_CONNECTION_POOL_CREATE || te.getType() == TraceEvent.MANAGED_CONNECTION_POOL_DESTROY || te.getType() == TraceEvent.PUSH_CCM_CONTEXT || te.getType() == TraceEvent.POP_CCM_CONTEXT || te.getType() == TraceEvent.REGISTER_CCM_CONNECTION || te.getType() == TraceEvent.UNREGISTER_CCM_CONNECTION || te.getType() == TraceEvent.CCM_USER_TRANSACTION || te.getType() == TraceEvent.UNKNOWN_CCM_CONNECTION || te.getType() == TraceEvent.CLOSE_CCM_CONNECTION || te.getType() == TraceEvent.VERSION) continue; result.add(te); } return result; }
[ "public", "static", "List", "<", "TraceEvent", ">", "filterPoolEvents", "(", "List", "<", "TraceEvent", ">", "data", ")", "throws", "Exception", "{", "List", "<", "TraceEvent", ">", "result", "=", "new", "ArrayList", "<", "TraceEvent", ">", "(", ")", ";", ...
Filter the pool events @param data The data @return The filtered events @exception Exception If an error occurs
[ "Filter", "the", "pool", "events" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L55-L87
135,378
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.filterLifecycleEvents
public static Map<String, List<TraceEvent>> filterLifecycleEvents(List<TraceEvent> data) throws Exception { Map<String, List<TraceEvent>> result = new TreeMap<String, List<TraceEvent>>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_GET || te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_PREFILL || te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_INCREMENTER || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_RETURN || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_IDLE || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_INVALID || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_FLUSH || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_ERROR || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_PREFILL || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_INCREMENTER || te.getType() == TraceEvent.MANAGED_CONNECTION_POOL_CREATE || te.getType() == TraceEvent.MANAGED_CONNECTION_POOL_DESTROY) { List<TraceEvent> l = result.get(te.getPool()); if (l == null) l = new ArrayList<TraceEvent>(); l.add(te); result.put(te.getPool(), l); } } return result; }
java
public static Map<String, List<TraceEvent>> filterLifecycleEvents(List<TraceEvent> data) throws Exception { Map<String, List<TraceEvent>> result = new TreeMap<String, List<TraceEvent>>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_GET || te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_PREFILL || te.getType() == TraceEvent.CREATE_CONNECTION_LISTENER_INCREMENTER || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_RETURN || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_IDLE || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_INVALID || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_FLUSH || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_ERROR || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_PREFILL || te.getType() == TraceEvent.DESTROY_CONNECTION_LISTENER_INCREMENTER || te.getType() == TraceEvent.MANAGED_CONNECTION_POOL_CREATE || te.getType() == TraceEvent.MANAGED_CONNECTION_POOL_DESTROY) { List<TraceEvent> l = result.get(te.getPool()); if (l == null) l = new ArrayList<TraceEvent>(); l.add(te); result.put(te.getPool(), l); } } return result; }
[ "public", "static", "Map", "<", "String", ",", "List", "<", "TraceEvent", ">", ">", "filterLifecycleEvents", "(", "List", "<", "TraceEvent", ">", "data", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "List", "<", "TraceEvent", ">", ">", "re...
Filter the lifecycle events @param data The data @return The filtered events @exception Exception If an error occurs
[ "Filter", "the", "lifecycle", "events" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L95-L126
135,379
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.filterCCMEvents
public static List<TraceEvent> filterCCMEvents(List<TraceEvent> data) throws Exception { List<TraceEvent> result = new ArrayList<TraceEvent>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.PUSH_CCM_CONTEXT || te.getType() == TraceEvent.POP_CCM_CONTEXT) { result.add(te); } } return result; }
java
public static List<TraceEvent> filterCCMEvents(List<TraceEvent> data) throws Exception { List<TraceEvent> result = new ArrayList<TraceEvent>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.PUSH_CCM_CONTEXT || te.getType() == TraceEvent.POP_CCM_CONTEXT) { result.add(te); } } return result; }
[ "public", "static", "List", "<", "TraceEvent", ">", "filterCCMEvents", "(", "List", "<", "TraceEvent", ">", "data", ")", "throws", "Exception", "{", "List", "<", "TraceEvent", ">", "result", "=", "new", "ArrayList", "<", "TraceEvent", ">", "(", ")", ";", ...
Filter the CCM events @param data The data @return The filtered events @exception Exception If an error occurs
[ "Filter", "the", "CCM", "events" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L134-L148
135,380
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.filterCCMPoolEvents
public static Map<String, List<TraceEvent>> filterCCMPoolEvents(List<TraceEvent> data) throws Exception { Map<String, List<TraceEvent>> result = new TreeMap<String, List<TraceEvent>>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.REGISTER_CCM_CONNECTION || te.getType() == TraceEvent.UNREGISTER_CCM_CONNECTION || te.getType() == TraceEvent.CCM_USER_TRANSACTION || te.getType() == TraceEvent.UNKNOWN_CCM_CONNECTION || te.getType() == TraceEvent.CLOSE_CCM_CONNECTION) { List<TraceEvent> l = result.get(te.getPool()); if (l == null) l = new ArrayList<TraceEvent>(); l.add(te); result.put(te.getPool(), l); } } return result; }
java
public static Map<String, List<TraceEvent>> filterCCMPoolEvents(List<TraceEvent> data) throws Exception { Map<String, List<TraceEvent>> result = new TreeMap<String, List<TraceEvent>>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.REGISTER_CCM_CONNECTION || te.getType() == TraceEvent.UNREGISTER_CCM_CONNECTION || te.getType() == TraceEvent.CCM_USER_TRANSACTION || te.getType() == TraceEvent.UNKNOWN_CCM_CONNECTION || te.getType() == TraceEvent.CLOSE_CCM_CONNECTION) { List<TraceEvent> l = result.get(te.getPool()); if (l == null) l = new ArrayList<TraceEvent>(); l.add(te); result.put(te.getPool(), l); } } return result; }
[ "public", "static", "Map", "<", "String", ",", "List", "<", "TraceEvent", ">", ">", "filterCCMPoolEvents", "(", "List", "<", "TraceEvent", ">", "data", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "List", "<", "TraceEvent", ">", ">", "resu...
Filter the CCM pool events @param data The data @return The filtered events @exception Exception If an error occurs
[ "Filter", "the", "CCM", "pool", "events" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L156-L180
135,381
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.poolManagedConnectionPools
public static Map<String, Set<String>> poolManagedConnectionPools(List<TraceEvent> data) throws Exception { Map<String, Set<String>> result = new TreeMap<String, Set<String>>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.GET_CONNECTION_LISTENER || te.getType() == TraceEvent.GET_CONNECTION_LISTENER_NEW || te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER || te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER_NEW) { Set<String> s = result.get(te.getPool()); if (s == null) s = new TreeSet<String>(); s.add(te.getManagedConnectionPool()); result.put(te.getPool(), s); } } return result; }
java
public static Map<String, Set<String>> poolManagedConnectionPools(List<TraceEvent> data) throws Exception { Map<String, Set<String>> result = new TreeMap<String, Set<String>>(); for (TraceEvent te : data) { if (te.getType() == TraceEvent.GET_CONNECTION_LISTENER || te.getType() == TraceEvent.GET_CONNECTION_LISTENER_NEW || te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER || te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER_NEW) { Set<String> s = result.get(te.getPool()); if (s == null) s = new TreeSet<String>(); s.add(te.getManagedConnectionPool()); result.put(te.getPool(), s); } } return result; }
[ "public", "static", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "poolManagedConnectionPools", "(", "List", "<", "TraceEvent", ">", "data", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "result"...
Pool to Managed Connection Pools mapping @param data The data @return The mapping @exception Exception If an error occurs
[ "Pool", "to", "Managed", "Connection", "Pools", "mapping" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L188-L211
135,382
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.getEvents
public static List<TraceEvent> getEvents(FileReader fr, File directory) throws Exception { return getEvents(getData(fr, directory)); }
java
public static List<TraceEvent> getEvents(FileReader fr, File directory) throws Exception { return getEvents(getData(fr, directory)); }
[ "public", "static", "List", "<", "TraceEvent", ">", "getEvents", "(", "FileReader", "fr", ",", "File", "directory", ")", "throws", "Exception", "{", "return", "getEvents", "(", "getData", "(", "fr", ",", "directory", ")", ")", ";", "}" ]
Get the events @param fr The file reader @param directory The directory @return The events @exception Exception If an error occurs
[ "Get", "the", "events" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L333-L336
135,383
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.isStartState
public static boolean isStartState(TraceEvent te) { if (te.getType() == TraceEvent.GET_CONNECTION_LISTENER || te.getType() == TraceEvent.GET_CONNECTION_LISTENER_NEW || te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER || te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER_NEW || te.getType() == TraceEvent.CLEAR_CONNECTION_LISTENER) return true; return false; }
java
public static boolean isStartState(TraceEvent te) { if (te.getType() == TraceEvent.GET_CONNECTION_LISTENER || te.getType() == TraceEvent.GET_CONNECTION_LISTENER_NEW || te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER || te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER_NEW || te.getType() == TraceEvent.CLEAR_CONNECTION_LISTENER) return true; return false; }
[ "public", "static", "boolean", "isStartState", "(", "TraceEvent", "te", ")", "{", "if", "(", "te", ".", "getType", "(", ")", "==", "TraceEvent", ".", "GET_CONNECTION_LISTENER", "||", "te", ".", "getType", "(", ")", "==", "TraceEvent", ".", "GET_CONNECTION_LI...
Is start state @param te The event @return The value
[ "Is", "start", "state" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L590-L600
135,384
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.isEndState
public static boolean isEndState(TraceEvent te) { if (te.getType() == TraceEvent.RETURN_CONNECTION_LISTENER || te.getType() == TraceEvent.RETURN_CONNECTION_LISTENER_WITH_KILL || te.getType() == TraceEvent.RETURN_INTERLEAVING_CONNECTION_LISTENER || te.getType() == TraceEvent.RETURN_INTERLEAVING_CONNECTION_LISTENER_WITH_KILL || te.getType() == TraceEvent.CLEAR_CONNECTION_LISTENER) return true; return false; }
java
public static boolean isEndState(TraceEvent te) { if (te.getType() == TraceEvent.RETURN_CONNECTION_LISTENER || te.getType() == TraceEvent.RETURN_CONNECTION_LISTENER_WITH_KILL || te.getType() == TraceEvent.RETURN_INTERLEAVING_CONNECTION_LISTENER || te.getType() == TraceEvent.RETURN_INTERLEAVING_CONNECTION_LISTENER_WITH_KILL || te.getType() == TraceEvent.CLEAR_CONNECTION_LISTENER) return true; return false; }
[ "public", "static", "boolean", "isEndState", "(", "TraceEvent", "te", ")", "{", "if", "(", "te", ".", "getType", "(", ")", "==", "TraceEvent", ".", "RETURN_CONNECTION_LISTENER", "||", "te", ".", "getType", "(", ")", "==", "TraceEvent", ".", "RETURN_CONNECTIO...
Is end state @param te The event @return The value
[ "Is", "end", "state" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L607-L617
135,385
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.getConnectionListenerData
public static Map<String, List<Interaction>> getConnectionListenerData(List<Interaction> data) { Map<String, List<Interaction>> result = new TreeMap<String, List<Interaction>>(); for (int i = 0; i < data.size(); i++) { Interaction interaction = data.get(i); List<Interaction> l = result.get(interaction.getConnectionListener()); if (l == null) l = new ArrayList<Interaction>(); l.add(interaction); result.put(interaction.getConnectionListener(), l); } return result; }
java
public static Map<String, List<Interaction>> getConnectionListenerData(List<Interaction> data) { Map<String, List<Interaction>> result = new TreeMap<String, List<Interaction>>(); for (int i = 0; i < data.size(); i++) { Interaction interaction = data.get(i); List<Interaction> l = result.get(interaction.getConnectionListener()); if (l == null) l = new ArrayList<Interaction>(); l.add(interaction); result.put(interaction.getConnectionListener(), l); } return result; }
[ "public", "static", "Map", "<", "String", ",", "List", "<", "Interaction", ">", ">", "getConnectionListenerData", "(", "List", "<", "Interaction", ">", "data", ")", "{", "Map", "<", "String", ",", "List", "<", "Interaction", ">", ">", "result", "=", "new...
Get a connection listener map @param data The data @return The result
[ "Get", "a", "connection", "listener", "map" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L734-L753
135,386
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.hasException
public static boolean hasException(List<TraceEvent> events) { for (TraceEvent te : events) { if (te.getType() == TraceEvent.EXCEPTION) return true; } return false; }
java
public static boolean hasException(List<TraceEvent> events) { for (TraceEvent te : events) { if (te.getType() == TraceEvent.EXCEPTION) return true; } return false; }
[ "public", "static", "boolean", "hasException", "(", "List", "<", "TraceEvent", ">", "events", ")", "{", "for", "(", "TraceEvent", "te", ":", "events", ")", "{", "if", "(", "te", ".", "getType", "(", ")", "==", "TraceEvent", ".", "EXCEPTION", ")", "retu...
Has an exception event @param events The events @return True if there is an exception
[ "Has", "an", "exception", "event" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L789-L798
135,387
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.exceptionDescription
public static String exceptionDescription(String encoded) { char[] data = encoded.toCharArray(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < data.length; i++) { char c = data[i]; if (c == '|') { sb = sb.append('\n'); } else if (c == '/') { sb = sb.append('\r'); } else if (c == '\\') { sb = sb.append('\t'); } else if (c == '_') { sb = sb.append(' '); } else { sb = sb.append(c); } } return sb.toString(); }
java
public static String exceptionDescription(String encoded) { char[] data = encoded.toCharArray(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < data.length; i++) { char c = data[i]; if (c == '|') { sb = sb.append('\n'); } else if (c == '/') { sb = sb.append('\r'); } else if (c == '\\') { sb = sb.append('\t'); } else if (c == '_') { sb = sb.append(' '); } else { sb = sb.append(c); } } return sb.toString(); }
[ "public", "static", "String", "exceptionDescription", "(", "String", "encoded", ")", "{", "char", "[", "]", "data", "=", "encoded", ".", "toCharArray", "(", ")", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "...
Get exception description @param encoded The encoded string @return The string
[ "Get", "exception", "description" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L805-L836
135,388
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.prettyPrint
public static String prettyPrint(TraceEvent te) { if (te.getType() != TraceEvent.GET_CONNECTION_LISTENER && te.getType() != TraceEvent.GET_CONNECTION_LISTENER_NEW && te.getType() != TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER && te.getType() != TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER_NEW && te.getType() != TraceEvent.RETURN_CONNECTION_LISTENER && te.getType() != TraceEvent.RETURN_CONNECTION_LISTENER_WITH_KILL && te.getType() != TraceEvent.RETURN_INTERLEAVING_CONNECTION_LISTENER && te.getType() != TraceEvent.RETURN_INTERLEAVING_CONNECTION_LISTENER_WITH_KILL && te.getType() != TraceEvent.CREATE_CONNECTION_LISTENER_GET && te.getType() != TraceEvent.CREATE_CONNECTION_LISTENER_PREFILL && te.getType() != TraceEvent.CREATE_CONNECTION_LISTENER_INCREMENTER && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_RETURN && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_IDLE && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_INVALID && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_FLUSH && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_ERROR && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_PREFILL && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_INCREMENTER && te.getType() != TraceEvent.EXCEPTION && te.getType() != TraceEvent.PUSH_CCM_CONTEXT && te.getType() != TraceEvent.POP_CCM_CONTEXT) return te.toString(); StringBuilder sb = new StringBuilder(); sb.append("IJTRACER"); sb.append("-"); sb.append(te.getPool()); sb.append("-"); sb.append(te.getManagedConnectionPool()); sb.append("-"); sb.append(te.getThreadId()); sb.append("-"); sb.append(te.getType()); sb.append("-"); sb.append(te.getTimestamp()); sb.append("-"); sb.append(te.getConnectionListener()); sb.append("-"); sb.append("DATA"); return sb.toString(); }
java
public static String prettyPrint(TraceEvent te) { if (te.getType() != TraceEvent.GET_CONNECTION_LISTENER && te.getType() != TraceEvent.GET_CONNECTION_LISTENER_NEW && te.getType() != TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER && te.getType() != TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER_NEW && te.getType() != TraceEvent.RETURN_CONNECTION_LISTENER && te.getType() != TraceEvent.RETURN_CONNECTION_LISTENER_WITH_KILL && te.getType() != TraceEvent.RETURN_INTERLEAVING_CONNECTION_LISTENER && te.getType() != TraceEvent.RETURN_INTERLEAVING_CONNECTION_LISTENER_WITH_KILL && te.getType() != TraceEvent.CREATE_CONNECTION_LISTENER_GET && te.getType() != TraceEvent.CREATE_CONNECTION_LISTENER_PREFILL && te.getType() != TraceEvent.CREATE_CONNECTION_LISTENER_INCREMENTER && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_RETURN && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_IDLE && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_INVALID && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_FLUSH && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_ERROR && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_PREFILL && te.getType() != TraceEvent.DESTROY_CONNECTION_LISTENER_INCREMENTER && te.getType() != TraceEvent.EXCEPTION && te.getType() != TraceEvent.PUSH_CCM_CONTEXT && te.getType() != TraceEvent.POP_CCM_CONTEXT) return te.toString(); StringBuilder sb = new StringBuilder(); sb.append("IJTRACER"); sb.append("-"); sb.append(te.getPool()); sb.append("-"); sb.append(te.getManagedConnectionPool()); sb.append("-"); sb.append(te.getThreadId()); sb.append("-"); sb.append(te.getType()); sb.append("-"); sb.append(te.getTimestamp()); sb.append("-"); sb.append(te.getConnectionListener()); sb.append("-"); sb.append("DATA"); return sb.toString(); }
[ "public", "static", "String", "prettyPrint", "(", "TraceEvent", "te", ")", "{", "if", "(", "te", ".", "getType", "(", ")", "!=", "TraceEvent", ".", "GET_CONNECTION_LISTENER", "&&", "te", ".", "getType", "(", ")", "!=", "TraceEvent", ".", "GET_CONNECTION_LIST...
Pretty print event @param te The event @return The string
[ "Pretty", "print", "event" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L843-L885
135,389
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.getVersion
public static TraceEvent getVersion(List<TraceEvent> events) { for (TraceEvent te : events) { if (te.getType() == TraceEvent.VERSION) return te; } return null; }
java
public static TraceEvent getVersion(List<TraceEvent> events) { for (TraceEvent te : events) { if (te.getType() == TraceEvent.VERSION) return te; } return null; }
[ "public", "static", "TraceEvent", "getVersion", "(", "List", "<", "TraceEvent", ">", "events", ")", "{", "for", "(", "TraceEvent", "te", ":", "events", ")", "{", "if", "(", "te", ".", "getType", "(", ")", "==", "TraceEvent", ".", "VERSION", ")", "retur...
Get the version @param events The events @return The version information
[ "Get", "the", "version" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L892-L901
135,390
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.hasMoreApplicationEvents
static boolean hasMoreApplicationEvents(List<TraceEvent> events, int index) { if (index < 0 || index >= events.size()) return false; for (int j = index; j < events.size(); j++) { TraceEvent te = events.get(j); if (te.getType() == TraceEvent.GET_CONNECTION || te.getType() == TraceEvent.RETURN_CONNECTION) return true; } return false; }
java
static boolean hasMoreApplicationEvents(List<TraceEvent> events, int index) { if (index < 0 || index >= events.size()) return false; for (int j = index; j < events.size(); j++) { TraceEvent te = events.get(j); if (te.getType() == TraceEvent.GET_CONNECTION || te.getType() == TraceEvent.RETURN_CONNECTION) return true; } return false; }
[ "static", "boolean", "hasMoreApplicationEvents", "(", "List", "<", "TraceEvent", ">", "events", ",", "int", "index", ")", "{", "if", "(", "index", "<", "0", "||", "index", ">=", "events", ".", "size", "(", ")", ")", "return", "false", ";", "for", "(", ...
Has more application events @param events The events @param index The index @return True if more application events after the index
[ "Has", "more", "application", "events" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L1056-L1070
135,391
ironjacamar/ironjacamar
embedded/src/main/java/org/ironjacamar/embedded/junit4/IronJacamar.java
IronJacamar.filterAndSort
private Collection<FrameworkMethod> filterAndSort(List<FrameworkMethod> fms, boolean isStatic) throws Exception { SortedMap<Integer, FrameworkMethod> m = new TreeMap<>(); for (FrameworkMethod fm : fms) { SecurityActions.setAccessible(fm.getMethod()); if (Modifier.isStatic(fm.getMethod().getModifiers()) == isStatic) { Deployment deployment = (Deployment)fm.getAnnotation(Deployment.class); int order = deployment.order(); if (order <= 0 || m.containsKey(Integer.valueOf(order))) throw new Exception("Incorrect order definition '" + order + "' on " + fm.getDeclaringClass().getName() + "#" + fm.getName()); m.put(Integer.valueOf(order), fm); } } return m.values(); }
java
private Collection<FrameworkMethod> filterAndSort(List<FrameworkMethod> fms, boolean isStatic) throws Exception { SortedMap<Integer, FrameworkMethod> m = new TreeMap<>(); for (FrameworkMethod fm : fms) { SecurityActions.setAccessible(fm.getMethod()); if (Modifier.isStatic(fm.getMethod().getModifiers()) == isStatic) { Deployment deployment = (Deployment)fm.getAnnotation(Deployment.class); int order = deployment.order(); if (order <= 0 || m.containsKey(Integer.valueOf(order))) throw new Exception("Incorrect order definition '" + order + "' on " + fm.getDeclaringClass().getName() + "#" + fm.getName()); m.put(Integer.valueOf(order), fm); } } return m.values(); }
[ "private", "Collection", "<", "FrameworkMethod", ">", "filterAndSort", "(", "List", "<", "FrameworkMethod", ">", "fms", ",", "boolean", "isStatic", ")", "throws", "Exception", "{", "SortedMap", "<", "Integer", ",", "FrameworkMethod", ">", "m", "=", "new", "Tre...
Filter and sort @param fms The FrameworkMethods @param isStatic Filter static @return The filtered and sorted FrameworkMethods @exception Exception If an order definition is incorrect
[ "Filter", "and", "sort" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/embedded/src/main/java/org/ironjacamar/embedded/junit4/IronJacamar.java#L563-L585
135,392
ironjacamar/ironjacamar
embedded/src/main/java/org/ironjacamar/embedded/junit4/IronJacamar.java
IronJacamar.getParameters
private Object[] getParameters(FrameworkMethod fm) { Method m = fm.getMethod(); SecurityActions.setAccessible(m); Class<?>[] parameters = m.getParameterTypes(); Annotation[][] parameterAnnotations = m.getParameterAnnotations(); Object[] result = new Object[parameters.length]; for (int i = 0; i < parameters.length; i++) { Annotation[] parameterAnnotation = parameterAnnotations[i]; boolean inject = false; String name = null; for (int j = 0; j < parameterAnnotation.length; j++) { Annotation a = parameterAnnotation[j]; if (javax.inject.Inject.class.equals(a.annotationType())) { inject = true; } else if (javax.inject.Named.class.equals(a.annotationType())) { name = ((javax.inject.Named)a).value(); } } if (inject) { result[i] = resolveBean(name != null ? name : parameters[i].getSimpleName(), parameters[i]); } else { result[i] = null; } } return result; }
java
private Object[] getParameters(FrameworkMethod fm) { Method m = fm.getMethod(); SecurityActions.setAccessible(m); Class<?>[] parameters = m.getParameterTypes(); Annotation[][] parameterAnnotations = m.getParameterAnnotations(); Object[] result = new Object[parameters.length]; for (int i = 0; i < parameters.length; i++) { Annotation[] parameterAnnotation = parameterAnnotations[i]; boolean inject = false; String name = null; for (int j = 0; j < parameterAnnotation.length; j++) { Annotation a = parameterAnnotation[j]; if (javax.inject.Inject.class.equals(a.annotationType())) { inject = true; } else if (javax.inject.Named.class.equals(a.annotationType())) { name = ((javax.inject.Named)a).value(); } } if (inject) { result[i] = resolveBean(name != null ? name : parameters[i].getSimpleName(), parameters[i]); } else { result[i] = null; } } return result; }
[ "private", "Object", "[", "]", "getParameters", "(", "FrameworkMethod", "fm", ")", "{", "Method", "m", "=", "fm", ".", "getMethod", "(", ")", ";", "SecurityActions", ".", "setAccessible", "(", "m", ")", ";", "Class", "<", "?", ">", "[", "]", "parameter...
Get parameter values for a method @param fm The FrameworkMethod @return The resolved parameters
[ "Get", "parameter", "values", "for", "a", "method" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/embedded/src/main/java/org/ironjacamar/embedded/junit4/IronJacamar.java#L593-L632
135,393
ironjacamar/ironjacamar
embedded/src/main/java/org/ironjacamar/embedded/junit4/IronJacamar.java
IronJacamar.resolveBean
private Object resolveBean(String name, Class<?> type) { try { return embedded.lookup(name, type); } catch (Throwable t) { return null; } }
java
private Object resolveBean(String name, Class<?> type) { try { return embedded.lookup(name, type); } catch (Throwable t) { return null; } }
[ "private", "Object", "resolveBean", "(", "String", "name", ",", "Class", "<", "?", ">", "type", ")", "{", "try", "{", "return", "embedded", ".", "lookup", "(", "name", ",", "type", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "return", ...
Resolve a bean @param name The name @param type The type @return The value
[ "Resolve", "a", "bean" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/embedded/src/main/java/org/ironjacamar/embedded/junit4/IronJacamar.java#L640-L650
135,394
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/recovery/SecurityActions.java
SecurityActions.setAccessible
static void setAccessible(final Method m, final boolean value) { AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { m.setAccessible(value); return null; } }); }
java
static void setAccessible(final Method m, final boolean value) { AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { m.setAccessible(value); return null; } }); }
[ "static", "void", "setAccessible", "(", "final", "Method", "m", ",", "final", "boolean", "value", ")", "{", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedAction", "<", "Object", ">", "(", ")", "{", "public", "Object", "run", "(", ")", "{"...
Invoke setAccessible on a method @param m The method @param value The value
[ "Invoke", "setAccessible", "on", "a", "method" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/recovery/SecurityActions.java#L46-L56
135,395
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java
MbeanImplCodeGen.writeVars
private void writeVars(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "/** JNDI name */\n"); writeWithIndent(out, indent, "private static final String JNDI_NAME = \"java:/eis/" + def.getDefaultValue() + "\";\n\n"); writeWithIndent(out, indent, "/** MBeanServer instance */\n"); writeWithIndent(out, indent, "private MBeanServer mbeanServer;\n\n"); writeWithIndent(out, indent, "/** Object Name */\n"); writeWithIndent(out, indent, "private String objectName;\n\n"); writeWithIndent(out, indent, "/** The actual ObjectName instance */\n"); writeWithIndent(out, indent, "private ObjectName on;\n\n"); writeWithIndent(out, indent, "/** Registered */\n"); writeWithIndent(out, indent, "private boolean registered;\n\n"); }
java
private void writeVars(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "/** JNDI name */\n"); writeWithIndent(out, indent, "private static final String JNDI_NAME = \"java:/eis/" + def.getDefaultValue() + "\";\n\n"); writeWithIndent(out, indent, "/** MBeanServer instance */\n"); writeWithIndent(out, indent, "private MBeanServer mbeanServer;\n\n"); writeWithIndent(out, indent, "/** Object Name */\n"); writeWithIndent(out, indent, "private String objectName;\n\n"); writeWithIndent(out, indent, "/** The actual ObjectName instance */\n"); writeWithIndent(out, indent, "private ObjectName on;\n\n"); writeWithIndent(out, indent, "/** Registered */\n"); writeWithIndent(out, indent, "private boolean registered;\n\n"); }
[ "private", "void", "writeVars", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeWithIndent", "(", "out", ",", "indent", ",", "\"/** JNDI name */\\n\"", ")", ";", "writeWithIndent", "(", "out", ",",...
Output class vars @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "class", "vars" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java#L124-L141
135,396
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java
MbeanImplCodeGen.writeMethods
private void writeMethods(Definition def, Writer out, int indent) throws IOException { if (def.getMcfDefs().get(0).isDefineMethodInConnection()) { if (def.getMcfDefs().get(0).getMethods().size() > 0) { for (MethodForConnection method : def.getMcfDefs().get(0).getMethods()) { writeMethodSignature(out, indent, method); writeLeftCurlyBracket(out, indent); writeIndent(out, indent + 1); if (!method.getReturnType().equals("void")) { out.write("return "); } out.write("getConnection()." + method.getMethodName() + "("); int paramSize = method.getParams().size(); for (int i = 0; i < paramSize; i++) { MethodParam param = method.getParams().get(i); out.write(param.getName()); if (i + 1 < paramSize) out.write(", "); } out.write(");\n"); writeRightCurlyBracket(out, indent); } } } else { writeSimpleMethodSignature(out, indent, " * Call me", "public void callMe()"); writeLeftCurlyBracket(out, indent); writeWithIndent(out, indent + 1, "try"); writeLeftCurlyBracket(out, indent + 1); writeWithIndent(out, indent + 2, "getConnection().callMe();"); writeRightCurlyBracket(out, indent + 1); writeWithIndent(out, indent + 1, "catch (Exception e)"); writeLeftCurlyBracket(out, indent + 1); writeRightCurlyBracket(out, indent + 1); writeRightCurlyBracket(out, indent); } }
java
private void writeMethods(Definition def, Writer out, int indent) throws IOException { if (def.getMcfDefs().get(0).isDefineMethodInConnection()) { if (def.getMcfDefs().get(0).getMethods().size() > 0) { for (MethodForConnection method : def.getMcfDefs().get(0).getMethods()) { writeMethodSignature(out, indent, method); writeLeftCurlyBracket(out, indent); writeIndent(out, indent + 1); if (!method.getReturnType().equals("void")) { out.write("return "); } out.write("getConnection()." + method.getMethodName() + "("); int paramSize = method.getParams().size(); for (int i = 0; i < paramSize; i++) { MethodParam param = method.getParams().get(i); out.write(param.getName()); if (i + 1 < paramSize) out.write(", "); } out.write(");\n"); writeRightCurlyBracket(out, indent); } } } else { writeSimpleMethodSignature(out, indent, " * Call me", "public void callMe()"); writeLeftCurlyBracket(out, indent); writeWithIndent(out, indent + 1, "try"); writeLeftCurlyBracket(out, indent + 1); writeWithIndent(out, indent + 2, "getConnection().callMe();"); writeRightCurlyBracket(out, indent + 1); writeWithIndent(out, indent + 1, "catch (Exception e)"); writeLeftCurlyBracket(out, indent + 1); writeRightCurlyBracket(out, indent + 1); writeRightCurlyBracket(out, indent); } }
[ "private", "void", "writeMethods", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "if", "(", "def", ".", "getMcfDefs", "(", ")", ".", "get", "(", "0", ")", ".", "isDefineMethodInConnection", "(", ...
Output defined methods @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "defined", "methods" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java#L151-L195
135,397
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java
MbeanImplCodeGen.writeGetConnection
private void writeGetConnection(Definition def, Writer out, int indent) throws IOException { String connInterface = def.getMcfDefs().get(0).getConnInterfaceClass(); String cfInterface = def.getMcfDefs().get(0).getCfInterfaceClass(); writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, indent, " * GetConnection\n"); writeWithIndent(out, indent, " * @return " + connInterface); writeEol(out); writeWithIndent(out, indent, " */\n"); writeWithIndent(out, indent, "private " + connInterface + " getConnection() throws Exception"); writeLeftCurlyBracket(out, indent); writeWithIndent(out, indent + 1, "InitialContext context = new InitialContext();\n"); writeIndent(out, indent + 1); out.write(cfInterface + " factory = (" + cfInterface + ")context.lookup(JNDI_NAME);\n"); writeIndent(out, indent + 1); out.write(connInterface + " conn = factory.getConnection();\n"); writeWithIndent(out, indent + 1, "if (conn == null)"); writeLeftCurlyBracket(out, indent + 1); writeIndent(out, indent + 2); out.write("throw new RuntimeException(\"No connection\");"); writeRightCurlyBracket(out, indent + 1); writeWithIndent(out, indent + 1, "return conn;"); writeRightCurlyBracket(out, indent); }
java
private void writeGetConnection(Definition def, Writer out, int indent) throws IOException { String connInterface = def.getMcfDefs().get(0).getConnInterfaceClass(); String cfInterface = def.getMcfDefs().get(0).getCfInterfaceClass(); writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, indent, " * GetConnection\n"); writeWithIndent(out, indent, " * @return " + connInterface); writeEol(out); writeWithIndent(out, indent, " */\n"); writeWithIndent(out, indent, "private " + connInterface + " getConnection() throws Exception"); writeLeftCurlyBracket(out, indent); writeWithIndent(out, indent + 1, "InitialContext context = new InitialContext();\n"); writeIndent(out, indent + 1); out.write(cfInterface + " factory = (" + cfInterface + ")context.lookup(JNDI_NAME);\n"); writeIndent(out, indent + 1); out.write(connInterface + " conn = factory.getConnection();\n"); writeWithIndent(out, indent + 1, "if (conn == null)"); writeLeftCurlyBracket(out, indent + 1); writeIndent(out, indent + 2); out.write("throw new RuntimeException(\"No connection\");"); writeRightCurlyBracket(out, indent + 1); writeWithIndent(out, indent + 1, "return conn;"); writeRightCurlyBracket(out, indent); }
[ "private", "void", "writeGetConnection", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "String", "connInterface", "=", "def", ".", "getMcfDefs", "(", ")", ".", "get", "(", "0", ")", ".", "getConnIn...
Output getConnection method @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "getConnection", "method" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java#L205-L232
135,398
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/bootstrapcontext/BootstrapContextImpl.java
BootstrapContextImpl.createTimer
public Timer createTimer() { Timer t = new Timer(true); if (timers == null) timers = new ArrayList<Timer>(); timers.add(t); return t; }
java
public Timer createTimer() { Timer t = new Timer(true); if (timers == null) timers = new ArrayList<Timer>(); timers.add(t); return t; }
[ "public", "Timer", "createTimer", "(", ")", "{", "Timer", "t", "=", "new", "Timer", "(", "true", ")", ";", "if", "(", "timers", "==", "null", ")", "timers", "=", "new", "ArrayList", "<", "Timer", ">", "(", ")", ";", "timers", ".", "add", "(", "t"...
Create a timer @return The timer
[ "Create", "a", "timer" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/bootstrapcontext/BootstrapContextImpl.java#L158-L168
135,399
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/bootstrapcontext/BootstrapContextImpl.java
BootstrapContextImpl.isContextSupported
public boolean isContextSupported(Class<? extends WorkContext> workContextClass) { if (workContextClass == null) return false; return supportedContexts.contains(workContextClass); }
java
public boolean isContextSupported(Class<? extends WorkContext> workContextClass) { if (workContextClass == null) return false; return supportedContexts.contains(workContextClass); }
[ "public", "boolean", "isContextSupported", "(", "Class", "<", "?", "extends", "WorkContext", ">", "workContextClass", ")", "{", "if", "(", "workContextClass", "==", "null", ")", "return", "false", ";", "return", "supportedContexts", ".", "contains", "(", "workCo...
Is the work context supported ? @param workContextClass The work context class @return True if supported; otherwise false
[ "Is", "the", "work", "context", "supported", "?" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/bootstrapcontext/BootstrapContextImpl.java#L175-L181