Monday February 08, 2010
TOTD #121: JDBC resource for MySQL and Oracle sample database in GlassFish v3
This blog clearly explains how to configure the MySQL sample database (sakila) with GlassFish. Even though the instructions use a specific database but should work for other databases (such as Oracle, JavaDB, PostgreSQL, and others) as well. The second half of the blog provide specific syntax for the Oracle sample database.
CREATE USER glassfish IDENTIFIED BY 'glassfish'; GRANT ALL PRIVILEGES ON *.* TO 'glassfish'@'localhost' IDENTIFIED BY 'glassfish'; FLUSH PRIVILEGES;
source sakila-schema.sql; source sakila-data.sql;
asadmin start-domain
asadmin create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource --restype javax.sql.DataSource --property "User=glassfish:Password=glassfish:URL=jdbc\:mysql\://localhost/sakila" jdbc/sakilaPool
asadmin ping-connection-pool jdbc/sakilaPool
asadmin create-jdbc-resource --connectionpoolid jdbc/sakilaPool jdbc/sakila
That's it!
Creating a JDBC resource for any other database requires the following updates to the steps mentioned above. Lets consider modifying these steps for the Oracle sample database.
sqlplus "/ as sysdba"
CREATE USER glassfish IDENTIFIED BY glassfish DEFAULT tablespace users TEMPORARY tablespace temp; GRANT CONNECT TO glassfish IDENTIFIED BY glassfish; GRANT UNLIMITED TABLESPACE TO glassfish; GRANT CREATE TABLE TO glassfish; GRANT CREATE SEQUENCE TO glassfish;
asadmin create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleDataSource --restype javax.sql.DataSource --property "User=hr:Password=hr:URL=jdbc\:oracle\:thin\:@localhost\:1521\:orcl" jdbc/hr asadmin ping-connection-pool jdbc/hr asadmin create-jdbc-resource --connectionpoolid jdbc/hr jdbc/hr
Here are a few other related entries:
RESTful representation of sakila using NetBeans and GlassFish
JSF + JPA + EJB Application using Oracle, NetBeans, and GlassFish
Technorati: totd javaee glassfish v3 jpa mysql sakila oracle
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Friday February 05, 2010
TOTD #120: Deployment Descriptor-free Java EE 6 application using JSF 2.0 + EJB 3.1 + Servlets 3.0
Here is trivial Java EE 6 application that is keeping you away from any deployment descriptors. It uses Java Server Faces 2.0, Enterprise Java Beans 3.1, and Servlet 3.0. This application shows the following Java EE 6 features:
The WAR file structure is:
./index.jsp ./index.xhtml ./META-INF ./show.xhtml ./WEB-INF ./WEB-INF/classes ./WEB-INF/classes/org ./WEB-INF/classes/org/glassfish ./WEB-INF/classes/org/glassfish/samples ./WEB-INF/classes/org/glassfish/samples/SimpleBean.class ./WEB-INF/classes/org/glassfish/samples/SimpleEJB.class ./WEB-INF/classes/org/glassfish/samples/SimpleServlet.class
Look ma, no deployment descriptors!
So how do you create this application:
mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=org.glassfish.samples -DartifactId=simplewebapp
This application is purposely not generated as a web application (missing "-DarchetypeArtifactId=maven-archetype-webapp"). If you specify this property then it will generate "WEB-INF/web.xml" which we don't intend to use.
Change "pom.xml" to:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.glassfish.samples</groupId> <artifactId>simplewebapp</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>simplewebapp</name> <url>http://maven.apache.org</url> <repositories> <repository> <id>glassfish-repository</id> <name>Java.net Repository for Glassfish</name> <url>http://download.java.net/maven/glassfish</url> </repository> </repositories> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1-beta-1</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> </dependencies> </project>
Create the directory structure as:
./src/main ./src/main/java ./src/main/java/org ./src/main/java/org/glassfish ./src/main/java/org/glassfish/samples ./src/main/java/org/glassfish/samples/SimpleBean.java ./src/main/java/org/glassfish/samples/SimpleEJB.java ./src/main/java/org/glassfish/samples/SimpleServlet.java ./src/main/webapp ./src/main/webapp/index.jsp ./src/main/webapp/index.xhtml ./src/main/webapp/show.xhtml
Once again, there are no deployment descriptors, just plain Java files and XHTML/JSP pages.
Here are the different source files with explanation after each one of them:
SimpleBean.java
package org.glassfish.samples;
import javax.faces.bean.ManagedBean;
@ManagedBean(name="simplebean")
public class SimpleBean {
private String name;
private int age;
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public int getAge() { return age; }
public void setAge(int age) { this.age = age; }
}
SimpleEJB.java
package org.glassfish.samples;
import javax.ejb.Stateless;
@Stateless
public class SimpleEJB {
public String sayHello(String name) {
return "Hello " + name + "!!!";
}
}
SimpleServlet.java
package org.glassfish.samples;
import javax.ejb.EJB;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.annotation.WebServlet;
import java.io.PrintWriter;
import java.io.IOException;
/**
* Hello world!
*/
@WebServlet(urlPatterns={"/SimpleServlet"})
public class SimpleServlet extends HttpServlet {
@EJB SimpleEJB bean;
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
PrintWriter out = response.getWriter();
out.println("<html><body>");
out.println("<h2>Serving at: " + request.getContextPath() + "</h2>");
out.println("<h2>Invoking EJB: " + bean.sayHello("Duke") + "</h2>");
out.println("</body></html>");
}
}
index.jsp
<html> <body> <h2>Hello World!</h2> Invoke the Servlet by clicking <a href="SimpleServlet">here</a>. </body> </html>
index.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm
l1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>Enter Name & Age</title>
</h:head>
<h:body>
<h1>Enter Name & Age</h1>
<h:form>
<h:panelGrid columns="2">
<h:outputText value="Name:"/>
<h:inputText value="#{simplebean.name}" title="name" id="name" required="true"/>
<h:outputText value="Age:"/>
<h:inputText value="#{simplebean.age}" title="age" id="age" required="true"/>
</h:panelGrid>
<h:commandButton action="show" value="submit"/>
</h:form>
</h:body>
</html>
show.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm
l1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>Show Name & Age</title>
</h:head>
<h:body>
<h1>Show Name & Age</h1>
<h:form action="show">
<h:panelGrid columns="2">
<h:outputText value="Name:"/>
<h:outputText value="#{simplebean.name}" />
<h:outputText value="Age:"/>
<h:outputText value="#{simplebean.age}" />
</h:panelGrid>
</h:form>
</h:body>
</html>
How do you build this entire application ?
mvn clean package
Lets deploy the application on a Java EE 6 compliant application server, GlassFish v3 (download here):
./bin/asadmin deploy --force=true ~/samples/javaee6/simplewebapp/target/simplewebapp-1.0-SNAPSHOT.war

