[
http://jira.jboss.com/jira/browse/JBESB-1695?page=comments#action_12413659 ]
Daniel Bevenius commented on JBESB-1695:
----------------------------------------
I'm working on step 2 which is switching the quickstart to use H2 instead of
hypersonic.
I'm having an issue which is that the database is always in-memory and not is
server/remote mode which is required by this quickstart as it needs to insert values into
the database upon startup (and also select,drop for other ant targets).
I've modified the quickstart-ds.xml to look like this:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
...
<mbean code="org.jboss.internal.soa.esb.dependencies.H2Database"
name="jboss:service=h2,database=h2DB">
<attribute name="Database">h2DB</attribute>
<attribute name="InMemoryMode">false</attribute>
</mbean>
</datasources>
I was thinking that setting InMemoryMode to false would make the database run in
server/remote mode and we would be able to connect via tcp/ip. But doing this will create
an embedded/local database with an url that looks like this:
jdbc:h2:file:/opt/jboss/esb/JBESB_4_2_1_GA_CP/product/build/jbossesb-server-4.2.1CP3/server/default/data/h2/h2DB;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE
When I run 'ant runtest' the first thing that happens is that we insert data into
the table. I get the following error message:
org.h2.jdbc.JdbcSQLException: Database may be already in use: Locked by another process.
Possible solutions: close all other connection(s); use the server mode [90020-68]
I guess that if we were to insert via the datasource this would succeed so that might be
an option, to write something that does this for us.
Another option might be to update H2Database to support server/remote mode.
I noticed that according to the H2 docs :
"It is also possible to access a memory-only database remotely (or from multiple
processes in the same machine) using TCP/IP or SSL/TLS. An example database URL is:
jdbc:h2:tcp://localhost/mem:db1 (using private database remotely is also possible).
"
I havn't been able to get this working but will look into it now.
Any thoughts on this? Have I missed anything?
Thanks,
Daniel
jBPM datasource should be XA datasource
---------------------------------------
Key: JBESB-1695
URL:
http://jira.jboss.com/jira/browse/JBESB-1695
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Process flow, Rosetta, Documentation, Examples
Affects Versions: 4.2.1 CP2
Reporter: Jiri Pechanec
Assigned To: Daniel Bevenius
Fix For: 4.2.1 CP3
If the SQL listener with transactions is used configured according helloworld_tx_sql and
is enhanced with jBPM use - start service, it fails because both datasources are local.
To prevent the issue these steps should be done
1) Change the jBPM DS to be XA datasource - this means that schme toll must be also
modified
2) Change QS to use H2 database and XA datasource - it serves users as guidline
3) Switch to h2 database for all datasources
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira