Skip to Content
0
Former Member
Nov 02, 2005 at 04:17 PM

EJB enabled in WebDynpro

25 Views

Currently we are working on a webdynpro application that uses the SAPDB for persistence. We have built several EJB's in order to store/retrieve the data from the DB from/to the webdynpro application. On the SDN forum I found several solutions but they all use a webservice i.e. create a Webservice from the EJB and import this as a model into webdynpro. This works perfectly though within the proxy classes the URL is hardcoded.

This is a major problem for us, because we want to deploy our project to different environments (Development, QA and Production) while these machines use different names and port numbers.

There is a solution using a Data Command Bean that works as an interface between the EJB and Webdynpro. I have used a Stateless Session EJB but for some reason the JNDI can not be found within the Data Command Bean .

Just to make clear we did the following:

Created a dictionary project

Created a JDO

Created a EJB that uses the JDO

For testing purposes we created a WebService that can create a record in the EJB and used the default JNDI for JDO.

This worked I can make the records within the database

Created the Data Command Bean

Imported in webDynPro and made the mapping

Now if I make an instance of the EJB within the Data Command Bean (called via WebDynPro) I get a naming error within the Data Command Bean

JNDI name not found.

We have tried the following: defined name in "ejb-j2ee-engine.xml" did not work and also the WebService gave a not found error

Used sap.com/CMDJDONEP/CMDJDONEJBBean which is the default JNDI name space (application provider, application name and EJB Name)also did not work.

Please advise!

Karst Koopman

Hans Diepstraten