Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359818 - Provide mechanisms to allow pluggable LOB management at repository level
Summary: Provide mechanisms to allow pluggable LOB management at repository level
Status: NEW
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 06:25 EDT by Erdal Karaca CLA
Modified: 2020-12-11 10:42 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erdal Karaca CLA 2011-10-04 06:25:21 EDT
Currently, all lob management is handled by the underlying store of the repository. It would be great if this could be possible independently of the store.
I.e. at repository level.
Maybe, to be configured like this:

<repository>
  <lobAccessor class="com.example.MyJCRLobAccessor">
     <!-- NOTE: implementation specific properties -->
     <property name="webDavAccessPoint" value="http://localhost:8080/repository/default/" />
     <property name="user" value="admin" />
     <property name="pwd" value="admin" />
  </lobAccessor>
  
  <store...>...</store>
</repository>

Then, org.eclipse.emf.cdo.internal.server.Repository.handleLobs(long, long, CDOLobHandler) could be rewritten to:

  public void loadLob(byte[] id, OutputStream out) throws IOException
  {
    if ( lobAccessor == null ) {
      IStoreAccessor accessor = StoreThreadLocal.getAccessor();
      accessor.loadLob(id, out);
    } else {
      lobAccessor.loadLob(id, out);
    }
  }
  
The other two methods could be changed accordingly...

Such an enhancement would allow CDO users to re-use existing content management systems, e.g. they would be able to use a JCR implementation as their lob storage...
Comment 1 Eike Stepper CLA 2011-10-05 03:21:38 EDT
Guys, what about a DelegatingStore that implements InternalStore by delegating to any kind of "real" store? This delegating store should be able to customize any piece of functionality.
Comment 2 Erdal Karaca CLA 2011-10-05 05:10:27 EDT
(In reply to comment #1)
> Guys, what about a DelegatingStore that implements InternalStore by delegating
> to any kind of "real" store? This delegating store should be able to customize
> any piece of functionality.

Sounds too complex, doesn't it? Or: How/where would I plug in the "LOB management"?
Maybe, I missed something...
Comment 3 Eike Stepper CLA 2011-10-05 05:16:07 EDT
You'd intercept the following methods:

IStoreAccessor.queryLobs(List<byte[]>)
IStoreAccessor.loadLob(byte[], OutputStream)
IStoreAccessor.handleLobs(long, long, CDOLobHandler)
IStoreAccessor.write(InternalCommitContext, OMMonitor)
IStoreAccessor.commit(OMMonitor)
IStoreAccessor.rollback()

I agree with the newsgroup discussion in that the proper participation in the transaction when committing LOBs will probably be the most challenging task. But that's unrelated to the place where the LOB handling is hooked up.
Comment 4 Eike Stepper CLA 2012-08-14 22:57:49 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 5 Eike Stepper CLA 2013-06-27 04:08:55 EDT
Moving all outstanding enhancements to 4.3
Comment 6 Eike Stepper CLA 2014-08-19 09:28:25 EDT
Moving all open enhancement requests to 4.4
Comment 7 Eike Stepper CLA 2014-08-19 09:37:36 EDT
Moving all open enhancement requests to 4.4
Comment 8 Eike Stepper CLA 2015-07-14 02:21:39 EDT
Moving all open bugzillas to 4.5.
Comment 9 Eike Stepper CLA 2016-07-31 01:04:26 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 10 Eike Stepper CLA 2017-12-28 01:12:50 EST
Moving all open bugs to 4.7
Comment 11 Eike Stepper CLA 2019-11-08 02:12:37 EST
Moving all unresolved issues to version 4.8-
Comment 12 Eike Stepper CLA 2019-12-13 12:45:14 EST
Moving all unresolved issues to version 4.9
Comment 13 Eike Stepper CLA 2020-12-11 10:42:44 EST
Moving to 4.13.