April 4, 2009

Using JavaFX Mobile to Combat Device UI Fragmentation

ith the recent release of the JavaFX Software Developer Kit 1.1, Sun also released the long awaited JavaFX Mobile platform. Through a Java-like scripting language (JavaFX Script) and a single API, JavaFX provides a development tool that supports a variety of platforms, from desktops to mobile devices. This article provides

Create an XML File or XmlDocument Directly from a StringBuilder

An earlier DevX tip, “Create a New XML File Using XmlDocument,” showed how to create a new XmlDocument, populate it, and save the results to a file. This tip uses the same XML example, but builds the document with a StringBuilder instead, which is simpler than working directly with the

Table Variables Are More Efficient than Temporary Tables In Some Cases

SQL developers are mostly familiar with using temporary tables to temporarily accumulate or store query results. However, using a “table variable,” a less well-known concept, turns out to be a better performer in some cases. Specifically, when you have only a few rows that you need to hold in a

Inject an EJB 3.0 into the init() Method of a Servlet

This tip shows you how to inject an EJB 3.0 into the init() method of a servlet. //place all the required imports hereimport package.to.EJB.interface.myInterface;public class EJB30Servlet extends HttpServlet {@EJBmyInterface myobj;public void init(ServletConfig config) throws ServletException { super.init(config); try { //get the inital context Context ctx = new InitialContext(); myobj=(myInterface) ctx.lookup(myInterface.class.getName());