Issue Details (XML | Word | Printable)

Key: JS1-542
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: David Sean Taylor
Reporter: David Sean Taylor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jetspeed

[ENH] Torque OM jar generation per backend database

Created: 18/Apr/05 01:39 PM   Updated: 26/May/05 12:09 PM  Due: 18/Apr/05
Return to search
Component/s: Database
Affects Version/s: 1.6-dev
Fix Version/s: 1.6-dev

Time Tracking:
Not Specified

Resolution Date: 18/Apr/05 02:23 PM


 Description  « Hide
Creates torque specific bindings for the selected database.
Goal: end users will no longer have to recompile the source to get support for a different database than hypersonic. This requirement has been the source to a large number of problems reported on the user list.

on the distribution site, I'd like to provide several small jars for each torque-supported database:

+ 1.6-binary
  + torque
      + hypersonic
          jetspeed-torque-om-1.6.jar
      + mysql
          jetspeed-torque-om-1.6.jar
      + axion
          jetspeed-torque-om-1.6.jar
      + sybase
          jetspeed-torque-om-1.6.jar
...

prefer to have all the jars named the same to lessen the chance of someone accidently having 2 jars installed.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
David Sean Taylor made changes - 18/Apr/05 01:44 PM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
David Sean Taylor added a comment - 18/Apr/05 02:23 PM
tested on hypersonic and mysql
if anyone else could test against other database much appreciated

David Sean Taylor made changes - 18/Apr/05 02:23 PM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
David Sean Taylor added a comment - 19/Apr/05 01:41 AM
> - With a clean setup (meaning no jetspeed-torque-om jar ever generated before you can't build or clean from > the root project because it fails with a missing dependency. I resolved this by building the jar once from > the torque-om subproject but this should be handled better I think

The Torque build is set as a pregoal to java:compile.
Wonder why that isn't enough, since it does a jar:install

> I tested this with Oracle9i and can confirm it working.

The big gotcha here is when you go to create a new user.
Thats when Torque fails miserably: since the generated code for Oracle requires sequences.
A certain percentage of database operations actually work, even know the code was generated for Hypersonic.


Ate Douma added a comment - 19/Apr/05 05:42 AM
> The Torque build is set as a pregoal to java:compile.
> Wonder why that isn't enough, since it does a jar:install
Because the jar is defined as dependency in the main project.xml and maven first it to be resolved before it even starts with the java:compile

>> I tested this with Oracle9i and can confirm it working.
>
> The big gotcha here is when you go to create a new user.
> Thats when Torque fails miserably: since the generated code for Oracle
> requires sequences.
Sorry, I only tested it out yet with the buildin users so I missed that one! It certainly is a killer...
Do already have an idea how to handle that?

David Sean Taylor added a comment - 19/Apr/05 06:03 AM
> Because the jar is defined as dependency in the main project.xml and > maven first it to be resolved before it even starts with the
> java:compile

The jar is in the remote repo, should work as is

>> I tested this with Oracle9i and can confirm it working.
>
> The big gotcha here is when you go to create a new user.
> Thats when Torque fails miserably: since the generated code for Oracle
> requires sequences.
Sorry, I only tested it out yet with the buildin users so I missed that one! It certainly is a killer...
Do already have an idea how to handle that?


Well thats the whole point.
There needs to be one jar per database.
So you change the torque-om/project.properties:

torque.database = oracle

and then rebuild

For the 1.6 release, I was planning on prebuilding each and every database (and signing), ... i know

Jeremy Ford made changes - 26/May/05 12:09 PM
Summary Torque OM jar generation per backend database [ENH] Torque OM jar generation per backend database