Return-Path: X-Original-To: apmail-manifoldcf-user-archive@www.apache.org Delivered-To: apmail-manifoldcf-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D317B187F5 for ; Thu, 21 May 2015 06:05:51 +0000 (UTC) Received: (qmail 85023 invoked by uid 500); 21 May 2015 06:05:51 -0000 Delivered-To: apmail-manifoldcf-user-archive@manifoldcf.apache.org Received: (qmail 84972 invoked by uid 500); 21 May 2015 06:05:51 -0000 Mailing-List: contact user-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@manifoldcf.apache.org Delivered-To: mailing list user@manifoldcf.apache.org Received: (qmail 84962 invoked by uid 99); 21 May 2015 06:05:51 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2015 06:05:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 44DC31828E3 for ; Thu, 21 May 2015 06:05:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id JNUxMJ5DFlzi for ; Thu, 21 May 2015 06:05:50 +0000 (UTC) Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 2270F24B1E for ; Thu, 21 May 2015 06:05:49 +0000 (UTC) Received: by igbpi8 with SMTP id pi8so1835730igb.1 for ; Wed, 20 May 2015 23:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=IrxUU14UTRedB/9sS7liO3XNZ8d9dELIMkY3yYq4b9Q=; b=P1z6mmhIWczCQJfQXNiTmMW8Ll4mpxlBwoC+jhhWGlfJP9CIxc32mRoXtX3IOHQx97 mAt4s75XcLfa4ygDwDhVcJhXZdVHVwVx2dGaG74h4qIM3PMW0PocTLpJlj3FuxzUF1ej by+H/XGnfKMihWNtrQAMY7KXclLHQLOONW+1iowpUFymf51B0yoSLmpN8p16Y7xPXE7l Ysq4/oAkd0nEAzRiihaaaWmjvusqxdyfJ3qMyjifGGAVP54Xoe/ACGe+VFNL+QzcGwnw Hnxn+fpju00/PiKsp4EwIoF8z5EiackfoBJSQnusCcek4iQgz8jIsy0PaexKgfIapZaQ uJyA== MIME-Version: 1.0 X-Received: by 10.107.164.228 with SMTP id d97mr100169ioj.78.1432188348023; Wed, 20 May 2015 23:05:48 -0700 (PDT) Received: by 10.107.155.203 with HTTP; Wed, 20 May 2015 23:05:47 -0700 (PDT) In-Reply-To: <555D6B8E.7090009@web.de> References: <555D6B8E.7090009@web.de> Date: Thu, 21 May 2015 02:05:47 -0400 Message-ID: Subject: Re: Renaming Connector Classes From: Karl Wright To: "user@manifoldcf.apache.org" Content-Type: multipart/alternative; boundary=001a114216febc4809051691555f --001a114216febc4809051691555f Content-Type: text/plain; charset=UTF-8 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 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" > *An:* "user@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 > 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 >> > --001a114216febc4809051691555f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
If you were able to save the connection that you changed, = that should be enough.=C2=A0 I'm not really sure what implications ther= e 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 <markus_schuch@web.de> wrote:
=20 =20 =20
Hi Karl,
=C2=A0
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.
=C2=A0
I looked into the code of the SynchronizeConnectors command and explored the API:
=C2=A0
What about
=C2=A0
IRepositoryConnection[] connections =3D connManager.getAllConnections();
...
connection.setClassName(mappedClass);
...
connManager.save(connection);
=C2=A0
I tried it and so far it seems to work.
Do you see any pitfalls with that solution?
=C2=A0
Regards,
Markus
=C2=A0
<= div class=3D"h5">
Hi Marcus,
=C2=A0
The name of the connector class is a key for the connection names that depended on that class.=C2=A0 To rena= me a connection class, therefore, you need to do the following:
=C2=A0
(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
=C2=A0
Karl
=C2=A0
=C2=A0
On Wed, May 20, 2015 at 8:56 AM, Markus Schuch <markus_schuch@web.de> wrote:
Hi,
=C2=A0
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.
=C2=A0
I found the commands=C2=A0SynchronizeConnectors, SynchronizeAuthorities and SynchronizeTransformations.
But they leave the existing connections with "unregistered" connector classes.
=C2=A0
Is there another command for mapping/renaming connector classes for existing connections?
=C2=A0
Thanks in advance,
Markus

--001a114216febc4809051691555f--