Limiting the no. of EJB instances??

hi there..
am building a J2EE application where i want to limit the no. of instances created of one of my session beans,"FreeInfoBean", to only one instance no matter what is the no. of users visits my site; in other words, i wana have only "one" bean instance for "many" users. How can i do this??
i have tried with modifying the "max-instance" in the deployment descriptor as following:
<session-deployment max-instance="1" name="FreeInfo"/>
but it did not solve the problem!!!
any idea about how to solve this problem is welcomed...
     thanx n advance.. Mourad

it should be max-instances="1" and not max-instance.
what version are you using ?
regards
Debu

Similar Messages

  • How can I know the number of ejb instances

    Hi all,
    We need to know how can we get the number of ejb instances (entity and session) while the application is running.
    We have a memory leak, so we need to know the amount opf memory used.
    Please, it´s quite urgent, can anybody help us? It seems like an Oracle 9ias 903 bug.
    Thanks

    I'm not sure if this will help you, but the "Spy" application that comes with OC4J stand-alone may help. I suggest you search this forum's archives for the words "Spy" and "AggreSpy".
    Good Luck,
    Avi.

  • Why all the conspiracy against EJBs?

    Hi,
    I see a lot of people (within our organization) claiming EJBs are heavy weight, while Spring is lightweight. And they hate EJBs as if it was the worst sin committed in enterprise Java. I have pretty much been a Spring and Hibernate developer for the past 1.5 years.
    But on various blogs I saw positive views of EJB 3.0. So I tried building simple crud stuff using it. I found it surprisingly simpler to develop in than Spring. So, what exactly is the overhead caused by EJB 3.0 which Spring+Hibernate do not suffer from?
    To put it more precisely, how do the following two cases differ to make EJB heavier than Spring?
    EJB 3.0
    1. Stateless EJBs managed by Java EE container.
    2. EntityManager injected by container (Glassfish creates another instance of the bean with new EM instance to handle concurrent requests to same bean).
    3. Container managed transactions.
    4. Accessed using Local interface.
    5. Injected using EJB 3.0 annotations.
    Spring
    1. Singleton beans managed by Spring.
    2. A thread-safe proxy of EntityManager injected by Spring.
    3. Spring managed transactions.
    4. Accessed using Local interface.
    5. Injected using Spring XML.

    Completely agree (though I'm admittedly biased). Much of the negative perception comes from pre - EJB 3.0. Also want to point out that we're building on the success of EJB 3.0 to further simplify the programming model and add a number of long-requested features in EJB 3.1 (http://jcp.org/en/jsr/detail?id=318) To name a few :
    -- Optional Local interfaces so a session bean can be developed using only a bean class
    -- Packaging and deployment directly in a .war without the need of a separate ejb-jar
    -- Singleton session beans
    -- Application Startup/Shutdown callbacks
    -- Asynchronous session bean invocations
    -- Automatic timer creation and calendar-based timers
    and more...
    See my blog for more details. http://blogs.sun.com/kensaks/
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Can not find javax.ejb.CreateException when lookup and create EJB instance.

    Hi,
        I installed SAP CE 7.2 and NWDS 7.2. When i call create() of EJB's home interface from JAVA stand alone app to create EJB instance, the complier state that it need  'javax.ejb.CreateException'. How can i find the jar that contain 'javax.ejb.CreateException' to solve this problem?
    Thank a lot,
    Thongie
    Edited by: Thongie on Jul 8, 2011 7:30 PM

    Thank a lot, I can found EJB20.jar at 'usr\sap\<sid>\<instance_id>\j2ee\j2eeclient\'

  • Calling a newly deployed EJB from an EJB gives a NoSuchMethod Exception if the jar of the newly deployed ejb is not in the classpath

    Hi ,
    I have an EJB A which is already deployed when the server starts. A second ejb
    B is deployed at a later time.
    EJB A calls methods in EJB B. I use reflection in EJB A to call methods in EJB
    B.
    I get a NoSuchMethodException when I call the create method in the Home object
    of EJB B. If I add the ejb jar file to the classpath before the server starts
    then it is able to resolve the method.
    The problem is the EJBs which are called from EJB A is not known before the server
    is started. New EJBs can be deployed at runtime and EJB A should be able call
    the methods in newly deployed EJB's.
    I also use the URLClassLoader to load all the classes in the jar file of the newly
    deployed EJB in EJB A and it still gives a NoSuchMethodException because it cannot
    resolve the stub class.
    My error log is shown below.
    This is an urgent issue.
    Thanks
    SampleConnector::testEJBService called
    In Key : P1 Value : Input2
    In Key : P3 Value : Input1
    In Key : P2 Value : SomeConst
    Loaded Class = com.bizwave.samples.rejb.SampleRemote
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_EOImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_HomeImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_Impl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteHome
    java.lang.NoSuchMethodException
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getDeclaredMethod(Class.java:1151)
    at com.bizwave.samples.ejb.SampleConnectorEJB.testEJBService(SampleCon
    ctorEJB.java:181)
    at com.bizwave.samples.ejb.SampleConnectorEJB_be5y1v_EOImpl.testEJBSer
    ce(SampleConnectorEJB_be5y1v_EOImpl.java:98)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.bizwave.fc.utils.ClassUtils.invokeEJBMethod(ClassUtils.java:109
    at com.bizwave.infra.fjet.engine.EJBServiceStepMgr.executeService(EJBS
    viceStepMgr.java:91)

    Hi,
    I am attaching a test case. This test case actually demonstrates a security bug.
    Unzip the file and modify the StartWeblogic.cmd in domainA to not refer to the
    SampleRemoteEJB.jar in the classpath. If u run the test client under the client
    dir u will see a NoSuchMethodException.
    The reason is it is not able to load the dynamically generated stub file.
    Initially I had the getMethod and it didn't work. You might have to modify the
    files to suit ur env. The easier way is to run th edomain wizard and create 2
    domains. Run the servers in development mode and place the jars under the applications
    dir
    Thanks
    Rajesh Mirchandani <[email protected]> wrote:
    Do you have any old EJB classes in your classpath? Did you recompile
    your EJBs if you
    upgraded from a old release or a Service pack?
    Bob Lee wrote:
    Hmmmm. That's an interesting problem.
    Why is it giving you a NoSuchMethodException instead of a
    ClassNotFoundException?
    Can you post the code from SampleConctorEJB.java, line 181?
    Try changing your call to getDeclaredMethod() to getMethod().
    getDeclaredMethod() searches only the class you called it on, whereas
    getMethod() traverses to the superclasses and interfaces. You onlyneed
    getDeclaredMethod() when you're accessing a nonpublic method.
    Not sure if this will help, but it's worth a shot.
    Bob
    Vasu wrote:
    Hi ,
    I have an EJB A which is already deployed when the server starts.
    A second ejb
    B is deployed at a later time.
    EJB A calls methods in EJB B. I use reflection in EJB A to call methodsin EJB
    B.
    I get a NoSuchMethodException when I call the create method in theHome object
    of EJB B. If I add the ejb jar file to the classpath before the serverstarts
    then it is able to resolve the method.
    The problem is the EJBs which are called from EJB A is not knownbefore the server
    is started. New EJBs can be deployed at runtime and EJB A shouldbe able call
    the methods in newly deployed EJB's.
    I also use the URLClassLoader to load all the classes in the jarfile of the newly
    deployed EJB in EJB A and it still gives a NoSuchMethodExceptionbecause it cannot
    resolve the stub class.
    My error log is shown below.
    This is an urgent issue.
    Thanks
    SampleConnector::testEJBService called
    In Key : P1 Value : Input2
    In Key : P3 Value : Input1
    In Key : P2 Value : SomeConst
    Loaded Class = com.bizwave.samples.rejb.SampleRemote
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_EOImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_HomeImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_Impl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteHome
    java.lang.NoSuchMethodException
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getDeclaredMethod(Class.java:1151)
    at com.bizwave.samples.ejb.SampleConnectorEJB.testEJBService(SampleCon
    ctorEJB.java:181)
    at com.bizwave.samples.ejb.SampleConnectorEJB_be5y1v_EOImpl.testEJBSer
    ce(SampleConnectorEJB_be5y1v_EOImpl.java:98)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.bizwave.fc.utils.ClassUtils.invokeEJBMethod(ClassUtils.java:109
    at com.bizwave.infra.fjet.engine.EJBServiceStepMgr.executeService(EJBS
    viceStepMgr.java:91)
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support
    [user_projects.zip]

  • After upgrading to Firefox 8.0.1, now on at least one website I use, it limits the number of characters that I can type in a text box to 275, is there a way to fix this?

    After upgrading to Firefox 8.0.1, now on at least one website I use, it limits the number of characters that I can type in a text box to 275, is there a way to fix this?

    That may be part of the coding that the web page is using.
    *https://developer.mozilla.org/en/HTML/element/input

  • I need to set up an expense form so that our consultant can "filter" by customer type, program type, and finally the purpose of the trip. For instance: the customer types are churches, schools, organizations. The program type would be fund raising, gift p

    I need to set up an expense form so that our consultant can "filter" by customer type, program type, and finally the purpose of the trip. For instance: the customer types are churches, schools, organizations. The program type would be dependent on the customer type selection from the first list. Some examples would be: fund raising, gift planning, surveys, and others. The purpose of the trip would be dependent on the program type selected from the second list. Some examples of trip purposes would be: presentation, design, prospecting. Further, the purpose of trip selection from the third drop-down box would then have to determine the values of other fields by expense type: such as commission, airfare, hotel. etc. I've tried pop-up menu but can't figure out how to "select" from the final popup list and have it populate a field for the purpose of the trip. I've tried to look at the JavaScript examples for dependent drop-down boxes, but can't find any that quite fit what I'm trying to accomplish. I am very new to all of this. No training in writing Javascripts - just trying to wing it. The form has to be very simple for our consultants to use, but also give our office the detail we need to process through the correct account numbers. I would appreciate any detailed step-by-step instructions - kind of a javascript for dummies type of info. HELP!

    An AcroForm is the name given to the type of PDF form that you create in Acrobat. An XFA form is the type of form that you create in LiveCycle Designer. Although they are both PDF files, they are very different structurally and have significant;y different scripting models. So pay attention to the information on AcroForms and ignore anything about XFA. Be sure to get the sample PDF forms so you can look at how it works and where the scripts are placed.
    What you want to do will require scripting, and if you don't have the experience and are unable to use the information in the tutorials to create what you want, you might consider getting someone who has experience do this for you. I'll often suggest code if I can do so quickly, but what you want requires more than a few minutes.

  • How to Deploy the third party EJB 3.0 jar in web application

    I have a web application which calls services provided by EJB 3.0 beans packaged in third party jar. How do a configure the ViewController project to deploy the beans to the weblogic server when I run the application rather than deploy the EJB ear as a stand application to the server?
    The jar file has already referenced by the project. In the "EJB Module" of project properties I've set the EJB Version property to 3.0, but the Annotated EJB 3.0 Bean Classes list remains empty, presumably because I have no beans defined in the sources of the application. When running the project the EJB jar did not deploy automatically. Is there something wrong? How can I achive this goal?
    Best Wishes~
    ELeven.Xu
    IDE: JDeveloper 11g (11.1.1.2.0)
    OS: Linux

    I don't think this technique will work. I added a META-INF/ejb-jar.xml file to the application, and added a <session> section for one of the EJB 3.0 beans from my third party jar. I specified values for <ejb-name>, <ejb-class>, and <session-type> hoping the rest of the configuration would be determined from the annotations in the class. When the server starts, this warning message is displayed:
    Oct 30, 2009 12:06:41 PM com.evermind.server.ejb.logging.EJBDeploymentMessages warningSessionBizInterfaceNotDefined
    WARNING: \[current-workspace-app: ... \] - The session bean does not has at least one business interface defined for client access. The bean is not accessiable and usable at runtime.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 11042 ms.
    \[sic\]
    EJB 3.0 beans are not required to define business interfaces, as they are supposed to be generated by the container.
    Good idea, but still cannot deploy beans from the third party EJB 3.0 jar referenced by my project to the embedded OC4J container. Still investigating.
    Thanks,
    Steve
    By the way, I have been able to use your technique to deploy EJB 2.1 beans from third party jars in other projects, just not EJB 3.0 beans that do not provide ejb-jar.xml deployment descriptors, nor business interfaces.
    Edited by: user10375549 on Oct 30, 2009 9:51 AM - Added relevant comment regarding technique described for solving problem. It works for EJB 2.1 beans but not EJB 3.0 beans.

  • Limiting the Text Size in CRM 5.0 IC Web Client

    Hello Experts,
    We have a scenario where in we can enter the text for a CRM Document (say Service document) in the text field of IC Web Client. We have noticed that we are even allowed to enter the text of size around 73 MB also (which comes into 1000s of Word Documents).
    We have now have a requirement for limiting this text as it is causing some problems and somehow affecting system performance.
    Could anyone help me in limitating the text size in CRM 5.0 IC Web Client. I mean whether there is any configuration setting for doing the same or we need to do it in any text determination Procedure. Thanks in anticipation for your response.
    Best Regards,
    Kishore K

    Kishore,
    Use below code to determine no of characters typed in FoUpText.htm:
    data: col_wrap type ref to cl_bsp_wd_collection_wrapper,
          lr_entity type ref to if_bol_bo_property_access,
          lv_str type string,
          lv_len type i.
          col_wrap = typed_context->BTTEXT->get_collection_wrapper( ).
          lr_entity ?= col_wrap->get_current( ).
          lv_str =  lr_entity->get_property_as_string('CONC_LINES').
          lv_len = strlen( lv_str ).
    Place this code in controller FoUpText.do anywhere accordingly
    Cheers,
    Ankur

  • In this iPhone is activated limiting the number of free accounts

    I would like to use on your iphone 4s ICloud, but when I try to run ICloud appears in this iPhone is activated limiting the number of free accounts. What do I do? p.s( Sorry for the broken English)

    Make the accounts on a computer. I believe the iPhone is limited
    to creating 3 accounts.

  • How to get the list of application instance assigned to user

    Hi,
    I need to run the query in BI publisher to get the list of all the application instance assigned to a user in OIM 11g R2.
    Please let me know how to get this data. Also please let me know what is the table to see the list of application instance in OIM.
    Thanks

    Got this working..
    The table is APP_Instance to get the details of Application Instance present in OIM.

  • How to get the list of unviewed Instances?

    Hi All,
    Can anyone tell me how to get the list of unviewed instances?
    I want to get all the instances which have been scheduled but not viewed.
    Please help me on this.
    I tried to get the info from audit report but i could not able to achieve it.
    is it possible from query builder?
    Thanks,
    Nagaveni

    Hi Ravi,
    Thank you for the reply!!
    Then it is not possible to get the unviewed reports.
    how does it work if i create a audit report with Viewed status and list of all instances then we can filter out the unviewed reports.
    Does above solution is going to work?
    i have not tried yet, seeking your opinion.

  • How to Increase the retreving size of instances using PAPI filters.

    Hi,
    How to Increase the retreving size of instances using PAPI filters.
    In my engine database instance size exceeds 2500 then we are getting following exception.
    If we login in to user workspace able to see the instances but while trying to retrieve from PAPI getting below exception and showing the user's inbox aize as 0.
    In Process Admin console we set all the required parameters.
    Still I m getting the same problem.
    Can you please lgive mev the solution.
    <Mar 23, 2010 8:58:24 PM SGT> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: fuego.ejbengine.EJBProcessControl_1zamnl_EOImpl.getInstancesByFilter(Lfuego.papi.impl.j2ee.EJBSecureEngineInfo;Ljava.lang.String;Lfuego.papi.Filter;)
    java.lang.ClassCastException: cannot assign instance of java.util.HashSet to field fuego.view.FilterImpl.attributes of type java.util.List in instance of fuego.view.FilterImpl.
    java.lang.ClassCastException: cannot assign instance of java.util.HashSet to field fuego.view.FilterImpl.attributes of type java.util.List in instance of fuego.view.FilterImpl
         at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2032)
         at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1953)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    Regards,
    Bharath.
    Edited by: bg57295 on Mar 24, 2010 6:45 PM

    Hi Bharath,
    Believe me, you have an incompatibility between different build#.
    PAPI has an instance cache. When certain process has more instances than the maximum specified, the cache is switch to status OPEN. That means, that PAPI will not be able to resolve some instance queries using the information in the cache. When that occurs, PAPI forward all those queries to the engine.
    The incompatibility introduced is in the communication between PAPI and Engine. So, you only get the exception when you have more instances than the maximum cache size.
    Regards,
    Ariel

  • Lumira Login Error "Check the Server Name and Instance ID"

    Dear Experts
      I installed Lumira Desktop and was able to connect to the
    HANA Server.
    Later while I was working the software hanged and I had to
    shut it down.
        Now, after re-opening the software I receive error "Check the Server Name and Instance ID"
    (though the server credentials are same as error and correct”
    Any suggests on how to rectify

    I wonder if one of the following KBAs may give you a clue?
    1995325 - Error HDB 11009: The dataset could not be published to SAP Lumira Server because publishing to the SAP HANA layer failed. Lumira Server
    2134259 - Lumira LaunchPad Logon Hangs
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow me on Twitter (#SAPLumira)
    Got Enhancement ideas? Use the SAP Idea Place 

  • Rebooting the server with ASM instance............

    Hi folks
    I have to go for reboot of the server as I am adding a RAW device for having one more mount and also will be adding a disk to disk group.
    1) alter diskgroup diskgroupname add disk '/u09'; Is this correct to add a new disk to the diskgroup of ASM instance?
    2) I will have to shutdown all the six instances within the ASM instance and shutdown the ASM instance? Is this correct
    After a successfull Rebbot is done
    3) I will have to startup the ASM instance first and one by one startup the other six instances? Is it the right sequence.
    Please reply at the earliest.
    Thanks
    Shiva

    Hi
    If you want to shutdown the server to add the RAW device then:
    1. Shutdown all instances but shutdown ASM instance in the end.
    2. Shutdown server and add the RAW device.
    3. Startup server
    4 Add the diskgruop and also you can increase the value of rebalance parameter.
    5. Start all the instances that are using this ASM instance.
    Hope this Help
    Regards

Maybe you are looking for

  • GI for consignment and how amount is calculated

    All, I have a material where the base UOM and GR/GI Uof Entry are both KGs yet the Order Price UOM on the info record is TNE.    When the GI is done for 4977.88 KG Info record price is 877EUR/TNE   The expected amount is 4977.88KG * .877EUR/KG  = 436

  • Oracle 11G Certification Matrix

    We are having a case of upgrading Oracle DB 10.2.0.5 to 11.2.0.2 on Siebel CRM 7.8.1.14. Can any one provide pointers on issues and challenges or recommendation related artifacts on this?

  • XML Question: What is "NDATA"?

    I saw a line in an XML file: <!ENTITY picture SYSTEM "http://www.somesite.com/somePic.gif" NDATA GIF> What's the "NDATA". What's the use of it.And how to define it. By the way, What's the use of NOTATION?

  • Sheduling by Milestone Operations

    All, I have a scenario where my customer would like to calculate the lead time to produce materrial based soley on the length of time which is entered on Milestone operations. Currently durations are maintained at each operation and we do not want to

  • Query shrinking in workbook

    Hello Experts, When I am assigning data providers to a query in a workbook and viewing it after some days the old data is coming and not the current data. On going to design mode i can see that the query's area has shrinked and its not over the same