-
Notifications
You must be signed in to change notification settings - Fork 0
Root Seed Data
This information is relevant for both understanding how jUDDI's default data is set when jUDDI first runs (i.e. to a new database). It's also useful for scripting or automating the deployment of a jUDDI server within your organization which will enable you to prepopulate the data.
As of UDDI v3, each registry need to have a “root” publisher. The root publisher is the owner of the UDDI services (inquiry, publication, etc). There can only be one root publisher per node. JUDDI ships some default seed data for the root account. The default data can be found in the juddi-core-3.x.jar, under juddi_install_data/. By default jUDDI installs two Publishers: “root” and “uddi”. Root owns the root partition, and uddi owns all the other seed data such as pre-defined tModels.
For each publisher there are four seed data files that will be read the first time you start jUDDI:
<publisher>_Publisher.xml <publisher>_tModelKeyGen.xml <publisher>_BusinessEntity.xml <publisher>_tModels.xmlFor example the content of the root_Publisher.xml looks like
<publisher xmlns="urn:juddi-apache-org:api_v3" authorizedName="root"> <publisherName>root publisher</publishername> <isAdmin>true</isadmin> </publisher>Each publisher should have its own key generator schema so that custom generated keys cannot end up being identical to keys generated by other publishers. It is therefor that the each publisher need to define their own KenGenerator tModel. The tModel Key Generator is defined in the file root_tModelKeyGen.xml and the content of this file is
<tModel tModelKey="uddi:juddi.apache.org:keygenerator" xmlns="urn:uddi-org:api_v3"> <name>uddi-org:keyGenerator</name> <description>Root domain key generator</description> <overviewDoc> <overviewURL useType="text"> http://uddi.org/pubs/uddi_v3.htm#keyGen </overviewurl> </overviewdoc> <categoryBag> <keyedReference tModelKey="uddi:uddi.org:categorization:types" keyName="uddi-org:types:keyGenerator" keyValue="keyGenerator" /> </categorybag> </tmodel>This means that the legal format of keys used by the root publisher need to be in the form uddi:juddi.apache.org:<text-of-chioce></text-of-chioce> The use of other types of format will lead to an 'illegal key' error. The root publisher can only own one KeyGenerator while any other publisher can own more then one KeyGenerator. KeyGenerators should not be shared unless there is a good reason to do so. If you want to see your publisher with more then just the one KeyGenerator tModel, you can use the <publisher></publisher>_tModels.xml file.
Finally, in the <publisher></publisher>_BusinessEntity.xml file can be used to setup Business and Service data. In the root_BusinessEntity.xml we specified the ASF Business, and the UDDI services; Inquiry, Publish, etc.:
&amp;lt&#59;discoveryURL useType&amp;&#35;61&#59;&amp;quot&#59;home&amp;quot&#59;&amp;gt&#59; http&amp;&#35;58&#59;//$&amp;&#35;123&#59;juddi.server.name&amp;&#35;125&#59;&amp;&#35;58&#59;$&amp;&#35;123&#59;juddi.server.port&amp;&#35;125&#59;/juddiv3 &amp;lt&#59;/discoveryurl&amp;gt&#59; &amp;lt&#59;/discoveryurls&amp;gt&#59; &amp;lt&#59;categoryBag&amp;gt&#59; &amp;lt&#59;keyedReference tModelKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;uddi.org&amp;&#35;58&#59;categorization&amp;&#35;58&#59;nodes&amp;quot&#59; keyValue&amp;&#35;61&#59;&amp;quot&#59;node&amp;quot&#59; /&amp;gt&#59; &amp;lt&#59;/categorybag&amp;gt&#59; &amp;lt&#59;businessServices&amp;gt&#59; &amp;lt&#59;businessService serviceKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;juddi.apache.org&amp;&#35;58&#59;services&amp;&#35;45&#59;inquiry&amp;quot&#59; businessKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;juddi.apache.org&amp;&#35;58&#59;businesses&amp;&#35;45&#59;asf&amp;quot&#59;&amp;gt&#59; &amp;lt&#59;name xml&amp;&#35;58&#59;lang&amp;&#35;61&#59;&amp;quot&#59;en&amp;quot&#59;&amp;gt&#59;UDDI Inquiry Service&amp;lt&#59;/name&amp;gt&#59; &amp;lt&#59;description xml&amp;&#35;58&#59;lang&amp;&#35;61&#59;&amp;quot&#59;en&amp;quot&#59;&amp;gt&#59;Web Service supporting UDDI Inquiry API&amp;lt&#59;/description&amp;gt&#59; &amp;lt&#59;bindingTemplates&amp;gt&#59; &amp;lt&#59;bindingTemplate bindingKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;juddi.apache.org&amp;&#35;58&#59;servicebindings&amp;&#35;45&#59;inquiry&amp;&#35;45&#59;ws&amp;quot&#59; serviceKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;juddi.apache.org&amp;&#35;58&#59;services&amp;&#35;45&#59;inquiry&amp;quot&#59;&amp;gt&#59; &amp;lt&#59;description&amp;gt&#59;UDDI Inquiry API V3&amp;lt&#59;/description&amp;gt&#59; &amp;lt&#59;accessPoint useType&amp;&#35;61&#59;&amp;quot&#59;wsdlDeployment&amp;quot&#59;&amp;gt&#59; http&amp;&#35;58&#59;//$&amp;&#35;123&#59;juddi.server.name&amp;&#35;125&#59;&amp;&#35;58&#59;$&amp;&#35;123&#59;juddi.server.port&amp;&#35;125&#59;/juddiv3/services/inquiry?wsdl &amp;lt&#59;/accesspoint&amp;gt&#59; &amp;lt&#59;tModelInstanceDetails&amp;gt&#59; &amp;lt&#59;tModelInstanceInfo tModelKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;uddi.org&amp;&#35;58&#59;v3_inquiry&amp;quot&#59;&amp;gt&#59; &amp;lt&#59;instanceDetails&amp;gt&#59; &amp;lt&#59;instanceParms&amp;gt&#59; &amp;lt&#59;&amp;&#35;33&#59;&amp;&#35;91&#59;CDATA&amp;&#35;91&#59; &amp;lt&#59;?xml version&amp;&#35;61&#59;&amp;quot&#59;1.0&amp;quot&#59; encoding&amp;&#35;61&#59;&amp;quot&#59;utf&amp;&#35;45&#59;8&amp;quot&#59; ?&amp;gt&#59; &amp;lt&#59;UDDIinstanceParmsContainer xmlns&amp;&#35;61&#59;&amp;quot&#59;urn&amp;&#35;58&#59;uddi&amp;&#35;45&#59;org&amp;&#35;58&#59;policy_v3_instanceParms&amp;quot&#59;&amp;gt&#59; &amp;lt&#59;defaultSortOrder&amp;gt&#59; uddi&amp;&#35;58&#59;uddi.org&amp;&#35;58&#59;sortorder&amp;&#35;58&#59;binarysort &amp;lt&#59;/defaultsortorder&amp;gt&#59; &amp;lt&#59;/uddiinstanceparmscontainer&amp;gt&#59; &amp;&#35;93&#59;&amp;&#35;93&#59;&amp;gt&#59; &amp;lt&#59;/instanceparms&amp;gt&#59; &amp;lt&#59;/instancedetails&amp;gt&#59; &amp;lt&#59;/tmodelinstanceinfo&amp;gt&#59; &amp;lt&#59;/tmodelinstancedetails&amp;gt&#59; &amp;lt&#59;categoryBag&amp;gt&#59; &amp;lt&#59;keyedReference keyName&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;45&#59;org&amp;&#35;58&#59;types&amp;&#35;58&#59;wsdl&amp;quot&#59; keyValue&amp;&#35;61&#59;&amp;quot&#59;wsdlDeployment&amp;quot&#59; tModelKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;uddi.org&amp;&#35;58&#59;categorization&amp;&#35;58&#59;types&amp;quot&#59;/&amp;gt&#59; &amp;lt&#59;/categorybag&amp;gt&#59; &amp;lt&#59;/bindingtemplate&amp;gt&#59; &amp;lt&#59;/bindingtemplates&amp;gt&#59; &amp;lt&#59;/businessservice&amp;gt&#59; &amp;lt&#59;businessService serviceKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;juddi.apache.org&amp;&#35;58&#59;services&amp;&#35;45&#59;publish&amp;quot&#59; businessKey&amp;&#35;61&#59;&amp;quot&#59;uddi&amp;&#35;58&#59;juddi.apache.org&amp;&#35;58&#59;businesses&amp;&#35;45&#59;asf&amp;quot&#59;&amp;gt&#59; &amp;lt&#59;name xml&amp;&#35;58&#59;lang&amp;&#35;61&#59;&amp;quot&#59;en&amp;quot&#59;&amp;gt&#59;UDDI Publish Service&amp;lt&#59;/name&amp;gt&#59; ........... &amp;lt&#59;/businessservice&amp;gt&#59; &amp;lt&#59;/businessservices&amp;gt&#59; &amp;lt&#59;/businessentity&amp;gt&#59;
Note that the seeding process only kicks off if no publishers exist in the database. So this will only work with a clean database, unless you set juddi.seed.always to true. Then it will re-apply all files with the exception of the root data files. Note that this can lead to losing data that was added to entities that are re-seeded, since data is not merged.
You may have noticed the tokens in the root_BusinessEntity.xml file (${juddi.server.baseurl}. The value of this tokens can set in the juddiv3.properties file. The value substitution takes place at runtime, so that different nodes can do the substitution with their own value if needed.
In your deployment you probably do not want to use the Seed Data shipped with the default jUDDI install. The easiest way to overwrite this data is to add it to a directory call juddi_custom_install_data in the juddiv3.war/WEB-INF/classes/ directory. That way you don't have to modify the juddi-core-3.x.jar. Additionally if your root publisher is not called “root” you will need to set the juddi.root.publisher property in the juddiv3.properties file to something other then
juddi.root.publisher&amp;&#35;61&#59;root
The juddiv3.war ships with two example data directory. One for the Sales Affiliate, and one for the Marketing Affiliate. To use the Sales Seed Data, in the juddiv3.war/WEB-INF/classes/, rename the directory
mv RENAME4Sales_juddi_custom_install_data juddi_custom_install_databefore you start jUDDI the first time. It will then use this data to populate the database. If you want to rerun you can trash the database it created and restart tomcat. Don't forget to set the tokens in the juddiv3.properties file.