Clicking on "here" looks like:

The JSF page is accessible at "http://localhost:8080/simplewebapp-1.0-SNAPSHOT/index.jsf" and looks like (after entering the values):

Notice that even though the page is named "index.xhtml", it's accessed as "index.jsf". This is because the JSF specification provides recommended mapping for FacesServlet to "*.faces" and "/faces/*". In addition, Mojarra (Reference Implementation of JSF2 in GlassFish) also adds a mapping to "*.jsf". Any views using these URL pattersn are routed through FacesServlet. So alternative URLs for our page are "http://localhost:8080/simplewebapp-1.0-SNAPSHOT/index.faces" and "http://localhost:8080/simplewebapp-1.0-SNAPSHOT/faces/index.xhtml".
Clicking on "Submit" shows the following page:

That's it!
Here are several other useful entries:
The next follow up blog will show "Hello World"s of Context & Dependency Injection, Bean Validation, Java API for Restful Web services, Java Persistence API, Interceptors, and other Java EE 6 specifications in this application.
Technorati: totd javaee glassfish v3 javaserverfaces servlet3 ejb maven
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Monday February 01, 2010
GlassFish v3 comes bundled with Metro - a secure, reliable, transactional, and .NET interoperable Web services stack. Metro is compliant with JAX-WS and provides additional quality of service attributes that can be easily enabled using NetBeans IDE.
This blog contains a screencast that shows how to create a simple Web service using NetBeans 6.8, implement the business logic by accessing a database table using Java Persistence API, and deploy on GlassFish v3.
Please post your questions to users@glassfish.dev.java.net.
Several other screencasts on GlassFish v3and related topics are available here.
Technorati: netbeans jax-ws metro webservice glassfish jpa database
Posted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Thursday January 28, 2010
GlassFish strategy by Oracle+Sun
![]() |
Hear Hasan Rizvi, Senior Vice President, Oracle Fusion Middleware, talk about GlassFish in Oracle and Sun Application Server Strategy webcast. The first part of the webcast is about the overall strategy and then the GlassFish part starts around 5:23 in the video. |
Here is a summary for those who want a quick juice:
Some more detailed points captured from the webcast ...
oracle.com/AppServer for more details. The complete list of webcasts on Oracle Fusion Middleware Strategy shares the overall strategy (still evolving).
Also checkout the slides presented by Thomas Kurian on Software Strategy at the webcast yesterday. The complete list of webcasts + slides from yesterday's event are now available.
There are several other articles (in no particular order):
Also check out the FAQ for Developer Community.
Technorati: sun oracle glassfish strategy
Posted by Arun Gupta in General | Comments[1]
|
|
|
|
|
Friday January 22, 2010
TOTD #119: Telnet to GlassFish v3 with NetBeans 6.8 - "Could not open connection to the host"
As explained in TOTD #118, one of the ways to manage OSGi bundles in GlassFish is by giving the command "telnet localhost 6666".
This straight forward command works fine if you installed either the Sun GlassFish Enterprise Server or the GlassFish community bits. The "domain.xml" in both of them is pre-configured for the telnet port to 6666 using the "jvm-options" as shown below:
<jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options>
However if you installed GlassFish as part of NetBeans 6.8, then you might see an error message as shown below:
C:\Users\Arun>telnet localhost 6666 Connecting To localhost...Could not open connection to the host, on port 6666: Connect failed
This error is more prominent in Windows Vista / 7 because of the Windows User Account Control (UAC). Or anywhere where GlassFish is installed in a directory that require root/administrator/sudo access to read/write. This Tip Of The Day will explain how to workaround this issue.
The default NetBeans installation directory is "C:\Program Files\NetBeans 6.8" and GlassFish goes in "C:\Program Files\sges-v3". At first start of NetBeans (typically as a non-Administrator), it tries to register the pre-configured domain in GlassFish installed in "C:\Program Files". But the non-Adminstrator user do not have read/write access to "C:\Program Files" and any sub-directories. So NetBeans create a new "personal" domain and assign a random port available at that moment for telnet. It shows all the ports assigned during the domain creation as shown below:

