Skip to content

Development of a complete enterprise application in JavaEE

License

Notifications You must be signed in to change notification settings

lytves/exampleEAR

Repository files navigation

Java EE 7 Tutorial

A complete example of developing a business application in JavaEE with database access


- exampleEAR

  1. Configuring a connection pool and a JNDI resource in WildFly java:jboss/datasource/Books. Creating a database, user and tables in MySQL, file libros.sql

  2. Example is an enterprise web application that is composed of EJBs and Servlets and JSP. Composed by:

    • a project of the type Enterprise Application Project - EjemploEAR
    • a project where are all the EJBs - EjemploEAR_EJB
    • a project with interface @Remote of an EJB (ConsultaAutoresRemote) that can be called from another virtual machine - EjemploEAR_EJBClient
    • two internal dynamic web projects, in this web applications we want to use the previously developed EJBs - EjemploEAR_WebApp1 and EjemploEAR_WebApp2
    • another external dynamic web project - Ejemplo_WebApp3

*dynamic web projects contain the servlets with bean injects and view in jsp files

  1. Beans defined within a business project can be accessed from more than one web application belonging to that business project without having to perform any special actions (ExampleEAR_WebApp1, ExampleEAR_WebApp2, Ejemplo_WebApp3)

  2. Project EjemploEAR_EJB:

    • AuxiliarBean - acceso mediante interfaz local
    • UtilsBean - acceso a beans de tipo Singleton
  3. Project Ejemplo_WebApp3: shows us access from external web applications to the business project. A bean defined within a business project can be accessed from an external web application to that enterprise project through its JNDI portable name

  4. Deploy the project EjemploEAR on the application server. Once running the server, we can open the Web browser and put the URLs: http://localhost:8080/EjemploEAR_WebApp1/ and http://localhost:8080/EjemploEAR_WebApp2/

  5. Deploy the project Ejemplo_WebApp3 on the application server and open URL http://localhost:8080/Ejemplo_WebApp3/

About

Development of a complete enterprise application in JavaEE

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages