Skip to content
Permalink
Browse files
BATCHEE-30 provide an EE6 Thread Executor and UserTransaction Management
  • Loading branch information
struberg committed May 8, 2014
1 parent e6aae06 commit 78f9e2b780786327b4b7643011ebafa6b44e3f6b
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 4 deletions.
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>batchee-tools</artifactId>
<groupId>org.apache.batchee</groupId>
<version>0.2-incubating-SNAPSHOT</version>
</parent>

<artifactId>batchee-ee6</artifactId>
<name>BatchEE :: EE6 integration</name>


<dependencies>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jbatch_1.0_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-atinject_1.0_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcdi_1.0_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ejb_3.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-interceptor_1.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.components</groupId>
<artifactId>geronimo-transaction</artifactId>
</dependency>

<dependency>
<groupId>org.apache.batchee</groupId>
<artifactId>batchee-jbatch</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

</dependencies>

</project>
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.batchee.container.services.executor.ee;
package org.apache.batchee.tools.services.thread;

import java.util.Properties;
import java.util.Set;
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.batchee.container.services.executor.ee;
package org.apache.batchee.tools.services.thread;

import javax.annotation.Resource;
import javax.ejb.Asynchronous;
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.batchee.container.services.executor.ee;
package org.apache.batchee.tools.services.thread;

import java.util.Properties;

@@ -38,7 +38,7 @@ public void init(Properties batchConfig) {
public TransactionManagerAdapter getTransactionManager(StepContext stepContext) {
UserTransaction ut = ThreadExecutorEjb.getUserTransaction();

return null;
return new UserTransactionTxAdapter(ut);
}

private static class UserTransactionTxAdapter implements TransactionManagerAdapter {
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"/>
@@ -31,5 +31,6 @@
<modules>
<module>maven-plugin</module>
<module>cli</module>
<module>ee6</module>
</modules>
</project>

0 comments on commit 78f9e2b

Please sign in to comment.