Question

I wrapped an existing official jdbc driver (No, it's not an Oracle DBMS) with the addon create wrapper command of Roo 1.2.5. I've started it with osgi start and osgi ps lists it as running.

I'd like to make it available for database reverse engineer analysis. But as I understand it this mean I need to setup my Roo project with jpa setup and I see no way of using this driver with this command.

How can I make my wrapped driver available for jpa setup? How do I refer to it on the command line at jpa setup --database [the database reference, here]?

The options available here are DATABASE_DOT_COM, DB2_400, DB2_EXPRESS_C,DERBY_CLIENT, DERBY_EMBEDDED, FIREBIRD, GOOGLE_APP_ENGINE, H2_IN_MEMORY, HYPERSONIC_IN_MEMORY, HYPERSONIC_PERSISTENT, MSSQL, MYSQL, ORACLE, POSTGRES and SYBASE.

The only way to get around this that I can see here at the moment would be to install any of the choices jpa setup supplies and then manually changing the DBMS details, but it would seem to me there is another official way.

In the articles I've read concerning this, mostly about Oracle and DBRE, this vital step is ignored, like it's self-explanatory. I'm not a new Roo user, yet how to install a third party database driver not already available with Roo, does seem quite vague actually.

Care to enlighten me and future users on how to do this effectively? If you don't know how exactly, how about some ideas?

Update * While I have scrapped the idea as I'm suddenly free to choose my own DBMS I don't need it. It would nevertheless be nice to know how to set up JPA with a DB that was not listed.

On the other hand if the list of options suggested by Roo actually is the complete list of Provider supported DBMS's then of course this knowledge would be moot, unless there is a time period between new support from the Provider — Hibernate in my case — and the existing Roo version.

Was it helpful?

Solution

You must think in two runtime environment:

  1. Application runtime: you just provide information to connect to Oracle. You don't need any wrapper, just Oracle JDBC driver jar in your maven local repo.
  2. Roo runtime: Roo runs on a OSGi environment, needs the Oracle JDBC wrapped into a OSGi envelope, so it can be loaded and used by Roo DBRE add-on and connect to DB.

So you must do the follow steps to run DBRE on your project:

  1. Configure your jpa connection in standard way (using jpa setup --database ORACLE ....)
  2. Use osgi start --file command to your generated wrapper to load Oracle JDBC on OSGi environment
  3. Use database introspect or database reverse engineer (this commando uses the connection configuration set in step #1)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top