Changing Interoperability Methods


When you have the XBikes application operating correctly, you can change the interoperability methods so that XBikes uses different use case adapters or resource interoperability adapters. This section describes the possible options in the following topics:

  • Using Web Services Adapters

  • Using Ja.Net Adapters

  • Using JNBridgePro Adapters

The following sections describe how to use each kind of adapter.

Using Web Service Adapters

You can use Web services adapters in the following scenarios.

  • Using Web Service Adapters between the Web and Business Tiers

  • Using Web Service Adapters between the Business and Data Tiers

To change XBikes to use Web services adapters, you must modify the application configuration to use the Web services adapters, update the application configuration with the URLs of the Web services, and then restart the application. The following sections describe how to perform these tasks.

Using Web Service Adapters between the Web and Business Tiers

This section describes how to use Web services between the Web and Business tiers. You can either use .NET Web services or J2EE Web services; complete the steps in one of the following procedures.

To use .NET Framework Web services between the Web and Business tiers

  1. In Notepad, open the Web.config file for the XBikes application. This file is located in the C:\Xbikes\Net\XBikes-Web folder.

  2. Find the start tag of the <appSettings> element in the Web.config file.

  3. Find the <add> child element that specifies the URL of the .NET Framework Web service Business tier service interface. Set the value attribute to the correct URL as show in the following example.

     <add   key="XBikes-UseCaseInteropAdapters.Net.BLLWSSI.BLLWSServiceInterface"   value="http://localhost/XBikes-BLL-WSServiceInterface/BLLWSServiceInterface.asmx" /> 

  4. Locate the <adapters> tag. Locate the <!-- .NET WS Adapters --> comment and remove the comments from configuration information located immediately below this comment.

  5. Within the <adapters> section. Locate an existing group of tags that have not been commented out. Wrap the section with comments.

  6. Save Web.config.

To use J2EE Web services between the Web and Business tiers

  1. In Notepad, open the Web.config file for the XBikes application. This file is located in the C:\Xbikes\Net\XBikes-Web folder.

  2. Find the start tag of the <appSettings> element in the Web.config file.

  3. Find the <add> child element that specifies the URL of the J2EE Web service Business tier service interface. Set the value attribute to the correct URL as shown in the following example.

     <add   key="XBikes-UseCaseInteropAdapters.J2EE.BLLWSSI.BLLWSServiceInterface"   value="http://192.168.99.199:9080/XBikesBLLServiceInterface/ services/BLLWSServiceInterface" /> 

  4. Locate the <adapters> tag. Locate the <!-- J2EE WS Adapters --> comment and remove the comments from configuration information located immediately below this comment.

  5. Within the <adapters> section. Locate an existing group of tags that have not been commented out. Wrap the section with comments.

  6. Save Web.config.

Using Web Service Adapters between the Business and Data Tiers

This section describes how to use Web services between the Business and Data tiers. You can either use .NET Web services or J2EE Web services; complete the steps in one of the following procedures.

To use .NET Framework Web services between the Business and Data tiers

  1. In Notepad, open the Dllhost.exe.config file from the C:\Windows\System32 folder.

  2. Find the start tag of the <appSettings> element in the file.

  3. Find the <add> child element that specifies the URL of the .NET Framework Web service Data tier service interface. Set the value attribute to the correct URL as shown in the following example.

     <add   key="XBikes-ResourceInteropAdapters.Net.DALWSSI.DALWSServiceInterface"   value="http://localhost/XBikes-DAL-WSServiceInterface/ DALWSServiceInterface.asmx" /> 

  4. Locate the <adapters> tag. Locate the <!-- .NET WS Adapters --> comment and remove the comments from configuration information located immediately below this comment.

  5. Within the <adapters> section. Locate an existing group of tags that have not been commented out. Wrap the section with comments.

  6. Save Web.config.

