coherence-community / oracle-bedrock

Oracle Bedrock
Other
55 stars 31 forks source link

Introduce the concept of Options to encapsulate platform/tools specific configuration options #142

Closed brianoliver closed 10 years ago

brianoliver commented 10 years ago

The current design has platform and Oracle Tools specific configuration options encapsulated as part of the internal Schemas and Builders. This is problematic as it's impossible to provide access to said options when using Platform.realize (as you can't configure a builder as they are internally chosen), thus forcing developers to use the old builder-style approach (which we want to avoid).

To resolve this issue we need to allow Platform.realize to take in zero or more platform/Oracle Tools specific options that may be used to realize an application. Options not understood by a platform may be safely ignored. Further more, we need to make sure Builders are as stateless as possible to prevent any need to configure them.

Ultimately the concept of Options will finally allows us to ensure that ApplicationSchema's, Builders etc remain Platform and Oracle Tools configuration agnostic, while at the same time providing developers with the ability to specify and reuse platform specific options during calls to "realize".

A simple example: Instead of using a schema to set the default timeout configuration like this;

schema.setDefaultTimeout(5);
schema.setDefaultTimeoutUnits(TimeUnit.MINUTES);

We should do the following;

Application application = platform.realize(schema, name, console, Timeout.within(5, TimeUnit.MINUTES));

Similarly to specify something like a JavaHome we'd do something like:

Application application = platform.realize(schema, name, console, Timeout.within(5, TimeUnit.MINUTES), JavaHome.at("...");
brianoliver commented 8 years ago

This issue was imported from JIRA ORACLETOOLS-142

brianoliver commented 10 years ago

Reported by @brianoliver

brianoliver commented 10 years ago

Marked as fixed by @brianoliver on Thursday, August 21st 2014, 9:58:18 am