For a while i've had a a blog in JRoller. I've been wanting to move my blog to my own domain, but due to lack of time and other commitments I hadn't been able to do it. Well today I finally did it.
I figured a good first entry would be to talk about how to get Apache Roller going under GlassFish, which happens to be my Java EE server of choice, and the one that powers my site. GlassFish comes with the JavaDB RDBMS "out of the box", which is what I'm using in this Roller installation.
After downloading Roller, the first thing we need to do is to create the database that Roller will use. In JavaDB, we can accomplish this with the
ij, we need to issue the following commands to create the database.
Then we need to add a user to the database:
The above command creates a user with username of "admin" and password of "noneofyourbusiness". The username and password can be modified as appropriate.
We then need to grant full access to our admin user:
We are done with the database creation.
Now we need to create a GlassFish connection pool and JDBC Resource for our new database, this can be accomplished easily with the
asadmin create-jdbc-connection-pool --datasourceclassname org.apache.derby.jdbc.ClientDataSource --property user=admin:password=noneofyourbusiness:databaseName=roller rollerConnectionPool
The value of the databaseName property must match the name we gave our database in the first step.
To create the datasource/JDBC resource, we need to issue the following
asadmin create-jdbc-resource --connectionpoolid rollerConnectionPool jdbc/rollerdb
It is important to use the JNDI name of jdbc/rollerdb, otherwise the roller code won't be able to find the datasource.
After we have created the connection pool and datasource, we need to create a file called
with the following content:
And copy it to the
lib/classes folder of on the GlassFish domain we are using.
At this point we are ready to deploy Roller, just deploy it as usual and it should "just work".
Posted by David R. Heffelfinger
@ 04:02 PM EDT