Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359822

Summary: Allow userManager to take parameters in cdo-server.xml
Product: [Modeling] EMF Reporter: Erdal Karaca <erdal.karaca.de>
Component: cdo.coreAssignee: Project Inbox <emf.cdo-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: stepper
Version: 4.13   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Erdal Karaca CLA 2011-10-04 07:36:19 EDT
I need to parameterize my user manager. The only parameter a user manager can take is the 'description' attribute. This is not enough.

Sugestion/Example:

<repository>

<userManager type="ldap">
  <property name="bindHost" value="ldap://localhost" />
</userManager>

</repository>

The IUserManger could maybe have an additional method:

public void setProperties(Map<String, String> props);
Comment 1 Erdal Karaca CLA 2011-10-04 08:08:38 EDT
Just realized that the 'dataSource' solution is more convenient: <dataSource ... user="myuser" password="pwd" />

In this case, user and password are set reflectively to the generated data source instance...
This should be possible for userManager as well...
Comment 2 Eike Stepper CLA 2011-10-05 03:55:09 EDT
(In reply to comment #0)
> I need to parameterize my user manager. The only parameter a user manager can
> take is the 'description' attribute. This is not enough.

It's perhaps not the most convenient solution but it's definitely "enough" as all imaginable kind of additional data can be String-encoded.

> Sugestion/Example:
> 
> <repository>
> 
> <userManager type="ldap">
>   <property name="bindHost" value="ldap://localhost" />
> </userManager>
> 
> </repository>
> 
> The IUserManger could maybe have an additional method:
> 
> public void setProperties(Map<String, String> props);

We could consider a general PropertiesAware interface with this method and use it to pass the collected properties into any kind of element.

It strikes me that we should wait with this proposal until we've seen how bug 358506 unfolds. It's supposed to solve the wiring challenge more generally and more sophisticated. What do you think about it?
Comment 3 Eike Stepper CLA 2011-10-05 03:56:26 EDT
(In reply to comment #1)
> Just realized that the 'dataSource' solution is more convenient: <dataSource
> ... user="myuser" password="pwd" />
> 
> In this case, user and password are set reflectively to the generated data
> source instance...
> This should be possible for userManager as well...

That's not my favorite approach because reflection comes with a number of subtle issues (case of setters, etc...).
Comment 4 Erdal Karaca CLA 2011-10-05 04:51:33 EDT
(In reply to comment #2)
> (In reply to comment #0)
> > I need to parameterize my user manager. The only parameter a user manager can
> > take is the 'description' attribute. This is not enough.
> 
> It's perhaps not the most convenient solution but it's definitely "enough" as
> all imaginable kind of additional data can be String-encoded.
> 

Yes, sure. It is just about convenience.

> > Sugestion/Example:
> >
> > <repository>
> >
> > <userManager type="ldap">
> >   <property name="bindHost" value="ldap://localhost" />
> > </userManager>
> >
> > </repository>
> >
> > The IUserManger could maybe have an additional method:
> >
> > public void setProperties(Map<String, String> props);
> 
> We could consider a general PropertiesAware interface with this method and use
> it to pass the collected properties into any kind of element.

Yes, that would be great.

> 
> It strikes me that we should wait with this proposal until we've seen how bug
> 358506 unfolds. It's supposed to solve the wiring challenge more generally and
> more sophisticated. What do you think about it?

If it solves the problem by other means, then we should wait for it...
Comment 5 Eike Stepper CLA 2012-08-14 22:52:38 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 6 Eike Stepper CLA 2013-06-27 04:07:55 EDT
Moving all outstanding enhancements to 4.3
Comment 7 Eike Stepper CLA 2014-08-19 09:26:42 EDT
Moving all open enhancement requests to 4.4
Comment 8 Eike Stepper CLA 2014-08-19 09:36:47 EDT
Moving all open enhancement requests to 4.4
Comment 9 Eike Stepper CLA 2015-07-14 02:13:19 EDT
Moving all open bugzillas to 4.5.
Comment 10 Eike Stepper CLA 2016-07-31 00:56:06 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 11 Eike Stepper CLA 2017-12-28 01:11:08 EST
Moving all open bugs to 4.7
Comment 12 Eike Stepper CLA 2019-11-08 02:17:37 EST
Moving all unresolved issues to version 4.8-
Comment 13 Eike Stepper CLA 2019-12-13 12:45:10 EST
Moving all unresolved issues to version 4.9
Comment 14 Eike Stepper CLA 2020-12-11 10:43:52 EST
Moving to 4.13.