• 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

How to switch between local and remote interfaces by using the deployment descriptors

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to switch the business interface of a session bean from a local to a remote business interface solely by using the deployment descriptors in a Java EE 5 compatible manner ?
Up till now I couldn't find an example, post or reference related to this topic.

The following is just to add more detail to the stated question :


Because no annotation is specified at MyBusinessInterface the business interface will by default be a local business interface.
So my question is how I can tweak the deployment descriptors so that MyBusinessInterface will behave like a remote business interface.
The answer will provide me the ability to adjust the intent of the business interface - local or remote - during deployment instead of during development.








 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note I do not have an answer to the following question :

Is it possible to switch the business interface of a session bean from a local to a remote business interface solely by using the deployment descriptors in a Java EE 5 compatible manner ?

But just in case anyone is interested. I do, however, have a workaround that I consider to be an ugly hack.
The ideal solution would have just one interface and will use the deployment descriptors to determine whether the intent of usage of the business interface is remote or local.
The rest of this post is about the workaround I am currently using.

Recipe of how to switch between the usage of a local and remote interface :

The first step required is to define both local and remote business interfaces.

The second step is to make the switch based on the usage of ejb-ref or ejb-local-ref.
The following example is provided to add more detail to this :




 
You may have just won ten million dollars! Or, maybe a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic