Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java EE architecture with Play Framework

Is it possible to reproduce a Java EE architecture with Play? By Java EE I mean these 4 layers: view, controller, service, model.

I know play use a better architecture only based on MVC, and I love this one, but I must use a Java EE architecture for a specific project and I'd like to use Play considering it's the best Java framework from my point of view.

like image 320
DevAntoine Avatar asked Jan 11 '12 12:01

DevAntoine


1 Answers

In my current project we use a traditional Java EE app as backend for a Play application. All application logic is implemented in Stateless EJBs which is accessed over RMI.

The Play controllers use remote JNDI lookup to get stubs for the remote interfaces for our EJBs. Class defintions for model classes as well as the remote interfaces is shared between the Play app and the Java EE application running on our application server (Glassfish).

The Java EE application is built by Maven which deploys an ejb-client.jar to our central Nexus server which is also accessible for the Play runtime (enabled by creating a customized Ivy setup file).

This solution has worked fine for us so far. To speed up things and make the app scalable we use Play's asynchronous job and memcache support.

Sweet :-)

like image 53
Zapodot Avatar answered Oct 03 '22 08:10

Zapodot