Monday, April 18, 2011

JDeveloper, WebCenter and MDS: File vs. Database Store

Oracle's Metadata Services (MDS) offers two options for storing metadata:  File or Database.   In a production system, only the Database is configured and supported.  In JDeveloper, only the Filesystem is configured.

This isn't normally an issue but if you want to debug what is going on in MDS when you make a customization, using WLST commands to download the MDS contents from the Database can be tiresome.

Another alternative is to configure an MDS filesystem store on the server and use that when deploying the application.  While it's not supported in a production system, it at least allows you to easily see what is being created.  In fact this is what JDeveloper already does when you deploy an application to it's built-in server rather than just clicking on the "run" button.

To see the JDeveloper configured MDS connection information, start up the Server Instance from the "Run" menu item and access the console at:  http://127.0.0.1:7101/console  (weblogic/weblogic1)



Under: "Services->Persistent Stores" you will see the pre-configured MDS connection "mds-integServerRepos"

Selecting this "Persistent Store" will show you the directory that MDS will write to for applications deployed to this server.

Since MDS already supports deploying to a filessystem store (even if it doesn't support running to one), you can do the same thing in your standalone server.

The trick here is that all Data Sources & Persistent Stores with a prefix of "mds-" will be offered as an option when you deploy from JDeveloper.  If your app is configured to use MDS, a dialog will popup during deployment requesting the MDS store to use for the deployed application.
To create your own Filesystem store in the deployment environment, create a new persistent store prefixed with "mds-" and point it to an existing directory.
All files added to the Metadata Archive (MAR) file will now be created as files in your MDS Filesystem directory. Likewise, all customizations and new base documents will also appear in this directory.

No comments:

Post a Comment