SlideShare ist ein Scribd-Unternehmen logo
1 von 53
JavaOne 2014 
An Draft for Java Configuration 
Configuration in SE and EE 
Anatole Tresch, Credit Suisse 
September 2014
A draft to Java Configuration September 2014 
Bio 
Anatole Tresch 
Consultant, Coach 
Credit Suisse 
Technical Coordinator & 
Architect 
Specification Lead JSR 354 
Driving Configuration 
Twitter/Google+: @atsticks 
atsticks@java.net 
anatole.tresch@credit-suisse.com 
JUG Switzerland (Europe) 
Zurich Hackergarten 
2
A draft to Java Configuration September 2014 
Agenda 
3 
Defining the Problem 
Use Cases 
Existing Approaches 
Java EE 
Java SE 
Outlook 
Configuration API for the Java Platform 
Summary
Defining the Problem 
A draft to Java Configuration September 2014 
4
Defining the Problem 
What is configuration, anyway? 
A draft to Java Configuration September 2014 
5 
• Many different interested stakeholders 
• Many things to configure 
• Divergent views 
• Setup for a given server environment 
• Define the parameters of a runtime (staging, localization etc.) 
• Deployment descriptors 
• Technology-specific components (beans, wirings etc.) 
• Resource-specific settings (data sources, message queues etc.) 
• Scripting facility 
• Different granularities, varying levels of applicability 
• Different formats 
• …
Use Cases 
A draft to Java Configuration September 2014 
6
Use Cases (1) 
A draft to Java Configuration September 2014 
7 
• Staging / Environment Dependent Configuration 
• Available to one or to all apps, simple to define and manage 
• Deployment Profiles (production, test, staging etc.) 
• Single application, but multiple deployments 
• Don’t want to rip open application for each deployment to add 
custom resources 
• Enable Product / Component Customization for COTS solutions 
• Manage your Configuration 
• Don’t require manual non-standard deployment tool to override or 
mess up the build for configuration assembly 
• Configuration Servers (files, shares, Maven Repo, …)
Use Cases (2) 
A draft to Java Configuration September 2014 
8 
• Scoped configuration 
• Manage Visibility and Accessibility of Configuration – e.g. 
global/ear/app/tenant scope 
• Encrypt/protect entries 
• Flexible Configuration Access from any context 
• Service Location Based Singleton access (Java API), also needed 
for legacy integration 
• Injection, e.g. with CDI, @Inject
Use Cases (3) 
A draft to Java Configuration September 2014 
9 
• Dynamic SaaS Tenant configuration / Multi Tenancy 
• Adding/Removing/Updating Tenants w/o restart 
• SaaS application uses an API to look up a given tenant 
configuration 
• Cloud 
• Wire a deployed application to multiple decoupled cloud services 
and vice versa 
• Life Update changes, e.g. due to dynamic provisioning and 
elasticity 
• Support Automatic Provisioning
Use Cases (4) 
A draft to Java Configuration September 2014 
10 
• Support Single Layered Configuration 
• Standalone applications 
• Tests 
• Bootstrapping of Containers 
• Support Multi Layered Configuration 
• Java EE 
• Multi-Tenancy, SaaS 
• OSGI 
• JigSaw 
• …
Use Cases (5) 
Advanced Use Cases 
A draft to Java Configuration September 2014 
11 
• Versioned configuration 
• Dependency on a specific configuration version 
• Clustering support 
• Node and cluster-based domain configurations 
• Security Constraints 
• Configuration Templates 
• Tool Support 
• Remote Updates
Existing Approaches 
A draft to Java Configuration September 2014 
12
Existing Approaches 
Overview (likely uncomplete) 
A draft to Java Configuration September 2014 
13 
• Java EE 
• Spring 
• XML and annotations to configure Spring beans and overall 
behavior (PropertyResolver) 
• Apache Deltaspike 
• Configure CDI beans, injecting configuration 
• 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 
• Apache Commons Configuration 
• JFig, Java Config Builder, Carbon 
• java.util.Preferences/Properties, java.util.ResourceBundle 
• In-House Solutions
Existing Approaches (Java EE) 
JSR 339 JAX RS Runtime Delegate 
A draft to Java Configuration September 2014 
14 
Runtime Delegate = abstract factory class that provides various 
methods for the creation of objects that implement JAX-RS APIs : 
1. A resource with the name of META-INF/ 
services/javax.ws.rs.ext.RuntimeDelegat 
e 
2. ${java.home}/lib/jaxrs.properties exists and 
contains an entry javax.ws.rs.ext.RuntimeDelegate 
3. System property javax.ws.rs.ext.RuntimeDelegate
Existing Approaches (Java EE) 
JSR 352 Batch 
A draft to Java Configuration September 2014 
15 
META-INF/batch.xml 
META-INF/batch-jobs/… 
Support for substitutions within config files (though not explicit 
EL support), mostly for inter-operability within a deployment, 
but also supporting system properties.
Existing Approaches (Java EE) 
JSR 338 JPA 2.1 
A draft to Java Configuration September 2014 
16 
META-INF/persistence.xml 
JPA provides a metamodel javax.persistence. 
metamodel.MetaModel), but this is read-only. 
A customized 
javax.persistence.spi.PersistenceProvider, 
PersistenceProviderResolver can be registered using 
java.util.ServiceLoader.
Existing Approaches (Java EE) 
JSR 342 Java EE 7 
A draft to Java Configuration September 2014 
17 
META-INF/application.xml 
META-INF/MANIFEST.MF (Main-Class attribute) 
META-INF/application-client.xml 
Several configuration options, but no EL support, no dynamics 
(except alt-dd concept).
Existing Approaches on EE 
JSR 345: EJB 3.2 Core 
A draft to Java Configuration September 2014 
18 
META-INF/ejb-jar.xml 
Use configurable Resource Connection Factories: 
<resource-ref> 
<description>…</description> 
<res-ref-name>jms/qConnFactory</res-ref-name> 
<res-type>javax.jms.QueueConnectionFactory</res-type> 
<res-auth>Container</res-auth> 
<res-sharing-scope>Unshareable</res-sharing-scope> 
</resource-ref>
Existing Approaches on EE 
JSR 346: CDI 1.2 
A draft to Java Configuration September 2014 
19 
META-INF/beans.xml 
META-INF/services/javax.enterprise.inject.spi.Extension 
CDI Extensions 
• Allow to change the CDI Model during deployment 
• Add/remove beans 
• Add/remove interceptors 
• Add/remove decorators 
• Customize Injections, Events 
• …
Existing Approaches on EE 
JSR 349: Bean Validation 1.1; JSR 344: JSF 2.2 
A draft to Java Configuration September 2014 
20 
Bean Validation 
META-INF/validation.xml 
META-INF/services/javax.enterprise.inject.spi.Extension 
ConstraintValidatorFactory, MessageInterpolator, 
ParameterNameProvider or TraversableResolver can be 
configured.
Existing Approaches on EE 
JSF 
A draft to Java Configuration September 2014 
21 
• javax.faces.application.ApplicationConfigurationPopul 
ator 
-> This class defines a java.util.ServiceLoader service 
which enables programmatic configuration of the JSF 
runtime (XML Document) using the existing Application 
Configuration Resources schema.
Existing Approaches on EE 
Overview 
A draft to Java Configuration September 2014 
22 
• Deployment Descriptors 
• Standardized: web.xml, persistence.xml, ejb-jar.xml, 
beans.xml 
• Vendor-specific: mostly administrative resources 
• <alt-dd> feature (see http://tomee.apache.org/alternate-descriptors.html) 
• JSF Stages (Development,Production,SystemTest,UnitTest) 
• JNDI Tree 
-> configuration must be known at build time! 
-> No support for dynamic placeholders, e.g. using EL 
expressions 
-> Despite CDI, JSF and Bean Validation not much support for 
deployment time configuration.
Existing Approaches (Java SE) 
A draft to Java Configuration September 2014 
23
Existing Approaches Java SE (1) 
Spring PropertyResolver 
A draft to Java Configuration September 2014 
24 
application.properties 
appl.name=My Web Application 
appl.home=/Users/webapp/applicat 
ion/ 
db.driver=org.hsqldb.jdbcDriver 
db.name=v8max.db 
db.url=jdbc:hsqldb:file://${appl 
.home}/ 
database/${db.name} 
db.user=SA 
db.pass= <bean id="applicationProperties" 
class="org.springframework.beans.factory.config. 
PropertyPlaceholderConfigurer"> 
<property name="location" value="classpath:application.properties"/> 
</bean> 
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> 
<property name="driverClassName" value="${db.driver}"/> 
<property name="url" value="${db.url}"/> 
<property name="username" value="${db.user}"/> 
<property name="password" value="${db.pass}"/> 
</bean> 
… and you can write your own 
PropertySource/ 
PropertyPlaceHolder !
Existing Approaches Java SE (2) 
Apache Deltaspike Configuration 
ConfigResolver * ConfigSource 
A draft to Java Configuration September 2014 
25 
application.properties 
appl.name=My Web Application 
appl.home=/Users/webapp/application/ 
db.driver=org.hsqldb.jdbcDriver 
db.name=v8max.db 
db.url=jdbc:hsqldb:file://${appl.hom 
e}/ 
database/${db.name} 
db.user=SA 
db.pass= 
public class MyCustomPropertyFileConfig 
implements PropertyFileConfig { 
@Override 
public String getPropertyFileName() { 
return “application.properties"; 
} 
} 
@ApplicationScoped 
public class SomeRandomService { 
@Inject @ConfigProperty(name = "endpoint.poll.interval") 
private Integer pollInterval; 
@Inject @ConfigProperty(name = "endpoint.poll.servername") 
private String pollUrl; 
... 
}
Existing Approaches Java SE (3) 
Apache Commons Configuration 
A draft to Java Configuration September 2014 
26 
application.properties 
appl.name=My Web Application 
appl.home=/Users/webapp/applica 
tion/ 
db.driver=org.hsqldb.jdbcDriver 
db.name=v8max.db 
db.url=jdbc:hsqldb:file://${app 
l.home}/ 
database/${db.name} 
db.user=SA 
db.pass= 
Configuration config = new PropertiesConfiguration(“application.properties"); 
String dbUrl = config.getString(“db.url")); 
…
Existing Approaches Java SE (4) 
ConfigBuilder (1) 
A draft to Java Configuration September 2014 
27 
@PropertiesFiles("config") // "config.properties", "config.<hostname>.properties", etc. 
@PropertyLocations(directories = {"/home/user"}, contextClassLoader = true) 
@PropertySuffixes(extraSuffixes = {"tngtech","myname"}, hostNames = true) 
public class MyBean{ 
public static class StringToPidFixTransformer 
implements TypeTransformer<String,PidFix> { 
@Override public PidFix transform(String input) { ... } 
} 
@DefaultValue("false") // values are automatically be converted to primitive types 
@CommandLineValue(shortOpt="t", longOpt="test", hasArg=false) // flag arg. 
private boolean runInTestMode; 
@DefaultValue("3") 
@CommandLineValue(shortOpt="rl", longOpt="runLevel", hasArg=true) 
private int runLevel; 
@EnvironmentVariableValue("PATH") 
@PropertyValue("path") // maps to the key "path" in the properties file 
private String path;
Existing Approaches Java SE (4) 
ConfigBuilder (2) 
A draft to Java Configuration September 2014 
28 
@SystemPropertyValue("user.name") // maps to field "user.name" in sys props 
@NotEmpty("username.notEmpty") // JSR-303 validation 
private String userName; 
@TypeTransformers(StringToPidFixTransformer.class) 
@CommandLineValue(shortOpt="pc", longOpt="pidFixCollection", 
hasArg=true) 
private Collection<PidFix> pidFixCollection; 
@TypeTransformers(StringToPidFixTransformer.class) 
@CommandLineValue(shortOpt="p", longOpt="pidFix", hasArg=true) 
private PidFix pidFix; 
@Validation 
private void validate() { ... } 
... 
}
Existing Approaches Java SE (3) 
Owner 
public interface Application 
extends Config { 
String name(); 
String home(); 
String driver(); 
String name(); 
URL url(); 
@DefaultValue("myDB") 
String database(); 
@Key("db.user"); 
String user(); 
@Key("db.pass"); 
String pass(); 
} 
A draft to Java Configuration September 2014 
29 
application.properties 
name=My Web Application 
home=/Users/webapp/application/ 
driver=org.hsqldb.jdbcDriver 
name=v8max.db 
url=jdbc:hsqldb:file://${appl.h 
ome}/ 
database=${db.name} 
db.user=SA 
db.pass= 
ServerConfig cfg = ConfigFactory.create(ServerConfig.class); 
System.out.println(cfg.name()); 
…
Existing Approaches Java SE (5) 
JFig 
A draft to Java Configuration September 2014 
30 
application.xml 
<configuration> 
<section name=“app1"> 
<entry key=“name" value=“My Web Application"/> 
… 
</section> 
<section name=“db"> 
<entry key=“driver" value="org.hsqldb.jdbcDriver" /> 
<entry key=“name" value="v8max.db" /> 
<entry key=“url" 
value="db.url=jdbc:hsqldb:file://${appl.home}/ 
database/${db.name}" /> 
<entry key=“user" value=“SA" /> 
<entry key=“pass" /> 
</section> 
</configuration> 
java –Dconfig.filename=application.xml <yourClassName> 
JFig.initialize(); 
String dbDriver = JFig.getInstance().getValue(“db”, “driver”); 
String dnBame = JFig.getInstance().getValue(“db”, “name”); 
…
A draft to Java Configuration September 2014 
Outlook 
31
Common Aspects of Existing Approaches (1) 
Java SE 
A draft to Java Configuration September 2014 
32 
• Key/value based 
• Basically all relevant solutions are based on simple key/value pairs 
(most of the based on Strings only) 
• Environment dependent (contextual) 
• The Environment can be hierarchical, the stage is part of the env. 
• Composite 
• Configuration can be composed from smaller composites 
• Multi-sourced 
• Configuration can be provided by files, classpath resources, JNDI, 
systen/env properties, JNDI, preferences, databases, … 
• Multi-formatted 
• Properties, xml-properties, json and dialects, other formats 
-> Flexible and proven approaches 
-> But no common API!
Common Aspects of Existing Approaches (2) 
Java EE 
A draft to Java Configuration September 2014 
33 
• Mostly Xml based 
• Multiple locations 
• Mainly build time configuration only 
• Only few SPIs enable deploy time configuration 
• Administrative Resources are vendor specific 
• No standard for EE application configuration 
-> OK so far, but Cloud usage require more flexibility 
(deploy time configuration). 
-> Some aspects can be added from outside during appliance 
assembly
Review & Proposal 
How to go forward? 
A draft to Java Configuration September 2014 
34 
• Configuration is a classical Cross Cutting Concern 
• Problem Domain of Configuration is well known 
• Different Solutions already exist since long time 
• Nevertheless almost no standard exists in Java! 
• Java EE lacks of flexibility for several scenarios 
-> Proposal: Standardize Configuration Acess in ME/SE 
+ ME/SE targets all Java code 
+ EE can benefit as well, where useful 
-> … and, well, make EE more flexible
Configuration API for the Java Platform 
Proposal for Java ME/SE 
A draft to Java Configuration September 2014 
35
Configuration for the Java Platform 
SE JSR Proposal 
A draft to Java Configuration September 2014 
36 
• JSR based on SE 8, API also compatible with ME 8 
• RI & TCK based on SE 8 
• Defining a uniform model for Configuration Access 
• String key/value based PropertyProvider 
• Higher level API with functional extension points 
• Can be implemented by several configuration solutions 
• To be discussed (may be not in scope for first release): 
• Layering, Composites and Remote Configuration 
• Configuration changes, react/listen for Changes 
• SPIs for multiple formats, type adapters 
• Optionally also define integration semantics in CDI? 
• Keep the model minimalistic!
A Possible Configuration SE API (3) 
PropertyProvider 
A draft to Java Configuration September 2014 
37 
public interface PropertyProvider { 
default boolean containsKey(String key){…} 
default String get(String key); 
String getOrDefault(String key, String defValue){…} 
MetaInfo getMetaInfo(); 
Map<String, String> toMap(); 
default MutablePropertyProvider toMutableProvider(){…} 
default boolean isMutable(){ return false; } 
default void load(){} 
default boolean isEmpty(){…} 
default Set<String> keySet(){…} 
int size(); 
} 
PropertyProvider prov1 = 
PropertyProviders 
.of(“classpath*:META-INF/config-*.xml”); 
PropertyProvider prov1 = 
PropertyProviders.ofSystemPropertiesProvider(); 
PropertyProvider prov = PropertyProviders.ofUnion( 
AggregatioPolicy.OVERRIDE, prov1, prov2 
)
A Possible Configuration SE API (4) 
Configuration 
A draft to Java Configuration September 2014 
38 
public interface Configuration extends PropertyProvider{ 
default Boolean getBoolean(String key){… } 
default Boolean getBooleanOrDefault(String key, 
Boolean defaultValue){…} 
default Integer getInteger (String key){… } 
default Integer getIntegerOrDefault(String key, 
Integer defaultValue){…} 
… 
default <T> T getAdapted(String key, PropertyAdapter<T> adapter){…} 
default <T> T getAdaptedOrDefault(String key, 
PropertyAdapter<T> adapter, 
T defaultValue){…} 
Set<String> getAreas(); 
Set<String> getTransitiveAreas(); 
… 
default Configuration with(ConfigOperator operator){…} 
default <T> T query(ConfigQuery<T> query){…} 
void addConfigChangeListener(ConfigChangeListener l); 
void removeConfigChangeListener(ConfigChangeListener l); 
} 
Configuration config = 
ConfigurationManager 
.getConfiguration(“myProductConfig”); 
Annotation[] annots = …; 
Configuration config = 
ConfigurationManager.getConfiguration(annots);
A Possible Configuration SE API (2) 
Modelling the Environment 
A draft to Java Configuration September 2014 
39 
public interface Environment 
extends PropertyProvider{ 
Environment getParentEnvironment(); 
} 
Environmemt env = 
EnvironmentManager 
.getEnvironment(); 
Environmemt rootEnv = 
EnvironmentManager 
.getRootEnvironment(); 
Allows Environment to be hierarchized: 
- Root 
- System 
- Ear 
- App 
- Tenant 
- Session 
- Customer 
- …
A Possible Configuration SE API (5) 
Example: Configuration Population 
A draft to Java Configuration September 2014 
40 
@ConfiguredBean(”com.mycomp.mysolution.tenantAdress”) 
public final class MyTenant{ 
@Configured(updatedPolicy=UpdatePolicy.NEVER) 
private String name; 
@Configured 
private long customerId; 
@Configured({”privateAddress”, ”businessAdress”}) 
private String address; 
@ConfigChangeListener 
private void configChanged(ConfigChangeEvent evt){…} 
} 
MyTenant t = new MyTenant(); 
ConfigurationManager.configure(t);
An advanced Example 
What can we do so far? 
A draft to Java Configuration September 2014 
41 
Map<String,String> cfgMap = new HashMap<>(); 
cfgMap.put("a", "Adrian"); // overrides Anatole 
Configuration config = ConfigurationBuilder.of("myTestConfig") 
.addResources("classpath*:test.properties") 
.addPropertyProviders( 
AggregationPolicy.OVERRIDE, 
PropertyProviders.fromPaths("classpath:cfg/test.xml"), 
PropertyProviders.fromArgs(new String[]{"-arg1", "--fullarg", 
"fullValue", "-myflag"}), 
PropertyProviders.from(cfgMap)).build(); 
System.out.println(config); 
System.out.println(config.getAreas(s -> s.startsWith("another"))); 
PropertyProvider filtered = PropertyProviders.filterSet( 
(f) -> {return f.equals("a") || f.equals("b") || f.equals("c");}, 
config);
Summary 
A draft to Java Configuration September 2014 
42
Summary 
A draft to Java Configuration September 2014 
43 
• Make configuration a first class citizen in Java 
• Benefits are spread across the whole platform 
• Start modestly but design for the future 
• But is the vision reasonable…?
The Current State 
What happened so far? 
A draft to Java Configuration September 2014 
44 
• Java EE Configuration 
• Would mainly enable Java EE to be configurable 
• I would suggest only deploy/startup time configuration 
• Currently on hold (deferred) 
• Configuration for the Java Platform (next slide) 
• Would define the generic mechanism how 
configuration is modelled 
• Discussed as SE JSR, we need more support 
-> Discuss today at 16:00 at Sutter room in the Hilton Hotel !
A draft to Java Configuration September 2014 
Links 
Java.net Project: http://java.net/projects/javamconfig 
GitHub Project (early stage): https://github.com/java-config 
Twitter: @javaconfig 
Presentation of Mike Keith on JavaOne 2013: 
https://oracleus.activeevents.com/2013/connect/sessionDetail.ww?SESSIO 
N_ID=7755 
Apache Deltaspike: http://deltaspike.apache.org 
Java Config Builder: https://github.com/TNG/config-builder 
Apache Commons Configuration: 
http://commons.apache.org/proper/commons-configuration/ 
Jfig: http://jfig.sourceforge.net/ 
Carbon Configuration: 
http://carbon.sourceforge.net/modules/core/docs/config/Usage.html 
Comparison on Carbon and Others: http://www.mail-archive.com/commons-dev@ 
jakarta.apache.org/msg37597.html 
Spring Framework: http://projects.spring.io/spring-framework/ 
Owner: http://owner.aeonbits.org/ 
45
A draft to Java Configuration September 2014 
Q & A 
46
A draft to Java Configuration September 2014 
The End 
47
A draft to Java Configuration September 2014 48
Layering and Composites (1) 
Overview 
A draft to Java Configuration September 2014 
49 
• Systems are built on design layers, e.g. 
• Boot Runtime 
• Container Infrastructure 
• Components 
• API Adapters 
• … 
• Systems can be assembled using prebuilt modules or plugins 
• Configuration typically comes with override mechanisms, 
hardcoding them makes configuration logic unmaintainable and 
untestable
Layering and Composites (1) 
Possible Layers in a Complex Setup 
Tenant 
War 
Ear 
Tier 
Domain 
JVM 
Server Instance 
App Classpath Resources 
HttpServletRequest 
HttpSession 
Web.xml 
<alt-dd> 
Ear Classpath Resources 
<alt-dd> 
A draft to Java Configuration September 2014 
50 
OS/HW 
Web Application 
Enterprise 
Application 
System Domain 
OS/Runtime 
CLI arguments 
Environment Props 
System Properties 
System Classpath 
Resources 
Files
Layering and Composites (2) 
Mapping of Layers to Composites 
Tenant 
War 
Ear 
Tier 
Domain 
JVM 
Server Instance 
META-INF/**/*.xml} 
App Classpath Resources 
HttpServletRequest 
HttpSession 
Web.xml 
Tenant Config 
Web Config <alt-dd> 
Ear Classpath Resources 
<alt-dd> 
META-INF/**/*.xml} 
serverName=${CLI:serverName} 
jvmVersion=${SYSTEM:java.version} 
A draft to Java Configuration September 2014 
51 
OS/HW 
CLI arguments 
Environment Props 
System Properties 
System Classpath 
Resources 
Files 
Enterprise Config 
System Config 
META-INF/**/*.xml}
App Server VM 
Dynamic Provisioning 
Is it possible with Java EE ? 
EE Config 
App Server 
(SE Config) 
Read Deployment 
/App Config 
A draft to Java Configuration September 2014 
52 
Runtime Node 
Provisioning 
Controller 
Docker 
HW / OS 
Initial Setup 
• Create Java Appserver Node 
• Start the Server 
Dynamic Deployment 
• Install the artifacts 
• Deploy the artifacts 
• Read deployment and app 
configuration (remote) 
• Write status back to 
controller 
Reconfiguration 
• Restart the artifacts (deployment and 
app config will be reread), or 
• Only update the app configuration 
Undeployment 
• Undeploy the artifacts 
App1 App2 
Push- or Pull 
possible
EE Cfg sourced 
by SE Cfg + App Cfg 
Application 
EE Config CDI 
EE Runtime 
Combining SE and EE Configuration 
EE Cfg sourced 
by SE Config 
Application 
EE Config 
EE Cfg not active 
Application 
EE Config 
EE Runtime 
(SE Config) SE Config 
SE Runtime 
A draft to Java Configuration September 2014 
53 
SE, Config 
optional 
Application 
SE Runtime 
EE Runtime 
SE Runtime 
SE Config 
SE Runtime

