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 中文
Previous 30 Newer Entries Showing entries 31 to 39

Displaying posts with tag: totd (reset)

TOTD #44: JDBC Connection Pooling for Rails on GlassFish v3
Employee +0 Vote Up -0Vote Down

TOTD #9 explained how to configure JDBC connection pooling for Rails application deployed on GlassFish v2. There are several benefits of using using the JDBC connection pools:
  • No need to create a new database connection for each Rails instance.
  • No need to specify your password in database.yml or create a hack to hide it.
  • No garbage collection of connection after each use.
And because of the above mentioned (and other reasons) an improved application performance, scalability and efficiency.
The only way to deploy a Rails application on GlassFish v2 is to create a WAR file using Warbler. That's a


  [Read more...]
TOTD #42: Hello JavaServer Faces World with NetBeans and GlassFish
Employee +0 Vote Up -0Vote Down
This TOTD (Tip Of The Day) shows how to create a simple Java Server Faces application using NetBeans IDE 6.1. This is my first ever Java Server Faces application :) Much more comprehensive applications are already available in NetBeans and GlassFish tutorials.

The application is really simple - it allows you to create a database of cities/country that you like. You enter the city & country name on a page and click on Submit. This stores the data entered in the backend database and displays all the stored values in a new page. This application demonstrates simple JSF concepts:
  • How to create a JSF application using NetBeans IDE ?



  [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 #39: Prototype/Script.aculo.us Autcomplete widget with MySQL, GlassFish, NetBeans
    Employee +0 Vote Up -0Vote Down
    There are several JavaScript libraries that can be embedded in your webapplication to create a visually appealing interface. Script.aculo.us is one of the popular ones and is built on the Prototype JavaScript Framework. The library provides an easy-to-use, cross-browser user interface JavaScripts that allows you to create fancy effects commonly visible on web pages these days.

    This blog entry gets you started by using Ajax.Autocompleter that allows for server-powered autocompleting of text fields. Basically, you type a character in a text field and suggestions for possible correct values starting with that character are shown . This is achieved by by sending an Ajax request to the data source on server, passing

      [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...]
    TOTD #35: Rails Database Connection on Solaris
    Employee +0 Vote Up -0Vote Down
    Are you deploying your JRuby-on-Rails applications on Solaris (or any variety of Unix) and not able to connect to the database ?

    I experienced it last week so thought of sharing the tip here. Luckily it's really simple.

    Here is the default generated "config/database.yml"

    development:
      adapter: mysql
      encoding: utf8
      database: runner_development
      username: root
      password:
      socket: /tmp/mysql.sock
    The only required change is to add "host: 127.0.01" for the required database configuration. The updated fragment is shown below (with change highlighted):

    development:
      adapter: mysql
      encoding: utf8


















      [Read more...]
    TOTD #31: CRUD Application using Grails - Hosted on GlassFish and MySQL
    Employee +0 Vote Up -0Vote Down

    TOTD #30 explained how to create CRUD application using Grails and hosted using in-built Jetty servlet engine and in-memory HSQLDB database. Jetty and HSQLDB are built into Grails and allows to start easily. You can also use GlassFish and MySQL (http://mysql.com) for deploying your applications in production environment.

    This blog entry walks you through the steps of deploying a Grails application on GlassFish and MySQL.
  • If MySQL (http://mysql.com/) is already installed, then download GlassFish v2 UR1. Otherwise you can also Download




  •   [Read more...]
    TOTD #24: Getting Started with Rails 2.0.x in JRuby 1.0.3 and JRuby 1.1RC1
    Employee +0 Vote Up -0Vote Down

    This TOTD (Tip Of The Day) shows how to install Rails 2.0.x in JRuby 1.0.3 and JRuby 1.1 RC1. Then it describes how a simple Rails application can be created and deployed using WEBrick.

    First, lets deal with installing Rails 2.0.x in JRuby 1.0.3 and JRuby 1.1 RC1.

    Step 1: How to install Rails 2.0.x in JRuby 1.0.3 ?
    • Download and Unzip JRuby 1.0.3. This creates "jruby-1.0.3" directory.
    • Install Rails by giving the following command in the newly created directory:

      bin/jruby -S gem install rails --include-dependencies --no-ri --no-rdoc
      Bulk updating Gem source index for: http://gems.rubyforge.org
      Successfully installed rails-2.0.2
      Successfully installed activesupport-2.0.2
      Successfully installed activerecord-2.0.2













      [Read more...]
    TOTD #9: Using JDBC connection pool/JNDI name from GlassFish in Rails Application
    Employee +0 Vote Up -0Vote Down

    Using the instructions followed in JRuby Hack Day and taking some help from Nick, I figured out how to use the JDBC connection pools configured in GlassFish using the JNDI names.

    All the commands given below are relevant for GlassFish but the same concept will work where ever you deploy your WARed up JRuby on Rails application.

  • Follow the bullet #1 and #2 from here to create a new
  •   [Read more...]
    Previous 30 Newer Entries Showing entries 31 to 39

    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.