You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Charles Moulliard <cm...@gmail.com> on 2011/08/11 18:05:07 UTC

Add optional import package for Apache ServiceMix Bundle Antlr

Hi,

When using HQL token of Hibernate, we can use the Hibernate parser
(org.hibernate.hql.classic.ClassicQueryTranslatorFactory) or Hibernate
AST (based on Antlr - org.hibernate.hql.ast.ASTQueryTranslatorFactory)
to translate the query. In this case, the package
org.hibernate.hql.ast is needed by Antlr bundle. As we have in some
cases (random begavior due to resolution mechanism which is not
dynamic), some issues when adding this package using a fragment bundle
to Apache ServiceMix Antlr bundle, I would like to add it as an
optional package in the next release of Apache ServiceMix Antlr.

Is it an issue ?

Regards,

Charles Moulliard

Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard

Re: Add optional import package for Apache ServiceMix Bundle Antlr

Posted by Charles Moulliard <cm...@gmail.com>.
I will do that now.


On Fri, Aug 12, 2011 at 8:12 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Agree Freeman,
>
> it's just to find a workaround without a new version of the bundle.
>
> Anyway, I'm OK with the import.
>
> @Charles, could you raise a Jira to update the antlr bundle ?
>
> Regards
> JB
>
> On 08/12/2011 03:49 AM, Freeman Fang wrote:
>>
>> Hi JB,
>>
>> Using dynamic-import isn't the best practice in OSGi world, though in
>> some cases we can't totally avoid it, but we should avoid using it as
>> much as possible.
>> In this case since we already know exactly which package we want to
>> import, using optional import should be better.
>>
>> Btw, though hibernate lib isn't Apache compatible license, just optional
>> import org.hibernate... package in pom.xml should be ok IMHO, if I'm
>> wrong here please correct me.
>>
>> Freeman
>>
>> On 2011-8-12, at 上午1:21, Jean-Baptiste Onofré wrote:
>>
>>> Hi Charles,
>>>
>>> isn't it possible to use dynamic import ?
>>>
>>> Regards
>>> JB
>>>
>>> On 08/11/2011 06:05 PM, Charles Moulliard wrote:
>>>>
>>>> Hi,
>>>>
>>>> When using HQL token of Hibernate, we can use the Hibernate parser
>>>> (org.hibernate.hql.classic.ClassicQueryTranslatorFactory) or Hibernate
>>>> AST (based on Antlr - org.hibernate.hql.ast.ASTQueryTranslatorFactory)
>>>> to translate the query. In this case, the package
>>>> org.hibernate.hql.ast is needed by Antlr bundle. As we have in some
>>>> cases (random begavior due to resolution mechanism which is not
>>>> dynamic), some issues when adding this package using a fragment bundle
>>>> to Apache ServiceMix Antlr bundle, I would like to add it as an
>>>> optional package in the next release of Apache ServiceMix Antlr.
>>>>
>>>> Is it an issue ?
>>>>
>>>> Regards,
>>>>
>>>> Charles Moulliard
>>>>
>>>> Apache Committer
>>>>
>>>> Blog : http://cmoulliard.blogspot.com
>>>> Twitter : http://twitter.com/cmoulliard
>>>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>>>> Skype: cmoulliard
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
>> ---------------------------------------------
>> Freeman Fang
>>
>> FuseSource
>> Email:ffang@fusesource.com
>> Web: fusesource.com
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Add optional import package for Apache ServiceMix Bundle Antlr

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Agree Freeman,

it's just to find a workaround without a new version of the bundle.

Anyway, I'm OK with the import.

@Charles, could you raise a Jira to update the antlr bundle ?

Regards
JB

On 08/12/2011 03:49 AM, Freeman Fang wrote:
> Hi JB,
>
> Using dynamic-import isn't the best practice in OSGi world, though in
> some cases we can't totally avoid it, but we should avoid using it as
> much as possible.
> In this case since we already know exactly which package we want to
> import, using optional import should be better.
>
> Btw, though hibernate lib isn't Apache compatible license, just optional
> import org.hibernate... package in pom.xml should be ok IMHO, if I'm
> wrong here please correct me.
>
> Freeman
>
> On 2011-8-12, at 上午1:21, Jean-Baptiste Onofré wrote:
>
>> Hi Charles,
>>
>> isn't it possible to use dynamic import ?
>>
>> Regards
>> JB
>>
>> On 08/11/2011 06:05 PM, Charles Moulliard wrote:
>>> Hi,
>>>
>>> When using HQL token of Hibernate, we can use the Hibernate parser
>>> (org.hibernate.hql.classic.ClassicQueryTranslatorFactory) or Hibernate
>>> AST (based on Antlr - org.hibernate.hql.ast.ASTQueryTranslatorFactory)
>>> to translate the query. In this case, the package
>>> org.hibernate.hql.ast is needed by Antlr bundle. As we have in some
>>> cases (random begavior due to resolution mechanism which is not
>>> dynamic), some issues when adding this package using a fragment bundle
>>> to Apache ServiceMix Antlr bundle, I would like to add it as an
>>> optional package in the next release of Apache ServiceMix Antlr.
>>>
>>> Is it an issue ?
>>>
>>> Regards,
>>>
>>> Charles Moulliard
>>>
>>> Apache Committer
>>>
>>> Blog : http://cmoulliard.blogspot.com
>>> Twitter : http://twitter.com/cmoulliard
>>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>>> Skype: cmoulliard
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Add optional import package for Apache ServiceMix Bundle Antlr