To use .NET Framework Web services between the Business and Data Tiers

  1. In Notepad, open the Dllhost.exe.config file from the C:\Windows\System32 folder.

  2. Find the start tag of the <appSettings> element in the file.

  3. Find the <add> child element that specifies the URL of the J2EE Web service Data tier service interface. Set the value attribute to the correct URL as shown in the following example.

     <add   key="XBikes-ResourceInteropAdapters.J2EE.DALWSSI.DALWSServiceInterface"   value="http://192.168.99.199:9080/XBikesResWS/services/ DALWSServiceInterface" /> 

  4. Locate the <adapters> tag. Locate the <!-- J2EE WS Adapters --> comment and remove the comments from configuration information located immediately below this comment.

  5. Within the <adapters> section. Locate an existing group of tags that have not been commented out. Wrap the section with comments.

  6. Save Web.config.

Using Ja.NET Adapters

You can use Ja.NET adapters in the following scenarios:

  • Using Ja.NET Adapters between the Web and Business Tiers

  • Using Ja.NET Adapters between the Business and Data Tiers

To change XBikes to use Ja.NET adapters, you must modify the application configuration to use the Ja.NET adapters, update the application configuration with the URLs of the Ja.NET service, and then restart the application. You must also reconfigure the J2EE application to allow Ja.NET to function, because out of the box, the J2EE application is configured for J2EE to .NET interoperability. The following sections describe how to perform these tasks.

Reconfiguring the J2EE Application for Ja.NET

To enable the Ja.NET adapters to communicate with the J2EE version of XBikes, you must complete one of the following tasks depending upon your configuration.

To change the WebSphere Studio Application Developer 5.0 configuration

  1. Start WebSphere Application Developer Studio 5.0 by clicking Start, pointing to All Programs, pointing to IBM WebSphere Studio, and clicking Application Developer 5.0.

  2. A WebSphere Studio dialog box appears. Change the workspace to c:\xbikes
    \j2ee-ibm and then click OK.

  3. The J2EE – IBM WebSphere Studio Application Developer window appears.

  4. In the left window, click the J2EE Hierarchy tab. The J2EE Hierarchy window appears.

  5. Expand Server Configurations, and then double-click WebSphere v5.0 Server Configuration. The WebSphere v5.0 Server Configuration appears in the main window.

  6. Click the Paths tab from the bottom of the main window. The Paths configuration screen appears.

  7. Click c:\xbikes\J2EE-IBM\janet_libs\janetNetDalProxies.jar, and then click Remove.

  8. Repeat step 7 for c:\xbikes\J2EE-IBM\janet_libs\JanetNetBllProxies.jar and c:\xbikes\J2EE-IBM\janet_libs\janet.jar.

  9. Click the Environment tab from the bottom of the main window. The Environment Options configuration screen appears.

  10. Remove all the entries from the Java VM Arguments field.

  11. Close the WebSphere v5.0 Server Configuration window. The Save Resource dialog box appears. Click Yes to save your changes.

  12. Switch to the J2EE Navigator view in the left pane.

  13. Expand JaNetBLL, expand Java Source, and then expand com.intrinsyc.janet.

  14. Open JaNet.xml.

  15. Locate the <URI> tag and replace http://192.168.0.200:9080/JaNetBLL with http://<ipaddress>/JaNetBLL, where <ipaddress> is the IP address of the computer hosting the JaNetBLL.

  16. Repeat steps 13–15 for both JaNetDAL and JaNetJMS.

  17. You may now restart or start your server.

To change the WebSphere application server configuration

  1. On the computer hosting the Ja.NET service interfaces, open a command prompt and navigate to the C:\Was\Websphere\Appserver\Bin folder.

  2. Type startserver server1, and then press ENTER. After a short period of time, a message displays indicating that server1 is open for e-business.

  3. Open a Web browser window and navigate to http://localhost:9080/admin.

  4. In the User ID field, enter admin, and then click OK.

  5. In the left pane, expand Servers, and then click Application Servers. The Application Servers window appears in the right pane.

  6. In the right pane, click server1. The server1 window appears.

  7. In the right pane, click Process Definition. The Process Definition window appears.

  8. In the right pane, click Java Virtual Machine. The Java Virtual Machine window appears.

  9. Remove all entries from the Classpath field EXCEPT the entry c:\tme\glue\lib
    \GLUE.jar.

  10. Remove the entry from the Generic JVM arguments field. The field should be empty.

  11. Click OK. The Messages section appears at the top of the right pane. Click the Save link.

  12. In the Save pane, click the Save button. The right pane reverts to the WebSphere Application Server home page.

  13. Close your browser and restart the server for the changes to take effect.

