Design Correct?? Please help!


EJB design: Design Correct?? Please help!

  1. Design Correct?? Please help! (1 messages)

    Hi all,

    I have to develop a Web Application using JSP, Servlet and server side component JavaBean (not EJB yet), below is my scenario.

    A user first load, index.jsp, this index.jsp need to pull some data from Oracle, so I did this all in server side component JavaBean with JNDI lookup for datasource, JDBC connection, SQL and etc.... Is this the correct way to put the JNDI lookup and JDBC connection in JavaBean?? The purpose that I want to have a JavaBean is to minimize the code reveal in JSP.

    Next, the user POST the JSP form to a servlet, then the servlet will call another JavaBean (JNDI lookup and JDBC) to perform insertion into Oracle. I will set all the neccessary data into JavaBean using the set and get method, and perform the SQL insert statement in the JavaBean.

    What I want some feedback is, are this kind of architect correct (all the JNDI lookip and JDBC connection are perform in the JavaBean)? Will this too loaded or any impact?? Scalability??

    If you need the JSP, and the Java code for a clear look, you can email me at ooiklnews at yahoo dot com


    Kian Lee
  2. Design Correct?? Please help![ Go to top ]


    I'm not sure that you can define a DataSource and lookuping it without an AppServer(which the EJB have deployed to). Where you can put the properties of the JDBC that need for Makeup an Connection?

    If i'm wrong pls show me.