Weitere ähnliche Inhalte

Was ist angesagt?

Big data: current technology scope.
Big data: current technology scope.Big data: current technology scope.
Big data: current technology scope.Roman Nikitchenko
 
Configuration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaConfiguration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaDmitry Kornilov
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowBruno Borges
 
.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15aminmesbahi
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling RewriterJustin Edelson
 
24 collections framework interview questions
24 collections framework interview questions24 collections framework interview questions
24 collections framework interview questionsArun Vasanth
 
What’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPWhat’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPChristopher Jones
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011Arun Gupta
 
How to train the jdt dragon
How to train the jdt dragonHow to train the jdt dragon
How to train the jdt dragonAyushman Jain
 
Java Code Generation for Productivity
Java Code Generation for ProductivityJava Code Generation for Productivity
Java Code Generation for ProductivityDavid Noble
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentationsourabh aggarwal
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 UpdateRyan Cuprak
 
Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)Trisha Gee
 
Advanced MySQL Replication Architectures - Luis Soares
Advanced MySQL Replication Architectures - Luis SoaresAdvanced MySQL Replication Architectures - Luis Soares
Advanced MySQL Replication Architectures - Luis SoaresMySQL Brasil
 

Was ist angesagt? (20)

Big data: current technology scope.
Big data: current technology scope.Big data: current technology scope.
Big data: current technology scope.
 
