WebSphere & EJB’s Experiences, Deployment & Best Practices Brian Mitchell brian.mitchell@cigna.com Chief Technical Architect http://www.mcs.drexel.edu/~bmitchel/ejbtalk.pdf
WebSphere EJB Tips Pay attention to supported release and maintenance levels of EVERYTHING Learn how to run the trace facility, and how to monitor the logs Learn when, and when not to use EJB’s Would only recommend version 3.02.2’s EJB support Don’t hard-code dependencies, and dependant paths Use property files, XML configuration files, and/or Java resource bundles Watch for differences between WAS and VAJ Watch case sensitivity (Unix versus Non-Unix)
The CLASSPATH Learning how the CLASSPATH in WebSphere works will probably reduce 50% of your deployment problems Constructed Using Used By -classpath JVM argument + CLASSPATH property in admin.config Primordial ClassLoader EJB -- Node dependent classpath + all the application container's deployed EJB JARs Servlet/JSP -- JAR ClassLoader Each classpath defined to the Web Application Power ClassLoader (a.k.a. Servlet ClassLoader)
WebSphere EJB Developer Tips Understand Java Threading Isolation Level/Transaction Attributes – Don’t Ignore these Understand how to apply them to your EJB’s Don’t just accept the defaults http://www.mcs.drexel.edu/~bmitchel/course/mcs575/ejbtransaction.pdf Problem Determination Use a logging facility Consider “catching” and logging unchecked Java exceptions (java.lang.RuntimeException) WebSphere will loose the exception context when it throws a RemoteException
Summary: WebSphere & EJB Use WebSphere 3.02.2 for EJB’s WebSphere has improved dramatically over the past year: EJB Support Documentation (online and PDF’s) WebSphere still has a way to go with: Useful error messages A good performing administrative environment Persistence (EJB Entity Bean Support) A “WebSphere Aware” Distributed Debugger