Non-transactional changes

Hi.
I need make a logger table at database. When I insert to that table, all changes saved, even through other changes rollbacked . How I can do it?
Best Regards, Eugene Kislov

How you are inserting records in that table? In PL/SQL??
If you are inserting in PL/SQL block then you can try AUTONOMOUS_TRANSACTION. This will commit the child transaction irrespective of the state of parent transaction.
E.g:
CREATE OR REPLACE PROCEDURE PROC_TEST
AS
BEGIN
    PROC_INSERT_LOG();
END;
CREATE OR REPLACE PROCEDURE PROC_INSERT_LOG
AS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO LOGER_TABLE(..) VALUES (..);
COMMIT;
END;

Similar Messages

  • MySQL non-transactional changed tables ...

    I'm trying to test the rollback functionality of my db connection by executing 2 INSERT statements:
    INSERT INTO Users (login_id,name,language_code) VALUES ('Satanka','Satanka','2')
    "INSERT INTO Users (tlogin_id,name,language_code) VALUES ('Satanka','Satanka','2') // this one should fail becase there is no tlogin_id column in the Users table
    When I run my test program I got the followin error message:
    java.sql.SQLException: Column not found: Unknown column 'tlogin_id' in 'field list'
    at org.gjt.mm.mysql.MysqlIO.sendCommand MysqlIO.java:508)
    at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:561)
    at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java:646)
    at org.gjt.mm.mysql.Connection.execSQL(Connection.java:973)
    at org.gjt.mm.mysql.Connection.execSQL(Connection.java:897)
    at org.gjt.mm.mysql.Statement.executeUpdate(Statement.java:230)
    at org.gjt.mm.mysql.jdbc2.Statement.executeUpdate(Statement.java:99)
    at com.pylon.portal.timesheet.datahandling.DBBrokerSingleton.ExecuteSQLUpdate(DBBrokerSingleton.java:70)
    at DBClient.main(DBClient.java:12)
    //to this point I understand everything but next line
    java.sql.SQLException: General error: Warning: Some non-transactional changed tables couldn't be rolled back
    at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:508)
    at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:561)
    at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java:646)
    at org.gjt.mm.mysql.Connection.execSQL(Connection.java:973)
    at org.gjt.mm.mysql.Connection.execSQL(Connection.java:897)
    at org.gjt.mm.mysql.Connection.rollback(Connection.java:590)
    at com.pylon.portal.timesheet.datahandling.DBBrokerSingleton.ExecuteSQLU
    pdate(DBBrokerSingleton.java:78)
    at DBClient.main(DBClient.java:12)
    Why a simple insert is a "non-transactional" change?
    I'm creating the connection like this:
    Connection con=DriverManager.getConnection("jdbc:mysql://"+url+"/TimesheetDB?user="+Name+"&password="+Pass);
    con.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_UNCOMMITTED);
    con.setAutoCommit( false );
    I'm using JRE 1.3
    JDBC driver mm.mysql-2.0.4-bin.jar
    mysql server 4.0

    Yes, you're right. I found that the default table type won't let me use transactions, and Mysql Server sent me the message.
    I thought that
    "java.sql.SQLException: General error: Warning: Some non-transactional changed tables couldn't be rolled back"
    refers to a problem inside the virtual machine.
    Now I'm trying to setup the MySql to let me create InnoDB tables. Not so simple eh...
    Thanks for helping

  • Non-transactional cursor writes block reads

    I'm opening a cursor without using a transaction like so:
    CursorConfig conf = new CursorConfig();
    Cursor cursor = db.openCursor(null, conf);
    I then iterate over the items, sometimes replacing a value. I want to be able to read (and maybe write) to any value from another thread while the cursor is still open, but gets result in the following error:
    com.sleepycat.je.DeadlockException: (JE 3.3.74) Lock expired. Locker 32098350 -1_NioProcessor-3_ThreadLocker: waited for lock on database=settings LockAddr:1537969 node=2623139 type=READ grant=WAIT_NEW timeoutMillis=500 startTime=1229438453225 endTime=1229438453730
    Owners: [<LockInfo locker="11743647 -1_NioProcessor-1_ThreadLocker" type="WRITE"/>]
    Waiters: []
    I would have expected that outside a transaction any update made through a cursor would be applied immediately, but instead the record is locked until the cursor is closed. This happens whether or not je.env.isTransactional is set to true.
    Setting je.env.isLocking to false gives me the cursor behaviour that I want, but I'm not sure what else is affected by this setting, and the javadoc comment is just vaguely worrying rather than helpful ("This property should be set to false only in special circumstances when it is safe to run without record locking.")
    I am not planning on using any transactions in this application.

    Cormac,
    I was looking through the documentation for a reference page to direct you to, and I realized that probably the clearest explanation in the javadoc is in the com.sleepycat.je.LockMode page here: [http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/je/LockMode.html]. There is a reference to it from the CursorConfig page, but I can see that the link between the two pages is not that clear.
    From the LockMode javadoc, there is this paragraph.
    bq. Locking Rules \\ Together with CursorConfig, TransactionConfig and EnvironmentConfig settings, lock mode parameters determine how records are \\ locked during read operations. Record locking is used to enforce the \\ isolation modes that are configured. Record locking is summarized below for \\ read and write operations. For more information on isolation levels and \\ transactions, see [Writing Transactional Applications|http://www.oracle.com/technology/documentation/berkeley-db/je/TransactionGettingStarted/index.html]. \\ With one exception, a record lock is always acquired when a record is \\ read or written, and a cursor will always hold the lock as long as it is \\ positioned on the record. The exception is when [READ_UNCOMMITTED|http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/je/LockMode.html#READ_UNCOMMITTED] \\ is specified, which allows a record to be read without any locking.
    Transactional cursors, by default, hold all locks until the cursor is closed. In your case, you are using a non transactional cursor, and locks are not collected the same way. But a lock for modified record is still taken in a non transactional cursor, and is held as long as the cursor is positioned at that record, to provide cursor stability. I am guessing that is what is happening in your case. If you close the cursor or move to a different position, you will be releasing the lock.
    In a second posting, you comment on your experiences using the je.env.locking property. That property is really only to be used in cases where the application is very constrained and has high performance requirements; frankly, that was put in for a particular set of power users and we really don't recommend it for general purpose use. (We should doc it better too). One characteristic is that it disables log cleaning, because the lack of locks makes it impossible for us to properly coordinate access to the data from the log cleaning threads.
    Regards,
    Linda
    Edited by: Linda Lee on Dec 16, 2008 2:19 PM (changed " link between the two pages is that clear" -> not that clear)

  • NON-transactional session bean access entity bean

    We are currently profiling our product using Borland OptmizeIt tool, and we
    found some interesting issues. Due to our design, we have many session beans which
    are non transactional, and these session beans will access entity beans to do
    the reading operations, such as getWeight, getRate, since it's read only, there
    is no need to do transaction commit stuff which really takes time, this could
    be seen through the profile. I know weblogic support readonly entity bean, but
    it seems that it only has benefit on ejbLoad call, my test program shows that
    weblogic still creates local transaction even I specified it as transaction not
    supported, and Transaction.commit() will always be called in postInvoke(), from
    the profile, we got that for a single method call, such as getRate(), 80% time
    spent on postInvoke(), any suggestion on this? BTW, most of our entity beans are
    using Exclusive lock, that's the reason that we use non-transactional session
    bean to avoid dead lock problem.
    Thanks

    Slava,
    Thanks for the link, actually I read it before, and following is what I extracted
    it from the doc:
    <weblogic-doc>
    Do not set db-is-shared to "false" if you set the entity bean's concurrency
    strategy to the "Database" option. If you do, WebLogic Server will ignore the
    db-is-shared setting.
    </weblogic-doc>
    Thanks
    "Slava Imeshev" <[email protected]> wrote:
    Hi Jinsong,
    You may want to read this to get more detailed explanation
    on db-is-shared (cache-between-transactions for 7.0):
    http://e-docs.bea.com/wls/docs61/ejb/EJB_environment.html#1127563
    Let me know if you have any questions.
    Regards,
    Slava Imeshev
    "Jinsong HU" <[email protected]> wrote in message
    news:[email protected]...
    Thanks.
    But it's still not clear to me in db-is-shared setting, if I specifiedentity
    lock as database lock, I assumed db-is-shared is useless, because foreach
    new
    transaction, entity bean will reload data anyway. Correct me if I amwrong.
    Jinsong
    "Slava Imeshev" <[email protected]> wrote:
    Jinsong,
    See my answers inline.
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    Hi Slava,
    Thanks for your reply, actually, I agree with you, we need to
    review
    our db
    schema and seperate business logic to avoid db lock. I can not say,guys,
    we need
    to change this and that, since it's a big application and developedsince
    EJB1.0
    spec, I think they are afraid to do such a big change.Total rewrite is the worst thing that can happen to an app. The
    better aproach would be identifying the most critical piece and
    make a surgery on it.
    Following are questions in my mind:
    (1) I think there should be many companies using weblogic serverto
    develop
    large enterprise applications, I am just wondering what's the maintransaction/lock
    mechanism that is used? Transional session / database lock,
    db-is-shared
    entity
    I can't say for the whole community, as for my experience the standard
    usage patthern is session fasades calling Entity EJBs while having
    Required TX attribute plus plain transacted JDBC calls for bulk
    reads or inserts.
    is the dominant one? It seems that if you speficy database lock,
    the
    db-is-shared
    should be true, right?Basically it's not true. One will need db-is-shared only if thereare
    changes
    to the database done from outside of the app server.
    (2) For RO bean, if I specify read-idle-timeout to 0, it shouldonly
    load
    once at the first use time, right?I assume read-timeout-seconds was meant. That's right, but if
    an application constantly reads new RO data, RO beans will be
    constantly dropped from cache and new ones will be loaded.
    You may want to looks at server console to see if there's a lot
    of passivation for RO beans.
    (3) For clustering part, have anyone use it in real enterpriseapplication?
    My concern, since database lock is the only way to choose, how aboutthe
    affect
    of ejbLoad to performance, since most transactions are short live,if high
    volume
    transactions are in processing, I am just scared to death about
    the
    ejbLoad overhead.
    ejbLoad is a part of bean's lifecycle, how would you be scared ofit?
    If ejbLoads take too much time, it could be a good idea to profile
    used SQLs. Right index optimization can make huge difference.
    Also you may want cosider using CMP beans to let weblogic
    take care about load optimization.
    (4) If using Optimization lock, all the ejbStore need to do
    version
    check
    or timestamp check, right? How about this overhead?As for optimistic concurrency, it performs quite well as you can
    use lighter isolation levels.
    HTH,
    Slava Imeshev
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    We are using Exclusive Lock for entity bean, because of we do
    not
    want
    to
    load
    data in each new transaction. If we use Database lock, that means
    we
    dedicate
    data access calls to database, if database deadlock happens,
    it's
    hard
    to
    detect,
    while using Exclusive lock, we could detect this dead lock in
    container
    level.
    The problem is, using Exclusive concurrency mode you serialize
    access to data represented by the bean. This aproach has negative
    effect on ablity of application to process concurrent requests.As
    a
    result the app may have performance problems under load.
    Actually, at the beginnning, we did use database lock and usingtransactional
    The fact that you had database deadlocking issues tells that
    application logic / database schema may need some review.
    Normally to avoid deadlocking it's good to group database
    operations mixing in updattes and inserts into one place so
    that db locking sequence is not spreaded in time. Moving to
    forced serialized data access just hides design/implementation
    problems.
    session bean, but the database dead lock and frequent ejbLoad
    really
    kill
    us,
    so we decided to move to use Exclusive lock and to avoid dead
    lock,
    we
    change
    some session bean to non-transactional.Making session beans non-transactions makes container
    creating short-living transactions for each call to entity bean
    methods. It's a costly process and it puts additional load to
    both container and database.
    We could use ReadOnly lock for some entity beans, but since weblogicserver will
    always create local transaction for entity bean, and we found
    transaction
    commit
    is expensive, I am arguing why do we need create container leveltransaction for
    read only bean.First, read-only beans still need to load data. Also, you may seeRO
    beans
    contanly loading data if db-is-shared set to true. Other reason
    can
    be
    that
    RO semantics is not applicable the data presented by RO bean (forinstance,
    you have a reporting engine that constantly produces "RO" data,
    while
    application-consumer of that data retrieves only new data and neverasks
    for "old" data). RO beans are good when there is a relatively stable
    data
    accessed repeatedly for read only access.
    You may want to tell us more about your app, we may be of help.
    Regards,
    Slava Imeshev
    I will post the performance data, let's see how costful
    transaction.commit
    is.
    "Cameron Purdy" <[email protected]> wrote:
    We are currently profiling our product using Borland
    OptmizeIt
    tool,
    and we
    found some interesting issues. Due to our design, we have
    many
    session
    beans which
    are non transactional, and these session beans will access
    entity
    beans
    to
    do
    the reading operations, such as getWeight, getRate, since
    it's
    read
    only,
    there
    is no need to do transaction commit stuff which really takes
    time,
    this
    could
    be seen through the profile. I know weblogic support readonly
    entity
    bean,
    but
    it seems that it only has benefit on ejbLoad call, my test
    program
    shows
    that
    weblogic still creates local transaction even I specified
    it
    as
    transaction not
    supported, and Transaction.commit() will always be called
    in
    postInvoke(),
    from
    the profile, we got that for a single method call, such as
    getRate(),
    80%
    time
    spent on postInvoke(), any suggestion on this? BTW, most of
    our
    entity
    beans are
    using Exclusive lock, that's the reason that we use
    non-transactional
    session
    bean to avoid dead lock problem.I am worried that you have made some decisions based on an improper
    understand of what WebLogic is doing.
    First, you say "non transactional", but from your description
    you
    should
    have those marked as tx REQUIRED to avoid multiple transactions
    (since
    non-transactional just means that the database operation becomesits
    own
    little transaction).
    Second, you say you are using exclusive lock, which you shouldonly
    use
    if
    you are absolutely sure that you need it, (and note that it
    does
    not
    work in
    a cluster).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    >

  • Creating a non transaction datasource

    All,
    I am using Quartz to fire Hibernate Jobs. Quartz Scheduler runs as a servlet in tomcat, the Hibernate job is a standalone app.
    The Scheduler calls the app like so:
    Quartz>Shell>Hibernate.
    When I start the Hibernate jobs, they instantly go into a blocked state, basically db dealocks. When view the connections with
    mysql admin, I can see the connections are sleep!
    I heard thru the grapevine that a non-transactional datasource would solve this problem.
    How do I do this? Is it done in tomcat, or do I need to change my hibernate db connection?
    Any ideas?

    You're deadlocking with another process - quite possibly with one of your earlier tasks that stalled for some reason.
    Turning off transactions is a dumb way to fix this - it avoids you finding out what the real problem is, thus curing the symptom but probably not the disease. Find out what's deadlocking and why, then fix that problem properly.

  • Non Transactional Reads

    How do non-transactional reads interact with database locking?
    I find that it is possible for a non-transactional read from one Persistence
    Manager to return null for an object or try to load an object that has been
    deleted from the datastore by another persistence manager (causing a JDO
    exception)
    What are the possible solutions?

    Clive,
    Do your PMs live a long time? While there are some benefits to long
    lived PMs in situations with low interaction across PM's objects,
    sometimes you can get into the situation where data can get stale since
    commits in one PM won't necessarily propagate to the other PM. You can
    avoid this either by allocating short lived PMs which have low overhead
    in general or calling PM.refresh () appropriately.
    Clive Cox wrote:
    How are you getting into these situations?Stephen,
    I have a web service in which I have a persistence manager per member, in
    which concurrent access is controlled with appropriate synchronization.
    However,
    (perhaps foolishly) I had allowed non-transactional reads and allow one
    member to read
    another's data from their persistence manager - there is a high degree of
    interation between members.
    I use Kodo JDO with mySQL.
    The offending situation is with one class with a field that references
    another class, which
    is 2 tables in mySQL. In the persistence manager for a member I change the
    reference to
    a new object and delete the old reference while at the same time another
    member in a
    different persistence manager is reading this object structure I get either
    a null pointer for
    the reference or the other member tries to get from the datastore a object
    that
    no longer exists and throws a JDO user exception.
    I assume this is what can happen if one foolishy uses non-transactional
    reads.
    However, I would like to know how other people use JDO in a web environment
    in which
    users (members) interact highly and change each others data and read each
    others data.
    What is the best way to design a web server architecture using JDO in this
    situation?
    Clive
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • "rollback" for non-transaction objects

    Hello,
    I have the following situation:
    When I work with some entity in DAL layer it is atached, so all my changes will be flushed. After flushing some contraint of DB can be violated. My changes can be done in transaction or without any transaction, and here is my problem:
    If it is in transaction, I should not rollback it (user can correct "mistake"); If it is out of transaction - it should be "rollbacked".
    To handle situation with transaction I've made my exception '@ApplicationException' and it works.
    But it is bad for the second situation, without transaction. In this case my data are flushed anyway (if exception thrown is ApplicationException). In my exception handler I tried to do this: "if I'm not in transaction so service.getEntityManager.clear();", but data are flushed anyway...
    So how to handle this situation? Does "clear()" for non-transaction have to work as "rollback()" for transaction?
    (I think that it could be done so: throw ApplicationException if I am in Transaction, otherwise RuntimeException to rollback any changes; but maybe there is another solution?)
    Thanks in advance,
    Maxym

    If you use CMT EJBs, then you do not have to begin, commit, or roll back.
              If your client calls methods that can throw application exceptions, then you
              must handle the transaction (commit or roll back) in the cases that those
              application exceptions are thrown.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "TH Lim" <[email protected]> wrote in message
              news:3a3989d6$[email protected]..
              >
              > Hi,
              >
              > Part of my client code looks like this,
              > try {
              > ..
              > trans.begin(); // transaction begins
              > .. // calling some EJB methods
              > ..
              > trans.commit(); // transaction commits
              > }
              > catch(Exception e)
              > {
              > }
              >
              > My question is do I have to explicitly do a trans.rollback() if there is a
              RemoteException thrown between begin() and commit(). Do I have to
              instantiate a new transaction if the current transaction is rollbacked?
              Thank you.
              

  • [Solved] if(Transaction specified for a non-transactional database) then

    I am getting started with BDBXML 2.4.14 transactions and XQuery update functionality and I am having some difficulty with 'node insert ...' and transactions failing with 'Transaction specified for a non-transactional database'
    Thanks for helping out.
    Setup:
    I have coded up a singleton manager for the XmlManger with a ThreadLocal holding the transaction and a query method to execute XQueries. The setup goes like this:
    environmentConfig = new EnvironmentConfig();
    environmentConfig.setRunRecovery(true);               environmentConfig.setTransactional(true);               environmentConfig.setAllowCreate(true);               environmentConfig.setRunRecovery(true);               environmentConfig.setInitializeCache(true);                environmentConfig.setTxnMaxActive(0);               environmentConfig.setInitializeLocking(true);               environmentConfig.setInitializeLogging(true);               environmentConfig.setErrorStream(System.err);
    environmentConfig.setLockDetectMode(LockDetectMode.MINWRITE);               environmentConfig.setJoinEnvironment(true);               environmentConfig.setThreaded(true);
    xmlManagerConfig = new XmlManagerConfig();               xmlManagerConfig.setAdoptEnvironment(true);               xmlManagerConfig.setAllowAutoOpen(true);               xmlManagerConfig.setAllowExternalAccess(true);
    xmlContainerConfig = new XmlContainerConfig();               xmlContainerConfig.setAllowValidation(false);               xmlContainerConfig.setIndexNodes(true);               xmlContainerConfig.setNodeContainer(true);
    // initialize
    instance.xmlManager = new XmlManager(instance.getEnvironment(),                    instance.getXmlManagerConfig());
    instance.xmlContainer = instance.xmlManager.openContainer(                              containerName, instance.getXmlContainerConfig());
    private ThreadLocal<XmlTransaction> transaction = new ThreadLocal<XmlTransaction>();
    public XmlTransaction getTransaction() throws Exception {
              if (transaction.get() == null) {
                   XmlTransaction t = xmlManager.createTransaction();
                   log.info("Transaction created, id: " + t.getTransaction().getId());
                   transaction.set(t);
              } else if (log.isDebugEnabled()) {
                   log.debug("Reusing transaction, id: "
                             + transaction.get().getTransaction().getId());
              return transaction.get();
         private XmlQueryContext createQueryContext(String docName) throws Exception {
              XmlQueryContext context = xmlManager.createQueryContext(
                        XmlQueryContext.LiveValues, XmlQueryContext.Lazy);
              List<NamespacePrefix> namespacePrefixs = documentPrefixes.get(docName);
              // declare ddi namespaces
              for (NamespacePrefix namespacePrefix : namespacePrefixs) {
                   context.setNamespace(namespacePrefix.getPrefix(), namespacePrefix
                             .getNamespace());
              return context;
         public XmlResults xQuery(String query) throws Exception {
              XmlQueryExpression xmlQueryExpression = null;
              XmlQueryContext xmlQueryContext = getQueryContext(docName);
              try {
                   xmlQueryExpression = xmlManager.prepare(getTransaction(), query,
                             xmlQueryContext);
                   log.info(query.toString());
              } catch (Exception e) {
                   if (xmlQueryContext != null) {
                        xmlQueryContext.delete();
                   throw new DDIFtpException("Error prepare query: " + query, e);
              XmlResults rs = null;
              try {
                   rs = xmlQueryExpression.execute(getTransaction(), xmlQueryContext);
              // catch deadlock and implement retry
              catch (Exception e) {
                   throw new DDIFtpException("Error on query execute of: " + query, e);
              } finally {
                   if (xmlQueryContext != null) {
                        xmlQueryContext.delete();
                   xmlQueryExpression.delete();
              return rs;
    <?xml version="1.0" encoding="UTF-8"?>
    <Test version="0.1">
    <Project id="test-project" agency="dda">
    <File id="large-doc.xml" type="ddi"/>
    <File id="complex-doc.xml" type="ddi"/>
    </Project>
    <Project id="2nd-project" agency="test.org"/>
    </Test>
    Problem:
    All the queries are run through the xQuery method and I do delete the XmlResults afterwards. How do I get around the 'Transaction specified for a non-transactional database' what is the transactions doing? How do I get state information out of a transaction? What am I doing wrong here?
    1 First I insert a node:
    Transaction created, id: -2147483647
    Adding document: large-doc.xml to xml container
    Reusing transaction, id: -2147483647
    Working doc: ddieditor.xml
    Root element: Test
    Reusing transaction, id: -2147483647
    insert nodes <Project id="JUnitTest" agency="test.org"></Project> into doc("dbxml:/ddieditor.dbxml/ddieditor.xml")/Test
    Reusing transaction, id: -2147483647
    2 Then do a query:
    Reusing transaction, id: -2147483647
    doc("dbxml:/ddieditor.dbxml/ddieditor.xml")/Test/Project/@id
    Reusing transaction, id: -2147483647
    3 The same query again:
    Reusing transaction, id: -2147483647
    doc("dbxml:/ddieditor.dbxml/ddieditor.xml")/Test/Project/@id
    Reusing transaction, id: -2147483647
    4 Delete a node:
    Reusing transaction, id: -2147483647
    delete node for $x in doc("dbxml:/ddieditor.dbxml/ddieditor.xml")/Test/Project where $x/@id = '2nd-project' return $x
    Reusing transaction, id: -2147483647
    5 Then an error on query:
    Reusing transaction, id: -2147483647
    doc("dbxml:/ddieditor.dbxml/ddieditor.xml")/Test/Project/@id
    Reusing transaction, id: -2147483647
    Transaction specified for a non-transactional database
    com.sleepycat.dbxml.XmlException: Error: Invalid argument, errcode = DATABASE_ERROR
         at com.sleepycat.dbxml.dbxml_javaJNI.XmlResults_hasNext(Native Method)
         at com.sleepycat.dbxml.XmlResults.hasNext(XmlResults.java:136)
    Message was edited by:
    jannikj

    Ok got it solved by increasing the locks lockers and mutex's I allso increased the the log buffer size:
    environmentConfig = new EnvironmentConfig();
                   // general environment
                   environmentConfig.setAllowCreate(true);
                   environmentConfig.setRunRecovery(true); // light recovery on startup
                   //environmentConfig.setRunFatalRecovery(true); // heavy recovery on startup
                   environmentConfig.setJoinEnvironment(true); // reuse of environment: ok
                   environmentConfig.setThreaded(true);
                   // log subsystem
                   environmentConfig.setInitializeLogging(true);
                   environmentConfig.setLogAutoRemove(true);
                   environmentConfig.setLogBufferSize(128 * 1024); // default 32KB
                   environmentConfig.setInitializeCache(true); // shared memory region
                   environmentConfig.setCacheSize(2500 * 1024 * 1024); // 250MB cache
                   // transaction
                   environmentConfig.setTransactional(true);
                   environmentConfig.setTxnMaxActive(0); // live forever, no timeout               
                   // locking subsystem
                   environmentConfig.setInitializeLocking(true);
    environmentConfig.setMutexIncrement(22);
    environmentConfig.setMaxMutexes(200000);
    environmentConfig.setMaxLockers(200000);
    environmentConfig.setMaxLockObjects(200000); // default 1000
    environmentConfig.setMaxLocks(200000);
    // deadlock detection
                   environmentConfig.setLockDetectMode(LockDetectMode.MINWRITE);
    In the docs by Oracle it is limited information given regarding the impact of these settings and their options. Can you guys point in a direction where I can find some written answers or it hands on?

  • Put failure behavior in a non-transactional db?

    Hi all,
    I'm still getting to know the ropes here, so hopefully this isn't a stupid question. I'm still prototyping an application, and as such I haven't set my database to be transactional (learning one thing at a time). The app runs for quite a while, but eventually it tries to put an entity into a primary index that violates one of the secondary key constraints (uniqueness). The put() call throws an exception (properly showing KEYEXIST) but then all subsequent operations that I try to perform fail with a lock timeout (DeadlockException).
    My guess is that some resource wasn't cleaned up after the exception since I'm not running transactionally (so no auto-commit), but I can't find any documentation to back that up. Am I likely to avoid this problem if I turn on transactions? If I don't, is there something in the API I can do to clean up after an exception in a non-transactional put?
    Thanks!
    Jeff Alexander

    You may want to check to make sure that you're not leaving a cursor open when an exception occurs. An open cursor will hold a lock. I recommend closing cursors in a finally block.
    If a lock is held by mistake (either your mistake such as not closing a cursor, or a bug in JE), a deadlock may not be caused immediately because other operations may not need to lock the same record. To debug this, perhaps after receiving the KEYEXIST exception and closing cursors properly, you could try closing all Databases and the Environment. Environment.close will throw an exception if any locks were not released.
    It would be nice if there were a way to query the number of outstanding locks, but I don't think we have a way to do that currently, without reaching into JE internals.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Send message in a non-transactional context

    I've coded a simple Log4j appender to send error messages to a queue (JMSAppender provided by Log4J is not good for me because it use a publish/subscrive model and use topics instead of queues); the appender has to work in a non transactional context, so the appender has to send always the message to queue although the global transaction rollbacks; I've create queue session settings transacted parameter to false and acknowledgeMode to AUTO_ACKNOWLEDGE , but message is not delivered to queue if the global transaction, started by an EJB Stateless Session Bean, rollbacks; in my environment (IBM WebSphere and IBM MQ), queue connection factory is configured no-XA resource.
    Any suggestions?
    Below the source code.
    Thanks in advance
    context = new InitialContext();
    queueFactory = (QueueConnectionFactory) context.lookup(getQueueConnectionFactoryBindingName());
    queueConnection = queueFactory.createQueueConnection();
    queueSession = queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
    queue = (Queue) context.lookup(getQueueBindingName());
    queueSender = queueSession.createSender(queue);
    queueConnection.start();Rob

    I've coded a simple Log4j appender to send error messages to a queue (JMSAppender provided by Log4J is not good for me because it use a publish/subscrive model and use topics instead of queues); the appender has to work in a non transactional context, so the appender has to send always the message to queue although the global transaction rollbacks; I've create queue session settings transacted parameter to false and acknowledgeMode to AUTO_ACKNOWLEDGE , but message is not delivered to queue if the global transaction, started by an EJB Stateless Session Bean, rollbacks; in my environment (IBM WebSphere and IBM MQ), queue connection factory is configured no-XA resource.
    Any suggestions?
    Below the source code.
    Thanks in advance
    context = new InitialContext();
    queueFactory = (QueueConnectionFactory) context.lookup(getQueueConnectionFactoryBindingName());
    queueConnection = queueFactory.createQueueConnection();
    queueSession = queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
    queue = (Queue) context.lookup(getQueueBindingName());
    queueSender = queueSession.createSender(queue);
    queueConnection.start();Rob

  • Non cumulative with non-cumulative change

    Hi Experts,
    I have a Question !, As i know that i can create Non-Cumulative Figure By Means Of two ways:-
    1. Non cumulative with non-cumulative change and
    2. Non Cumulative with Inflow and Outflow.
    the second one is very clear but i am not very clear about 1st option i.e What Non-Cumulative Value changes is? and how it calculates the non-cumulative Value.
    If u have an Idea please share your knowledge...
    Ragards
    Prakash

    The 1st option is for key figures like headcount or similar, which you would like to store as a total figure in a cube instead of a DSO in a scenario where you are using a multiprovider on this together with other non-cumulative cubes.
    The SAP help below explains this quite well
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/da1640dc88e769e10000000a155106/frameset.htm
    Best,
    Ralf

  • Regarding VX22 Transaction [Change License Data]

    Hi All,
    I have a issue related to <b>VX22 Transaction [Change License Data]</b>.
    Do anybody knows the wether any <b>BAPI</b> available for <b>Change License Data[VX22]</b>.
    I actually have to perform a BDC for change license data some times for <b>Multiple items for single Sales Document number</b> at a time.
    I have Done the recording[SHDB] and added the following code to main program.
    Can anybody tell me wether this code will perfectly work for <b>Multiple Items of Single Sales Document Number</b> in <b>VX22 Transaction</b>.
    <b>  PERFORM f_bdc_dynpro      USING 'SAPMV52G' '0100'.
      PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                      'VBAK-VBELN'.
      PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
      PERFORM f_bdc_field       USING 'VBAK-VBELN'
                                      i_data-vbeln.
      PERFORM f_bdc_field       USING 'RV52G-SELKZ'
                                      c_x.
      LOOP AT i_pdata.
        PERFORM f_bdc_dynpro      USING 'SAPLV52E' '0500'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        'RV52G-SELKZ(08)'.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                        '=DETA'.
        PERFORM f_bdc_field       USING 'RV52G-SELKZ(08)'
                                        c_x.
        PERFORM f_bdc_dynpro      USING 'SAPLV52E' '0520'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        'VBEX-MODCO'.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
        PERFORM f_bdc_field       USING 'VBEX-ALNUM'
                                        i_pdata-zzalnum.
        PERFORM f_bdc_field       USING 'VBEX-EMBGR'
                                        i_pdata-zzembgr.
        PERFORM f_bdc_field       USING 'VBEX-GENNR'
                                        i_pdata-zzgennr.
        PERFORM f_bdc_field       USING 'VBEX-MODCO'
                                        i_data-modco.
        PERFORM f_bdc_dynpro      USING 'SAPLV52E' '0520'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        'VBEX-ALNUM'.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
        PERFORM f_bdc_field       USING 'VBEX-ALNUM'
                                        i_pdata-zzalnum.
        PERFORM f_bdc_field       USING 'VBEX-EMBGR'
                                        i_pdata-zzembgr.
        PERFORM f_bdc_field       USING 'VBEX-GENNR'
                                        i_pdata-zzgennr.
        PERFORM f_bdc_field       USING 'VBEX-MODCO'
                                        i_data-modco.
      ENDLOOP.
      PERFORM f_bdc_dynpro      USING 'SAPLV52E' '0500'.
      PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                      '*VBEX-VBELN'.
      PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '=SICH'.
      PERFORM f_bdc_transaction USING 'VX22'.</b>
    I have make use of Session Method for it.
    I had run through it against VX22 in all 3 modes and it is working fine for single line item for a sale order.
    If any changes required for it to work for Multiple line items please suggest.
    If any body knows <b>BAPI</b> for the same process please post.
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    Hi All,
    Anybody worked on above kind of scenario,
    If yes please sujjest!
    Has Anybody worked with <b>VX22</b> Transaction
    If worked please reply to above post!
    Thanks & Regards,
    Rayeez.

  • Non transactional data source and ejb transaction

    Inside an ejb method with trans-attribute = Required,
    Do a bunch of things using a transactional data source and a bunch of things using
    a non trasnactional data source.
    Looks like the time spent doing the non-transactional data source related work
    does not count for the transaction timeout defined for the ejb.
    So, what happens here, the ejb transaction is suspended ( when I start using the
    non transactional ds ) ?

    Hi,
    "siddiqut" <[email protected]> wrote in message news:3fa7c79d$[email protected]..
    Inside an ejb method with trans-attribute = Required,
    Do a bunch of things using a transactional data source and a bunch of things using
    a non trasnactional data source.
    Looks like the time spent doing the non-transactional data source related work
    does not count for the transaction timeout defined for the ejb.
    So, what happens here, the ejb transaction is suspended ( when I start using the
    non transactional ds ) ?The transaction is not suspended when you call something
    which is not non-transactional.
    Regards,
    Slava Imeshev

  • "Exception thrown in non-transactional EJB invoke"

              When I throw an application exception from within a statless session bean which uses jdbs for DB Lookup Only I get
              "Exception thrown in non-transactional EJB invoke".
              As this is a llokup only I have no Transaction Management
              

    Tao,
              > If your ejb method is in a transaction context, then you throw application
              exception, the container will try to commit the transaction.
              In the case of an application exception, the caller will be responsible for
              committing or rolling back the transaction. (A runtime exception will roll
              back the transaction automatically.) That is why, if you use CMT, that the
              EJB methods call from outside the EJB container (such as from a servlet)
              should never be able to throw runtime exceptions.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Tao Zhang" <[email protected]> wrote in message
              news:3a33c04a$[email protected]..
              >
              > Hi,
              > It's ok because you look after the transaction yourself. probably you use
              the default transaction attribute 'Supports'.
              >
              > If your ejb method is in a transaction context, then you throw application
              exception, the container will try to commit the transaction.
              >
              > Hope this can help.
              > Tao Zhang
              >
              > "Gormless" <[email protected]> wrote:
              > >
              > >When I throw an application exception from within a statless session bean
              which uses jdbs for DB Lookup Only I get
              > >"Exception thrown in non-transactional EJB invoke".
              > >
              > >As this is a llokup only I have no Transaction Management
              >
              

  • Non-transactional datastores

    In the WebLogic 5.1 documentation it mentions that for non-transactional
              datastores in a cluster that you can use a custom "dictionary" object to
              keep track of which webLogic server instance is currently hosting a given
              entity bean. This approach is used to insure the integerity for entity EJBs
              in the cluster.
              My question is, has anyone done this or does someone at WebLogic have an
              example or additional information on what all is required to implement this
              "dictionary" object?
              Thanks in advance,
              Michael
              

    I would suggest that you use read-only entity beans for caching
              non-transactional data. Much of the data on websites is
              non-transactional and can be cached for a while.
              For transactional data, I would use a regular entity bean and incur the
              overhead of going to the db.
              -- Rob
              Michael Rousey wrote:
              >
              > I am runningWL 5.1 in a clustered environment. I have an entity bean which
              > represents a complex hierarchy of objects. I would like to be able to take
              > advantage of a caching mechanism so that every call to the bean does not
              > force a reload from the database. In order to accomplish this I need to
              > either guarantee all calls to a single instance of the bean go to a single
              > machine(so the cache is in sync with the DB), or have a clustered cache(I
              > don't want to try and tackle this). The documentation under "entity EJBs
              > in a cluster" talked about a "dictionary" object that appears to act as a
              > router. The idea is for the dictionary object to keep track of which
              > instance of the bean is deployed on a specific machine in the cluster. All
              > actors would use the dictionary to obtain the specific instance of the bean
              > they need. If the instance is new, then WL would create a new instance in a
              > normal fashion; the dictionary object would keep track of the new instance
              > and forward and new request to the machine where the instance was created.
              > This is similar to factory based routing in WLE.
              >
              > Any help on how to implement this or any additional ideas would be helpful.
              >
              > Thanks,
              >
              > Michael
              >
              > "Rob Woollen" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hmm, I'm not sure what the docs were talking about here.
              > >
              > > Can you provide some more details about what you are trying to do?
              > >
              > > -- Rob
              > >
              > > Michael Rousey wrote:
              > >
              > > > In the WebLogic 5.1 documentation it mentions that for non-transactional
              > > > datastores in a cluster that you can use a custom "dictionary" object to
              > > > keep track of which webLogic server instance is currently hosting a
              > given
              > > > entity bean. This approach is used to insure the integerity for entity
              > EJBs
              > > > in the cluster.
              > > >
              > > > My question is, has anyone done this or does someone at WebLogic have an
              > > > example or additional information on what all is required to implement
              > this
              > > > "dictionary" object?
              > > >
              > > > Thanks in advance,
              > > >
              > > > Michael
              > >
              

Maybe you are looking for

  • Showing dynamic images in BI Publisher PDF report

    I defined a RTF report layout in BI Publisher. Almost done, but one requirement missing... I should be able to include a dynamic image (so every "object" on the report has it's own image). At first I embedded the base64 converted image in the XML out

  • Sorting songs on an album with multiple artists

    Im trying to sort an album with multiple artists so that in the artist view the song appears under that artist like this: The song Young and Beautiful is from The Great Gatsby soundtrack but as its by Lana Del Rey and im in the Artist view I want it

  • Windows XP to Windows 7 problem.

    When I iried installing Windows 7, it will stop while attempting to expand the files and suddenly display an error code , like 08X-------070, sorry I forgot to write it down. But the disturbing part is my PC will not start again, as it comes up with

  • Error: Gaps in Smart Objects imported from Illustrator

    Hi, I would like to report an error in Photoshop CS6 (the latest patches have been installed). I've only recently purchased CS6 and have never posted in this forum before. Apologies in advance if this isn't the correct procedure for reporting errors.

  • AVI files need rendering

    I've recently been given the task of preparing six hours of short video clips for a foreign language class learning to use some editing programs, iMovie will not work because of the time it takes to import the clips, but final cut is having a problem