EJB support class won't die.

I have a jar file that contains an EJB. The EJB acts as a facade so that all clients
can talk to it's
own separate EJB instance, but each facade talks to a single, static class instance.
Therefore,
that static support class is the place where everything client request goes through.
Here's my problem. This support class has a small Java GUI associated with it.
When it is first
instantiated, the GUI appears. There is a button on the GUI that will kill this
instance. However,
when I attempt to kill this instance by calling dispose and making all references
to it null, it has
no effect. The bean remains alive. I can't get it to get garbage collected.
Any advise?
Thanks,
Joel

Joel,
You can not use interactive utilities on server side
by definition. I mean - you sure you can, but it's not
going to work. So the only way to fix your problem
is to rewrite this utility, or to ask your vendor to do it.
Regards,
Slava Imeshev
"Joel" <[email protected]> wrote in message
news:3ee4d43f$[email protected]..
>
I have a jar file that contains an EJB. The EJB acts as a facade so thatall clients
can talk to it's
own separate EJB instance, but each facade talks to a single, static classinstance.
Therefore,
that static support class is the place where everything client requestgoes through.
>
>
Here's my problem. This support class has a small Java GUI associatedwith it.
When it is first
instantiated, the GUI appears. There is a button on the GUI that willkill this
instance. However,
when I attempt to kill this instance by calling dispose and making allreferences
to it null, it has
no effect. The bean remains alive. I can't get it to get garbagecollected.
Any advise?
Thanks,
Joel

