• Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP 6.0.0
    • Fix Version/s: EAP 6.1.0
    • Component/s: Hibernate
    • Labels:
    • Environment:

      JBoss Enterprise Application Platform(EAP) 6.0.0
      Hibernate 4.1.7


      This is a productization clone of HHH-7698.

      When the user wants to create a lob-locator (mapped in the entity as a JDBC Blob/Clob/NClob), Hibernate provides a convenience for creating the lob-locator instance via the LobHelper obtained from the Session. LobHelper provides methods to create Blobs, Clobs and NClobs.
      There are forms for each that accept an existing stream. Currently, how that gets handlesd and eventually passed to the database is inefficient. The problem is twofold.
      First, we try to rely on the lob-locator creation of the JDBC driver if possible. THe problem there is that those methods do not accept and parameters. So you simply create an empty lob-locator which you then need to fill. And the only way to fill it given an InputStream is to copy that stream's content over. Which causes the stream data to be read into memory.
      Second, we have a suboptimal implementation of copying streams from an in-memory lob-locator to the JDBC driver as a stream. Specifically, this is in cases where the LobHelper is not using the JDBC driver's lob creation methods, instead creating a "mock" lob.

        Gliffy Diagrams


            Issue Links



                • Assignee:
                  brmeyer Brett Meyer
                  adam.kovari Adam Kovari
                • Votes:
                  0 Vote for this issue
                  3 Start watching this issue


                  • Created: