Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » How to configure Embeded tomcat settings programatically in Virgo(How to configure Embeded tomcat settings programatically in Virgo)
How to configure Embeded tomcat settings programatically in Virgo [message #899204] Tue, 31 July 2012 04:46 Go to next message
anushka vaze is currently offline anushka vazeFriend
Messages: 5
Registered: July 2012
Junior Member
Hi I am using Virgo Tomcat Server virgo-tomcat-server-3.5.0.M04.
I want to change some of the tomcat settings of the embedded tomcat in Virgo like Port host etc dynamically.
What is the option to do that.
I tried to serach on different forums.
I tried to create a fragment having fragment-host as com.springsource.org.apache.catalina and provided the tomcat-server.xml with the new settings but VTS does not pick up these settings.
Please let me know how can it be achieved.
Re: How to configure Embeded tomcat settings programatically in Virgo [message #899313 is a reply to message #899204] Tue, 31 July 2012 13:03 Go to previous messageGo to next message
Violeta Georgieva is currently offline Violeta GeorgievaFriend
Messages: 278
Registered: October 2010
Senior Member
Hi,

Check the user guide: http://www.eclipse.org/virgo/documentation/virgo-documentation-3.5.0.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user-guide.html#configuring-tomcat
tomcat-server.xml is located in $SERVER_HOME/configuration

Regards
Violeta
Re: How to configure Embeded tomcat settings programatically in Virgo [message #899468 is a reply to message #899313] Wed, 01 August 2012 04:27 Go to previous messageGo to next message
anushka vaze is currently offline anushka vazeFriend
Messages: 5
Registered: July 2012
Junior Member
Thanks!!
I have gone through this.
What I wanted is how can I configure it programatically where in Virgo Tomcat server will pickup my tomcat-server.xml and not the OOTB tomcat-server.xml provided by Virgo.
I should be able to configure the tomcat settings like port host etc dynamically, without manually changing the configurations from tomcat-server.xml of OOTB Virgo.
Re: How to configure Embeded tomcat settings programatically in Virgo [message #899596 is a reply to message #899468] Wed, 01 August 2012 14:28 Go to previous messageGo to next message
Violeta Georgieva is currently offline Violeta GeorgievaFriend
Messages: 278
Registered: October 2010
Senior Member
You can change Apache Tomcat settings runtime through MBeans (is that you want?).
For example there is MBean for Connector etc.
One point here is that these settings will not be persisted.

[Updated on: Wed, 01 August 2012 14:29]

Report message to a moderator

Re: How to configure Embeded tomcat settings programatically in Virgo [message #899621 is a reply to message #899596] Wed, 01 August 2012 15:22 Go to previous message
anushka vaze is currently offline anushka vazeFriend
Messages: 5
Registered: July 2012
Junior Member
My requirement is to change the tomcat port, SSL settings etc dynamically. How can I use MBeans for that? Can you please explain it to me.
Secondly why these settings will not persisted? Can you please explain about it.
Tried to add a fragment as a fragment-host for bundle org.eclipse.gemini.web.tomcat. This fragment is containing the modified tomcat-server.xml file.
I tried to add it as part of the plan org.eclipse.virgo.web.tomcat_3.5.0.M04.plan as follows:
<artifact type="configuration" name="org.eclipse.virgo.web"/>
<artifact type="bundle" name="org.eclipse.gemini.web.core" version="[2.0, 3.0)"/>
<artifact type="bundle" name="org.eclipse.gemini.web.tomcat" version="[2.0, 3.0)"/>
<artifact type="fragment" name="tomcatcustom" version="1.0"/>
<artifact type="bundle" name="org.eclipse.virgo.web.core" version="[3.0, 4.0)"/>
<artifact type="bundle" name="org.eclipse.virgo.web.dm" version="[3.0, 4.0)"/>
<artifact type="bundle" name="org.eclipse.virgo.web.tomcat.support" version="[3.0, 4.0)"/>

As this plan is part of org.eclipse.virgo.kernel.userregion.properties as part of the initialArtifacts as follows:
initialArtifacts=repository:plan/org.eclipse.virgo.kernel.userregion.springdm, repository:plan/org.eclipse.virgo.web.tomcat

When I start Virgo server I am getting following error.
[2012-08-01 14:46:52.681] start-signalling-1 <DE0005I> Started plan 'org.eclipse.virgo.kernel.userregion.springdm' version '3.0.0'.
[2012-08-01 14:46:52.978] system-artifacts <DE0000I> Installing plan 'org.eclipse.virgo.web.tomcat' version '3.0.0'.
[2012-08-01 14:46:53.024] system-artifacts <DE0000I> Installing configuration 'org.eclipse.virgo.web' version '0.0.0'.
[2012-08-01 14:46:53.478] system-artifacts <DE0000I> Installing bundle 'org.eclipse.gemini.web.core' version '2.1.0.M03'.
[2012-08-01 14:46:54.071] system-artifacts <DE0000I> Installing bundle 'org.eclipse.gemini.web.tomcat' version '2.1.0.M03'.
[2012-08-01 14:46:54.071] system-artifacts <DE0700E> Cannot find fragment 'tomcatcustom' version range '[1.0.0, oo)' in repository 'ext-usr'.
[2012-08-01 14:46:54.149] system-artifacts <DE0002E> Installation of plan 'org.eclipse.virgo.web.tomcat' version '3.0.0' failed. org.eclipse.virgo.kernel.deployer.core.DeploymentException: Deployment of plan 'org.eclipse.virgo.web.tomcat' version '3.0.0' in scope 'null'
at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.operate(PlanResolver.java:116)
at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.access$0(PlanResolver.java:92)
at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver$1.visit(PlanResolver.java:86)
at org.eclipse.virgo.util.common.ThreadSafeGraphNode.visitInternal(ThreadSafeGraphNode.java:193)
at org.eclipse.virgo.util.common.ThreadSafeGraphNode.visit(ThreadSafeGraphNode.java:184)
at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.transform(PlanResolver.java:82)
at org.eclipse.virgo.kernel.install.pipeline.stage.transform.internal.TransformationStage.doProcessGraph(TransformationStage.java:54)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:360)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:184)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:139)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:252)
at org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.deployArtifacts(InitialArtifactDeployer.java:156)
at org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.run(InitialArtifactDeployer.java:146)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.eclipse.virgo.kernel.deployer.core.DeploymentException: fragment 'tomcatcustom' in version range '[1.0.0, oo)' not found
at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.obtainInstallArtifactGraph(PlanResolver.java:165)
at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.operate(PlanResolver.java:101)
... 19 common frames omitted

[2012-08-01 14:46:54.196] system-artifacts <DE0003E> Install failed for configuration 'org.eclipse.virgo.web' version '0.0.0'.
[2012-08-01 14:46:54.196] system-artifacts <DE0003E> Install failed for bundle 'org.eclipse.gemini.web.core' version '2.1.0.M03'.
[2012-08-01 14:46:54.212] system-artifacts <DE0003E> Install failed for bundle 'org.eclipse.gemini.web.tomcat' version '2.1.0.M03'.
[2012-08-01 14:46:54.337] system-artifacts <DE0003E> Install failed for plan 'org.eclipse.virgo.web.tomcat' version '3.0.0'.
[2012-08-01 14:46:54.353] system-artifacts <UR0002E> User region failed while deploying initial artifacts. Shutting down.
[2012-08-01 14:46:54.462] System Bundle Shutdown <KE0010I> Shutdown initiated.


Please let me know. Thanks in advance!!
Previous Topic:Virgo and Mobicents, Integration issues
Next Topic:Missing artifact org.eclipse.virgo.mirrored:org.eclipse.osgi:jar:3.8.0.v20120508-2119
Goto Forum:
  


Current Time: Tue Apr 23 12:34:42 GMT 2024

Powered by FUDForum. Page generated in 0.03532 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top