Skip to main content

Testing EJBs

Posted by daniel on August 6, 2004 at 6:01 AM PDT

What's the fuss about testing outside of a container

Some frameworks stress the importance of testing an EJB within its container. Others argue that it's important to test an EJB outside of its container. In today's
Forums, prasadgc writes "Think about this: Is a POJO testable outside its container (i.e., the JVM)? Is a servlet or JSP testable outside the web container? Why is it a requirement for EJBs alone to be testable outside their container? All Java components (POJOs, servlets or EJBs) are managed components to some degree, because they rely on a containing framework to do some (or a lot) of their work for them."

SKaffman writes "One aspect which I'd like to see given more emphasis is that of deployment descriptors, specifically regarding the use of "hide-the-nastiness" tools like xdoclet. Would you expect xdoclet to still have a place in your model, or do you see no need to have it generate the reams of redundant code and complex descriptors which we have now?"

Ron Hitchens continues the Effective Java Programming Language Guide forum with Item 33: Beware the performance of string contatenation. Ron writes that "This has to be one of the most common Java programming mistakes. Do you understand how implicit string concatenation is performed? Do you know when it's safe to concatenate strings with the "+" operator and when you should use a StringBuffer object to build up a string?"

Note: Chris Adamson is doing most of the work on the site while I am on vacation this week. I've promised my family to only check in the mornings while they are still asleep.


In
Also in Java Today
"Eclipse Cookbook" author Steve Holzner is back with more practical tips for using the popular IDE. In Cooking with Eclipse, Part 2, he looks at how to integrate a CVS source repository with Eclipse, and then switches gears to GUI programming as he shows how to use AWT and Swing components inside SWT widgets.

Cloudscape, recently offered as an open-source project, is an embeddable Java database that becomes part of the application that uses it. In Cloudscape Version 10: A technical overview, Kathy Saunders and Jean Anderson highlight the features and advantages of this all-Java SQL database.


Ozgur Akan talks about the importance of believing in us
in today's Weblogs. As he writes about the beginning of his project, he notes that it is important to stay motivated.


In Projects and Communities, from the jini.org home page, A High Performance Options Exchange Gateway Built on JavaSpaces describes how a grid solution for options trading, built with JavaSpaces, offered improved scalability and extensibility over its C#/.NET predecessor.

The Java Web Services & XML Community project URL Rewrite Filter provides a URL rewriter, equivalent to Apache's popular mod_rewrite module, that can be dropped into Resin, Orion, or Tomcat. This allows sites to hide their internal structure, gracefully handle moved content and planned outages, etc.


In today's java.net News Headlines
:

Registered users can submit news items for the href="http://today.java.net/today/news/">java.net News Page using
our news submission
form
. All submissions go through an editorial review before being posted to the site. You can also subscribe to
thejava.net
News RSS feed
.


Current and upcoming
Java Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e"> events submission
form. All submissions go through an editorial review before being
posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the
Java
Today RSS feed
. Also, once this page
is no longer featured as the front page of
java.net
it will be archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.