Note that there are some explanatory texts on larger screens.

plurals
  1. POJava-EE6: How to design @Entity passing between tiers?
    primarykey
    data
    text
    <p>I am currently working on a 3-tier application with Java-EE6 (GlassFish 3.1.2, MySQL Server 5.1 and Netbeans 7.1.1).</p> <p>The project currently consists of 3 projects:</p> <ul> <li>Enterprise Application / EJB's: facades to control entities on the database</li> <li>Java Class-Library: @Entity annotated classes that represent the database model (this project is shared by the EE-app and the fat-clients in order to exchange the entity instances between tiers)</li> <li>J2SE Fat-Client: JNDI lookup of server resources (remote access to EJB's)</li> </ul> <p>For updating the client's GUIs when entities are created/modified/deleted I decided to make use of JMS by implementing a Topic where each client subscribes on start-up and a message-driven bean on the EJB-container serves as publisher.</p> <p>Now I face the following big issue:</p> <ul> <li>I attached life-cycle listeners (@PostUpdate, etc.) to the entity objects which then should publish the update messages to the subscribed clients. The entity classes reside in the class-lib project, whereas the publisher resides in the EE-app. The problem is, that the EE-app references the class-lib project, but not vice-versa (since cyclic project references are not allowed). Thus the life-cycle callback methods in the entity classes do not have a reference on the message-driven publisher bean in the EE-app.</li> </ul> <p>This is a more design-related question &amp; thus asking you if this is basically the right approach to design a 3-tier application with Java-EE6 ?</p> <p>I want to avoid DTO/DAO if possible in order to keep complexity as low as possible and the application does not produce heavy network traffic.</p> <p>Thanks for your advise in advance !</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload