Tag Library for Java Persistence API


Standard Syntax:
     <%@ taglib prefix="jpa" uri="http://weblogs.java.net/ss141213/tags/jpa" %>

XML Syntax:
     <anyxmlelement xmlns:jpa="http://weblogs.java.net/ss141213/tags/jpa" />

A set of tags for using Java Persistence API (JSR 220) in JSPs.

Tag Library Information
Display NameTag Library for Java Persistence API
Version1.0
Short Namejpa
URIhttp://weblogs.java.net/ss141213/tags/jpa
 

Tag Summary
txThis tag can be used to mark boundary of a user transaction. If there is no active tx, it begins a new tx whose scope is same as the scope of this tag. Whether the new transaction is rolled back or committed depends on if there is any exception or not. It optionally makes available the UserTransaction object in a request scoped variable whose id is supplied by caller.
injectDefaultPUThis tag can be used to inject a default persistence unit into a JSP. The injected persistence unit is made available in a page scope variable whose id is required to be supplied by the caller. Note the type of the injected variable is EntityManagerFactory.
injectDefaultPCThis tag can be used to inject a default persistence context into a JSP. The injected persistence context is made available in a page scope variable whose id is required to be supplied by the caller. Note the type of the injected variable is EntityManager.
createPCCreates a new stanadalone PersistenceContext. By default it creates TRANSACTION scoped PC.
persistpersist an object in database
removeremove an object from database
refreshrefresh in memory object with state in database
findfind an object with given primary key
 


Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.