<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: Trying to create datasource, delete and then create again with same name requires sever restart
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/maeste">Stefano Maestri</a> in <i>IronJacamar</i> - <a href="https://community.jboss.org/message/832348#832348">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>The issue is about something else, and fixed a different problem generating an exception during :remove operation on RA, you are asking to remove and re-add subresources of resource-adapter w/o server reload.</p><p>It's not currently supported. You can't change the structure af an RA resource w/o a server reload.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>What you can do (because supported) is to edit attributes marked as read-write. Of course you can't edit read-only attributes. In particular you can't add a connection-definition/config-property's value (if I well remember is one of few, if not the only one, attribute marked read only)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>What we support is a full remove of ra and resource and readd it. IOW these scripts are not supported (w/o server reload):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>#Add resource-adapter</p><p>/subsystem=resource-adapters/resource-adapter=ws:add(module=org.jboss.teiid.resource-adapter.webservice, transaction-support=NoTransaction)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#Add a connection factory</p><p>/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#remove the added connection factory</p><p>/subsystem=resource-adapters/resource-adapter=ws:remove</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#Add the same *named* connection factory again to RA</p><p>/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true)</p></blockquote><p>because it is changing structure of resource-adapter main resource removing and readding connection-definition.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Next script is not working too (w/o server reload) for the same reason:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true)</p><p>/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS/config-properties=EndPoint:add(value=<a class="jive-link-external-small" href="http://foo.com/" rel="nofollow">http://foo.com</a>)</p><p>/subsystem=resource-adapters/resource-adapter=ws:activate</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS/config-properties=EndPoint:remove</p><p>/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS/config-properties=EndPoint:add(value=<a class="jive-link-external-small" href="http://foo1.com/" rel="nofollow">http://foo1.com</a>)</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>What should work is </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>#Add resource-adapter</p><p>/subsystem=resource-adapters/resource-adapter=ws:add(module=org.jboss.teiid.resource-adapter.webservice, transaction-support=NoTransaction)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#Add a connection factory</p><p>/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true)</p><p>#Add a config-property if need</p><p><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;">/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS/config-properties=EndPoint:add(value=</span><a class="jive-link-external-small" href="http://foo1.com/" rel="nofollow">http://foo1.com</a><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;">)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#Activate the resource-adapter to apply config</p><p>/subsystem=resource-adapters/resource-adapter=ws:activate</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#remove complegtely&#160; added Resource</p><p>/subsystem=resource-adapters/resource-adapter=ws:remove</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#Add the same *named* resource-adapter again</p><p>/subsystem=resource-adapters/resource-adapter=ws:add(module=org.jboss.teiid.resource-adapter.webservice, transaction-support=NoTransaction)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#Add the same *named* connection factory again to RA</p><p>/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#Add again aconfig-property if need</p><p><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;">/subsystem=resource-adapters/resource-adapter=ws/connection-definitions=wsDS/config-properties=EndPoint:add(value=</span><a class="jive-link-external-small" href="http://foo1.com/" rel="nofollow">http://MyNewfoo.com</a><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;">)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#Activate the resource-adapter to apply NEW config</p><p>/subsystem=resource-adapters/resource-adapter=ws:activate</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;">And the issue fixed in jira linked is about a script like the last one, generating an error during resource-adapter:remove operation.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;">I hope it helps.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;">regards</span></p><p><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;">S.<br/></span></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/832348#832348">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in IronJacamar at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>