Bug 1047807 - Inconsistent naming of datasource in dashbuilder generic/EAP6 binaries
Summary: Inconsistent naming of datasource in dashbuilder generic/EAP6 binaries
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Configuration
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: CR1
: 6.0.0
Assignee: David Gutierrez
QA Contact: Marek Baluch
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-02 09:36 UTC by Radovan Synek
Modified: 2014-01-15 12:19 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-15 12:19:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Radovan Synek 2014-01-02 09:36:13 UTC
Take a look at dashbuilder WAR /WEB-INF/etc/hibernate.cfg.xml, there is a "connection.datasource" property with value "java:comp/env/jdbc/jbpm" in generic binaries, but "java:comp/env/jdbc/dashbuilder" in EAP6.1 binaries. I suppose the value should be the same for both distributions (as it was before ER6).


Version-Release number of selected component (if applicable):
BPMS-6.0.0.ER6

Comment 1 David Gutierrez 2014-01-07 09:59:01 UTC
Afaik "generic" dashbuilder is not part of the product binaries. When I mean "product" I'm referring to the latest ER7 get from here: http://dev138.mw.lab.eng.bos.redhat.com/candidate/bpms-6.0.0-ER7/jboss-bpms-6.0.0-redhat-7-deployable-eap6.x.zip

In the product release, there is only one hibernate.cfg.xml which is linked with to the following  datasource: 

<property name="connection.datasource">java:comp/env/jdbc/dashbuilder</property>

So I think there is nothing wrong there.

