Results 1 to 6 of 6

Thread: Exception handling in EJB

  1. #1
    Join Date
    Feb 2010
    Posts
    796

    Exception handling in EJB

    Hi all,

    I am build a project in JAVA. With J2EE a Enterprise Development Platform of choice, more and more applications based on J2EE will be put into production. J2EE platform, is one of the important components of enterprise Java Bean (EJB) API. Together with J2EE and EJB technology offer many advantages, but also comes with some new challenges. The issue with EJB exception handling. Please suggest some trick. Thanks in advance.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Exception handling in EJB

    In the hello-world situations, the exception handling is very simple. Every time when you encounter an unusual approach, we catch the exception and print a stack trace or a statement that this method throws an exception. Unfortunately, this method is not sufficient to cope with reality in the various types of exceptions occur. In the production system, when there is an exception thrown, it will probably be the end-user can not handle his or her request. When this exception occurs when the end-users typically expected to be like this:
    #There is a clear message that an error has occurred
    #There is a unique error number, he could then access can easily access customer support system
    #The problem is resolved quickly, and can be confident that his request has been processed, or will be dealt with at a set time period.

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    Exception handling in EJB

    Enterprise class system will not only provide these basic services, will be ready for the necessary back-end system. For example, the customer service team should receive immediate error notification to the customer service representative to call for help before the problem can be realized. In addition, the service representative should be able to cross-reference the user's unique error number and product logs to quickly identify problems the problem is best able to locate the exact line number or the exact method. In order to end-users and support teams they need the tools and services, to build a system, you will need to be deployed on the system could possibly go wrong after all parts of an idea. All the best.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: Exception handling in EJB

    To resolve system errors is to establish a production system constructed with the same test system, and then track all of the code lead to an exception thrown, as well as all the different branches of the code. In a distributed application, is likely to be the debugger does not work, so, you may use System.out.println () method of tracking an exception. System.out.println Although very convenient, but a huge overhead. In the disk I / O period, System.out.println pairs of I / O processing of synchronization, which significantly reduces the throughput. Check and reply.

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Exception handling in EJB

    when the product J2EE application server is restarted, this file may also be rewritten.The principle of exception handling is here are some generally accepted principles of exception handling:
    # If you can not handle an exception, then do not catch it.
    # If you catch an exception, please do not casually deal with it.
    # An exception was thrown as far as possible in close proximity to the local catch the exception.
    # Catch exceptions in places where it recorded in the log, unless you intend to throw it back.
    Best of luck.

  6. #6
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Exception handling in EJB

    In EJB there are many type of exception. I will discuss some exception below:
    JVM Exception: This type of exception thrown by the JVM. Out Of MemoryError exception is the JVM a common example. Exceptions to the JVM you are powerless. They showed that a deadly situation. The only decent way out is to stop the application Servers, and then restart the system.
    Application Exception: Application exception is a custom exception, by the application programs or third-party libraries throw. These are essentially unchecked exception ; which indicate the business logic in a condition that remain unmet. In such circumstances, EJB method call can gracefully handle this situation and adopt another one alternate route.

Similar Threads

  1. Exception Handling in .Net
    By Bruno007 in forum Software Development
    Replies: 5
    Last Post: 25-12-2010, 01:30 AM
  2. Exception Handling in Singleton
    By Bottlenecked in forum Software Development
    Replies: 6
    Last Post: 20-09-2010, 09:14 PM
  3. Exception handling in PL/SQL
    By Ameeryan in forum Software Development
    Replies: 5
    Last Post: 25-02-2010, 11:04 PM
  4. Problem in handling exception with Regex
    By Gunner 1 in forum Software Development
    Replies: 5
    Last Post: 16-02-2010, 01:56 AM
  5. Exception Handling in Csharp
    By Jesus2 in forum Software Development
    Replies: 3
    Last Post: 11-11-2009, 11:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,134,291.11828 seconds with 16 queries