[jboss-user] [JBoss Seam] - Re: @Begin and @End
Holger Prause
do-not-reply at jboss.com
Thu Jul 20 01:05:16 EDT 2006
"gavin.king at jboss.com" wrote : If you really _have_ to have transparent lazy fetching of data off of the user, combined with caching of that data then create a session-scoped managed persistence context.
|
| There are a couple of ways to do this, but the easiest is to use Seam 1.1 CVS build and throw the following in components.xml:
|
| <component name="userDatabase"
| | scope="session"
| | class="org.jboss.seam.core.ManagedPersistenceContext">
| | <property name="persistenceUnitJndiName">java:/myEntityManagerFactory</property>
| | </component>
| |
|
| Hello, i want to use the approache mentionend above but i have some questions regarding this.
|
| 1)
| What does "myEntityManagerFactory" means in this context, is that the value of the "jboss.entity.manager.factory.jndi.name" property described in my persistence.xml ?
|
|
| | <property name="persistenceUnitJndiName">java:/myEntityManagerFactory</property>
| |
|
| 2) how can i use this(java side)?
|
| Should i use
|
| @PersistenceContext
| private EntityManager em;
|
| or (adepting your example nr1)
|
| @In(create=true)
| private EntityManager userDatabase;
|
|
| Thank u very much,
|
| Holger
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959423#3959423
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959423
More information about the jboss-user
mailing list