[JBoss Seam] - Re: @Begin and @End
by gavin.king@jboss.com
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>
Alternatively, an approach I prefer is to only store the userId in session scope, and create a conversation-scoped manager component for the actual User, ie:
@Scope(CONVERSATION)
| @Name("user")
| public class ManagedUser
| {
| @In(create=true)
| private EntityManager myDatabase;
|
| @In String userId;
|
| @Unwrap
| public User getUser()
| {
| return myDatabase.find(User.class, userId);
| }
| }
Now, of course you won't get caching of the 100 dependent objects in the session scope, but they do at least get cached in the conversation scope. You will never experience LIEs, as long as you always refer to the dependent objects by injecting the User and then navigating.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959267#3959267
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959267
19 years, 9 months
[JBoss jBPM] - Re: jbpm-gpd-site-3.0.11.zip from sourceforge download does
by cormierjf
I am using a fresh install of Eclipse Version: 3.1.1
Build id: M20050929-0840
Here is an example of the exception i get when intalling the site:
!ENTRY org.eclipse.update.core 4 0 2006-07-19 09:39:22.292
| !MESSAGE Unable to retrieve remote reference "jar:file:J:/17050_Information_Technology_Application_Development/17050_4_Application_Development_Tools/jbpm/jbpm-gpd-site-3.0.11.zip!/plugins/org.eclipse.jem.util_1.2.0.v20060530-RC2.jar". [JAR entry plugins/org.eclipse.jem.util_1.2.0.v20060530-RC2.jar not found in J:\17050_Information_Technology_Application_Development\17050_4_Application_Development_Tools\jbpm\jbpm-gpd-site-3.0.11.zip]
| !STACK 0
| java.io.FileNotFoundException: JAR entry plugins/org.eclipse.jem.util_1.2.0.v20060530-RC2.jar not found in J:\17050_Information_Technology_Application_Development\17050_4_Application_Development_Tools\jbpm\jbpm-gpd-site-3.0.11.zip
| at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
| at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
| at org.eclipse.update.internal.core.OtherResponse.getInputStream(OtherResponse.java:34)
| at org.eclipse.update.core.ContentReference.getInputStream(ContentReference.java:146)
| at org.eclipse.update.core.FeatureContentProvider.asLocalReference(FeatureContentProvider.java:250)
| at org.eclipse.update.internal.core.FeaturePackagedContentProvider.getPluginEntryArchiveReferences(FeaturePackagedContentProvider.java:165)
| at org.eclipse.update.internal.operations.UpdateUtils.downloadFeatureContent(UpdateUtils.java:627)
| at org.eclipse.update.internal.ui.wizards.InstallWizard2.download(InstallWizard2.java:405)
| at org.eclipse.update.internal.ui.wizards.InstallWizard2.access$3(InstallWizard2.java:394)
| at org.eclipse.update.internal.ui.wizards.InstallWizard2$4.run(InstallWizard2.java:350)
| at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
As you can see it's looking for the file with the "-RC2" but in the zip file the file has "_RC2"
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959261#3959261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959261
19 years, 9 months