EJB and WAR Classloading

I've been having a nightmare of a time trying to get a new web app to load all the necessary 3rd party classes from the WEB-INF/lib directory, including EJBs. While the servlets load the necessary files from this directory, it appears the EJBs will not run without the necessary classes being defined in the system CLASSPATH. What is the appropriate way to make EJBs self-contained within a WAR file using WebLogic 5.1?Thanks,Kory Lasker
          

You cannot make EJBs self-contained in WAR. in 5.1 you will have to put utility
          classes in weblogic.classpath. 6.1 supports EAR deployment and bundled extensions:
          http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html
          Kory Lasker <[email protected]> wrote:
          > I've been having a nightmare of a time trying to get a new web app to load all the necessary 3rd party classes from the WEB-INF/lib directory, including EJBs. While the servlets load the necessary files from this directory, it appears the EJBs will not run without the necessary classes being defined in the system CLASSPATH. What is the appropriate way to make EJBs self-contained within a WAR file using WebLogic 5.1?Thanks,Kory Lasker
          Dimitri
          

Similar Messages

  • Deploy EAR. Both ejb and war share classes?

    how do you package an ear that has both ejbs and wars that share a common set of classes.
    I have read through all the messages that state to add the Manifest entry Class-Path.
    I've added it to the war, ejb and ear Class-Path and I still get the same NoClassDefFoundError.
    Does anybody truely know how to get this to work? I've tried many things, and it sounds like this should work/.....?????

    Hi Madhav,
    You need to specify Class-Path in ejb-jar MANIFEST.MF,
    not in the ear.
    Regards,
    Slava Imeshev
    "Madhav Inamti" <[email protected]> wrote in message
    news:[email protected]..
    >
    I have tried the manifest classpath too and it just does not work. I had alibrary
    jar specified the ear's manifest classpath and the library jar in the earfile
    too. This should have made the ear classloader load the library jar.Didn't work.
    Does anybody on this newsgroup know about this .. ?
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Since ejb classloader is a parent of a webapp classloader, you should
    only
    add these jar's to your ejb-jar Class-Path Manifest entry. Make sure
    your dependencies
    hierarchy is ok - NoClassDefFoundError usually means that the class
    itself was found,
    but not it's dependent class(es).
    Michael <[email protected]> wrote:
    how do you package an ear that has both ejbs and wars that share acommon set of classes.
    I have read through all the messages that state to add the Manifestentry Class-Path.
    I've added it to the war, ejb and ear Class-Path and I still get thesame NoClassDefFoundError.
    Does anybody truely know how to get this to work? I've tried many
    things,
    and it sounds like this should work/.....?????
    Dimitri

  • Where do I put classes shared between EJBs and WAR

    I have written some ValueObject classes stored in their own jar, they are used by a number of ejbs and and a Web application WAR. I have packaged the thing up as a single EAR but neither the EJBs or the jsps can see these classes.
    How do I share these classes at each end. is their a general deployment descriptor solution or is it application server specific.
    I am deploying to IBM Websphere 6

    verify .classpath file under your web folder for both options
    Sorry, what do you mean is their a classpath value in the xml descriptors. I put my ValueObject into a jar within the WEB-INF\lib of the WAR but these arent seen by the EJBs which are within the EAR but not the WAR. Im not aware that there is a seperate WEB-INF directory for the EAR.
    Structure as follows
    app.ear
            testejb.jar
            META-INF
            testweb.war
                   test.jsp
                   META-INF
                   WEB_INF
                         classes
                              testui.class
                         lib
                             valueobjects.jar

  • Common JAR file between EJB and WAR inside an EAR

    Hi,
    I'm trying to deploy an EAR application outside the development environment and I have the following problem.
    My EAR has the following structure :
    application.ear
    |-- ejbs.jar
    |-- web.war
    Inside the WAR, in /WEB-INF/lib/, I have a set of JAR files that are used by the Web app and also, of course, by the EJB.
    During the deployment step, EJB module cannot be deployed because it miss some classes into the classpath.
    I think it is a common problem in J2EE development, so does someone has a solution for this problem ?
    Please note I'm using Macromedia JRun 4 SP1 on Windows XP.
    Regards,
    Damien.

    Ok,
    I have found a solution that seems elegant to me. I'm going to try and explain...
    My appli.jar EJB module and my appli.war Web module are using both two JAR, let's say common.jar and util.jar.
    The way to share those JAR between the two modules is to have the following structure for the EAR :
    appli.ear
      |-- appli.jar
      |-- appli.war
      |-- common.jar
      |-- util.jar
      |-- META-INF
           |-- application.xml
           |-- manifest.mfIn this structure :
    * the common.jar and the util.jar are not part of the WAR (/web-inf/lib)
    * the manifest.mf file has the following content :
    Manifest-Version: 1.0
    Created-By: My Application
    Class-Path: common.jar util.jarPlease note that space is used as separator for the classpath entry to allow independancy from OS.
    And you know what ? It works ! Well, on Macromedia JRun 4.0 SP1 and on Windows XP but I hope it works on other platforms.
    I hope it will help a lot of people because I spent a lot of time before to find a solution !
    Regards,
    Damien.

  • Persistence shared across EJB and WAR projects

    Hi,
    I have created an Enteprise Application in netbeans which has an EJB project and a web archive. This may be expanded further at a later time by having an application client as well. I am still fairly new to this so you'll have to forgive me if this is a simple problem. I have a persistence unit (persistence.xml) that I need to share across both WAR and EJB, but so far am not having much luck. I have read various responses and they say I should have the EAR constructed as the following:
    project.ear
    =======
    META-INF/MANIFEST.MF
    lib/persistence.jar
    ---> META-INF
    ---> META-INF/persistence.xml
    project-ejb.jar
    project-war.war
    When I try and compile it though I get the following messages from both EE modules:
    Note: The persistence xml file [META-INF/persistence.xml] was not found. NO GENERATION will occur!! Please ensure a persistence xml file is available either from the CLASS_OUTPUT directory [META-INF/persistence.xml] or using the eclipselink.persistencexml property to specify its location.
    I have tried copying the persistence.xml into the main META-INF directory in the EAR file and setting the eclipselink.persistencexml=META-INF/persistence.xml, but it still shows the same thing. Is this a classpath issue or is there something else wrong?
    Many thanks

    The EAR is a good idea, but you put the META-INF/persistence.xml in your ejb module. The EJB is where you want to do all your (container managed) transactional stuff, so make calls into your EJBs from the WAR in stead of trying to share a persistence unit across modules.

  • Where to put utility jar (used by EJB's and war)

    Hello all,
    In many cases when you create a web application including EJB's and a WAR file packaged together in an EAR file, you need some utility classes that are used in the EJB's as wel as in the servlets in the WAR. The utility classes might for example be value object classes that servlets use to exchange data with te EJB's.
    My question is: What is the best place to put the utility class files?
    There is a new article on JDC: http://developer.java.sun.com/developer/technicalArticles/J2EE/build/ that gives some tips. For example, it proposes to put the utility JAR in the EAR file and then add a "Class-Path:" entry to the MANIFEST.MF of the EJB's that use the utility classes.
    However, this approach does not work on BEA Weblogic 6.0. Weblogic's classloader just seems to ignore the "Class-Path:" in the EJB JAR's manifest.
    Any thoughts?
    regards
    Jesper

    The "CLASS-PATH" mechanism in that article is a new
    requirement in J2EE 1.3 (final draft 4). Therefore
    right now Weblogic does not support it yet. Now you
    need to put those utility classes in both the WAR (in
    WEB-INF/lib) and EJB JAR files. If you really want
    only 1 copy of the jar file deployed, you can manually
    add that jar file to weblogic server classpath in the
    start script under config/yourdomain.HI all,
    I have some Utility jar file for EJB and Web Application,
    In the second solution about one copy in weblogic,
    I tried it in the WLS60 it's ok
    But it didn't work in WLS61
    Anyone could give me any good suggestion?
    Moen

  • Problem injecting ejb in war

    This problem have dogged me for one week but cant seem to know where the problem is.
    i am creating an enterprise with war, ejb and jar.
    i want both web clients and application client to share the code in ejb to ease maintainablility.
    i have a jsf backing bean that is supposed to get some data from an enterprise bean in ejb.
    the backing bean has this method
    public class CategoryController {
    @Stateful
    public class CategoryControllerBean implements CategoryControllerRemote {
        @PersistenceUnit(unitName = "JNationForum-ejbPU")
        private EntityManagerFactory emf;
        private EntityManager getEntityManager() {
            return emf.createEntityManager();
    public List<CategoryDetails> getCategorys(){
             EntityManager em = getEntityManager();
             List<Category> categorys=null;
             try{
                Query q = em.createQuery("select object(o) from Category as o");
                return copyCategorysToDetails(categorys=q.getResultList());
            } finally {
                em.close();
         private List<CategoryDetails> copyCategorysToDetails(List categorys) {
            List<CategoryDetails> detailsList = new ArrayList<CategoryDetails>();
            Iterator i = categorys.iterator();
            while (i.hasNext()) {
                Category category = (Category) i.next();
                CategoryDetails details = new CategoryDetails(
                        category.getCategorypk(),
                        category.getTitle(),
                        category.getDescription(),
                        category.getActive());
                detailsList.add(details);
            return detailsList;
    }it brings this error
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref com.safarisoftsolutions.jnationforum.war.bean.CategoryController/categoryControllerBean@jndi: com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@null@com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@Session@null into class com.safarisoftsolutions.jnationforum.war.bean.CategoryController
    root cause
    javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref com.safarisoftsolutions.jnationforum.war.bean.CategoryController/categoryControllerBean@jndi: com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@null@com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@Session@null into class com.safarisoftsolutions.jnationforum.war.bean.CategoryController
    root cause
    com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref com.safarisoftsolutions.jnationforum.war.bean.CategoryController/categoryControllerBean@jndi: com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@null@com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@Session@null into class com.safarisoftsolutions.jnationforum.war.bean.CategoryController
    root cause
    javax.naming.NameNotFoundException: com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean#com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean not found
    note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1 logs.

    This problem have dogged me for one week but cant seem to know where the problem is.
    i am creating an enterprise with war, ejb and jar.
    i want both web clients and application client to share the code in ejb to ease maintainablility.
    i have a jsf backing bean that is supposed to get some data from an enterprise bean in ejb.
    the backing bean has this method.package com.safarisoftsolutions.jnationforum.war.bean;
    public class CategoryController {
        @EJB
        private CategoryControllerBean categoryControllerBean;
        public DataModel getCategorys() {
                model = new ListDataModel(categoryControllerBean.getCategorys());
                return model;
    }from the above you can see am trying to get a list from categoryControllerBean.getCategorys() which is a enterprise bean whose code is
    public class CategoryController {
    @Stateful
    public class CategoryControllerBean implements CategoryControllerRemote {
        @PersistenceUnit(unitName = "JNationForum-ejbPU")
        private EntityManagerFactory emf;
        private EntityManager getEntityManager() {
            return emf.createEntityManager();
    public List<CategoryDetails> getCategorys(){
             EntityManager em = getEntityManager();
             List<Category> categorys=null;
             try{
                Query q = em.createQuery("select object(o) from Category as o");
                return copyCategorysToDetails(categorys=q.getResultList());
            } finally {
                em.close();
         private List<CategoryDetails> copyCategorysToDetails(List categorys) {
            List<CategoryDetails> detailsList = new ArrayList<CategoryDetails>();
            Iterator i = categorys.iterator();
            while (i.hasNext()) {
                Category category = (Category) i.next();
                CategoryDetails details = new CategoryDetails(
                        category.getCategorypk(),
                        category.getTitle(),
                        category.getDescription(),
                        category.getActive());
                detailsList.add(details);
            return detailsList;
    }it brings this error
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref com.safarisoftsolutions.jnationforum.war.bean.CategoryController/categoryControllerBean@jndi: com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@null@com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@Session@null into class com.safarisoftsolutions.jnationforum.war.bean.CategoryController
    root cause
    javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref com.safarisoftsolutions.jnationforum.war.bean.CategoryController/categoryControllerBean@jndi: com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@null@com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@Session@null into class com.safarisoftsolutions.jnationforum.war.bean.CategoryController
    root cause
    com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref com.safarisoftsolutions.jnationforum.war.bean.CategoryController/categoryControllerBean@jndi: com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@null@com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean@Session@null into class com.safarisoftsolutions.jnationforum.war.bean.CategoryController
    root cause
    javax.naming.NameNotFoundException: com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean#com.safarisoftsolutions.jnationforum.ejb.bean.CategoryControllerBean not found
    note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1 logs.

  • How to set classpath to EJB and Servlets

    Hi all,
    How can I add a classpath to EJB and Servlets in Weblogic 6.1, so that that classpath
    can be achieved by both EJB jar and war file? I have deployed a .ear file having
    the jar and war files. Now the EJBs inside the jar file are not reaching the class
    files of the war file and the class files in the war file are not reaching to
    the EJBs. Please let me know at the earliest.
    Atanu

    Hi.
    You might try looking at the petstore example which combines webapps (war files) with
    ejbs in an ear file to see how to do this. It may be a simple config problem.
    Regards,
    Michael
    Atanu Dey wrote:
    Hi all,
    How can I add a classpath to EJB and Servlets in Weblogic 6.1, so that that classpath
    can be achieved by both EJB jar and war file? I have deployed a .ear file having
    the jar and war files. Now the EJBs inside the jar file are not reaching the class
    files of the war file and the class files in the war file are not reaching to
    the EJBs. Please let me know at the earliest.
    Atanu--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Referencing EJB from WAR frile

    Dear All,
    I have an deployed ejb, and want to reference this in a servlet within a WAR file.
    How do I do this without also placing the ejb
    classes within the WAR ! I realise that I could jar it all up into an EAR file
    but would rather keep the components seperate..
    Any help would be greatly appreciated
    Kind regards
    Tony

    The ideal way to reference an ejb from a war file is,
    1. Include the home, local, remote interfaces, Primary Key and
    Exception classes (if any) in a <ejb-name>-ejb-client.jar.
    2. Include the ejb implementation classes in <ejb-name>-ejb.jar and
    reference the <ejb-name>-ejb-client.jar in its manifest file.
    3. In war web.xml define an <ejb-ref> for each ejb that you need to
    reference
    4. Reference the ejb in your code using the ejb-ref name
    4. Include the <ejb-name>-ejb-client.jar in the war file.
    5. Include the war, <ejb-name>-ejb-client.jar, <ejb-name>-ejb.jar in
    an ear file and deploy.
    Dinesh Bhat
    "Arne Christian H rseth" <[email protected]> wrote in message news:<[email protected]>...
    What is an "expanded EAR file format"?
    Could someone please give a link to more information?
    Arne
    Robert Patrick <[email protected]> wrote:
    You can deploy in an "expanded EAR file format" which will allow you
    to
    work with the individual components but still have all the conveniences
    of an EAR.
    Tony May wrote:
    Dear All,
    I have an deployed ejb, and want to reference this in a servlet within
    a WAR file.
    How do I do this without also placing the ejb
    classes within the WAR ! I realise that I could jar it all up intoan EAR file
    but would rather keep the components seperate..
    Any help would be greatly appreciated
    Kind regards
    Tony

  • EAR and WAR file deployment

    hi,
    Does anyone have information on how to use the EARASSEMBLER
    tool for creating ear files and war files?????
    thanks

    Hi Cheenai,
    EARASSEMBLER is an Orion tool and it is not supported in the
    current release of Oracle9iAS Containers for J2EE (even though
    it's bundled with the installation).
    You may download Oracle9i JDeveloper Release Candidate as the
    integrated development tool to build, assemble, package and
    deploy any J2EE applications (EJB-JAR, WAR, EAR files etc.):
    http://otn.oracle.com/software/products/jdev/content.html
    You may also download the "ant" command line tool to build and
    package J2EE files:
    http://jakarta.apache.org/ant/

  • Ear and War file difference

    I have created and loaded WAR files for Web Applications on my Tomcat 4.1.27 web container.
    I have also heard about EAR files and was wondering if I have the correct definition. On one of my Google searches it says: EAR files contain JAR files and WAR files.
    I assume an EAR file can contain many JAR and WAR files wrapped into one file (EAR)? Another way of looking at it is if I have for example 3 WAR files, I can put all 3 in an EAR file?

    All the archive files used in Java apps are basically ZIP files with the extension changed.
    JARs are used to package classes.
    WARs are used to package web applications ( the complete directory structure are mandated by J2EE specs ) and may contain JARs
    EARs are used to package a J2EE application ( think web app + EJBs in general ) and may consist of many web modules packaged as WARs.
    Take a look at this too: http://searchwebservices.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid26_gci837938,00.html
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Building ear, jar and war

    Do I need a special tool to build the ear, jar and war files necessary for a J2EE application?
    And where can I find such tools?

    you don't need a special tool, with the jdk you have a command jar who make special file. The syntax is jar -cvf name.jar <directory>. jar only display you the correctly syntax.
    For the ejb.jar you have to respect the tree of the application with the directory meta-inf
    For the project.war you do hace the web-inf directory with web.xml
    For the project.ear you have to add the .jar and the .war into and a dirctory meta-inf with the fila application.xml
    If you find this too difficult some products like Jdevelopper make this very correctly

  • Jar and war name conflict

    Hi All,
    When ever I try to deploy a jar and a war with same name only one will be deployed
    other doesn't. For example hello.jar and hello.war, In this set I can only deploy
    one. Do any one has reply.
    Thanks in Advance
    Surendra

    barry wrote:
    Is is possible to have exploded jars and wars in the exploded ear. Yes
    I mean, to hava a structure like that:
    /AppliEjb
    /AppliEjb/META-INF /AppliWeb/
    /AppliWeb/WEB-INF /META-INF
    And how to write application.xml:
    <ejb>AppliEJB</ejb> or <ejb>/AppliEJB</ejb> ... ? The module-uri in the application.xml is just the directory name. In
    your case it would be AppliEjb or AppliWeb (case-sensitive).
    -- Rob
    >
    Thanks

  • Problem with EJB and JMS - Failed to obtain/create connection

    hello ejb and jms programmers,
    My problem is my topic MDB keep on retrieving the same message when there is a database connection failure. Maybe somebody could help me how to prevent to retrieve the same data?
    Given:
    - I purposedly turn off the pointbase database because im testing my error handling.
    - Im using SJSAS 8 as my application server.
    - My message Driven Bean of topic type.
    - Im using CMP for my entity bean
    Here is the scenario of whats happening - step by step:
    1. A separate application publishes a message to JMS queue server
    2. My MDB retrieves this message and do some processing then inserts a record (transaction history) in my database
    3. But my db is turned off or down
    4. My MDB sends a successful processing reply to the JMS queue server
    5. Then i noticed that my server.log keeps on growing so when i opened it, the record was not inserted and printed the stacktrace below "RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException" (complete stacktrace below)
    6. I understand the cause of the stacktrace is because the DB is turned off. But what i dont understand is that my MDB keeps on reading the same message. Since my MDB is of topic type, isnt a topic MDB supposedly reads a message only once???
    So my questions are:
    1. how do i handle insert database error?
    2. how can i stop my MDB from processing the same message?
    3. any better suggestions?
    Thank you in advance :)
    leigh
    *** more complete stack trace ***
    [#|2005-01-09T15:35:57.097+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=17;|JTS5041: The resource manager is doing work outside a global transaction
    javax.transaction.xa.XAException
         at com.pointbase.xa.xaException.getXAException(Unknown Source)
         at com.pointbase.xa.xaConnectionResource.start(Unknown Source)
         at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:162)
    [#|2005-01-09T15:35:57.167+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5027:Unexpected exception in resource pooling
    javax.transaction.SystemException
         at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:185)
         at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:360)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:303)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:115)
    [#|2005-01-09T15:35:57.177+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException|#]
    [#|2005-01-09T15:35:57.227+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]
    [#|2005-01-09T15:35:57.237+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=17;|EJB5071: Some remote or transactional roll back exception occurred
    com.sun.jdo.api.persistence.support.JDODataStoreException: JDO77006: SQL exception: state = null, error code = 0.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
    FailedObjectArray: [[email protected]5ac]
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnectionInternal(TransactionImpl.java:1444)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnection(TransactionImpl.java:1339)

    Hi annie,
    Wherever you are handling database transactions,
    you'd not be able to create a Connection if database
    is closed (I think you mentioned turning off the
    database) then at this condition, you should
    certainly throw a System level exception and stop all
    processing with some meaningful flow to indicate a
    failure (like display message on UI). Even
    network problems are handled by exceptions... so I
    don't see a reason why you didn't wrap it in the
    first place.
    Anyway, try handling specific exceptions rather than
    the general Exception... this will give you a better
    idea of what to do in case of an exception.Yes i know this. I am practicing this in my non-j2ee server applications. But the j2ee app im making, i just pass the db url in the descriptor and the app server automatically creates the connection for my app. So where would i put exception handling?
    2. how can i stop my MDB from processing the same
    message?Guaranteed delivery is not supposed to stop
    processing. It will continue to process the message
    after certain intervals till the message is
    delivered. You shouldn't deliver it at all, if you
    are able to detect that the database is off
    The problem here is that my MDB automatically retrieves the message from the JMS queue server. Im not the one retrieving the messages manually.
    My assumed behavior of topic MDB is once the a certain MDB retrieves a message it will not retrieve the same message anymore.
    thank you in advance.
    leigh

  • Can EJB and BC exist at the same time in one project?

    having to use ADF's BC and EJB to access data in both way due to the special requirements, but I am always getting the deployment failure.
    can Ejbs and BC components exist at the same time in one project?

    thanks for your reply.
    I considered to separate the BC and EJB as the separate project. I just use the EJB component to implement the dynamic tree menu, whether a little make a mountain out of a molehill if you as a separate project.

Maybe you are looking for