You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@manifoldcf.apache.org by Karl Wright <da...@gmail.com> on 2015/05/20 15:25:26 UTC

Re: Renaming Connector Classes

Hi Marcus,

The name of the connector class is a key for the connection names that
depended on that class.  To rename a connection class, therefore, you need
to do the following:

(1) BEFORE renaming the class, delete all jobs and connections that refer
to that connector.
(2) UNREGISTER the connector class (there's a command-line utility for that)
(3) BUILD your new class
(4) REBUILD everything you deleted

Karl


On Wed, May 20, 2015 at 8:56 AM, Markus Schuch <ma...@web.de> wrote:

> Hi,
>
> i need to rename some connector classes.
> When starting MCF with the renamed classes, i obviously stumbles over the
> old connections using the old classnames.
> It would be nice to be able to migrate the old connections to the new
> classnames.
>
> I found the commands SynchronizeConnectors, SynchronizeAuthorities and
> SynchronizeTransformations.
> But they leave the existing connections with "unregistered" connector
> classes.
>
> Is there another command for mapping/renaming connector classes for
> existing connections?
>
> Thanks in advance,
> Markus
>

Re: Renaming Connector Classes

Posted by Karl Wright <da...@gmail.com>.
If you were able to save the connection that you changed, that should be
enough.  I'm not really sure what implications there would be for any
running MCF agents or UI processes though, so you'd probably want to shut
everything down before trying that.

Karl

On Thu, May 21, 2015 at 1:22 AM, Markus Schuch <ma...@web.de> wrote:

>  Hi Karl,
>
> is it possible to update the classnames in the database for existing
> connections depending on renamed classes?
> It would be nice to spare the effort of recreating all the connections.
>
> I looked into the code of the SynchronizeConnectors command and explored
> the API:
>
> What about
>
> IRepositoryConnection[] connections = connManager.getAllConnections();
> ...
> connection.setClassName(mappedClass);
> ...
> connManager.save(connection);
>
> I tried it and so far it seems to work.
> Do you see any pitfalls with that solution?
>
> Regards,
> Markus
>
>  *Gesendet:* Mittwoch, 20. Mai 2015 um 15:25 Uhr
> *Von:* "Karl Wright" <da...@gmail.com> <da...@gmail.com>
> *An:* "user@manifoldcf.apache.org" <us...@manifoldcf.apache.org>
> <us...@manifoldcf.apache.org> <us...@manifoldcf.apache.org>
> *Betreff:* Re: Renaming Connector Classes
>  Hi Marcus,
>
> The name of the connector class is a key for the connection names that
> depended on that class.  To rename a connection class, therefore, you need
> to do the following:
>
> (1) BEFORE renaming the class, delete all jobs and connections that refer
> to that connector.
> (2) UNREGISTER the connector class (there's a command-line utility for
> that)
> (3) BUILD your new class
> (4) REBUILD everything you deleted
>
> Karl
>
>
> On Wed, May 20, 2015 at 8:56 AM, Markus Schuch <ma...@web.de>
> wrote:
>>
>>  Hi,
>>
>> i need to rename some connector classes.
>> When starting MCF with the renamed classes, i obviously stumbles over the
>> old connections using the old classnames.
>> It would be nice to be able to migrate the old connections to the new
>> classnames.
>>
>> I found the commands SynchronizeConnectors, SynchronizeAuthorities and
>> SynchronizeTransformations.
>> But they leave the existing connections with "unregistered" connector
>> classes.
>>
>> Is there another command for mapping/renaming connector classes for
>> existing connections?
>>
>> Thanks in advance,
>> Markus
>>
>

Re: Renaming Connector Classes

Posted by Markus Schuch <ma...@web.de>.
Hi Karl,
 
is it possible to update the classnames in the database for existing connections
depending on renamed classes?
It would be nice to spare the effort of recreating all the connections.
 
I looked into the code of the SynchronizeConnectors command and explored the API:
 
What about
 
IRepositoryConnection[] connections = connManager.getAllConnections();
...
connection.setClassName(mappedClass);
...
connManager.save(connection);
 
I tried it and so far it seems to work.
Do you see any pitfalls with that solution?
 
Regards,
Markus
 
*Gesendet:* Mittwoch, 20. Mai 2015 um 15:25 Uhr
*Von:* "Karl Wright" <da...@gmail.com>
*An:* "user@manifoldcf.apache.org" <us...@manifoldcf.apache.org>
*Betreff:* Re: Renaming Connector Classes
Hi Marcus,
 
The name of the connector class is a key for the connection names that depended
on that class.  To rename a connection class, therefore, you need to do the
following:
 
(1) BEFORE renaming the class, delete all jobs and connections that refer to
that connector.
(2) UNREGISTER the connector class (there's a command-line utility for that)
(3) BUILD your new class
(4) REBUILD everything you deleted
 
Karl
 
 
On Wed, May 20, 2015 at 8:56 AM, Markus Schuch <ma...@web.de> wrote:

    Hi,
     
    i need to rename some connector classes.
    When starting MCF with the renamed classes, i obviously stumbles over the
    old connections using the old classnames.
    It would be nice to be able to migrate the old connections to the new
    classnames.
     
    I found the commands SynchronizeConnectors, SynchronizeAuthorities and
    SynchronizeTransformations.
    But they leave the existing connections with "unregistered" connector classes.
     
    Is there another command for mapping/renaming connector classes for existing
    connections?
     
    Thanks in advance,
    Markus