1 / 23

A New Configuration Standard for Java EE

A New Configuration Standard for Java EE. Mike Keith Oracle.

suchi
Download Presentation

A New Configuration Standard for Java EE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A New Configuration Standard for Java EE Mike Keith Oracle

  2. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

  3. Program Agenda • Defining the Problem • Consultation and Feedback • Goals and Use Cases • Sample Walkthroughs • Configuration API • Summary

  4. What is configuration, anyway? Defining the Problem • Many different interested parties, many things to configure • Leads to divergent views on what configuration is • Setup for a given server environment – virtualization, installation, etc. • Define the parameters of a runtime – localization, etc. • Deployment description – Applications to deploy, etc. • Technology-specific components – CDI beans, wirings, etc. • Resource-specific settings – data sources, message queues, etc. • Scripting facility • Different granularities, varying levels of applicability

  5. Charting a Course Getting Feedback After consulting with: • A number of individuals and internal groups • Individuals and companies active in enterprise Java • Active JUGs • Developers and software professionals at 3 major conferences on 3 different continents We have more than enough feedback and interest to chart a course!

  6. Existing Products The Landscape • VMware Spring Config • XML and annotations to configure Spring beans and overall behavior • JBoss Seam Config • XML namespace strangeness to configure CDI beans • Oracle Metadata Service (MDS) • Extensive general purpose support for many different kinds of artifacts • Chef and Puppet • Server-based Ruby scripting support for network management

  7. Lofty Ambitions Goals • Functionality: • Solve and standardize the most common DevOps-related and cloud deployment problems in the field today • Design: • Create an initially modest service that can be enhanced in subsequent releases • Usability: • A solution that offers a great CX (Configuration Experience!) for DevOps and developers

  8. Most Common Requests and Use Cases Use Cases (1) • Cloud deployment • Wire a deployed application to multiple decoupled cloud services • Single application, multiple deployments • Don’t want to rip open application for each deployment to add custom resources • File-based configuration deployment and overrides • Don’t require manual non-standard deployment tool to override • Environment properties 2.0 • Available to one or to all apps, simple to define and manage

  9. Most Common Requests and Use Cases Use Cases (2) • Deployment profiles • Development, Testing, Production, etc • Platform-wide standard of existing tech solutions (e.g. JSF Stages, CDI Alternatives) • Multiple modes of configuration access • Injection, integration with CDI • Java API for runtime access

  10. Most Common Requests and Use Cases Use Cases (3) • Scoped configuration • Visibility and accessibility settings on configurations – e.g. global/app resources • Java SE usage • Testability with other EE technologies that run outside the container • Standalone applications with standard configuration needs • Dynamic SaaS tenant configuration • Admin wants to be able to add tenants (w/o restart) • SaaS application uses an API to look up a given tenant configuration

  11. Other Requests Deferred Until Later • Versioned configuration • Dependency on a specific configuration version • Dynamic configuration change notification • Some apps want to be notified when a configuration change occurs • Existing Java EE config file integration • Single file merge of existing configs or config fragments • Clustering support • Node and cluster-based domain configurations

  12. Starting Point Feature List • Configuration archives (e.g .jar or .car) • Created and deployed separately from application archives • Contain resource and property configuration definitions • Container integrates deployed configurations with existing services • Applications can declare dependencies on named configurations • Injection into Java EE managed components • Java API to access configuration variables and resources • Offer functionality applicable to Java SE

  13. Example – Application Perspective Development App Archive(EAR, WAR, JAR) class AppBean{ @Inject @Config("app.ds")DataSourcesomeDS; ...} <application … > <application-name>MyApp </application-name> ... <required-configs> <config name="myapp.config"/> </required-configs> ... </application> <persistence … > ... <jta-datasource>java:global/jdbc/myDS </jta-datasource> ... </persistence> <web-app … > ...<servlet-mapping> ... <url-pattern> ${vendor}/* </url-pattern></servlet-mapping> ... </web-app> application.xml AppBean web.xml persistence.xml

  14. Example – Configuration Perspective Development Configuration Archive(CAR/JAR) @Configuration("myapp.config")@ConfigProperty(name="app.ds",dataSource= @DataSourceDefinition( name="java:global/jdbc/MyDS",className="org…DataSource", url="jdbc:…/myDB",...))@ConfigProperty(name="vendor", value="acme")class ConfigClass { } <application … > <application-name>MyApp </application-name> ... <required-configs> <config name="myapp.config"/> </required-configs> ... </application> configuration.xml ConfigClass

  15. Example – Container Perspective Deployment Java EE Container CDI Container Configuration Service Config(CAR/JAR) App(EAR, WAR, JAR) App(EAR, WAR, JAR) Config(CAR/JAR)

  16. Configuration API App Archive(EAR, WAR, JAR) interface ConfigurationService{ Configuration getConfiguration(String configName); Collection<Configuration> getConfigurations(String nameFilter); Object getProperty(String propertyName); <T> T getProperty(String propertyName, Class<T> valueClass) } interface Configuration { String getName(); String getProfile(); booleanisGlobal(); Object getProperty(String propertyName); <T> T getProperty(String propertyName, Class<T> valueClass) }

  17. Configuration API - Example App Archive(EAR, WAR, JAR) @ManagedBean public class ApplicationBean { @Resource ConfigurationServiceconfigService; String vendor; @PostConstruct public void initialize() { vendor = configService.getProperty("vendor", String.class); } // ... }

  18. Open Questions • Runtime support • How much runtime support do we need out of the gate? • Tooling • What is the role of tools in configuration? • Generation, delta computation, etc? • Integration • How tight should the integration be in the container? • Standalone operation • Where should the lines be drawn around the standalone service?

  19. Summary • Decouple the configuration from the application it is configuring • Enables more flexible deployment in cloud environments • Provides customization options for multitenant applications • Platform-wide deployment profile settings • Increased development, testing and production control • Benefits many areas and roles: • Operations, Developers, Application vendors, Cloud providers • Start modestly but design for the future

  20. The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract.It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

  21. Graphic Section Divider

More Related