Posted by Johan Edstrom <se...@gmail.com>.
I think importing is okay…
And yes, we really do not want to start sprinkling dynamic if we can avoid it.


On Aug 11, 2011, at 7:49 PM, Freeman Fang wrote:

> Hi JB,
> 
> Using dynamic-import isn't the best practice in OSGi world, though in some cases we can't totally avoid it, but we should avoid using it as much as possible.
> In this case since we already know exactly which package we want to import, using optional import should be better.
> 
> Btw, though hibernate lib isn't Apache compatible license, just optional import org.hibernate... package in pom.xml should be ok IMHO, if I'm wrong here please correct me.
> 
> Freeman
> 
> On 2011-8-12, at 上午1:21, Jean-Baptiste Onofré wrote:
> 
>> Hi Charles,
>> 
>> isn't it possible to use dynamic import ?
>> 
>> Regards
>> JB
>> 
>> On 08/11/2011 06:05 PM, Charles Moulliard wrote:
>>> Hi,
>>> 
>>> When using HQL token of Hibernate, we can use the Hibernate parser
>>> (org.hibernate.hql.classic.ClassicQueryTranslatorFactory) or Hibernate
>>> AST (based on Antlr - org.hibernate.hql.ast.ASTQueryTranslatorFactory)
>>> to translate the query. In this case, the package
>>> org.hibernate.hql.ast is needed by Antlr bundle. As we have in some
>>> cases (random begavior due to resolution mechanism which is not
>>> dynamic), some issues when adding this package using a fragment bundle
>>> to Apache ServiceMix Antlr bundle, I would like to add it as an
>>> optional package in the next release of Apache ServiceMix Antlr.
>>> 
>>> Is it an issue ?
>>> 
>>> Regards,
>>> 
>>> Charles Moulliard
>>> 
>>> Apache Committer
>>> 
>>> Blog : http://cmoulliard.blogspot.com
>>> Twitter : http://twitter.com/cmoulliard
>>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>>> Skype: cmoulliard
>> 
>> -- 
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
> 
> ---------------------------------------------
> Freeman Fang
> 
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> 
> 
> 
> 
> 
> 
> 
> 
> 


Re: Add optional import package for Apache ServiceMix Bundle Antlr

Posted by Freeman Fang <fr...@gmail.com>.
Hi JB,

Using dynamic-import isn't the best practice in OSGi world, though in  
some cases we can't totally avoid it, but we should avoid using it as  
much as possible.
In this case since we already know exactly which package we want to  
import, using optional import should be better.

Btw, though hibernate lib isn't Apache compatible license, just  
optional import org.hibernate... package in pom.xml should be ok IMHO,  
if I'm wrong here please correct me.

Freeman

On 2011-8-12, at 上午1:21, Jean-Baptiste Onofré wrote:

> Hi Charles,
>
> isn't it possible to use dynamic import ?
>
> Regards
> JB
>
> On 08/11/2011 06:05 PM, Charles Moulliard wrote:
>> Hi,
>>
>> When using HQL token of Hibernate, we can use the Hibernate parser
>> (org.hibernate.hql.classic.ClassicQueryTranslatorFactory) or  
>> Hibernate
>> AST (based on Antlr -  
>> org.hibernate.hql.ast.ASTQueryTranslatorFactory)
>> to translate the query. In this case, the package
>> org.hibernate.hql.ast is needed by Antlr bundle. As we have in some
>> cases (random begavior due to resolution mechanism which is not
>> dynamic), some issues when adding this package using a fragment  
>> bundle
>> to Apache ServiceMix Antlr bundle, I would like to add it as an
>> optional package in the next release of Apache ServiceMix Antlr.
>>
>> Is it an issue ?
>>
>> Regards,
>>
>> Charles Moulliard
>>
>> Apache Committer
>>
>> Blog : http://cmoulliard.blogspot.com
>> Twitter : http://twitter.com/cmoulliard
>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>> Skype: cmoulliard
>
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: Add optional import package for Apache ServiceMix Bundle Antlr

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Charles,

isn't it possible to use dynamic import ?

Regards
JB

On 08/11/2011 06:05 PM, Charles Moulliard wrote:
> Hi,
>
> When using HQL token of Hibernate, we can use the Hibernate parser
> (org.hibernate.hql.classic.ClassicQueryTranslatorFactory) or Hibernate
> AST (based on Antlr - org.hibernate.hql.ast.ASTQueryTranslatorFactory)
> to translate the query. In this case, the package
> org.hibernate.hql.ast is needed by Antlr bundle. As we have in some
> cases (random begavior due to resolution mechanism which is not
> dynamic), some issues when adding this package using a fragment bundle
> to Apache ServiceMix Antlr bundle, I would like to add it as an
> optional package in the next release of Apache ServiceMix Antlr.
>
> Is it an issue ?
>
> Regards,
>
> Charles Moulliard
>
> Apache Committer
>
> Blog : http://cmoulliard.blogspot.com
> Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> Skype: cmoulliard

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com