| By Wayne Citrin | Article Rating: |
|
| March 10, 2006 03:00 PM EST | Reads: |
21,203 |
Set Up and Run the Java Client Programs
We have included Java JMS receivers and transmitters; they can be found in the Java clients folder. The source code for these JMS client programs is supplied, and you are encouraged to examine it. They are typical JMS clients. If you are using a different application server or have installed WebLogic Server in a nondefault location, you may need to modify some of the parameters in the source code, or change the build classpath to reference different Java libraries.
Start up a sender client for queue1 (the orchestration's input queue), and receivers for queue2 and queue3 (the orchestration's executive and general employee output queues, respectively). There are .bat files supplied for exactly this purpose. If you are using a different application server, or if WebLogic Server is installed in some nondefault location, you may need to edit the runtime classpaths before running these .bat files.
Run the Orchestration
Now that the JMS server, the orchestration, and the Java clients have all started, we can now supply data to the orchestration and watch it run. Consult Figure 4 to see the architecture of the solution and how the orchestration ports, the JMS queues, and the JMS clients relate.
First, supply an employee record through the queue1 sender. You will be prompted for a grade level. Use grade level 2 (an ordinary employee). You will now be prompted for first, middle, and last name, ID number, and birth date. Make something up (Figure 5). The sender program will compile the information in an XML record and submit it to the JMS queue named queue1. The JMS adapter will read the record off queue1 and submit it to the orchestration on the jmsFromInputQueue receive port. As an ordinary employee record, it will be output on the jmsToHRQueue send port, from which the JMS adapter will place it on the queue3 JMS queue, and the record will be received by the queue3 receiver and displayed (Figure 6).
Now, do the same thing with an executive record. Enter a grade level of 7, plus the additional information (Figure 7). This will cause an XML version of the record to be submitted on queue1, and received by the JMS adapter from queue1 and submitted to the orchestration on the jmsFromInputQueue receive port. A copy of the record will be transformed and output to the jmsToExecQueue, from where the JMS adapter will submit it to the queue2 JMS queue, so that it is displayed by the queue2 receiver (Figure 8). In addition, the original record is output to the jmsToHRQueue send port, transmitted to queue3, and received and displayed by the queue3 receiver (Figure 9).
When you are done working with the example, you can close the JMS clients, stop the orchestration, and shut down the WebLogic Server.
Summary
This article shows how a JMS adapter for BizTalk Server can be constructed using the JNBridgePro Java/.NET interoperability tool. With this information you should be able to construct your own JMS adapter, construct adapters to other Java-based software, or simply call Java libraries from BizTalk Server orchestrations, using a Java/.NET bridging tool such as JNBridgePro.
As described, the adapter has a number of hard-wired parameters that target it to the WebLogic Application Server. It is relatively simple to retarget the adapter to a different app server, or generalize it so that the parameters can be assigned at runtime.
The creation and deployment of adapters can seem like an involved process, but once you get past the details inherent in the creation of any BizTalk Server adapter, creating an adapter that bridges between BizTalk Server and J2EE is quite straightforward.
Resources
- Woodgate, S., Mohr, S., and Loesgen, B. Microsoft BizTalk Server 2004 Unleashed. Sams, 2005.
- BizTalk Server 2004: www.microsoft.com/biztalk
- BizTalk Server 2004 SDK Refresh: www.microsoft.com/downloads/details.aspx? FamilyID=8A1CA3AF-790C-4261-838A-9F0661C72887&displaylang=en
- BizTalk Server 2004 Adapter Wizard: www.gotdotnet.com/Community/UserSamples/Details.aspx? SampleGuid=c95217fc-4f9f-4fec-9d68-1aa9456b6ca0
- Visual Studio.NET 2003: http://msdn.microsoft.com/vstudio
- J2SE SDK (J2SDK) downloads:
- BEA WebLogic 8.1: http://dev2dev.bea.com/wlplatform
- JNBridgePro: www.jnbridge.com
- Sample code used with this paper: www.jnbridge.com/biztalk/JMSAdapterSample.zip
Published March 10, 2006 Reads 21,203
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Wayne Citrin
Wayne Citrin is the CTO at JNBridge. He is the architect of JNBridgePro, and has been engrossed in Java and .NET interop issues since .NET’s beta days. Previously Wayne was a leading researcher in programming languages and compilers, and was on the Computer Engineering faculty at the University of Colorado, Boulder. For more information on Java and .NET interop, visit Wayne’s blog at www.jnbridge/com/blog.
- Kindle 2 vs Nook
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Infrastructure-as-a-Service Will Mature in 2010: Microsoft's David Chou
- Windows 7 – Microsoft’s First Step to the Cloud
- Cloud Expo and the End of Tech Recession
- Jill Tummler Singer, Deputy CIO of CIA, Keynotes at GovIT Expo
- Reality Check at the Cloud Computing Expo
- Visual Studio 2010 Is Cloud Friendly
- Fired SCO CEO Fires Back
- Kindle 2 vs Nook
- The Difference Between Web Hosting and Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- Wave on Ulitzer: Confessions of a Google Wave Fanboy
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Cloud Computing Best Practices
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Infrastructure-as-a-Service Will Mature in 2010: Microsoft's David Chou
- Eval JavaScript in a Global Context
- Windows 7 – Microsoft’s First Step to the Cloud
- Google Maps and ASP.NET
- Crystal Reports XI & How It Has Changed
- Converting VB6 to VB.NET, Part I
- Creating Controls for.NET Compact Framework in Visual Studio 2005
- Where Are RIA Technologies Headed in 2008?
- How to Write High-Performance C# Code
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Implementing Tab Navigation with ASP.NET 2.0
- i-Technology Photo Exclusive: Bill Gates & Steve Jobs In "Nerds"
- .NET Archives: Getting Reacquainted with the Father of C#
- i-Technology Viewpoint: "SOA Sucks"
- Programmatically Posting Data to ASP .NET Web Applications




























