How to deploy a J2EE JAR only application to Glassfish
Posted on 2011-10-07
I am new to Java & J2EE / Glassfish and need some basic help. I am using NetBeans 7.0.1 w/ Glassfish 3.1.
I know that this will be superfluous information, but I am running through the path that I have taken to arrive at where I am now. When I create a new Enterprise Application the EJB and WAR projects are created. When I deploy the project, Glassfish launches the JSP page.
While I will want a web front end to administer this application, I do not want that to be the entry point. I want to have the entry point on the launch of the application to be a class within the JAR file created in the EJB project.
I have read about, and tried to implement a singleton session bean with the @Startup, @Singleton, @LocalBean and @PostConstruct annotations, however this class is never called. I have waded through a sea of documentation, blogs and other musings and data, but I still do not understand how to define the entry point of the application or how GlassFish determines how it will run the application.
I thank you for your guidance.