on 07-28-2009 9:08 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go to Visual administrator (j2ee admin) -> Server -> Services -> JDBC Connector -> tab strip Runtime -> Drivers -> SYSTEM_DRIVER -> sap.com.portal.jdbcdrivers
Check this artcile
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.