Re: ServerRuntime.builder().addConfig

2019-07-17 Thread Joe Baldwin
John, > https://stackoverflow.com/questions/18948418/set-database-path-in-cayenne Is that still applicable to 4.0.1? It looks like Module is an interface (per your docs). Joe > On Jul 17, 2019, at 12:10 PM, John Huss wrote: > > You should only have one project file. You can change the DB c

Re: ServerRuntime.builder().addConfig

2019-07-17 Thread Mike Kienenberger
For what it's worth, under Cayenne 3.1, I am using this to provide different connection properties depending on whether it's a production system, a dev system, running tests, etc. This does require that all of the config files are in the same package (or are on the classpath somewhere) rather tha

Re: ServerRuntime.builder().addConfig

2019-07-17 Thread John Huss
You should only have one project file. You can change the DB connection properties using a module passed to the runtime. Here's some info: https://stackoverflow.com/questions/18948418/set-database-path-in-cayenne On Wed, Jul 17, 2019 at 11:01 AM Joe Baldwin wrote: > John, > > > What are you try

Re: ServerRuntime.builder().addConfig

2019-07-17 Thread Joe Baldwin
John, > What are you trying to override for testing? If it's the database connection > properties there are better ways to do that. The context is automated testing. (i.e. unit and integrated testing). I am using the project file to set the connection properties (i.e. mysql, server-ip). T

Re: ServerRuntime.builder().addConfig

2019-07-17 Thread John Huss
The typical approach is to put the project file in the root of the classpath. What are you trying to override for testing? If it's the database connection properties there are better ways to do that. On Wed, Jul 17, 2019 at 9:25 AM Joe Baldwin wrote: > Goal: > My goal is to provide an unambiguo

ServerRuntime.builder().addConfig

2019-07-17 Thread Joe Baldwin
Goal: My goal is to provide an unambiguous (deterministic) path to my project xml file to ServerRuntime during automated testing (the plan is to have multiple stages of testing). My understanding is that 4.0.1 uses: ServerRuntime.builder().addConfig() to accomplish this normally. Probl