Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


EAServer 6.1 .NET Client Support
Enabling .NET to communicate with EAServer components using IIOP

The EAServer .NET client is one of the most important features in EAServer 6.1. This new feature enables .NET to communicate with EAServer components using IIOP. It provides underlying marshaling support for PowerBuilder's WinForm applications with EAServer and it's also a way to interoperate between .NET and J2EE distributed objects.

In this article, we'll introduce EAServer .NET client and illustrate how to invoke EJB in EAServer from ASP.NET and PowerBuilder WinForm application.

Note: The ${EAServer6.1} in this article refers to the EAServer 6.1 installed directory.

Overview of .NET Client
The EAServer 6.1 .NET client contains the following components:

•  NetCompiler - To generate C# stubs for existing components inside EAServer. You can invoke NetCompiler with the batch file, netcc.bat, located in ${EAServer6.1}\bin.

To generate stubs for EJB deployed at EAServer 6.1, use the following command:

${EAServer6.1}\bin\netcc.bat ejbjar-${ejb_package_name}

•  .NET Runtime Assemblies To provide runtime support for C# stubs to communicate with EAServer such as managing IIOP, SSL, compression, and so forth. The .NET runtime assemblies are located in the ${EAServer6.1}\lib directory. The two libraries of interest in the runtime assemblies are:
- com.sybase.iiop.net.dll - Provides basic runtime support such as marshaling, managing connection, SSL, compression, and so forth
- com.sybase.ejb.net.dll - Provides runtime support for invoking EJB using .NET

Preparing EJB for the C# Client
To begin with, we need to prepare an EJB for our sample. You can create the EJB using your favorite IDE. In this case, I created the EJB with Netbeans5.5. The EJB's remote interface has two methods:
•  String sayHello(String yourName) throws RemoteException
•  ResultSet getResultSet(String sql) throws RemoteException

The first method just concatenates yourName with the word "Hello." The second method uses the SQL statement provided to query the default connection cache of EAServer and sends back a java.sql.ResultSet of the query result to the client.

After obtaining the ejbjar, you need to deploy it to EAServer. You can deploy the ejbjar using EAServer's Web-based Management Console.

Generating the C# stubs with NetCompiler
The EJB package name is dotnetsample (the package name is lower case), which is the same as your ejbjar's filename without an extension. Now you're ready to execute the following using the NetCompiler to generate C# stubs:

${EAServer6.1}\bin>netcc.bat ejbjar-dotnetsample

NetCompiler generates both the C# stubs source files and the compiled assemblies. Normally, we don't have to worry about the C# source files since these *.cs files will be compiled and packed inside the output assembly as follows:

${EAServer6.1}\deploy\assemblies\dotnetsample.client.dll

There are two classes inside the assembly that we need to take note of:
•  com.sybase.net.sample.MyEJBRemote C# remote interface
•  com.sybase.net.sample.MyEJBRemoteHome C# remote home interface

The C# remote interface and remote home interface names are identical to Java. The interfaces are used for EJB remote stub and home stub.


About Guoping Zhang
Guoping Zhang is a developer with the EAServer team in Beijing. He is involved in developing the .NET client for EAServer 6.1.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Enterprise Open Source Magazine Latest Stories . . .
Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP). The...
With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and st...
AMD said late Tuesday that its chief sales officer Emilio Ghilardi had left the company and that CEO and president Rory Read is going to do his job while a replacement is sought. AMD didn’t say why Ghilardi left but it’s assumed Read wants his own people. Read is relatively new to th...
During the lifespan of M3 (Monitis Monitor Manager) there has always been something lacking – timers. M3 execution procedure was outlined in this previous article. The execution mentioned in the latter was a one-time-execution, whereas server monitoring requires periodic invocati...
Red Hat is putting its bought-in Gluster scale-out NAS storage technology, acquired in October, on the Amazon cloud. It’s styled Red Hat Virtual Storage Appliance for Amazon Web Services and other clouds are supposed to follow in short order.
A new episode of the screencast series is now available at the OpenNebula YouTube Channel. This screencast demonstrates the new easily-customizable self-service portal for cloud consumers. Its aim is to offer a simplified access to shared infrastructure for non-IT end users. The scree...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE