cancel
Showing results for 
Search instead for 
Did you mean: 

data source jndi name

Former Member
0 Kudos

Hi

I know that is possible to set a data-source as a reference resource in a web.xml file,

and reffer to it as "java:comp/env/xxx".

But the question is this: is it possible to do it in the same manner as it can be done under jboss , meaning:

do not place it the web.xml, just deploy a date-source file (date-sources.xml in this case), and reffer to it as "java:/xxx".

Br

PF

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Thx for all the replies.

I think wasn't precise enough, i was asking about the exact jndi prefix, and whether is it possible to obtain a data source object without "ref-resource" entire in a web.xml file.

I found what i was looking for on a screen called "jndi names" located on the web administration panel:

jdbc:/<data-source name> (web.xml entrie not needed)

Br

PF

Vlado
Advisor
Advisor
0 Kudos

However, please be aware that this is not good practice and not portable by any means (meaning that it can be also removed / changed in a future release).

The only portable, J2EE standard way is to define a resource-ref.

\-- Vladimir

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, PaFaWa,

Generally speaking, there are two ways to deploy a data-source - 1) standalone, or 2) as a part of an application. You can also deploy a data-source-alias and use it in your application to connect to the associated data-source.

See the following link in the NW CE documentation:

http://help.sap.com/saphelp_nwce10/helpdata/en/45/07d0efea3e0485e10000000a155369/frameset.htm

Hope that helps!

Regards,

Yordan

Former Member
0 Kudos

I need to migrate an application running on oracle in websphere to SAP J2ee engine.

Do i need to create an datasource.xml and place in my application where there is web.xml or i need to have any change in server administartion also.

http://help.sap.com/saphelp_nw70/helpdata/EN/64/0bee3da7138e5be10000000a114084/content.htm

Former Member
0 Kudos

Please refer to this link

http://help.sap.com/saphelp_nw70/helpdata/EN/64/0bee3da7138e5be10000000a114084/content.htm

The dtd shows

<!ELEMENT data-source-name (#PCDATA)>

where you can refer to the data-source in data-source.xml