cancel
Showing results for 
Search instead for 
Did you mean: 

Working with backend (Oracle) from WD Java DC - help to choose an approach

former_member186148
Active Participant
0 Kudos

Hello All!

I'm developing a WDJ application used Oracle DB as backend. It will be medium application working with few tables.

I've read some of blogs, tutorials and forum threads but still can't choose the best way for implementation the access to DB. All I know that I want to use JavaBean model in WDJ and that I should to use EJB.

There are some Java patterns like DTO, DAO, Command... For example, in this blog /people/balaramnaidu.bankuru/blog/2006/04/23/importing-complex-javabean-model-into-webdynpro-by-creating-relationships-for-the-model-classes author told only about Command pattern, in I've read about DAO, DTO and others... I've confused with them. Which patterns will be enough to use for my task?

Reagrds, Lev.

Accepted Solutions (1)

Accepted Solutions (1)

ravindra_bollapalli2
Active Contributor
0 Kudos

hi,

check this link

http://www.theserverside.com/discussions/thread.tss?thread_id=39622

and we can start discussion in this what we are required for u r task

bvr

former_member186148
Active Participant
0 Kudos

Hi bvr!

Well, let's begin to discuss. Here are my assumptions. As I know using the way like is not good. We should use the model in our WD application. I should have some java classes for import as model. These classes can perform direct call to DB via JDBC or can use another (helper) classes for working with DB. I think that it is right way to use helper classes. But which patterns will be better for these helper classes?

regards, Lev

siarhei_pisarenka3
Active Contributor
0 Kudos

Lev,

Logically Webdynpro model is designated for invoking some service/query and getting some data. So in your case I see the following dependencies:

(1) WD Model -> (2) Business Level (plain Java classes or EJB playing as services ) -> (3) Data Access Level (plain java classes implementing JDBC operations such as read/write entity into DB table).

Example:

(1) WD Model -> (2) class EmployeeService.findBestEmployee() -> (3) class EmployeeDAO.findAllEmployees().

(3) performs SQL query to DB and getting all employees,

(2) iterates on the employees and selects the best one using some logic/algorithm.

BR, Sergei

Answers (2)

Answers (2)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Lev

Personally the best approach for the task is the following (I assume you are working in JEE environment, starting from SAP NW 7.10):

- Create Dictionary project with necessary DB tables.

- Create Java beans for each table.

- Mark the Java beans as JPA entities. Establish relationships if any. The beans are your DAO level.

- Create Session EJB with business logic that will be operate with the JPA entities. Use dependency injection to access JPA entity manager. EJB is your business logic level.

- Create Webdynpro EJB model. Make UI based on the model. The UI is your presentation level.

Such approach will require the following projects: Dictionary, EJB, EAR, Webdynpro.

BR, Sergei

former_member186148
Active Participant
0 Kudos

Hello!

Unfortunatelly I'm working with 7.0

regards, Lev

Former Member
0 Kudos

Hi,

Go to Visual administrator (j2ee admin) -> Server -> Services -> JDBC Connector -> tab strip Runtime -> Drivers -> SYSTEM_DRIVER -> sap.com.portal.jdbcdrivers

Check this artcile

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70929198-0d36-2b10-04b8-84d90fa3...

Check this thread also

Check these wikis

https://wiki.sdn.sap.com/wiki/display/VC/JDBCConnectionSetup

https://wiki.sdn.sap.com/wiki/display/HOME/SDNblogsabout+Oracle

Regards,

Sunaina Reddy T

former_member185845
Active Participant
0 Kudos

Hi Sunaina Thatipally ,

Try to understand the issue/question posted?Dont jump to the conclusion and offer some solution whic is not at all required.

Regards

chandra Dasari