Timeout attribute of cfquery ignored?

I set up the following SELECT * test on a table with a huge number of rows, just to make sure the query would run over 1 second:
<cfquery name="test" datasource="#ds#" timeout="1">
          SELECT *
          FROM request_stats
</cfquery>
The debugging info indicates that the query took 2539ms, but instead of throwing an error the query ran & returned results. Maybe I am not understanding how the timeout attribute should work? The CF docs indicate that "Because the timeout attribute only affects the maximum time for each suboperation of a query, the cumulative time may exceed its value" -- but does a simple query like this one have suboperations?
I'm using CF9.

According to Charlie Arehart on New for CF9 (and 9.0.1): a query timeout that really works, with a caveat, the timeout attribute of the cfquery tag "generally does not work."
As mentioned in the same post, there is a query timeout option available in the CF Administrator for certain data source types, but unfortunately not for the ODBC Socket that I'm using.
Additionally, the CF9 docs indicate, regarding the timeout attribute, that "For JDBC statements, ColdFusion sets this attribute. For other drivers, see the driver documentation." So it's possible that the timeout attribute does work, but only for some drivers.

Similar Messages

  • Wls 10.3 weblogic-webservices.xml transaction-timeout attribute not working

    Hi, need some urgent need.
    I have a stateless ejb webservice and I'm trying to set the transaction timeout for some of the methods. Right now my webservice transaction is timing out to the default of 30 secs. I've tried setting in the admin console the JTA transaction timeout option, didn't work (file a case with bea support #81233). And after days of researching and searching I came across that you can setup the weblogic webservice transaction-timeout thru the weblogic-webservices.xml deployment descriptor. Tried setting the transaction-timeout attribute to 120 secs. and that didn't work. Here is the snippet of the xml file.
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-webservices xmlns="http://www.bea.com/ns/weblogic/weblogic-webservices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-webservices http://www.bea.com/ns/weblogic/weblogic-webservices/1.0/weblogic-webservices.xsd">
    <webservice-description>
    <webservice-description-name>com.starcomsoft.pp.system.jws.SystemWSImpl</webservice-description-name>
    <webservice-type>JAXRPC</webservice-type>
    <port-component>
    <port-component-name>SystemWSSoapPort</port-component-name>
    <service-endpoint-address>
    <webservice-contextpath>starcomsoft_ws</webservice-contextpath>
    <webservice-serviceuri>/SystemWSImpl</webservice-serviceuri>
    </service-endpoint-address>
         <transaction-timeout>120</transaction-timeout>
         <reliability-config>
              <inactivity-timeout>P0DT600S</inactivity-timeout>
         </reliability-config>
    </port-component>
    </webservice-description>
    </weblogic-webservice>
    Does anybody have any clue to solve my urgent need.
    Thanks in advance for your help or suggestion.

    Unhandled exception
    Type=Segmentation error vmState=0x00040000
    J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000033
    Handler1=F144C588 Handler2=F1446A9C
    Module=/app/oracle/product/Middleware/wlserver_10.3/server/native/aix/ppc/libmuxer.so
    Module_base_address=D8457000
    Target=2_40_20091214_049398 (AIX 5.3)
    CPU=ppc (4 logical CPUs) (0x600000000 RAM)
    ----------- Stack Backtrace -----------
    (0xD696E748 [libj9vm24.so+0x48748])
    (0xD8383EDC [libjclscar_24.so+0x10edc])
    (0xD8384514 [libjclscar_24.so+0x11514])
    (0xD6967718 [libj9vm24.so+0x41718])
    (0xD6967158 [libj9vm24.so+0x41158])
    (0xD69640D0 [libj9vm24.so+0x3e0d0])
    (0xD6932C9C [libj9vm24.so+0xcc9c])
    (0xD69BBA18 [libj9prt24.so+0x3a18])
    (0xD6932BB8 [libj9vm24.so+0xcbb8])
    (0xD69A77CC [libj9thr24.so+0x27cc])
    pthreadbody+0x118 (0xD010D784 [libpthreads.a+0x3784])

  • CR Reports 2008: Space Between HTML Attribute and Value Causes Attribute To Be Ignored

    I have a field in a report with its Text interpretation set to "HTML Text".  When content is rendered in that field that was sourced from a Microsoft Word document, some of the attributes seem to be ignored by Crystal. 
    For example, I have observed with "style" attributes that if there is a space between the attribute and the value, e.g. "FONT-FAMILY: SimSun" then Crystal will not render the Asian characters, replacing them with squares.  However, if I manually remove the space so that the attribute appears as "FONT-FAMILY:SimSun", then the characters properly render as expected.  I have observed the same issue with at least one other attribute as well, "FONT-SIZE".
    This html does render properly in various browsers, so it seems to be an issue with Crystal Reports.  Can you provide me with information about this and if there is a fix for it in subsequent versions.  The version I tested with is 2008 - 12.5.0.1190.
    Thanks for any assistance that you can provide.

    hi Ethan,
    here are the list of supported html tags in text interpretation...font family is indeed a supported tag.
    does the html appear properly in the designer?...you mentioned various browsers and am wondering if you mean the crystal web viewers?
    if the issue is in your cr designer, you may wish to patch it to the latest level.
    also, ensure that you do not have any unsupported tags in your html that may be causing an issue.
    -jamie
    html
    body
    div (causes a paragraph break)
    tr (causes only a paragraph break; does not preserve column structure of a table)
    span
    font
    p (causes a paragraph break)
    br (causes a paragraph break)
    h1 (causes a paragraph break, makes the font bold & twice default size)
    h2 (causes a paragraph break, makes the font bold & 1.5 times default size)
    h3 (causes a paragraph break, makes the font bold & 9/8 default size)
    h4 (causes a paragraph break, makes the font bold)
    h5 (causes a paragraph break, makes the font bold & 5/6 default size)
    h6 (causes a paragraph break, makes the font bold & 5/8 default size)
    center
    big (increases font size by 2 points)
    small (decreases font size by 2 points if it's 8 points or larger)
    b
    i
    s
    strike
    u
    The supported HTML attributes are:
    align
    face
    size
    color
    style
    font-family
    font-size
    font-style
    font-weight
    In Crystal Reports 2008 Service Pack 2 and above, the following additional HTML tags and attributes have been added to the supported list:
    The supported HTML tags are:
    ul  ( bulleted list )
    ol  ( ordered list )
    li   ( tag defining a list item used for both list type: ul and ol. )
    Important Note: The bullet will not show up as a regular size bullet, but as a small dot.
    The supported HTML attributes are:
    strong ( bold )

  • How does inactive connection timeout attribute in weblogic works ?

    Lets say If there is a connection leakage in my application running on weblogic server 10.3.4 and I want to regain the unclosed connection.
    After going through some documentation I found out that setting inactive connection timeout to a positive value can fix this issue.
    With setting the above attribute will the weblogic server close any connection object which is inactive for specified number of seconds or it acts on only
    those connection objects which has lost all the references to it ?
    demonstrating the query by an example ,
    Lets say I have two connection objects con1 & con2 taken from a defined datasource in the weblogic.
    the inactive timeout has been set to 10 seconds.
    In a given thread lets say con1 does some db operation and then after being done, con2 is used for another db operation for greater than 10 seconds.
    Will the object con1 be still available for db operation or we need to take a fresh connection from the pool ?
    Thanks,
    Tarique
    Edited by: user779368 on 30-May-2011 06:29

    Any connection that has been reserved by an application, and not used for longer than
    the inactive timeout limit, will be taken back by the pool. All it's sub-objects will be closed etc.
    In your case, you would lose con1 while con2 was being used. Ideally, you would get
    any/either of those connections at the instant you really need it. Then, ideally use it
    till you can close it. But if you are doing transactions or a job that need connections,
    but can't avoid having them idle for X seconds, then set your inactive timeout larger than X.

  • Alt attributes: used or ignored or penalized by Google?

    I've never been a hard-core SEO person. Mainly just sticking
    with good
    markup and good content and passing the buck when clients
    what true SEO
    consulting (mainly telling them to hire a SEO consultant for
    that).
    I got into a discussion a while ago regarding the effects,
    either pro or
    con, of using alt attributes as your main headings.
    I know that Header tags are relatively important for Search
    Engine rankings.
    You want decent keywords in your headers.
    On many of the sites I build, I reserve the H1 Tag for the
    site logo, which
    is usually an image:
    <h1><img src="WidgetsInc.gif" alt="Widgets Inc.:
    Quality Widget Provider for
    the Greater NorthWest" /></h1>
    And when I do HTML production for other graphic designers,
    they often want
    at least the H2 tags to also be image-based.
    IMO, I've always considered the above completely valid and a
    good way to
    handle things. Since alt attributes are truly supposed to be
    content (if for
    no other reason than it's proper accessibility), google
    should read them and
    treat it as it would text wrapped in the H1 tags.
    The counter argument I heard was that google ignores alt
    attributes because
    they could be spoofed. The example being something like:
    <h1><img src="CocaCola.gif" alt="CocaCola rules,
    Pepsi sucks!" /></h1>
    And, I thought, hmm...that's actually a valid point. What's
    everyone's
    thoughts on this? Any known data regarding this? Does Google
    ignore alt
    attributes?
    If it does, would image replacement techniques be any more
    valid?
    Specifically the practice of using a background image to show
    the image, and
    moving the actual text off-screen using something like left:
    -999. That
    would produce the same visual result and be (almost) as
    accessible. However,
    I was under the impression that Google ignores negative
    positioned items for
    the same reason as the above argument regarding alt
    attributes (they can be
    spoofed with fake keywords).
    Thoughts? Opinions? Suggestions? Conspiracy Theories?
    -Darrel

    Hi Darrel,
    I actually have 6 identical pages in a test folder of mine
    where I
    eventually will know for sure... I think.
    The 3 pages are done with different methods as in the one you
    describe
    (negative text indent) and one that uses an image with an alt
    attribute
    and one that uses Thierry's perfect IR. They have the exact
    same short
    content. The last 3 pages uses the above methods but without
    any alt or
    title attributes.
    It's only a week since I uploaded the pages so it's too early
    to say
    which will work better if any difference at all. I see the
    folder has
    been visited by googles spiders but no results yet.
    Not much help I know but I also didn't knew for sure... thats
    why :)
    darrel skrev:
    > I've never been a hard-core SEO person. Mainly just
    sticking with good
    > markup and good content and passing the buck when
    clients what true SEO
    > consulting (mainly telling them to hire a SEO consultant
    for that).
    >
    > I got into a discussion a while ago regarding the
    effects, either pro or
    > con, of using alt attributes as your main headings.
    >
    > I know that Header tags are relatively important for
    Search Engine rankings.
    > You want decent keywords in your headers.
    >
    > On many of the sites I build, I reserve the H1 Tag for
    the site logo, which
    > is usually an image:
    >
    > <h1><img src="WidgetsInc.gif" alt="Widgets
    Inc.: Quality Widget Provider for
    > the Greater NorthWest" /></h1>
    >
    > And when I do HTML production for other graphic
    designers, they often want
    > at least the H2 tags to also be image-based.
    >
    > IMO, I've always considered the above completely valid
    and a good way to
    > handle things. Since alt attributes are truly supposed
    to be content (if for
    > no other reason than it's proper accessibility), google
    should read them and
    > treat it as it would text wrapped in the H1 tags.
    >
    > The counter argument I heard was that google ignores alt
    attributes because
    > they could be spoofed. The example being something like:
    >
    > <h1><img src="CocaCola.gif" alt="CocaCola
    rules, Pepsi sucks!" /></h1>
    >
    > And, I thought, hmm...that's actually a valid point.
    What's everyone's
    > thoughts on this? Any known data regarding this? Does
    Google ignore alt
    > attributes?
    >
    > If it does, would image replacement techniques be any
    more valid?
    > Specifically the practice of using a background image to
    show the image, and
    > moving the actual text off-screen using something like
    left: -999. That
    > would produce the same visual result and be (almost) as
    accessible. However,
    > I was under the impression that Google ignores negative
    positioned items for
    > the same reason as the above argument regarding alt
    attributes (they can be
    > spoofed with fake keywords).
    >
    > Thoughts? Opinions? Suggestions? Conspiracy Theories?
    >
    > -Darrel
    >
    >
    Kim
    http://www.geekministry.com

  • [JDev 9.0.3/JClient] ViewObject/Entity attribute: Display Hint ignored?

    I have a small problem with the ability to hide ViewObject/Entity attributes in generated JClient Forms. Hope somebody might know a bit more of this issue.
    When setting the "Display Hint" to "Hide" on an attribute (of either the Entity or ViewObject), the appropriate JLabel and JTextField (or whatever Swing control is used to edit the value) will not be hidden, neither at designtime nor runtime.
    I'm not (yet ;)) an expert when it comes to JClient, but it seems to me that when I tell an attribute of a ViewObject to be hidden, I would expect that the visible property of the appropriate Swing controls be set to false. [ setVisible(false); ]
    In some other thread [ http://forums.oracle.com/forums/message.jsp?id=1342592 ] I read that the problem might be related to setting the control hint AFTER the JClient Form was generated. However, in that same thread someone else suggested that the control hint is processed at runtime. So, I've tried both approaches: first setting the control hint, then generating the JClient Form and first generating the JClient form, then setting the control hint. Neither approach worked.
    However, I did notice that after I set the control hints, the JClient Form wizard allowed me to hide 'hidden' attributes (which indeed were the attributes which I had specified to be hidden). So that worked ok. But even though I unchecked the hidden attributes box, the end result was still the same: a Form with all attributes on it. Running the project revealed that the controls were not hidden at runtime either.
    Am I pherhaps missing something? Or else could this be a bug?
    (As the subject indicates, I'm using JDeveloper 9.0.3 Production Release.)

    Alright, consider this scenario:
    I have a ViewObject with some attributes and in particular the attribute 'X'. In the database table column X is NOT NULL and so attribute X automatically is Mandatory. (This is correctly generated by the BC4J wizard.)
    Next, I manually specify that attribute X is invisible (Display Hint). This should cause any bound Swing controls to become invisible when simply browsing the database. However, when inserting a new record, all controls associated with attribute X should become visible (since X is a Mandatory attribute). After the new record has been committed, the appropriate Swing controls become invisible again.
    I suppose that this behavior could be the same for non Mandatory attributes, but that's (somewhat) less important.
    In case you want a 2nd form in which existing records can be edited (including column X), attribute X should nolonger be invisible. Then the Swing controls bound to attribute X should be removed from the browse form and the 'insert capabilities' of that particular form should be removed as well. The new 2nd should be used for editing/inserting, while the 1st one is for browsing only.
    I realise that this scenario may contain a couple of flaws, but it's to give you an indication of what I'd like to be able to do with the existing wizards and attribute editors.
    Enjoy :)

  • About the heartbeat check attribute 'timeout'...

    As policy of failover time is within 10 seconds, in the statement of CREATE REPLICATION, i set the 'timeout' attribute for 10 seconds. (and of course I faced the warning message that it is recommended to be set at least for 60 seconds.)
    In spite replication works find, log file keep write the error message below.
    2007-06-22 17:58:32.92 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 17:58:32.92 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    2007-06-22 17:59:02.83 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 17:59:02.83 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    2007-06-22 17:59:32.89 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 17:59:32.89 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    2007-06-22 17:59:52.93 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 17:59:52.93 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    2007-06-22 18:00:23.00 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 18:00:23.00 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    2007-06-22 18:00:52.29 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 18:00:52.29 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    2007-06-22 18:01:23.11 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 18:01:23.11 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    2007-06-22 18:01:53.18 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 18:01:53.18 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    2007-06-22 18:02:13.21 Warn: REP: 9451: RSCP:transmitter.c(4476): TT16060: Failed to read data from the network. select() timed out
    2007-06-22 18:02:13.21 Err : REP: 9451: RSCP:transmitter.c(2762): TT16122: Failed to send heartbeat to peer. Restarting log read loop
    Log file is almost full with these messages.
    Why is this error message is being inserted even it does not really have a error? What exactly 'timeout' is for? I look for it in the manual but does not seems like manual has a understandable explanation.

    The 'timeout' referred to in this message is not related to the TIMEOUT clause within the replication definition. These messages are indicating that the replication agent is not able to exchange messages with the remote replication agent although the socket connection appears to be still open. I do not understand how it can be that 'replication still works' since clearly the repagents are not communicating (unless you have more than 2 datastores in your replication scheme and only one of them is not communicating).
    If the remote repagent was shutdown cleanly then it would have disconnected from the local repagent. Since we are seeing these messages the most likely cause is that the network between the machines is not functioning or that the remote machine failed in some 'hard' way (e.g. power failure).
    Chris

  • Cfquery timeout not work

    Hello,
    I used the queries timeout attribute to catch exception when
    the timeout is fired. I used Oracle driver on coldfusion 7.0.1.
    I have long quires and they caused the coldfuion hanged
    becuase the timeout not work. please help me in this issue
    ASAP.

    I used the queries timeout attribute to catch exception when the
    timeout
    is fired. I used Oracle driver on coldfusion 7.0.1.
    I have long quires and they caused the coldfuion hanged
    becuase the
    timeout not work. please help me in this issue ASAP.
    I would not use the timeout attribute. I would check for
    mistakes in the Coldfusion code and in the query.

  • Apex Version 4.2: Why doesn't the session timeout parameter settings work?

    Prior to an upgrade to Apex Version 4.2.0.00.27, we ran Apex Version 4.1 in our environment. This is on a platform using Oracle Database Enterprise Edition 11g R2 on Windows Server 2008. The session timeout parameters (set for a single application using "Shared Components" -> "Security Attributes") were set to the following:
    Maximum Session Time: 1 day
    Maximum Session Idle Time: 8 hours
    This worked with no problems in Apex 4.1; our user would leave a data entry form open for several hours, complete the data entry then submit the page. Now, with the upgrade to Apex 4.2, doing the same thing causes the system to redirect to the login page and aborting any edits or new data entered into the form previously.
    I have tried to set both session parameters to ZERO (0) which is what the documentation explains is the equivallent to "no timeout" but that didn't work as well.
    I have reset the session control parameters to what they were before the upgrade and my session times out before the time values I set. (on the version 4.2 upgraded instance).
    Why was the session timeout parameters I set ignored by the system? Can anyone else out there confirm/repeat the problem I observed?

    Hi Richard,
    You probable have it ok, but the time should be in seconds.
    Kees

  • Timeout for cfstoredproc

    Hi. Is there a way to set timeout for the tag
    <CFSTOREDPROC>? I mean, for cfquery, it has a parameter
    timeout in seconds. How about for CFSTOREDPROC?
    I tried using
    <cfset startproc = GetTickCount()>
    <cfsetting requesttimeout = "20" />
    <CFSTOREDPROC PROCEDURE="fsdfsd" DATASOURCE="sfsds">
    cfprorparams here.........
    </CFSTOREDPROC>
    <cfset proc_execute = GetTickCount() - startproc >
    proc_execute returns about 30,000 ms which is 30 s. But the
    timeout needs to end it in 20 s. It seems requesttimeout doesn't
    include the time it took for the stored procedure executing. That
    is why I'm looking for a timeout in cfstoredproc. Any suggestions?
    I don't wanna go to the Oracle server and set the timeout settings.
    I want it done in Coldfusion. Thanks.

    There is no timeout attribute for cfstoredproc. Since all the
    processing is occurring inside the database there is no way for us
    to time it out. Also, since we do not know the DBMS in advance we
    could not use any DBMS specific means. If Oracle SQL lets you set
    it inside the SP, that is your way to go.
    RequestTimeout/page timeouts only cover the time CF is in
    control of the thread.

  • BMT and transaction timeout

    Hello,
    Does anybody knows what the behavior should be for a Session EJB with BMT (using JTA) after a transaction timeout? Does the container performs a database rollback for you immediately after the time-out event? I’ve noticed that JBoss does not perform a rollback but Web does. What do the J2EE specs say what should happen?
    We are experiencing database locks in an Oracle database caused by ‘hanging’ JTA-transactions which aren’t removed after a timeout. An application server restart will remove them. We are trying to find the cause, there fore I’am posting this message.
    Regards,
    Marteyn Heijlaerts

              "Laurel Neustadter" <[email protected]> wrote:
              >
              >Hi:
              >
              >The WLS 6.0 documentation states that for a CMT bean, one specifies the
              >transaction
              >timeout in weblogic-ejb-jar.xml, and for a BMT bean, one specifies the
              >transaction
              >timeout via UserTransaction.setTransactionTimeout().
              >
              >You also set a transaction timeout attribute at the domain level. How
              >does the
              >domain level attribute work into all of this? How is it used?
              >
              >For example, if a transaction timeout value is not specified at the bean
              >level,
              >will the domain level value be used?
              >
              >Laurel
              Yes, the domain level timeout is the default.
              It is overridden by any setting at the EJB level. This in turn
              can be overridden by the client calling the EJB, if the client
              starts a transaction and uses
              transactionManager.setTransactionTimeout()
              

  • How can I set a Session bean timeout

    Hello !
    How can I set a Session bean to time out eg. 48 hours ?
    Thanks
    Uiloq Slettemark

    For stateful session beans you can use the timeout attribute in the orion-ejb-jar e.g.
    <session-deployment timeout=1800 ..>
    this is specified in seconds and Default Value: 30 (minutes)
    regards
    Debu

  • How do I get an attribute on a simple element?

    I am trying to get an attribute on a simple element that has a type of "nonNegativeInteger". I've tried numerous ways to do this and the validator rejects them all.
    I tried the following:
    <element name="birthdate" minOccurs="1" maxOccurs="unbounded"
    type="nonNegativeInteger">
    <complexType>
    <attribute name="format" type="string" use="default"
    value="CCYYMMDD"/>
    </complexType>
    </element>
    bit I get the following:
    <Line 110, Column 38>: XSD-2027: (Error) Invalid element 'complexType' in 'element'
    This was suggested previously:
    <element name="birthdate" minOccurs="1" maxOccurs="unbounded"
    base="nonNegativeInteger">
    <complexType>
    <attribute name="format" type="string" use="default"
    value="CCYYMMDD"/>
    </complexType>
    </element>
    where the type in the <element> is changed to base but it gives the message:
    <Line 110, Column 39>: XSD-2026: (Error) Invalid attribute 'base' in element 'element'
    The following works but does not provide any type checking for the data in the tag:
    <element name="birthdate" minOccurs="1" maxOccurs="unbounded">
    <complexType content="mixed">
    <attribute name="format" type="string" use="default"
    value="CCYYMMDD"/>
    </complexType>
    </element>
    The following is accepted but the attribute definition is ignored and the XML is flagged as having an invalid attribute.
    <element name="birthdate" minOccurs="1" maxOccurs="unbounded">
    <simpleType base="nonNegativeInteger">
    <attribute name="format" type="string" use="default"
    value="CCYYMMDD"/>
    </simpleType>
    </element>
    How can I have both attributes and type checking on a simple element?

    Did you try the following:
    <element name = "birthdate">
    <complexType>
    <complexContent>
    <extension base="nonNegativeInteger">
    <attribute name="format"
    type="string"/>
    use="default"
    value="CCYYMMDD"/>
    </extension>
    </complexContent>
    </complexType>
    </element>
    The element is defined to be a complexType and having complexContent because it has an attribute. The complexContent can have either extension or restriction as its children. They define the type of derivation of the element from the base.
    Hope this helps..
    Cheers,
    Chetan
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Paul Anderson ([email protected]):
    I am trying to get an attribute on a simple element that has a type of "nonNegativeInteger". I've tried numerous ways to do this and the validator rejects them all.
    I tried the following:
    <element name="birthdate" minOccurs="1" maxOccurs="unbounded"
    type="nonNegativeInteger">
    <complexType>
    <attribute name="format" type="string" use="default"
    value="CCYYMMDD"/>
    </complexType>
    </element>
    bit I get the following:
    <Line 110, Column 38>: XSD-2027: (Error) Invalid element 'complexType' in 'element'
    This was suggested previously:
    <element name="birthdate" minOccurs="1" maxOccurs="unbounded"
    base="nonNegativeInteger">
    <complexType>
    <attribute name="format" type="string" use="default"
    value="CCYYMMDD"/>
    </complexType>
    </element>
    where the type in the <element> is changed to base but it gives the message:
    <Line 110, Column 39>: XSD-2026: (Error) Invalid attribute 'base' in element 'element'
    The following works but does not provide any type checking for the data in the tag:
    <element name="birthdate" minOccurs="1" maxOccurs="unbounded">
    <complexType content="mixed">
    <attribute name="format" type="string" use="default"
    value="CCYYMMDD"/>
    </complexType>
    </element>
    The following is accepted but the attribute definition is ignored and the XML is flagged as having an invalid attribute.
    <element name="birthdate" minOccurs="1" maxOccurs="unbounded">
    <simpleType base="nonNegativeInteger">
    <attribute name="format" type="string" use="default"
    value="CCYYMMDD"/>
    </simpleType>
    </element>
    How can I have both attributes and type checking on a simple element?<HR></BLOCKQUOTE>
    null

  • PostProcessingMethod and serverLocationDir ignored when using fileUploadTag

    I'm puzzled by this one and have been racking my brain for a couple days now, so if anyone can help me I would greatly appreciate it!
    I started by downloading the petstore app and testing the file upload feature. It works with no problems. I can see the postProcessingMethod being called on the server.
    I copied all the relevant pieces into a small test app. When I try to upload a file, it uploads it, but always to the default directory and the postProcessingMethod is never called.
    Here is what I have:
    My .jsp page contains:
                    <f:view>
                        <h1>Test of File Upload</h1>
                        <ui:fileUploadTag id="myFileUploadForm" serverLocationDir="c:/upload" postProcessingMethod="#{FileUploadBB.postProcessingMethod}" progressBarDivId="progress" progressBarSubmitId="submit1x" progressBarSize="40" retMimeType="text/xml" retFunction="testRetFunction">
                            <input type="file" size="40" name="file1" id="file1"/><br />
                            <input type="file" size="40" name="file2" id="file2"/><br />
                            <input type="file" size="40" name="file3" id="file3"/><br />
                            <input type="submit" name="submit1x" value="Submit"/>
                            <div id="progress"></div><br />
                        </ui:fileUploadTag>
                    </f:view>faces.config.xml contains:
      <managed-bean>
        <managed-bean-name>FileUploadBB</managed-bean-name>
        <managed-bean-class>com.mywebsitename.FileUploadBB</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>and com.mywebsitename.FileUploadBB contains:
    public class FileUploadBB
        public FileUploadBB()
            System.out.println("FileUploadBB() called.");
        public void postProcessingMethod(FacesContext context, Hashtable htUpload, FileUploadStatus status)
            System.out.println("IN Custom Post Processing method");
    }The progress bar works fine, the file is uploaded properly, and the testRetFunction executes. But my postProcessingMethod doesn't execute and I can't change the upload directory.
    As a side note which might help someone help me...I tried putting a non-existent bean name in the postProcessingMethod
    (for example, setting postProcessingMethod="#iliketurtlesFileUploadBB.postProcessingMethod}" and I don't get any errors...it just appears to be ignored.
    When I do the same with the petstore app, I get the error "The FileUpload process encountered an exception while trying to delegate to a custom post processing method."
    What am I missing here that causes this difference in behavior?
    Please oh masters of JSF, Ajax, and the fileUploadTag component...help me!!!
    Thanks!

    Ok. I finally figured this out myself since no one could help and I had no other choice. I will post the answer here to hopefully save someone the frustration that I experienced.
    Basically, this was my first JSF project. After reading a book on JSF that suggested it is best to use XHTML, I was using XHTML. For some reason using XHTML instead of HTML caused the postProcessingMethod and serverLocationDir attributes to be ignored. I changed
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/blueprints/ui">
        <jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
        <jsp:output omit-xml-declaration="no" doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
        <html xmlns="http://www.w3.org/1999/xhtml">to
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@taglib prefix="ui" uri="http://java.sun.com/blueprints/ui" %>and that immediately fixed the problem. I've seen other wierd behavior when using XHTML but was able to work around the problems. I guess in this case I will be forced to fall back to HTML for my whole project. Sort of disappointing and it makes me wonder if XHTML will ever catch on with these sort of problems. Anyway, hope this helps someone out in the future.

  • EJB client timeout

    WL6.1 SP2.
    When a client(either in process or standalone) makes a call to a
    stateless session bean, the client is blocked until the ejb method
    returns. Is there any way for the synchronus call to timeout and throw
    either a RemoteException or
    TimeoutException after a specified period?
    Thanks in advance!
    Jimmy

    Jimmy <[email protected]> wrote:
    Thanks for your replies.
    I've tried to set the timeout attibute in the RMI node of the
    file s2t2uhEOImplRTD.xml in the temp ejb dir of weblogic
    and it does not work. Where do you specify the timeout attribute?
    What does RMI DD mean?I don't know what's the official name of xxx_EOImplRTD.xml is - that's what I meant by
    RMI DD. You can edit it and put it back into ejb-jar.
    Thanks!
    Jimmy
    "Dimitri I. Rakitine" <[email protected]> wrote in message news:<[email protected]>...
    I didn't see any way to specify it using ejbc, but adding it to the
    RMI DD works (for RMI timeout) :
    <rmi ...
    <method name="..." timeout="..."/>
    </rmi>
    and the remote invocation fails when timeout is exceeded:
    weblogic.rmi.extensions.RequestTimeoutException: RJVM response timed out after: '1000' milliseconds.
    at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:85)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:262)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:229)
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
    at $Proxy2.testTimeout(Unknown Source)
    Rob Woollen <[email protected]> wrote:
    There is a RMI timeout parameter, but I'm not sure if it's exposed in
    6.1 or even 7.0. You might be better off asking support. That being
    said, I believe it only times out the calling thread. We can't stop the
    server thread doing the timed-out work.
    -- Rob
    Jimmy wrote:
    WL6.1 SP2.
    When a client(either in process or standalone) makes a call to a
    stateless session bean, the client is blocked until the ejb method
    returns. Is there any way for the synchronus call to timeout and throw
    either a RemoteException or
    TimeoutException after a specified period?
    Thanks in advance!
    Jimmy
    Dimitri

Maybe you are looking for