Jump to content

How to pass runtime Data source information


madarapuv

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks Sherman.

Hi Sherman,

 

Can you please provide me the Http url example how to pass the jndi_name by url so that the using jndi_name name we can cahnge  OlapConnection class and also please let me how to get The jndi_name in OlaspConnection class.

 

 

Thanks,

Venkat.

 



Post Edited by madarapuv at 03/29/2010 19:38
Link to comment
Share on other sites

You will need to change the OlapModelController to get the data source info parameter out of the HttpRequest.

 

Add the parameter into the ExecutionContext that is passed to:

        OlapModel model = getOlapConnectionService().initializeOlapModel(executionContext, olapUnit, sess);

 

In the OlapConnectionServiceImpl.getMondrianConnectProperties, get the data source value and inject it into:

                connectProps.put(RolapConnectionProperties.Jdbc.toString(),
                        jdbcDataSource.getConnectionUrl());
                String driverClassName = jdbcDataSource.getDriverClass();
                connectProps.put(RolapConnectionProperties.JdbcDrivers.toString(),
                        driverClassName);

or

                connectProps.put(RolapConnectionProperties.DataSource.toString(),
                        jndiURI);
 

 

Sherman

Jaspersoft


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...