ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dma...@apache.org
Subject [11/18] ignite git commit: ignite-2959: Ignite JTA and WebSphere Application Server
Date Mon, 16 May 2016 08:11:57 GMT
ignite-2959: Ignite JTA and WebSphere Application Server


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fd0714e8
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fd0714e8
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fd0714e8

Branch: refs/heads/ignite-3098
Commit: fd0714e850425263cde269a1b1325834916288af
Parents: aede4b3
Author: ashutak <ashutak@gridgain.com>
Authored: Fri May 13 14:58:44 2016 +0300
Committer: ashutak <ashutak@gridgain.com>
Committed: Fri May 13 14:58:44 2016 +0300

----------------------------------------------------------------------
 assembly/dependencies-fabric-lgpl.xml           |   3 +-
 assembly/dependencies-fabric.xml                |   3 +-
 .../configuration/TransactionConfiguration.java |   8 +
 .../websphere/WebSphereLibertyTmFactory.java    |  77 ++++++
 .../cache/jta/websphere/WebSphereTmFactory.java | 244 +++++++++++++++++++
 modules/web/ignite-appserver-test/pom.xml       |  76 ++++++
 .../webapp/META-INF/config/default-config.xml   |  37 +++
 .../src/main/webapp/WEB-INF/web.xml             |  52 ++++
 .../src/main/webapp/index.jsp                   |  36 +++
 modules/web/ignite-weblogic-test/pom.xml        |  76 ------
 .../webapp/META-INF/config/default-config.xml   |  37 ---
 .../src/main/webapp/WEB-INF/web.xml             |  52 ----
 .../src/main/webapp/index.jsp                   |  36 ---
 modules/web/ignite-websphere-test/pom.xml       |  70 ++++++
 .../apache/ignite/webtest/TestJtaTxServlet.java | 106 ++++++++
 .../webapp/META-INF/config/default-config.xml   |  70 ++++++
 .../src/main/webapp/WEB-INF/web.xml             |  62 +++++
 .../src/main/webapp/index.jsp                   |  36 +++
 pom.xml                                         |   3 +-
 19 files changed, 880 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/assembly/dependencies-fabric-lgpl.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric-lgpl.xml b/assembly/dependencies-fabric-lgpl.xml
index 75e2939..84c823e 100644
--- a/assembly/dependencies-fabric-lgpl.xml
+++ b/assembly/dependencies-fabric-lgpl.xml
@@ -129,7 +129,8 @@
                 <exclude>org.apache.ignite:ignite-schema-import</exclude>
                 <exclude>org.apache.ignite:ignite-codegen</exclude>
                 <exclude>org.apache.ignite:ignite-apache-license-gen</exclude>
-                <exclude>org.apache.ignite:ignite-weblogic-test</exclude>
+                <exclude>org.apache.ignite:ignite-appserver-test</exclude>
+                <exclude>org.apache.ignite:ignite-websphere-test</exclude>
             </excludes>
             <sources>
                 <includeModuleDirectory>true</includeModuleDirectory>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/assembly/dependencies-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric.xml b/assembly/dependencies-fabric.xml
index 4add771..9c59311 100644
--- a/assembly/dependencies-fabric.xml
+++ b/assembly/dependencies-fabric.xml
@@ -132,7 +132,8 @@
                 <exclude>org.apache.ignite:ignite-hibernate</exclude>
                 <exclude>org.apache.ignite:ignite-schedule</exclude>
                 <exclude>org.apache.ignite:ignite-geospatial</exclude>
-                <exclude>org.apache.ignite:ignite-weblogic-test</exclude>
+                <exclude>org.apache.ignite:ignite-appserver-test</exclude>
+                <exclude>org.apache.ignite:ignite-websphere-test</exclude>
             </excludes>
             <sources>
                 <includeModuleDirectory>true</includeModuleDirectory>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
