JPA comes with a way of doing triggers, which is pretty cool: EntityListeners. It is a simple POJO that is annotated as EntityListener, and that gets linked to the triggering event by some outside glue. That outside glue can be an XML deployment descriptor (has nothing to do with the EJB 2.1 XML deployment descriptor; is nothing else but an override to the annotations found in the Java source...
on Jan 3, 2010
One of the many cool new features in Java EE 6, is support for the DataSourceDefinition annotation.
The DataSourceDefinition annotation provides a way to define a DataSource and register it with JNDI. The annotation provided annotation elements for the commonly used DataSource properties. Additional standard and vendor specific properties may also be specified.
So let us look at an example:
on Dec 10, 2009
While speaking at the Globalcode Developer's
conference in Rio de Janeiro, I met a dynamic and intelligent
student by the name of Thiago
Diogo. Thiaogo presented his group's work on student project to
provide a real, mission critical distributed application for his
university, Universidade Federal
Fulminense. They chose JSF 1.2 and Seam as a part of their stack.
One idea Thiaogo shared with me...
on Nov 23, 2009
The W3C Social Web Incubator Group is organizing a free Bar Camp in the Santa Clara Sun Campus on November 2nd to foster a wide ranging discussion on the issues required to build the global Social Web.
Imagine a world where everybody could participate easily in a distributed yet secure Social Web. In such a world every one will be able to control their own information, and every business would...
on Oct 26, 2009
JPA has its puzzles and from time to time it is useful to write
down that tricky solution for our mapping needs.This entry describes a
ManyToMany relationship with an additional state in the intermediate
table. All my examples are related to the Arena-PUJ project, the pet
project I am hard working nowadays. Arena is an online system to manage
academic competitions, and within its several tables...
on Oct 24, 2009
The Sun Mobility Platform Telematics demo, co-developed by Oracle and Sun, was showcased at Oracle Open World this week. It was shown as part of a presentation on Monday and at the Berkeley DB (BDB) booth for the rest of the week. The demo shows a simulation of vehicles synchronizing events collected on a local database (BDB) to a back-end Oracle database. Events collected from vehicle sensors...
on Oct 15, 2009
Content available at: http://blog.arungupta.me/2009/10/oracle-open-world-2009-day-2-report/.
on Oct 13, 2009
Content available at: http://blog.arungupta.me/2009/10/oracle-open-world-2009-day-1-report/.
on Oct 11, 2009
Can you compile, deploy and test your Java EE projects with just
1 line of command? Check it out.
I have no time for documentations lately, but I prefer to give
you a chance to early adopt my build script and take your own
conclusions. Following the steps below, you will have my Java EE 5
application running in your Glassfish v2.1 server - including test data
populated in the MySql database....
on Oct 9, 2009
Content available at: http://blog.arungupta.me/2009/10/totd-112-exposing-oracle-database-tables-as-restful-entities-using-jax-rs-glassfish-and-netbeans/.
on Oct 8, 2009
Content available at: http://blog.arungupta.me/2009/10/totd-111-rails-scaffold-for-a-pre-existing-table-using-oracle-and-glassfish/.
on Oct 8, 2009
Content available at: http://blog.arungupta.me/2009/10/totd-110-jruby-on-rails-application-using-oracle-on-glassfish/.
on Oct 8, 2009
Content available at: http://blog.arungupta.me/2009/09/totd-106-connect-to-oracle-database-using-netbeans/.
on Oct 2, 2009
Content available at: http://blog.arungupta.me/2009/09/totd-105-how-to-install-oracle-database...
on Sep 28, 2009
If you are reading this blog it means you want to use JasperReport with dynamically programmatically generated images. An example of such use cases in generating complex charts using JFreeChart and then including these charts into reports.
Each report in JasperReport uses a datasource to populate the fields, we need to use JRBeanCollectionDataSource which can be considered as a simple collection...
on Sep 21, 2009
I have just two arguments to avoid using long as type of the primary keys of JPA Entities:
Integers IDs allow tables with ~2 billion records. Yes, you read well: max(Integer) = 2,147,483,647
the JPA pagination methods only accepts Integers Query setFirstResult(int startPosition) an Query setMaxResults(int maxResult)
Summary:only adopt data types long for your tables...
on Sep 7, 2009
Well, this is the second time I am using the new blogging platform of Java.net. This time it was much easier and with less hurdle.
I want to write about JPA, performance, caching and related things. Though it wont be very well organized but it may come useful for new JPA developers. recently I have assigned a task to work on performance problems of a first tier application and further extend it...
on Sep 3, 2009
The refcard discuss the following items:
The BDB Family : An introduction to different DBD family members, including BDB Base Edition, BDB XML edition and BDB Java Edition with tables comparing their features.
Key Features: Key features of BDB family members and BDB Java Edition exclusive features are explained here
Introducing Berkeley DB Java Edition includin:
Installation: How to...
on Sep 1, 2009
TOTD #97 showed how to install GlassFish Tools Bundle for Eclipse 1.1. Basically there are two options - either install Eclipse 3.4.2 with WTP and pre-bundled/configured with GlassFish v2/v3, MySQL JDBC driver and other features. Or if you are using Eclipse 3.5, then you can install the plug-in separately and get most of the functionality.
TOTD #98 showed how to create a simple Metro/JAX-WS...
on Aug 31, 2009
Kristian Waagan (of Sun's Java DB development team) has really given Java DB (Sun's distribution of Apache / Derby) a new life of its own when it comes to handling CLOBs, starting with Java DB 10.5.
Check out this thread.
Note the following testimony from David Goulden:
The performance improvements with CLOBs are
dramatic. I created a record with a CLOB containing about 10 million...
on May 28, 2009