vraptor-hibernate

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

License

License

Categories

Categories

Hibernate Data ORM
GroupId

GroupId

br.com.caelum.vraptor
ArtifactId

ArtifactId

vraptor-hibernate
Last Version

Last Version

4.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

vraptor-hibernate
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Project URL

Project URL

http://maven.apache.org
Project Organization

Project Organization

Caelum
Source Code Management

Source Code Management

http://github.com/caelum/vraptor-hibernate

Download vraptor-hibernate

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
org.hibernate : hibernate-core jar 5.2.9.Final
br.com.caelum : vraptor jar 4.2.0-RC5
javax.enterprise : cdi-api jar 1.1

provided (1)

Group / Artifact Type Version
org.mortbay.jetty : servlet-api jar 3.0.20100224

test (5)

Group / Artifact Type Version
junit : junit jar 4.10
org.mockito : mockito-core jar 1.8.5
org.hamcrest : hamcrest-core jar 1.2
org.hamcrest : hamcrest-library jar 1.2
hsqldb : hsqldb jar 1.8.0.10

Project Modules

There are no modules declared in this project.

VRaptor Hibernate Plugin

Build status

VRaptor Hibernate Plugin provides support to use with Hibernate 4.

How to install?

You only need to copy the jar to your classpath. VRaptor will register plugin when your application starts without any configurations. Downloads are available in downloads area or in Maven Repository:

<dependency>
  <groupId>br.com.caelum.vraptor</groupId>
  <artifactId>vraptor-hibernate</artifactId>
  <version>4.0.0.Final</version> <!-- or the latest version -->
</dependency>

Transactional Control

The default behavior is that each request will have a transaction available.

If you want, you can enable a decorator to change this behavior.

When enabled, it will open transactions only for methods with @Transactional annotation.

To do that you just need to add the follow content into your project's beans.xml:

<decorators>
    <class>br.com.caelum.vraptor.hibernate.TransactionDecorator</class>
</decorators>

Extra Configurations

If you want to add some custom configuration in org.hibernate.cfg.Configuration, extend the br.com.caelum.vraptor.hibernate.ConfigurationCreator class and override the protected void extraConfigurations(Configuration configuration) method. You need to annotate your extended class with @Specializes annotation.

@Specializes
public class MyConfigurationCreator extends ConfigurationCreator {
	@Override
	protected void extraConfigurations(Configuration configuration) {
		configuration.setInterceptor(new MyHibernateInterceptor());
	}
}
br.com.caelum.vraptor

Caelum

Versions

Version
4.1.0
4.0.4
4.0.3
4.0.2
4.0.0.Final
4.0.0-RC2
1.0.1
1.0.0