Commit 8d7afa13 by Patryk Czarnik

Przejście na konfigurację DataSource typu JTA

parent e9f323b3
......@@ -19,7 +19,7 @@ import sklep.model.Product;
// Jeśli w aplikacji jest tylko jeden persistence unit, to nazwy można nie podawać, ale ja wolę zawsze podać.
// Ta wersja jest odpowiednia dla konfiguracji opartej o JTA
//@WebServlet("/lista3")
@WebServlet("/lista3")
public class Lista3 extends HttpServlet {
private static final long serialVersionUID = 1L;
......
......@@ -16,7 +16,7 @@ import javax.transaction.UserTransaction;
import sklep.model.Product;
//@WebServlet("/zmiana3")
@WebServlet("/zmiana3")
public class Zmiana3 extends HttpServlet {
private static final long serialVersionUID = 1L;
......
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="sklep" transaction-type="RESOURCE_LOCAL">
<non-jta-data-source>java:/SklepDS</non-jta-data-source>
<persistence-unit name="sklep" transaction-type="JTA">
<jta-data-source>java:/SklepDS</jta-data-source>
<class>sklep.model.Customer</class>
<class>sklep.model.OrderProduct</class>
<class>sklep.model.OrderProductPK</class>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment