Restrict number of stateless bean instances

i need to restrict number of stateless bean instances. Am working on EJB3.0 and jboss.
I have even modified the following in standardjboss.xml but, still am not able to restrict.......
<container-pool-conf>
<MaximumSize>10</MaximumSize>
<strictMaximumSize>true</strictMaximumSize>
</container-pool-conf>
Is there any other way?
Thank in advance

all the config files are different in jboss for the ejb3 stuff (rather annoying). assuming you want to make this change globally, you need to alter the deploy/ejb3-interceptors-aop.xml file. at the end of the "Stateless Bean" domain there is an annotation element which defines the pool configuration (it's basically a copy of the java annotation embedded in the xml file).

Similar Messages

  • Stateless bean instance cache and usage algorithm

    I have two clients C1 and C2 which call the same bean B1. Is it possible to control
    the instance that gets bound to each client. I dont want to use stateful beans
    as it affects performance and the beans are inherantly stateless.

    Why do you want to do that? If you use SFSB and have no state most of the overhead
    associated with state management would not be there. However the scaling that
    comes with spraying would be gone. You would not have it with SLSB either if you
    tie it to the client.
    However if you implement a custom call router you might be able to bind SLSB to
    a client. Keep in mind DGC might collect your bean.
    S
    S
    "Ashok" <[email protected]> wrote:
    >
    I have two clients C1 and C2 which call the same bean B1. Is it possible
    to control
    the instance that gets bound to each client. I dont want to use stateful
    beans
    as it affects performance and the beans are inherantly stateless.

  • EJB 3.0 Stateful - Limiting number of bean instances

    Hello EJB Experts,
    I have just started to learn EJB 3.0 and have some basic queries. The application server that I am using is Glassfish. Please find my queries below:
    1. To remove an bean instance from the container, we can use the annotation '@Remove'. I basically had 2 methods and annotated the 2nd method with '@Remove'. Whenever the 2nd method is called, the container is removing this instance also in my program. My problem is that, i might get some invalid parameter values in the 2nd method, so in that case I have to just log the error message and whenever the input parameters are correct, then only the instance should be removed. But lets say, if someone calls my 2nd method with invalid parameters, I log the message and the container removes it, but after some time if the 2nd method is called with correct parameters, then the instance will not be available. Can we programatically tell the container when to remove a bean instance?
    2. From the docs, I am clear that pooling works only for 'Stateless' beans. I however (I am using 'Statuful' bean), wanted to limit the max number of instance to 2. I did below mentioned configuration in the 'sun-ejb-jar.xml' file:
    <bean-cache>
                        <is-cache-overflow-allowed>false</is-cache-overflow-allowed>
                        <cache-idle-timeout-in-seconds>1</cache-idle-timeout-in-seconds>
                        <max-cache-size>2</max-cache-size>
                        <resize-quantity>0</resize-quantity>
                        <removal-timeout-in-seconds>2</removal-timeout-in-seconds>
                        <victim-selection-policy>LRU</victim-selection-policy>
              </bean-cache>
    But i think, it is still creating more that 2 instances of this bean.
    Please help me in getting answers to these questions. I will be very thankful for your replies.
    Regards,
    San
    Edited by: SolarisUser1 on Jun 27, 2010 11:00 PM

    @Remove is used for stateful EJBs and you call it when your client has finished using that instance of the stateful EJB.
    If you are passing in parameters to the method and letting it do some work with your parameters then perhaps it should not be a remove method at all. Make it a normal method and only put cleanup related logic in the remove method. You can also throw some application exception and rollback if the parameters are not correct.

  • How Stateless Session Bean instances in pool

    Hi,
    I am not clear about , stateless bean having "pool" of objects to be used by multiple clients.when those instances will be created or who will generate them.
    Is this pool specific to ejb container or any vendor container.
    thanks in advance,

    Hi , my question is about Stateless Session Bean ,
    how StatelessSession bean will behave when some 100
    clients wil call homeObject simultaneously.The EJBs(including stateless) are single threaded so one client can access one Bean at a time. As per your question if some 100 clients are invoking home.create() method then it has to invoke on 100 EJBs. The instance pool size can be specified while deploying. In the descriptor (application server speific). So if the number of simultaneous clients is more than the pool size then some clients have to wait.
    Now my second question is how and who will create
    these instance .The container will create the pool as per the application server spcific deployment descriptor.

  • Stateless Bean - scope of instance variable in EJB Timer call back function

    Hi,
    I would like to know on the scope of an instance variable of a Stateless Bean object,
    when used in a EJB Timer call back.Let me explain this in more detail below.
    I have a requirement to use a EJB Timer.
    For this, I have created a stateless object since Timer creation needs to be done
    from a stateless bean. I have a member variable "count" of the stateless bean class.
    In the timer call back(ejbTimeout), I am able to use this count variable during
    each time of the call back, and the value of this variable is also updated properly.
    I have a few queries with respect to the above behaviour:
    1) Does stateless bean object not get destroyed once the Timer is created from the Bean?
    2) If the Bean object is not destroyed, then when does the bean object get destroyed?
    3) If both (1) and (2) are not true, then can anyone explain on how the above behaviour is possible?
    Thanks in advance,
    Ulrich

    Hi Ulrich,
    The ejb timer is associated with the stateless session bean component, not with a particular bean instance. There is no formal relationship between the bean instance that called createTimer() and the bean instance on which the timer callback happens. If they're the same in your test run that's just a coincidence and not something your application should be depending on.
    In the stateless session bean model, the container can create and destroy stateless session bean instances at any time. The container is free to pick any stateless session bean instance to service any client invocation or timer callback. If you need to pass context into a timer callback, one way to do it is via the timer "info" object. However, the info object is immutable so it wouldn't be a good match for a counter. You could of course always just use a database for any necessary coordinated state.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Exception while getting the server instance. Stateless bean problem

    Hi,
    New to OC4J, I'm moving an ear that was running ok under jboss.
    1- The wep app deploys. This is a piece of code inside the init() method of a struts plugin:
         System.out.println("0");
         AddressFacadeHome addressFacadeHome = HomeFactory.getAddressFacadeHome();
         System.out.println("1.0");
         AddressFacade addressFacade = addressFacadeHome.create();
         System.out.println("1.5");
    2- The code is run when the web app is initialized. This is the error message I get. system.out show that the error occurs on addressFacadeHome.create().
    AddressFacade is a remote/local stateless bean. HomeFactory returns the jndi lookup/narrow of the remote object.
    0
    1.0
    caught exception while getting the server instance null
    java.lang.NullPointerException
    com.evermind.security.User com.evermind.server.ThreadState.getCurrentUser()
    ThreadState.java:637
    com.evermind.security.User com.evermind.server.ThreadState.getUser()
    ThreadState.java:371
    fda.common.address.ejb.interfaces.AddressFacade AddressFacadeHome_StatelessSessionHomeWrapper7.create(
    AddressFacadeHome_StatelessSessionHomeWrapper7.java:66
    void fda.web.oaa.struts.plugin.ApplicationInit.init(org.apache.struts.action.ActionServlet, org.apache
    .struts.config.ModuleConfig)
    void org.apache.struts.action.ActionServlet.initModulePlugIns(org.apache.struts.config.ModuleConfig)
    ActionServlet.java:1105
    void org.apache.struts.action.ActionServlet.init()
    ActionServlet.java:468
    void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig)
    GenericServlet.java:258
    com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.loadServlet(com.
    evermind.util.ByteString)
    HttpApplication.java:1956
    com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.findServlet(com.
    evermind.util.ByteString)
    HttpApplication.java:4355
    void com.evermind.server.http.HttpApplication.initPreloadServlets()
    HttpApplication.java:4455
    void com.evermind.server.http.HttpApplication.initDynamic(com.evermind.server.http.HttpApplicationConf
    ig)
    HttpApplication.java:662
    void com.evermind.server.http.HttpApplication.<init>(com.evermind.server.Application, com.evermind.ser
    ver.http.HttpSite, com.evermind.server.http.HttpApplicationConfig, java.lang.String, java.lang.String, boolean
    My guess is that it's a jaas issue (because i see security and getCurrentUser), but at init time, no user is authenticated.
    Any clue would be very much appreciated. Let me know if I can provide anything else, such as deployment descriptors.
    Thanks,
    Christophe.

    After spending some time on this, I looked at the source code for com.evermind.server.ThreadState
    This is the code that throws the exception:
    if(applicationThread != null && applicationThread.httpHandler != null && applicationThread.servletInfo != null)
    try
    server = applicationThread.httpHandler.request.getApplication().getApplication().getServer();
    catch(Throwable t)
    System.out.println("caught exception while getting the server instance " + t.getMessage());
    t.printStackTrace(System.out);
    It looks like this method expects a httpRequest, and would find null because I'm in the servlet.init()
    (at least, that's my interpretation)
    I tested my code (the remoteFacade.create()) inside of a jsp, and it worked...
    So, the next logical question is:
    Can I make EJB calls from within the init method of a servlet? (or more specifically from a struts plugin, which I believe should be more or less the same thing)
    If so, do I need to take extra steps?
    Again, any experience/help on this will be much appreciated.
    Thanks,
    Christophe.

  • Instance of ejb2 stateless bean

    InitialContext ctx = new InitialContext();
    Object objref = ctx.lookup(PARAMCTRL_IJNDIName.SBAppComboDb);
    homeAppComboDb = (SBAppComboDbHome) PortableRemoteObject.narrow(objref, SBAppComboDbHome.class);
    remoteAppComboDb = homeAppComboDb.create();
    1)How many instance of that particular stateless bean is created in ejb container?
    2)Does instance of stateless being destroy after ejbRemove()? which mean can be garbage colletion.
    3)can other user sharing use the same instance of the stateless bean after remove?
    4)is stateless bean thread safe?

    Please read tutorial for EJB 2.0 Stateless Session Bean

  • Keeping alive an instance of a Stateless Bean

    Hello Weblogic comunity:
    I'm deploying a stateless bean with initial-beans-in-free-pool element in '1' (Weblogic 7.0). According with the EJB spec, at some moment of EJB lifecicle ejbRemove() will be called by the container removing the instance :(
    Is there a way to keep 1+ instances always alive?

    Hans,
    "Hans Nemarich" <[email protected]> wrote in message news:19065530.1096384306132.JavaMail.root@jserv5...
    Hello Weblogic comunity:
    I'm deploying a stateless bean with initial-beans-in-free-pool element in '1' (Weblogic 7.0). According with the EJB spec, at somemoment of EJB lifecicle ejbRemove() will be called by the container removing the instance :(
    >
    Is there a way to keep 1+ instances always alive?Please check this:
    http://www.viewtier.com/newsgroups/thread.jspa?threadID=23&tstart=0
    Regards,
    Slava Imeshev

  • Restrict number of simultaneous connection from client to EJB bean

    I have EJB bean and JavaSE client. I want to restrict number of simultaneous connection from client to EJB bean. For example to maximum allowed 3. How I can do it?

    :) but answer is too general.
    I want to know how to design such "simple reference counting". As I understand it is not recommended to use static variables in EJB. so how to implement such counting in a right way?
    Edited by: NoName on Aug 20, 2009 1:25 AM
    Edited by: NoName on Aug 20, 2009 1:31 AM

  • EJB 3.0 Stateful bean not saving state while Stateless bean is !!!

    My Stateless bean is as follow:
    package test;
    import javax.ejb.Stateless;
    @Stateless(mappedName = "StatelessBean")
    public class StatelessBean implements StatelessBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateless counter value:"+counter);
              counter++;
    My Stateful bean is as follow:
    package test;
    import javax.ejb.Stateful;
    @Stateful(mappedName = "StateFulBean")
    public class StateFulBean implements StateFulBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateful counter value:"+counter);
    Client is as follows:
    package test;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class TestClient {
         public static void main(String[] args) {
              Hashtable hashtable = new Hashtable();
              hashtable.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              hashtable.put(Context.PROVIDER_URL, "t3://localhost:7001");
              InitialContext ic;
              try {
                   ic = new InitialContext(hashtable);
                   StateFulBeanRemote stateFulBeanRemote = (StateFulBeanRemote)ic.lookup("StateFulBean#test.StateFulBeanRemote");
                   stateFulBeanRemote.increment();
                   StatelessBeanRemote statelessBeanRemote = (StatelessBeanRemote)ic.lookup("StatelessBean#test.StatelessBeanRemote");
                   statelessBeanRemote.increment();
              } catch (Exception e) {
                   e.printStackTrace();
    The output i am getting after running the client twice is as follows:
    //first time
    Stateful counter value:0
    Stateless counter value:0
    //second time
    Stateful counter value:0
    Stateless counter value:1
    Shouldn't the counter values be incremented in case of Stateful bean and remain the same for Stateless bean. But the output that I am getting is the complete opposite !!!
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.

    868664 wrote:
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.It is very simple: a stateless bean is ASSUMED to be stateless; you cannot keep state in a stateless bean as a contractual rule. That doesn't mean that you will fail to keep state in them at least for a little while, they are still only Java objects. Generally stateless EJBs are pooled, so you may get the same instance each time you use such an EJB, but you may just get another one. It is not dependable and the rules say don't do it - so don't do it.
    A stateful bean is tied to a single client, and so can be used by a client to keep state in it. Since You are running the client application twice you are operating with two different clients and so you will get a new stateful bean each time and your code will keep printing 0. However there is also a bug in your code:
    public void increment(){
    System.out.println("Stateful counter value:"+counter);
    }You are not incrementing anything.

  • Too many bean instances

    Hi
    We've been struggling with this issue for a while and were wondering
    if anyone has had similar exp's. reading this group and other weblogic
    ones I see that entity bean instance counts have been(sic) causing
    problems however we are having similar problems with stateless session
    beans.
    Here is our pool tag
    <pool>
    <max-beans-in-free-pool>2</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    Now, when the server starts JProbe is reporting anything up to 30
    instances of EJB implementation Objects on the heap when we expect to
    see at most 2.
    This situation arises when the profiler invokes weblogic with no heap
    switches.
    if we use -ms64m -mx64m then we get even more instances on the heap.
    If we set the switches to -ms128m -mx256m then the counts are up in
    the hundreds and JProbe/weblogic takes as long as 30 minutes to start
    up.
    We are running the software on Win2000 with an 800Mhz intel processor
    running in 512 MB RAM.
    We have tried to get this working on Solaris8 but the server fell over
    after 2.5 hours having consumed 600 MB of virtual memory.
    Has any one suffered the same problem.
    Also are we alone in experiencing these huge delays when starting the
    server via the profiler.
    Oh yes, if we start the server 'standalone' it comes up in about 1
    minute.
    Any help greatly appreciated
    Cheers
    Duncan L strang

    Did you take a thread dump to see what the server was doing? I would start
    there ... hopefully it is a bug in your code (those are easy to get a fix
    for ;-)
    Peace,
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "Duncan L" <[email protected]> wrote in message
    news:[email protected]..
    Hi
    We've been struggling with this issue for a while and were wondering
    if anyone has had similar exp's. reading this group and other weblogic
    ones I see that entity bean instance counts have been(sic) causing
    problems however we are having similar problems with stateless session
    beans.
    Here is our pool tag
    <pool>
    <max-beans-in-free-pool>2</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    Now, when the server starts JProbe is reporting anything up to 30
    instances of EJB implementation Objects on the heap when we expect to
    see at most 2.
    This situation arises when the profiler invokes weblogic with no heap
    switches.
    if we use -ms64m -mx64m then we get even more instances on the heap.
    If we set the switches to -ms128m -mx256m then the counts are up in
    the hundreds and JProbe/weblogic takes as long as 30 minutes to start
    up.
    We are running the software on Win2000 with an 800Mhz intel processor
    running in 512 MB RAM.
    We have tried to get this working on Solaris8 but the server fell over
    after 2.5 hours having consumed 600 MB of virtual memory.
    Has any one suffered the same problem.
    Also are we alone in experiencing these huge delays when starting the
    server via the profiler.
    Oh yes, if we start the server 'standalone' it comes up in about 1
    minute.
    Any help greatly appreciated
    Cheers
    Duncan L strang

  • JAAS and stateless bean

    i have a very simple stateless bean with a single "hello" method running in WL 8.1 sp3. to test out Weblogic's behavior, i ran 2 seaparate scenarios on 2 separate occasions. in the first one, i secured all bean methods. in the 2nd one, i secured only the home's "create" mthod, while explicitely denoting all remote methods as "unchecked". next, i wrote a standalone client class where the aforemention bean's EJBHome.create() is called from within a PrivilegedAction-inherited class, while hello() method is called straight up without the use of PrivilegedAction. moreover, the hello() method also prints out the SessionContext.getCallerPrincipal().getName(). finally, an UNsecured servlet utilizing that class was deployed in Tomcat5 and another instance of Weblogic. this is where is gets interesting. when executing the standalone class or the Tomcat's servlet in both scenarios, the results are the same: both create() and hello() get called without a problem, while the latter method prints out correct principal name. however, Weblogic hosting the unsecured servlet behaves differently (and undesirably). in the first scenario where all methods are secured, create() is allowed to be executed, but calling hello() results in an insufficient privileges error. in the 2nd scenario, where only create() method is secured, Weblogic allows hello() to be called without a problem. however, the principal that it returns is "anonymous". my question is how is it possible for not only Tomcat, but even a standalone class to call a secured method without the use of PrivilegedAction and get back a correct principal? yet when absolutely identical code is called from another Weblogic instance, i cannot even obtain a correct principal despite the use of PrivilegedAction!!!
    thanks!

    Hi "werwer" (or is that "wer" :-),
    I haven't checked the forum archives, so I may have already mentioned
    this to you (or I may have already mentioned it to someone else
    on this forum), but there are many resources available on the
    Internet that can answer nearly all your J2EE related questions!
    I would like to mention two. (If you already know about them, then
    I suggest you study them. If you have already studied them and
    still don't know the difference between a stateful and a stateless
    session bean, then perhaps you can be a bit more specific about
    what, in particular, you are having difficulty with.)
    1. "Mastering Enterprise JavaBeans" by Ed Roman
    A book that you can download as a PDF file.
    http://www.theserverside.com/books/masteringEJB/index.jsp
    (Also look for the companion book -- at the same URL -- "EJB
    Design Patterns")
    Note that you need to become a "member" in order to download
    these books -- but registration is free.
    2. "Enterprise Java Beans, 3rd Edition" by Richard Monson-Haefel
    This is an online book -- that you cannot download!
    http://safari.informit.com/main.asp?bookname=entjbeans3
    Note that "Safari" (at "InformIT") are offering a free, two-week
    trial subscription.
    Hope this helps you.
    Good Luck,
    Avi.

  • EJB skeleton tied to a specific bean instance?

    Is a EJB skeleton tied to a specific EJB instance? For example, if in an application every access to the EJB was done via the same skeleton, would they have to queue or would the skeleton share the pool of beans amongst the requests.
    I'm assuming by skeleton to mean the remote RMI reference to the EJB returned from the create() method.
    Thanks

    Hi,
    It partly depends on what kind of ejb we're talking about. In the case of a stateful session bean, it doesn't make sense to have concurrent invocations of the same bean. If we're talking about stateless session beans, then the container typically dispatches concurrent requests to different bean instances on different threads.
    Note that strictly speaking, it would be within the
    rights of the container to serialize even stateless session bean
    invocations. This would certainly be a dumb thing to do, but the
    application would still work.
    Regards,
    Ken

  • Performance Test resulting in more EJB bean instances

    Hi Guys,
    I am trying to profile my application using OptimizeIT.
    If I conduct a load test using Load Runner , But for the test I am using only
    virtual client continously repeating the same operation for a period of an hour
    or so. I expect only entity bean instance to cater to the needs . What I observe
    from OptimizeIT is the number of instances of entity bean continously increases
    My question is when the same thread is doing the operation the Entity Bean instance
    which catered to the need during the first round should be able to process client
    request second time. Why should the bean instance continously increase?
    Thanks in advance,
    Kumar

    Kumar Raman wrote:
    Hi Rob,
    I am unable to send the .snp file as the file size is coming out to be 6 MB which
    our mail server is not allowing to send thorough (we have a corporate limit of
    3MB). If U have any other way across please let me know.Did you try compressing it? Or, just split it in multiple files and
    send them separately. If none of that works, send me a private email,
    and I can get you a FTP upload.
    >
    As regards to 2 questions
    1) I know as to why two instances are getting created as I can see the code here.
    But I really wanted to know as to when these instances be released from the memory
    ? They'll be kept in the cache at least until the transaction ends. Since
    you're deleting them, they'll be removed from the cache and sent to the
    pool when the tx completes.
    Is this going to be there till the pool size defined is filled? I haven,t defined
    any pool size in our configuration. I feel the default size is 1000.
    Yes, they will be in the pool, and the default pool size is 1000.
    2) As regards to 2nd question , the add/delete are running in different transaction.
    I wanted to know as to whether the instances created during add , be used for
    delete operation as well.
    They can/should be the same instance. What is your concurrency-strategy
    setting for this bean? I know in the past that exclusive concurrency
    was not reusing bean instances as well as some of the other concurrency
    strategies (eg database / optimistic).
    3) Also for each of the bean instance will there be corresponding home instances
    also floating in memory. I feel the home instances should be reusable.
    There's just 1 home instance for the deployment, not 1 per bean.
    In case of simple Entity bean creation in weblogic, how many objects will be
    created vis. a vis , home object , remote object so on...
    You'll need a bean interface (local and/or remote) and a bean
    implementation class.
    As the number of instances which OptimizeIT shows is beyond my understanding.
    I wanted to ensure is there any configuration to help me optimize these creations.
    Ok, let's try to get the snapshot to me so I can help you out.
    -- Rob
    >
    Thanks,
    Kumar
    Rob Woollen <[email protected]> wrote:
    Kumar Raman wrote:
    Hi,
    Actually we are running a scenario using Load Runner tool to add arow onto a
    DB using an Container managed Entity Bean. This Bean is getting instantiated
    using a Session Bean. In the workflow after creation we are deletingthe row in
    the table by using the remove method of the same entity bean.
    If we analyze using the profiler, the number of EJB instances increasesby 2 during
    add and increases by another 2 after delete.Is your session bean only creating one bean?
    There seems to be 2 questions:
    1) Why are you getting 2 beans on add/delete? I'm not sure if you
    expect this or not.
    2) Why are the beans used for the creation not being used again when
    you
    issue the delete?
    For #2, my first question is if the create and remove are both running
    in the same transaction?
    I am sending the OptimizeIT (ver5.5) snapshots to you by mail.
    Haven't received them yet, but they would be very helpful.
    -- Rob
    Please let me know as to why the instances are increasing inspite explicitlycalling
    the remove method in the code.
    Thanks,
    Kumar
    Rob Woollen <[email protected]> wrote:
    We'd need a little more information to diagnose this one.
    First off, if you have an OptimizeIt snapshot file (the .snp extension
    not the HTML output file), I'd be willing to take a look at it and
    give
    you some ideas. If you're interested, send me an email at rwoollenat
    bea dot com.
    If you're using a custom primary key class (ie not something like
    java.lang.String), make sure it's hashCode and equals method are correct.
    Otherwise, it'd be helpful if you gave us some more info about yourtest
    and what you're doing with the entity bean(s).
    -- Rob
    Kumar Raman wrote:
    Hi Guys,
    I am trying to profile my application using OptimizeIT.
    If I conduct a load test using Load Runner , But for the test I amusing only
    virtual client continously repeating the same operation for a periodof an hour
    or so. I expect only entity bean instance to cater to the needs .
    What
    I observe
    from OptimizeIT is the number of instances of entity bean continouslyincreases
    My question is when the same thread is doing the operation the EntityBean instance
    which catered to the need during the first round should be able toprocess client
    request second time. Why should the bean instance continously increase?
    Thanks in advance,
    Kumar

  • Stateless Bean - Web Service Context

    Is there anyway to specify the root context of a stateless bean that is also annotated as a webservice
    Example
    @Stateless
    @Local(**)
    @LocalHome(**)
    @WebService(**)
    @WLHttpTransports(contextPath="rootPath", serviceUri="uri")
    Normally i would expect this to be accessible through http://host:port/rootPath/uri?WSDL
    This format does work without the session bean if ran through Weblogics Generators, but is it possible to do the same thing with a bean? Or if it's not possible using WLHttpTransports what would the other method be?
    Thank you

    user8008029,
    The WLS JAX-WS stack does not support all of the proprietary annotations from the JAX-RPC stack. This annotation (@WLHttpTransports) is one example. However, you can still override the context and service mapping using descriptors.
    The descriptor is [weblogic-webservices.xml|http://e-docs.bea.com/wls/docs103/webserv_ref/dd.html] ...
    Here is a sample:
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-webservices xmlns="http://xmlns.oracle.com/weblogic/weblogic-webservices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-webservices http://xmlns.oracle.com/weblogic/weblogic-webservices/1.0/weblogic-webservices.xsd">
    <webservice-description>
    <webservice-description-name>YourEJBService</webservice-description-name>
    <webservice-type>JAXWS</webservice-type>
    <port-component>
    <port-component-name>YourPort</port-component-name>
    <service-endpoint-address>
    <webservice-contextpath>rootPath</webservice-contextpath>
    <webservice-serviceuri>/uri</webservice-serviceuri>
    </service-endpoint-address>
    </port-component>
    </webservice-description>
    </weblogic-webservices>
    Note: you may use the <WLHTTPTransport/> element with the [ jwsc ant task|http://e-docs.bea.com/wls/docs103/webserv_ref/anttasks.html#wp1069899] . This will build your service and automatically create the appropriate descriptors.
    Ryan

Maybe you are looking for