Arun Gupta, Miles to go ...

Arun Gupta is a technology enthusiast, a passionate runner, and a community guy who works for Sun Microsystems.
« Previous page | Main | Next page »

http://blogs.sun.com/arungupta/date/20090417 Friday April 17, 2009

GlassFish and NetBeans at MySQL Users Conference 2009



What is open source, production-quality, supported by a large vibrant community, and comes with full enterprise support ? - GlassFish and MySQL.

Did you know that GlassFish ...

  • is the only open-source Java EE 5 compliant Application Server
  • can be used to deploy Rails, Grails, and Django applications
  • has 13x better price/performance than Dell/HP, and therefore a much lower TCO
  • has an easy-to-use and intuitive web-based administration console
  • has enterprise features like clustering/high availability, .NET-interoperable Web services, ...
Are you attending MySQL Users Conference 2009 and interested to learn how GlassFish and MySQL together provides an ideal deployment platform for all your web applications ?

There are several other advantages which I'll be speaking on Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans and the coordinates are:

When: April 21, 2009 (Tuesday), 3:05 pm
Where: Ballroom A

You can also find us on the Exhibitor Floor!

Technorati: conf glassfish netbeans mysql mysqlconf santaclara

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090408 Wednesday April 08, 2009

TOTD #78: GlassFish, EclipseLink, and MySQL efficient pagination using LIMIT

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 (except when using prepared statements).

With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1):

SELECT * FROM tbl LIMIT 5,10;  # Retrieve rows 6-15

So instead of fetching all rows from the database and then filtering from row 6-15, only rows 6 through 15 are fetched.

This TOTD (Tip Of The Day) explains how to create a JPA Persistence Unit for sakila (MySQL sample database) using NetBeans, use EclipseLink as the Persistence Provider, and then write a JPA query to leverage the pagination support - all on GlassFish v3.

  1. Create a Persistence Unit for "sakila" as explained in this blog using bullets #1 - 3. The differences are explained below:
    1. In 2.1, choose "GlassFish v3 Prelude" as the server. Even though "GlassFish v3 Prelude" is chosen as the server but it will be replaced with a recent promoted build because pagination feature is not implemented in the Prelude. Alternatively you can use NetBeans 6.7 M3 and GlassFish v3 as explained here.
    2. In 3.3, EclipseLink is shown as the default Persistence Provider as shown below:

    3. In 3.5, there is no need to specify the properties for "user" and "password as the JDBC resource is stored in the server configuration. Instead specify the following property:

      <properties>
          <property name="eclipselink.logging.level" value="FINE"/>
      </properties>

      This will log any SQL statement sent by JPA to the underlying persistence provider (EclipseLink in this case).
  2. If GlassFish v3 was configured using NetBeans 6.7 M3, then the JDBC Connection Pool and JDBC resource were created in the server directly. If not, then download and unzip the latest GlassFish v3 latest promoted build (b43 as of this writing). Create the JDBC Connection Pool as:

    ./asadmin create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource --property user=duke:password=glassfish:ServerName=localhost:portNumber=3306:databaseName=sakila jdbc-mysql-pool

    and the JDBC resource:

    ./asadmin create-jdbc-resource --connectionpoolid jdbc-mysql-pool jndi/sakila

    GlassFish v3 b43 bundles "Eclipse Persistence Services - 2.0.0.r3652-M1". A later blog will explain how to replace the bundled EclipseLink version with a newer/different EclipseLink version.
  3. Create a new Servlet "QueryServlet". Inject the javax.persistence.EntityManagerFactory resource:

        @PersistenceUnit
        EntityManagerFactory emf;

    and change the "processRequest" operation to:

            EntityManager em = emf.createEntityManager();

            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                int startRow = Integer.valueOf(request.getParameter("start_row"));
                int howMany = Integer.valueOf(request.getParameter("how_many"));
                Query q = em.createNamedQuery("Film.findAll");

                q.setFirstResult(startRow);
                q.setMaxResults(startRow + howMany);
                for (Object film : q.getResultList()) {
                    out.print(((Film)film).toString() + "<br/>");
                }
            } finally {
                out.close();
            }

    This Servlet reads two parameters from the request and sets parameters on the JPA Query to enable pagination.
  4. Deploy the application on GlassFish v3.
    1. Using NetBeans 6.7 M3, select "Deploy" from the context-sensitive menu.
    2. Using NetBeans 6.5.1, select "Clean and Build" and then manually deploy the WAR file using "asadmin deploy dist/Pagination.war".
