You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Joel Trunick <jo...@webifysolutions.com> on 2005/06/27 17:55:40 UTC

Run modes: Dev, Test, Production

Does Hivemind have some support for supporting different modes of
operation (ie. Dev, Test, Production), or is there a common paradigm to
support this with HiveMind? I see Ruby supports such a notion, I find it
odd (and time-consuming) that J2EE doesn't support this natively.

Joel


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Run modes: Dev, Test, Production

Posted by Glen Stampoultzis <gs...@gmail.com>.
Well I probably wouldn't to be honest.  It was more of a theoretical
question.  However as you point out there starting dummy services
based on various conditions sounds like something I'd probably need to
be doing at some stage.

On 6/28/05, James Carman <ja...@carmanconsulting.com> wrote:
> Why would you ever want to inject a mock object via the registry?  Mock
> objects should be injected by unit test code outside of the registry.
> 
> Now, if you mean you want to inject a "dummy" or "simple" implementation of
> a service to be used in a development environment (a mail service that
> doesn't really send emails, for example), you could use a symbol as part of
> your implementation class name and change it via a properties file in your
> development environment.  This is the HiveMind 1.0 way of overriding
> services, but it would work for you.  That would be the easiest way to do it
> without having to write an entirely new configuration file to override
> service implementations as we do in HiveMind 1.1.  Does that make sense?
> 
> 
> -----Original Message-----
> From: Glen Stampoultzis [mailto:gstamp@gmail.com]
> Sent: Monday, June 27, 2005 7:28 PM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Run modes: Dev, Test, Production
> 
> On 6/28/05, James Carman <ja...@carmanconsulting.com> wrote:
> > Do you mean something like substituting in the database connection
> settings
> > (url, user, password)?  HiveMind has SymbolSources which can be used for
> > this.  You could create a SymbolSource which is based on a property file.
> > Then, you just substitute in your property file for your specific
> > environment.
> >
> > For this, I usually incorporate Velocity into my build system so that I
> can
> > create a file (or files) that is based upon values from my
> build.properties
> > file.  That way, any customization goes on in one place, the
> > build.properties file.  The problem with this is that you actually have to
> > run the build whenever you want to deploy your project to a new
> environment
> > using a new build.properties file specific to that environment, but in my
> > case, that hasn't been much of a burden.  If you want the code for the
> > velocity task, let me know.
> >
> 
> What about if you want to inject a mock?  Is there a way to do this
> without creating an entirely new configuration?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


RE: Run modes: Dev, Test, Production

Posted by James Carman <ja...@carmanconsulting.com>.
Why would you ever want to inject a mock object via the registry?  Mock
objects should be injected by unit test code outside of the registry.  

Now, if you mean you want to inject a "dummy" or "simple" implementation of
a service to be used in a development environment (a mail service that
doesn't really send emails, for example), you could use a symbol as part of
your implementation class name and change it via a properties file in your
development environment.  This is the HiveMind 1.0 way of overriding
services, but it would work for you.  That would be the easiest way to do it
without having to write an entirely new configuration file to override
service implementations as we do in HiveMind 1.1.  Does that make sense?


-----Original Message-----
From: Glen Stampoultzis [mailto:gstamp@gmail.com] 
Sent: Monday, June 27, 2005 7:28 PM
To: hivemind-user@jakarta.apache.org
Subject: Re: Run modes: Dev, Test, Production

On 6/28/05, James Carman <ja...@carmanconsulting.com> wrote:
> Do you mean something like substituting in the database connection
settings
> (url, user, password)?  HiveMind has SymbolSources which can be used for
> this.  You could create a SymbolSource which is based on a property file.
> Then, you just substitute in your property file for your specific
> environment.
> 
> For this, I usually incorporate Velocity into my build system so that I
can
> create a file (or files) that is based upon values from my
build.properties
> file.  That way, any customization goes on in one place, the
> build.properties file.  The problem with this is that you actually have to
> run the build whenever you want to deploy your project to a new
environment
> using a new build.properties file specific to that environment, but in my
> case, that hasn't been much of a burden.  If you want the code for the
> velocity task, let me know.
> 

What about if you want to inject a mock?  Is there a way to do this
without creating an entirely new configuration?

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Run modes: Dev, Test, Production

Posted by Glen Stampoultzis <gs...@gmail.com>.
On 6/28/05, James Carman <ja...@carmanconsulting.com> wrote:
> Do you mean something like substituting in the database connection settings
> (url, user, password)?  HiveMind has SymbolSources which can be used for
> this.  You could create a SymbolSource which is based on a property file.
> Then, you just substitute in your property file for your specific
> environment.
> 
> For this, I usually incorporate Velocity into my build system so that I can
> create a file (or files) that is based upon values from my build.properties
> file.  That way, any customization goes on in one place, the
> build.properties file.  The problem with this is that you actually have to
> run the build whenever you want to deploy your project to a new environment
> using a new build.properties file specific to that environment, but in my
> case, that hasn't been much of a burden.  If you want the code for the
> velocity task, let me know.
> 

What about if you want to inject a mock?  Is there a way to do this
without creating an entirely new configuration?

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


RE: Run modes: Dev, Test, Production

Posted by James Carman <ja...@carmanconsulting.com>.
Do you mean something like substituting in the database connection settings
(url, user, password)?  HiveMind has SymbolSources which can be used for
this.  You could create a SymbolSource which is based on a property file.
Then, you just substitute in your property file for your specific
environment.  

For this, I usually incorporate Velocity into my build system so that I can
create a file (or files) that is based upon values from my build.properties
file.  That way, any customization goes on in one place, the
build.properties file.  The problem with this is that you actually have to
run the build whenever you want to deploy your project to a new environment
using a new build.properties file specific to that environment, but in my
case, that hasn't been much of a burden.  If you want the code for the
velocity task, let me know.

-----Original Message-----
From: Joel Trunick [mailto:joel.trunick@webifysolutions.com] 
Sent: Monday, June 27, 2005 11:56 AM
To: hivemind-user@jakarta.apache.org
Subject: Run modes: Dev, Test, Production


Does Hivemind have some support for supporting different modes of
operation (ie. Dev, Test, Production), or is there a common paradigm to
support this with HiveMind? I see Ruby supports such a notion, I find it
odd (and time-consuming) that J2EE doesn't support this natively.

Joel


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org