J2EE, JEE, PHP
Frank D. Martínez’s Blog
Software & Fun
Welcome to my technical blog. Here you can find my opinions and proposals over many software development things, mainly on open source projects.
Seam 1.2.1.GA + Netbeans 5.5.1 + Glassfish v2-b58c
I have developed a Seam Application in netbeans and deployed it to glassfish-v2-b58c. I have written my own build script and a netbeans project hack to get it working with code completion and default IDE actions. There is the code and instructions to use it for developing seam applications in netbeans 5.5.1 for the glassfish server.
Unzip the project.
Open the file build.xml and replace the string @@PROJECT_NAME@@ with your project name. (i.e. MyApp).
Open the file private.properties and replace the string @@GLASSFISH_HOME@@ with the real absolute path to the installed Glassfish. (i.e. /opt/glassfish).
Open the file project.properties and replace the string @@EAR_NAME@@ with your ear name. (i.e. Myapp.ear).
Open the file resources/META-INF/application.xml and replace the string @@WEB_ROOT@@ with your web root. (i.e. myapp).
Open the file resources/META-INF/persistence.xml and replace the string @@DATASOURCE@@ with your datasource name. (i.e. jdbc/myDataSource). You can create a datasource using the glassfish Admin Console.
Open the file resources/WEB-INF/components.xml and replace the string @@EAR_NAME@@ with your ear name. (i.e. Myapp). Important! Without the .ear extension.
Open the file nbproject/project.xml and replace the string @@PROJECT_NAME@@ with your project name. (i.e. MyApp).
Open the project with Netbeans 5.5.1
- Important: copy the file jboss-cache-jdk50.jar from jboss server to GLASSFISH_HOME/domains/domain1/lib/ext
This project structure was tested in GNU/Linux with glassfish-v2-b58c, postgresql 8.2 and Jboss Seam 1.2.1.GA.
To get it working you need to develop at least one Service EJB and One Controller (Backing bean) EJB and declare them in web.xml using <ejb-local-ref>.
The project structure suggest the following basic architecture:
Or this is also a good choice:
This site contains personal opinions about many things and does not intend to be normative in any aspect.
Java, J2EE, J2SE, JEE, Are trademarks of Sun Microsystems Inc.