advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the Code for this Article
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 5/5 | Rate this item | 1 user has rated this item.
Email this articleEmail this article
 
EJBs for Everyone: Consume EJBs in .NET Using C# and a Web Service
Getting your apps ready to interact with a J2EE application server is a daunting task for the average VB.NET or C# developer, but Visual MainWin uses Web services to simplify the process. Find out how and learn to write and consume EJBs using C# and a .NET Server.  

advertisement
he complexity involved in building enterprise-class apps is, unfortunately, beyond the skill-set of your average developer. It requires the consideration of a lot more than your actual application logic. The framework on which your application resides needs to handle high traffic, availability, and performance—all before you even write the specifics of your application! Done correctly, the framework takes care of the broad requirements of performance and scalability, leaving your developers free to write applications that are concerned only with their application-specific logic.


Architects generally face a fork in the road in the planning stages when designing an enterprise system. Should you build all of it yourselves? Going down to the level of threading models, messaging queues, object pools, and database connection pools? Or should you use an off-the-shelf enterprise application framework? This is where the J2EE spec, and more importantly the application server that implements this spec, comes in handy. If you choose to use an application server such as WebSphere, Weblogic, or JBoss, the infrastructure is already built for you. More importantly, it is tested and proven in many environments. In many cases, this is clearly a better option than trying to grow your own and test, deploy, and maintain it.

It seems like a no-brainer. Except that if you choose to use a pre-existing infrastucture, your apps need to be able to work with it.

EJBs to the Rescue
If your critical business logic resides in a technology like EJBs, your app will be infrastructure-ready. Once again, this not an easy task. Most companies have a large pool of Visual Basic, Java, or C# developers who are simply not up to this challenge. But Visual MainWin changes this, allowing you, the Visual Basic, Java, or C# developer to build an application (using C# or VB.NET) you can deploy to a J2EE application server.

Writing EJBs is but one part of this task—you also have to consume them. Of course, consuming them can be just as difficult to the uninitiated. A well-designed application will have your EJBs in a business tier, which hopefully should not change too frequently. A high-level view of a typical architecture would look something like Figure 1.

Figure 1. Here's a high-level view of a typical architecture.

An Enterprise Information System (EIS) may be scattered across many databases or other services, which are integrated using an abstraction layer termed the integration tier. The business tier takes this data and adds value to it through business logic. For example, an EIS may contain a real-time data source indicating the price of a stock, and another less-frequently updated data source containing the last posted earnings for a company. An EJB, residing in the business tier then calculates the common P/E (Price over Earnings) analytic. The presentation tier consumes this EJB in a given session and renders the results to the user.

In many cases, the rate of change of an application decreases the further you move away from the user. For example, in the above case P/E is always P/E and the EIS does not frequently change. As clients use your application, requirements change, and as such there is the need for changes such as in the presentation of the application or the addition of new features or integration points.

All too often, enterprises get stuck here. They discover the productivity benefits of using Visual Studio.NET and want to use it. However, plugging .NET into EJBs is not an easy task. They can bring in expensive J2EE experts to wrap the EJBs as Web services for .NET to consume and hope not to hit interoperability errors. Or they can throw away the EJBs and start again, building from the ground up using Microsoft tools and services.

Neither option is particularly attractive, and Mainsoft have brought a new option to the table with the introduction of Visual MainWin. The application is reviewed here, and an article in how to develop a simple Web service is posted here. The rest of this article will step you through creating a new presentation layer application as a Microsoft Web Forms application that consumes an EJB.

Editor's Note: Laurence Moroney is currently the Director of Product Evangelism at Mainsoft; however, he wrote this article for DevX before joining Mainsoft.


  Next Page: Construct a Sample EJB with Weblogic Workshop


Page 1: IntroductionPage 3: Consume an EJB on a .NET Server
Page 2: Construct a Sample EJB with Weblogic Workshop 
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES