You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Francois <fa...@gmail.com> on 2009/11/12 17:55:27 UTC

[ApacheDS for Testing] problem with ldapServer static field & Scala

Hello ApacheDS,

I'm trying to use ApacheDS as an LDAP testing server for one the 
application I'm working on. ApacheDS "integ" seems to have some really 
really nice features on that subject, but I'm encountering a little 
problem : I'm using Scala for my application (yes Emmanuel ;) and Scala 
doesn't have such a thing as "public static field".

I didn't see any other way to interact with the integration installation 
than with this LdapServer field, do I miss it ?

On the other hand, Scala can have "public static method", so it would be 
great if in place of the field, you could use getter/setter for 
accessing LdapServer.

I attached patches on core-integ and server-integ to show what would 
make Scala (and me) happy. They are just here to give you an idea, in 
that state they break something like all of your testcases (because of 
course the use the convention with a service/ldapServer field, not a 
setService/setLdapServer method).

What do you think about that ? Whould it be possible to switch to 
getter/setter injection ?

Have a nice day

--
Francois Armand

Re: [ApacheDS for Testing] problem with ldapServer static field & Scala

Posted by Emmanuel Lecharny <el...@apache.org>.
Stefan Seelmann wrote:
> Hi,
>
> Francois wrote:
>   
>> I attached patches on core-integ and server-integ to show what would
>> make Scala (and me) happy. They are just here to give you an idea, in
>> that state they break something like all of your testcases (because of
>> course the use the convention with a service/ldapServer field, not a
>> setService/setLdapServer method).
>>
>> What do you think about that ? Whould it be possible to switch to
>> getter/setter injection ?
>>     
>
> I wonder if we could support both? Won't it be possible to check if the
> public fields exist (using getFields()) and if not we could invoke the
> method.
>   
Probably. I will have a look at it.

Not sure I can apply the fix in trunk though, but most certainly in the 
branch I'm currently working in.

François, can you attach your patches to a JIRA, so that we don't forget 
to apply them ?

Many thanks !


-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: [ApacheDS for Testing] problem with ldapServer static field & Scala

Posted by Stefan Seelmann <se...@apache.org>.
Hi,

Francois wrote:
> I attached patches on core-integ and server-integ to show what would
> make Scala (and me) happy. They are just here to give you an idea, in
> that state they break something like all of your testcases (because of
> course the use the convention with a service/ldapServer field, not a
> setService/setLdapServer method).
> 
> What do you think about that ? Whould it be possible to switch to
> getter/setter injection ?

I wonder if we could support both? Won't it be possible to check if the
public fields exist (using getFields()) and if not we could invoke the
method.

Kind Regards,
Stefan