Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 26

Displaying posts with tag: jpa (reset)

Tab Sweep: jBPM5, Hibernate Logging, Grizzly 2.2.5, Cache and JPA 2.0, Observer Pattern, . . .
Employee_Team +0 Vote Up -0Vote Down

Recent Tips and News on Java, Java EE 6, GlassFish & more :

Using Java Persistence API for Java SE 7 Desktop applications in NetBeans 7 (Oracle Learning Library)
Use jBPM5 embedded within a Java EE 6 application (akquinet)
If JAX-RS had an MVC framework? (Mamadou Lamine Ba)



  [Read more...]
TOTD #150: Collection of GlassFish, NetBeans, JPA, JSF, JAX-WS, EJB, Jersey, MySQL, Rails, Eclipse, and OSGi tips
Employee +0 Vote Up -1Vote Down

This is the 150th tip published on this blog so decided to make it a collection of all the previous ones. Here is a tag cloud (created from wordle.net/create) from title of all the tips:

As expected GlassFish is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:

  [Read more...]
TOTD #150: Collection of GlassFish, NetBeans, JPA, JSF, JAX-WS, EJB, Jersey, MySQL, Rails, Eclipse, and OSGi tips
Employee +0 Vote Up -0Vote Down

This is the 150th tip published on this blog so decided to make it a collection of all the previous ones. Here is a tag cloud (created from wordle.net/create) from title of all the tips:

As expected GlassFish is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:

  [Read more...]
TOTD #150: Collection of GlassFish, NetBeans, JPA, JSF, JAX-WS, EJB, Jersey, MySQL, Rails, Eclipse, and OSGi tips
Employee +0 Vote Up -0Vote Down

This is the 150th tip published on this blog so decided to make it a collection of all the previous ones. Here is a tag cloud (created from wordle.net/create) from title of all the tips:

As expected GlassFish is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:

  [Read more...]
Using ClusterJPA (part of MySQL Cluster Connector for Java) – a tutorial
Employee +4 Vote Up -0Vote Down

Fig. 1 Java access to MySQL Cluster

This is a follow up to the earlier post Using ClusterJ (part of MySQL Cluster Connector for Java) – a tutorial but covers the ClusterJPA interface rather than ClusterJ.

