On 10/09/2012 09:38, Denis Signoretto wrote:
> Hi Francesco,
>  
> probably yes it could be an issue related to ConnId Table Connector.
>  
> If you alter a table, for instance adding a column, and you try to
> update schema mapping on a existing resource
> the structure of the table it's not reread and the new column cannot
> be associated until a JVM restart (this is the only solution I've found).

Denis,
I've run the following procedure:

1. generate a project from 1.0.2-incubating-SNAPSHOT or
1.1.0-incubating-SNAPSHOT archetypes (both tested)
2. mvn clean package
3. cd console && mvn -P embedded

At this point:

1. go to http://localhost:9082
2. select "Generic H2 (Server)"
3. set JDBC URL to "jdbc:h2:tcp://localhost:9092/testdb"
4. set username 'sa' and password 'sa'
5. connect
6. send SQL statement 'ALTER TABLE TEST ADD COLUMN newcol VARCHAR(255)'

Then:

1. log in http://localhost:9080/syncope-console/
2, go to resources -> resource-testdb -> mapping

The column "NEWCOL" is there when adding a new mapping, hence I am not
able to reproduce what you say above. Is this the kind of result you are
looking for?

Actually, "NEWCOL" is the only column available (because the other 3
columns are mapped to special ConnId attributes) and this makes the
console to show NEWCOL everywhere.

I am going to open an issue for this (probably related to SYNCOPE-207).

Regards.

>     -----Messaggio originale-----
>     *Da:* Francesco Chicchiriccò [mailto:[email protected]]
>     *Inviato:* sabato 8 settembre 2012 20.41
>     *A:* [email protected]
>     *Oggetto:* Re: Allow Connector update the database schema without
>     restart
>
>     On 30/07/2012 09:41, Denis Signoretto wrote:
>>     Hi Syncopers,
>>      
>>     at the moment if an external resource schema changes (e.g. column
>>     added or renamed),
>>     the DB connector, can't see the changes until a Syncope restart
>>     (I'm wrong?).
>>      
>>     As a future improvement what do you think about a "db schema
>>     update" functionality for DB connector?
>
>     Hi Denis,
>     sorry, I've completely overlooked this e-mail (it was archived in
>     the wrong mail thread...): could you please describe with some
>     more detail the feature you are looking for? I suspect this is
>     more ConnId's than Syncope's...
>
>     Regards.
>
-- 
Francesco Chicchiriccò

ASF Member, Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/

Reply via email to