Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [CDO][0.8.0] Release StoreReader
[CDO][0.8.0] Release StoreReader [message #104570] Fri, 14 December 2007 14:28 Go to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Why we do not release storeReader in PackageManager ?

In my case .. I always have a session open to the database after the
initialization of my server.
@Override

protected void doActivate() throws Exception

{

super.doActivate();

IStoreReader storeReader = repository.getStore().getReader(null);

Collection<CDOPackageInfo> packageInfos = storeReader.readPackageInfos();

for (CDOPackageInfo info : packageInfos)

{

addPackage(new CDOPackageImpl(this, info.getPackageURI(), info.isDynamic(),
info.getMetaIDRange()));

}

}
Re: [CDO][0.8.0] Release StoreReader [message #104585 is a reply to message #104570] Fri, 14 December 2007 17:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Hi Simon,

That looks like a bug. The fix is easy:

@Override
protected void doActivate() throws Exception
{
super.doActivate();
IStoreReader storeReader = null;

try
{
storeReader = repository.getStore().getReader(null);
Collection<CDOPackageInfo> packageInfos =
storeReader.readPackageInfos();
for (CDOPackageInfo info : packageInfos)
{
addPackage(new CDOPackageImpl(this, info.getPackageURI(),
info.isDynamic(), info.getMetaIDRange()));
}
}
finally
{
if (storeReader != null)
{
storeReader.release();
}
}
}

Can you please open a Bugzilla?

Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j





Simon McDuff schrieb:
> Why we do not release storeReader in PackageManager ?
>
> In my case .. I always have a session open to the database after the
> initialization of my server.
> @Override
>
> protected void doActivate() throws Exception
>
> {
>
> super.doActivate();
>
> IStoreReader storeReader = repository.getStore().getReader(null);
>
> Collection<CDOPackageInfo> packageInfos = storeReader.readPackageInfos();
>
> for (CDOPackageInfo info : packageInfos)
>
> {
>
> addPackage(new CDOPackageImpl(this, info.getPackageURI(), info.isDynamic(),
> info.getMetaIDRange()));
>
> }
>
> }
>
>
>
Re: [CDO][0.8.0] Release StoreReader [message #104656 is a reply to message #104585] Sat, 15 December 2007 05:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Bugzilla fixed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=213083

Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j



Eike Stepper schrieb:
> Hi Simon,
>
> That looks like a bug. The fix is easy:
>
> @Override
> protected void doActivate() throws Exception
> {
> super.doActivate();
> IStoreReader storeReader = null;
>
> try
> {
> storeReader = repository.getStore().getReader(null);
> Collection<CDOPackageInfo> packageInfos =
> storeReader.readPackageInfos();
> for (CDOPackageInfo info : packageInfos)
> {
> addPackage(new CDOPackageImpl(this, info.getPackageURI(),
> info.isDynamic(), info.getMetaIDRange()));
> }
> }
> finally
> {
> if (storeReader != null)
> {
> storeReader.release();
> }
> }
> }
>
> Can you please open a Bugzilla?
>
> Regards,
> Eike Stepper
> ----
> http://wiki.eclipse.org/CDO
> http://wiki.eclipse.org/Net4j
>
>
>
>
>
> Simon McDuff schrieb:
>> Why we do not release storeReader in PackageManager ?
>>
>> In my case .. I always have a session open to the database after the
>> initialization of my server.
>> @Override
>>
>> protected void doActivate() throws Exception
>>
>> {
>>
>> super.doActivate();
>>
>> IStoreReader storeReader = repository.getStore().getReader(null);
>>
>> Collection<CDOPackageInfo> packageInfos =
>> storeReader.readPackageInfos();
>>
>> for (CDOPackageInfo info : packageInfos)
>>
>> {
>>
>> addPackage(new CDOPackageImpl(this, info.getPackageURI(),
>> info.isDynamic(), info.getMetaIDRange()));
>>
>> }
>>
>> }
>>
>>
>>
Re: [CDO][0.8.0] Release StoreReader [message #104698 is a reply to message #104656] Sun, 16 December 2007 15:05 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Thank you!

"Eike Stepper" <stepper@sympedia.de> a
Re: [CDO][0.8.0] Release StoreReader [message #612802 is a reply to message #104570] Fri, 14 December 2007 17:03 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6515
Registered: July 2009
Senior Member
Hi Simon,

That looks like a bug. The fix is easy:

@Override
protected void doActivate() throws Exception
{
super.doActivate();
IStoreReader storeReader = null;

try
{
storeReader = repository.getStore().getReader(null);
Collection<CDOPackageInfo> packageInfos =
storeReader.readPackageInfos();
for (CDOPackageInfo info : packageInfos)
{
addPackage(new CDOPackageImpl(this, info.getPackageURI(),
info.isDynamic(), info.getMetaIDRange()));
}
}
finally
{
if (storeReader != null)
{
storeReader.release();
}
}
}

Can you please open a Bugzilla?

Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j





Simon McDuff schrieb:
> Why we do not release storeReader in PackageManager ?
>
> In my case .. I always have a session open to the database after the
> initialization of my server.
> @Override
>
> protected void doActivate() throws Exception
>
> {
>
> super.doActivate();
>
> IStoreReader storeReader = repository.getStore().getReader(null);
>
> Collection<CDOPackageInfo> packageInfos = storeReader.readPackageInfos();
>
> for (CDOPackageInfo info : packageInfos)
>
> {
>
> addPackage(new CDOPackageImpl(this, info.getPackageURI(), info.isDynamic(),
> info.getMetaIDRange()));
>
> }
>
> }
>
>
>


Re: [CDO][0.8.0] Release StoreReader [message #612814 is a reply to message #104585] Sat, 15 December 2007 05:16 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6515
Registered: July 2009
Senior Member
Bugzilla fixed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=213083

Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j



Eike Stepper schrieb:
> Hi Simon,
>
> That looks like a bug. The fix is easy:
>
> @Override
> protected void doActivate() throws Exception
> {
> super.doActivate();
> IStoreReader storeReader = null;
>
> try
> {
> storeReader = repository.getStore().getReader(null);
> Collection<CDOPackageInfo> packageInfos =
> storeReader.readPackageInfos();
> for (CDOPackageInfo info : packageInfos)
> {
> addPackage(new CDOPackageImpl(this, info.getPackageURI(),
> info.isDynamic(), info.getMetaIDRange()));
> }
> }
> finally
> {
> if (storeReader != null)
> {
> storeReader.release();
> }
> }
> }
>
> Can you please open a Bugzilla?
>
> Regards,
> Eike Stepper
> ----
> http://wiki.eclipse.org/CDO
> http://wiki.eclipse.org/Net4j
>
>
>
>
>
> Simon McDuff schrieb:
>> Why we do not release storeReader in PackageManager ?
>>
>> In my case .. I always have a session open to the database after the
>> initialization of my server.
>> @Override
>>
>> protected void doActivate() throws Exception
>>
>> {
>>
>> super.doActivate();
>>
>> IStoreReader storeReader = repository.getStore().getReader(null);
>>
>> Collection<CDOPackageInfo> packageInfos =
>> storeReader.readPackageInfos();
>>
>> for (CDOPackageInfo info : packageInfos)
>>
>> {
>>
>> addPackage(new CDOPackageImpl(this, info.getPackageURI(),
>> info.isDynamic(), info.getMetaIDRange()));
>>
>> }
>>
>> }
>>
>>
>>


Re: [CDO][0.8.0] Release StoreReader [message #612820 is a reply to message #104656] Sun, 16 December 2007 15:05 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Thank you!

"Eike Stepper" <stepper@sympedia.de> a
Previous Topic:[CDO][0.8.0] Changing Model
Next Topic:[CDO][0.8.0] Changing Model
Goto Forum:
  


Current Time: Tue Oct 27 21:27:46 GMT 2020

Powered by FUDForum. Page generated in 0.02699 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top