-
grep processor /proc/cpuinfo | wc -l
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<property name="hibernate.show_sql" value="true" /> | |
<property name="hibernate.format_sql" value="true" /> | |
<property name="hibernate.use_sql_coments" value="true" /> | |
<property name="hibernate.generate_statistics" value="true" /> | |
<property name="hibernate.cache.infinispan.statistics" value="true" /> | |
<property name="hibernate.cache.use_structured_entries" value="true" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change IFS according your needs | |
IFS=':' read -a array <<< "$string" | |
# Without index | |
for element in "${array[@]}" | |
do | |
echo "$element" | |
done | |
# With index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Map<Class<?>, String> getEJBLookups() throws NamingException, ClassNotFoundException { | |
InitialContext ctx = new InitialContext(); | |
NamingEnumeration<NameClassPair> globals; | |
NamingEnumeration<NameClassPair> modules; | |
NamingEnumeration<NameClassPair> apps; | |
Map<Class<?>,String> lookups = new HashMap<Class<?>,String>(); | |
globals = ctx.list("java:global"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Resource(lookup = "java:app/AppName") | |
private String appName; | |
@Resource(lookup = "java:module/ModuleName") | |
private String moduleName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Object getEJB(final Class<?> ejbClass) throws Exception { | |
try { | |
InitialContext ctx = new InitialContext(); | |
NamingEnumeration<NameClassPair> globals; | |
NamingEnumeration<NameClassPair> modules; | |
NamingEnumeration<NameClassPair> apps; | |
NameClassPair global; | |
NameClassPair module; | |
NameClassPair app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(runtime=true) | |
or | |
/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime=true) | |
source: https://access.redhat.com/solutions/291093 | |
parameter https://access.redhat.com/solutions/291093 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/core-service=platform-mbean/type=memory:read-attribute(name=heap-memory-usage) | |
/core-service=platform-mbean/type=memory:read-attribute(name=non-heap-memory-usage) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Async Handler | |
How exactly does the async logging handler work in JBoss EAP 6? | |
https://access.redhat.com/solutions/709443 | |
How do I change to the AsyncAppender? | |
https://access.redhat.com/solutions/444033 | |
JBoss stalls with many threads blocking in AsyncHandler | |
https://access.redhat.com/solutions/261093 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Process over time | |
while ( sleep 1 ) ; do ps -p $PID -o %cpu,%mem,rss ; done | |
# Final flags | |
java -XX:+PrintFlagsFinal -version | grep -i HeapSize | |
# Histogram | |
jmap -histo $PID | |
# Heap dump |
OlderNewer