Sample Application using JSF, Seam 2.0, and Java Persistence APIs on Glassfish V2
Sample Application using JSF, Seam 2.0,
and Java Persistence APIs on Glassfish V2
This Sample Store Catalog app demonstrates the usage of JavaServer
Faces, a Catalog Stateful Session Bean, the Java Persistence APIs, and
Seam 2. I took this example
href="http://weblogs.java.net/blog/caroljmcdonald/archive/2007/05/pagination_of_d.html">Sample
Application using JSF, Catalog Facade
Stateless Session, and Java Persistence APIs and refactored
it to use Seam on Glassfish by following the steps in Brian Leonards
blog
href="http://weblogs.java.net/blog/bleonard/archive/2007/06/seam_refresh_1.html">Seam
Refresh and the clickable list example in the
href="http://docs.jboss.com/seam/1.0.1.GA/reference/en/html/tutorial.html">Seam
Tutorial.
href="https://techdayscode.dev.java.net/servlets/ProjectDocumentList?folderID=7555">Download
the Seam Sample Application Code
Explanation of the usage of JSF, Seam, and Java Persistence
APIs in a sample Store Catalog Application
The image below shows the Catalog Listing page, which allows a user to
page through a list of items
in a store.
DataTable JSF component
The List.jsp page uses a JSF dataTable
component to display a list of
catalog items.
The dataTable component is useful when you want to show a set of
results in a table. In a JavaServer Faces application, the UIData
component
(the superclass of dataTable) supports binding to a collection of
data objects. It does the
work of iterating over each record in the data source. The HTML dataTable
renderer
displays the data as an HTML table.
In the List.jsp
web page the dataTable is defined as shown below: (Note:
style="color: rgb(204, 0, 0); font-weight: bold;">Red colors
are for Java EE
tags, annotations code,
style="color: rgb(0, 0, 153); font-weight: bold;">Blue for
style="color: rgb(0, 0, 153); font-weight: bold;">Seam specific
and Green
for my code
or variables)
Code Sample from: |
|
The value attribute of a dataTable
tag references the data to be included
in the table. The var
attribute specifies a
name that is used by the components within the dataTable
tag as an alias to the data referenced in the value
attribute of dataTable. In the dataTable tag from the List.jsp
page, the value attribute points to a list
of catalog
style="color: rgb(0, 102, 0); font-weight: bold;">items style="font-weight: bold;">. The varattribute points
to a single item in that list. As the
UIDatacomponent iterates through the list, each reference to
dataTableItem
style="font-weight: bold;"> points to the current item in thelist.
The dataTable's
style="font-weight: bold; color: rgb(204, 0, 0);">valueis bound to the
style="font-weight: bold; color: rgb(0, 102, 0);">itemsattribute
of the
CatalogBeanclass:
Code Sample from: .java |
|
The @DataModel
Seam annotation exposes an attribute of type java.util.List to a JSF
page as an instance of
style="color: rgb(204, 0, 0); font-weight: bold;">javax.faces.model.DataModel.
The
<
style="font-weight: bold; color: rgb(204, 0, 0);">h:dataTable style="color: rgb(204, 0, 0);">
style="color: rgb(204, 0, 0); font-weight: bold;">>
style="font-weight: bold;"> supports data binding to acollection of data objects represented by a style="color: rgb(204, 0, 0); font-weight: bold;">DataModel
instance.
The data
collection underlying a DataModel instance is modeled as a collection
of row objects that can be accessed by a row index. The APIs
provide mechanisms to position to a specified row index, and to
retrieve an object that represents the data that corresponds to the
current row index. In this case, the DataModel is made available
in a session
context variable named style="font-weight: bold; color: rgb(0, 102, 0);">items.
When the List.jsp page is diplayed it will try to resolve the style="font-weight: bold; color: rgb(0, 102, 0);" class="literal">items
context variable. Since this context variable is not initialized, Seam
will call the
style="font-weight: bold; color: rgb(0, 0, 153);">@Factorymethod style="font-weight: bold; color: rgb(0, 102, 0);">getItems(),
which performs a JPA query (see
style="color: rgb(0, 0, 0);">getNextItems() code below)and results in a DataModel being
outjected. The style="color: rgb(0, 0, 153); font-weight: bold;" class="literal">@Factory
annotation tells Seam to invoke the style="font-weight: bold; color: rgb(0, 102, 0);">getItems()
method to initialize the
style="font-weight: bold; color: rgb(0, 102, 0);">items value.style="font-weight: bold; color: rgb(0, 0, 153);"> SeamThestyle="font-weight: bold; color: rgb(0, 0, 153);">@Name
annotation specifies
style="color: rgb(0, 102, 0); font-weight: bold;">catalog asthe application unique component name which Seam will use to resolve
references to the
style="color: rgb(0, 102, 0); font-weight: bold;">catalogcontext variable. Seam will instantiate the
component
and bind a new instance to the context variable the first time JSF
encounters the variable name
style="color: rgb(0, 102, 0); font-weight: bold;">catalog.The instance will be bound to the
context specified by the
style="font-weight: bold; color: rgb(0, 0, 153);">@ScopeSeam annotation. The style="font-family: monospace; color: rgb(0, 102, 0); font-weight: bold;">CatalogBean
is a
org.jboss.seam.ScopeType.SESSIONscoped component. This means that the JSF components can bind to
the
catalog managed bean without configuring this in the faces-config.xml.
The style="color: rgb(204, 0, 0); font-weight: bold;"> style="color: rgb(204, 0, 0);">@Stateful EJB 3.0annotation marks this as a Stateful EJB. A Stateful EJB is used because
the current chunk of items, and
the user's position in the count of items in the db table, is
maintained for the user's session.
The
style="color: rgb(204, 0, 0);">@Interceptors EJB3.0 annotation registers the style="color: rgb(0, 0, 153);">SeamInterceptor.class as
an EJB interceptor for this session bean component.
The Seam framework uses href="http://java.sun.com/mailers/techtips/enterprise/2006/TechTips_Oct06.html#2">EJB
interceptors to perform bijection, context demarcation, validation,
etc, (the interceptor could be defined in the style="color: rgb(204, 0, 0); font-weight: bold;" class="literal">ejb-jar.xml
instead).
Column JSF component
On the List.jsp page the Item Name, Photo, and Price properties
are displayed with the
style="color: rgb(204, 0, 0);">column component:
Code Sample from: |
|
The column tags represent columns of data in the dataTable component.
While
the dataTable component is iterating over the rows of data, it
processes
the column component associated with each
style="color: rgb(204, 0, 0);">column tag for each row in
the table. As the dataTable
component iterates through the list, each reference to dataTableItem
style="font-weight: bold;"> points to the
style="font-weight: bold;">current item in the
list.
The dataTable component iterates through the list of items and
displays the names, photos, and prices. Each
time the dataTable iterates through the list of items, it renders one
row in
each column.
The dataTable and column tags use facets to represent rows of the
table that are not repeated or updated. These include
style="color: rgb(204, 0, 0);">headers, footers,
and captions.
Java Persistence Query API
The CatalogBean
Session EJB uses the Java Persistence API
style="color: rgb(204, 0, 0);">
style="color: rgb(204, 0, 0);"> style="font-weight: bold; color: rgb(204, 0, 0);">Query style="color: rgb(204, 0, 0); font-weight: bold;"> objectto return a list of
style="font-weight: bold; color: rgb(0, 102, 0);">items.With the
style="color: rgb(204, 0, 0);">@PersistenceContext annotationthe CatalogBean uses dependency injection to lookup and obtain a
Container Managed
style="font-weight: bold;">EntityManager
style="color: rgb(204, 0, 0);">
style="font-weight: bold; color: rgb(204, 0, 0);">
style="color: rgb(204, 0, 0);">
style="font-weight: bold;">
style="color: rgb(204, 0, 0);"> style="font-weight: bold; color: rgb(204, 0, 0);">.Since the EntityManager can be container managed for EJB Session
Beans, the application does not
have to manage its lifecycle (i.e. call the
EntityManagerFactory.create() and EntityManager.close() methods).
Code Sample from: .java |
|
Since this query is used for Read-Only browsing, the
style="color: rgb(204, 0, 0);">transaction
attribute in this example is specified as
style="color: rgb(204, 0, 0);">NOT_SUPPORTED.
Queries using
transaction-scoped entity managers outside of a transaction are
typically more efficient than queries inside a transaction when the
result type is an entity.
The Java Persistence
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/Query.html">Query
APIs are used to create and execute queries that can return a
list of results. The JPA Query interface provides
support for pagination via the setFirstResult() and setMaxResults()
methods: query.
style="color: rgb(204, 0, 0);">setMaxResults(int maxResult)
sets the maximum number of results to retrieve.
style="font-family: mon;"> query.
style="color: rgb(204, 0, 0);">setFirstResult(int startPosition)
sets the position of the first result to retrieve.
In the code below, we show the
style="color: rgb(0, 102, 0); font-weight: bold;">Itementity class which maps to the ITEM table that stores the
item instances. This is a
typical Java Persistence entity object. There are two requirements for
an entity:
- annotating the class with an
style="color: rgb(204, 0, 0); font-weight: bold;">@Entity
annotation.
- annotating the primary key identifier with
style="color: rgb(204, 0, 0); font-weight: bold;">@Id
Because the fields name, description.... are basic mappings from the
object fields to columns of the same name in the database table, they
don't have to be annotated. The O/R relationships with
style="color: rgb(0, 102, 0); font-weight: bold;">Addressand
Productare also annotated. For more information on
defining JPA entities see href="http://www.apress.com/book/bookDisplay.html?bID=10093">Pro
EJB 3: Java Persistence API book.
Code Sample from: .java |
@Id
|
The @Name
href="http://docs.jboss.com/seam/1.0.1.GA/reference/en/html/annotations.html#name-annotation">
style="font-weight: bold; color: rgb(0, 0, 153);">seam annotation specifies the (application unique) class="emphasis">component name
style="color: rgb(0, 102, 0); font-weight: bold;">item,which is used in
the
style="color: rgb(0, 102, 0); font-weight: bold;">Detail style="color: rgb(0, 0, 0);">.jsp
style="font-weight: bold;"> to display the selected item'sattributes. The
style="font-weight: bold; color: rgb(0, 0, 153);">@ScopeSeam annotation binds the
style="color: rgb(0, 102, 0); font-weight: bold;">iteminstance to the
org.jboss.seam.ScopeType.EVENTcontext.
The
CatalogBeanpages through the list of
style="color: rgb(0, 102, 0); font-weight: bold;">itemsby
maintaining the
style="color: rgb(0, 102, 0); font-weight: bold;">firstItemand
batchSizeattributes and passing these as
parameters to the style="color: rgb(204, 0, 0);"> query. style="color: rgb(204, 0, 0);">setFirstResult(int startPosition), style="font-weight: bold; color: rgb(204, 0, 0);"> query. style="color: rgb(204, 0, 0);">setMaxResults(int maxResult)
methods.
The CatalogBean's scope is defined as style="color: rgb(0, 0, 153);">org.jboss.seam.ScopeType.SESSION,
which corresponds to the JSF style="color: rgb(0, 0, 0);">managed bean session scope.
The
CatalogBeanitemCountproperty is used to get and display
the number of Catologue items in the data base:
Code Sample from: |
|
The CatalogBean
getItemCount()
method uses the JPA javax.persistence.
style="font-weight: bold; color: rgb(204, 0, 0);">Queryinterface to get the count of
all items in the database item table:
Code Sample from: .java |
itemCount |
A JSF commandLink is used to provide a link to
click on to
display the next page of items. The commandLink
tag represents an HTML hyperlink and is rendered as an HTML <a> element. The commandLink
tag is used to submit an
style="color: rgb(204, 0, 0); font-weight: bold;">actionevent to the application.
Code Sample from: |
|
This
commandLink style="color: rgb(204, 0, 0); font-weight: bold;">action attributereferences the CatalogBean
next()method that calculates
the
next page's first row number and returns a logical outcome
String, which causes the List page to display the next page's
list .
This
CatalogBeannext()method is defined as shown below:
Code Sample from: .java |
|
The JavaServer Faces NavigationHandler
matches the logical outcome, item_list
against the navigation rules
in the application configuration resource
file faces-config.xml to
determine which page to access next. In this case, the
JavaServer Faces implementation loads the List.jsp
page after this method returns.
| Code Sample from: faces-config.xml |
|
A JSF commandLink
is used to provide a link to click on to
display the previous page of items. This
style="color: rgb(204, 0, 0);">commandLink
action attribute references the
style="color: rgb(0, 102, 0); font-weight: bold;">CatalogBean's prev()method that
calculates the
previous page's first row number and returns a logical outcome
String, which causes the List page to display the previous page of
items :
Code Sample from: |
|
This
style="color: rgb(0, 102, 0); font-weight: bold;">CatalogBeanprev() method is defined as shown
below:
Code Sample from: .java |
|
A JSF commandLink is used to provide a link to click on to
display a page with the item details. This
style="color: rgb(204, 0, 0); font-weight: bold;">commandLink
action attribute references the
style="color: rgb(0, 102, 0); font-weight: bold;">CatalogBean select()method:
Code Sample from: |
|
With Seam if you use the
style="color: rgb(0, 0, 153); font-weight: bold;">@DataModelSelectionwith the @DataModelannotation, when the user clicks on the link, Seam will propagate the
selected row style="font-family: mon;">from the
style="font-weight: bold; color: rgb(0, 102, 0);"> style="font-family: monospace;">
style="color: rgb(204, 0, 0); font-weight: bold;" class="literal">DataModel
style="color: rgb(204, 0, 0);" class="literal"> into theannotated attribute:
Code Sample from: .java |
|
The @DataModelSelection
Seam annotation tells Seam to inject the
style="color: rgb(204, 0, 0); font-weight: bold;">DataModel
List
element corresponding to the clicked link into the
style="color: rgb(0, 102, 0); font-weight: bold;"> style="color: rgb(0, 102, 0); font-weight: bold;">item attribute. The
@OutSeam annotation transfers the value of this attribute to the
style="color: rgb(0, 102, 0); font-weight: bold;">itemevent context
variable, making it available to a
JSP page after the
style="color: rgb(204, 0, 0); font-weight: bold;">actioncatalog.select
method execution. So when a row of thedataTable is selected, the
selected row
is injected to the
style="color: rgb(0, 102, 0); font-weight: bold;">itemattribute of the
style="color: rgb(0, 102, 0); font-weight: bold;">CatalogBean
style="color: rgb(204, 0, 0);">Stateful bean, and thenoutjected to the event context
variable named
style="color: rgb(0, 102, 0); font-weight: bold;">itemwhich is used in the
Detail style="color: rgb(0, 0, 0);">.jsp page to displaythe item details.
The
CatalogBean
select() returns a string, style="font-weight: bold; color: rgb(0, 102, 0);">"item_detail", whichcauses the
Detail style="color: rgb(0, 0, 0);">.jsp page to displaythe item details. The JavaServer Faces
NavigationHandlermatches the logical outcome,
style="font-weight: bold; color: rgb(0, 102, 0);">item_detail
against the navigation rules in the application configuration resource
file faces-config.xml style="color: rgb(204, 0, 0);"> to determine which page to
access next. In this case, the
JavaServer Faces implementation loads thestyle="color: rgb(0, 102, 0); font-weight: bold;">Detail style="color: rgb(0, 0, 0);">.jsp
page after this method returns.
| Code Sample from: faces-config.xml |
|
The Detail.jsp uses the
style="color: rgb(204, 0, 0); font-weight: bold;">outputTextcomponent to display the
style="color: rgb(0, 102, 0); font-weight: bold;">itemproperties:
Code Sample from: |
|
src="http://weblogs.java.net/blog/caroljmcdonald/archive/images/detailpage.jpg"
height="800" width="646">
Conclusion
This concludes the sample application which demonstrates how to use
style="color: rgb(0, 0, 153);">Seam
with the JSF
style="color: rgb(204, 0, 0);">dataTable and
style="color: rgb(204, 0, 0);">DataModel to page through a
list
of Item
style="color: rgb(204, 0, 0);">Entities which are retrieved
using the
CatalogBean
style="color: rgb(204, 0, 0);">Stateful Session EJB methods
which use the
Java
Persistence APIs.
Configuration of the Application
for Seam 2.0, JSF, JPA, running on Glassfish V2
First I recommend reading Brian Leonard's
blog
href="http://weblogs.java.net/blog/bleonard/archive/2007/06/seam_refresh_1.html">Seam
Refresh . I will summarize
and update
those steps here:
- Download
and install NetBeans 6.1 bundled with GlassFish V2
- Alternatively you can
href="https://glassfish.dev.java.net/public/downloadsindex.html">Download
and install GlassFish V2 separately. - Download
and extract Seam 2.0
-
href="https://techdayscode.dev.java.net/servlets/ProjectDocumentList?folderID=7555">Download
the Sample Application Code
To Open and Test Run the seampagination Project:
- Use the Resolve Reference Problems dialog to map the ejb and web
modules to their
project, which are subdirectories beneath the seampagination
directory. - After the references are resolved, right-click the seampagination
project and select Open Required Projects. - Right-click
the seampagination-EJBModule and select Resolve
Reference
Problems:- browse to the Seam lib directory and select
style="font-weight: bold;"> jboss-seam.jar
and
select Open. This should resove the reference to the following jars:
jboss-seam.jar, hibernate.jar,
hibernate-validator.jar,
hibernate-annotations.jar, hibernate-commons-annotations.jar,
javassist.jar, dom4j.jar, commons-logging.jar.
- browse to the Seam lib directory and select
style="font-weight: bold;"> jboss-seam.jar
- Right-click the seampagination-WebModule and select Resolve
Reference
Problems:- Browse to the seampagination-ejb directory which is a
sub-directory below the seampagination directory and select Open
Project
Folder.
- Browse to the jboss-seam-ui.jar
found in Seam lib
directory. This should resolve the reference to the following
jars:
jboss-seam-ui.jar and
jboss-el.jar.
- Browse to the seampagination-ejb directory which is a
If you want to create your own Java EE
application using Seam 2.0 on Glassfish V2 with Netbeans from scratch
(read the steps in Brian Leonard's
blog
href="http://weblogs.java.net/blog/bleonard/archive/2007/06/seam_refresh_1.html">Seam
Refresh but use the SEAM 2.0 jars
listed here here):
- Use
Netbeans to create a new Enterprise Application - Right-click the Libraries node of the EJBModule project , choose
Add Jar and add these jars:- Seam \lib\jboss-seam.jar
- Seam \lib\hibernate.jar
- Seam \lib\hibernate-validator.jar
- Seam \lib\
class="style1">hibernate-annotations.jar
- Seam \lib\ class="style1">hibernate-commons-annotations.jar
- Seam \lib\javassist.jar
- Seam \lib\dom4j.jar
- Seam \lib\commons-logging.jar
- Right-click the Libraries node of the WebModule project ,
choose Add Jar and add these jars:- your ejbModule
- Seam \lib\jboss-seam-ui.jar
- Seam \lib\jboss-el.jar
- create an empty seam.properties file in the
seampagination-EJBModule src\conf Folder. - add the following phase listener to your
style="font-weight: bold;">faces-config.xml
file under webpages web-inf:
<lifecycle class="xml-tag">>
< style="color: rgb(204, 0, 0);">phase-listener class="xml-tag">>
style="color: rgb(0, 0, 153);">org.jboss.seam.jsf.SeamPhaseListener
class="xml-tag"></phase-listener>
class="xml-tag"></lifecycle>
class="xml-tag"> - add the following context parameter
to your web.xml file
<context-param class="xml-tag">>
< style="color: rgb(204, 0, 0);">param-name class="xml-tag">>
style="color: rgb(0, 0, 153);"> org.jboss.seam.core.init.jndiPattern
class="xml-tag"></param-name class="xml-tag">>
< style="color: rgb(204, 0, 0);">param-value class="xml-tag">>
java:comp/env/ style="font-style: italic; color: rgb(0, 102, 0);">your ear name/#{ejbName}/local
class="xml-tag"></param-value class="xml-tag">>
class="xml-tag"></context-param> - add the following listener class to your
web.xml file
<listener class="xml-tag">>
< style="color: rgb(204, 0, 0);">listener-class class="xml-tag">>
style="color: rgb(0, 0, 153);">org.jboss.seam.servlet.SeamListener
class="xml-tag"></listener-class class="xml-tag">>
</ class="xml-tag">listener class="xml-tag">>
- For any session EJB's referenced from the web, add EJB
references to your web.xml,
for example:
<ejb-local-ref class="xml-tag">>
< style="color: rgb(204, 0, 0);">ejb-ref-name class="xml-tag">> style="font-style: italic; color: rgb(0, 102, 0);">your ear name/CatalogBean/local class="xml-tag"></ejb-ref-name> class="xml-tag">
< style="color: rgb(204, 0, 0);">ejb-ref-type class="xml-tag">>Session</ejb-ref-type> class="xml-tag"> class="xml-tag"> class="xml-tag"> class="xml-tag">
< style="color: rgb(204, 0, 0);">local-home/ class="xml-tag">> class="xml-tag"> class="xml-tag">
< style="color: rgb(204, 0, 0);">local> style="font-style: italic; color: rgb(0, 102, 0);">your package name.Catalog class="xml-tag"></local> class="xml-tag">
< style="color: rgb(204, 0, 0);">ejb-link>CatalogBean class="xml-tag"></ejb-link> class="xml-tag">
</ class="xml-tag">ejb-local-ref> - For any EJB's referenced from the web add a Seam
interceptor to
the EJB, for example :style="font-weight: bold; color: rgb(204, 0, 0);">@Interceptors({ style="color: rgb(0, 0, 153);">org.jboss.seam.ejb.SeamInterceptor.class})
References:
- What's
new in Seam 2.0
-
href="http://weblogs.java.net/blog/bleonard/archive/2007/06/seam_refresh_1.html">Seam
Refresh -
href="http://docs.jboss.org/seam/2.0.0.GA/reference/en/html/en/html/tutorial.html">Seam
Tutorial -
href="http://www.michaelyuan.com/blog/2007/02/28/glassfish-and-seam-tips/">Glassfish
and Seam Tips -
href="http://www.amazon.com/exec/obidos/ASIN/0131347969/mobileenterpr-20/">JBoss
Seam: Simplicity and Power Beyond Java book
-
href="https://blueprints.dev.java.net/bpcatalog/ee5/persistence/index.html">Java
BluePrints Solutions Catalog for the Java Persistence APIs
contains a collection of topics and example applications. -
target="bpcatalog">Java
Persistence reference page on GlassFish Project - Java
EE tutorial, for good tutorial on JSF and JPA - Pro
EJB 3: Java Persistence API book
- Login or register to post comments
- Printer-friendly version
- caroljmcdonald's blog
- 1873 reads