If the project name was "Pagination", then the Servlet is accessible at "http://localhost:8080/Pagination/QueryServlet?start_row=1&how_many=10" and shows ten rows starting at index "1". The output looks like:



The log file in "domains/domain1/logs/server.log" show the following SQL query generated by EclipseLink:

[#|2009-04-07T14:01:12.815-0700|FINE|glassfish|org.eclipse.persistence.session.file: /Users/arungupta/tools/glassfish/v3/b43/glassfishv3/glassfish/domains/domain1/applications/Pagination/WEB-INF/classes/-PaginationPU.sql| _ThreadID=15;_ThreadName=Thread-1;ClassName=null;MethodName=null;|SELECT film_id AS film_id1, special_features AS special_features2, last_update AS last_update3, rental_duration AS rental_duration4, release_year AS release_year5, title AS title6, description AS description7, replacement_cost AS replacement_cost8, length AS length9, rating AS rating10, rental_rate AS rental_rate11, language_id AS language_id12, original_language_id AS original_language_id13 FROM film LIMIT ?, ?
        bind => [1, 11]|#]

As you can see, the query uses the LIMIT clause which optimizes the data returned from the table.

If a different database, for example Derby, is used then the generated SQL query looks like as:

[#|2009-04-07T17:00:34.210-0700|FINE|glassfish|org.eclipse.persistence.session.file: /Users/arungupta/tools/glassfish/v3/b43/glassfishv3/glassfish/domains/domain1/applications/Pagination/WEB-INF/classes/-PaginationPU.sql| _ThreadID=15;_ThreadName=Thread-1;ClassName=null;MethodName=null;|SELECT film_id, special_features, last_update, rental_duration, release_year, title, description, replacement_cost, length, rating, rental_rate, language_id, original_language_id FROM film|#]

In this case, the entire table is fetched and the rows are filtered based upon the critieria specified on the client side.

If the number of rows is huge (a typical case for enterprise) then MySQL provides efficient fetching of records. And GlassFish v3, with EclipseLink JPA integrated, makes it much seamless for you.

Thanks to Mr GlassFish Persistence (aka Mitesh :) for helping me understand the inner workings.

Discuss this more at Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans technical session in the upcoming MySQL Users Conference!

Please leave suggestions on other TOTD (Tip Of The Day) that you'd like to see. A complete archive of all the tips is available here.

Technorati: totd glassfish v3 eclipselink jpa mysql

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090331 Tuesday March 31, 2009

ISV & OEMs Webinar Replay: GlassFish- and MySQL-Backed Applications with Netbeans and JRuby-on-Rails

I presented a webinar for ISV and OEMs on "Developing GlassFish- and MySQL-Backed Applications with NetBeans and JRuby-on-Rails" last week.



The slides and a complete recording of the webinar are now available here.

Technorati: webinar glassfish mysql netbeans jruby rubyonrails

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090324 Tuesday March 24, 2009

Customers frustrated with Oracle's maintenance and support prices - GlassFish & MySQL can offer relief


Here are some quotes from a recent article talking about Oracle's maintenance and support fees:

Before Oracle acquired BEA earlier this year, the company charged 18% to 20% for support and maintenance. Oracle increased those fees to meet its own structure and also raised list prices on most BEA products.

That didn't sit well.

and


One Java-centric VAR, who spoke on the condition of anonymity, said some of his BEA WebLogic customers are moving to alternative application servers just to get away from Oracle.

and

"What company comes in this climate and not only jacks up prices but support prices as well?" asked one frustrated BEA customer, who spoke on the condition of anonymity.

and

"Many SAP and Oracle customers intend to push back their maintenance fees," he said. "Customers seek an option to just pay for tax and compliance updates without paying for future innovation. They are willing to pay for future modules when that time comes. If they can't access such options, they would prefer third party options like Rimini Street for Oracle [E-Business Suite] and SAP's applications."

Have you been bitten by Oracle's price raise ?

Interested in an industry-grade, highly performant, feature-rich, and open source alternative ?

GlassFish and MySQL together provide an excellent choice - give it a try!

Technorati: glassfish mysql opensource sun oracle

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090323 Monday March 23, 2009

Developing GlassFish- and MySQL-Backed Applications with Netbeans and JRuby-on-Rails - Free Webinar on Mar 26


This is a re-run of an earlier webinar.

Would you like to know how JRuby,NetBeans, GlassFish, and MySQL can power your Rails applications ?



This informative technical webinar explains the fundamentals of JRuby and how the NetBeans IDE makes developing/debugging/deploying Rails applications on GlassFish quick, fun and cost-effective.

The webinar starts 10am PT on Mar 31st, 2009 and can be accessed from a browser.

Register here.

Technorati: jruby rubyonrails glassfish netbeans mysql webinar

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090205 Thursday February 05, 2009

Webinar Replay Available: GlassFish and MySQL-backed applications with NetBeans and JRuby-on-Rails

I presented a webinar on "Developing GlassFish- and MySQL-Backed Applications with NetBeans and JRuby-on-Rails" last week.



The slides and a complete recording of the webinar are now available here.

Technorati: webinar glassfish mysql netbeans jruby rubyonrails

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090126 Monday January 26, 2009

Developing GlassFish- and MySQL-Backed Applications with Netbeans and JRuby-on-Rails - Free Webinar on Jan 27

Would you like to know how JRuby, NetBeans, GlassFish, and MySQL can power your Rails applications ?



This informative technical webinar explains the fundamentals of JRuby and how the NetBeans IDE makes developing/debugging/deploying Rails applications on GlassFish quick, fun and cost-effective.

The webinar starts 10am PT on Jan 27th, 2009 and can be accessed from a browser.

Register here.

Don't miss out, it's going to start in less than 12 hours!

Technorati: jruby rubyonrails glassfish netbeans mysql webinar

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090120 Tuesday January 20, 2009

Sun Tech Days 2009, Singapore - Welcome Reception

Follow up from Part 1.

Attended "What Developers should care about MySQL ?" by Colin and "Groovy and Grails" by Chuk-munn Lee.

I enjoyed both the talks for different reasons. Colin's talk explained the pluggable storage engine architecture that is unique to MySQL (pronounced my-ess-kew-ell, not my-sequel). It was interesting to know that the different storage engines can be picked a la carte based upon the requirements. The performance comparison for INSERTs was 5x between MyISAM, InnoDB and Archive storage engines. But then InnoDB provide transactions and other goodies. Multiple performance tuning tips such as using negative unsigned int instead of BIGINT and partitioning databases if the number of records grow more than 1 billion were good! Keep an eye on his blog for slides.

Chuk's talk introduced Groovy, Grails, showed several samples of NetBeans and Grails integration. A Grails application can be deployed as a WAR file on GlassFish. Alternatively you can download the Grails module from GlassFish v3 Update Center and use the standard "run-app" command to run your Grails application using the embedded GlassFish v3 instead of Jetty. This is explained nicely in the screencast below:


Here are couple of pictures from rest of the day:




The welcome reception gave a good chance to engage with the audience. There was a community-driven musical performance and I made a video recording of the event. But because of the slow Internet connection, it's taking forever to load this particular video (may be it's Picasa 3 on Mac ;-)



If you have not signed up for Cloud Camp event happening in Singapore at 6pm today, register here!

Here is the complete photo album so far:




Follow the latest updates on twitter.com/arungupta.

Technorati: conf suntechdays singapore glassfish mysql netbeans

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

Sun Tech Days 2009, Singapore - Day 1

The Sun Tech Days Singapore started earlier this morning - over 1100 developers, an outstanding audience!!!

The kick off had a good local flare when the Gods of Longevity, Fortune, and Prosperity (Fu Lu Shou) showed up to start the event ;-) The build up to their appearance was really exciting as evident from the video below:


