Skip to content
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<annotation-api.version>2.1.1</annotation-api.version>
<ejb-api.version>4.0.1</ejb-api.version>
<inject-api.version>2.0.1</inject-api.version>
<osgi.import>com.alibaba.druid.pool.*;resolution:=optional,com.zaxxer.hikari.*;resolution:=optional,com.mchange.v2.c3p0.*;resolution:=optional,org.apache.commons.dbcp2.*;resolution:=optional,javax.transaction.*;resolution:=optional</osgi.import>
<osgi.import>com.alibaba.druid.pool.*;resolution:=optional,com.zaxxer.hikari.*;resolution:=optional,com.mchange.v2.c3p0.*;resolution:=optional,org.apache.commons.dbcp2.*;resolution:=optional,jakarta.transaction.*;resolution:=optional</osgi.import>
<spotbugs.omitVisitors>UnreadFields</spotbugs.omitVisitors>
<module.name>org.mybatis.guice</module.name>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2022 the original author or authors.
* Copyright 2009-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -100,7 +100,7 @@
boolean rollbackOnly() default false;

//
// from javax.transaction.Transactional
// from jakarta.transaction.Transactional
//

/**
Expand Down
4 changes: 2 additions & 2 deletions src/site/xdoc/core.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2009-2022 the original author or authors.
Copyright 2009-2023 the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,7 +30,7 @@
<p>
Core components are contained in the <i>org.mybatis.guice.*</i>
package, providing a set of reusable Google Guice
<i>javax.inject.Provider</i>s and
<i>jakarta.inject.Provider</i>s and
<i>com.google.inject.Module</i>s that
alleviate users the task to create MyBatis objects.
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/site/xdoc/datasources.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2009-2022 the original author or authors.
Copyright 2009-2023 the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,7 @@

<p>
<i>Configurable</i> means that users are free to bind
<code>javax.inject.Named</code> Data Source properties
<code>jakarta.inject.Named</code> Data Source properties
and let Guice injects them.
</p>
<p>
Expand Down
8 changes: 4 additions & 4 deletions src/site/xdoc/datasources/dbcp.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2009-2022 the original author or authors.
Copyright 2009-2023 the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -420,7 +420,7 @@
</table>
<p>
Since all these settings can't be easily covered using
<code>javax.inject.Named</code> annotations,
<code>jakarta.inject.Named</code> annotations,
and we don't want to put a limit on how users can retrieve these
informations, the library provides the
<code>org.mybatis.guice.datasource.dbcp.PerUserPoolDataSourceModule</code>
Expand All @@ -436,8 +436,8 @@
Let's take a look at an example that shows how to set the
<code>perUserDefaultAutoCommit</code> properties; first of all,
let's implement the provider that communicates the user bindings:
<source><![CDATA[import javax.inject.Provider;
import javax.inject.Named;
<source><![CDATA[import jakarta.inject.Provider;
import jakarta.inject.Named;

class MyPerUserDefaultAutoCommit implements Provider<Map<String, Boolean>> {

Expand Down
6 changes: 3 additions & 3 deletions src/site/xdoc/jta.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2009-2022 the original author or authors.
Copyright 2009-2023 the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,7 +51,7 @@

<section name="Configuring TransactionManager">
<p>
<i>org.mybatis.guice.MyBatisJtaModule</i> requires an instance of <i>javax.transaction.TransactionManager</i>.
<i>org.mybatis.guice.MyBatisJtaModule</i> requires an instance of <i>jakarta.transaction.TransactionManager</i>.
Here is some examples on how to obtain such an instance.
</p>
<subsection name="JavaEE 7 or CDI">
Expand All @@ -68,7 +68,7 @@ TransactionManager tm = bundleContext.getService(reference);]]></source>
</subsection>
<subsection name="OSGi service from OSGi Enterprise Editon using lookup">
<source><![CDATA[InitialContext initCtx = new InitialContext();
String txName = "osgi:service/javax.transaction.TransactionManager"
String txName = "osgi:service/jakarta.transaction.TransactionManager"
TransactionManager tm = (TransactionManager) initCtx.lookup(txName);]]></source>
</subsection>
<subsection name="OSGi Dynamic Service SCR annotation">
Expand Down
4 changes: 2 additions & 2 deletions src/site/xdoc/transactional.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2009-2022 the original author or authors.
Copyright 2009-2023 the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -116,7 +116,7 @@ FooDAO fooDAO = injector.getInstance(FooDAO.class);]]></source>
Where <code>FooDAO</code> definition is:
<source><![CDATA[package com.acme;

import javax.inject.*;
import jakarta.inject.*;
import org.apache.ibatis.session.*;
import org.mybatis.guice.transactional.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private Injector getInjector() throws Exception {
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, MockInitialContextFactory.class.getName());

InitialContext ic = new InitialContext(properties);
final TransactionManager tm = (TransactionManager) ic.lookup("javax.transaction.TransactionManager");
final TransactionManager tm = (TransactionManager) ic.lookup("jakarta.transaction.TransactionManager");

return Guice.createInjector(new PrivateModule() {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/mybatis/guice/jta/simple/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void setupMockJNDI() throws Exception {
RecoveryManager recoveryManager = com.arjuna.ats.arjuna.recovery.RecoveryManager.manager();
recoveryManager.initialize();

ic.bind("javax.transaction.TransactionManager", tm);
ic.bind("jakarta.transaction.TransactionManager", tm);

DataSource ads1 = AgroalDataSource
.from(new AgroalDataSourceConfigurationSupplier().connectionPoolConfiguration(cp -> cp.maxSize(10)
Expand Down