MySQL User Camp: GTIDs
MySQL User Camp: GTIDsMySQL User Camp: GTIDs
MySQL User Camp: GTIDs
 
Configuration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaConfiguration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and Tamaya
 
Hibernate
HibernateHibernate
Hibernate
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
 
.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling Rewriter
 
Hadoop 101
Hadoop 101Hadoop 101
Hadoop 101
 
24 collections framework interview questions
24 collections framework interview questions24 collections framework interview questions
24 collections framework interview questions
 
PHP Oracle
PHP OraclePHP Oracle
PHP Oracle
 
Spring 3.1
Spring 3.1Spring 3.1
Spring 3.1
 
What’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPWhat’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHP
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011
 
Java EE for the Cloud
Java EE for the CloudJava EE for the Cloud
Java EE for the Cloud
 
How to train the jdt dragon
How to train the jdt dragonHow to train the jdt dragon
How to train the jdt dragon
 
Java Code Generation for Productivity
Java Code Generation for ProductivityJava Code Generation for Productivity
Java Code Generation for Productivity
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
 
Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)
 
Advanced MySQL Replication Architectures - Luis Soares
Advanced MySQL Replication Architectures - Luis SoaresAdvanced MySQL Replication Architectures - Luis Soares
Advanced MySQL Replication Architectures - Luis Soares
 

