cancel
Showing results for 
Search instead for 
Did you mean: 

Datasource Connection

Former Member
0 Kudos

Hello, I'm tryng to write an application that must be connected to a database.

-In my EAR Project I declared a dataSource Alias (in <i>data-source-aliases.xml</i>).

-In my EJB Project in <i>ejb-jar.xml</i> (and in <i>ejb-j2ee-engine.xml</i> defining the JNDI name) I passed the dataSource alias (in reaource-ref folder).

But when I try to connect to the DB it doesn't work.

In my Java class I'm using:

<b><i>ctx = new InitialContext();

ds = (DataSource)ctx.lookup("jdbc/<DataSourceAlias>");</i></b>

Is this the right procedure or I'm missing something??

Another question: this application is a WebService, if I need to test can I use the WS Navigator's test in my Enterprice Portal??

Thank You in Advance

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

<b>Hi Alessandro

Refer this URL

Database Connection Context

http://help.sap.com/saphelp_nw04/helpdata/en/70/a19cc472e72c4481172909938578fc/frameset.htm

Regards

Chandran</b>

Former Member
0 Kudos

Hi,

Check this thread:

Regards,

Shyam.

former_member186016
Active Contributor
0 Kudos

Check this thread:

This is tutorial for creating and using EJBs in Web Dynpro:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e9...

For your last question: You can use WS Navigator's test.

Regards,

Ashwani Kr Sharma