This particular event will also be recorded in Singapore Book of Records for the largest numbers of Sun developers playing a rattle together :) Here are some pictures from the event:


A Toshiba laptop and an iPod was raffled to the audience and the lucky winners are:


And found another loyal reader of my blog:



Gosh, he even took my autograph ;-)

The steps to reproduce the different GlassFish demos shown during the key note are explained below.
  1. GlassFish v3 OSGi-compliance and quick startup time

    Download GlassFish v3 Prelude from here, unzip, and start the server as

    glassfish/bin/asadmin start-domain --verbose

    to see a message something like:

    INFO: GlassFish v3 Prelude startup time : Felix(1732ms) startup services(1091ms) total(2823ms)

    The GlassFish v3 container starts up fairly quickly, 2.8 secs in this case, without starting any application-specific container. The container is using OSGi R4 APIs and Apache Felix as the runtime. This allows any standard OSGi bundle to be easily deployed in GlassFish v3. The underlying OSGi runtime can be easily replaced with Knopflerfish or Equinox because standard R4 APIs are used. As you notice, Felix start up time is explicitly shown in the startup message.

    The quick start up is possible because containers, such as Web container that serves web applications, is started only when the first Web application is deployed. No web application, no web container - simple! The same is true as other types of applications are deployed, for example a Rails application. The containers are started and stopped on demand giving a higher utilization of resources.
  2. Auto-deploy of Servlets and preserving servlet session state across multiple re-deploys using NetBeans and Eclipse. This feature is really useful as it tremendously reduces your development time. Focus on what you are good at i.e. adding business logic and let NetBeans and GlassFish together take care of your deployment worries. And why should you loose your session state just because the application is re-deployed!
  3. Modularity and Extensibility of GlassFish v3 by running/debugging a Rails application. GlassFish certainly supports traditional Java EE applications. But starting with GlassFish v3 the newer Web frameworks like Rails can also be deployed natively. The screencast #26 shows how to develop, run and debug a Rails application natively deployed on GlassFish. And this capability of deploying a Rails application is added as an OSGi module and also demonstrates the extensibility of GlassFish.

    It provides future protection as well because any other Web framework can be easily deployed as a standard OSGi module.
  4. Extensibility of GlassFish v3 by dropping a JAR in the "/modules" directory. The admin console is a one-stop interface for the administration of your GlassFish instance such as deploying WAR/EAR, creating JDBC/JMS resource, and creating clusters. Starting with GlassFish v3, even the admin console is extensible. There are clearly defined extension points that allows you to write a "admin console module" and extend the capability of your admin console. The demo showed dropping a JAR in the standard "modules" directory and admin cosole recognizing the module. A sample project that shows all the integration points to GlassFish v3 Admin Console is available here.
