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

20070827 lundi août 27, 2007

Bloglines beta

So this is what the bloglines folks were up to. As always, SaaS' success is also a matter of keeping customers happy with small but regular updates.

The 3-pane view looks pretty nice and the quick view works nicely with multiple feeds and will avoid me having to select which feeds need to show headers only (vs. entire posts). The keyboard navigation ("j" and "k") is still very convenient and the small animations are a nice addition.

I'm not sure about having to explicitly mark as read. I'd also like to be able to have preferences as to what the default view (quick, full or 3-pane) is for each feed or folder. I don't think I'll use the personalized homepage.

( août 27 2007, 10:43:45 AM CEST ) Permalink

Adapting JasperReports IBM sample application to Open Source NetBeans/GlassFish/JavaDB stack

I recently got a request from a user trying to run the code from this web developerWorks article on using JasperReports and Velocity with the IBM stack (RAD, WebSphere, DB2). So these are the short instructions on how to (slightly) adapt it to the Open Source NetBeans/GlassFish/JavaDB stack:


•  Create and populate the database

You can do this using the command-line using ij but NetBeans has a nice visual tool all we need.

- Make sure you have the Java DB Installation and Database Location set properly (Tools>JavaDB>Settings).

- Create a database called 'reportdb' with any user/password you'd like (just remember them...)

- Connect to the newly created database from the "Databases" node in the "Services" tab ("Runtime" in NetBeans 5.5.x)

- Create the tables and populate them by copy/pasting the SQL code from create-db.sql and simply removing the create and connect first two instructions as well as the closing disconnect instruction.


•  Create the DataSource

From the GlassFish admin console, navigate to Resources>JDBC>Connection Pools to create a new pool with the following attributes:
- JavaDB driver
- javax.sql.DataSource
- reportdb database name
- whatever the user/password you used to create the database.
- remove the SecurityMechanism attribute.

At this point you can ping the connection database to make sure all is ok. The JDBC Resource can then easily be created for this pool with the JNDI name "jdbc/reportDB" as specified in the article.

The alternate approach is to use the following commands:
asadmin create-jdbc-connection-pool and
asadmin create-jdbc-resource .


•  Deploy and run the application

Deploying the application can be done using the web admin tool, asadmin deploy, or simply by dropping the EAR archive file in the domains/domain1/autodeploy directory. No change is needed for this archive. All the IBM-specific content is safely ignored by GlassFish. Since there is no explicit context-path specified in the web.xml from the WAR file, the application is then available from http://localhost:8080/JReportsWEB/


Note that deploying an EAR archive containing a WAR file will not have it (the war file) appear under the Web Application section. This is by design (a feature, not a bug). You can see the war file as an EAR sub component in the admin UI and the content of its web.xml in the associated "descriptor" tab.

I'm not sure why the sample code from the article is packaged as an EAR file and not a simpler WAR archive. You can also manually extract the WAR file and deploy it. This developerWorks article isn't particularly new but it's interesting the see how easily this all works in a second-generation Java EE 5 application server with no modification.

You can go one step further with the NetBeans Jarvis module (discussed here). This article on JasperReports in NetBeans is probably also of interest.
JasperReports (now in version 2.0) and GlassFish stories are here and a book for "Java EE 5 Development using GlassFish Application Server" is also on its way.

( août 27 2007, 10:16:48 AM CEST ) Permalink

VMWare player 2.0, no thank you

125 MB of download and 4 full reboots later, I'm back to using VMWare player 1.0 (only a 25MB archive).
Version 2.0 would not even open a properly shut down virtual machine (already in use, file too big, ....).
What a waste of time!

( août 27 2007, 12:13:57 AM CEST ) Permalink Comments [1]


GlassFish Podcast
Get GlassFish V3
Support GlassFish Enterprise

Today's Page Hits: 1524




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