You must now update the EAR that contains the Ja.NET adapters you want to access. To do this you must have access to the source code.

To update the EAR that contains the Ja.NET adapters you want to access

  1. Start WebSphere Application Developer Studio 5.0 by clicking Start, pointing to All Programs, pointing to IBM WebSphere Studio, and then clicking Application Developer 5.0.

  2. A WebSphere Studio dialog box appears. Change the workspace to c:\xbikes
    \j2ee-ibm and then click OK.

  3. The J2EE – IBM WebSphere Studio Application Developer window appears.

  4. Close the WebSphere v5.0 Server Configuration window. In the Save Resource dialog box, click Yes to save your changes.

  5. Switch to the J2EE Navigator view in the left pane.

  6. Expand JaNetBLL, expand Java Source, and then expand com.intrinsyc.janet.

  7. Open JaNet.xml.

  8. Locate the <URI> tag and replace http://192.168.0.200:9080/JaNetBLL with http://<ipaddress>/JaNetBLL, where <ipaddress> is the IP address of the machine hosting the JaNetBLL.

  9. Repeat steps 13–15 for both JaNetDAL and JaNetJMS.

You must now recreate the EARs. To do this, follow the steps for manual deployment in Appendix A, and then deploy the EAR to the server. If you have already installed the EARs using the installer, or if you manually installed the EARs, you must uninstall the EARs. This can be done using the Web-based Administrative Console.

Note

To revert back to the original J2EE configuration, you must add the entries you removed in the previous steps. The quickest way to do this is to uninstall, and then reinstall, the J2EE version of XBikes.

Using Ja.NET Adapters between the Web and Business Tiers

This section describes how to use Ja.NET between the Business and Data tiers. To enable the Ja.NET adapters, complete the following steps.

To configure the Ja.NET use case interoperability adapters

  1. In Notepad, open the Remoting.config file for the XBikes application. This file is located in the C:\Xbikes\Net\XBikes-Web folder.

  2. Find the <client url="…"> element, and then set its url attribute to the URL of the Ja.NET BLL service interface as shown in the following example.

     <client url="http://192.168.99.199:9080/JaNetBLL"> 
  3. Save Remoting.config.

  4. In Notepad, open the Web.config file for the XBikes application. This file is located in the C:\Xbikes\Net\XBikes-Web folder.

  5. Locate the <adapters> tag. Locate the <!-- JaNET Adapters --> comment and remove the comments from configuration information located immediately below this comment.

  6. Within the <adapters> section. Locate an existing group of tags that have not been commented out. Wrap the section with comments.

  7. Save Web.config.

Using Ja.NET Adapters between the Business and Data Tiers

This section describes how to use Ja.NET between the Business and Data tiers. To enable the Ja.NET adapters, complete the following steps.

To configure the Ja.NET resource interoperability adapters

  1. In Notepad, open the Remoting.config file. This file is located in the System32 directory located under the system folder, such as C:\Windows, of the computer hosting the Business tier components.

  2. Find the <client url="…"> element that sets the URL for the Ja.NET Data tier service interface, and set its url attribute to the correct URL as shown in the following example.

     <client url="http://192.168.99.199:9080/JaNetDAL"> 
  3. Find the <client url="…"> element that sets the URL for the Ja.NET queue service interface, and then set its url attribute to the correct URL as shown in the following example.

     <client url="http://192.168.99.199:9080/JaNetJms"> 
  4. Save Remoting.config.

  5. In Notepad, open the Dllhost.exe.config file for the XBikes application. This file is located in the C:\Windows\System32 folder.

  6. Locate the <adapters> tag. Locate the <!-- JaNET Adapters --> comment and remove the comments from configuration information located immediately below this comment.

  7. Within the <adapters> section. Locate an existing group of tags that have not been commented out. Wrap the section with comments.

  8. Save Dllhost.exe.config.

