DeltaSpike Configuration TomEE Integration

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Categories

Categories

Apache TomEE Container Application Servers Configuration Application Layer Libs config
GroupId

GroupId

com.github.rmannibucau
ArtifactId

ArtifactId

deltaspike-configuration-tomee
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

DeltaSpike Configuration TomEE Integration
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Source Code Management

Source Code Management

https://github.com/rmannibucau/deltaspike-configuration-tomee.git

Download deltaspike-configuration-tomee

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.rmannibucau/deltaspike-configuration-tomee/ -->
<dependency>
    <groupId>com.github.rmannibucau</groupId>
    <artifactId>deltaspike-configuration-tomee</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.rmannibucau/deltaspike-configuration-tomee/
implementation 'com.github.rmannibucau:deltaspike-configuration-tomee:1.0.0'
// https://jarcasting.com/artifacts/com.github.rmannibucau/deltaspike-configuration-tomee/
implementation ("com.github.rmannibucau:deltaspike-configuration-tomee:1.0.0")
'com.github.rmannibucau:deltaspike-configuration-tomee:jar:1.0.0'
<dependency org="com.github.rmannibucau" name="deltaspike-configuration-tomee" rev="1.0.0">
  <artifact name="deltaspike-configuration-tomee" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.rmannibucau', module='deltaspike-configuration-tomee', version='1.0.0')
)
libraryDependencies += "com.github.rmannibucau" % "deltaspike-configuration-tomee" % "1.0.0"
[com.github.rmannibucau/deltaspike-configuration-tomee "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.apache.deltaspike.core : deltaspike-core-api jar 1.5.1

provided (1)

Group / Artifact Type Version
org.apache.openejb : openejb-core jar 4.7.2

test (2)

Group / Artifact Type Version
org.apache.deltaspike.core : deltaspike-core-impl jar 1.5.1
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

DeltaSpike Configuration TomEE Integration

DeltaSpike Configuration is a nice and elegant API to configure a CDI application.

However running in TomEE you will probably miss the integration with TomEE org.apache.openejb.cipher.PasswordCipher which provides a way to cipher password and sensitive data.

This module brings it up back to DeltaSpike using DeltaSpike org.apache.deltaspike.core.spi.config.ConfigFilter API to wire all available PasswordCipher of the application and the container registered using the standard mecanism (META-INF/org.apache.openejb.resource.jdbc.PasswordCipher/<cipher name>).

It also supports inline qualified name for ciphers not having this SPI file.

Dependency

<dependency>
  <groupId>com.github.rmannibucau</groupId>
  <artifactId>deltaspike-configuration-tomee</artifactId>
  <version>1.0.0</version>
  <scope>provided</scope>
</dependency>

Usage

You can set in deltaspike configuration registry (system properties, META-INF/apache-deltaspike.properties, ${tomee.base}/conf/system.properties…​) the value you want encoded and prefixed with cipher:<algorithm or fully qualified class>:<encoded value>.

For instance:

cipher:Static3DES:qrxDWArrKEU=

or

cipher:org.apache.openejb.cipher.StaticDESPasswordCipher:qrxDWArrKEU=

Will let you get injected the value openejb.

Note
default values are not deciphered so you can’t use this mecanism (which is generally fine, we rarely hardcode sensitive data).

Versions

Version
1.0.0