Andere mochten auch

Web protocols for java developers
Web protocols for java developersWeb protocols for java developers
Web protocols for java developersPavel Bucek
 
Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Kile Niklawski
 
Introduction To NetBeans IDE
Introduction To NetBeans IDEIntroduction To NetBeans IDE
Introduction To NetBeans IDEMuhammad Ghazali
 
Adopt-a-JSR session (JSON-B/P)
Adopt-a-JSR session (JSON-B/P)Adopt-a-JSR session (JSON-B/P)
Adopt-a-JSR session (JSON-B/P)Dmitry Kornilov
 
Making Java REST with JAX-RS 2.0
Making Java REST with JAX-RS 2.0Making Java REST with JAX-RS 2.0
Making Java REST with JAX-RS 2.0Dmytro Chyzhykov
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reza Rahman
 
Adopt-a-jsr Mar 1 2017 JAX-RS update
Adopt-a-jsr Mar 1 2017 JAX-RS updateAdopt-a-jsr Mar 1 2017 JAX-RS update
Adopt-a-jsr Mar 1 2017 JAX-RS updatePavel Bucek
 
Java EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanJava EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanAlex Theedom
 

Andere mochten auch (8)

Web protocols for java developers
Web protocols for java developersWeb protocols for java developers
Web protocols for java developers
 
Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Java EE8 - by Kito Mann
Java EE8 - by Kito Mann
 
