|
(no subject) [message #684553 is a reply to message #684521] |
Wed, 15 June 2011 19:25 |
|
You can change the connection profile dynamically either through
property binding or script. For example say you put a connection
profile in the resource folder of your deployment. You could add a
beforeOpen script to set the connection profile like:
if(
!reportContext.getHttpServletRequest().getAttribute("attributeBean").isDesigner()
){
myresourcefolder = reportContext.getDesignHandle().getResourceFolder()
this.setExtensionProperty("OdaConnProfileStorePath",
myresourcefolder+"/mysqlclassic.txt");
}
On 6/15/2011 2:02 PM, Cyril Rognon wrote:
> Hello all,
>
> I am using Birt with connection profile. On the design time, everything
> works really fine. :d
> Then my design is under windows and I deploy to linux.
>
> troubles begin when I want to use my connection profile : it encloses a
> jarlist property that is tied to my design environement. The driver is
> not found even if it is in the lib directory of tomcat.
>
> On design I use a jdbc/profile connection.
> On my target Tomcat system ther is a jndi datasource. How can I use this ?
>
> Could I use a connection profile on design environement and a jndi DS on
> the target environement ?
>
>
>
> Thanks
> Cyril
|
|
|
|
Re: (no subject) [message #684926 is a reply to message #684754] |
Thu, 16 June 2011 13:37 |
|
That is fine. On jndi I believe that dburl, etc are used only if the
jndi connection fails.
Jason
On 6/16/2011 3:27 AM, Cyril Rognon wrote:
> Hello jason,
>
> thx for your quick answer as always.
>
> I did use another trick that is close to your solution : the connection
> profile store URL property bindind.
>
> there I have this expression :
> reportContext.getAppContext().get("birt.viewer.resource.path")
> +"/mypath/mydb.store"
>
> do you think before open might be a better place ?
>
> this way I have mydb.store file on dev and production that are different.
>
> now I am looking for documentation in order to use a jndi datasource in
> a connection profile... when I use birt/dtp tools it seems I cannot
> provide a sole jndi name. it requires db url, drivers, etc...
> Can anyone point me to a valuable ressource on this matter ?
>
> regards
> Cyril
|
|
|
Powered by
FUDForum. Page generated in 0.01854 seconds