Bistro!
Alexis Moussine-Pouchkine's Weblog
public enum Topic { Java, GlassFish, Tools, Sun, InFrenchInZeText, SDPY }

20080822 vendredi août 22, 2008

SDPY - NetBeans 4.0, Java Kernel

August 22nd is often prolific on this blog it seems.

Is JavaBE justified? (2006)
Java 6 Update 10 is now in RC. I was quite skeptical of the ability to bring down the size of the download (people were talking about a 1Mb installer...). Two years later, the full installer is expected to be around 11Mb and less than 4Mb for the kernel installer. That's a pretty good result given how intertwined the JRE classes are and compared to AIR or even Silverlight (ok, Flash is still doing great in that respect).

NetBeans 4.0 beta is out! (2004)
NetBeans 4.0 was the start of the NetBeans re-birth. It brought a new ANT-based system, had full support for Java 5 (funny to read the comment about Eclipse also "supporting Java 5, except for annotations" ;-), a new windowing system, etc... Clearly Matisse, the profiler, the new editor infrastructure, the regularly enhanced support for Java EE development and the support for scripting languages made it only better over time. It did take four years though...

( août 22 2008, 04:00:00 PM CEST ) Permalink

I'm moving from the (NetBeans) GlassFish development server to a production server and my application won't run! Help!

I've recently seen a flurry of people moving to production GlassFish servers coming from a NetBeans development environment so I thought I'd write down in this post what I've been replying on the various mailing lists and forums.

NetBeans auto-magically creates all the resources required in the GlassFish runtime (JNDI resources, connexion pools, and other configuration), so directly deploying an application (.war, .ear artifacts) in a newly-installed GlassFish instance will most likely fail because the resources the application replies on are not present. To fix this you have several options:

1/ add the remote production GlassFish server to the list of NetBeans servers. The trick is that you first need to point NetBeans to a local install and later describe the remote server with IP and Port number.

2/ use the GLASSFISH_HOME/bin/asupgrade tool to inject all the applications/resources/configuration from a source to the production target. Note this tool can work across multiple version of GlassFish and migrates things like security stores, virtual servers, etc... If using strictly the same bits (same version of GlassFish) in development and production, you could also probably use GLASSFISH_HOME/bin/asadmin backup-domain and the GLASSFISH_HOME/bin/asadmin restore-domain commands.

3/ re-create all the resources using either the CLI (asadmin) or the GUI (http://localhost:4848). For Make sure you can ping the database when creating connection pools.



% bin/asadmin create-jdbc
Closest matching command(s): 
    create-jdbc-connection-pool
    create-jdbc-resource

All of this (deployed applications, JNDI resources, virtual hosts, and configuration) is stored in GLASSFISH_HOME/domains/domain1/conf/domain.xml. You shouldn't edit this by hand but it may be useful for troubleshooting and diff'ing the development and production environments..

Update : Peter Williams suggests a fourth way using sun-resources.xml .

( août 22 2008, 12:16:24 PM CEST ) Permalink Comments [5]


GlassFish Podcast
Get GlassFish V3
Support GlassFish Enterprise

Today's Page Hits: 2109




bea conference glassfish groovy ips java javaee javafx javaone javazone jug mysql netbeans openesb openoffice opensource paris performance pkg podcast presentation sdpy spring sun swing techdays tips updatecenter v3 webservices
Links