Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In the EJB Project. Under META-INF, Edit openejb-jar.xml and add the following
    Code Block
    titledatasource dependency
    borderStylesolid
    <sys:dependencies>
                <sys:dependency>
                    <sys:groupId>console.dbpool</sys:groupId>
                    <sys:artifactId>jdbc%2Fuserds</sys:artifactId>
                </sys:dependency>        
    </sys:dependencies>
    
    Info
    titleWhere did the above dependencies come from??

    To make the datasource visible to EJB we need to add a dependency to the EJB deployment plan that is openejb-jar.xml. The above element can be obtained automatically from Geronimo Database Pool wizard. Select usage against the database pool jdbc/userds

  2. In the WEB Project. Under WEB-INF, Edit geronimo-web.xml and add the following
    Code Block
    titleEJB dependency
    borderStylesolid
    <sys:dependencies>
           <sys:dependency>
                <sys:groupId>default</sys:groupId>
          		<sys:artifactId>StatelessSessionEJB</sys:artifactId>
          		<sys:version>1.0</sys:version>
          		<sys:type>car</sys:type>
           </sys:dependency>        
    </sys:dependencies>
    
  3. Right click the ApplicationClient Project and select properties. Select Java Build Path->Projects. Click add and add Stateless Session EJB. This is required for the compilation of the Clien code.

Deploy and Run

Warning
titlewarning

Due to limitation with Geronimo Eclipse Plugin, you will have to export the Stateless Session EJB project and Web Application project as a jar and war respectively.

  1. Export the projects to your local disk as StatelessSessionEJB.jar and ApplicationClient.war.
  2. Start the server and launch the Administrative console using http://localhost:8080/console/. Enter default username and password.
  3. In the welcome page, under Applications. Select Deploy New.





  4. Browse and Select StatelessSessionEJB.jar. Once done Select Install. This will deploy the EJB application on to server.
  5. Browse and Select ApplicationClient.war. Once done select Install. This will deploy the Web application on to server.
  6. Under Applications, Select Web App WARs and Run ApplicationClient project as show in the figure.





  7. Once done a welcome page will be launched.





  8. If you are New User. Select New User as shown in the figure





  9. This will display a new registration form. If you leave the mandatory username or password filed empty. You will get the following error message.





  10. Fill the fields as shown in the figure and Select Submit.





  11. Once done a page will be displayed from where you will be automatically redirected to login page to relogin.





  12. Enter the username and password as chosen by you during registration and select Login.





  13. The next page is the Apache Geronimo Resource Center.





  14. In case you give wrong username and password combination you will be redirected to login page.