index 95050a7..440e00a 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
@@ -270,6 +270,14 @@ public class TransactionConfiguration implements Serializable {
      *  {@code org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory} utilizes configured JNDI names to look up
      *  a transaction manager.
      * </li>
+     * <li>
+     *  {@code org.apache.ignite.cache.jta.websphere.WebSphereTmFactory} an implementation of Transaction Manager
+     *  factory to be used within WebSphere Application Server.
+     * </li>
+     * <li>
+     *  {@code org.apache.ignite.cache.jta.websphere.WebSphereLibertyTmFactory} an implementation of Transaction Manager
+     *  factory to be used within WebSphere Liberty.
+     * </li>
      * </ul>
      *
      * Ignite will throw IgniteCheckedException if {@link Factory#create()} method throws any exception,

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/jta/src/main/java/org/apache/ignite/cache/jta/websphere/WebSphereLibertyTmFactory.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/cache/jta/websphere/WebSphereLibertyTmFactory.java b/modules/jta/src/main/java/org/apache/ignite/cache/jta/websphere/WebSphereLibertyTmFactory.java
new file mode 100644
index 0000000..aa579ad
--- /dev/null
+++ b/modules/jta/src/main/java/org/apache/ignite/cache/jta/websphere/WebSphereLibertyTmFactory.java
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.cache.jta.websphere;
+
+import java.lang.reflect.InvocationTargetException;
+import javax.cache.configuration.Factory;
+import javax.transaction.TransactionManager;
+import org.apache.ignite.IgniteException;
+
+/**
+ * Implementation of Transaction Manager factory that should used within WebSphere Liberty.
+ * <h2 class="header">Java Configuration</h2>
+ * <pre name="code" class="java">
+ * IgniteConfiguration cfg = new IgniteConfiguration();
+ *
+ * TransactionConfiguration txCfg = new TransactionConfiguration();
+ *
+ * txCfg.setTxManagerFactory(new WebSphereLibertyTmFactory());
+ *
+ * cfg.setTransactionConfiguration(new txCfg);
+ * </pre>
+ * <h2 class="header">Spring Configuration</h2>
+ * <pre name="code" class="xml">
+ * &lt;bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"&gt;
+ *         ...
+ *         &lt;property name="transactionConfiguration"&gt;
+ *             &lt;bean class="org.apache.ignite.cache.jta.websphere.WebSphereLibertyTmFactory"/&gt;
+ *         &lt;/property&gt;
+ *         ...
+ * &lt;/bean&gt;
+ * </pre>
+ * <p>
+ * <img src="http://ignite.apache.org/images/spring-small.png">
+ * <br>
+ * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>*
+ */
+public class WebSphereLibertyTmFactory implements Factory<TransactionManager> {
+    /** */
+    private static final long serialVersionUID = 0;
+
+    /** */
+    private static final String CLS = "com.ibm.tx.jta.TransactionManagerFactory";
+
+    /** */
+    private static final String MTD = "getTransactionManager";
+
+    /** {@inheritDoc} */
+    @Override public TransactionManager create() {
+        try {
+            return (TransactionManager)Class.forName(CLS).getMethod(MTD).invoke(null);
+        }
+        catch (ClassNotFoundException e) {
+            throw new IgniteException("Failed to find class: " + CLS, e);
+        }
+        catch (NoSuchMethodException e) {
+            throw new IgniteException("Failed to find method: " + MTD, e);
+        }
+        catch (InvocationTargetException | IllegalAccessException e) {
+            throw new IgniteException("Failed to invoke method: " + MTD, e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/jta/src/main/java/org/apache/ignite/cache/jta/websphere/WebSphereTmFactory.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/cache/jta/websphere/WebSphereTmFactory.java b/modules/jta/src/main/java/org/apache/ignite/cache/jta/websphere/WebSphereTmFactory.java
new file mode 100644
index 0000000..84024ee
--- /dev/null
+++ b/modules/jta/src/main/java/org/apache/ignite/cache/jta/websphere/WebSphereTmFactory.java
@@ -0,0 +1,244 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.cache.jta.websphere;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import javax.cache.configuration.Factory;
+import javax.transaction.HeuristicMixedException;
+import javax.transaction.HeuristicRollbackException;
+import javax.transaction.InvalidTransactionException;
+import javax.transaction.NotSupportedException;
+import javax.transaction.RollbackException;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import javax.transaction.xa.XAResource;
+import org.apache.ignite.IgniteException;
+
+/**
+ * Implementation of Transaction Manager factory that should used within
+ * WebSphere Application Server ("full profile" / "traditional" WS AS).
+ * <p>
+ * Notes:
+ * <ul>
+ * <li>
+ *     {@link WebSphereLibertyTmFactory} should be used within WebSphere Liberty.
+ * </li>
+ * <li>
+ *      The implementation has been tested with WebSphere Application Server 8.5.5.
+ * </li>
+ * </ul>
+ * <h2 class="header">Java Configuration</h2>
+ * <pre name="code" class="java">
+ * IgniteConfiguration cfg = new IgniteConfiguration();
+ *
+ * TransactionConfiguration txCfg = new TransactionConfiguration();
+ *
+ * txCfg.setTxManagerFactory(new WebSphereTmFactory());
+ *
+ * cfg.setTransactionConfiguration(new txCfg);
+ * </pre>
+ * <h2 class="header">Spring Configuration</h2>
+ * <pre name="code" class="xml">
+ * &lt;bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"&gt;
+ *         ...
+ *         &lt;property name="transactionConfiguration"&gt;
+ *             &lt;bean class="org.apache.ignite.cache.jta.websphere.WebSphereTmFactory"/&gt;
+ *         &lt;/property&gt;
+ *         ...
+ * &lt;/bean&gt;
+ * </pre>
+ * <p>
+ * <img src="http://ignite.apache.org/images/spring-small.png">
+ * <br>
+ * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>*
+ */
+public class WebSphereTmFactory implements Factory<TransactionManager> {
+    /** */
+    private static final long serialVersionUID = 0;
+
+    /** */
+    private static final Class<?> onePhaseXAResourceCls;
+
+    static {
+        try {
+            onePhaseXAResourceCls = Class.forName("com.ibm.tx.jta.OnePhaseXAResource");
+        }
+        catch (ClassNotFoundException e) {
+            throw new IgniteException(e);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    @Override public TransactionManager create() {
+        try {
+            Class clazz = Class.forName("com.ibm.tx.jta.impl.TranManagerSet");
+
+            Method m = clazz.getMethod("instance", (Class[])null);
+
+            TransactionManager tranMgr = (TransactionManager)m.invoke(null, (Object[])null);
+
+            return new WebSphereTransactionManager(tranMgr);
+        }
+        catch (SecurityException | ClassNotFoundException | IllegalArgumentException | NoSuchMethodException
+            | InvocationTargetException | IllegalAccessException e) {
+            throw new IgniteException(e);
+        }
+    }
+    /**
+     *
+     */
+    private static class WebSphereTransactionManager implements TransactionManager {
+        /** */
+        private TransactionManager mgr;
+
+        /**
+         * @param mgr Transaction Manager.
+         */
+        WebSphereTransactionManager(TransactionManager mgr) {
+            this.mgr = mgr;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void begin() throws NotSupportedException, SystemException {
+            mgr.begin();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
+            SecurityException, IllegalStateException, SystemException {
+            mgr.commit();
+        }
+
+        /** {@inheritDoc} */
+        @Override public int getStatus() throws SystemException {
+            return mgr.getStatus();
+        }
+
+        /** {@inheritDoc} */
+        @Override public Transaction getTransaction() throws SystemException {
+            Transaction tx = mgr.getTransaction();
+
+            if (tx == null)
+                return null;
+
+            return new WebSphereTransaction(tx);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException,
+            SystemException {
+            mgr.resume(tobj);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void rollback() throws IllegalStateException, SecurityException, SystemException {
+            mgr.rollback();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void setRollbackOnly() throws IllegalStateException, SystemException {
+            mgr.setRollbackOnly();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void setTransactionTimeout(int seconds) throws SystemException {
+            mgr.setTransactionTimeout(seconds);
+        }
+
+        /** {@inheritDoc} */
+        @Override public Transaction suspend() throws SystemException {
+            return mgr.suspend();
+        }
+    }
+
+    /**
+     *
+     */
+    private static class WebSphereTransaction implements Transaction {
+        /** */
+        private final Transaction tx;
+
+        /**
+         * @param tx Transaction.
+         */
+        WebSphereTransaction(Transaction tx) {
+            assert tx != null;
+
+            this.tx = tx;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
+            SecurityException, IllegalStateException, SystemException {
+            tx.commit();
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException,
+            SystemException {
+            return tx.delistResource(xaRes, flag);
+        }
+
+        /** {@inheritDoc} */
+        @SuppressWarnings("SimplifiableIfStatement")
+        @Override public boolean enlistResource(final XAResource xaRes) throws RollbackException, IllegalStateException,
+            SystemException {
+            if (xaRes == null)
+                return false;
+
+//            final XAResource res = new IgniteOnePhaseXAResource(xaRes);
+
+            Object ibmProxy = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
+                new Class[] {onePhaseXAResourceCls},
+                new InvocationHandler() {
+                    @Override public Object invoke(Object proxy, Method mtd, Object[] args) throws Throwable {
+                        return mtd.invoke(xaRes, args);
+                    }
+                });
+
+            return tx.enlistResource((XAResource)ibmProxy);
+        }
+
+        /** {@inheritDoc} */
+        @Override public int getStatus() throws SystemException {
+            return tx.getStatus();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void registerSynchronization(Synchronization sync) throws RollbackException,
+            IllegalStateException, SystemException {
+            tx.registerSynchronization(sync);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void rollback() throws IllegalStateException, SystemException {
+            tx.rollback();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void setRollbackOnly() throws IllegalStateException, SystemException {
+            tx.setRollbackOnly();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-appserver-test/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-appserver-test/pom.xml b/modules/web/ignite-appserver-test/pom.xml
new file mode 100644
index 0000000..8dbe1ee
--- /dev/null
+++ b/modules/web/ignite-appserver-test/pom.xml
@@ -0,0 +1,76 @@
+<!--
+  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.
+-->
+
+<!--
+    POM file.
+-->
+<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/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.ignite</groupId>
+        <artifactId>ignite-parent</artifactId>
+        <version>1</version>
+        <relativePath>../../../parent</relativePath>
+    </parent>
+
+    <artifactId>ignite-appserver-test</artifactId>
+    <packaging>jar</packaging>
+    <version>1.6.0-SNAPSHOT</version>
+    <url>http://ignite.apache.org</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-web</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-log4j</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-spring</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>ignite-appserver-test</finalName>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-appserver-test/src/main/webapp/META-INF/config/default-config.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-appserver-test/src/main/webapp/META-INF/config/default-config.xml b/modules/web/ignite-appserver-test/src/main/webapp/META-INF/config/default-config.xml
new file mode 100644
index 0000000..1a479a6
--- /dev/null
+++ b/modules/web/ignite-appserver-test/src/main/webapp/META-INF/config/default-config.xml
@@ -0,0 +1,37 @@
+<?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://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                            http://www.springframework.org/schema/beans/spring-beans.xsd">
+    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="cacheConfiguration">
+            <list>
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="atomic"/>
+
+                    <property name="cacheMode" value="PARTITIONED"/>
+
+                    <property name="atomicityMode" value="ATOMIC"/>
+                </bean>
+            </list>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-appserver-test/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-appserver-test/src/main/webapp/WEB-INF/web.xml b/modules/web/ignite-appserver-test/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..6fe7358
--- /dev/null
+++ b/modules/web/ignite-appserver-test/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,52 @@
+<!--
+  ~ 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.
+  -->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+  <display-name>Archetype Created Web Application</display-name>
+
+    <listener>
+        <listener-class>org.apache.ignite.startup.servlet.ServletContextListenerStartup</listener-class>
+    </listener>
+
+    <filter>
+        <filter-name>IgniteWebSessionsFilter</filter-name>
+        <filter-class>org.apache.ignite.cache.websession.WebSessionFilter</filter-class>
+    </filter>
+
+    <!-- You can also specify a custom URL pattern. -->
+    <filter-mapping>
+        <filter-name>IgniteWebSessionsFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <!-- Specify Ignite configuration (relative to META-INF folder or Ignite_HOME). -->
+    <context-param>
+        <param-name>IgniteConfigurationFilePath</param-name>
+        <param-value>config/default-config.xml </param-value>
+    </context-param>
+
+    <!-- Specify the name of Ignite cache for web sessions. -->
+    <context-param>
+        <param-name>IgniteWebSessionsCacheName</param-name>
+        <param-value>atomic</param-value>
+    </context-param>
+
+</web-app>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-appserver-test/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/modules/web/ignite-appserver-test/src/main/webapp/index.jsp b/modules/web/ignite-appserver-test/src/main/webapp/index.jsp
new file mode 100644
index 0000000..4ca0be1
--- /dev/null
+++ b/modules/web/ignite-appserver-test/src/main/webapp/index.jsp
@@ -0,0 +1,36 @@
+<%--
+  ~ 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.
+  --%>
+
+<%@ page import="org.apache.ignite.Ignition" %>
+<%@ page import="java.util.UUID" %>
+<html>
+<body>
+<h2>Session ID</h2>
+<%= request.getSession().getId() %>
+<h2>Session content</h2>
+<%= Ignition.ignite().cache("atomic").get(request.getSession().getId()) %>
+<h2>Cache size</h2>
+<%= Ignition.ignite().cache("atomic").size() %>
+
+<%
+    HttpSession ses = request.getSession();
+
+    ses.setAttribute(UUID.randomUUID().toString(), "Value");
+%>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-weblogic-test/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-weblogic-test/pom.xml b/modules/web/ignite-weblogic-test/pom.xml
deleted file mode 100644
index 622b798..0000000
--- a/modules/web/ignite-weblogic-test/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<!--
-  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.
--->
-
-<!--
-    POM file.
--->
-<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/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.ignite</groupId>
-        <artifactId>ignite-parent</artifactId>
-        <version>1</version>
-        <relativePath>../../../parent</relativePath>
-    </parent>
-
-    <artifactId>ignite-weblogic-test</artifactId>
-    <packaging>war</packaging>
-    <version>1.6.0-SNAPSHOT</version>
-    <url>http://ignite.apache.org</url>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-web</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-log4j</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-spring</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <finalName>ignite-weblogic-test</finalName>
-
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-weblogic-test/src/main/webapp/META-INF/config/default-config.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-weblogic-test/src/main/webapp/META-INF/config/default-config.xml b/modules/web/ignite-weblogic-test/src/main/webapp/META-INF/config/default-config.xml
deleted file mode 100644
index 1a479a6..0000000
--- a/modules/web/ignite-weblogic-test/src/main/webapp/META-INF/config/default-config.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-                            http://www.springframework.org/schema/beans/spring-beans.xsd">
-    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
-        <property name="cacheConfiguration">
-            <list>
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="atomic"/>
-
-                    <property name="cacheMode" value="PARTITIONED"/>
-
-                    <property name="atomicityMode" value="ATOMIC"/>
-                </bean>
-            </list>
-        </property>
-    </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-weblogic-test/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-weblogic-test/src/main/webapp/WEB-INF/web.xml b/modules/web/ignite-weblogic-test/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 6fe7358..0000000
--- a/modules/web/ignite-weblogic-test/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
-  ~ 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.
-  -->
-
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
-  <display-name>Archetype Created Web Application</display-name>
-
-    <listener>
-        <listener-class>org.apache.ignite.startup.servlet.ServletContextListenerStartup</listener-class>
-    </listener>
-
-    <filter>
-        <filter-name>IgniteWebSessionsFilter</filter-name>
-        <filter-class>org.apache.ignite.cache.websession.WebSessionFilter</filter-class>
-    </filter>
-
-    <!-- You can also specify a custom URL pattern. -->
-    <filter-mapping>
-        <filter-name>IgniteWebSessionsFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <!-- Specify Ignite configuration (relative to META-INF folder or Ignite_HOME). -->
-    <context-param>
-        <param-name>IgniteConfigurationFilePath</param-name>
-        <param-value>config/default-config.xml </param-value>
-    </context-param>
-
-    <!-- Specify the name of Ignite cache for web sessions. -->
-    <context-param>
-        <param-name>IgniteWebSessionsCacheName</param-name>
-        <param-value>atomic</param-value>
-    </context-param>
-
-</web-app>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-weblogic-test/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/modules/web/ignite-weblogic-test/src/main/webapp/index.jsp b/modules/web/ignite-weblogic-test/src/main/webapp/index.jsp
deleted file mode 100644
index 4ca0be1..0000000
--- a/modules/web/ignite-weblogic-test/src/main/webapp/index.jsp
+++ /dev/null
@@ -1,36 +0,0 @@
-<%--
-  ~ 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.
-  --%>
-
-<%@ page import="org.apache.ignite.Ignition" %>
-<%@ page import="java.util.UUID" %>
-<html>
-<body>
-<h2>Session ID</h2>
-<%= request.getSession().getId() %>
-<h2>Session content</h2>
-<%= Ignition.ignite().cache("atomic").get(request.getSession().getId()) %>
-<h2>Cache size</h2>
-<%= Ignition.ignite().cache("atomic").size() %>
-
-<%
-    HttpSession ses = request.getSession();
-
-    ses.setAttribute(UUID.randomUUID().toString(), "Value");
-%>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-websphere-test/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-websphere-test/pom.xml b/modules/web/ignite-websphere-test/pom.xml
new file mode 100644
index 0000000..b2d9045
--- /dev/null
+++ b/modules/web/ignite-websphere-test/pom.xml
@@ -0,0 +1,70 @@
+<!--
+  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.
+-->
+
+<!--
+    POM file.
+-->
+<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/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.ignite</groupId>
+        <artifactId>ignite-parent</artifactId>
+        <version>1</version>
+        <relativePath>../../../parent</relativePath>
+    </parent>
+
+    <artifactId>ignite-websphere-test</artifactId>
+    <packaging>war</packaging>
+    <version>1.6.0-SNAPSHOT</version>
+    <url>http://ignite.apache.org</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-appserver-test</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-jta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ibm.websphere.appserver.api</groupId>
+            <artifactId>com.ibm.websphere.appserver.api.transaction</artifactId>
+            <version>1.1.10</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>ignite-websphere-test</finalName>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-websphere-test/src/main/java/org/apache/ignite/webtest/TestJtaTxServlet.java
----------------------------------------------------------------------
diff --git a/modules/web/ignite-websphere-test/src/main/java/org/apache/ignite/webtest/TestJtaTxServlet.java b/modules/web/ignite-websphere-test/src/main/java/org/apache/ignite/webtest/TestJtaTxServlet.java
new file mode 100644
index 0000000..c291d56
--- /dev/null
+++ b/modules/web/ignite-websphere-test/src/main/java/org/apache/ignite/webtest/TestJtaTxServlet.java
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.webtest;
+
+import com.ibm.tx.jta.TransactionManagerFactory;
+import java.io.IOException;
+import java.io.PrintWriter;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.transaction.RollbackException;
+import javax.transaction.TransactionManager;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.Ignition;
+
+/**
+ * Servlet to test working of Ignite transactions inside web-application environment.
+ */
+@SuppressWarnings("TooBroadScope")
+public class TestJtaTxServlet extends HttpServlet {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** {@inheritDoc} */
+    @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse res)
+        throws ServletException, IOException {
+        final int key1 = 1;
+        final int key2 = 2;
+
+        final String correctVal1 = "correct_val1";
+        final String correctVal2 = "correct_val1";
+        final String incorrectVal1 = "incorrect_val2";
+        final String incorrectVal2 = "incorrect_val2";
+
+        final PrintWriter writer = res.getWriter();
+
+        try {
+            final Ignite ignite = Ignition.ignite();
+
+            final IgniteCache<Integer, String> cache = ignite.cache("tx");
+
+            TransactionManager tmMgr = TransactionManagerFactory.getTransactionManager();
+
+            tmMgr.begin();
+
+            cache.put(key1, correctVal1);
+            cache.put(key2, correctVal2);
+
+            writer.println("Transaction #1. Put values [key1=" + key1 + ", val1=" + cache.get(key1)
+                + ", key2=" + key2 + ", val2=" + cache.get(key2) + "]");
+            writer.println();
+
+            tmMgr.commit();
+
+            try {
+                tmMgr.begin();
+
+                writer.println("Transaction #2. Current values [key1=" + key1 + ", val1=" + cache.get(key1)
+                    + ", key2=" + key2 + ", val2=" + cache.get(key2) + "]");
+
+                cache.put(key1, incorrectVal1);
+                cache.put(key2, incorrectVal2);
+
+                writer.println("Transaction #2. Put values [key1=" + key1 + ", val1=" + cache.get(key1)
+                    + ", key2=" + key2 + ", val2=" + cache.get(key2) + "]");
+
+                tmMgr.setRollbackOnly();
+
+                tmMgr.commit();
+            }
+            catch (final RollbackException ignored) {
+                writer.println("Transaction #2. setRollbackOnly [key1=" + key1 + ", val1=" + cache.get(key1)
+                    + ", key2=" + key2 + ", val2=" + cache.get(key2) + "]");
+            }
+
+            writer.println();
+
+            tmMgr.begin();
+
+            writer.println("Transaction #2. Current values [key1=" + key1 + ", val1=" + cache.get(key1)
+                + ", key2=" + key2 + ", val2=" + cache.get(key2) + "]");
+
+            tmMgr.commit();
+        }
+        catch (final Throwable e) {
+            e.printStackTrace(writer);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-websphere-test/src/main/webapp/META-INF/config/default-config.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-websphere-test/src/main/webapp/META-INF/config/default-config.xml b/modules/web/ignite-websphere-test/src/main/webapp/META-INF/config/default-config.xml
new file mode 100644
index 0000000..9a9ec0d
--- /dev/null
+++ b/modules/web/ignite-websphere-test/src/main/webapp/META-INF/config/default-config.xml
@@ -0,0 +1,70 @@
+<?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://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                            http://www.springframework.org/schema/beans/spring-beans.xsd">
+    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="cacheConfiguration">
+            <list>
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="atomic"/>
+
+                    <property name="cacheMode" value="PARTITIONED"/>
+
+                    <property name="atomicityMode" value="ATOMIC"/>
+                </bean>
+
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="tx"/>
+
+                    <property name="cacheMode" value="PARTITIONED"/>
+
+                    <property name="atomicityMode" value="TRANSACTIONAL"/>
+                </bean>
+            </list>
+        </property>
+
+        <property name="transactionConfiguration">
+            <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+                <property name="txManagerFactory">
+                    <bean class="org.apache.ignite.cache.jta.websphere.WebSphereTmFactory"/>
+                </property>
+
+                <property name="defaultTxIsolation" value="REPEATABLE_READ"/>
+                <property name="defaultTxConcurrency" value="PESSIMISTIC"/>
+            </bean>
+        </property>
+
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+                        <property name="addresses">
+                            <list>
+                                <value>127.0.0.1:47500..47509</value>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-websphere-test/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/modules/web/ignite-websphere-test/src/main/webapp/WEB-INF/web.xml b/modules/web/ignite-websphere-test/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..94cb0cf
--- /dev/null
+++ b/modules/web/ignite-websphere-test/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,62 @@
+<!--
+  ~ 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.
+  -->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+  <display-name>Archetype Created Web Application</display-name>
+
+    <listener>
+        <listener-class>org.apache.ignite.startup.servlet.ServletContextListenerStartup</listener-class>
+    </listener>
+
+    <filter>
+        <filter-name>IgniteWebSessionsFilter</filter-name>
+        <filter-class>org.apache.ignite.cache.websession.WebSessionFilter</filter-class>
+    </filter>
+
+    <!-- You can also specify a custom URL pattern. -->
+    <filter-mapping>
+        <filter-name>IgniteWebSessionsFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <!-- Specify Ignite configuration (relative to META-INF folder or Ignite_HOME). -->
+    <context-param>
+        <param-name>IgniteConfigurationFilePath</param-name>
+        <param-value>config/default-config.xml </param-value>
+    </context-param>
+
+    <!-- Specify the name of Ignite cache for web sessions. -->
+    <context-param>
+        <param-name>IgniteWebSessionsCacheName</param-name>
+        <param-value>atomic</param-value>
+    </context-param>
+
+    <servlet>
+        <servlet-name>TestJtaTxServlet</servlet-name>
+        <servlet-class>org.apache.ignite.webtest.TestJtaTxServlet</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>TestJtaTxServlet</servlet-name>
+        <url-pattern>jta-test</url-pattern>
+    </servlet-mapping>
+
+</web-app>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/modules/web/ignite-websphere-test/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/modules/web/ignite-websphere-test/src/main/webapp/index.jsp b/modules/web/ignite-websphere-test/src/main/webapp/index.jsp
new file mode 100644
index 0000000..4ca0be1
--- /dev/null
+++ b/modules/web/ignite-websphere-test/src/main/webapp/index.jsp
@@ -0,0 +1,36 @@
+<%--
+  ~ 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.
+  --%>
+
+<%@ page import="org.apache.ignite.Ignition" %>
+<%@ page import="java.util.UUID" %>
+<html>
+<body>
+<h2>Session ID</h2>
+<%= request.getSession().getId() %>
+<h2>Session content</h2>
+<%= Ignition.ignite().cache("atomic").get(request.getSession().getId()) %>
+<h2>Cache size</h2>
+<%= Ignition.ignite().cache("atomic").size() %>
+
+<%
+    HttpSession ses = request.getSession();
+
+    ses.setAttribute(UUID.randomUUID().toString(), "Value");
+%>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd0714e8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ce38143..d9ed20c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,8 @@
         <module>modules/osgi-paxlogging</module>
         <module>modules/osgi-karaf</module>
         <module>modules/osgi</module>
-        <module>modules/web/ignite-weblogic-test</module>
+        <module>modules/web/ignite-appserver-test</module>
+        <module>modules/web/ignite-websphere-test</module>
         <module>modules/flink</module>
     </modules>
 


Mime
View raw message