Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2004, 12:51 AM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exception Handling in EJb2.0

hi all
Problem: How to handle EJB1.0 RemoteException in EJB2.0 while migrating from EJB1.0 to EJb2.0.

Description:
Remote interface: RepoMain
Home Interface: RepoMainHome
Bean Class : RepoMainBean

My application developed using Stateless Session Beans 1.0 and it is using some User Defined Java classes.My Bean class and Java classes are throwing RemoteExceptions(According to EJB1.0 Spec.).While migrating to EJb2.0 i replaced RemoteException with EJBExceptions in Bean class and Java classes.Now iam getting some Warnings.

Warning:From the above RepoMain(RemoteInterface)methods must throw EJBExceptions.

According to EJb2.0 i can throw RemoteException in Remote and Home Interfaces.But i should not throw RemoteException in Bean class.

so is there any way to handle RemoteException from EJB1.0 in EJB2.0
without replacing with EJBExceptions.but my userdefined java class must throw either Remote or EJBException.

Actually i want to get feeling that my Beans are devoped purely in EJB2.0.forthat one i don't want throw any exceptions in Bean(RepomainBean)class.is it possible to handle those Exceptions in Bean class try/catch block.if not
please let me know how to handle those Exceptions.

Advance Thanks

Mahender Reddy

 
Old September 16th, 2004, 01:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Mahender,

How about posting that on a relavant forum of this site(Java forum)? This is a feedback forum.

_________________________
- Vijay G
Strive for Perfection
 
Old October 21st, 2004, 01:16 AM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is a nice article on EJB Exception handling, should definitely deserves a look

http://www.ideas2work.com/exception-handling.html

Thanks.
:)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception Handling NewTitle2007 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 6 August 8th, 2007 04:03 AM
exception handling jay schumacher VB.NET 2002/2003 Basics 1 April 14th, 2006 08:40 AM
Exception handling aldwinenriquez General .NET 0 August 17th, 2005 06:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.