Tim,
I think that depends on which application server you are using. In my case, I'm using Oracle's OC4J. It uses a file called datasources.xml to define datasources. In Resin, the datasource is defined in the web.xml file using the <database> element.
What app server are you using?


-Richard

I have the datasource defined At 02:08 PM 2/21/2005, you wrote:
Cheers for the advice.

I've decided I'm going to start again with iBATIS and try to follow
the jPetStore example to get it to work (instead of the one at
http://www.reumann.net/struts/ibatisLesson1/step1.do)...  I just have
a quick question about your reply though:

>> <property name="DataSource" value="jdbc/myDatasourceName"/>

Where abouts should the datasource be defined?  I've currently got a
datasource defined in the server.xml file called "sisDatasource",
though the pet store example doesn't include a server.xml file so I'm
assuming they must rely on value="${drive}" etc to pull the details
from a database.properties file.

I'm all ok with that, but I don't see where a name for this datasource
is defined.  Going back to the pet store example it refers to the
datasource in the web.xml file as jdbc/jpetstore1 but I can't find any
element with that name in the configuration files.

Tim Christopher

On Mon, 21 Feb 2005 08:23:55 -0800, Richard Yee <[EMAIL PROTECTED]> wrote:
> Tim,
> Without seeing the entire sqlMapConfig.xml it's going to be hard for anyone
> to figure out exactly what the problem is. You can get more direct help by
> posting at [EMAIL PROTECTED]
>
> I think you also need a DataSource property in your transactionManager.
> This is what I use. I don't set DBInitialContext or DBLookup.
>   <transactionManager type="JDBC" >
>     <dataSource type="JNDI">
>       <property name="DataSource" value="jdbc/myDatasourceName"/>
>     </dataSource>
> </transactionManager>
>
> Are you using the iBATIS DaoManager?
> Regards,
>
> Richard
> <snip>
> At 07:01 AM 2/21/2005, you wrote:
> >Here's an extract from my sql config file:
> >
> >###################
> ><insert id="insertModule" parameterClass="com.test.dto.Module">
> >   INSERT INTO tbl_Module ( module_id, module_credits, module_semester,
> >module_level, module_description )
> >   VALUES ( #id#, #credits#, #semester#, #year#, #description# )
> ></insert>
> >###################
> </snip>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to