Tags

Oracle On Rails

April 9th, 2006

Ruby on Rails on Oracle: A Simple Tutorial by Richard Monson-Haefel

So, this means that I can finally uninstall MySql that I installed only for RoR.

Besides my preference for Oracle that is perhaps a bit masochistic (Oracle is powerful but really a bitch sometimes). it proves that RoR can scale at least on the DB-side. The ability to access Oracle opens also the possibilty to introduce RoR for reporting on large DBs so that it can get a trackrecord in large enterprises.

Yes, I know that MySql supports large DBs, too…

Roller on Oracle

February 13th, 2006

Arghs.
This was a stupid one. Running roller on Oracle (9.2) is actually not as difficult as it seems:

  1. org.hibernate.dialect.Oracle9Dialect in hibernate.cf.xml
  2. Make the Realm connected to your oracle-DB:
  3. <realm classname=”org.apache.catalina.realm.JDBCRealm” debug=”99″ drivername=”oracle.jdbc.driver.OracleDriver” connectionname=”roller” connectionpassword=”roller” connectionurl=”jdbc:oracle:thin:@lxoracle:1521:devlpt” usertable=”rolleruser” usernamecol=”username” usercredcol=”passphrase” userroletable=”userrole” rolenamecol=”rolename”> </realm>

  4. For a true transactional DB:
    <parameter><name>defaultAutoCommit</name>
    <value>false</value>
    </parameter> (otherwise the BasicDataSourceFactory’s default enforces autocommit.

Not that this will only work with the new Oracle-drivers ojdbc14.jar for Oracle 10g! The older version cannot handle CLOBs as Strings and so the hibernate-mapping for the roller_properties is wrong.
Next thing to do: Get this also going on a Mustang/Glassfish. (There is a nice description which just misses that WEBLOGENTRY.pubtime must be nullable)