Introduction To NetBeans IDE
Introduction To NetBeans IDEIntroduction To NetBeans IDE
Introduction To NetBeans IDE
 
Adopt-a-JSR session (JSON-B/P)
Adopt-a-JSR session (JSON-B/P)Adopt-a-JSR session (JSON-B/P)
Adopt-a-JSR session (JSON-B/P)
 
Making Java REST with JAX-RS 2.0
Making Java REST with JAX-RS 2.0Making Java REST with JAX-RS 2.0
Making Java REST with JAX-RS 2.0
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!
 
Adopt-a-jsr Mar 1 2017 JAX-RS update
Adopt-a-jsr Mar 1 2017 JAX-RS updateAdopt-a-jsr Mar 1 2017 JAX-RS update
Adopt-a-jsr Mar 1 2017 JAX-RS update
 
Java EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanJava EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 Mean
 

Ähnlich wie A first Draft to Java Configuration

Spring 3.1: a Walking Tour
Spring 3.1: a Walking TourSpring 3.1: a Walking Tour
Spring 3.1: a Walking TourJoshua Long
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1Д. Ганаа
 
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptLecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptKalsoomTahir2
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionArun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerArun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGArun Gupta
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Rohit Kelapure
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)Daniel Bryant
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the HorizonJosh Juneau
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsmichaelaaron25322
 
Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Sam Brannen
 
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenSpring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenJAX London
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Arun Gupta
 
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesEdward Burns
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Skills Matter
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Arun Gupta
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Sam Brannen
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Arun Gupta
 

Ähnlich wie A first Draft to Java Configuration (20)

Spring 3.1: a Walking Tour
Spring 3.1: a Walking TourSpring 3.1: a Walking Tour
Spring 3.1: a Walking Tour
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1
 
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptLecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
 
Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011
 
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenSpring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
 
Advance java1.1
Advance java1.1Advance java1.1
Advance java1.1
 
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth Slides
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
 
JSF2
JSF2JSF2
JSF2
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
 

Mehr von Anatole Tresch

Jsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaJsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaAnatole Tresch
 
Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Anatole Tresch
 
The Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureThe Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureAnatole Tresch
 
The Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteThe Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteAnatole Tresch
 
Disruption is Change is Future
Disruption is Change is FutureDisruption is Change is Future
Disruption is Change is FutureAnatole Tresch
 
Configuration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaConfiguration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaAnatole Tresch
 
Alles Docker oder Was ?
Alles Docker oder Was ?Alles Docker oder Was ?
Alles Docker oder Was ?Anatole Tresch
 
Configure once, run everywhere 2016
Configure once, run everywhere 2016Configure once, run everywhere 2016
Configure once, run everywhere 2016Anatole Tresch
 
Wie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenWie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenAnatole Tresch
 
JSR 354 Hackday - What you can do...
JSR 354 Hackday - What you can do...JSR 354 Hackday - What you can do...
JSR 354 Hackday - What you can do...Anatole Tresch
 
Legacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseLegacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseAnatole Tresch
 
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Anatole Tresch
 
Go for the Money - JSR 354
Go for the Money - JSR 354Go for the Money - JSR 354
Go for the Money - JSR 354Anatole Tresch
 

Mehr von Anatole Tresch (17)

Jsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaJsr382: Konfiguration in Java
Jsr382: Konfiguration in Java
 
Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...
 
The Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureThe Gib Five - Modern IT Architecture
The Gib Five - Modern IT Architecture
 
The Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteThe Big Five - IT Architektur Heute
The Big Five - IT Architektur Heute
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
 
Disruption is Change is Future
Disruption is Change is FutureDisruption is Change is Future
Disruption is Change is Future
 
Configuration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaConfiguration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache Tamaya
 
Alles Docker oder Was ?
Alles Docker oder Was ?Alles Docker oder Was ?
Alles Docker oder Was ?
 
Going Resilient...
Going Resilient...Going Resilient...
Going Resilient...
 
Configure once, run everywhere 2016
Configure once, run everywhere 2016Configure once, run everywhere 2016
Configure once, run everywhere 2016
 
Wie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenWie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmen
 
JSR 354 Hackday - What you can do...
JSR 354 Hackday - What you can do...JSR 354 Hackday - What you can do...
JSR 354 Hackday - What you can do...
 
Legacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseLegacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the Enterprise
 
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
 
JSR 354 LJC-Hackday
JSR 354 LJC-HackdayJSR 354 LJC-Hackday
JSR 354 LJC-Hackday
 
Adopt JSR 354
Adopt JSR 354Adopt JSR 354
Adopt JSR 354
 
Go for the Money - JSR 354
Go for the Money - JSR 354Go for the Money - JSR 354
Go for the Money - JSR 354
 

