• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java API Vs Ejb/Xml

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I need some information from all of you experts out there.
Currently we are running an appserver, the way it works is that we use ejb/xml to talk to corba stubs which eventually will talk to the server objects.
I am quite new to this technology, and currently considering of removing the use of ejb/xml layer and replace it with JAVA API. The idea is to get Webservice to talk to Corba stubs through JAVA API.
My question is:
1. Has anyone out there done this before? if so, what is your suggestion to this?
2. Is there any performance issue?
3. Is there any sample out there that does this?

Any reply/opinion is highly appreciated.
Thanks in advance.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I understood your requirements correctly, you have:
1) A client written in Java running on WebSphere
2) A service running on an ORB
and you want the client to invoke the methods provided by the service. Right?
Now, if this is all there is, I can't see the reason for wrapping the CORBA operation inside an EJB. Why did you use EJB in the first place? Has that particular requirement vanished or is it still valid? Are you using the EJB container to limit simultaneous connections to the ORB? On the other hand, what do you mean with "ejb/xml"? Are you sending serialized XML documents as parameters to the CORBA operations?
The simplest implementation would probably be to
1) compile the IDL file into a static stub class
2) use this generated stub class from your Java code to invoke the service's methods
Finally, don't take my word for it - I have only coded CORBA stuff with C/C++ (using the open source MICO), and even that exposure was quite limited.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cibo,
Welcome to the Javaranch. We don't have many rules here but the one rule we do have is our naming convention. Please change your user name to match the requirements of our naming convention.
Thanks.
Kyle
 
kevin rhee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much for your reply,

If I understood correctly, what you're are saying is I can actually access the server through Corba stubss by calling it directly from the web service?
How can it be done? Is there any Java APIs to do this?
Could you elaborate more in details please.
Sorry I'm still very new to this technology.
Just in case my point was a bit blur, I think I should explain more of my situation.
Currently our structure looks like the following:
client <-> Webserver (bea weblogic) <-> appserver (bea weblogic) <-> repository (server, uses POA objects)
On top of the server layer, there is corba stubss that the app server talks to via ejb.
xml files are used for configuration purposes.
What we are doing now, we have a .war file that contains all the jsps,
and then jar files that talks to server through corba stubss that sits on top of the server layer.
And I need to sort of removing the ejb layer, also not using the xml.
Now, sorry if this sounds confusing, as I also just learnt about this technology.
Could you please care to comment further?
What we are aiming is to use sort of web service and access the server through corba stubbs,
directly from the web service using JAVA API.
Is is possible to do so?
Could you also direct me to some sample that does this?
Thanks in advance.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

client <-> webserver <-> appserver <-> repository


If I read you correctly, you're trying to do this:
client <-> webservice <-> repository
or this:
client <-> webapp <-> webservice <-> repository
In either case, the piece of code talking to the repository is plain old Java and uses the org.omg.* packages from the J2SE.
I'm afraid I don't have any references at hand but I'd be surprised if the Internet wouldn't be filled with tutorials for writing CORBA applications with Java.
 
kevin rhee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for your reply.
It's been very helpful.
However, I have another quick question, is it possible to do the above without having to use ejbs on the app server layer?
Thanks.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure. You can use the CORBA libraries (org.omg.*) from a servlet, a plain-old Java class, Enterprise JavaBean, a web service implementation, etc.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic