Web Sphere EJBs Experiences Deployment Best Practices Brian

Web. Sphere & EJB’s Experiences, Deployment & Best Practices Brian Mitchell brian. mitchell@cigna. com Chief Technical Architect http: //www. mcs. drexel. edu/~bmitchel/ejbtalk. pdf

A Web. Sphere Chronology • Servlet & JSP’s support has always been good in Web. Sphere • However, If using EJB’s, make sure that you are using version 3. 02. 2 – – – Version 2. x – infancy Version 3. 0 – better, but still unreliable Version 3. 02 – workable, but not fully stable Version 3. 02. 1 – stable Version 3. 02. 2 – stable & repeatable deployments

Begin Transaction EJB Servlet JSP . . . End Transaction Business Component Bean Business Entities Business Logic Business Rules Finders Persistence Framework Database (UDB, DB 2) Our (High-Level) Application Architecture

Web. Sphere 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 • 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 Web. Sphere works will probably reduce 50% of your deployment problems Node dependent classpath + all the application container's deployed EJB JARs Each classpath defined to the Web Application Primordial Class. Loader JAR Class. Loader Power Class. Loader (a. k. a. Servlet Class. Loader) Servlet/JSP -- -classpath JVM argument + CLASSPATH property in admin. config Used By EJB -- Constructed Using

Web. Sphere 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/mcs 575/ejbtransaction. pdf • Problem Determination – Use a logging facility – Consider “catching” and logging unchecked Java exceptions (java. lang. Runtime. Exception) – Web. Sphere will loose the exception context when it throws a Remote. Exception

Summary: Web. Sphere & EJB • Use Web. Sphere 3. 02. 2 for EJB’s • Web. Sphere has improved dramatically over the past year: – EJB Support – Documentation (online and PDF’s) • Web. Sphere still has a way to go with: – – Useful error messages A good performing administrative environment Persistence (EJB Entity Bean Support) A “Web. Sphere Aware” Distributed Debugger
- Slides: 7