-
1. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
peterj May 13, 2009 10:56 AM (in response to mpogra)There is a MainDeployer mbean, and there is a hot deployer. Not sure how those related to the mbeans you mentioned.
What is it that you want to do? Perhaps if we knew that we could be more helpful. -
2. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
mpogra May 14, 2009 4:53 AM (in response to mpogra)
Thanks for the reply. I want to automatically deploy application from a external directory (may be from a URL) and I read that AutoDeployer can do it but I think it is not available in jboss 5.0. If it can be done using either MainDeployer or HotDeployer then please provide a sample example or configuration.
One more question, Does MainDeployer or HotDeployer can perform any DB changes of application as well?
Thanks in advance. -
3. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
peterj May 14, 2009 11:38 AM (in response to mpogra)What do you mean by "automatically deploy"? In other words, what actions are you performing and what actions do you expect the app server to then take?
One way of deploying an app is to call the deploy operation on the MainDeployer mbean, passing the file name or URL for the app to that operation. Here is an example using twiddle (a command-line JMX utility):
twiddle invoke "jboss.system:service=MainDeployer" deploy /some/path/myapp.ear
I would call the above a manual process - you have to invoke the deploy method.
A more automated process can be achieved by adding new deploy directories to the deployer. You can do this by adding new values to the applicationURIs property of the SerializableDeploymentRepositoryFactory bean in the server/xxx/conf/bootstrap/profile-rpeository.xml file. For example, to add the /opt/other/apps directory:<property name="applicationURIs"> <array elementClass="java.net.URI"> <value>${jboss.server.home.url}deploy</value> <value>/opt/other/apps</value> </array> </property>
Now, any time that I copy a WAR, EAR or other deployable file to the /opt/other/apps directory, the hot deployer will deploy the app (the hot deployer searches the deploy directories every 5 seconds by default). I regard this as automatic deployment. -
4. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
mpogra May 15, 2009 4:14 AM (in response to mpogra)Thanks for the reply. It really helps me. Ya in my case that is sort of autodeploy.
Now my last question is, How can I perform DB changes using jboss deployers?
Thanks in advabce.
Regards,
Mahesh. -
5. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
peterj May 15, 2009 11:17 AM (in response to mpogra)What kind of DB changes?
-
6. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
mpogra May 18, 2009 9:31 AM (in response to mpogra)Suppose i have a table named Order_details and in subsequent releases of the application i need to add one more column to it or i want to crate index on some columns. So how can i achieve it?
Well i have one more question as : Is it always necessary to deploy whole application ear file if there is only change in one JSP file?
For e.g. I have a complete ear of application and I have released it. Now if there is a bug in one file and I only want to release that file in next patch, so how can I achieve it as well? Because as per my knowledge (May be I wrong) it is required to deploy whole ear/war always even if there's a small change in a single file.
Thanks in advance.
Regards,
Mahesh -
7. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
peterj May 18, 2009 11:28 AM (in response to mpogra)If you create an index or add a table column, redeploying the app should be sufficient. You might also have to redeploy the *-ds.xml file.
You can change a JSP file without redeploying, though there is a setting in the global web.xml that governs this. (And I have a vague recollection of an issue with this in 5.0.0, but I cannot recall if that was with GA or one of the CRs or Betas.)
As far as redeploying an arbitrary file - that depends on the type of file:
* Static files (images, CSS, HTML, etc.) should be picked up automatically, though the users will have to hit the refresh buttons on their browsers to force the browser to reload the file.
* JSPs I already covered.
* Property and configuration files read by your app depend on your app - if it reads those files only once and never checks for updated then they will be ignored until you redeploy the app - but this is the fault of your code.
* Class and JAR files require the app to be redeployed.
For those cases where the app needs to be redeployed, provide an updated application.xml file - that will cause the app server to redeploy the app.
Another possibility - I usually recommend that the hot deployer be turned off in a production environment. Doing so prevent surprises should something be accidentally changed. In such a situation, you can redeploy an app by having a script that first copies the updated files and then calls the MainDeployer mbean to redeploy the app. -
8. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
mpogra May 19, 2009 4:30 AM (in response to mpogra)Thanks for the detailed reply. It has cleared lot of things to me.
Global web.xml means web.xml present at <jboss-home>\server\all\deployers\jbossweb.deployer. I will try to configure it but any example would be a great help.
I will try to use *-ds.xml to perform DB changes and would reply back in case of any problem.
Thanks a lot.
Mahesh -
9. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
peterj May 19, 2009 11:51 AM (in response to mpogra)The global web.xml file contains decent documentation about the options for the 'jsp' servlet - look at the 'development' and 'checkInterval' options.
-
10. Re: Support of J2EEDeployer and AutoDeployer in jboss-5.0.1
mpogra May 25, 2009 2:40 AM (in response to mpogra)Thanks for all your help.