BIRT Exchange Forum: how to set connection in BIRT DEAPI - BIRT Exchange Forum

Jump to content


 

BIRT Poll: To best make a table fill a pdf page before breaking (PL=page layout, PBI=page break interval) set:

PL: auto, PBI: 0PL: fixed, PBI: 0PL: auto, PBI: 1000000PL: fixed, PBI: 1000000
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

how to set connection in BIRT DEAPI Rate Topic: -----

#1 User is offline   ashish13 Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 67
  • Joined: 14-March 12


Posted 23 April 2012 - 05:43 AM

Hi,

I am using BIRT design engine API. I am using below code to build datasource:
void buildDataSource( ) throws SemanticException {
OdaDataSourceHandle dsHandle = designFactory.newOdaDataSource("Data Source", "org.eclipse.birt.report.data.oda.jdbc" );
dsHandle.setProperty( "odaDriverClass","oracle.jdbc.driver.OracleDriver" );
dsHandle.setProperty( "odaURL", "jdbc:oracle:thin:@localhost:1521:TEST" );
dsHandle.setProperty( "odaUser", "Test" );
dsHandle.setProperty( "odaPassword", "start123" );
designHandle.getDataSources( ).add( dsHandle );
}

Is there any way in i can pass connection which i am setting in my weblogic server, instead of hardcoding the datasource in code.

Thanks in advance,
Ashish
0

#2 User is offline   johnw Icon

  • Senior Member
  • View blog
  • Group: Members
  • Posts: 712
  • Joined: 08-May 08


Posted 23 April 2012 - 09:58 AM

JNDI?
0

#3 User is offline   ashish13 Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 67
  • Joined: 14-March 12


Posted 23 April 2012 - 09:09 PM

View Postjohnw, on 23 April 2012 - 09:58 AM, said:

JNDI?


Yes, can i pass the JNDI connection and build the data source.

Regards,
Ashish
0

#4 User is offline   johnw Icon

  • Senior Member
  • View blog
  • Group: Members
  • Posts: 712
  • Joined: 08-May 08


Posted 24 April 2012 - 10:02 AM

Yes. A JNDI URL is one of the connection properties out of the box.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users