Steps to debug a checkpoint application in BusinessStudio using PostgresDB.
- Download and install PostgreSQL from http://www.postgresql.org/download/ .
- Configure Appspace persistance mode to datastore using PostGRES database.
- Create a new Database, say bwenginedb
- Create a DB user, say bwuser which has all relevant permissions.
- Locate DB scripts create.sql and create-scp.sql under "<<BW_HOME>>\bw\6.3\config\dbscripts\" (e.g. C:\tibco\bw6\bw\6.3\config\dbscripts\engine\postgresql) and execute them against a bwenginedb database created in previous step.
- Import the attached project (Filename: checkpointsample.zip) in your workspace.
- Go to Debug configuration > Arguments > VM Arguments and add the following parameters to let the Studio application to use the datastore as an engine persistence mode.
-Dbw.engine.persistenceMode=datastore -Dbw.engine.db.jdbcDriver=org.postgresql.Driver -Dbw.engine.db.userName=bwuser -Dbw.engine.db.password=bwuser -Dbw.engine.db.url=jdbc:postgresql://localhost:5432/bwenginedb
Screenshot(Filename: debug_ckpt.png) is attached for clarity.
- Invoke the application in debug mode and confirm that the application starts in the Studio console. Open a browser window and load the "http://localhost:8080" URL. The following lines will be logged in the console for the checkpoint.
+++++++++++
11:46:34.789 INFO [Job_Executor0] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300021: All Application dependencies are resolved for Application [CHKPT.application:1.0]
11:46:40.328 INFO [Thread-35] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300006: Started BW Application [CHKPT.application:1.0]
11:47:06.670 INFO [bwEngThread:In-Memory Process Worker-1] c.t.b.p.g.Log.CHKPT.Log - ~~~~HTTP Request Received -->
11:47:06.767 INFO [bwEngThread:In-Memory Process Worker-1] c.t.b.p.g.Log.CHKPT.Log1 - Checkpoint taken
11:47:22.550 INFO [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.Log.CHKPT.Log - ~~~~HTTP Request Received -->
11:47:22.589 INFO [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.Log.CHKPT.Log1 - Checkpoint taken
+++++++++++
- The steps would remain the same for other supported databases except running specific DB scripts and modifying the DB details in the VM arguments. As an example, for SQL Server and Oracle DB are shown below.
-Dbw.engine.persistenceMode=datastore -Dbw.engine.db.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver -Dbw.engine.db.userName=bwuser -Dbw.engine.db.password=bwuser -Dbw.engine.db.url=jdbc:sqlserver://localhost:1433;databaseName=\bwenginedb
-Dbw.engine.persistenceMode=datastore -Dbw.engine.db.jdbcDriver=oracle.jdbc.OracleDriver -Dbw.engine.db.userName=bwuser -Dbw.engine.db.password=bwuser - Dbw.engine.db.url=jdbc:oracle:thin:@localhost:1521:orcl