Versions Compared

Key

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

...

Code Block
XML
XML
borderStylesolid
titlegeronimo-application-client.xml
<?xml version="1.0" encoding="UTF-8"?>
<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0" 
  xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"
  xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2" 
  xmlns:security="http://geronimo.apache.org/xml/ns/security-2.0"
  xmlns:connector="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
  <sys:client-environment>
    <sys:moduleId>
      <sys:groupId>AccountJPA</sys:groupId>
      <sys:artifactId>AccountJPA-app-client</sys:artifactId>
      <sys:version>3.0</sys:version>
      <sys:type>jar</sys:type>
    </sys:moduleId>
    <sys:dependencies>
      <sys:dependency>
        <sys:groupId>org.apache.geronimo.configs</sys:groupId>
        <sys:artifactId>transaction</sys:artifactId>
        <sys:version>2.1</sys:version>
        <sys:type>car</sys:type>
      </sys:dependency>
    </sys:dependencies>
  </sys:client-environment>
  <sys:server-environment>
    <sys:moduleId>
      <sys:groupId>AccountJPA</sys:groupId>
      <sys:artifactId>AccountJPA-app-client-server</sys:artifactId>
      <sys:version>3.0</sys:version>
      <sys:type>jar</sys:type>
    </sys:moduleId>
  </sys:server-environment>
</application-client>

Deploying the Finish the export of the project. application client

1. Export the Java Project to a jar file Start the geronimo server and open the admin console http://localhost:8080/consoleImage Added.
Click on Embedded DB => DB Manager on the Console Navigation portlet. This will open up DB Viewer and Run SQL portlets on the right hand side as follows.

Image Added

Enter AccountDB in the Create DB text box and click on Create button. This will create a new Database AccountDB and listed in the DB Viewer portlet. In my server, the database is already created.

In the textarea SQL Command/s: which is on the Run SQL portlet, enter the below SQL command, and select AccountDB in the Use DB combo box, and click on Run SQL button. This creates the Account1 table in the AccountDB database.

Code Block
SQL
SQL
borderStylesolid
titleAccount1 table

create table ACCOUNT1 (ACCOUNTNO integer, NAME varchar(50), ADDRESS varchar(225), BRANCHCODE integer, BALANCE decimal(15,2));

Insert some sample rows in the table as follows by following the same procedure.

Code Block
SQL
SQL
borderStylesolid
titleAccount1 table

insert into Account1 values (1111, 'Joe', 'NewYork', 10, 30000.0);
insert into Account1 values (2222, 'John', 'NewJersy', 11, 31000.0);
insert into Account1 values (3333, 'Jane', 'Raleigh', 13, 32000.0);

3. by name ApplicationClientJPA.jar as follows.
Right click on the java project and export it as jar file.

...