My main blog
Labels
Sunday, June 14, 2015
validate]biz obj ^ validation@user input
I think sometimes you need extra "information" that's unavailable at UI layer. Example? zed credit check; credit card address check
Generally, we validate asap.
--
weblogic server910_generic.jar
A: according to google: go to bea download site, select "solaris 10 x86" and u will get server910_generic.jar
Q: Working on solaris on sparc hardware?
A: yes. Tested many times with T2000 servers.
Q: The jar can work on win32?
A: jdk150_08 will break weblogic910. Confirmed: jdk150_04 supports weblogic insalled from weblogic910_generic.jar
--
Posted By familyman to learning finance,c++,py... <http://bigblog.tanbin.com/2006/09/weblogic-server910genericjar.html> at 9/23/2006 12:53:00 AM
JMV tuning top 2 topics GC ^ JIT
[[Java Performance: The Definitive Guide]] clearly hints that these are top 2 topics for the jvm performance experts.
Saturday, April 18, 2015
[[java performance]] by Scott Oaks
--[[java performance]] by Scott Oaks
best of breed..see chapter details on
[jvm] heap memory
[jvm] threading
[jvm] instrumentation
JPA
serialization
lambda, stream (java 8 interviews!)
The Introduction chapter outlines 3 broad aspects
* JVM – like memory tuning
* java language – like threading, collections
* Java API -- like xml parser, JDBC, serialization, Json...
JVM tuning is done by "system engineers" who may not be developers.
Saturday, November 15, 2014
CompletionService + others (Credit Suisse IV
safe publication
fail fast vs fail safe
timers (scheduled task queue, scheduled thread pool)
3 ways to create threads
how to shut down a multithreaded app
handle all exceptions in a thread pool?
Saturday, May 17, 2014
Saturday, January 18, 2014
[[practical api design]] java
Saturday, June 23, 2012
Thursday, June 21, 2012
netbeans - remote, per-method monitoring
netbeans can attach to remove VM
Wednesday, June 20, 2012
class unloading during GC
When you get a full permgen, it's good to know why so many classes.
Saturday, May 19, 2012
inline vs System.gc()
See P363 [[c++primer]]
Tuesday, April 10, 2012
java enum to implement singleton
Highly recommended by Joshua Bloch. See http://stackoverflow.com/questions/1750435/comparing-java-enum-members-or-equals
Friday, January 13, 2012
idle timer inside app server engines
Idle Timer is just a "state" added to the "decoratee". When the decoratee becomes idle, that time is saved in that state field. When a "Request" is received from a client Call from any thread, the state is checked. If idle time has been too long, we kill that decoratee or mark it as obsolete
See P189 [[Weblogic]]
[1] Heart beat checker is that way.
Sunday, August 28, 2011
private without non-static
Object state is implemented using struct. Operations on objects are implemented in static functions. C++ back to C.
I feel function pointers add lots of power.
Monday, August 22, 2011
singletons - why is the nested class implementation important
the recommended solution. My friend Rohan pointed out why this
solution is sometimes necessary.
Say you can't eager init the static field because it must wait for
some service object.
Say you also don't want to incur the static synchronization every
time. Though un-contended lock acquisition is cheap, it's never free.
Friday, July 8, 2011
not all BEA products are market share leaders
2) Oracle service bus. This is not the MOM
other BEA products aren't as widely used.
Saturday, May 14, 2011
MyMain from XR, showing non-blocking behavior of blocking queue
ThreadPoolExecutor.execute(). You can create an Array blocking queue (myABQ) and submit tasks using myABQ.put().I learnt this from my Taiwan colleague.
ThreadPoolExector api made it clear -- New tasks submitted in methodThreadPoolExecutor.execute
will be rejected when the Executor has been shut down, and also when the Executor uses finite bounds for both maximum threads and work queue capacity, and is saturated.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6648211 describes the non-blocking behavior of blocking thread pool, and mentions a Spring forum discussion --
You have to modify the java.util.concurrent.ThreadPoolExecutor by overriding the execute method and place a task with a put instead of an offer with a zero timeout on the workqueue.
Or you could use the BlockingExecutor (and the ThreadPoolBlockingExecutor as standard implementation) from Prometheus. The primary reason of existence of these classes was to create an Executor that is able to block.
Wednesday, May 11, 2011
Friday, May 6, 2011
jmx - my best practices
* Remove dependencies. Remove layers of indirect dependencies.
* Prefer primitives. Minimize chance of NPE or other exceptions.
* Avoid deep nested method calls.
* Fully Static flow is fine. Just a little bit less danger of NPE.
Friday, April 29, 2011
overwrite a single file in a jar
verify by
1) jar tf
2) jar xf
"jar uf my.jar rel/path/to/file" will probably show "rel/path/to/file"
in jar-tf output