Other demos showcased JavaFX, Open Solaris and jMaki Webtop technology. I particularly enjoyed the JavaFX demo by our "resident mad scientist" - Simon Ritter :) It was an interesting use of technology to create something fun. Enjoy the demo below:



Also met Colin Charles, Community Relations Manager for MySQL at Sun Microsystems. It was certainly great to know that similar thought process is applied for promoting both GlassFish and MySQL - state the facts, offer an alternative, and let the customers decide. Both MySQL and GlassFish are open source offerings with complete enterprise support available from Sun Microsystems. And together with OpenSolaris, NetBeans and many other open source offerings they make a killer platform for developing/deploying any kind of web applications.

And if you have not signed up for Cloud Camp event happening in Singapore tomorrow at 6pm, register here!

Here is the complete photo album so far:




Follow the latest updates on twitter.com/arungupta.

Technorati: conf suntechdays singapore glassfish mysql javafx netbeans

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090114 Wednesday January 14, 2009

TOTD #65: Windows 7 Beta 1 Build 7000 on Virtual Box: NetBeans + Rails + GlassFish + MySQL


Microsoft released Windows 7 Beta 1 - the next major version of Vista, download here. There are tons of improvments mostly centered around making the content easily & intuitively accessible. But hey, Mac OSX already serves that purpose well for quite some time ;-)

But I still want to make sure that our Rails stack (NetBeans, GlassFish, and MySQL) work fine on it. And it very well do, without any issues, as you'll realize at the end of this blog :)

