Re: Datasource in Shark
"Sasa Bojanic" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <006b01c577cb$19721320$1200a8c0@bobrock> |
Hi, you mentioned dods-runtime.jar ? There is no such jar in current shark 1.1. version that uses DODS 6.4, and previous DODS versions didn't have this option for data sources. You can't just use old DODS by just adding dsconnection.jar in order to use data sources. Regards, Sasa. ----- Original Message ----- From: "Gokcen Iskender" <[email protected]> To: <[email protected]> Sent: Thursday, June 23, 2005 9:43 AM Subject: Re: [shark] Datasource in Shark > Hi Sasa, > I am experiencing the same problem. > I added dods-runtime.jar and dsconnection.jar in the > classpath. > > In Shark.conf I added > > DatabaseManager.DB.sharkdb.Connection.DataSourceName = > jndi:jdbc/dsi > DatabaseManager.DB.sharkdb.Connection.ConnectionFactory > = > com.lutris.appserver.server.sql.DataSourceDBConnectionFactory > DatabaseManager.DB.sharkdb.ConnectionAllocator = > com.lutris.appserver.server.sql.datasource.DataSourceConnectionAllocator > > > And commented out: > #DatabaseManager.DB.sharkdb.JdbcDriver="org.hsqldb.jdbcDriver" > #DatabaseManager.DB.sharkdb.Connection.Url="jdbc:hsqldb:d:/Shark-1.1/db/hsql/hsql" > > What is the problem? > > --- Sasa Bojanic <[email protected]> wrote: > > > Hi, > > > > it seems that you either didn't set properties: > > > > > DatabaseManager.DB.<database_id>.Connection.ConnectionFactory > > = > > > com.lutris.appserver.server.sql.DataSourceDBConnectionFactory > > DatabaseManager.DB.<database_id>.ConnectionAllocator > > = > > > com.lutris.appserver.server.sql.datasource.DataSourceConnectionAllocator > > > > or you didn't include dsconnection.jar in your > > classpath, so the above specified classes can't be > > found. > > > > Regards, > > Sasa. > > > > ----- Original Message ----- > > From: "Monique Maker" <[email protected]> > > To: <[email protected]> > > Sent: Monday, June 20, 2005 9:02 AM > > Subject: Re: [shark] Datasource in Shark > > > > > > > Hello Sasa, > > > > > > We tried your recommendations on > > shark-cvs-2005-06-02. > > > Unfortunately, the engine refuses to start without > > this setting in Shark > > > configuration file: > > > DatabaseManager.DB.sharkdb.Connection.Url="..." > > > > > > The error message is > > > java.lang.Error: Failed to make Standard > > Connection Allocator : > > > > > > com.lutris.appserver.server.sql.standard.StandardConnectionAllocator > > > at > > > > > > com.lutris.appserver.server.sql.standard.StandardLogicalDatabase.loadConnectionAllocator(StandardLogicalDatabase.java:492) > > > at > > > > > > com.lutris.appserver.server.sql.standard.StandardLogicalDatabase.initConf(StandardLogicalDatabase.java:271) > > > at > > > > > > com.lutris.appserver.server.sql.standard.StandardLogicalDatabase.init(StandardLogicalDatabase.java:183) > > > at > > > > > > com.lutris.appserver.server.sql.standard.StandardLogicalDatabase.<init>(StandardLogicalDatabase.java:169) > > > at > > > > > > com.lutris.appserver.server.sql.StandardDatabaseManager.loadLogicalDatabase(StandardDatabaseManager.java:536) > > > at > > > > > > com.lutris.appserver.server.sql.StandardDatabaseManager.<init>(StandardDatabaseManager.java:343) > > > at > > > > > > org.enhydra.shark.utilities.dods.DODSUtilities.init(DODSUtilities.java:204) > > > at > > > > > > org.enhydra.shark.instancepersistence.DODSPersistentManager.configure(DODSPersistentManager.java:99) > > > at > > > > > > org.enhydra.shark.SharkEngineManager.init(SharkEngineManager.java:258) > > > at > > org.enhydra.shark.Shark.init(Shark.java:297) > > > at > > org.enhydra.shark.Shark.configure(Shark.java:69) > > > ... > > > > > > We want to use data sources to avoid explicit > > database configuration in > > > Shark config. As it seems, currently we cannot > > avoid such dependancy. > > > > > > Is there anything else we have to change, or this > > is problem of the > > > Shark engine? > > > > > > Best Regards, > > > Monique > > > > > > Sasa Bojanic wrote: > > > > > > >Hi, > > > > > > > >this is the snippet from DODS 6.4 documentation: > > > >Using DODS with javax.sql.DataSource > > > >DODS can use separate ConnectionAllocator > > implementation to support javax.sql.DataSource as > > database connections source for > > > >connection allocation (see "ConnectionAllocator" > > and "ConnectionFactory" parameters reference). > > > > > > > >In case that DODS is configured to use DataSource > > then connection level parameters "Url", "User" and > > "Password" are sufficient. > > > >Parameters named "ClassType" and "JdbcDriver" are > > not mandatory (DODS will try collect this > > information's directly from > > DataSource > > > >and internal dodsConf.xml file) but this > > information's can be useful in situations when DODS > > don''t recognize specific > > > >driver/database. > > > > > > > >DataSource is defined externally to DODS by some > > environment dependent mechanism (eg. inside > > Servlet/JSP Container ..) and DODS > > use > > > >JNDI api to access this object. DODS references > > DataSource by name that is defined in application > > configuration parameter called > > > >DataSourceName (see reference for > > "DataSourceName"). > > > > > > > >eg. > > > > > > > > > > >DatabaseManager.DB.<database_id>.Connection.DataSourceName > > = jndi:<DataSourceName> > > > > > > > >Also, you should define the following parameters: > > > > > > > > > > >DatabaseManager.DB.<database_id>.Connection.ConnectionFactory > > = > > > com.lutris.appserver.server.sql.DataSourceDBConnectionFactory > > > > > > >DatabaseManager.DB.<database_id>.ConnectionAllocator > > = > > > com.lutris.appserver.server.sql.datasource.DataSourceConnectionAllocator > > > > > > > > > > > >Regards, > > > >Sasa. > > > >----- Original Message ----- > > > >From: "Madl Alfred - Together AT" > > <[email protected]> > > > >To: <[email protected]> > > > >Sent: Thursday, June 16, 2005 12:49 PM > > > >Subject: RE: [shark] Datasource in Shark > > > > > > > > > > > >Yes, DODS supports Datasources via JNDI. So it is > > a question of DODS > > > >configuration in Shark. I think Sasa can tell you > > the details... > > > > > > > >Greetings. > > > > > > > >Alfred > > > > > > > >-----Original Message----- > > > >From: Monique Maker [mailto:[email protected]] > > > >Posted At: Donnerstag, 16. Juni 2005 10:48 > > > >Posted To: Shark > > > >Conversation: [shark] Datasource in Shark > > > >Subject: [shark] Datasource in Shark > > > > > > > >Hello Shark team! > > > > > > > > > > > >We would like to use Shark in a project under an > > J2EE application server > > > > > > > >and prefer to use datasources, managed by the > > corresponding (application > > > > > > > >server) administrator. > > > > > > > > > > > >My questions are: > > > > > > > >1. Is it possible to use datasources in Shark? > > > > > > > >2. How to configure Shark to use datasources? > > > > > > > > > > > >I saw letter "*How to config datasource in > > shark*" > > > > > > >(http://mail-archive.objectweb.org/shark/2005-05/msg00144.html), > > as of > > > >25 May 2005. Unfortunately it still has no > > answer. > > > > > > > > > > > >Regards, > > > > > > > >Monique > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >-------------------------------------------------------------------------------- > > > === message truncated ===> > > -- > > You receive this message as a subscriber of the > > [email protected] mailing list. > > To unsubscribe: > > mailto:[email protected] > > For general help: > > mailto:[email protected]?subject=help > > ObjectWeb mailing lists service home page: > > http://www.objectweb.org/wws > > > > > > > ____________________________________________________ > Yahoo! Sports > Rekindle the Rivalries. Sign up for Fantasy Football > http://football.fantasysports.yahoo.com > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [email protected] mailing list. > To unsubscribe: mailto:[email protected] > For general help: mailto:[email protected]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >
message.footer
(text/plain, 271 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws