A question about EJB timeouts

Good day!
I encountered an interesting situation about EJB timer service.
1) For example, I created an implementing TimerObject Stateless Session Bean.
2) In ejbSetSessionContext method I created an timer to invoke ejbTimeout on my EJB every 15 seconds.
3) Ok. Container invokes this ejbTimeout every 15 sec. But what happens is previous ejbTimeout didn't returned because it is waiting for some connection for example. Would container invoke ejbTimeout while processing previous ejbTimeout on this one Stateless EJB?
I looked in EJB 2.1 spec. but didn't find corresponding answer.

Hi russiandroopy,
This isn't specifically mentioned in the spec because the design center of the Timer Service was not fine-grained events. The spec suggests that typical timeouts would be on the order of minutes or hours, which is typically much longer than the duration of the handling time within a timeout method or business method. In SUN's implementation we do not attempt to deliver a subsequent periodic timeout until the previous timeout completes successfully.
--ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Question about EJB and thread safe coding - asking again!

    sorry everyone, no one seems to be interested in helping me on this, so i post it again.
    i have a question about the EJB and thread safe coding. when we build EJBs, do we need to worry about thread safe issue? i know that EJBs are single threaded, and the container manages the thread for us. maybe i am wrong about this. if i wasnot, how can we program the EJB so that two or more instance of EJB are not going to have deadlock problem when accessing data resources. do we need to put syncronization in ours beans, do we even need to worry about creating a thread safe EJB? thanks in advance. the question really bothers me a lot lately.

    sorry everyone, no one seems to be interested in
    helping me on this, so i post it again.Excellent plan. Why not search a little bit on your own instead of waiting for your personal forum slaves to answer your call. See below.
    i have a question about the EJB and thread safe
    coding. when we build EJBs, do we need to worry about
    thread safe issue? Read this: http://forum.java.sun.com/thread.jsp?forum=13&thread=562598&tstart=75&trange=15
    i know that EJBs are single
    threaded, and the container manages the thread for us.
    maybe i am wrong about this. if i wasnot, how can we
    program the EJB so that two or more instance of EJB
    are not going to have deadlock problem when accessing
    data resources. do we need to put syncronization in
    ours beans, do we even need to worry about creating a
    thread safe EJB? thanks in advance. the question
    really bothers me a lot lately.
    Java's Thread Tutorial
    JavaWorld: Introduction to Java threads
    IBM: Introduction to Java threads
    Google: java+threads+tutorial

  • Questions about EJB

    I'm new to EJB.
    I want to know what is ant and JBoss ?
    Is ant is used to deploy ?
    And what is the advantages of deploy ?
    Also, is this possible to run EJB in Tomcat 4.0 ?
    sorry for too many question.
    Thank you !

    Ant is build/compile tool (plus some). Ant can perform all kinds of tasks (javac commands, ftp, jar, etc) and is java-based (meaning you can even write your own classes to perform a task and "plug" it into Ant). Ant is capable of doing an EJB deploy.
    Deployment is simply (simple in concept, not always in doing that is) the process of making the EJB or other services you create available to an app server like Weblogic or JBoss.
    Tomcat is only a Servlet Container and can only be used to deploy Servlets and JSPs. To run/host EJBs, you will need to get a J2EE application server. Many free ones exist (like Resin or JBoss) as well as many commercial ones (such as Bea's Weblogic, IBM's WebSphere, and Borland's AppServer).
    Hope this helps.

  • Questions about EJB local interfaces - 9iAS 9.03

    Intro: I am new in developing EJB, and I am trying to build an example to verify that a stateless session bean with local interfaces is quite efficient.
    Q1: I have read that an application trying to access local interfaces of an EJB must run into the same JVM. Does it means that it should be deployed into the same OC4J instance as the servlet?
    Q2: I am using JDev 10g to build the EJB, with local and remote interfaces. Using the internal OC4J container, I can use the remote interfaces but not the internal one: an object of class "_Proxy1" is returned after the lookup (with the same name as given for the remote interface related call). Is it possible to access the local interface?
    Q3: My application architecture is already defined to split the business logic in two EJBs: one stateless session bean for volatile data and one entity bean for a global user list cache. Where can I find a working example (with source code, please) to be deployed on 9iAS that can validate my design?
    Q4: In many places, I read that CMP entity bean are easier to develop than BMP one. Is there any special consideration I should be aware of before implementing a CMP for my global user list cache?
    Thanks a lot, Dom.

    I have just read:
    I think the problem is that local interfaces can only by
    accessed through the same container, and JSP/Servlet's
    one is different from EJB's one, regardless of you many
    application server's instances do you have... Hope this
    is the answer...Is there anyone who know if it applies too to 9iAS?
    A+, Dom

  • Specification/Architectural question about EJBs and XML

    Hello,
    My problem is as follows: I would like for a session ejb to retrieve information from xml files (other that the ejb DDs of course...). I prefer the XML-file solution to the relational-database solution as it is more lightweight. (We haven't got the resources nor the skill to administrate a native xml database.) Am I allowed to read from the filesystem? What is the best architectural solution you would advise bearing in mind I need the information contained in the xml files to be available in java (in the session bean). Ideally I would drop xml files in a directory and they would automatically be parsed and taken into account by an ejb.
    I am available to provide more details if needed.
    Any clue welcome,
    Julien Martin.

    Hello,
    My problem is as follows: I would like for a session ejb to retrieve information from xml files (other that the ejb DDs of course...). I prefer the XML-file solution to the relational-database solution as it is more lightweight. (We haven't got the resources nor the skill to administrate a native xml database.) Am I allowed to read from the filesystem? What is the best architectural solution you would advise bearing in mind I need the information contained in the xml files to be available in java (in the session bean). Ideally I would drop xml files in a directory and they would automatically be parsed and taken into account by an ejb.
    I am available to provide more details if needed.
    Any clue welcome,
    Julien Martin.

  • Pls help - Syntax question about EJB QL

    Hello,
    I'm new learner on EJB. I went through the specification 2.0 of EJB QL released by Sun, I'm not quite understand the syntax definition of SELECT clause in finder method which described in the following words:
    "In the case of a find method, the SELECT clause is restricted to contain either a single range variable or a single value path expression that evaluates to the abstract schema type of the entity bean for which the finder method is defined.
    Because finder method cannot return arbitrary types, the SELECT clause of an EJB QL defined for a finder method must always correspond to the abstract shcema type fo the entity bean for which the finder method is defined.In contrast, the SELECT clause of a query defined for a select method can return the abstract schema types of other entity beans or the values of cmp-fields."
    As my understanding, I think the SELECT clause of finder method can only contain a single range variable instead of single value path expresson, it should have only one format, which is "SELECT [DISTINCT] OBJECT(identification_variable)".
    For example: the query below is defined in OrderBean findByProductType();
    SELECT OBJECT(o) FROM Order o, IN(o.lineItems) l
    WHERE l.product.product_type = 'schoolsupplies'
    how it could be a single value path expression , I think this format can only be used in Select method.
    The other thing is EJB QL2.0 does not support subquery and "NOT EXIST" clause, does this mean that a SQL query with subquery or "NOT EXIST" clause can't be translated to EJB QL?
    I don't know if I'm correct or not. I'd appreciate if anybody can help me with this.
    Thanks!
    Maggie

    Hi,
    Weblogic
    =======
    In the Weblogic-cmp-rdbms-jar.xml file, we define the Table name as created in the DBMS along with cmp-field mapped to the dbms-columns of the table as described below
    <table-map>
    <table-name>SalesAccounts</table-name>
    <field-map>
    <cmp-field>salesaccountId</cmp-field>
    <dbms-column>sales_acctid</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>salesbalance</cmp-field>
    <dbms-column>sales_bal</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>salesaccountType</cmp-field>
    <dbms-column>sales_type</dbms-column>
    </field-map>
    </table-map>
    Here SalesAccounts is the actual table defined in DBMSD like Oracle say which has columns sales_acctid, sales_bal and sales_type.
    In ejb-jar.xml, you define an abstract schema name ie some sort of alias for your table name (SalesAccounts) along with defining the cmp fields required for writing a EJB-QL.
    <abstract-schema-name>SalesAccountBean</abstract-schema-name>
    <cmp-field><field-name>salesaccountId</field-name>
    </cmp-field>
    <cmp-field><field-name>salesbalance</field-name>
    </cmp-field>
    <cmp-field><field-name>salesaccountType</field-name>
    </cmp-field>
    <primkey-field>salesaccountId</primkey-field>
    Here salesaccountid is defined as a Primary key.
    Now your EJB-QL can be defined in the ejb-jar.xml file as follows
    <query>
    <query-method>
    <method-name>findSalesAccountsCondition</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
         <![CDATA[SELECT OBJECT(a) FROM SalesAccountBean AS a WHERE a.salesbalance > ?1]]>
    </ejb-ql>
    </query>
    This should clear ur doubts. Case u have any, revert back to me.
    Rgds,
    Seetesh

  • Question about EJB

    my architecture: servlet->EJB
    Why i have to use ejb instead a simplier object.
    When i really nead to use EJB?
    Thanks
    valefr

    Hi,
    Ya, obviously u can use ur own classes to work the way the ejb work, but it will be a tedious task.. How will u take care of security, transaction management, persistance of data and so on...Y u can do all by urself but it will be a too lengthy process. U can use EJB instead to do all thes things for u. I mean the EJB server does it for u.Hope this clarifies ur doubt..
    Ebistro

  • Question about EJB and Poject Management for a Company

    In my Company we have some problems with the management of Java Projects and
    EJB Projects. Alot of code is not reused but written again, cause noone manages it.
    Are there any programs or guides (guidelines) who can support us with these problems?
    How do you handle these problems?
    Thanks

    In my Company we have some problems with the
    management of Java Projects and
    EJB Projects. Alot of code is not reused but written
    again, cause noone manages it.
    Are there any programs or guides (guidelines) who can
    support us with these problems?
    How do you handle these problems?I guess you should take a look at core J2EE patterns during the design. :)
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html

  • Question about EJB deployment (NoClassDefFoundError)

    I got a "NoClassDefFoundError" when I bring up my servlet which tries
    to use a session bean. Can anyone tell me the correct way to deploy
    EJB in web logic 6.1?
    My case is:
    I have a session bean "examples.mysession" packaged in examples.jar
    and
    stored in "<wl dir>/config/mydomain/applications".
    In addition, I create an application "testapp" with a number of jsp &
    servlets.
    ("<wl dir>/config/mydomain/applications/testapp")
    The servlets' classes are stored in
    "<wl dir>/config/mydomain/applications/testapp/WEB-INF/classes/examples/myservlet.class"
    In the servlet, I am trying to use the mysession bean by calling
    "create()" on mysession's home object. This is where I got the
    "NoClassDefFoundError".
    java.lang.NoClassDefFoundError: examples/mysession
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    Is there something missing in my deployment procedure?
    Thanks in advance

    ClassNotFound exception for the ejb interfaces while accessing from servlet
    http://support.bea.com/askbea/wls/S-07398.html
    Terrence Leung wrote:
    I got a "NoClassDefFoundError" when I bring up my servlet which tries
    to use a session bean. Can anyone tell me the correct way to deploy
    EJB in web logic 6.1?
    My case is:
    I have a session bean "examples.mysession" packaged in examples.jar
    and
    stored in "<wl dir>/config/mydomain/applications".
    In addition, I create an application "testapp" with a number of jsp &
    servlets.
    ("<wl dir>/config/mydomain/applications/testapp")
    The servlets' classes are stored in
    "<wl dir>/config/mydomain/applications/testapp/WEB-INF/classes/examples/myservlet.class"
    In the servlet, I am trying to use the mysession bean by calling
    "create()" on mysession's home object. This is where I got the
    "NoClassDefFoundError".
    java.lang.NoClassDefFoundError: examples/mysession
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    Is there something missing in my deployment procedure?
    Thanks in advance

  • Question about Kurts comments discussing the seperation of AIA & CDP - Test Lab Guide: Deploying an AD CS Two-Tier PKI Hierarchy - Kurt L Hudson MSFT

    Question about the sentence in bold. What is the meaning behind this comment?
    How would you separate the role of the AIA and CDP from a CA subordinate server? I can see where I add a CES and CEP server which has those as well, but I don't completely understand his comment. Because in this second step, (http://technet.microsoft.com/en-us/library/tlg-key-based-renewal.aspx)
    he shows how to implement CES and CEP.
    This is from the guide located at: http://technet.microsoft.com/library/hh831348.aspx
    Step 3: Configure APP1 to distribute certificates and CRLs
    In the extensions of the root CA, it was stated that the CRL from the root CA would be available via http://www.contoso.com/pki. Currently, there is not a PKI virtual directory on APP1, so one must be created.
    In a production environment, you would typically separate the issuing CA role from the role of hosting the AIA and CDP.
    However, this lab combines both in order to reduce the number of resources needed to complete the lab.
    Thanks,
    James

    My concern is, they have a 2-3k base of xp systems, over this year they are migrating them to Windows 7. During this time they will also be upgrading hardware for the existing windows 7 machines. The turnover of certificates are going to be high, which
    from what I've read here, it worries me.
    http://blogs.technet.com/b/askds/archive/2009/06/24/implementing-an-ocsp-responder-part-i-introducing-ocsp.aspx
    The application then can go to those locations to download the CRL. There are, however, some potential issues with this scenario. CRLs over time can get rather large
    depending on the number of certificates issued and revoked. If CRLs grow to a large size, and many clients have to download CRLs, this can have a negative impact on network performance. More importantly, by
    default Windows clients will timeout after 15 seconds while trying to download a CRL. Additionally,
    CRLs have information about every currently valid certificate that has been revoked, which is an excessive amount of data given the fact that an application may only need the revocation status for a few certificates. So,
    aside from downloading the CRL, the application or the OS has to parse the CRL and find a match for the serial number of the certificate that has been revoked.
    With the above limitations, which mostly revolve around scalability, it is clear that there are some drawbacks to using CRLs. Hence, the introduction of Online Certificate
    Status Protocol (OCSP). OCSP reduces the overhead associated with CRLs. There are server/client components to OCSP: The OCSP responder, which is the server component, and the OCSP Client. The OCSP Responder accepts status
    requests from OCSP Clients. When the OCSP Responder receives the request from the client it then needs to determine the status of the certificate using the serial number presented by the client. First the OCSP Responder determines if it has any cached responses
    for the same request. If it does, it can then send that response to the client. If there is no cached response, the OCSP Responder then checks to see if it has the CRL issued by the CA cached locally on the OCSP. If it does, it can check the revocation status
    locally, and send a response to the client stating whether the certificate is valid or revoked. The response is signed by the OCSP Signing Certificate that is selected during installation. If the OCSP does not have the CRL cached locally, the OCSP Responder
    can retrieve the CRL from the CDP locations listed in the certificate. The OCSP Responder then can parse the CRL to determine the revocation status, and send the appropriate response to the client.

  • Know about EJB.

    Hi,
    I dont have any idea about EJB and also how the EJB is differ from java beans.
    Thanks in advance.

    Romain - I think the answer to your question is that the information
    identifying the user is passed into the initial context parameters. Weblogic
    uses this to propagate the security context from the servlet container to
    the ejb container.
    cheers,
    Markus
    "romain" <[email protected]> wrote in message
    news:3b0e8b23$[email protected]..
    >
    Hi
    perhaps it is a dummy question but I didn't find any explicit answer.
    I'd like to know how the ejb can know if a user belongs to a role.
    For example if I want to access my ejb with a servlet, and this servlet isprotected
    (access allowed only for group customer)
    and in my bean's deployment descriptor I have protected one method withthe security
    role customer)
    What I am wondering is when the user is authenticated in the servlet as acustomer
    and then try to access the method how the ejb knows that this user is inthe group
    customer??
    Is this information included in the http session or in the initialcontextcreated
    in the servlet or somewhere else??
    thanks for your help
    romain

  • Question about the CSS behavior when using layer 3 sticky and sticky table

    Hi everyone,
    I have a question about the CSS behavior when using layer 3 sticky and sticky table is full.
    If I configure layer 3 sticky and specify the inactivity timeout as below, how does the CSS
    handle subsequent needed sticky requests ?
    advanced-balance sticky-srcip
    sticky-inact-timeout 30
    CSS document says that
    Note:
    If you use the sticky-inact-timeout command to specify the inactivity timeout
    period on a sticky connection, when the sticky table becomes full and none of
    the entries have expired from the sticky table, the CSS rejects subsequent
    needed sticky requests.
    My question is what is the next reaction by doing the CSS if the CSS is in the
    following condition:
    when the sticky table becomes full and none of the entries have expired from
    the sticky table, the CSS rejects subsequent needed sticky requests
    Does CSS just rejects/drops subsequent needed sticky requests ?
    or
    Does CSS does not stick subsequence requests to particular service but CSS forward
    subsequence requests with round-robin basis ? which means if the sticky table is full,
    the CSS just works round-robin load balancing fashion for subsequence requests ?
    Your information would be appreciated.
    Best regards,

    Hello,
    There is a good document explaining this on Cisco web site
    http://www.cisco.com/en/US/products/hw/contnetw/ps789/products_tech_note09186a0080094b4b.shtml
    It depends if the sticky-inact-timeout is used or not. If not, it's FIFO (the oldest entry in the sticky table is removed). If yes, the CSS will reject the next sticky request.
    Rgds,
    Gaetan
    Rgds
    Gaetan

  • 2 question about GPU and Lens correction ,cs5

    Hi
    i have 2 questions about Gpu and lens correction in Cs5
    1)Filter->lens correction->search online
    i get often and almost every connection time out at the first click on search online , at the second click i get no online profile
    is it normal?
    2) question is about Gpu
    it run faster , but talking about ajustament layer
    like saturation or vibrance for example
    i found with the gpu on , a light slow refresh compared with gpu off
    i have set cache  levels 6 ,history 20
    i guess are the defaul
    well i add a saturation layer and move the saturation slide ,increase o decrease saturation
    with Gpu Off , the changes are immedially , i mean i can see in real time the increase o decrease of saturation
    with Gpu On it takes a few(very few) time more
    again is normal ?
    don't be angry , i'm going to buy cs5 and i'm unsecure ... the price make a big role
    thanks

    For what it's worth, I also see a timeout on the first [ Search Online ] click, after about half a minute delay.  Second click turns up results immediately.  This happens each time Lens Correction is started, even without restarting Photoshop, and in both 32 and 64 bit versions.  Also note that I started with one profile listed by default (though from the wrong camera) for my 40D with 28-135 zoom.
    I alsow noticed that I was seeing progress bar activity in the Lens Correction dialog while I was typing this (even though Lens Correction was NOT the active window) every time I hit the 'L' key.  Strange.
    Windows 7 x64.
    -Noel

  • About EJB 3.0 ?

    i don't know anything about EJB (nither EJB 3.0 nor any previous version )
    i want to learn EJB 3.0, but the final version of 3.0 EJB 3.0 has not been release.
    i have heard that in EJB 3.0 all the old concepts have been changed.
    a) will it be a good idea to start learning the latest version (version prior to 3.0)
    and to get familiar with EJB and then later upgrade ?
    or
    b) wait for the EJB 3.0 and start learning EJB 3.0 only when its final version comes
    please give me a helpful suggestion

    This is a late feedback on your question but now JSR220: EJB 3.0 now is in its "Proposed Final Draft" stage.
    http://java.sun.com/products/ejb/docs.html
    I feel that starting afresh with EJB 3.0 is not a bad idea because there are some major changes in the way EJBs will be developed in future.
    Knowing EJB 2.x is always a plus and you would certainly appreciate the new incarnation for its simplicity.
    Hope this helps.
    Cheers,
    -_.

  • Question about using Runtime.getRuntime();

    hi all
    i have a question about using Runtime.getRuntime(). if i use this to get a runtime reference to run an external program, is it considered as starting a new thread inside the thread that starts it?
    is it safe to do it in the Session EJB? if not, what can you recommand to do it? thanks

    hi all
    i have a question about using Runtime.getRuntime().
    if i use this to get a runtime reference to run an
    external program, is it considered as starting a new
    thread inside the thread that starts it? No. Starting a process, starts a process. Threads have nothing to do with it.
    is it safe to do it in the Session EJB? if not, what
    can you recommand to do it? thanksSo what? Run another process? If you want to run another process in java then your choices are to use Runtime.exec() or use JNI. And using JNI will probably end up doing exactly the same thing as Runtime.exec().
    "Safe" is harder. Typically to correctly use Runtime.exec() you must use threads. And as noted threads ideally should not be used. You can use them but if you do you had better understand why they didn't want you using them in the first place. You had also better be sure that you really want to wait for it to complete.
    Other than that Runtime.exec() is safe because it can't crash the VM like other interfaces can (like JNI.)

Maybe you are looking for

  • I am trying to use system center to manage my Azure enviorment

    I am freaking lost!!!! I have a Widows Azure environment that i'm trying to manage using system center ( apparently this is the bee's knees cause every post is about it) So I attempt to install Microsoft System Center and I got something now on a 201

  • Storage location wise stock

    hi all mm expert, in mb5b , stock come plant wise ie opening stock, closing stock, receiving stock, issue stock and thier values. now i required these opening, closing, receiving, issue, value storage location wise with date. a plant has 3 to 5 stora

  • Problem with a query with a BLOB data type

    Hi i've a problem with this query in 11g. R1 SELECT       LOGTIMESTAMP,       LOGTIMEMILLIS,       MSGID,       XMLTYPE(MESSAGEBODY, nls_charset_id('AL32UTF8')).getClobVal()  as LLamada FROM     vordel.AUDIT_MESSAGE_PAYLOAD,     vordel.AUDIT_LOG_POIN

  • Cannot open hyperlinks in excel

    I created hyperlinks to files in other folders on my computer, then later added some more. When I tried to open the new ones I received an error message, then I tried opening the old ones and received error message for those as well.  What is the pos

  • Regarding file 2 file using BPM

    Hi Experts,                  In file to file using BPM scenario my file is being picked in the server but it is not displaying again after polling interval. please help me one this issue as early as possible.