Lets first get started with installing Windows 7 Beta as a Virtual Box image. Few points to note here:

  • Only IE can be used for downloading Windows 7 Beta, FireFox & Safari on Mac do nothing (confirmed). With a growing share of both Mac and Firefox (TODO: add a link), I think this combination needs to be at least included on their testing matrix. There was no clear way to file bugs but sent feedback using "Send Feedback" button that is omnipresent on top-right corner of each window.
  • The 64-bit Windows 7 installer do not work on Virtual Box 2.1 installed on a 64-bit MacBook Pro. So had to download the 32-bit installer instead :( This seems to be a Virtual Box bug so filed #3027.
  • The 32-bit and 64-bit files are named "7000.0.081212-1400_client_en-us_Ultimate-GB1CULFRE_EN_DVD-32bit.iso" and "7000.0.081212-1400_client_en-us_Ultimate-GB1CULXFRE_EN_DVD.iso" respectively. If you noticed the only difference is the letter "X" before "FRE" . This required a deep look to spot the difference and very non-intuitive. Frankly, I had to put the two names above each other to spot the difference ;-)
Here are my Virtual Box VM settings:


Anyway, after that the install process was pretty simple. Anybody who has previous Windows install experience can vouch the installation mostly  goes seamless, as was the case here. The complete installation using screen snapshots is shown here. Some of the snapshots from my install process are shown below:









Ta da ... after multiple boots during installation, the final welcome screen shows up as following:



Even the beta install required an activation key. The key is shown on the screen after the download. A freshly installed Windows 7 Beta shows the following disk properties:



Lets install our Rails stack.

Download JDK 6 U11 (TODO: check with or w/o NetBeans), MySQL 5.1, NetBeans 6.5 (which includes GlassFish v3 Prelude, JRuby 1.1.4, Rails 2.1, and other goodies)! Alternatively, you can also download JDK 6 U11 + NetBeans 6.5 co-bundle here.

Install them in the same order by double-clicking on the downloaded bundle and taking all default values.

First MySQL installation ...



MySQL is automatically started and registered with Windows as a service.

And then NetBeans installation ...



Because of the default access controls setup in Windows 7 (as in Vista as well), NetBeans need to be run as an administrator by right-clicking, selecting "Run as administrator". Screencast #26 shows to develop, run, and debug a Rails application on GlassFish v3 Prelude. Here are some screen snapshots as the steps outlined in that screencast are performed.

Here is a snapshot that shows how a simple Rails application can be created:



Running the Rails application on GlassFish v3 Prelude ...



And now debugging using the NetBeans IDE ...



Overall, I'm happy with the first experience of Windows 7 Beta 1. The install process was smooth and it was nice to see the picture of a fish on the welcome screen. They can even consider swapping it with a glassfish ;-)

TOTD #64 showed how to install OpenSolaris 2008/11 using Virtual Box and run the same stack there. So be it Windows 7 or Open Solaris 2008/11, you can develop, run, and debug your Rails application with pleasure using NetBeans and GlassFish. And of course, Mac OS X :)

What is your primary Operating System for development ?

Do you use any Virtualization software for trying multiple Operating Systems ? Which one ?

Technorati: totd windows windows7 virtualbox netbeans glassfish mysql rubyonrails jruby

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090113 Tuesday January 13, 2009

GlassFish @ University of Essex and Frankfurt - Go Campus Ambassadors!

This blog highlights couple of contributions by Campus Ambassadors (CA) from University of Essex and Frankfurt towards GlassFish.

Jenya Kovalchuk (Campus Ambassador in the University of Essex, UK) gave a talk on GlassFish. The pre- and post-conditions of talk are really compelling:

Pre-condition: No one out of 25 present ever heard about GlassFish
Post-condition: Everyone is looking forward to put their hands on, how great it is! dear all, we are approaching labs where the software is already installed…

That means there are approx 15 more students who are now trying their hands on GlassFish :)

Igor Geier from University of Frankfurt developed a A MySQL GlassFish application. The application is a work-in-progress but it sure will show the ease-of-use of GlassFish and tight integration with NetBeans.

Thank you very much for talking about/using GlassFish!

Please drop a comment on this blog if you have talked about GlassFish in your school/university/training. If you'd like to talk about it then spotlight.dev.java.net/start provides a comprehensive list of material (slides, demos, etc.) to get you started!

Check out how widespread CAs are in this global map. Follow their aggregated blogs for details on what they are doing.

And occassionally we conduct contests for students where prize money is awarded for the best entries.

