BinaryTypeConfiguration behavior in case of using wildcards.

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

BinaryTypeConfiguration behavior in case of using wildcards.

slava.koptilin
Hi Igniters,

I would like to discuss the behavior of BinaryTypeConfiguration in case of
using a wildcard for type names.
Let's consider the following BinaryConfiguration:

        <property name="binaryConfiguration">
            <bean
class="org.apache.ignite.configuration.BinaryConfiguration">
                ...
                <property name="typeConfigurations">
                    <list>
                        <bean
class="org.apache.ignite.binary.BinaryTypeConfiguration">
                           * <property name="typeName"
value="org.apache.ignite.examples.*"/>*
                            <property name="nameMapper">
                                <bean
class="org.apache.ignite.binary.BinaryBasicNameMapper">
                                    <constructor-arg type="boolean"
value="false"/>
                                </bean>
                            </property>
                        </bean>
                    </list>
                </property>
            </bean>
        </property>

My intention is using custom BinaryBasicMapper for all classes in the
specified package and its sub packages,
but BinaryContext implementation matches only classes that are resides in
the "org.apache.ignite.examples" package.
Classes from subpackages are not matched, and therefore do not use the
specified BinaryBasicNameMapper. That is weird I think.

Is there a reason for that behavior? Do I need to create a ticket for that
issue and fix it? What do you think?

Best regards,
Slava.
Reply | Threaded
Open this post in threaded view
|

Re: BinaryTypeConfiguration behavior in case of using wildcards.

dmagda
Hello Slava,

BinaryContext implementation matches only classes that reside in
> the "org.apache.ignite.examples" package


This looks like an oversight on our side. Think we need to fix it.

--
Denis

On Thu, Jun 21, 2018 at 9:43 AM Вячеслав Коптилин <[hidden email]>
wrote:

> Hi Igniters,
>
> I would like to discuss the behavior of BinaryTypeConfiguration in case of
> using a wildcard for type names.
> Let's consider the following BinaryConfiguration:
>
>         <property name="binaryConfiguration">
>             <bean
> class="org.apache.ignite.configuration.BinaryConfiguration">
>                 ...
>                 <property name="typeConfigurations">
>                     <list>
>                         <bean
> class="org.apache.ignite.binary.BinaryTypeConfiguration">
>                            * <property name="typeName"
> value="org.apache.ignite.examples.*"/>*
>                             <property name="nameMapper">
>                                 <bean
> class="org.apache.ignite.binary.BinaryBasicNameMapper">
>                                     <constructor-arg type="boolean"
> value="false"/>
>                                 </bean>
>                             </property>
>                         </bean>
>                     </list>
>                 </property>
>             </bean>
>         </property>
>
> My intention is using custom BinaryBasicMapper for all classes in the
> specified package and its sub packages,
> but BinaryContext implementation matches only classes that are resides in
> the "org.apache.ignite.examples" package.
> Classes from subpackages are not matched, and therefore do not use the
> specified BinaryBasicNameMapper. That is weird I think.
>
> Is there a reason for that behavior? Do I need to create a ticket for that
> issue and fix it? What do you think?
>
> Best regards,
> Slava.
>
Reply | Threaded
Open this post in threaded view
|

Re: BinaryTypeConfiguration behavior in case of using wildcards.

Valentin Kulichenko
+1. Looks like a bug.

-Val

On Thu, Jun 21, 2018 at 12:26 PM Denis Magda <[hidden email]> wrote:

> Hello Slava,
>
> BinaryContext implementation matches only classes that reside in
> > the "org.apache.ignite.examples" package
>
>
> This looks like an oversight on our side. Think we need to fix it.
>
> --
> Denis
>
> On Thu, Jun 21, 2018 at 9:43 AM Вячеслав Коптилин <
> [hidden email]>
> wrote:
>
> > Hi Igniters,
> >
> > I would like to discuss the behavior of BinaryTypeConfiguration in case
> of
> > using a wildcard for type names.
> > Let's consider the following BinaryConfiguration:
> >
> >         <property name="binaryConfiguration">
> >             <bean
> > class="org.apache.ignite.configuration.BinaryConfiguration">
> >                 ...
> >                 <property name="typeConfigurations">
> >                     <list>
> >                         <bean
> > class="org.apache.ignite.binary.BinaryTypeConfiguration">
> >                            * <property name="typeName"
> > value="org.apache.ignite.examples.*"/>*
> >                             <property name="nameMapper">
> >                                 <bean
> > class="org.apache.ignite.binary.BinaryBasicNameMapper">
> >                                     <constructor-arg type="boolean"
> > value="false"/>
> >                                 </bean>
> >                             </property>
> >                         </bean>
> >                     </list>
> >                 </property>
> >             </bean>
> >         </property>
> >
> > My intention is using custom BinaryBasicMapper for all classes in the
> > specified package and its sub packages,
> > but BinaryContext implementation matches only classes that are resides in
> > the "org.apache.ignite.examples" package.
> > Classes from subpackages are not matched, and therefore do not use the
> > specified BinaryBasicNameMapper. That is weird I think.
> >
> > Is there a reason for that behavior? Do I need to create a ticket for
> that
> > issue and fix it? What do you think?
> >
> > Best regards,
> > Slava.
> >
>