Saturday, January 05, 2008

EJB3, Glassfish, MySQL, Toplink Working Together

Oh brother I cant tell you how much of a pain in the butt it was trying to get all these to work together. The JPA is really straightforward. No challenge there but the persistence.xml configuration and JDBC connections for MySQL are just no where to be found. Looking everywhere I couldn't find some really simple documentation on setting up MySQL to work with Glassfish and EJB3 with the JPA. I'm sure someone did find a link but it took some effort to find the right configuration.

Sure plenty of J2SE examples but when it came down to setting up the connection pooling and the jta-datasource I couldnt find a thing. Well bits and pieces and about 3 days later I have it running.

Tomorrow I'll be posting my notes on everything. Hopefully someone else can save some time in getting these to work together. I still haven't successfully replaced toplink with Hibernate at the EntityManger but for right now I'm happy having MySQL running vs. derby.

More on this soon.

No comments: