We are pleased to announce the availability of Seam XML Configuration 3.0.0.Alpha3 and Seam Persistence 3.0.0.Alpha1.

 

Seam Persistence

 

Seam Persistence brings transactions to managed beans, and also provides the Seam Managed Persistence Context, a conversation scoped extended persistence context for use in CDI based applications. Currently it provides the following features

 

 

In keeping with the spirit of he Seam Managed persistence context is configured via annotations:

 

@Produces
@ConversationScoped
@SeamManaged
@PersistenceUnit(unitName="myPu")
EntityManagerFactory factory;

 

The SMPC can then be injected directly into your managed beans:

 

@Inject
EntityManager em;

 

 

For more information check out the getting started guide.

 

[Download] [JIRA] [Reference Guide] [Project Page]

 

Seam XML Config

 

Seam XML Configuration allows you to configure CDI beans using XML, this release is mainly a compatibility and bugfix release, however there are some notable changes.

 

Seam XML now supports the concept of XML configured virtual producer fields. These fields can be used to configure primitive types and Java EE resources via XML:

 

<s:EntityManager>
  <s:Produces/>
  <sPersistenceContext unitName="customerPu" />
</s:EntityManager>
<s:String>
  <s:Produces/>
  <my:VersionQualifier />
  <value>Version 1.23</value>
</s:String>
<s:EntityManager>
  <s:Produces/>
  <sPersistenceContext unitName="customerPu" />
</s:EntityManager>

<s:String>
  <s:Produces/>
  <my:VersionQualifier />
  <value>Version 1.23</value>
</s:String>

 

This is equivilent to the following java:

 

class SomeClass {

  @Produces
  @PersistenceContext(unitName="customerPu")
  EntityManager field1;

  @Produces
  @VersionQualifier
  String field2 = "Version 1.23";

}

 

 

Using virtual producer fields it is also possible to configure the Seam Managed Persistence Context via XML.

 

The other notable change is that generic beans have been removed, as these are now provided as part of Weld Extensions.

 

[Download] [JIRA] [Reference Guide] [Project Page]