Java Tutorial/EJB3/EJB Servlet

Материал из Java эксперт
Перейти к: навигация, поиск

Inject Resource In Servlet

File: application.xml



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application
1.3//EN" "http://java.sun.ru/dtd/application_1_3.dtd">
<application>
    <display-name>Hello Ear File</display-name>
    <!-- <module>
        <ejb>jexp.jar</ejb>
    </module> -->
    <module>
        <web>
            <web-uri>jexp.war</web-uri>
            <context-root>/webapp</context-root>
        </web>
    </module>
</application>





Transaction In Servlet

File: application.xml



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application
1.3//EN" "http://java.sun.ru/dtd/application_1_3.dtd">
<application>
    <display-name>Hello Ear File</display-name>
    <!-- <module>
        <ejb>jexp.jar</ejb>
    </module> -->
    <module>
        <web>
            <web-uri>jexp.war</web-uri>
            <context-root>/webapp</context-root>
        </web>
    </module>
</application>