4 Replies Latest reply on Nov 24, 2009 3:51 AM by Davide Pettenò

    automate jboss jndi creation

    Davide Pettenò Newbie

      hello,
      We are migrating our applications from WebSphere to JBoss 5, and then we need to migrate an high number of JNDI (over 50).
      We noticed that using embendeed jopr, creates a new file <>-ds.xml under deploy directory, but, always from the console, if we modifying the DataSource is actually modified the file under the directory data / attachments /
      There is the possibility to modify the original XML? or the ability to synchronize the two files?
      Furthermore, having many jndi to manage, there is a tool that allows us to modify the original XML deployment under the directory?
      Thanks a lot
      Bye

        • 1. Re: automate jboss jndi creation
          Peter Johnson Master

           

          always from the console, if we modifying the DataSource is actually modified the file under the directory data / attachments /

          This statement is confusing. What console? In Jboss AS, embedded jopr is the admin console, and you just now stated that embedded jopr places datasource config files (*-ds.xml) in the server/xxx/deploy directory.

          And yes you can modify the *-ds.xml files using any text editor. That is the usual mechanism for editing those files (embedded jopr is new and previously all configuration was done by editing the config files directly using any text editor).

          • 2. Re: automate jboss jndi creation
            Davide Pettenò Newbie

             

            "PeterJ" wrote:
            always from the console, if we modifying the DataSource is actually modified the file under the directory data / attachments /

            This statement is confusing. What console? In Jboss AS, embedded jopr is the admin console, and you just now stated that embedded jopr places datasource config files (*-ds.xml) in the server/xxx/deploy directory.

            And yes you can modify the *-ds.xml files using any text editor. That is the usual mechanism for editing those files (embedded jopr is new and previously all configuration was done by editing the config files directly using any text editor).


            Sorry,you're right.
            I was referring to the Admin-console.
            If I change a datasource via the admin-console, it created a file in data / attachments without modifying the original, right? Therefore there is no way to synchronize the two files (one below and one under the deploy date / attachments)?
            Last question: using JON, I have the same type of behavior?
            Thanks
            Bye

            • 3. Re: automate jboss jndi creation
              Peter Johnson Master

              OK, now I see what you are saying. When using the admin console:

              * if you create a new data source, it is places in server/xxx/deploy as jndiname-ds.xml
              * if you edit an existing data source (including one you just created a few seconds ago) then the modifications (or actually, a whole new set of config settings) is placed in server/xxx/data/attachment/datasourcename-ds.xml-randomid/org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup.attachment.xml

              What you would like to do is merge the changes that appear in the org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup.attachment.xml file into the server/xxx/deploy/*-ds.xml file.

              I would hate to tell you to write an XSLT to convert org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup.attachment.xml into *-ds.xml. Perhaps the embedded jopr developers would have a better idea, or you could suggest this functionality as a desired enhancement (who knows, they may already have something like this planned). You could ask in the embedded jopr forum: http://www.jboss.org/index.html?module=bb&op=viewforum&f=294

              I suspect that Jopr and JON operate the same ways as they share this admin code.

              • 4. Re: automate jboss jndi creation
                Davide Pettenò Newbie

                 

                "PeterJ" wrote:
                OK, now I see what you are saying. When using the admin console:

                * if you create a new data source, it is places in server/xxx/deploy as jndiname-ds.xml
                * if you edit an existing data source (including one you just created a few seconds ago) then the modifications (or actually, a whole new set of config settings) is placed in server/xxx/data/attachment/datasourcename-ds.xml-randomid/org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup.attachment.xml

                What you would like to do is merge the changes that appear in the org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup.attachment.xml file into the server/xxx/deploy/*-ds.xml file.

                I would hate to tell you to write an XSLT to convert org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup.attachment.xml into *-ds.xml. Perhaps the embedded jopr developers would have a better idea, or you could suggest this functionality as a desired enhancement (who knows, they may already have something like this planned). You could ask in the embedded jopr forum: http://www.jboss.org/index.html?module=bb&op=viewforum&f=294

                I suspect that Jopr and JON operate the same ways as they share this admin code.


                Ok !
                Thanks a lot.
                Bye
                Davide