Comments
by sippoy - 2009-04-12 11:08
I've deployed this seam 2.0 with jsf application but I don't know the URL to test the page, can you please let me know the URL to test this application?by sippoy - 2009-04-11 17:43
I've deployed this seam application but don't know the URL to access it. Can you please let me know the URL to access this application.by caroljmcdonald - 2009-02-22 17:17
I haven't tried seam-managed persistence, but I have read about it and there are examples in the book "seam in action", by Dan Allen. You use the @In annotion for seam managed persistence. Netbeans doesn't handle persistence or transactions either way, Glassfish and the persistence provider do that. Netbeans has a wizard for JPA that generates JPA entities from database tables, and queries for JSF pages or RESTful webservices. Netbeans does not have a wizard for seam, you can use the command line seam-gen for that, which you can also read about in the book seam in actionby telecomtom - 2009-02-19 11:36
Hello, great examples, good commentary. I was wondering, in regard to your other blog article that you referenced at the top of this article, could you extend or change the example to include Seam-managed persistence in Netbeans? And if you don't mind, also Seam-managed transactions, also in Netbeans? Or perhaps it would be easier at this point in time to just do it all in Eclipse? And that begs the question, how easy can you do Seam-managed persistence and transactions in Eclipse, if at all?by pecabo - 2008-02-14 02:17
Yes, I can :)))) Thank you for the hint :)by caroljmcdonald - 2008-02-13 07:09
the restapi is added by netbeans 6. can you just remove this from the librairies? otherwise I will upload a version with this removed.by pecabo - 2008-02-13 06:55
Bummer! But another question: if I use your example, I can't resolve the library problem: The project uses a class library called "restapi", but this class library was not found. What jars are bundled?by caroljmcdonald - 2008-02-13 06:40
Je ne sais pasby pecabo - 2008-02-13 06:34
I did it à la If you want to create your own Java EE application using Seam 2.0 on Glassfish V2 with Netbeans from scratch (read the steps in Brian Leonard's blog Seam Refresh but use the SEAM 2.0 jars listed here here): from the scrath with the help of netbeans6 and addes the necessary entries and the jars listed above :)by caroljmcdonald - 2008-02-13 06:13
Did you use the jars listed in this blog? Brian's example needs the jar in this blog to work. I don't know, you could ask in the Glassfish forum.by pecabo - 2008-02-13 06:01
Hi, I implemented the example of Brian Leonard with glassfish and Seam 2. But if I press the button, I get the exception javax.el.MethodNotFoundException: Method not found: de.barmenia.muv.seamNB6.service.ManagerActionLocal_9501578.sayHallo() I'm very suprised at the _9501578-extension. Have you any idea to fix my problem?by caroljmcdonald - 2008-02-07 15:12
Yes I did implement a sample catalog app with Spring 2.5, see my previous blog entry. (but its not Seam and Spring together)by disa - 2008-02-07 15:07
Hello! Did you try it with Spring 2.5? I get Validation Error (invalid stack size) when trying to use @Transactional and my aspect both under Spring 2.5. It seems that something wrong with CGLIB. I'm running my application with spring-agent and Spring JUnit integration annotation.by cayhorstmann - 2008-01-28 22:31
Venkatesh's example is interesting too, but what's special about Carol's is that she uses GlassFish's JPA implementation, not Hibernate. Nothing wrong with Hibernate, of course, but it is good to beat on TopLink to make sure it is up to snuff.
Hopefully, the next version of GlassFish will auto-discover the beans, just like JBoss does.
by venkatesh045 - 2008-01-27 22:21
http://blogs.sun.com/venky/entry/developing_seam_application_with_woodstock Uses seam with woodstock on netbeans.