Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Since using forums in my early days 10 years ago in CompuServe, one had to log back on and sometimes wait days for a response. Now I get a response e-mailed to me which I can click a link and go right back to exactly where My post was..."

Geography

Where in the world do Tek-Tips members come from?

Returning a Remote interface from a Local interface

Stedo (Programmer)
2 Jan 06 2:49
hi,

Is it possible to return a Remote interface from a Local interface? I have a client which I want to have access to the Remote interface but not have access to the Home interface, so I want to create the Remote interface on the server and pass it to the client. But I don't know how to create the Remote interface when using the Local interface. Can anyone help?

Thanks
Steve
timw (Programmer)
9 Jan 06 6:22
What you need to remember is that with EJB remoting, you're not really dealing directly with server classes from the client. There are proxy objects in-between which handle the communication and marshalling. Additionally, any object which you want to send 'over-the-wire' has to be serializable, and I would doubt whether a proxy (since that is really what your dealing with when you're talking about Remote Interfaces) is.

What your proposing hardly seems like 'Best Practice' for a client/server architecture. What are the requirements which are prompting you to consider such a solution?

If you want the client to be insulated from such concerns as talking to remote EJBs (which is desirable) then you'd be better coding to pure business (service) interfaces within the client, have the server remote interfaces extend these, and introduce an abstraction layer between the client and these business services which handles the EJB lookups and home interfaces.

A lightweight framework called Spring can help with this (http://www.springframework.org/)

You might also consider posting a question on the OO analysis and design forum (forum678). There are guys there who can give detailed solutions to problems like this, but try searching it first. It's probably already been dealt with before.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close