UNSOLVED

edn_migrator

updated

18 years ago

0

3561

July 28th, 2008 06:00

FP_OUT_OF_MEMORY_ERR when creating new C-Clip

This discussion thread has been imported from the Centera Developer Portal Forums.

The first message is shown here, and the complete thread is in the attached PDF file.

Please read the PDF and continue the discussion here.

From carsten.schulze@marabu-ed

Posted Mon Jul 14, 2008

Hello,

After archiving 58.000 objects to centera I got an out of memory error everytime when creating a new c-clip. After restarting my application no such error occurs.

I wll try what I do:

We run our application in JBoss AS as an service bean. Within this service bean we connect to different pools at startup of the service bean and share these pool connections to different threads which will archive a new object to centera or get an already archived object. The pool connections will never be closed but when I stop my application (or shutdown the JBoss AS).

Sample code steps:

FPPool pool = null;

FPClip clip = null;

FPTag topTag = null;

FPTag dataTag = null;

try {

pool = getPoolRef();

clip = new FPClip(pool);

topTag = clip.getTopTag();

dataTag = new FPTag(topTag, "data");

InputStream in = new FPFileInputStream("...");

dataTag.BlobWrite(in);

} catch(FPLibraryException ex) {

// ... Exception Handling

} finally {

dataTag.Close();

topTag.Close();

clip.Close();

}

So what could be the reason for the out of memory exception?

Maybe have I to close the input stream for my self? I saw I don't do this manually. Could that be the reason?

Please help.

Kind regards

Marco.

1 Attachment