Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
JcrMappingTemplate and ObjectContentManager Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JcrMappingTemplate and ObjectContentManager

    I am looking through the JcrMappingTemplate code trying to get a good understanding of how the code works. One thing that I noticed is that it appears that a new ObjectContentManager is created for each jcr action.

    In the execute(final JcrMappingCallback action, boolean exposeNativeSession) method of the JcrMappingTemplate, the doInJcrMapping method creates a new ObjectContentManager. Does it create a new OCM for each execution of the parent execute() method?

    It would seem like there should be a way to create an OCM during initialization and just pass in a new session for each JCR query. I did a very basic performance test comparing using the JcrMappingTemplate using the doInJcr() methods versus just doing the query outside of the doInJcr() method and my results showed that not using the doInJcr() method was a lot faster. So I am guessing that creating a new OCM for each request is taking up a lot of time.
Working...
X