Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » JBOSS 4.2 + BIRT: common data source
JBOSS 4.2 + BIRT: common data source [message #264904] Tue, 22 January 2008 13:12 Go to next message
rzmuda is currently offline rzmudaFriend
Messages: 1
Registered: July 2009
Junior Member
Hi,

I have problems with data source - more precisely with connection do
database, where data source IS NOT hardcoded into report <data-sources>
part as JDBC conenction.

In my situation, I would like to use JNDI connection because of
integration of my BIRT report with JBOSS 4.3 GA.



I have problem with setting up JNDI data source for birt report.

Suppose I configure my data source in such a way, that my <data-sources>
element looks like this:

<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="108">
<property name="odaDriverClass">org.postgresql.Driver</
property>
<property name="odaURL">jdbc:postgresql://129.112.2.13:5432/
myDb</property>
<property name="odaUser">myUser</property>
<encrypted-property name="odaPassword"
encryptionID="base64">myPassword</encrypted-property>
<property name="odaJndiName">java:comp/env/jdb/myConnection</
property>
</oda-data-source>
</data-sources>



It NOT work.

My question is, how it should look like (maybe some examples) to be
possible to connect by JNDI.

How it works? Does jdbc configuration is needed? Why?


regards,
Radek
Re: JBOSS 4.2 + BIRT: common data source [message #264906 is a reply to message #264904] Tue, 22 January 2008 13:33 Go to previous message
orkus9 is currently offline orkus9Friend
Messages: 214
Registered: July 2009
Senior Member
Ahh, ok now i understand your problem.

I use JBoss 4.0.2, so i dont really know, if it is the same with JBOSS
4.3. GA.

But here the JBOSS 4.0.2 solution:

In the deploy-directory of your jboss-server you got a *-ds.xml file,
where your datasources are defined. I got e.g. this datasource:

<local-tx-datasource>
<jndi-name>ds.ident</jndi-name>
<connection-url>jdbc:postgresql://localhost/xt_head</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>username</user-name>
<password>password</password>
<transaction-isolation>TRANSACTION_SERIALIZABLE</transaction-isolation >
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
<track-statements>true</track-statements>
</local-tx-datasource>


You have to use your jndi-name with the suffix "java:/".
In my example: java:/ds.ident.

The jdbc configuration is only needed for the birt-report-disigner
(BIRT-Eclipse-plugin). You cannt connect from your BIRT-Plugin to JNDI,
so you need the jdbc-configuration there.
The jdbc-configuration is only used, if the JNDI connection cant be found.

In my application i do this:

When someone uploads a report, the jdbc-configuration will be deleted
automatically. In my application another user could download the file
and "read" the jdbc configuration. I dont want that, so i delete them.
Its just a suggestion.


I hope this helps you.

Orkus9





Radek Żmuda schrieb:
> Hi,
>
> I have problems with data source - more precisely with connection do
> database, where data source IS NOT hardcoded into report <data-sources>
> part as JDBC conenction.
>
> In my situation, I would like to use JNDI connection because of
> integration of my BIRT report with JBOSS 4.3 GA.
>
>
>
> I have problem with setting up JNDI data source for birt report.
>
> Suppose I configure my data source in such a way, that my <data-sources>
> element looks like this:
>
> <data-sources>
> <oda-data-source
> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
> id="108">
> <property name="odaDriverClass">org.postgresql.Driver</
> property>
> <property name="odaURL">jdbc:postgresql://129.112.2.13:5432/
> myDb</property>
> <property name="odaUser">myUser</property>
> <encrypted-property name="odaPassword"
> encryptionID="base64">myPassword</encrypted-property>
> <property name="odaJndiName">java:comp/env/jdb/myConnection</
> property>
> </oda-data-source>
> </data-sources>
>
>
>
> It NOT work.
>
> My question is, how it should look like (maybe some examples) to be
> possible to connect by JNDI.
>
> How it works? Does jdbc configuration is needed? Why?
>
>
> regards,
> Radek
Previous Topic:Re: JBOSS 4.2 + BIRT: common data source
Next Topic:Page break - horizontal and vertical tables combined
Goto Forum:
  


Current Time: Wed Apr 24 20:16:31 GMT 2024

Powered by FUDForum. Page generated in 0.02739 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top