JPA is the Java standard for persistence and different vendors can implement their own implementation of this API and they can (and do) add proprietary extensions. Three of the most common implementations are OpenJPA, Hibernate and Toplink. JPA can be used within server containers or outside of them (i.e. with either J2EE

  [Read more...]
Using ClusterJ (part of MySQL Cluster Connector for Java) – a tutorial
Employee +5 Vote Up -0Vote Down

Fig. 1 Java access to MySQL Cluster

ClusterJ is part of the MySQL Cluster Connector for Java which is currently in beta as part of MySQL Cluster 7.1. It is designed to provide a high performance method for Java applications to store and access data in a MySQL Cluster database. It is also designed to be easy for Java developers to use and is “in the style of” Hibernate/Java Data Objects (JDO) and JPA. It uses the Domain Object Model DataMapper pattern:

  • Data is represented as domain objects
  • Domain objects are separate from business logic
  • Domain objects are mapped to database tables

The purpose of ClusterJ is to

  [Read more...]
Build MySQL Cluster 7.1 from source – including MySQL Cluster Connector for Java
Employee +4 Vote Up -0Vote Down

If you want to try out the beta features in MySQL Cluster 7.1 then you can either use the appropriate binaries or you can build it for yourself from source. Here I explain how to do this on LINUX.

Note that if you want to make use of OpenJPA then you first need to install OpenJPA and Connector/J.

The example here was on Fedora12 with the MySQL Cluster 7.1.2 source:

CFLAGS=”-O3″ CXX=gcc CXXFLAGS=”-O3 -felide-constructors -fno-exceptions -fno-rtti” ./configure -prefix=/usr/local/mysql –enable-assembler –with-mysqld-ldflags=-all-static –with-plugins=max

  [Read more...]
TOTD #122: Creating a JPA Persistence Unit using NetBeans 6.8
Employee +0 Vote Up -0Vote Down

Taking TOTD #121 forward, this blog explains how to create a JPA Persistence Unit for a MySQL sample database and package it as a library. This JAR file can then be easily included in other web applications.

Lets get started!

  • Configure GlassFish for using the MySQL sample database (sakila) as described in TOTD #121.
  • Add the GlassFish instance in NetBeans IDE using "Services" panel.
  • Create JPA entities using NetBeans IDE.
  • Create a Java class library:



  •   [Read more...]
    TOTD #122: Creating a JPA Persistence Unit using NetBeans 6.8
    Employee +0 Vote Up -0Vote Down

    Taking TOTD #121 forward, this blog explains how to create a JPA Persistence Unit for a MySQL sample database and package it as a library. This JAR file can then be easily included in other web applications.

    Lets get started!

  • Configure GlassFish for using the MySQL sample database (sakila) as described in TOTD #121.
  • Add the GlassFish instance in NetBeans IDE using "Services" panel.
  • Create JPA entities using NetBeans IDE.
  • Create a Java class library:



  •   [Read more...]
    TOTD #122: Creating a JPA Persistence Unit using NetBeans 6.8
    Employee +0 Vote Up -0Vote Down

    Taking TOTD #121 forward, this blog explains how to create a JPA Persistence Unit for a MySQL sample database and package it as a library. This JAR file can then be easily included in other web applications.

    Lets get started!

  • Configure GlassFish for using the MySQL sample database (sakila) as described in TOTD #121.
  • Add the GlassFish instance in NetBeans IDE using "Services" panel.
  • Create JPA entities using NetBeans IDE.
  • Create a Java class library:



  •   [Read more...]
    TOTD #121: JDBC resource for MySQL and Oracle sample database in GlassFish v3
    Employee +0 Vote Up -0Vote Down

    This blog clearly explains how to configure the MySQL sample database (sakila) with GlassFish. Even though the instructions use a specific database but should work for other databases (such as Oracle, JavaDB, PostgreSQL, and others) as well. The second half of the blog provide specific syntax for the Oracle sample database.

  • Download sakila sample database and unzip the archive.
  • Install the database as described here - basically load and run "sakila-schema.sql" and "sakila-data.sql" extracted from the archive.
  • Create a new MySQL user account using MySQL CLI Admin and assign the privileges
  •   [Read more...]
    TOTD #121: JDBC resource for MySQL and Oracle sample database in GlassFish v3
    Employee +0 Vote Up -0Vote Down

    This blog clearly explains how to configure the MySQL sample database (sakila) with GlassFish. Even though the instructions use a specific database but should work for other databases (such as Oracle, JavaDB, PostgreSQL, and others) as well. The second half of the blog provide specific syntax for the Oracle sample database.

  • Download sakila sample database and unzip the archive.
  • Install the database as described here - basically load and run "sakila-schema.sql" and "sakila-data.sql" extracted from the archive.
  • Create a new MySQL user account using MySQL CLI Admin and assign the privileges
  •   [Read more...]
    TOTD #121: JDBC resource for MySQL and Oracle sample database in GlassFish v3
    Employee +0 Vote Up -0Vote Down

    This blog clearly explains how to configure the MySQL sample database (sakila) with GlassFish. Even though the instructions use a specific database but should work for other databases (such as Oracle, JavaDB, PostgreSQL, and others) as well. The second half of the blog provide specific syntax for the Oracle sample database.

  • Download sakila sample database and unzip the archive.
  • Install the database as described here - basically load and run "sakila-schema.sql" and "sakila-data.sql" extracted from the archive.
  • Create a new MySQL user account using MySQL CLI Admin and assign the privileges
  •   [Read more...]
    Java and OpenJPA for MySQL Cluster
    Employee +3 Vote Up -0Vote Down

    ClusterJ Architecture

    MySQL have been working on a new way of accessing MySQL Cluster using Java. The aim being to give most of the performance of the C++ NDB API but in a much friendlier form for Java developers. There will in fact be 2 new interfaces – ClusterJ (MySQL’s own API) and a JPA solution (using OpenJPA). If you want to see for yourself then take a look at the Blog entry from Bernhard Ocklin – the engineering manager responsible for this work.

    TOTD #99: Creating a Java EE 6 application using MySQL, JPA 2.0 and Servlet 3.0 with GlassFish Tools Bundle for Eclipse
    Employee +0 Vote Up -0Vote Down
    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 compliant Web service using that bundle and deploy on GlassFish.

    This Tip Of The Day (TOTD)

      [Read more...]
    TOTD #99: Creating a Java EE 6 application using MySQL, JPA 2.0 and Servlet 3.0 with GlassFish Tools Bundle for Eclipse
    Employee +0 Vote Up -0Vote Down
    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 compliant Web service using that bundle and deploy on GlassFish.

    This Tip Of The Day (TOTD)

      [Read more...]
    TOTD #99: Creating a Java EE 6 application using MySQL, JPA 2.0 and Servlet 3.0 with GlassFish Tools Bundle for Eclipse
    Employee +0 Vote Up -0Vote Down
    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 compliant Web service using that bundle and deploy on GlassFish.

    This Tip Of The Day

      [Read more...]
    EclipseLink Pagination with MySQL and GlassFish... and See You at MySQL UC!
    Employee_Team +0 Vote Up -0Vote Down

    The MySQL Users Conference is April 20-23rd in Santa Clara, CA and we are all getting ready for it. Dups has one of the longest preps - he is traveling (by train and bus) from Montreal in his North American Tour visiting Universities around the way.

    Arun only needs to drive across town to present about GlassFish and MySQL, and he has been building up the demo material for his session - see his note on how to use EclipseLink on

      [Read more...]
    TOTD #78: GlassFish, EclipseLink, and MySQL efficient pagination using LIMIT
    Employee +0 Vote Up -0Vote Down
    EclipseLink JPA replaces TopLink Essentials as the JPA implementation in GlassFish v3. One of the benefits of using EclipseLink is that it provides efficient pagination support for the MySQL database by generating native SQL statements such as "SELECT ... FROM <table> LIMIT <offset>, <rowcount>".

    The MySQL LIMIT clause definition says:

    The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be non-negative integer constants



      [Read more...]
    TOTD #78: GlassFish, EclipseLink, and MySQL efficient pagination using LIMIT
    Employee +0 Vote Up -0Vote Down
    EclipseLink JPA replaces TopLink Essentials as the JPA implementation in GlassFish v3. One of the benefits of using EclipseLink is that it provides efficient pagination support for the MySQL database by generating native SQL statements such as "SELECT ... FROM <table> LIMIT <offset>, <rowcount>".

    The MySQL LIMIT clause definition says:

    The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be non-negative integer constants



      [Read more...]
    TOTD #78: GlassFish, EclipseLink, and MySQL efficient pagination using LIMIT
    Employee +0 Vote Up -0Vote Down
    EclipseLink JPA replaces TopLink Essentials as the JPA implementation in GlassFish v3. One of the benefits of using EclipseLink is that it provides efficient pagination support for the MySQL database by generating native SQL statements such as "SELECT ... FROM <table> LIMIT <offset>, <rowcount>".

    The MySQL LIMIT clause definition says:

    The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be non-negative integer constants



      [Read more...]
    Creating an Ajax Application with Script.aculo.us
    Employee +0 Vote Up -0Vote Down

    Hi all,

    Today I'd like to continue a blog series in which I highlight Web application tutorials for NetBeans 6.5. A few changes have been made to tutorials, among which is the featuring of MySQL as the database of choice.

    This second entry in the series will cover the tutorial, "Creating an Ajax Application with Script.aculo.us", which is based on a blog entry by Arun Gupta.

    This tutorial demonstrates the usage of the Java Persistence APIs to implement server side pagination (recommended for large sets of data) and to get and display the results in a text field featuring Ajax functionality. Ajax is a technology that combines (X)HTML, JavaScript, and CSS with the power of XmlHttpRequest in the creation of

      [Read more...]
    TOTD #40: jQuery Autcomplete widget with MySQL, GlassFish, NetBeans
    Employee +0 Vote Up -0Vote Down
    TOTD #39 explained how to create an Autocomplete widget (server-powered autocompleting of text fields, similar to Google Suggest) using Prototype/Script.aculo.us libraries with NetBeans, GlassFish and MySQL. This Tip Of The Day (TOTD) builds upon that project and shows how same functionality can be achieved using jQuery Library.
  • Use the NetBeans project created in TOTD #39. Right-clicking on the project, select "New", "JSP...", enter the name as "index2" and click on "Finish".
  • Download jquery JavaScript

  •   [Read more...]
    TOTD #38: Creating a MySQL Persistence Unit using NetBeans IDE
    Employee +0 Vote Up -0Vote Down

    This TOTD (Tip Of The Day) shows how to create a Persistence Unit (PU) for a MySQL database using NetBeans IDE. This PU can then be used in any of Java EE artifacts (JSP, Servlet, EJB, ...) for database interaction.
  • In NetBeans IDE, create a new project
  • Create a new NetBeans Web project and enter the values ("Autocomplete") as shown:



    and click on "Next".
  • Choose GlassFish v2 as the deployment server and then click on "Finish".
  • Set up the database
  • Start the database as:

    ~ >sudo mysqld_safe --user root
    Password:<YOUR PASSWORD>










  •   [Read more...]
    New Sample App: Groovy, Grails, GlassFish and MySQL
    Employee_Team +0 Vote Up -0Vote Down

    This is not just YAPS (Yet Another Pet Store); this one is Groovy! :-) Carol has written a sample of the now famous Pet Store (check out the Wikipedia Entry) but this time it uses Groovy, Grails, MySQL Server (http://mysql.com) and the GlassFish Server.

    Carol's writeup has full details. Other TA entries on the topic are tagged Groovy

      [Read more...]
    RESTful representation of "sakila" using GlassFish and NetBeans IDE
    Employee +0 Vote Up -0Vote Down

    "sakila" is the sample database shipped with MySQL (http://mysql.com) (pronounced as my ess-kew-ell). In the context of Sun Microsystems announcing the agreement to acquire MySQL, I'd like to dedicate this entry to show how this sample database can be exposed as a RESTful Web service endpoint and deployed on GlassFish using Jersey Tooling Plugin (0.4.1 with Jersey 0.4) in NetBeans IDE.

    Lets get started!

  • Install MySQL & the sample database
  •   [Read more...]
    Showing entries 1 to 26

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.