1 Reply Latest reply on Aug 19, 2005 5:34 AM by sysuser1

    EJB + JDBC

    claudia.pt

      Hello!!
      I'm using a MS SQL Server Database. I will develop a J2EE application: user opens the browser and asks for a diary report. The fields in these report are filled with values stored in the DB.
      I thought use JSP's+ servlets for Presentation Logic and EJB's for Business Logic.
      I'm using Eclipse3.1+WTP0.7+JBoss4.02.+XDoclet1.2.3.
      How many beans I need? What type (session stateless??)??
      The connection to DB with JBDC is made inside a bean?

      thanks,
      Claudia from Pt

      PS - Any tutorial??

        • 1. Re: EJB + JDBC
          sysuser1

          Hi Claudia,

          You need as many EntityBeans as you have tables in your database from which you want to get the values and at least one sessionBean in order to communicate with the client. Database access is made within the ejb-Container. Therefore you have to add an xml-file to your deploy-directory (xxx-ds.xml) where you declare your database configuration. Furthermore you have to set your database as "default"-Database in standardjbosscmp-jdbc.xml/standardjaws.xml.

          There are many tutorials. Try the JBoss-startguide.

          aibo