Versions Compared

Key

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

...

The following table provides a feature-to-feature comparison between these two applicaiton servers.

Feature

Apache Geronimo v1.0

JBoss v4.2.1 Apache Geronimo v1.0

Container-managed datasource

Supported. Hibernate can lookup a datasource from JNDI given its JNDI name. Supported. Hibernate is able to use a datasource given its JNDI name. This is because it is running in the same thread as the application.

Supported. Hibernate can lookup a datasource from JNDI given its JNDI name.

Automatic JNDI binding

Not Supported.

Supported. Once the property is set the session factory is bound to the JNDI context.

Not Supported.

JTA Session binding

Supported out of the Box. Hibernate provides a lookup class for the JBoss Transaction Manager.

This feature is not supported out of the box. We need to write a lookup for the Geronimo Transaction Manager to enable this.

Supported out of the Box. Hibernate provides a lookup class for the JBoss Transaction Manager.

JMX deployment

JMX deployment

Supported. Hibernate is distributed with org.hibernate.jmx.HibernateService which can be deployed on JBoss.

Not Supported out of the box. Can be implemented by writing a GBean and a Hibernate Connection Provider class.

Supported. Hibernate is distributed with org.hibernate.jmx.HibernateService which can be deployed on JBoss.

Hibernate Archive (HAR)

Not Supported. Hibernate classes are deployed as a part of the J2EE archives. Archive (HAR)

Supported. A HAR packages the configuration and mapping files enabling extra server support to deployment.

Not Supported. Hibernate classes are deployed as a part of the J2EE archives.

Caching

You can use caching mechanisms provided by hibernate. Integration with JBoss Cache is also supported.

You can use caching mechanisms provided by hibernate. Integration with JBoss Cache is also supported.

Session Management

Not Supported. It is required to manually open sessions. Only the transaction needs to be closed.

The Hibernate Session's lifecycle can be automatically bound to the scope of a
JTA transaction. This means you no longer have to manually open and close the Session, this becomes the job of a JBoss EJB interceptor.

Not Supported. It is required to manually open sessions. Only the transaction needs to be closed.

Hibernate Mapping Files

We need to specify the locations of the Hibernate mapping files.

Hibernate Mapping Files

If we use HAR deployment JBoss will automatically lookup the Hibernate mapping files. We need to specify the locations of the Hibernate mapping files.

...

The following figure illustrates the application flow:
First, the user accesses the Login page. From the Login page the user enters the user name and password. If the user name or password is not valid the application throws an error message and rejects the user's login attempt. If the user name and password are correct, the user is taken to the Available Stocks page where he/she can view all the stocks that are present for sale at that time.
The user can choose to buy as many stocks as wanted, depending on the available money in the account, by clicking the Buy button. After the transaction completes successfully the user is brought back to the Available Stocks page where he/she can buy more stocks if required. If the user has insufficient funds to buy stocks the application will throw an error and will not process the transaction. The error message is shown at the top of the Available Stocks page. There is a User Info button on this page. By clicking this button the user is taken to the User Info page and shown the user details.
From the Available Stocks page there is a View your Portfolio link that shows all the stocks that the user owns. In that page, the user can select the stocks and quantity to sell. This page also shows the user's available cash in the User Cash field. If the user tries to sell more stocks than he/she has, the application will throw an error. The error message will be displayed on the same page. For each successful sale, the sale amount is added to the user's cash balance. The quantity text box shows the quantity of stocks of a particular company that the user has. The Quantity to Sell field allows the user to enter the quantity of stocks to sell for a specific company. For selling and buying, the radio button should be checked. This should be done after entering the values. If either the quantity to sell textbox is not filled or the selection box is not checked and you press on sell a JavaScript alert will be triggered saying that the required field is empty. On entering non numeric characters for quantity another alert will be triggered. This behavior is similar for the Available Stocks page as well.
New users can register by clicking the Register button in the login page. In the Registration page the user will enter a user id, user name, password, address and available cash.

...

Depending on your environment you should see a confirmation message similar to this one:

No Format
bgColor#000000#FFFFFF
borderStylesolid
E:\geronimo-1.0\bin>deploy --user system --password manager deploy \brokerage\plan\mysql-geronimo-plan.xml
..\repository\tranql\rars\tranql-connector-1.1.rar
    Deployed user/database-pool-HibernateDS/1/car

...