Similar Messages

  • Where should the support classes of servlets, JSPs and EJBs be placed

              Hi
              Could you please tell me where the support classes (simple
              java classes) used by servlets, JSPs and EJBs should be placed.
              I find that my application does not work if I place all the
              support classes of a servlet under $MYSERVER/clientclasses. I need to place some in $MYSERVER/clientclasses and some in
              $MYSERVER/servletclasses. But I figured this out my trial and error and I could not find any logical explanation why some of them should go into $MYSERVER/clientclasses and others into
              $MYSERVER/servletclasses.
              Thanks
              Regards
              Pratima
              

    you can put 'em in weblogic classpath
              Kumar
              Pratima Nambiar wrote:
              > Hi
              > Could you please tell me where the support classes (simple
              > java classes) used by servlets, JSPs and EJBs should be placed.
              > I find that my application does not work if I place all the
              > support classes of a servlet under $MYSERVER/clientclasses. I need to place some in $MYSERVER/clientclasses and some in
              > $MYSERVER/servletclasses. But I figured this out my trial and error and I could not find any logical explanation why some of them should go into $MYSERVER/clientclasses and others into
              > $MYSERVER/servletclasses.
              >
              > Thanks
              > Regards
              > Pratima
              

  • Obtaining principal in EJB helper classes

    I have a pretty typical EJB setup where the actual EJBs delegate a lot of work
    off to helper classes which are simple java classes. Some of these helpers need
    access to the principal currently executing on this container thread. Currently,
    I am passing the principal as a parameter in every method signature on the helpers
    which need it. But as you can probably guess that approach is quickly becoming
    unweildy.
    Ideally, what I would like to do is to have access to the principal associated
    with the currently executing thread. I can mimic this by setting thread-local
    variables in the EJB prior to calling helpers. But I was wondering (ok, hoping)
    that there was already a way to access this information (either through weblogic
    classes or MBeans). At this point, I dont even care if it is not portable.
    P.S., I use WL6.1
    Thank you in advance,
    Steve

    >
    The helper methods do database querries etc and return results that the EJB sends onwards to clients. If these methods
    are NOT synchronized (and the ejbs share the static class) won't it cause concurrency errors? I think most of our methods are not
    synchronized (and it doesn't seem to cause any concurrency errors so far... though the system have not beeen stressed test that much,
    and concurrency bugs tends to pop up later and randomly :P).
    >
    No, if you dont have any static data variables in the Java classes, static method as such will not cause concurrency errors, and the methods should not be synchronized.
    If you have any synchronized methods and they take a while to execute, that could become a bottleneck in itself, because different threads waiting for each other,
    so make sure you dont have any synchronized methods where it is not explicitly needed.
    Think of a static method (without static data in the class being manipulated) as a plain function in another programming-language.
    >
    We have some scaleability problems with the EJBs... It seems as if they do not run concurrently. If we do a stress test with several threads calling the EJBs their response time increases by a too large factor to feel comfortable...
    >
    Apparently, you do have a some scaling/concurrency problem, which could have many causes -- transaction locking and clashes in the database, poorly configured database, network congestion, problems in the EJB architecture, etc -- can be many reasons...
    The general idea to debug, is first to find out exactly what calls in your code that take longest time to execute (profiling, logging, System.out.println's are useful) when you put parallel load on your system -- rather than just seeing "the whole application seems slow" -- from there you can move on, "divide&conquer" the problem, etc...

  • How to avoid restart weblogic after I modify EJB implementation class?

    I am sure I redeploy my application after I modify EJB implementation class. It
    is unacceptable to restart weblogic server if I changed some EJB . Is there any
    way to avoid this?
    Thanks!

    I would open a case with BEA support. I would take a look at it, but I'm going
    on vacation :(
    pat
    "CottonXu" <[email protected]> wrote:
    >
    My WLS version is 7.0 and I use weblogic console to redeploy the entire
    application.
    I am sure that EJBs are not in classpath.
    What should I do ?
    "Pat Bumpus" <[email protected]> wrote:
    Hi,
    I haven't seen this behavior. My EJBs seem to redeploy and pick upthe
    EJB bean
    changes. Make sure that your EJB is not in the system classpath that
    could cause
    this problem.
    What version of WLS?
    How are you deploying the EJB?
    pat
    "CottonXu" <[email protected]> wrote:
    I am sure I redeploy my application after I modify EJB implementation
    class. It
    is unacceptable to restart weblogic server if I changed some EJB .
    Is
    there any
    way to avoid this?
    Thanks!

  • EAR + EJB + Spring Class-Path problem

    Hi,
    I'd been using JDeveloper for a few years, but this is the firstime I package an EJB application. I have two jars (the ejb.jar and api.jar) both are using the Spring 2.0 Library that JDeveloper provides.... but when I package the EJB as an EAR everything seems to be OK:
    -ear
    - META-INF
    - application.xml
    - ejb.ar
    - api.jar
    - spring.jar
    But when I try to publish the EAR in the OC4J standalone management console, this error is thrown:
    oracle.classloader.util.AnnotatedNoClassDefFoundError:      Class not found: org.springframework.ejb.support.AbstractStatelessSessionBean.     Dependent Class sv.com.sti.ebs.sgd.ejb.SgdTrxSessionBean
         Cargador: sgd-ear.root:0.0.1
    (Failure analysis caught java.lang.NullPointerException)
    So I Think the ejb is not using the spring libraries located in the EAR's root or maybe I have to add the classes to the ejb's manifest.....But JDeveloper ejb jar deployment doesn't add any entries in the Manifest Class-Path entry....
    Please Help.

    Hi
    Try putting the utility classes in an EJB JAR file, then putting a Class-Path attribute in the MANIFEST.MF for that JAR far. That is
    Class-Path: lib/myutils.jar
    It doesn't matter where you put the utility JAR, so long as it's somewhere in the EJB JAR and you specify it in Class-Path. This should make the utility classes accessible to servlets as well. Note that classes defined in a WAR file's ./lib directory willl not be accessible to EJBs, as a matter of policy.
    Best wishes
    Kevin

  • Redeploying an Individual EJB Implementation Class

    Hi all,
    Read from the documentation http://edocs.bea.com/wls/docs81/ejb/deploy.html#1088643 that WLS 8.1 is supporting deploying of an individual EJB implementation class, but sadly no further examples or steps are shown to illustrate this.
    If I have a few entity & session beans inside my EJB JAR, how could I proceed to recompile & regenerate just the needed files for a specific EJB?
    Could someone help me with this?
    Many thanks!

    This will work only in case of exploded applications where you can just
    update the implementation classes. You can use the weblogic.Deployer tool to
    redeploy just the implementation class.
    --Sathish
    <Cheng Wei Lee> wrote in message news:[email protected]..
    Hi all,
    Read from the documentation
    http://edocs.bea.com/wls/docs81/ejb/deploy.html#1088643 that
    WLS 8.1 is supporting deploying of an individual EJB implementation class,
    but sadly no further examples or steps are shown to illustrate this.
    If I have a few entity & session beans inside my EJB JAR, how could I
    proceed to recompile & regenerate just the needed files for a specific
    EJB?
    Could someone help me with this?
    Many thanks!

  • How can Client get a ejb remoteinterface class through ejbhomeinterface?

    HI,I've got ejbhomeinterface class(ejbhomeinterface class is on my local machine),How can i get ejb remoteinterface class(it is on remote app server) ? I've tried
    getEJBMetaData() method, but throw class not found exception,pls help me,thank you very much!!
    Object ejbObj = null;
    Class remoteClass = null;
    EJBHome aHome = null;
    try{
    aHome = (EJBHome) javax.rmi.PortableRemoteObject.narrow(aHome, EJBHome.class);
    EJBMetaData metaData = aHome.getEJBMetaData();
    // Class homeClass = metaData.getHomeInterfaceClass();
    aHome = metaData.getEJBHome();
    remoteClass = metaData.getRemoteInterfaceClass();
    //following code i want use remoteClass invoke remote ejb mothod
    }catch(Exception e)

    may be you need create InitialContext first, than from InitialContext lookup Home interface. And than using home.create() get RemoteInterface and use it.

  • Does Huawei router NE40 support Class-Based QoS?

    As I know Class-based QoS defines traffic classifiers based on certain rules and associates traffic classifiers with certain traffic behaviors, forming certain traffic policies. After
    these policies are applied to interfaces, class-based traffic policing, traffic shaping, congestion management, and precedence re-marking are implemented.
    Does Huawei router NE40 support Class-Based QoS?

     The NE80E/40E supports DiffServ and provides standard forwarding services such as EF and AF for users by using the following traffic management measures:
    1 Traffic classification
    2 Traffic policing
    3 Traffic shaping
    4 Congestion avoidance
    QoS of the NE80E/40E supports traffic policy with the above measures and mapping between the QoS fields in the IP header and the MPLS header.
    And more information about router NE40, please visit:
     http://www.huanetwork.com/huawei-router-ne40e-series-price_c89

  • What is the alternative of Transfer Support class in java 1.5

    I have Drag And Drop Application built in java 1.6.
    My application supports Drag-Drop between Swing Components (Tree,Table) and Native file system to Swing Component.
    I have requirement to implement Drag And Drop  in java 1.5.
    May i know the alternative of Transfer support class?
    Implementing Drag And Drop using java 1.6 was easy. Will It require to put additional efforts to implement Drag And Drop in java 1.5. ?

    There is no Transfer class in Java 6. There are a number of classes with 'transfer' in the name, but none of them is 'Transfer'. So what class are you referring to?
    One thing you might do while you mull that over, is check the since tag for the class. If it does not have one listed, try the since tag for the package. Yes, that requires RTFM.

  • Weak EJB support

    Hi,
    I tried Jdev2 with AppServer 4.0.7 to build EJB-based
    application. I'm disappointed with EJB support in AppServer.
    It is not standard and based on CORBA. Comunication between
    client and EJB server goes via ORB. In case of applet client
    it have to download two big ORB libraries (aprox. 0.8 MB each)
    in addition to it's own code. Maybe I'm wrong, but it seems
    to me that AppServer in current state not sutable EJB container
    for production system.
    Will be situation improved in next relese of AppServer or
    Oracle8i?
    When Oracle8i will be available for trial download?
    Vladimir
    null

    JDeveloper Team (guest) wrote:
    : Vladimir (guest) wrote:
    : : Hi,
    : : I tried Jdev2 with AppServer 4.0.7 to build EJB-based
    : : application. I'm disappointed with EJB support in AppServer.
    : : It is not standard and based on CORBA. Comunication between
    : : client and EJB server goes via ORB. In case of applet client
    : : it have to download two big ORB libraries (aprox. 0.8 MB
    each)
    : : in addition to it's own code. Maybe I'm wrong, but it seems
    : : to me that AppServer in current state not sutable EJB
    container
    : : for production system.
    : : Will be situation improved in next relese of AppServer or
    : : Oracle8i?
    : : When Oracle8i will be available for trial download?
    : : Vladimir
    : You are right that the EJB support in the AppServer is not
    : complete. With version 4.0.8 that will be improved. Oracle8i
    has
    : EJB support according to the EJB spec. Not sure about
    availablity
    : for download. Possibly the 8i production release.
    Could you give some details? Will Entity beans or EJBHome
    interface be supported? For example, JDeveloper offers an option
    to create Entity bean in EJB descriptor wizard. But there is no
    place to deploy that Entity bean. Oracle8i doesn't support Entity
    bean either.
    Andrei
    null

  • EJB support

    Is it possible to use JHeadstart in combination with EJB's?

    It is not supported out of the box. You could write session beans that implement the JHeadstart handler interface, but this is not a trivial task to do.
    The JHeadstart release that aligns with ADF (10.0, targeted for end of june 2004) will use the ADF data binding layer which means EJB's are fully supported.
    If you can't wait for this JHeadstart release, it might be a better option to start with JDeveloper 10g and ADF rather than the current Jheadstart release, as EJB support is very strong in JDeveloper 10g. Once JHeadstart is available you can still start using it, as it is entirely based on the ADF design time and runtime environment.
    Steven Davelaar,
    JHeadstart Team.

  • Using JarSettings to generate EJB client jar, but supported classes missed

    Appreciated for any comments in advance.
    I am using @jarSetting to generate EJB client jar file from workshop 9.2. The remote method of EJB has one input parameter that is defined as an interface. The interface is included in client jar, but the implementation of this interface is not.
    Please advise how I can add the implementation of this interface to client jar?
    Best Regards,
    James

    Hi James,
    I believe the algorithm for creating the client jar is to simply inspect the EJB interfaces using reflection and to include all user defined classes and exceptions that are referenced by the interfaces. In your case, it sounds like a class is not being included because it is not directly referenced by one of the EJB interfaces.
    I think the client jar creation algorithm can be described as "best effort" and unfortunately, it does not always end up including all classes needed by the client. I would recommend you add the additional classes manually using the jar tool.
    - Matt

  • Deploying multiple beans & support classes, related questions

    I have an application that I'm trying to deploy to the latest JServer with Oracle 8i 8.1.6 on Windows 2000. We used JDeveloper to write the code and to deploy the EJBs. I have some questions and it'd be great if someone can answer them.
    All documentation seem to indicate that beans must be deployed one at a time. Is this the case? If not, how?
    If so, what is the "correct" way to deploy helper classes which are used by more than one bean?
    Is there always only one instance of a class in the database, even though I might deploy the same helper class with different beans? If not, is there any mechanism to ensure consistency?
    Can I just update a helper class in the database?
    How do I see what classes are in the database? How do I manipulate them (e.g. delete, change, add, view size) ?
    Is there an easy way to "clean out" the database of all classes, so as to start anew?
    null

    The Java-related documentation was that I was reading. I have a followup question. Is it possible for me to simply deploy some beans without regard for all the helper classes, then at a later point do a load java on all classes that I expect to use, and have it all work?
    Thanks. You've been great help.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDev Team (Laura):
    Hi Gerald,
    I will take a stab at answering your questions:
    1. Are you talking about the JDeveloper doc, or the Oracle8i EJB doc?
    2. When you create the Deployment Profile in JDeveloper using the Deployment Profile wizard, any classes your EJB depends on should get included in the deployment archive by the dependency analyzer. You can see the contents of what will be deployed by selecting the Preview button on the Sources page of the wizard.
    If you want to explictly EXCLUDE a helper class because it has already been deployed with another bean, you can choose the Advanced button. Select one of the Library, archive, class pages on the Advanced dialog, and add the class to the Exclude list. Select OK, then check the Preview button again to make sure it was excluded.
    If you are deploying a number of beans that user the same helper classes, the helper classes will get deployed with the first bean, and on subsequent deployments, the process will detect that the helper class has already been deployed and will check to see if it has changed since the last deployment. I believe it uses a timestamp comparison for this, but I'm not positive. If it detects the source and target are the same, it won't redeploy the class.
    If you just want to update a helper class for the EJB, you can use the Java Stored Procedure deployment in the Deployment Profile Wizard, include the helper class in the deployment archive, and do not publish anything.
    You can use the Database Browser in JDeveloper to see what deployed Java Classes, and EJBs are stored in your database. Double-click on the IIOP connection you used to deploy the EJBs (under the Connections node in the Navigator). This will display the Database Browser. Expand the appropriate nodes to view the deployed objects.
    To see deployed Java Classes, double-click on a JDBC connection and expand the Schema node and then the Deployed Java Classes node.
    Many operations are available from the context menus in the Database Browser, including Drop. Others you will have to perform from SQL*Plus or the command line. See the Oracle8i Java Developer's Guide for more information on SQL commands and command line syntax for altering Java objects in the database. This doc, and the EJB and CORBA Developer's Guide are available online from OTN on the Doc pages.
    You can use dropjava to drop all classes that were deployed in a given deployment archive by specifying the name of the jar file used during deployment. Again, see the Java Developer's Guide for the syntax.<HR></BLOCKQUOTE>
    null

  • Calling EJB from class in same ear

    Has anyone ever attempted to call an EJB from a class that is in the same ear?
    I have a singleton class, not
    another EJB, that is trying to get ahold of an EJB to call a method. This method
    has been defined to have both
    a local and remote interface.
    I thought I should be able to get a hold of the local interface. When I try to
    get the interface out of JNDI
    as follows:
    PickupCpaLocalHome cpaHome = (PickupCpaLocalHome) ctx.lookup("pickup.PickupCpaEJBLocal");
    I get an exception:
    javax.naming.LinkException: [Root exception is
         javax.naming.NameNotFoundException: Unable to resolve
         'app/ejb/PickupCpaEJB.jar#PickupCpaEJB/local-home' Resolved: 'app/ejb'
         Unresolved:'PickupCpaEJB.jar#PickupCpaEJB' ; remaining name
         'PickupCpaEJB.jar#PickupCpaEJB/local-home']; Link Remaining Name:
    'java:app/ejb/PickupCpaEJB.jar#PickupCpaEJB/local-home'
    When I look at the JNDI tree using the WebLogic console, it shows that "pickup.PickupCpaEJBLocal"
    is
    in JNDI.
    Since the local interface doesn't work, I thought I'd try the remote interface.
    The remote interface
    works fine from my client and from another EJB in a different ear. Using the
    remote interface I get an
    exception when trying to cast the result to my home.
    java.lang.ClassCastException:
    com.fedex.pickup.j2ee.ejb.cpa.PickupCpaEJB_gapk5_HomeImpl_WLStub
    // Code
    PickupCpaHome cpaHome = (PickupCpaHome) ctx.lookup("pickup.PickupCpaEJBRemote");
    As I mentioned earlier, the same code works in a client and in an EJB in another
    ear.
    Any ideas

    Has anyone ever attempted to call an EJB from a class that is in the same ear?
    I have a singleton class, not
    another EJB, that is trying to get ahold of an EJB to call a method. This method
    has been defined to have both
    a local and remote interface.
    I thought I should be able to get a hold of the local interface. When I try to
    get the interface out of JNDI
    as follows:
    PickupCpaLocalHome cpaHome = (PickupCpaLocalHome) ctx.lookup("pickup.PickupCpaEJBLocal");
    I get an exception:
    javax.naming.LinkException: [Root exception is
         javax.naming.NameNotFoundException: Unable to resolve
         'app/ejb/PickupCpaEJB.jar#PickupCpaEJB/local-home' Resolved: 'app/ejb'
         Unresolved:'PickupCpaEJB.jar#PickupCpaEJB' ; remaining name
         'PickupCpaEJB.jar#PickupCpaEJB/local-home']; Link Remaining Name:
    'java:app/ejb/PickupCpaEJB.jar#PickupCpaEJB/local-home'
    When I look at the JNDI tree using the WebLogic console, it shows that "pickup.PickupCpaEJBLocal"
    is
    in JNDI.
    Since the local interface doesn't work, I thought I'd try the remote interface.
    The remote interface
    works fine from my client and from another EJB in a different ear. Using the
    remote interface I get an
    exception when trying to cast the result to my home.
    java.lang.ClassCastException:
    com.fedex.pickup.j2ee.ejb.cpa.PickupCpaEJB_gapk5_HomeImpl_WLStub
    // Code
    PickupCpaHome cpaHome = (PickupCpaHome) ctx.lookup("pickup.PickupCpaEJBRemote");
    As I mentioned earlier, the same code works in a client and in an EJB in another
    ear.
    Any ideas

  • Class Won't Activate But Methods Are Active

    We have a problem in our production system where a new method has been transported to production but when trying to activate the class I get an error saying "Method <methodname> does not exist"
    The confusing thing is that this method DOES exist but somehow somewhere there is some kind of reference missing.
    The BSP application based on this class works fine. All the methods are active and get called, yet the class itself won't activate.
    I have seen this problem once before in a report program and the solution was to re-write the report not using OO-ABAP.
    However our current problem is this is a BSP appplication and we not only cannot do that but simply there is 2 years development in this.
    Can anyone offer any suggestions ?
    Many Thanks
    David

    Hi David,
    I don't know the reason for this bad situation.
    Have you take a look in the protocol of the transport?
    Is the transport finished without any errors?
    Contains the transport the whole class or only a part of it? May be that transport was not complete.
    So you could create a new transport that contains the whole class in the transaction SE80 and transport it again to the productive system.
    When the problem still exits, you could open a call in the service market place.
    Perhaps SAP will then take a look on your system and find the reason.
    Good luck,
    Stefan

Maybe you are looking for

  • How to append date in YYYYMMDD format in .par file for export

    Hi, Database Version: 10.2.0.4 OS: AIX I have an export script which reads .par file and executes "exp" to export schema. I would like to add date in "YYYYMMDD" format for the dump file like this owner=scott file=/exports/scott_${`date '+%Y%m%d'`}.dm

  • Work scheduling view and warehouse management view

    Can any one explain what is Work scheduling view and where it need to be extended fro raw material or Finished or Semi finished

  • Third party Sales order related issue

    Hi, We are facing a strange issue Once a sales order is entered, purchase req is   created, the buyer then creates the purchase order.  Once the PO is generated, the req is deleted.  This in turns creates an incomplete order and the buyer cannot PGI

  • Show waiting image on button click till response comes

    Hi All, I want to show waiting image on button click in a jsff page till response comes from back-end. For this I am using following code in button :- <af:commandButton text="Submit" id="cb1" actionListener="#{RegistrationManagedBean.onRegisterClick}

  • Making the vi faster - read from txt or array or binary reading

    I prepared a vi that reads a table from txt file and find the desired values corresponding independent two variables by interpolation-attached. This via reads the txt file for each calculation. I wonder that is this process slow or enough for me. Bec