0

I have a grails application. How do I configure, it to connect to bonita database from the application so I can query some of the bonita tables ?

this is what i have in datasource.groovy, and it does not seem to work.

dataSource {

driverClassName = "oracle.jdbc.OracleDriver"
dialect = org.hibernate.dialect.Oracle10gDialect
dbCreate = "validate"
pooled = true
url = "jdbc:oracle:thin:@localhost:1521:bonita"

username = "bonita"
password = "bonita"

}

ThePearl
  • 151
  • 2
  • 14

2 Answers2

1

First of all, I would like to point out that I am not a Grails expert so I hope my answer will make sense.

One word on best practices when connecting to Bonita: you should always avoid accessing to its database for R/W purposes for two main reasons:

  • The database structure is complex and not documented
  • The application relies on a Hibernate cache for its database accesses. Writing directly to the database could cause issues.

Instead of accessing the Bonita database, you should use the provided APIs.

Since you are using Grails, you have Access to Groovy. This may allow you to use the Java based Bonita APIs to connect to the Bonita Engine?

If this does not work, please consider the Bonita REST APIs.

POZ
  • 583
  • 4
  • 11
  • I agree with you. Its not for writing to database. Only to query, also, if we need something that their api is not all providing. i figured it out though. – ThePearl Feb 27 '15 at 22:33
0

That is the right configuration. Something else in a custom plugin was causing an issue.

ThePearl
  • 151
  • 2
  • 14