Comment 2 Radovan Synek 2014-01-07 10:16:48 UTC
(In reply to David Gutierrez from comment #1)
Hello David, please compare with what I mean by "generic binaries":
dev138.mw.lab.eng.bos.redhat.com/candidate/bpms-6.0.0-ER7/jboss-bpms-6.0.0-redhat-7-deployable-generic.zip

these are supposed to be deployed on tomcat, for example.

Comment 3 Ryan Zhang 2014-01-08 07:47:07 UTC
I think the "generic" dashboard is also part of the product which will be deployed to non-EAP container.

(In reply to David Gutierrez from comment #1)
> Afaik "generic" dashbuilder is not part of the product binaries. When I mean
> "product" I'm referring to the latest ER7 get from here:
> http://dev138.mw.lab.eng.bos.redhat.com/candidate/bpms-6.0.0-ER7/jboss-bpms-
> 6.0.0-redhat-7-deployable-eap6.x.zip
> 
> In the product release, there is only one hibernate.cfg.xml which is linked
> with to the following  datasource: 
> 
> <property
> name="connection.datasource">java:comp/env/jdbc/dashbuilder</property>
> 
> So I think there is nothing wrong there.

Comment 4 Ryan Zhang 2014-01-10 08:42:43 UTC
According to the comments above, I think this issue is not fixed yet and it might still need developers' attention.
I am moving this to ASSIGNED.

Comment 5 Pedro Zapata 2014-01-13 09:41:07 UTC
I might be confused, but I believe that generic dashbuilder (that is, without jbpm integratation) is NOT productized. 

What is productized is the jbpm-dashbuilder assembly, which adds jbpm dashboards on top of that.

What is deployed on non-EAP container (EWS) is jbpm-dashbuilder for EWS.

What needs to be verified is jbpm-dashbuilder's assembly for either platform, which is the correct one for BPMS.

Comment 6 Radovan Synek 2014-01-13 10:05:48 UTC
I also believe that productized is the dashbuilder integrated with jbpm and business-central.

I originally referred to the difference between two distributions (of the same dashbuilder), one for EAP: 
http://dev138.mw.lab.eng.bos.redhat.com/candidate/bpms-6.0.0-ER7/jboss-bpms-6.0.0-redhat-7-deployable-eap6.x.zip

and the second for EWS and other containers: 
http://dev138.mw.lab.eng.bos.redhat.com/candidate/bpms-6.0.0-ER7/jboss-bpms-6.0.0-redhat-7-deployable-generic.zip

Comment 7 Ryan Zhang 2014-01-14 03:23:50 UTC
(In reply to Pedro Zapata from comment #5)
> I might be confused, but I believe that generic dashbuilder (that is,
> without jbpm integratation) is NOT productized. 
> 
> What is productized is the jbpm-dashbuilder assembly, which adds jbpm
> dashboards on top of that.
> 
> What is deployed on non-EAP container (EWS) is jbpm-dashbuilder for EWS.
> 
> What needs to be verified is jbpm-dashbuilder's assembly for either
> platform, which is the correct one for BPMS.

I think the jbpm-dashbuilder 's assembly for either platform has been generated and passed to QE. [1] is the one which should deploy to EWS. See also [2] for bugzilla reference.

However, I also have no idea why the hibernate contains different ""connection.datasource" property as this issue descripted.
-deployable-eap6.x.zip contains "java:comp/env/jdbc/dashbuilder" 
-deployable-generic.zip contains "java:comp/env/jdbc/jbpm"

I also checked BPMS ER5, the value in "java:comp/env/jdbc/dashbuilder" is"java:comp/env/jdbc/dashbuilder".

[1]http://dev138.mw.lab.eng.bos.redhat.com/candidate/bpms-6.0.0-ER7/jboss-bpms-6.0.0-redhat-7-deployable-generic.zip
[2]See https://bugzilla.redhat.com/show_bug.cgi?id=995005

Comment 8 David Gutierrez 2014-01-14 09:55:52 UTC
In EAP distribution both BusinessCentral &  Dashbuilder share the default ExampleDS datasource defined by the app server. The name "jdbc/dashbuilder" is just a symbolic reference to ExampleDS as you can see here "dashbuilder.war/WEB-INF/jboss-web.xml" 

In the EWS (generic) distribution BusinessCentral defines a data source named "jdbc/jbpm" as you can see at business-central.war/META-INF/context.xml. This is required since in EWS there isn't a default ExampleDS provided OOTB. What Dashbuilder simply does is to define a reference to the data source created by BusinessCentral.

I don't see anything wrong there. This is the proper configuration to make the product work on EWS.

Comment 9 Ryan Zhang 2014-01-14 10:23:45 UTC
Yes, business-central.war for EWS(generic) define the jdbc/jbpm as datasource name.
It makes sense to me, Thanks for explaination.

Radovan, if it also makes sense to you, I think we could close this issue.

(In reply to David Gutierrez from comment #8)
> In EAP distribution both BusinessCentral &  Dashbuilder share the default
> ExampleDS datasource defined by the app server. The name "jdbc/dashbuilder"
> is just a symbolic reference to ExampleDS as you can see here
> "dashbuilder.war/WEB-INF/jboss-web.xml" 
> 
> In the EWS (generic) distribution BusinessCentral defines a data source
> named "jdbc/jbpm" as you can see at
> business-central.war/META-INF/context.xml. This is required since in EWS
> there isn't a default ExampleDS provided OOTB. What Dashbuilder simply does
> is to define a reference to the data source created by BusinessCentral.
> 
> I don't see anything wrong there. This is the proper configuration to make
> the product work on EWS.

Comment 10 Radovan Synek 2014-01-14 11:58:48 UTC
David, thanks for explanation, but I am still not sure about these datasource names in tomcat distribution of BPMS.

Take a look at dashbuilder/WEB-INF/web.xml:
<resource-ref>
    <description>Dashboard Builder Datasource</description>
    <res-ref-name>jdbc/dashbuilder</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

this resource-ref points to jdbc/dashbuilder, but datasource defined in Business-central/META-INF/context.xml is as follows:

<Resource name="jdbc/jbpm" uniqueName="jdbc/jbpm" auth="Container"
            removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource" />

where the name is "jdbc/jbpm".

Moreover, as it seems, dashbuilder defines its own datasource in dashbuilder/META-INF/context.xml:
<Resource name="jdbc/jbpm" auth="Container"
              type="javax.sql.DataSource" username="sa" password=""
              driverClassName="org.h2.Driver"
              url="jdbc:h2:file:~/jbpm"
              maxActive="8"
            />

Can you please confirm these configurations are correct?

Comment 11 David Gutierrez 2014-01-15 11:46:08 UTC
BusinessCentral defines how to create the "jdbc/jbpm" datasource as you can see at       "business-central.war/README.txt". So the datasource definition at dashbuilder/META-INF/context.xml is redundant and the only reason it's there is because it's a way to force the datasource to be created when installing dashbuilder alone. In any case we could remove this second definition. The only valid datasource reference to "jdbc/jbpm" is defined at "dashbuilder/WEB-INF/etc/hibernate.cfg.xml".

Regarding the "dashbuilder" datasource reference at dashbuilder/WEB-INF/web.xml it's something useless and it could be removed. The definition it's there because this file was created by copying the generic dashbuilder one.

Comment 12 Radovan Synek 2014-01-15 12:19:08 UTC
David, thanks for an exhaustive clarification of these datasource configurations.


Note You need to log in before you can comment on or make changes to this bug.