[jboss-as7-dev] Reloading server config from custom file? /// Re: AS config path only as a relative path?

Ondřej Žižka ozizka at redhat.com
Mon Feb 13 16:53:55 EST 2012


Once talking about testability issues:


The AS 7 testsuite is going to contain many configurations.
Currently we solve that by a combination of:
* multiple Maven modules or Surefire executions
* AS management API to change the config and get it back to original
state.

Both ways are toilsome, complicated, error-prone and hard to maintain.
The estimation is that the number of configurations for EAP final will
be in tens.

Ideal solution for this would be to let Arquillian to reload the server
with a different config file.
It would work the same as restoring config snapshots[1] via mgmt API,
only taking a parameter of which file should be loaded.
So the tests would look like:

@TestCase @ASConfigFile("standalone-foo.xml")
class TestsToBeRunOnFooTestCase { ... }

@TestCase @ASConfigFile("standalone-bar.xml")
class TestsToBeRunOnBarTestCase { ... }

Similar to what is in https://issues.jboss.org/browse/ARQ-746 , only the
server would not need to restart.

Can such feature appear in 7.1.1?


Thanks,
Ondra


[1]  https://docs.jboss.org/author/display/AS71/Configuration+file
+history






Brian Stansberry píše v Po 13. 02. 2012 v 10:30 -0600:

> I didn't see the JIRA, so I'm copying the dev list.
> 
> It was removed because the semantic was unclear. Users were expecting to 
> pass in an absolute file and then have the AS write back to that file. 
> We're not going to support writing outside the configuration/ dir and 
> never intended to.
> 
> I agree though that completely eliminating this was not the best 
> solution, as there's a good use case for it. Besides the testing issue, 
> some folks don't like the AS overwriting the config file in the first 
> place, so passing in a config file in a non-writable location is a 
> workaround solution for them.
> 
> My thoughts on this were to allow an --initial-server-config (for 
> standalone) and --initial-domain-config and --initial-host-config (for 
> domain). They would allow absolute paths. Their names and documentation 
> would indicate their contents are read when the process is first started 
> and thereafter are ignored.
> 
> 
> On 2/13/12 4:28 AM, Ondřej Žižka wrote:
> > I've created a jira for this task,
> > let's discuss there.
> >
> > Thx,
> > Ondra
> >
> >
> > Ondřej Žižka píše v Po 13. 02. 2012 v 11:15 +0100:
> >> Hi Brian,
> >>
> >> what was the reason to restrict AS config in sys prop to a relative path?
> >>
> >> In the testsuite, we would make use of absolute paths.
> >> The reason is that we reuse the configs from docs/examples, and they
> >> change quite often, so having them in resources would be hardly
> >> maintainable.
> >> However, docs/examples is not guaranteed to be always in the same
> >> place: E.g. for EAP, or for RPM-based installation of EAP it might end
> >> up in /var/docs or such.
> >>
> >> I would like to pass some property from maven to the tests, but that
> >> results in absolute path.
> >>
> >> Thanks,
> >> Ondra
> >
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20120213/69041253/attachment-0001.html 


More information about the jboss-as7-dev mailing list