This note addresses the installation of a J2EE URL resource in the WAS 4.0 test environment of WebSphere Studio Application Developer 5.0. This task is easy using the admin console of WSAD AE or the admin web interface of WAS AEs. A facility for adding a URL resource directly into a WSAD server configuration has yet to materialize as of WSAD 5.0.1. The following steps demonstrate how to achieve this using the WAS AEs admin web interface. This can also be performed by direct modification of the server-cfg.xml.
First you need to determine which WSAD project holds your WTE server configuration information. You provide this project name when you create a server configuration. But I don't know of a way to determine this from the server configuration itself. If you can't remember which folder you use for storing WTE configurations, switch to the server prospective and browse the folders in the Navigator view. Server projects will be denoted by a special server folder icon. This should considerably narrow downt the number of potential projects in which to find your configuration.
Your server project will have a folder named after your server configuration with the .wsc extension. This folder should contain the configuration's server-cfg.xml file. Right-click on this file and select Properties. The Location field should contain the fully qualified path name to server-cfg.xml file. Record this information for later.
http://localhost:9090/admin9090 is the default admin port. If yours is different, it will be listed in the configuration editor under the Ports tab.
Resources --> URL Providers --> Default URL Provider --> URLs
Click on the URLs link to display the currently configured URLs. If this is your first one, there shouldn't be any listed.
java:comp/envshould not be prepended to the name. This is a global name accessible to all web applications and EJBs.
c:\temp\my.propertiesyou would enter
file:///c:/temp/my.properties
The URL is now configured for your WTE. You can restart the WTE without the admin application running if you like. In any case, your server code should be able to acquire a reference to the URL resource using the globel JNDI name you specified above.
<factories xmi:type="resources:URL" xmi:id="URL_1"
name="wteurl"
jndiName="url/wteurl"
jtaEnabled="false"
spec="file:///c:/temp/init.props">
<description xsi:nil="true"/>
<category xsi:nil="true"/>
<propertySet xmi:id="J2EEResourcePropertySet_2"/>
</factories>
In the example above, the bold values are ones you supply.