The Source for Java Technology Collaboration
User: Password:



Sreenivas Munnangi's Blog

Community: Java Enterprise Archives


Java EE 5 samples integarte well with mysql database

Posted by msreddy on March 28, 2008 at 10:02 AM | Permalink | Comments (2)

As part of bundling mysql with GlassFish application server, I set out to test one of the existing samples on mysql which so far used the default Java DB database. It was easy and here are the steps.

  • Install the application server out of the bundle which includes MySQL.
  • Start MySQL DB.
    Refer this install guide for information on how to start MySQL server.
  • login to MySQL data base as root
    grant all privileges on *.* to 'dbuser'@'localhost' identified by 'dbpassword';
    One can be more specific while granting privileges to restrict the scope of access. In addition, the values used for user 'dbuser' and password 'dbpassword' are suggestive, you are free to change them but make sure they are referred appropriately in jdbc connection pool.
  • Start the application server and connect to it through a browser at admin port 4848.
    create jdbc connection pool using the node Resources/JDBC/Connection Pools

    Name: mysqlPool Resource Type: javax.sql.DataSource Database Vendor: mysql

    click on next and define the following properties

    databaseName: test user: dbuser password: dbpassword Url: jdbc:mysql://localhost:3306/test URL: jdbc:mysql://localhost:3306/test

    The default port for MySQL is 3306. If it is different, replace the port 3306 with the correct port number.

  • Crate jdbc resource using the node Resources/JDBC/JDBC Resources

    JNDI Name: jdbc/mysql Pool Name: mysqlPool

  • Deploy the attached war file jsf-jpa-war.war whose ./src/conf/persistence.xml uses jdbc/mysql
    For more information on the jsf-jpa-war sample, please refer to sample documentation.

    This is a part of the Java EE 5 samples bundle which can be downloaded from https://glassfish-samples.dev.java.net/

  • Verify the working of deployed war by connecting to localhost:8080/jsf-jpa-war

    GlassFish V2 UR1 extends support for AIX Platform

    Posted by msreddy on January 23, 2008 at 09:27 AM | Permalink | Comments (1)

    GlassFish V2 UR1 provides all of the stability and capabilities of the V2 release, plus many new improvements of which one is support for the AIX platform. Please refer to the GlassFish V2 Update Release Wiki Page for details on improvements that are going into this release.

    Apart from support through Forums, Mailing Lists it provides continuous and very useful blogs through Aquarium.

    Community participation and feedback are vital for defining the future direction. Currently there is a promotion Try GlassFish for a chance to win an iPhone going on to encourage the participation and feedback.

    GlassFish V2 Hands On Lab at JavaOne

    Posted by msreddy on May 22, 2007 at 12:11 PM | Permalink | Comments (0)

    The objectives of the GlassFish V2 hands-on-lab at JavaOne 2007 are to

    The entire lab material and the individual screencasts are available on SDN and can be downloaded. Here are the links:

    Java EE 5 Hands-on and Clustering using Open Source GlassFish Application Server



    GlassFish V2 Beta

    Posted by msreddy on May 01, 2007 at 02:29 PM | Permalink | Comments (0)

    GlassFish V2 is a production-ready, open-source Java EE 5 application server currently in beta.

    V2 provides features like clustering, high availability (HA), load balancing, Microsoft Interoperability with Web Services Interoperability Technology (WSIT), great price/performance, next-generation Web with Ajax, Scripting and RESTful web services, NetBeans IDE integration, SOA support through Java Business Integration (JBI) for service-oriented architecture (SOA).

    Other well known GlassFish features include...

    • Simplified development with NetBeans IDE and the Java EE 5 platform
    • Includes Enterprise JavaBeans (EJB) 3.0, JavaServer Faces (JSF) 1.2, JavaServer Pages (JSP) 2.1, Java Servlet 2.5, Java API for XML Web Services (JAX-WS) 2.1 and Java Architecture for XML Binding (JAXB) 2.1 technologies.
    • Open source General Public License (GPL) and Common Development and Distribution License (CDDL)
    • Support:java.sun.com/javaee/support
    • Adoption:blogs.sun.com/stories
    • News:blogs.sun.com/theaquarium

    GlassFish community is running a Fish for a Flat-Screen TV Contest for developer adoption. Checkout this screencast for more details on the contest.

    GlassFish V2 beta is available for download today. Please try GlassFish V2 and let us know your feedback.





    Powered by
    Movable Type 3.01D
 Feed java.net RSS Feeds