The examples in other posts are ant-build-deploy based... including how to connect to a running server "somewhere ourside the IDE" - e.g. a Live/Pre Production Server.
For developement you probably don't want to do that! If you have a Good IDE why not use it?
I generally work alone on projects so time is king!
So, call me very sad but I could not stand the time taked to ant build/redeploy each time I made a tiny change !!! so I bothered to set up a J2EE project in MYEclipse comprising of three parts:
I then ripped apart a war created for the booking example (from Ant) and kept fiddling until I finally got the right Jars/Code in the right areas (ear, jar and war) that matched the WAR. (I can supply this!)
I then told MyEclipse to "deploy as exploded" to my JBoss server; which creates a directory in the JBoss Deploy area called xxx.ear and puts your "real" code in there... unarchived! NEAT!
I then just run the JBoss server from INSIDE MyEclipse with one button click and generally when I change code/xhtml I don't even have to redeploy/restart the server; it just works... and I can also set breakpoints etc. (might have to close the browser to clear the browsers cache of .css and .xhtml though!)
All your output from the server, including your logging statements, is in the MyEclipse console and you just set breakpoints in your code and it works! none of this fiddling with Jboss config etc.
Set your log statements to info to see them in the console (the easy option as JBoss logs by default to info I guess) or else do some fiddling in the Jboss Logger Config XML file (cant remember the name) to either:
1. change the default outputter to log at the level of debug (you get a lot of debug info from everywhere including the JBoss server itself! some of it quite interesting and amusing!)
OR (the geek solution)
2. add a outputter for your project that outputs your applications packages logging (xxx.xxxx.xxxx.xxx) at the debug level. - See a Geek for how to do this or RTFM from JBoss as it should be in there!
Now, if you change the code too much (i.e. change an interface) then you get MyEclipse reporting (on behalf of JBoss) that it can't manage the change and you are offered the option to terminate the server; which I generally do; and then re-start it (again one-click from inside MyEclipse).
Finally, when I have to, I write an ant script for other people ! (Not actually done one yet and been working this project for weeks!!!)
NOTE: MyEclipse is SUPPOSED to deploy as an WAR archive as well as exploded but I never get a valid war !!! as the application.xml gets munged...(e.g. <web-uri>risingstars.war.war</web-uri>). This is a shame as then I would only have to writer an Ant script at the VERY VERY end to get rid of some Jars I dont need deployed (the test ones) but I think I may be able to fiddle around more and have "dependent" projects in MyEclipse to get round this e.g. xxxx._testing.ear. (NOte to self - RTFM in MyEclipse as I can't 'NOT' deploy a jar file from my project to the exploded or archived project).
Not bad for a tool that really doesn't even support SEAM/EJB3.
If you go this route make sure you do this:
Under xxxx.ear go into properties
Under EAR check the option for
"Do No Modify 'application.xml' (I will manually manage it)"
as it gets it wrong!
SEAM + IceFaces Related stuff:
I seem to have ended up with the same jars in some/all parts of the project! seems to still work ok though.
You seem to have to add your icefaces jars to the application.xml
<application> <display-name>risingstars</display-name> <module> <web> <web-uri>risingstars.war</web-uri> <context-root>/risingstars</context-root> </web> </module> <module> <ejb>risingstars.jar</ejb> </module> <module> <java>jboss-seam.jar</java> </module> <module> <java>icefaces.jar</java> </module> <module> <java>icefaces-comps.jar</java> </module> </application>
And if you have to use IceFaces table etc. then dont forget to open this file:
C:\Program Files\jboss-4.0.5.GA\server\default\deploy\jbossweb-tomcat55.sar\META-INF\jboss-service.xml and alter this line:
and no, I don't know why.
MyEclipse are looking to add in EJB3 support and possibly Seam support but that depends on the support from JBoss Seam Team I guess and they may not want to take this "inside the IDE approach". I can only hope the MyEclipse Devs talk to Gavin or Michael.
Hope this helps.