Technorati: glassfish mysql students spotlight campusambassador

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090112 Monday January 12, 2009

TOTD #64: OpenSolaris 2008/11 using Virtual Box

Here is a blog entry that was sitting in my Drafts folder for a long time (just because I didn't realize :). Anyway, it shows how to install Open Solaris 2008/11 on Virtual Box. The original install was done using Virtual Box 2.0.6. I installed Virtual Box 2.1 this morning and the image was easily recognized by the updated Virtual Box.

Here are the basic steps.


Create a new VM ...



As part of the previous step, create a new Virtual Disk mapping to the downloaded Open Solaris image ...




The generated VM settings are shown as below:



Click on "Start" and configure for the first run as:




Boot the Virtual Macine from the LiveCD shows the following GRUB:



Take the default for Language and Keyboard and then the following screen is shown after the boot:



Click on "Install OpenSolaris" ...



Clicking on "Install" starts the installation ...



And finally the install is completed.



Click on "Reboot", select "Boot from Hard Disk" and press Enter ...



And then select if "full boot" or "text boot" is required as shown:




And the welcome screen is shown as:



Now you can develop your Rails applications using the NetBeans IDE and deploy them on GlassFish and MySQL easily as explained here. There are multiple updates to the stack described earlier - JRuby 1.1.6, Rails 2.2, MySQL Alpha 6.0.x, GlassFish v3 Prelude, and Virtual Box 2.1.

So go ahead and develop, deploy, and debug your Rails applications as described in screencast #26. You can even manage your Rails applications using JMX as described in TOTD #61, #62, and #63.

Hwo do you follow the latest on each technology:

And, of course, this blog talks about all of them :)

Please leave suggestions on other TOTD (Tip Of The Day) that you'd like to see. A complete archive of all tips is available here.

Technorati: totd opensolaris virtualbox glassfish netbeans jruby rubyonrails mysql

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20090106 Tuesday January 06, 2009

TOTD #60: Configure MySQL 6.0.x-alpha to NetBeans 6.5


This Tip Of The Day answers the following comment on my blog:

How to Configure a MySql database to be able to connect Netbeans6.5.?
I've tried using mysql Server 6 many times, but it fails.
Please, let me know how to fix that problem.
  • Download MySQL 6.0 from here.
  • Install and start MySQL 6.0 on Mac OSX using the clearly written installation instructions.
    • Basically the download is available in .tar or .dmg format. Using .dmg format is the easiest way, double-click and follow the instructions taking all defaults.
    • MySQL is installed in "/usr/local/mysql-6.0.8-alpha-osx10.5-x86_64" and the soft link is adjusted so that its available from "/usr/local/mysql". The directory structure looks like:

      lrwxr-xr-x   1 root  wheel   32 Jan  5 14:00 mysql -> mysql-6.0.8-alpha-osx10.5-x86_64
      drwxr-xr-x   3 root  wheel  102 Jan  5 14:00 mysql-5.0.45-osx10.4-i686
      drwxr-xr-x  17 root  wheel  578 Nov  3 21:02 mysql-6.0.8-alpha-osx10.5-x86_64
    • Start MySQL server as: "sudo mysqld_safe" to see the output as:

      ~ >sudo mysqld_safe
      090105 14:20:51 mysqld_safe Logging to '/usr/local/mysql/data/dhcp-usca14-133-38.SFBay.Sun.COM.err'.
      090105 14:20:52 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
  • In NetBeans 6.5, Services tab, right-click on "Databases" and click on "Register MySQL Server..." as shown below:

  • Take the default values, if your MySQL instance is running on the default ports, as shown below:



    and click on "OK". If your database is already running then NetBeans will automatically connect with the database. If the database is not running then start it as explained above, right-click on the newly added database as shown below:



    and the default databases are then shown as:


More details about configuring MySQL in NetBeans 6.5 are explained in the official documentation.

Please leave suggestions on other TOTD (Tip Of The Day) that you'd like to see. An archive of all the tips is available here.

Technorati: totd netbeans mysql

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20081127 Thursday November 27, 2008

GlassFish and MySQL Student Contest - Winners announced

GlassFish and MySQL student contest winners are announced!