The image shows the port number "22007" for OSGI_SHELL.
How do you find that port later ? - Go to "Services" tab, expand "Servers", right-click on "Personal GlassFish v3 Domain", select "Properties" from the popup menu to see the following window:

The "Domains folder" shows the directory location of newly created domain and "Domain Name" has the domain name. The exact assigned port can be found by looking at "Domains folder"\"Domain Name"\config\domain.xml. On my Windows7, it showed the following line:
<jvm-options>-Dosgi.shell.telnet.port=22007</jvm-options>
Some other possible solutions that will work:

A complete archive of all the TOTDs is available here.
Technorati: totd netbeans glassfish v3 felix osgi telnet
Posted by Arun Gupta in General | Comments[2]
|
|
|
|
|
Thursday January 21, 2010
GlassFish v3 and OSGi integration is now known for almost two years. Several blogs have been published on this topic and googling on "glassfish osgi" shows 817,000 results. This blog has published four entries on the topic so far.
This Tip Of The Day (TOTD) will show the different ways you can manage OSGi bundles in GlassFish v3.
The first part is to create a trivial OSGi bundle as explained in TOTD #36.
~/samples/v3/osgi >mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=org.glassfish.samples.osgi.helloworld -DartifactId=helloworld [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [archetype:create] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] [archetype:create] [WARNING] This goal is deprecated. Please use mvn archetype:generate instead [INFO] Defaulting package to group ID: org.glassfish.samples.osgi.helloworld [INFO] artifact org.apache.maven.archetypes:maven-archetype-quickstart: checking for updates from central [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating OldArchetype: maven-archetype-quickstart:RELEASE [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: org.glassfish.samples.osgi.helloworld [INFO] Parameter: packageName, Value: org.glassfish.samples.osgi.helloworld [INFO] Parameter: package, Value: org.glassfish.samples.osgi.helloworld [INFO] Parameter: artifactId, Value: helloworld [INFO] Parameter: basedir, Value: /Users/arungupta/samples/v3/osgi [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] ********************* End of debug info from resources from generated POM *********************** [INFO] OldArchetype created in dir: /Users/arungupta/samples/v3/osgi/helloworld [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11 seconds [INFO] Finished at: Wed Jan 20 14:12:41 PST 2010 [INFO] Final Memory: 12M/80M [INFO] ------------------------------------------------------------------------
package org.glassfish.samples.osgi.helloworld;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
/**
* Hello world!
*
*/
public class App implements BundleActivator {
public void start(BundleContext context) throws Exception {
System.out.println("Hey!");
}
public void stop(BundleContext context) throws Exception {
System.out.println("Bye!");
}
}
This is a trivial Activator class but sitll shows the key methods. The changes are highlighted in bold.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.glassfish.samples.osgi.helloworld</groupId>
<artifactId>helloworld</artifactId>
<packaging>bundle</packaging>
<version>1.0-SNAPSHOT</version>
<name>helloworld</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.core</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>${pom.groupId}</Export-Package>
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Bundle-Activator>${pom.groupId}.App</Bundle-Activator>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
~/samples/v3/osgi/helloworld >mvn install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building helloworld [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Compiling 1 source file to /Users/arungupta/samples/v3/osgi/helloworld/target/classes [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Compiling 1 source file to /Users/arungupta/samples/v3/osgi/helloworld/target/test-classes [INFO] [surefire:test] [INFO] Surefire report directory: /Users/arungupta/samples/v3/osgi/helloworld/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.glassfish.samples.osgi.helloworld.AppTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [bundle:bundle] [INFO] [install:install] [INFO] Installing /Users/arungupta/samples/v3/osgi/helloworld/target/helloworld-1.0-SNAPSHOT.jar to /Users/arungupta/.m2/repository/org/glassfish/samples/osgi/helloworld/helloworld/1.0-SNAPSHOT/helloworld-1.0-SNAPSHOT.jar [INFO] [bundle:install] [INFO] Parsing file:/Users/arungupta/.m2/repository/repository.xml [INFO] Installing org/glassfish/samples/osgi/helloworld/helloworld/1.0-SNAPSHOT/helloworld-1.0-SNAPSHOT.jar [INFO] Writing OBR metadata [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8 seconds [INFO] Finished at: Wed Jan 20 14:18:31 PST 2010 [INFO] Final Memory: 20M/80M [INFO] ------------------------------------------------------------------------The generated "target/helloworld-1.0-SNAPSHOT.jar" has the following contents:
META-INF/MANIFEST.MF META-INF/ META-INF/maven/ META-INF/maven/org.glassfish.samples.osgi.helloworld/ META-INF/maven/org.glassfish.samples.osgi.helloworld/helloworld/ META-INF/maven/org.glassfish.samples.osgi.helloworld/helloworld/pom.properties META-INF/maven/org.glassfish.samples.osgi.helloworld/helloworld/pom.xml org/ org/glassfish/ org/glassfish/samples/ org/glassfish/samples/osgi/ org/glassfish/samples/osgi/helloworld/ org/glassfish/samples/osgi/helloworld/App.class
Manifest-Version: 1.0 Export-Package: org.glassfish.samples.osgi.helloworld;uses:="org.osgi. framework" Built-By: arungupta Tool: Bnd-0.0.357 Bundle-Name: helloworld Created-By: Apache Maven Bundle Plugin Bundle-Version: 1.0.0.SNAPSHOT Build-Jdk: 1.6.0_17 Bnd-LastModified: 1264025910352 Bundle-ManifestVersion: 2 Bundle-Activator: org.glassfish.samples.osgi.helloworld.App Import-Package: org.glassfish.samples.osgi.helloworld,org.osgi.framewo rk;version="1.3" Bundle-SymbolicName: helloworld
Lets install this newly created OSGi bundle in GlassFish v3. First, fire up GlassFish as:
~/tools/glassfish/v3/74b/glassfishv3/glassfish >./bin/asadmin start-domain -v
Jan 20, 2010 2:30:39 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java
-cp
/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-XX:+LogVMOutput
. . .
Jan 20, 2010 2:30:40 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 52 msec.
Jan 20, 2010 2:30:40 PM com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
[#|2010-01-20T14:30:49.437-0800|INFO|glassfishv3.0|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=11;_ThreadName=FelixStartLevel;|Perform lazy SSL initialization for the listener 'http-listener-2'|#]
[#|2010-01-20T14:30:49.527-0800|INFO|glassfishv3.0|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=12;_ThreadName=Thread-11;|Starting Grizzly Framework 1.9.18-k - Wed Jan 20 14:30:49 PST 2010|#]
. . .
[#|2010-01-20T14:30:58.668-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName={felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=true, felix.fileinstall.dir=/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart/, felix.fileinstall.debug=1};|Started bundle: file:/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart/org.apache.felix.scr.jar|#]
[#|2010-01-20T14:30:58.786-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName={felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=true, felix.fileinstall.dir=/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart/, felix.fileinstall.debug=1};|Started bundle: file:/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart/osgi-web-container.jar|#]
[#|2010-01-20T14:31:00.436-0800|INFO|glassfishv3.0|null|_ThreadID=23;_ThreadName=ping;|Total number of available updates : 0|#]
There are several ways to manage the OSGi bundles in GlassFish v3:
Lets explore each option in detail now.
Option 1: Manage the OSGi bundle using the "asadmin" command
~/samples/v3/osgi/helloworld/target >~/tools/glassfish/v3/74b/glassfishv3/glassfish/bin/asadmin deploy --type osgi helloworld-1.0-SNAPSHOT.jar Application deployed successfully with name helloworld-1.0-SNAPSHOT. Command deploy executed successfully.The server log shows the following output:
[#|2010-01-20T16:15:10.553-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com. sun.enterprise.v3.services.impl|_ThreadID=36;_ThreadName=http-thread-pool-4848-(2); |Hey!|#]Notice "Hey!" message in the server log as the bundle gets started.
~/samples/v3/osgi/helloworld/target >~/tools/glassfish/v3/74b/glassfishv3/glassfish/bin/asadmin list-applications helloworld-1.0-SNAPSHOT Command list-applications executed successfully.
Or if there are multiple applications deployed then only the OSGi bundles can be queried as:
~/samples/v3/osgi/helloworld/target >~/tools/glassfish/v3/74b/glassfishv3/glassfish/bin/asadmin list-applications --type osgi helloworld-1.0-SNAPSHOT Command list-applications executed successfully.
The bundle can be undeployed as:
~/samples/v3/osgi/helloworld/target >~/tools/glassfish/v3/74b/glassfishv3/glassfish/bin/asadmin undeploy helloworld-1.0-SNAPSHOT Command undeploy executed successfully.And then the following message is shown on the console:
[#|2010-01-20T16:22:19.554-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com. sun.enterprise.v3.services.impl|_ThreadID=37;_ThreadName=http-thread-pool-4848-(1); |Bye!|#]Notice "Bye!" message in second line of the log output indicating the bundle is stopped.
Option 2: Manage the OSGi bundle using file system operations
~/tools/glassfish/v3/74b/glassfishv3/glassfish >cp ~/samples/v3/osgi/helloworld/target/helloworld-1.0-SNAPSHOT.jar modules/autostart/and that shows the log output as:
[#|2010-01-20T16:29:04.625-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.
sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName={felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=true, felix.fileinstall.dir=/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish
/modules/autostart/, felix.fileinstall.debug=1};|Installed /Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart/
helloworld-1.0-SNAPSHOT.jar|#]
[#|2010-01-20T16:29:04.635-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.
sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName={felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=true, felix.fileinstall.dir=/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish
/modules/autostart/, felix.fileinstall.debug=1};|Hey!|#]
[#|2010-01-20T16:29:04.636-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.
sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName={felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=true, felix.fileinstall.dir=/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish
/modules/autostart/, felix.fileinstall.debug=1};|Started bundle: file:/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart
/helloworld-1.0-SNAPSHOT.jar|#]
Notice "Hey!" message in the second line of log output as the bundle gets started. ~/tools/glassfish/v3/74b/glassfishv3/glassfish >rm modules/autostart/helloworld-1.0-SNAPSHOT.jarthat shows the following output:
~/tools/glassfish/v3/74b/glassfishv3/glassfish >[#|2010-01-20T16:32:04.677-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.
sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName={felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=true, felix.fileinstall.dir=/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish
/modules/autostart/, felix.fileinstall.debug=1};|Uninstalling bundle 224 (helloworld)|#]
[#|2010-01-20T16:32:04.679-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.
sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName={felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=true, felix.fileinstall.dir=/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish
/modules/autostart/, felix.fileinstall.debug=1};|Bye!|#]
[#|2010-01-20T16:32:04.682-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.
sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName={felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=true, felix.fileinstall.dir=/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish
/modules/autostart/, felix.fileinstall.debug=1};|Uninstalled /Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart
/helloworld-1.0-SNAPSHOT.jar|#]
Notice "Bye!" message in second line of the log output indicating the bundle is stopped. Option 3: Manage the OSGi bundle using a remote Telnet Shell
~/tools/glassfish/v3/74b/glassfishv3/glassfish >telnet localhost 6666 Trying ::1... telnet: connect to address ::1: Connection refused Trying fe80::1... telnet: connect to address fe80::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Felix Remote Shell Console: ============================ ->
-> install file:///Users/arungupta/samples/v3/osgi/helloworld/target/helloworld-1.0-SNAPSHOT.jar Bundle ID: 225The command output shows "225" as the bundle id. This id is used to start / stop / uninstall the bundle.
-> find hello START LEVEL 1 ID State Level Name [ 225] [Installed ] [ 1] helloworld (1.0.0.SNAPSHOT)and then start, stop, and uninstall the bundle as:
-> start 225 -> stop 225 -> uninstall 225 -> find hello No matching bundles foundwhich shows following output in the logs:
[#|2010-01-20T16:43:45.399-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com. sun.enterprise.v3.services.impl|_ThreadID=38;_ThreadName=telnetconsole.shell remote=/127.0.0.1:4894;|Hey!|#] [#|2010-01-20T16:43:58.516-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com. sun.enterprise.v3.services.impl|_ThreadID=38;_ThreadName=telnetconsole.shell remote=/127.0.0.1:4894;|Bye!|#]
Option 4 - Manage the OSGi bundle using a Web browser
Lets see how the OSGi bundles in GlassFish can be managed using Apache Felix Web Console. This is originally explained in Sahoo's blog.
Copy GlassFish OSGi HTTP Service bundle from here (latest) and save it in the "modules/autostart" directory.
Copy Apache Felix Web Console bundle from here (latest) and save it in the "modules/autostart" directory.
Ignore the "NoClassDefFoundError" in the server log. The key is to look for the following message in server log:
Started bundle: file:/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart/org.apache.felix.webconsole-2.0.4.jar|#]
Open the URL "http://localhost:8080/osgi/system/console/bundles" in a browser and use "admin" as the username and "admin" as the password as shown below:
I had to enter the credentials couple of times for the login to work but finally the following window showed up:
It shows a complete summary of all the OSGi bundles available/installed/active etc in GlassFish v3. A new OSGi bundle can be installed by clicking on "Choose File" button. Several administration commands such as Start/Stop, Update, Uninstall, Refresh Import Packages can be issued for each bundle by clicking on associated buttons.
Install the OSGi bundle by clicking on "Choose File" and selecting "helloworld-1.0.-SNAPSHOT.jar" and then click on "Install or Update" button. The following message is shown in the server log:
[#|2010-01-20T17:04:46.654-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com. sun.enterprise.v3.services.impl|_ThreadID=39;_ThreadName=Background Install /var/folders/+E/+E6YtSvGGEKNwOA77I-9Fk+++TI/-Tmp-/install1657418488877506078.tmp; |Hey!|#]
The bundle gets installed and started as identified by "Hey!" message.
The recently installed "HelloWorld" bundle looks like:
Clicking on "helloworld" shows the complete status about the bundle as shown below:
The bundle can be stopped by clicking on the Stopped, Refreshed Package Imports, Updated, and Uninstalled by clicking on the respective buttons in the "Actions" column. Clicking on the Stop button shows the following message:
[#|2010-01-20T17:10:56.359-0800|INFO|glassfishv3.0|javax.enterprise.system.std.com .sun.enterprise.v3.services.impl|_ThreadID=25;_ThreadName=http-thread-pool-8080-(2); |Bye!|#]Notice "Bye!" message indicating the bundle has stopped.
Option 5: Manage the OSGi bundle using a REST console
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16198 0 16198 0 0 1173k 0 --:--:-- --:--:-- --:--:-- 1173kbundles
bundle
id
0
symbolic-name
org.apache.felix.framework
. . .
description
Generated using Pax-Construct
vendor
version
1.0.0.SNAPSHOT
location
file:/Users/arungupta/tools/glassfish/v3/74b/glassfishv3/glassfish/modules/autostart/
com.knokode.osgi.restconsole.main-1.0-PREVIEW01.jar
state
ACTIVE
curl -X PUT file:///Users/arungupta/samples/v3/osgi/helloworld/target/helloworld-1.0-SNAPSHOT.jar http://localhost:8080/osgi/restconsole/bundlesbut it's giving a "Segmentation fault". Am following with @fdiotalevi.
So how do you manage OSGi bundles in GlassFish v3 - asadmin, file system operations, telnet console, web browser, or REST ?
A complete archive of all the TOTDs is available here.
Technorati: totd glassfish v3 osgi apache felix bundles maven
Posted by Arun Gupta in General | Comments[2]
|
|
|
|
|
Tuesday January 12, 2010
TOTD #117: Invoke a JAX-WS Web service from a Rails app deployed in GlassFish
A user on GlassFish Forum tried invoking a JAX-WS Web service from a Rails application and faced some issues. This Tip Of The Day (TTOD) will discuss the different approaches and shows their current status.
A Rails app can be deployed on GlassFish in 3 different ways:
Now lets get to the issue reported by the user using these 3 deployment models.
First, lets deploy a simple Web service endpoint and generate a JAR file of the client-side artifacts:
package server;
import javax.jws.WebService;
/**
* @author arungupta
*/
@WebService()
public class HelloService {
public String sayHello(String name) {
return "Hello " + name;
}
}
~/samples/v3/rails/webservice/tmp >wsimport -keep http://localhost:8080/HelloWebService/HelloServiceService?wsdl parsing WSDL... generating code... compiling code...
jar cvf wsclient.jar ./server
Now lets write a Rails application and invoke this Web service:
jruby -S rails webservice
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
jruby script/generate controller home index
include Java
class HomeController < ApplicationController
def index
service = Java::server.HelloServiceService.new
port = service.getHelloServicePort
@result = port.sayHello("Duke")
end
end
<h1>Home#index</h1%gt; <p>Find me in app/views/home/index.html.erb</p> <%= @result %>
Now lets deploy this Web service using the 3 different deployment models mentioned above.
GlassFish v3 allows a directory-based deployment of Rails applications. This application needs to locate the Web service client classes. The "wsclient.jar" can be copied to the "lib" directory of Rails application ("webservice/lib" in our case), "domains/domain1/lib/ext" or "JRUBY_HOME/lib". The library can also be passed during deployment using "--libraries" switch. None of this approach seem to work correctly as explained in issue# 11408. So for now, invoking a JAX-WS Web service from a Rails application deployed directly on GlassFish v3 is not possible, at least until the bug is fixed.
In order to deploy the same application using GlassFish Gem, you can copy "wsclient.jar" to the "lib" directory of your Rails application. And also add the following line to "app/controllers/home_controller.rb":
require 'lib/wsclient.jar'
Alternatively you can copy it to "JRUBY_HOME/lib" directory if this Web service client is accessed my multiple applications. In this case there is no need to add any "require" statement to your Controller. Anyway, running the application as:
jruby -S glassfish
and accessing "http://localhost:3000/home/index" shows the following output:

And finally as explained in TOTD #73, bundle up your original Rails application as WAR and then deploy on GlassFish v3 as:
asadmin deploy webservice.war
Make sure to copy "wsclient.jar" to the "lib" directory of your Rails application and then Warbler will copy it to "WEB-INF/lib" of the generated WAR file. The output is shown as below:

So if you want to invoke a Metro/JAX-WS Web service from a Rails application, then run your Rails application using GlassFish Gem or deploying as a WAR file. It'll work on GlassFish v3 server when issue# 11408 is fixed.
Here are some additional links:
A complete archive of all the TOTDs is available here.
Technorati: totd glassfish v3 jruby rails webservice jax-ws metro
Posted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Tuesday January 05, 2010
2009 Running Summary - 1286 miles, 71% of running days
Here is a summary of my running logs in 2009:

And a bar chart that shows mileage for each day:

And finally a summary for each quarter:
| Quarter | Summary |
|---|---|
| Jan 1 - Mar 31, 2009 | ![]() |
| Apr 1 - Jun 30, 2009 | ![]() |
| Jul 1 - Sep 30, 2009 | ![]() |
| Oct 1 - Dec 31, 2009 | ![]() |
The last quarter was just terrible in terms of number of running days and pace but was a good recovery period as well. However I can certainly feel it in terms of the overall reduced pace. The biggest reasons for missed out running in 2009 were falling sick or traveling with no gym facility in the hotel.
Two goals for 2010:
The charts shown above can be easily generated using using a Rails application or a Wicket application on GlassFish.
Technorati: glassfish running logs 2009
Posted by Arun Gupta in General | Comments[1]
|
|
|
|
|
Monday January 04, 2010
FREE Java EE 6 1-week online Codecamp - Jan 12th, 2010
Happy New Year!
Java EE 6, GlassFish v3, and NetBeans 6.8 were released last month. Are you interested in learning how this awesome combination of technologies and products make your life simpler ? Do you want to brush up your skill set and learn to write Java EE 6 code using NetBeans 6.8 and GlassFish v3 ? Would you like to learn tips & techniques from the experts in GlassFish community ? Do you want to start 2010 with a complete immersion in Java EE 6 & GlassFish v3 ?
If answer to any of the above questions is "yes", then you should consider attending the upcoming free Java EE 6 online code camp. You are certainly welcome to attend the sessions otherwise as well :-)
The goal of this code camp is to let you write code, lots of code, exercising key Java EE 6 technologies.
The sessions are distributed over multiple days (schedule subject to change) as shown below:
| Topics | Date/Day |
|---|---|
| Getting Java EE 6 sample codes | Jan 12th, 2010 (Tuesday) |
| Servlet 3.0 | Jan 12th, 2010 (Tuesday) |
| Context and Dependency Injection (JSR 299) | Jan 13th, 2010 (Wednesday) |
| JPA 2.0 | Jan 14th, 2010 (Thursday) |
| EJB 3.1 | Jan 15th, 2010 (Friday) |
| JSF 2.0 | Jan 18th, 2010 (Monday) |
| Java EE 6 End-to-end Examples | Jan 19th, 2010 (Tuesday) |
| GlassFish v3 | Jan 20th, 2010 (Wednesday) |
Here is what you need to do before attending the hands-on lab session:
If you finish the homework from each lab, yeah there is optional homework ;-), then you'll also be awarded a certificate of completion.
So strap your seat belts and get ready for the Java EE 6 hands-on journey next week!
Always check Java EE 6 Online Codecamp for latest updates.
Technorati: conf glassfish v3 javaee handson lab
Posted by Arun Gupta in General | Comments[1]
|
|
|
|
|
Friday December 25, 2009
Java EE 6 & GlassFish v3 Deep Dive
Merry Christmas!
Get a quick overview of Java EE 6 & GlassFish v3 in this 2-part Deep Dive video (running time of 19:17 mins) with Ed Ort from Sun Developer Network.
Here are some other relevant links:
Technorati: javaee glassfish v3 deepdive interview
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Thursday December 17, 2009
IndicThreads Conference 2009 - Trip Report
I attended my first IndicThreads conference, fourth otherwise, in Pune last week.
This local conference fits very well with "Think Globally, Act Locally" theme. The topics were quite varied ranging from Scala, Lift, Google App Engine, Android, GWT, Distributed Scrum, and of course Java EE 6 & GlassFish v3. All the speakers were well versed with the content and the audience was pretty interactive. Keeping global warming into consideration, the conference adopted the theme of Go Green. The conference setup provided a great opportunity for social networking.
Here are some of the reasons to attend / sponsor IndicThreads:
I presented on:
and the slides are available. Unfortunately the graphics card of my MacBook failed the evening before the conference. So I had to rush to Apple Care center and retrieve my presentations from the hard disk. Fortunately that worked and the slides could be used. There are several blog pointers through out the presentation for the demos shown during the talk:
Sun Microsystems raffled a Sunspot to the winner of "Java and Green" quiz. Here are the questions:
When was the GlassFish community started ? Tick the right answer.
2004
2005
2006
2007
Which framework is not supported natively by GlassFish ?
Ruby on Rails
Django
Groovy and Grails
Java EE
Which specifications is not new or did not get a major update in Java EE 6.
Context & Dependency Injection
Managed Beans
Servlet 3.0
JAX-WS
What 3 IDEs have support for Java EE 6 ?
Name 4 HTTP methods that let you perform RESTful Web services.
Sun Microsystems is now a division of Oracle.
True
False
Name 3 “green” initiatives at IndicThreads Conference 09.
When was IndicThreads.com created?
2004
2005
2006
2007
The United Nations Climate Change Conference is happening in:
Copenhagen
Belgium
Geneva
Lets see how many can you answer :-) Thanks Aaron Houston for sponsoring the Sunspot.
Watch Harshad Oak, first Java champion in India and founder of the conference, talks about how the conference, intended audience, message to sponsors, and other messages in this short video:
Here are some photographs from the conference:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
And here is the complete set of pictures captured by me:
And here is the complete album captured by the conference:
Here are couple of additional reviews of the conference:Looking forward to participate in this conference next year!
Technorati: conf indicthreads pune india glassfish javaee netbeans eclipse java
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Wednesday December 16, 2009
Pictures from GlassFish v3 Launch Party @ Santa Clara, California - Dec 16, 2009

The GlassFish team celebrated the release of GlassFish v3 at Santa Clara earlier today. There was food, cake, beer, wine, tequila, tee-shirts, quiz contest, iPod shuffle raffles and above all the usual GlassFish spirit which made it extremely fun. See some of the pictures inlined:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
And the complete album at:
See the complete set of GlassFish v3 Launch activities.
Did you conduct GlassFish launch party in your geo ? Please feel free to share pictures.
Technorati: glassfish v3 party santaclaraPosted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Tuesday December 08, 2009
TOTD #116: GlassFish v3 Administration using JavaFX front-end - JNLP available
As mentioned in TOTD #113, this Tip Of The Day (TOTD) provides a working version of the JavaFX front-end for GlassFish v3 administration.
Please click here to launch the JNLP or click here to a page that provides some introduction along with the link to JNLP. You may like to enable Java Console as explained in TOTD #114 for any log messages.
See a video of the tool in action:
Many thanks to Rajeshwar for providing feedback and helping me understand the RESTful interface better. TOTD #96 explains how the REST interface can be used.
Here is a TODO list in no particular order:
How are you using JavaFX with GlassFish ?
How will you use GlassFish v3 REST interface in your tools ?
Technorati: totd javafx glassfish v3 rest web jruby rubyonrails rest administration monitoring management
Posted by Arun Gupta in General | Comments[2]
|
|
|
|
|
Monday December 07, 2009
Java EE 6 Training & Certifications - Register Early!
Java EE 6 is now an approved specification, the Reference Implementation (GlassFish v3) and TCK will be released soon!
The associated training curriculum and certifications are being worked upon by Sun Learning Services. The curriculum has gone through a complete overhaul for Java EE 6 & GlassFish v3 and will be available in Q1 2010. If you are interested in getting notified when these new courses are released and also receive special introductory promotions, then please register here.
There are technology specific "deep-dive" training courses and tied to new technology specific certifications. You just need to specify your interest in the particular technology and will be contacted once the courses & certifications are available.
In the meanwhile, you can follow any of the existing Learning Paths to brush up your skills.
Technorati: javaee glassfish v3 training certification
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Friday December 04, 2009
TOTD #115: GlassFish in Eclipse - Integrated Bundle, Install Stand-alone or Update Existing plugin
There are three options for Eclipse users interested in exploring GlassFish. They can either use an integrated bundle, install the GlassFish plug-in in an existing Eclipse version, or update an older GlassFish plugin in a stand-alone Eclipse to the latest version. These options are explained below.
GlassFish Tools Bundle for Eclipse 1.1 is an integrated bundle based on Eclipse 3.4.2 and includes GlassFish v2 and v3 Prelude pre-registered and configured and optionally JDK 1.6 U12. The work towards version 1.2 can be tracked by following the 1.1.x releases (1.1.7 is the latest). This new version is based on Eclipse 3.5.1, includes GlassFish v3 build 74 pre-registered and configured, several plugins (JSF Facelets, JAX-WS, Maven m2) and several Java EE 6 wizards to provide a seamless development and deployment experience with Java EE 6 & GlassFish v3. There are several other niceties in the newer release like pre-registered MySQL JDBC driver, updated Java EE 5 and Java EE 6 javadoc and code completion.

However what to do if you are already using an Eclipse version in your environment ?
The basic requirement is Eclipse 3.4+. A GlassFish plugin can be easily installed in any Eclipse 3.4+ and provides all the GlassFish-related functionality. The screencast #28 shows how to get started with Eclipse 3.4.2 and configure GlassFish as a standard server adapter.
If you are using Eclipse 3.5.0, then the standard technique described in the above screencast will not work because of the issue #280365. Fortunately, the bug report also has a workaround. Instead of using the "Download additional server adapter", install using the "Help", "Install New Software ..." and explicitly adding the GlassFish plugins update site. A screen snapshot looks like:

If you are using Eclipse 3.5.1, then the standard technique of "Download additional server adapter" works as described in the screencast #28. A screen snapshot looks like:

If you already have an existing version of GlassFish plugin installed, then it can be updated as described in TOTD #66. The process is much more simplified now and menu items have changed little bit in Eclipse 3.5.x - "Check for Updates" instead of "Software Updates ...". The screen snapshot looks like:

Now you can start developing your applications using Eclipse. Several blog entries have already been published:
Future blogs will provide more details on the new features added recently. Until then, the GlassFish Plugin Release Notes provide a summary.
On a slightly different note, you can even run GlassFish with Eclipse Equinox OSGi runtime as explained in TOTD #103.
Technorati: totd eclipse glassfish v3 javaee
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Today's Page Hits: 3250
Total # blog entries: 1024