- SpringSource tc Server 2.0 Adds VMware Virtualization to Commercial Tomcat — Developer.com – The new Spring edition of tc Server 2.0 also provides expanded integration with virtualization technologies from VMware (NYSE: VMW), enabling developers to deploy apps to both real and virtual environments
- Building a GAE+GWT application using the best practices, Part 1 « Reminiscential: of or pertaining to remembrance – In the next few blog posts, I’m going to present my experience building a simple (but non-trivial) web application using GWT and Google App Engine, while applying the best practices introduced by Ray Ryan in his excellent presentation at Google IO last year.
- Beanlib – Java Bean Library – Beanlib is a utility library for use with JavaBean. Beanlib for Hibernate in particular makes it easy for developers to reuse the same pojo classes for both persistence and data transfer objects
- gwt-html-editor – GWT WYSIWYG HTML (Rich Text) Editor – This is a simple but sufficient for most cases WYSIWYG HTML (Rich Text) Editor Widget fully (99% + JSNI) implemented with GW
- Ext.ux.Printer – A generic printing class that assists with the printing of any Ext.Component – Ext.ux.Printer is a small library that provides a generic way of printing Ext Components (Grids, Trees, etc).<br />
It consists of the main Printer class, and a number of Renderers, which each provide support for a given type of <br />
- Happiness is a Warm Cloud – Jay Pipes – Rackspace is also heavily invested in Cassandra, and sees integration of Drizzle and Cassandra as being a key way to add value to its platforms and therefore for its customers
- Spring – Dependency checking with @Required Annotation | Spring – The @Required Annotation is more flexible than dependency checking in XML file, because it can apply to a particular property only
- Ehcache 2.0 Gets More ‘Enterprisey’ Features | Javalobby – Ehcache 2.0 now supports fully-coherent distributed caching as a Hibernate Second-Level Cache, as well as directly through the Ehcache API, using one common JVM vendor-agnostic .jar file
iBATIS SQL Maps is an open-source JDBC framework that provides a very simple and flexible means of moving data between your Java objects and a relational database. The SQL Maps framework helps reduce the amount of Java/JDBC code that is needed to access a relational database. The framework allows you to map JavaBeans to SQL statements using a very simple XML descriptor that allows you to create complex queries, and inner/outer joins. The beauty of it all is that this is achieved without any special database tables, bytecode manipulation, or code generation.
iBATIS is not meant to replace Object-Relational Mapping (ORM) tools such as Hibernate, OJB, Entity beans or TopLink to name a few. Rather it is a low-level framework that allows you to directly hand-code your SQL statements and map them to Java object. Once you map your persistence layer to your object model, you are all set. You don’t need to lookup DataSource, get connections, create prepared statements, parse ResultSet or even cache the results – iBATIS does it all for you. Under the covers, iBATIS creates a PreparedStatement, sets the parameters (if any), executes the statements and builds a Map or JavaBean object from the ResultSet. If the SQL statement was an insert or an update, the numbers of rows affected by the SQL are returned. Here’s a little sample to illustrate the features of iBATIS: We’ll start with a simple database that ships with the JpetStore application from iBATIS.
First you configure SQL Maps by creating a XML configuration file, which provides configuration details for DataSources, SQL Maps and other options like thread management. Here is a simple example of the SQL Map configuration file:
In my case, I am deploying this code in WebLogic and I have already created a connection pool and a datasource on the WebLogic side. I am just referring to the name of the datasource by using
jdbc/jpetstoreDS. You can also create your own datasource via. the SQL Map configuration file:
The SQL Map configuration file includes a reference to another SQL Map file that contains your SQL statements for insert, update, delete as well as results and parameter mapping. Here is a simple example of the file Account.xml:
Account.xml SQL Map file is pretty self-explanatory — In the file, we are describing a select statement that takes an Integer as it’s argument and returns an instance of com.j2eegeek.ibatis.domain.Account. Insert, updates, deletes work the same way along with stored procedures and dynamic queries. The programming API for SQL Maps is really straightforward and provides the developer with the ability to: configure an SQL Map, execute an SQL update (including insert and delete), execute a query for a single object, and execute a query for a list of objects.
A pretty simple example but it should illustrate the simplicity of iBATIS SQL Maps and show you the potential of this framework. SQL Maps takes away all of the work required to create Statements, validate and parse inputs, create and parse ResultSets and all of the nitty-gritty details of working with SQL by hand. Instead, you are working at the object level and not really worrying about how your data is stored or retrieved. I’ve found that this also enables a good separation of work where your ‘data-guy’ can create up the appropriate SQL statements for you and you just plug them in, assuming you have a ‘data-guy’. I’ve found that SQL Maps really helps me in my development process (In most cases, I am working with existing databases) as I spend time looking at the data-model as part of my overall design process and will typically mock-up the SQL statements I am going to use to manipulate the data at hand. Now I can just take my SQL statements and plug them into the SQL Map XML files and half my app is already built.
iBATIS SQL Maps is really powerful and you can take this one step further by using Spring’s DAO framework in conjunction with iBATIS. Using Spring’s DAO framework and the iBATIS template classes provided by Spring, you will write even less code that you would have normally written using iBATIS by itself.