This page describes the setup of blojsom 3 using Jetty 6 as the application server and Apache Derby Embedded as the database engine.
The use of Apache Derby Embedded, is of use when there is no need or cannot use a networked SQL server.
Download and Install Apache Derby
- Download and unpack Apache Derby
- Go to db-derby-10.2.1.0-bin/frameworks/embedded/bin directory to invoke ij.ksh script to create the database and user.
The following command will create the database at /home/claudio/tmp/db-repos/blog directory, the user someuser and password
$ ./ij.ksh ij> connect 'jdbc:derby:/home/claudio/tmp/db-repos/blog;create=true;user=someuser;password=somepassword';
There are more options
to use when creating the database (like encryption support)
to use when creating the database (like encryption support)
Then, invoke the sql script to create the tables.
run '/home/claudio/javaSoftware/jetty-6.1.0pre0/webapps/blog/WEB-INF/classes/blojsom-full-initial-data-derby-embedded.sql';
You can download the sql script
.
Download, Install, and Configure Jetty 6
- Download and unpack Jetty 6
Setup blojsom
- Download the blojsom 3.0 blojsom.war file.
- Create a web application directory for the blojsom 3.0 WAR file in $JETTY_HOME/webapps.
$ mkdir blojsom $ cd blojsom
- Unpack the previously downloaded blojsom.war file.
$ jar xvf blojsom.war
Install the Apache Derby Embedded driver
- Copy the $DERBY_HOME/lib/derby.jar to $JETTY_HOME/lib/ext
Configure blojsom's Database Settings
- Edit $JETTY_HOME/webapps/blojsom/WEB-INF/classes/blojsom-helper-beans-include.xml and change only the values for the username and password for your database to the username and password you created earlier.
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="url" value="jdbc:derby:/home/claudio/tmp/db-repos/blog"/>
<property name="username" value="someuser"/>
<property name="password" value="somepassword"/>
</bean>
- Modify the hibernate dialect to DerbyDialect
<prop key="hibernate.dialect">org.hibernate.dialect.DerbyDialect</prop>
At this time it isn't need to configure dbLoader, because the SQL script was previously invoked.
Add new attachment
Only authorized users are allowed to upload new attachments.
List of attachments
| Kind | Attachment Name | Size | Version | Date Modified | Author | Change note |
|---|---|---|---|---|---|---|
sql |
blojsom-full-initial-data-derb... | 7.6 kB | 1 | 30-Jul-2008 00:52 | ClaudioMiranda |