Kürzlich hochgeladen

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Kürzlich hochgeladen (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

A first Draft to Java Configuration

  • 1. JavaOne 2014 An Draft for Java Configuration Configuration in SE and EE Anatole Tresch, Credit Suisse September 2014
  • 2. A draft to Java Configuration September 2014 Bio Anatole Tresch Consultant, Coach Credit Suisse Technical Coordinator & Architect Specification Lead JSR 354 Driving Configuration Twitter/Google+: @atsticks atsticks@java.net anatole.tresch@credit-suisse.com JUG Switzerland (Europe) Zurich Hackergarten 2
  • 3. A draft to Java Configuration September 2014 Agenda 3 Defining the Problem Use Cases Existing Approaches Java EE Java SE Outlook Configuration API for the Java Platform Summary
  • 4. Defining the Problem A draft to Java Configuration September 2014 4
  • 5. Defining the Problem What is configuration, anyway? A draft to Java Configuration September 2014 5 • Many different interested stakeholders • Many things to configure • Divergent views • Setup for a given server environment • Define the parameters of a runtime (staging, localization etc.) • Deployment descriptors • Technology-specific components (beans, wirings etc.) • Resource-specific settings (data sources, message queues etc.) • Scripting facility • Different granularities, varying levels of applicability • Different formats • …
  • 6. Use Cases A draft to Java Configuration September 2014 6
  • 7. Use Cases (1) A draft to Java Configuration September 2014 7 • Staging / Environment Dependent Configuration • Available to one or to all apps, simple to define and manage • Deployment Profiles (production, test, staging etc.) • Single application, but multiple deployments • Don’t want to rip open application for each deployment to add custom resources • Enable Product / Component Customization for COTS solutions • Manage your Configuration • Don’t require manual non-standard deployment tool to override or mess up the build for configuration assembly • Configuration Servers (files, shares, Maven Repo, …)
  • 8. Use Cases (2) A draft to Java Configuration September 2014 8 • Scoped configuration • Manage Visibility and Accessibility of Configuration – e.g. global/ear/app/tenant scope • Encrypt/protect entries • Flexible Configuration Access from any context • Service Location Based Singleton access (Java API), also needed for legacy integration • Injection, e.g. with CDI, @Inject
  • 9. Use Cases (3) A draft to Java Configuration September 2014 9 • Dynamic SaaS Tenant configuration / Multi Tenancy • Adding/Removing/Updating Tenants w/o restart • SaaS application uses an API to look up a given tenant configuration • Cloud • Wire a deployed application to multiple decoupled cloud services and vice versa • Life Update changes, e.g. due to dynamic provisioning and elasticity • Support Automatic Provisioning
  • 10. Use Cases (4) A draft to Java Configuration September 2014 10 • Support Single Layered Configuration • Standalone applications • Tests • Bootstrapping of Containers • Support Multi Layered Configuration • Java EE • Multi-Tenancy, SaaS • OSGI • JigSaw • …
  • 11. Use Cases (5) Advanced Use Cases A draft to Java Configuration September 2014 11 • Versioned configuration • Dependency on a specific configuration version • Clustering support • Node and cluster-based domain configurations • Security Constraints • Configuration Templates • Tool Support • Remote Updates
  • 12. Existing Approaches A draft to Java Configuration September 2014 12
  • 13. Existing Approaches Overview (likely uncomplete) A draft to Java Configuration September 2014 13 • Java EE • Spring • XML and annotations to configure Spring beans and overall behavior (PropertyResolver) • Apache Deltaspike • Configure CDI beans, injecting configuration • 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 • Apache Commons Configuration • JFig, Java Config Builder, Carbon • java.util.Preferences/Properties, java.util.ResourceBundle • In-House Solutions
  • 14. Existing Approaches (Java EE) JSR 339 JAX RS Runtime Delegate A draft to Java Configuration September 2014 14 Runtime Delegate = abstract factory class that provides various methods for the creation of objects that implement JAX-RS APIs : 1. A resource with the name of META-INF/ services/javax.ws.rs.ext.RuntimeDelegat e 2. ${java.home}/lib/jaxrs.properties exists and contains an entry javax.ws.rs.ext.RuntimeDelegate 3. System property javax.ws.rs.ext.RuntimeDelegate
  • 15. Existing Approaches (Java EE) JSR 352 Batch A draft to Java Configuration September 2014 15 META-INF/batch.xml META-INF/batch-jobs/… Support for substitutions within config files (though not explicit EL support), mostly for inter-operability within a deployment, but also supporting system properties.
  • 16. Existing Approaches (Java EE) JSR 338 JPA 2.1 A draft to Java Configuration September 2014 16 META-INF/persistence.xml JPA provides a metamodel javax.persistence. metamodel.MetaModel), but this is read-only. A customized javax.persistence.spi.PersistenceProvider, PersistenceProviderResolver can be registered using java.util.ServiceLoader.
  • 17. Existing Approaches (Java EE) JSR 342 Java EE 7 A draft to Java Configuration September 2014 17 META-INF/application.xml META-INF/MANIFEST.MF (Main-Class attribute) META-INF/application-client.xml Several configuration options, but no EL support, no dynamics (except alt-dd concept).
  • 18. Existing Approaches on EE JSR 345: EJB 3.2 Core A draft to Java Configuration September 2014 18 META-INF/ejb-jar.xml Use configurable Resource Connection Factories: <resource-ref> <description>…</description> <res-ref-name>jms/qConnFactory</res-ref-name> <res-type>javax.jms.QueueConnectionFactory</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Unshareable</res-sharing-scope> </resource-ref>
  • 19. Existing Approaches on EE JSR 346: CDI 1.2 A draft to Java Configuration September 2014 19 META-INF/beans.xml META-INF/services/javax.enterprise.inject.spi.Extension CDI Extensions • Allow to change the CDI Model during deployment • Add/remove beans • Add/remove interceptors • Add/remove decorators • Customize Injections, Events • …
  • 20. Existing Approaches on EE JSR 349: Bean Validation 1.1; JSR 344: JSF 2.2 A draft to Java Configuration September 2014 20 Bean Validation META-INF/validation.xml META-INF/services/javax.enterprise.inject.spi.Extension ConstraintValidatorFactory, MessageInterpolator, ParameterNameProvider or TraversableResolver can be configured.
  • 21. Existing Approaches on EE JSF A draft to Java Configuration September 2014 21 • javax.faces.application.ApplicationConfigurationPopul ator -> This class defines a java.util.ServiceLoader service which enables programmatic configuration of the JSF runtime (XML Document) using the existing Application Configuration Resources schema.
  • 22. Existing Approaches on EE Overview A draft to Java Configuration September 2014 22 • Deployment Descriptors • Standardized: web.xml, persistence.xml, ejb-jar.xml, beans.xml • Vendor-specific: mostly administrative resources • <alt-dd> feature (see http://tomee.apache.org/alternate-descriptors.html) • JSF Stages (Development,Production,SystemTest,UnitTest) • JNDI Tree -> configuration must be known at build time! -> No support for dynamic placeholders, e.g. using EL expressions -> Despite CDI, JSF and Bean Validation not much support for deployment time configuration.
  • 23. Existing Approaches (Java SE) A draft to Java Configuration September 2014 23
  • 24. Existing Approaches Java SE (1) Spring PropertyResolver A draft to Java Configuration September 2014 24 application.properties appl.name=My Web Application appl.home=/Users/webapp/applicat ion/ db.driver=org.hsqldb.jdbcDriver db.name=v8max.db db.url=jdbc:hsqldb:file://${appl .home}/ database/${db.name} db.user=SA db.pass= <bean id="applicationProperties" class="org.springframework.beans.factory.config. PropertyPlaceholderConfigurer"> <property name="location" value="classpath:application.properties"/> </bean> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="${db.driver}"/> <property name="url" value="${db.url}"/> <property name="username" value="${db.user}"/> <property name="password" value="${db.pass}"/> </bean> … and you can write your own PropertySource/ PropertyPlaceHolder !
  • 25. Existing Approaches Java SE (2) Apache Deltaspike Configuration ConfigResolver * ConfigSource A draft to Java Configuration September 2014 25 application.properties appl.name=My Web Application appl.home=/Users/webapp/application/ db.driver=org.hsqldb.jdbcDriver db.name=v8max.db db.url=jdbc:hsqldb:file://${appl.hom e}/ database/${db.name} db.user=SA db.pass= public class MyCustomPropertyFileConfig implements PropertyFileConfig { @Override public String getPropertyFileName() { return “application.properties"; } } @ApplicationScoped public class SomeRandomService { @Inject @ConfigProperty(name = "endpoint.poll.interval") private Integer pollInterval; @Inject @ConfigProperty(name = "endpoint.poll.servername") private String pollUrl; ... }
  • 26. Existing Approaches Java SE (3) Apache Commons Configuration A draft to Java Configuration September 2014 26 application.properties appl.name=My Web Application appl.home=/Users/webapp/applica tion/ db.driver=org.hsqldb.jdbcDriver db.name=v8max.db db.url=jdbc:hsqldb:file://${app l.home}/ database/${db.name} db.user=SA db.pass= Configuration config = new PropertiesConfiguration(“application.properties"); String dbUrl = config.getString(“db.url")); …
  • 27. Existing Approaches Java SE (4) ConfigBuilder (1) A draft to Java Configuration September 2014 27 @PropertiesFiles("config") // "config.properties", "config.<hostname>.properties", etc. @PropertyLocations(directories = {"/home/user"}, contextClassLoader = true) @PropertySuffixes(extraSuffixes = {"tngtech","myname"}, hostNames = true) public class MyBean{ public static class StringToPidFixTransformer implements TypeTransformer<String,PidFix> { @Override public PidFix transform(String input) { ... } } @DefaultValue("false") // values are automatically be converted to primitive types @CommandLineValue(shortOpt="t", longOpt="test", hasArg=false) // flag arg. private boolean runInTestMode; @DefaultValue("3") @CommandLineValue(shortOpt="rl", longOpt="runLevel", hasArg=true) private int runLevel; @EnvironmentVariableValue("PATH") @PropertyValue("path") // maps to the key "path" in the properties file private String path;
  • 28. Existing Approaches Java SE (4) ConfigBuilder (2) A draft to Java Configuration September 2014 28 @SystemPropertyValue("user.name") // maps to field "user.name" in sys props @NotEmpty("username.notEmpty") // JSR-303 validation private String userName; @TypeTransformers(StringToPidFixTransformer.class) @CommandLineValue(shortOpt="pc", longOpt="pidFixCollection", hasArg=true) private Collection<PidFix> pidFixCollection; @TypeTransformers(StringToPidFixTransformer.class) @CommandLineValue(shortOpt="p", longOpt="pidFix", hasArg=true) private PidFix pidFix; @Validation private void validate() { ... } ... }
  • 29. Existing Approaches Java SE (3) Owner public interface Application extends Config { String name(); String home(); String driver(); String name(); URL url(); @DefaultValue("myDB") String database(); @Key("db.user"); String user(); @Key("db.pass"); String pass(); } A draft to Java Configuration September 2014 29 application.properties name=My Web Application home=/Users/webapp/application/ driver=org.hsqldb.jdbcDriver name=v8max.db url=jdbc:hsqldb:file://${appl.h ome}/ database=${db.name} db.user=SA db.pass= ServerConfig cfg = ConfigFactory.create(ServerConfig.class); System.out.println(cfg.name()); …
  • 30. Existing Approaches Java SE (5) JFig A draft to Java Configuration September 2014 30 application.xml <configuration> <section name=“app1"> <entry key=“name" value=“My Web Application"/> … </section> <section name=“db"> <entry key=“driver" value="org.hsqldb.jdbcDriver" /> <entry key=“name" value="v8max.db" /> <entry key=“url" value="db.url=jdbc:hsqldb:file://${appl.home}/ database/${db.name}" /> <entry key=“user" value=“SA" /> <entry key=“pass" /> </section> </configuration> java –Dconfig.filename=application.xml <yourClassName> JFig.initialize(); String dbDriver = JFig.getInstance().getValue(“db”, “driver”); String dnBame = JFig.getInstance().getValue(“db”, “name”); …
  • 31. A draft to Java Configuration September 2014 Outlook 31
  • 32. Common Aspects of Existing Approaches (1) Java SE A draft to Java Configuration September 2014 32 • Key/value based • Basically all relevant solutions are based on simple key/value pairs (most of the based on Strings only) • Environment dependent (contextual) • The Environment can be hierarchical, the stage is part of the env. • Composite • Configuration can be composed from smaller composites • Multi-sourced • Configuration can be provided by files, classpath resources, JNDI, systen/env properties, JNDI, preferences, databases, … • Multi-formatted • Properties, xml-properties, json and dialects, other formats -> Flexible and proven approaches -> But no common API!
  • 33. Common Aspects of Existing Approaches (2) Java EE A draft to Java Configuration September 2014 33 • Mostly Xml based • Multiple locations • Mainly build time configuration only • Only few SPIs enable deploy time configuration • Administrative Resources are vendor specific • No standard for EE application configuration -> OK so far, but Cloud usage require more flexibility (deploy time configuration). -> Some aspects can be added from outside during appliance assembly
  • 34. Review & Proposal How to go forward? A draft to Java Configuration September 2014 34 • Configuration is a classical Cross Cutting Concern • Problem Domain of Configuration is well known • Different Solutions already exist since long time • Nevertheless almost no standard exists in Java! • Java EE lacks of flexibility for several scenarios -> Proposal: Standardize Configuration Acess in ME/SE + ME/SE targets all Java code + EE can benefit as well, where useful -> … and, well, make EE more flexible
  • 35. Configuration API for the Java Platform Proposal for Java ME/SE A draft to Java Configuration September 2014 35
  • 36. Configuration for the Java Platform SE JSR Proposal A draft to Java Configuration September 2014 36 • JSR based on SE 8, API also compatible with ME 8 • RI & TCK based on SE 8 • Defining a uniform model for Configuration Access • String key/value based PropertyProvider • Higher level API with functional extension points • Can be implemented by several configuration solutions • To be discussed (may be not in scope for first release): • Layering, Composites and Remote Configuration • Configuration changes, react/listen for Changes • SPIs for multiple formats, type adapters • Optionally also define integration semantics in CDI? • Keep the model minimalistic!
  • 37. A Possible Configuration SE API (3) PropertyProvider A draft to Java Configuration September 2014 37 public interface PropertyProvider { default boolean containsKey(String key){…} default String get(String key); String getOrDefault(String key, String defValue){…} MetaInfo getMetaInfo(); Map<String, String> toMap(); default MutablePropertyProvider toMutableProvider(){…} default boolean isMutable(){ return false; } default void load(){} default boolean isEmpty(){…} default Set<String> keySet(){…} int size(); } PropertyProvider prov1 = PropertyProviders .of(“classpath*:META-INF/config-*.xml”); PropertyProvider prov1 = PropertyProviders.ofSystemPropertiesProvider(); PropertyProvider prov = PropertyProviders.ofUnion( AggregatioPolicy.OVERRIDE, prov1, prov2 )
  • 38. A Possible Configuration SE API (4) Configuration A draft to Java Configuration September 2014 38 public interface Configuration extends PropertyProvider{ default Boolean getBoolean(String key){… } default Boolean getBooleanOrDefault(String key, Boolean defaultValue){…} default Integer getInteger (String key){… } default Integer getIntegerOrDefault(String key, Integer defaultValue){…} … default <T> T getAdapted(String key, PropertyAdapter<T> adapter){…} default <T> T getAdaptedOrDefault(String key, PropertyAdapter<T> adapter, T defaultValue){…} Set<String> getAreas(); Set<String> getTransitiveAreas(); … default Configuration with(ConfigOperator operator){…} default <T> T query(ConfigQuery<T> query){…} void addConfigChangeListener(ConfigChangeListener l); void removeConfigChangeListener(ConfigChangeListener l); } Configuration config = ConfigurationManager .getConfiguration(“myProductConfig”); Annotation[] annots = …; Configuration config = ConfigurationManager.getConfiguration(annots);
  • 39. A Possible Configuration SE API (2) Modelling the Environment A draft to Java Configuration September 2014 39 public interface Environment extends PropertyProvider{ Environment getParentEnvironment(); } Environmemt env = EnvironmentManager .getEnvironment(); Environmemt rootEnv = EnvironmentManager .getRootEnvironment(); Allows Environment to be hierarchized: - Root - System - Ear - App - Tenant - Session - Customer - …
  • 40. A Possible Configuration SE API (5) Example: Configuration Population A draft to Java Configuration September 2014 40 @ConfiguredBean(”com.mycomp.mysolution.tenantAdress”) public final class MyTenant{ @Configured(updatedPolicy=UpdatePolicy.NEVER) private String name; @Configured private long customerId; @Configured({”privateAddress”, ”businessAdress”}) private String address; @ConfigChangeListener private void configChanged(ConfigChangeEvent evt){…} } MyTenant t = new MyTenant(); ConfigurationManager.configure(t);
  • 41. An advanced Example What can we do so far? A draft to Java Configuration September 2014 41 Map<String,String> cfgMap = new HashMap<>(); cfgMap.put("a", "Adrian"); // overrides Anatole Configuration config = ConfigurationBuilder.of("myTestConfig") .addResources("classpath*:test.properties") .addPropertyProviders( AggregationPolicy.OVERRIDE, PropertyProviders.fromPaths("classpath:cfg/test.xml"), PropertyProviders.fromArgs(new String[]{"-arg1", "--fullarg", "fullValue", "-myflag"}), PropertyProviders.from(cfgMap)).build(); System.out.println(config); System.out.println(config.getAreas(s -> s.startsWith("another"))); PropertyProvider filtered = PropertyProviders.filterSet( (f) -> {return f.equals("a") || f.equals("b") || f.equals("c");}, config);
  • 42. Summary A draft to Java Configuration September 2014 42
  • 43. Summary A draft to Java Configuration September 2014 43 • Make configuration a first class citizen in Java • Benefits are spread across the whole platform • Start modestly but design for the future • But is the vision reasonable…?
  • 44. The Current State What happened so far? A draft to Java Configuration September 2014 44 • Java EE Configuration • Would mainly enable Java EE to be configurable • I would suggest only deploy/startup time configuration • Currently on hold (deferred) • Configuration for the Java Platform (next slide) • Would define the generic mechanism how configuration is modelled • Discussed as SE JSR, we need more support -> Discuss today at 16:00 at Sutter room in the Hilton Hotel !
  • 45. A draft to Java Configuration September 2014 Links Java.net Project: http://java.net/projects/javamconfig GitHub Project (early stage): https://github.com/java-config Twitter: @javaconfig Presentation of Mike Keith on JavaOne 2013: https://oracleus.activeevents.com/2013/connect/sessionDetail.ww?SESSIO N_ID=7755 Apache Deltaspike: http://deltaspike.apache.org Java Config Builder: https://github.com/TNG/config-builder Apache Commons Configuration: http://commons.apache.org/proper/commons-configuration/ Jfig: http://jfig.sourceforge.net/ Carbon Configuration: http://carbon.sourceforge.net/modules/core/docs/config/Usage.html Comparison on Carbon and Others: http://www.mail-archive.com/commons-dev@ jakarta.apache.org/msg37597.html Spring Framework: http://projects.spring.io/spring-framework/ Owner: http://owner.aeonbits.org/ 45
  • 46. A draft to Java Configuration September 2014 Q & A 46
  • 47. A draft to Java Configuration September 2014 The End 47
  • 48. A draft to Java Configuration September 2014 48
  • 49. Layering and Composites (1) Overview A draft to Java Configuration September 2014 49 • Systems are built on design layers, e.g. • Boot Runtime • Container Infrastructure • Components • API Adapters • … • Systems can be assembled using prebuilt modules or plugins • Configuration typically comes with override mechanisms, hardcoding them makes configuration logic unmaintainable and untestable
  • 50. Layering and Composites (1) Possible Layers in a Complex Setup Tenant War Ear Tier Domain JVM Server Instance App Classpath Resources HttpServletRequest HttpSession Web.xml <alt-dd> Ear Classpath Resources <alt-dd> A draft to Java Configuration September 2014 50 OS/HW Web Application Enterprise Application System Domain OS/Runtime CLI arguments Environment Props System Properties System Classpath Resources Files
  • 51. Layering and Composites (2) Mapping of Layers to Composites Tenant War Ear Tier Domain JVM Server Instance META-INF/**/*.xml} App Classpath Resources HttpServletRequest HttpSession Web.xml Tenant Config Web Config <alt-dd> Ear Classpath Resources <alt-dd> META-INF/**/*.xml} serverName=${CLI:serverName} jvmVersion=${SYSTEM:java.version} A draft to Java Configuration September 2014 51 OS/HW CLI arguments Environment Props System Properties System Classpath Resources Files Enterprise Config System Config META-INF/**/*.xml}
  • 52. App Server VM Dynamic Provisioning Is it possible with Java EE ? EE Config App Server (SE Config) Read Deployment /App Config A draft to Java Configuration September 2014 52 Runtime Node Provisioning Controller Docker HW / OS Initial Setup • Create Java Appserver Node • Start the Server Dynamic Deployment • Install the artifacts • Deploy the artifacts • Read deployment and app configuration (remote) • Write status back to controller Reconfiguration • Restart the artifacts (deployment and app config will be reread), or • Only update the app configuration Undeployment • Undeploy the artifacts App1 App2 Push- or Pull possible
  • 53. EE Cfg sourced by SE Cfg + App Cfg Application EE Config CDI EE Runtime Combining SE and EE Configuration EE Cfg sourced by SE Config Application EE Config EE Cfg not active Application EE Config EE Runtime (SE Config) SE Config SE Runtime A draft to Java Configuration September 2014 53 SE, Config optional Application SE Runtime EE Runtime SE Runtime SE Config SE Runtime

Hinweis der Redaktion

  1. Scopes erklären am Ende!