• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejbCreate

 
Ivan Matmati
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm working on EJB 2.0 with weblogic 8.1.
I wanted to provide both remote and local interfaces for a session bean.
I don't know however if it makes sense!
But the fact is that the deploy tool of weblogic 8.1 complained about the fact that my ejbCreate method has a clause with RemoteException.
I deleted it, and then all seems to work.
But my question is does my bean still callable remotely since I get rid of the RemoteException in its signature?Is there a trick concerning weblogic?
thx all
 
john smith
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your local interfaces should only throw EJBExceptions.
Your remote interfaces should throw EJBExceptions and RemoteExceptions.
Your bean implementation methods should throw no exceptions (unless you require them to)
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ivan Matmati:
But the fact is that the deploy tool of weblogic 8.1 complained about the fact that my ejbCreate method has a clause with RemoteException.

None of the methods in the bean class should ever throw RemoteExceptions!
It is the responsibility of the Container to catch system exceptions and throw RemoteExceptions to the remote client and EJBExceptions to the local client. We only throw EJBExceptions from the bean code, which happens to be unchecked RuntimeException.
[ March 10, 2004: Message edited by: Vish Kumar ]
 
Ivan Matmati
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all!
I have to work on the subject I think.
bye
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!