To configure the queue name

  1. In Notepad, open the Dllhost.exe.config file. This file is located in the System32 directory located under the system folder, such as C:\Windows, of the computer hosting the Business tier components.

  2. Find the <QueueNames> element. If the name of the MQSeries queue or queue factory has been changed in the J2EE application, define <add> elements to specify the MQSeries queue name and queue factory name for the Ja.NET queue resource interoperability adapter as shown in the following example.

     <add key="JaNET-MQSeries-QName" value="XBikesQ" /> <add key="JaNET-MQSeries-QFactoryName" value="XBikesQCF" /> 
  3. Save Dllhost.exe.config.

Using JNBridgePro Adapters

You can use JNBridgePro adapters in the following scenarios.

  • Using JNBridgePro Adapters between the Web and Business Tiers

  • Using JNBridgePro Adapters between the Business and Data Tiers

To change XBikes to use JNBridgePro adapters, you must modify the application configuration to use the JNBridgePro adapters, update the application configuration with the URLs of the JNBridgePro, and then restart the application. The following sections describe how to perform these tasks.

Using JNBridgePro Adapters between the Web and Business Tiers

This section describes how to use JNBridgePro between the Business and Data tiers. To enabled the JNBridgePro adapters, complete the following steps.

To configure the JNBridge use case interoperability adapters

  1. In Notepad, open the JNBProxy.config from the C:\Inetpub\Wwwroot folder.

  2. Find the <wellknown> element, and then set its url attribute to the URL of the JNBridge BLL service interface as shown in the following example.

     <wellknown   url="jtcp://192.168.99.199:8085/JNBDispatcher"   type="com.jnbridge.jnbcore.JNBDispatcher, JNBShare" /> 
  3. Save JNBProxy.config.

  4. In Notepad, open the Web.config file for the XBikes application. This file is located in the C:\Xbikes\Net\XBikes-Web folder.

  5. Locate the <adapters> tag. Locate the <!-- JNBridge Adapters --> comment and remove the comments from configuration information located immediately below this comment.

  6. Within the <adapters> section. Locate an existing group of tags that have not been commented out. Wrap the section with comments.

  7. Save Web.config.

Using JNBridgePro Adapters between the Business and Data Tiers

This section describes how to use Web services between the Business and Data tiers. To enabled the JNBridgePro adapters, complete the following steps.

To configure the JNBridge resource interoperability adapters

  1. In Notepad, open the Dllhost.exe.config file from the C:\Windows\System32 folder.

  2. Find the <jnbridge> element.

  3. Make sure the <add> child element specifies the URL for the JNBridge Data tier service interface as shown in the following example.

     <add   key="DAL_PrimaryURL"   value="jtcp://javabox:8086/JNBDispatcher" /> 
  4. Find the <QueueNames> element. If the name of the MQSeries queue or queue factory has been changed in the J2EE application, define <add> elements to specify the MQSeries queue name and queue factory name for the JNBridge queue resource Interoperability adapter as shown in the following example.

     <add key="JNBridge-MQSeries-QName" value="XBikesQ" /> <add key="JNBridge-MQSeries-QFactoryName" value="XBikesQCF" /> 

  5. Locate the <adapters> tag. Locate the <!-- JNBridge Adapters --> comment and remove the comments from configuration information located immediately below this comment.

  6. Within the <adapters> section. Locate an existing group of tags that have not been commented out. Wrap the section with comments.

  7. Save Dllhost.exe.config.




Application Interoperability. Microsoft. NET and J2EE
Application Interoperability: Microsoft .NET and J2EE: Microsoft(r) .Net and J2ee (Patterns & Practices)
ISBN: 073561847X
EAN: 2147483647
Year: 2003
Pages: 104

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net