Re: svn commit: r828748 - /incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r828748 - /incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java

Guillaume Nodet
On Thu, Oct 22, 2009 at 17:31,  <[hidden email]> wrote:

> Author: ozzy
> Date: Thu Oct 22 15:31:14 2009
> New Revision: 828748
>
> URL: http://svn.apache.org/viewvc?rev=828748&view=rev
> Log:
> ARIES-25 Add override processing to findEntry/findEntries
>
> Modified:
>    incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
>
> Modified: incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
> URL: http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java?rev=828748&r1=828747&r2=828748&view=diff
> ==============================================================================
> --- incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java (original)
> +++ incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java Thu Oct 22 15:31:14 2009
> @@ -18,6 +18,8 @@
>  */
>  package org.apache.aries.blueprint.container;

> +
> +    private String cachePath(Bundle bundle, String filePath)
> +    {
> +      return bundle.getSymbolicName() + "/" + bundle.getVersion() + "/" + filePath;
> +    }
> +

I have problems to understand why this is necessary ? When calling
context.getDataFile(), isn't the framework supposed to return a file
in a path which is specific to the bundle ?  It should not be
necessary to prefix those with the symbolic name and version.  Is
there any other reason to do that ?


--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r828748 - /incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java

The Dweller
Hi..

Key here is that we are storing the private data within the blueprint
bundles storage, not that of the app bundle
(achieved by using context.getDataFile, where context is the extenders
BundleContext, not the context of the app Bundle).

This is important, as it means we are able to store the data without causing
the app Bundle to transition state, important for lazy bundles etc.

Thus, as we store all overrides within a single bundle, they have to be
prefixed to enable us to keep the data apart.

Regards,
Ozzy

On Thu, Oct 22, 2009 at 4:55 PM, Guillaume Nodet <[hidden email]> wrote:

> On Thu, Oct 22, 2009 at 17:31,  <[hidden email]> wrote:
> > Author: ozzy
> > Date: Thu Oct 22 15:31:14 2009
> > New Revision: 828748
> >
> > URL: http://svn.apache.org/viewvc?rev=828748&view=rev
> > Log:
> > ARIES-25 Add override processing to findEntry/findEntries
> >
> > Modified:
> >
>  incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
> >
> > Modified:
> incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
> > URL:
> http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java?rev=828748&r1=828747&r2=828748&view=diff
> >
> ==============================================================================
> > ---
> incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
> (original)
> > +++
> incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
> Thu Oct 22 15:31:14 2009
> > @@ -18,6 +18,8 @@
> >  */
> >  package org.apache.aries.blueprint.container;
>
> > +
> > +    private String cachePath(Bundle bundle, String filePath)
> > +    {
> > +      return bundle.getSymbolicName() + "/" + bundle.getVersion() + "/"
> + filePath;
> > +    }
> > +
>
> I have problems to understand why this is necessary ? When calling
> context.getDataFile(), isn't the framework supposed to return a file
> in a path which is specific to the bundle ?  It should not be
> necessary to prefix those with the symbolic name and version.  Is
> there any other reason to do that ?
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r828748 - /incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java

Guillaume Nodet
Makes sense.  I missed we were using the extender context.
Thx for the detailed explaination !

On Thu, Oct 22, 2009 at 18:08, The Dweller <[hidden email]> wrote:

> Hi..
>
> Key here is that we are storing the private data within the blueprint
> bundles storage, not that of the app bundle
> (achieved by using context.getDataFile, where context is the extenders
> BundleContext, not the context of the app Bundle).
>
> This is important, as it means we are able to store the data without causing
> the app Bundle to transition state, important for lazy bundles etc.
>
> Thus, as we store all overrides within a single bundle, they have to be
> prefixed to enable us to keep the data apart.
>
> Regards,
> Ozzy
>
> On Thu, Oct 22, 2009 at 4:55 PM, Guillaume Nodet <[hidden email]> wrote:
>
>> On Thu, Oct 22, 2009 at 17:31,  <[hidden email]> wrote:
>> > Author: ozzy
>> > Date: Thu Oct 22 15:31:14 2009
>> > New Revision: 828748
>> >
>> > URL: http://svn.apache.org/viewvc?rev=828748&view=rev
>> > Log:
>> > ARIES-25 Add override processing to findEntry/findEntries
>> >
>> > Modified:
>> >
>>  incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
>> >
>> > Modified:
>> incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
>> > URL:
>> http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java?rev=828748&r1=828747&r2=828748&view=diff
>> >
>> ==============================================================================
>> > ---
>> incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
>> (original)
>> > +++
>> incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
>> Thu Oct 22 15:31:14 2009
>> > @@ -18,6 +18,8 @@
>> >  */
>> >  package org.apache.aries.blueprint.container;
>>
>> > +
>> > +    private String cachePath(Bundle bundle, String filePath)
>> > +    {
>> > +      return bundle.getSymbolicName() + "/" + bundle.getVersion() + "/"
>> + filePath;
>> > +    }
>> > +
>>
>> I have problems to understand why this is necessary ? When calling
>> context.getDataFile(), isn't the framework supposed to return a file
>> in a path which is specific to the bundle ?  It should not be
>> necessary to prefix those with the symbolic name and version.  Is
>> there any other reason to do that ?
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>>
>



--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com