java ee - How to package an EJB as an EAR from Netbeans -
to follow-up on ear versus jar question, how netbeans build project ear deployment on glassfish?
the java-ee tutorial describes:
5.2.1 packaging enterprise beans in ejb jar modules
an ejb jar file portable , can used various applications. assemble java ee application, package 1 or more modules, such ejb jar files, ear file, archive file holds application. when deploying ear file contains enterprise bean's ejb jar file, deploy enterprise bean glassfish server. can deploy ejb jar not contained in ear file. figure 5–2 shows contents of ejb jar file.
figure 5–2 structure of enterprise bean jar
the project created selecting "new ejb module" -- doesn't build ear jar? there gui configuration made, or involved editing ant build file netbeans creates?
interestingly enough, there's dist-ear build option in ant build file:
thufir@doge:~/netbeansprojects/helloejb$ thufir@doge:~/netbeansprojects/helloejb$ ant -p tasks buildfile: /home/thufir/netbeansprojects/helloejb/build.xml builds, tests, , runs project helloejb. main targets: -profile-pre72 profile j2ee project in ide. clean clean build products. compile compile project. debug debug project in ide. default build whole project. dist build distribution (jar). dist-directory-deploy build distribution (jar) - if directory deployment not supported. dist-ear build distribution (jar) packaged ear. javadoc build javadoc. profile profile j2ee project in ide. run deploy server. test run unit tests. test-single run single unit test. test-single-method run single unit test. default target: default thufir@doge:~/netbeansprojects/helloejb$ but builds enterprise bean in ejb jar module described.


Comments
Post a Comment