• 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 access Remote EJB's ?

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Environment
------------
I am using JBOSS 3.0.6, EJB 2.0, CMP 2.0
Problem
-----------
I have Session Bean(SB) A running on server 1 and
Session Bean(SB) B running on server 2.
Observations/Points
-------------------
** I want to be able to call B from A, but when i try to do that i get a java.rmi.MarshallException when i try to type cast the object that i get on lookup.
** I have verified that, the object that i am getting on the lookup is the same object as i am trying to type cast.
** However when i try to call the same bean B on server 1 from a normal application client (i.e., not from a JBoss server) it works fine
I have been doing alot of research on the net or this stuff over past 1 week, found alot of (so called solutions) but none work, here is some what i tried
(1) Some people suggested making the transaction on the session bean to not required .... tried that didnt work.
(2) Some told to include the interfaces in the shared directory/ classpath of the server ... which would be jboss3.0.x/server/default/lib when i am using the default server .. but that gives me the same error.
(3) Some say that this is a endpoint for CMP and to user BMP, .. i havent tried that out ... but i would like to avoid BMP
Can somebody let me know what am i missing there or atleast point me to place where i can learn about this?
TIA
Meka Toka
 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this has nothing to do with CMP, besides, you say that these are session beans... Could you post some related code?
 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have session bean SBa on server1, which needs to access session bean SBb on server 2. Both are CMP 2.0, EJB 2.0
So, SBa is a client to SBb
In ejb-jar.xml on server1,
--------------------------
SBa has <ejb-ref> tag to SBb, am not using <ejb-link> tag as this is not in any jar on server1.
In jboss.xml on server1
------------------------
SBa has a <ejb-ref> tag refering to a <jndi-name> as below
ip.of.server2.number_port/application/package/path/SBb
I was following http://www.jboss.org/online-manual/HTML/ch05s13.html
But then i have been chasing this problem for 3 weeks now. I even found a bug filed on sourceforge.net
://sourceforge.net/tracker/?group_id=22866&atid=376685&func=detail&aid=663114
I wanna hear from anybody out there who succeeded making a remote call.
Regards
Meka Toka
[ March 05, 2003: Message edited by: meka toka ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic