Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#481] move spring dep to only hyperjaxb, upgrade spring #489

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions hyperjaxb/ejb/plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-plugins-tools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>hyperjaxb3-ejb-roundtrip</artifactId>
Expand Down Expand Up @@ -62,18 +70,10 @@
<groupId>org.glassfish.jaxb</groupId>
<artifactId>xsom</artifactId>
</dependency>
<!--dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
</dependency-->
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.jvnet.jaxb.plugin.spring;

import com.sun.tools.xjc.BadCommandLineException;
import com.sun.tools.xjc.Options;
import com.sun.tools.xjc.outline.Outline;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Expand All @@ -8,10 +11,6 @@
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.sun.tools.xjc.BadCommandLineException;
import com.sun.tools.xjc.Options;
import com.sun.tools.xjc.outline.Outline;

public abstract class AbstractSpringConfigurablePlugin extends
AbstractParameterizablePlugin {

Expand Down
6 changes: 3 additions & 3 deletions hyperjaxb/ejb/samples/customerservice-cxf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>3.0.1.RELEASE</version>
<version>6.1.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.0.1.RELEASE</version>
<version>6.1.3</version>
</dependency>
<!-- Apache CXF -->
<dependency>
Expand Down Expand Up @@ -105,7 +105,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.0.1.RELEASE</version>
<version>6.1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.example.customerservice.service;

import org.springframework.orm.jpa.support.JpaDaoSupport;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

Expand All @@ -10,23 +11,24 @@
import com.example.customerservice.service.NoSuchCustomerException;

@Transactional
public class CustomerServiceImpl extends JpaDaoSupport implements
CustomerService {
public class CustomerServiceImpl implements CustomerService {

@PersistenceContext
protected EntityManager theEntityManager;

@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public void deleteCustomerById(final Integer customerId)
throws NoSuchCustomerException {

final Customer customer = getCustomerById(customerId);
getJpaTemplate().remove(customer);
theEntityManager.remove(customer);
}

@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Customer getCustomerById(final Integer customerId)
throws NoSuchCustomerException {

final Customer customer = getJpaTemplate().find(Customer.class,
customerId);
final Customer customer = theEntityManager.find(Customer.class, customerId);

if (customer == null) {
NoSuchCustomer noSuchCustomer = new NoSuchCustomer();
Expand All @@ -42,7 +44,7 @@ public Customer getCustomerById(final Integer customerId)

@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public Integer updateCustomer(Customer customer) {
final Customer mergedCustomer = getJpaTemplate().merge(customer);
final Customer mergedCustomer = theEntityManager.merge(customer);
return mergedCustomer.getCustomerId();
}

Expand Down
4 changes: 2 additions & 2 deletions hyperjaxb/ejb/samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</modules>
<profiles>
<profile>
<id>jdk-11+</id>
<id>jdk-17+</id>
<activation>
<jdk>[11,)</jdk>
<jdk>[17,)</jdk>
</activation>
<modules>
<module>customerservice-cxf</module>
Expand Down
5 changes: 0 additions & 5 deletions jaxb-plugins-parent/jaxb-plugins-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,5 @@
<artifactId>angus-activation</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
13 changes: 9 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<joda-time.version>2.5</joda-time.version>
<junit4.version>4.13.2</junit4.version>
<slf4j.version>1.7.36</slf4j.version>
<spring.version>5.3.31</spring.version>
<stax-ex.version>1.8.3</stax-ex.version>
<plexus-build-api.version>1.2.0</plexus-build-api.version>
<plexus-utils.version>3.5.1</plexus-utils.version>
Expand Down Expand Up @@ -376,13 +377,17 @@
<version>${slf4j.version}</version>
</dependency>

<!-- Spring -->
<!-- Spring in Hibernate -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0.7</version>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>

<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
Expand Down
Loading