Kolli Bharath from Dhirubhai Ambani Institute of Information and Communication Technology, India (review, project) and Tomas Augusto Muller, Universidade de Santa Cruz do Sul, Brazil (review, project) won the grand prize of $500 each. There are 7 second prize winners of $250 each.

Congratulations to all the winners!

Meet some of the contest participants here, here, here, and here.

There were lots of great entries and picking one was a tough decision. But luckily the process was simple and clearly defined for all the judges. Each submission was assigned numbers between 1-100 in 8 pre-defined criteria and then a winner was picked. Now, don't ask us about the total marks for each entry or the winning margin ;)

Thanks to all the judges for reviewing the entries!

Here are some guidelines I followed during the review:

  • I looked at the blog and project website, how do I get started ?
  • Is the project site well structured, with links to code, docs, etc ?
  • Is there an installation/user manual ?
  • Is the application a stereotype
  • Is testing (unit, integration, stress, reliability, performance and others) integral part of the project ?
  • Is it a simple JSP/Servlet application or any creative use of GlassFish ? For example, is the participant using Web services, Grizzly Comet, Rails, Grails, Admin console, Monitoring or any such features.
  • Any usability or functionality bugs filed during project development ?
  • How useful is the application in context ?
  • Any NetBeans- or Eclipse-GlassFish integration features used ?
So if you plan to participate in any contest in the future, keep these points in mind :)

If you are interested in advertising your contest entry on this blog, leave a comment on this blog!

Watch out blogs.sun.com/students for upcoming contests.

Technorati: glassfish mysql students spotlight contest

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

http://blogs.sun.com/arungupta/date/20081020 Monday October 20, 2008

Relevance of Open Source during Financial Crisis - GlassFish, MySQL, OpenSolaris, VirtualBox, NetBeans, ...


CIO published an article highlighting 5 cheap (or free) software that can be afforded during financial crisis. Their recommendations are:

  • Open Office ($0) instead of Microsoft Office ($110 for basic version)
  • Mozilla Thunderbird ($0) instead of Microsoft Outlook (lots of security issues)
  • GnuCash ($0) instead of Quicken ($30 for starter edition)
  • Alfresco ($0) instead of Sharepoint ($5K for five licenses)
  • Linux instead of Windows (non-zero cost, always virus-prone ;)
All the recommendations are open source and can be downloaded and used without any hidden clauses. In all cases the open source version is at par and sometimes better than the commercial version. And of course there is always the agility factor. You enounter a bug, somebody in the community fixes it (on priority if you have support subscription), patch available in the nightly and you are back in business.

Here are some more recommendations ...
  • GlassFish instead of Oracle Weblogic or IBM Websphere
  • MySQL instead of Oracle Enterprise or IBM DB2
  • OpenSolaris instead of Windows
  • NetBeans instead of IntelliJ
  • VirtualBox instead of VM Ware or any other virtualization software
  • and many more here
All these options are completely open source with a full enterprise support available from Sun Microsystems.

Now some actual price comparisons using GlassFish and MySQL Unlimited ...



That's $3 million savings over a period of 3 years!!!

And if the number of sockets/cores go up, that's just additional money you are wasting during this financial crisis. With GlassFish Enterprise Unlimited starting at $25,000 - no counting cores, sockets, support incidents, servers or auditing - you can deploy unlimited GlassFish instances for the same price charged for one WebLogic Enterprise Edition. GlassFish for Business explains the value of buying subscription for your deployments.

Here is another comparison for Total Cost of Ownership for MySQL compared with other databases:



Can your apps scale more than Google, Facebook, Yahoo or Wikipedia ? All these sites are powered by MySQL. Do they need to be more reliable than telco vendors such as Vodafone ? Again powered by MySQL.

In an open source world, why have a "30-day" evaluation period ?

In the times of financial crisis, why spend extra money when there are other better options available with HUGE savings ?

Open Source software is indeed a great way to cut costs. And Sun Microsystems offer a wide varitey of open source offerings (GlassFish, MySQL, OpenSolaris, VirutalBox, Linux, NetBeans and many others) that can help you during this financial crisis!

Technorati: opensource glassfish mysql netbeans opensolaris sun

del.icio.us | furl | simpy | slashdot | technorati | digg |
|
« Previous page | Main | Next page »

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.