Re: Datasource in Shark
Gokcen Iskender <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <[email protected]> |
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
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