• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How can I stream blobs to/from entities?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I stream blobs to/from entities?


  • Subject: How can I stream blobs to/from entities?
  • From: Serge Froment <email@hidden>
  • Date: Mon, 12 Apr 2004 16:03:55 -0400

Hi,

In a WebObjects 5.2 project, I need to store large blobs of data in a database and my web application needs to let the user upload/download those. I want to code accessors for my entity that use InputStream/OutputStream instead of NSData so the data will not fill up memory.

class MyEntity extends EOEnterpriseObject
{
    (...)
    public InputStream myBlobAttribute()
    {
        (...)
    }
    public void setMyBlobAttribute(OutputStream stream)
    {
        (...)
    }
}

What I need to know is how I can connect to the database using a java.sql.Connection instance to stream the data to/from the database. I don't want to create a new connection each time because establishing a new connection is costly, but I can't figure out how I can reach the existing connection that WebObjects maintains and use it in an EOF-friendly manner.

Serge Froment
http://www.serge-froment.com
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: How can I stream blobs to/from entities?
      • From: Jonathan Rochkind <email@hidden>
  • Prev by Date: Re: DirectToWeb java.lang.NullPointerException
  • Next by Date: Re: What class generates the sql?
  • Previous by thread: Re: DirectToWeb java.lang.NullPointerException
  • Next by thread: Re: How can I stream blobs to/from entities?
  • Index(es):
    • Date
    • Thread