microBean JPA CDI

Tools for using JPA in CDI.

License

License

GroupId

GroupId

org.microbean
ArtifactId

ArtifactId

microbean-jpa-cdi
Last Version

Last Version

0.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

microBean JPA CDI
Tools for using JPA in CDI.
Project URL

Project URL

https://microbean.github.io/microbean-jpa-cdi
Project Organization

Project Organization

microBean
Source Code Management

Source Code Management

https://github.com/microbean/microbean-jpa-cdi/

Download microbean-jpa-cdi

How to add to project

<!-- https://jarcasting.com/artifacts/org.microbean/microbean-jpa-cdi/ -->
<dependency>
    <groupId>org.microbean</groupId>
    <artifactId>microbean-jpa-cdi</artifactId>
    <version>0.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.microbean/microbean-jpa-cdi/
implementation 'org.microbean:microbean-jpa-cdi:0.4.1'
// https://jarcasting.com/artifacts/org.microbean/microbean-jpa-cdi/
implementation ("org.microbean:microbean-jpa-cdi:0.4.1")
'org.microbean:microbean-jpa-cdi:jar:0.4.1'
<dependency org="org.microbean" name="microbean-jpa-cdi" rev="0.4.1">
  <artifact name="microbean-jpa-cdi" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.microbean', module='microbean-jpa-cdi', version='0.4.1')
)
libraryDependencies += "org.microbean" % "microbean-jpa-cdi" % "0.4.1"
[org.microbean/microbean-jpa-cdi "0.4.1"]

Dependencies

provided (3)

Group / Artifact Type Version
javax.persistence : javax.persistence-api jar 2.2
javax.transaction : javax.transaction-api jar 1.2
org.microbean : microbean-base-specification pom 0.4.5

test (8)

Group / Artifact Type Version
com.h2database : h2 jar 1.4.197
junit : junit jar 4.12
org.eclipse.persistence : org.eclipse.persistence.jpa jar 2.7.3
org.microbean : microbean-weld-se-environment pom 0.5.3
org.microbean : microbean-datasource-cdi-hikaricp jar 0.1.4
org.jboss.weld.module : weld-jta jar
org.microbean : microbean-narayana-jta-weld-se jar 0.2.3
org.yaml : snakeyaml jar 1.24

Project Modules

There are no modules declared in this project.

microBean JPA CDI Extension

Build Status Maven Central

The microBean JPA CDI Extension brings JPA to CDI.

If you are programming in an environment that already has JPA, such as a Java EE application server, then this extension is not for you.

If you are writing a Java SE program using CDI, then this extension may very well be for you.

In terms of end-user-observable effects, this extension allows you to do the following:

public class MyCDIBean {

  @PersistenceContext(unitName = "dev")
  private EntityManager em;

}

That is, you can inject an EntityManager as though your CDI-based standalone Java SE program were in fact a Java EE application server (at least with respect to JPA).

This extension jumps through a few hoops to ensure that everything is done as properly as possible.

Specifically, any DataSources behind the scenes are sourced from CDI itself as just regular CDI beans. Additionally, if your CDI implementation has transactional support, this extension will leverage it. Yes, that means your persistence.xml can specify transactional data sources.

This extension is often used in conjunction with the microBean JPA Weld SE Extension, the microBean Narayana JTA CDI Extension project and its Weld variant, and the microBean DataSource CDI HikariCP Extension.

org.microbean

microBean™

At the intersection of Java, Kubernetes and the enterprise.

Versions

Version
0.4.1
0.4.0
0.3.0
0.2.1
0.2.0
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4